Category Archives: Libraries

Utility libraries

Utility libraries

 

VPKSoft.RandomizationUtils

Some randomization utilities which includes biased randomization, weighted randomization and some extensions for double randomization for the Random class.

Features

  • Biased randomization randoms to either lower or higher end of the given randomization minimum and maximum values.
  • Weighted randomization randomizes items with a given arbitrary weight number.
  • Extension methods to the Random class mostly extends the floating-point randomization to match the integer randomization overload method counterparts.

Download

VPKSoft.ScintillaLexers

A class library containing lexer definitions for the ScintillaNET.

Features

  • Easy to use class library to set a lexer definition for the ScintillaNET control.
  • Containing lexer definitions for C++, C#, SQL, XML, NSIS, Batch, Pascal, HTML, PHP and INI programming “languages”/languages.

Download

VPKSoft.ScintillaTabbedTextControl

A tabbed control for ScintillaNET to display multiple documents.

Features

  • A simple Windows Forms control capable of displaying multiple tabbed documents. 

Screenshot

Download

VPKSoft.ScintillaSpellCheck

A spell checking library for the ScintillaNET.

Features

  • Supports UTF-8 Hunspell dictionaries for spell checking using pure C# library called WeCantSpell: Hunspell for spell checking a text file
  • Support for user dictionaries and user ignore word lists

Screenshot

Download

VPKSoft.SearchText

A simple plain text search and replace library.

Features

  • Searches and replaces a text with regular expressions, plain text, extended search and a custom number-string search. 

Screenshot in use with the ScriptNotepad software

Download

ScintillaNetPrinting 

Add print functionality to ScintillaNET.

Features

  • This is just a fork from poloab‘s printing library for the ScintillaNET; I have issued a PR for the repository to be updated.
  • My additions are that the library will use the current thread locale and use the application icon with the dialog(s).

Screenshot with the ScriptNotepad software

Download

VPKSoft.VersionCheck

An utility for an application to check if a newer version of the application exists. You can also maintain your own releases within the web site.

The VersionMaintenance software

Download

VPKSoft.ScintillaUrlDetect

A library to detect URLs with the ScintillaNET control.

The TestApp

Download

VPKSoft.WinFormsRtfPrint

A library to print RichTextBox contents from a Windows Forms application.

Download

VPKSoft.SpellCheckUtility and VPKSoft.SpellCheckUtility.WinForms

A spell checking interface for both real-time and postponed spell checking using the fantastic WeCantSpell: Hunspell class library.

  • Based on an interface to visualize the spell checking.
  • Support for user ignore lists and dictionaries.

Screenshot

Download

VPKSoft.UNCUtil

VPKSoft.UNCUtil

An (library) utility to access Windows (SMB/CIFS) shares with credentials.

Features

Requirements

  • A Microsoft® Windows® supporting .NET Framework v.4.5
  • LGPL v3 compatible application

Changes

 Usage

private void Test()
{
	try // an error might occur..
	{
		// IDisposable so using..
		using (UNCLogin share1 = new UNCLogin(@"\\server1\share1",
			new System.Net.NetworkCredential("username1", "password1", "domain1")))
		{
			// IDisposable so using..
			using (UNCLogin share2 =
				new UNCLogin(@"\\server2\share2", new System.Net.NetworkCredential("username2", "password2", "domain2")))
			{
				// a normal file operation with the given credentials.
				File.Copy(@"\\server1\share1\somefile.dat", @"\\server2\share2\somefile.dat");
			}
		}
	}
	catch (Exception ex)
	{
		// show the error message..
		MessageBox.Show(ex.Message);
	}
}

Download

VPKSoft.TMDbFileUtils

VPKSoft.TMDbFileUtils

A library to help enumerate both movie files and directories containing TV show seasons and the run them through the TMBb API.

 

Features

  • Current version 1.0.0.0 (09.08.2018)
  • Helper classes to search the TMDb API using the TMdbEasy library through enumerating files in the file system and then construct searches for the TMDb for movies or TV show seasons.
  • The return value indicates a poster/still image path, description and detailed description with a file name including all the TMDb ID numbers.
  • A helper class to save the TMDb API configuration serialized to XML format for a week so it doesn’t have to be downloaded every time a program is launched.

 

Requirements

  • A Microsoft® Windows® supporting .NET Framework v.4.6.1
  • A GPLv3 compatible application

 

Changes

  • v.1.0.0.0 (09.08.2018)
  • Initial release 

 

Usage (non-asynchronous)

        private void button3_Click(object sender, EventArgs e)
        {
            EasyClient easy = new EasyClient("abcdefghijklmnopqrstuvwxyz");
            configurations = TMDbConfigCache.GetConfigurations(easy, TMDbConfigCache.ConfigPathWinforms);

            var details = TMDbFileEnumerator.GetMovies(easy, @"Z:\Movies");
            foreach (var detail in details)
            {
                MessageBox.Show(detail.Description);
            }
        }

 

A necessary advertisement

 

 

Screen shots

A Visual Studio 2017 Community Edition IDE

 

Download

Source, GitHub

 

NuGet

 

 

VPKSoft.VisualFileSysWatcher

VPKSoft.VisualFileSysWatcher

A library to log and view changes on the file system. This is a Windows.Forms control.

 

Features

  • Current version v.1.0.0.0 (06.08.17)
  • A visual component which uses Rich Text to show file system changes visually and can also write a log (*.log) as a pain text file
  • A support for filters and exclude filters is possible
  • A truncation of of both visual and file logs can be set via the component’s properties
  • Colors can be defined for events when a file or a directory was either renamed, deleted, modified or created for the visual log via the component’s properties
  • The component is fully localizable via the component’s properties
  • Full XML documentation including private/public members and internal code documentation
  • Support for architectures “ANY CPU”
  • No p/invokes are used
  • No dependencies to external libraries

 

Requirements

  • A Microsoft® Windows® supporting .NET Framework v.4.5
  • LGPL v3 compatible application
  • The icons used by the were created by the Aha-Soft 16×16 Free Application Icons collection which is licensed under the terms of (CC BY 3.0 US).
  • The FolderSelectDialog is Public Domain from this blog (Dev Blog / Bill)

 

Changes

 

Screenshots

A sample application running the component (monitoring C:\) with exclude filter of “appdata” and file mask of “*.*”

Download

Source

{phocadownload view=file|id=103|target=s}

Binary

{phocadownload view=file|id=102|target=s}

NuGet

 

VPKSoft.RichTextEdit

A .NET library containing a WinForms control called RichTextBoxWithToolStrip.

As the name tells the control is a RichTextBox with an embeded ToolStrip.

Features

  • Current version 1.0.0.0 (22.08.16)
  • A .NET library containing a WinForms control called RichTextBoxWithToolStrip
  • Common text editor features are programmed to the embedded ToolStrip
  • Shortcut key support is included such as CTRL+B, CTRL+I, CTRL+U keyboard shortcuts are supported and those supported by a RichTextBox control
  • Full XML documentation (private / public) and some internal code documentation
  • No platform invoke calls are used

Requirements

  • .NET Framework v.4.5

Changes

License

Known issues

  • An image resize mouse cursor is not available, but inserted images can be resized anyway

Screenshots

A sample application running, below it are shown the custom ToolStrip controls embeded within the control

Properties used by the RichTextBoxWithToolStrip control in Visual Studio designer

To add the control to Visual Studio, there is no installer because I’m using VS2013 Express edition it needs to be done manually

1) Right click the ToolBox

2) Browse the VPKSoft.RichTectEdit.dll assembly

3) There it is

Download

VPKSoft.TextEditIcons

A single .NET library which contains common text editor icons which colors can be changed.

The icons in the library are provided as PNG (Portable Network Graphics) and XCF (GIMP Graphics).

All icons in the library except the Undo and Redo were created by VPKSoft(me) so you are free to use them anyway you wish (public domain). The Undo and Redo icons are modified from the Aha-Soft 16×16 Free Application Icons collection which is licensed under the terms of (CC BY 3.0 US).

Features

  • Current version 1.0.0.0 (14.08.2016)
  • A single .NET library containing 27 text editor icons (size: 16×16)
  • The colors of the icons can be changed
  • Small size (about 68 KB)
  • Full XML documentation (private / public)

Requirements

  • .NET Framework v.4.5

Changes

License

Screenshots

A ToolStrip with different colored icons

A resource editor tab in Visual Studio 2013 Express

Download

VPKSoft.MayanCalendar

A library to convert between Mayan to Gregorian calendars and vice versa.

Features

  • Current version v.1.0.1.0 (29.05.22)
  • Can convert dates from Mayan to Gregorian
  • Can convert dates from Gregorian to Mayan
  • Supports also the Mayanist inventions for higher order periods than b’ak’tun: piktun, kalabtun, k’inchiltun, and alautun
  • Supports any JDN correlations and also includes those listed by the Wikipedia
  • Includes the Haab’ month and the Tzolk’in day names. Includes also static properties to get the period names in their right writing format (hyphens, ‘)
  • Multiple overloaded constructors (string, number) supporting both Mayan and Gregorian dates
  • Full XML documentation including private/public members
  • A simple sample application

Sources

Requirements

  • .NET Standard 2.1
  • MIT compatible application

Changes

Screenshots

A test application showing the “current” date 

Download


PosLib

PosLib is a software library to save form / window positions for .NET applications (WinForms and WPF).

The positioning data is saved to a position.vnml file to directory %LOCALAPPDATA%\[application product name].

Features

  • Current version 1.0.1.1 (04.02.2018)
  • Supports both WPF and WinForms
  • Customizable control property values can be saved, such as column width, e.g.
  • Full XML documentation including private or internal methods, properties, etc..
  • Sample application for both Windows forms and WPF are included.
  • Support for multiple “name” referencing in the order of Uid (WPF only), Name and Tag=Name=”controlName”
  • Reacts to screen setting change while the application is running, e.g. a monitor was disconnected
  • Reacts to form / window resize during run-time to prevent a placement to an invalid location
  • A form / window state (Minimized, Maximized, Normal) is saved

Requirements

  • A Microsoft® Windows® supporting .NET Framework v.4.5 (possibly downgreadable by modifying the source project settings)
  • LGPL v3 compatible application

Changes

  • v.1.0.1.0 (07.11.2017)
  • Fixed an error that caused a program using the library to crash if a secondary Windows Form was opened second time in the software
  • v.1.0.1.1 (04.02.2018)
  • Just a recompile, because an underlying library was updated

Screenshots

A WPF demo application running after resize and the data the application saved after it was closed

A WinForms demo application running after resize and the data the application saved after it was closed

Download


ButtonzVZ

An engine to simulate a button-/block -related game.

 

Features 

  • Current version 1.0.0.0 (18.10.15)
  • An engine and some sample applications for a button-/block -related game.
  • A sample application is included.
  • A hard-to-use button/block designer is included.
  • Game dimensions are user defined.
  • Blocks/buttons are user defined.
  • A possibility and a requirement to use the VPKSoft.Utils library, please do alter to source code to avoid this requirement under the terms of the GPL v3 license.
  • Visualization methods are endless – use text, WinForms, WPF or something other supporting Microsoft® Windows® supporting .NET Framework v.4.5.

Requirements

  • A Microsoft® Windows® supporting .NET Framework v.4.5
  • LGPL v3 compatible application

Changes

Reason for the weird name?

The answer is as simple as – someone might think this hobby project relates anyway to a game(s) called “Tetris“..

Screen shot(s)

A test game running with weird blocks

A hardly-usable button/block designer

Button/block definition

Download

VPKSoft.Utils

Some utilities I seem to use in many of my applications.
These sort of lay a path for further development to avoid copy-paste programming and easier code management.

The only thing that is going to remain stable in this library is it’s backwards compatibility, so if a method’s insides are re-programmed due a bug or for an improvement you may update your application by replacing the library.

There will be no instructions for this one, however as almost always a full XML documentation is available
for public / private methods / properties.

Features

  • Current version 1.0.3.6 (04.09.2018)
  • The pack is divided to 29 different classes which are:
  • BasicSecurity – Helper methods for System.Security.ProtectedData class
  • Bytes – Helper methods for byte <-> string conversion and hexadecimal string <-> byte array conversion
  • ProgramArgumentCollection – A simple class to get program arguments and to get their values if the format is arg=blah or –arg=blah, etc.
  • DBUtils – I like to do SQL the old fashioned way, by writing! So some utilities to help in that cause
  • Misc – Currently just enumerations
  • Paths – Some utilities to application related paths such as the installation directory and settings directory
  • Utils – Non-categorized utilities, currently about detecting to host application type (WPF? WinForms? ASP.NET?)
  • Strings – String extension utils, mostly trimming
  • VPKNml – A simple library for storing data, setting, etc.. in and UTF8 encoded file
  • MainAppInfo – A simple class to get information of the main application. It doesn’t matter if you call this class from an assembly or from the application itself.
  • AppRunning – A way to detect if your application is already running using Mutex and an unique string.
  • HumanActivity – A WinForm class for monitoring when a user goes idle (no mouse or keyboard activity in a given time).
  • RemotingMessageServer, RemotingMessageClient – A simple implementation of .NET remoting (inter-process communication) using TCP protocol.
  • NetSH – netsh utilities to ease WCF permission settings
  • UriUrlUtils – Some URL parsing utilities such as if your WCF endpoint address is http://localhost:991/myService the URL is can be parsed to netsh format like http://+:991/
  • SysIcons – Possibility to access system icons and to get them as scaled bitmaps 
  • BuiltInWindowsAccountsLocalize – Possibility to localize Windows built in account names
  • ObjectSerialization – A class containing helper methods for object serialization
  • FileEnumerator class which can search for directories containing certain types of files, etc..
  • TimeTaker class to help measure times for a specified code block execution.

Requirements

  • A Microsoft® Windows® supporting .NET Framework v.4.5
  • LGPL v3 compatible application

Changes

  • v.1.0.0.1 (03.10.2015)
  • Added some string extension utils, mostly trimming (Strings).
  • Added a simple library for storing data, setting, etc.. in and UTF8 encoded file (VPKNml).
  • v.1.0.0.2 (20.10.2015)
  • Added a simple class to get information of the main application. It doesn’t matter if you call this class from an assembly or from the application itself (MainAppInfo).
  • v.1.0.0.3 (03.11.2015)
  • Added some data deletion routines to vnml (VPKNml)
  • v.1.0.0.4 (06.01.2016)
  • Added AppRunning – A way to detect if your application is already running using Mutex and an unique string.
  • Added HumanActivity – A WinForm class for monitoring when a user goes idle (no mouse or keyboard activity in a given time).
  • Added RemotingMessageServer, RemotingMessageClient – A simple implementation of .NET remoting (inter-process communication) using TCP protocol.
  • v.1.0.1.0 (04.02.2018)
  • Added NetSH – netsh utilities to ease WCF permission settings
  • Added UriUrlUtils – some URL parsing utilities such as if your WCF endpoint address is http://localhost:991/myService the URL is can be parsed to netsh format like http://+:991/
  • Added SysIcons – possibility to access system icons and to get them as scaled bitmaps
  • v.1.0.2.0 (23.07.2018)
  • Added WM_MOUSEMOVE to the HumanActivity class
  • Added ObjectSerialization containing helper methods to for object serialization and deserialization
  • Added class BuiltInWindowsAccountsLocalize to localize Windows built in account names
  • Bug fixes for the netsh
  • v.1.0.3.0 (02.08.2018)
  • Added FileEnumerator class which can search for directories containing certain types of files, etc..
  • v.1.0.3.1 (04.08.2018)
  • Fixed bugs from the FileEnumerator class which can search for directories containing certain types of files, etc..
  • v.1.0.3.4 (09.08.2018)
  • Added asynchronous methods to the FileEnumerator class.
  • v.1.0.3.6 (04.09.2018)
  • Added TimeTaker class to the library..

Screenshot (hehee) 😃

Something…

Download