ElektroKit for .Net Framework
What is ElektroKit?
ElektroKit is a utility framework containing new APIs and extensions to the core .Net Framework to help complete your developer toolbox.
It is a set of general purpose classes provided as easy to consume packages. The toolset is also available as source code so you can pick and choose functionality from the toolset if you only need individual features.
These utility classes and components provide productivity in day to day software development mainly focused to WindowsForms. Many of these tools and components have been published individually in articles, forums or blog entries and there have been many requests to publish them as a supported and consolidated library, which turned into this unified toolkit that is integrated, documented and fully supported.
Donations
Donations are useful and are always welcome!
If you liked the job I've done then maybe you will consider to support for the motivation of this project by sending money.
Thanks in advance!
What's in it?
ElektroKit is made up of the following assemblies:
Elektro.Application | Contains application related utilities. |
Elektro.Application.ThirdParty | Contains 3rd party library related utilities. |
Elektro.Core | Contains the core of Elektrokit, full of different utilities. |
Elektro.Imaging | Contains imaging related utilities. |
Elektro.Interop | Contains interoperability and unmanaged related utilities. |
Elektro.Multimedia | Contains audio and video related utilities. |
Elektro.Net | Contains networking and web related utilities. |
Elektro.Processes | Contains processes related utilities. |
Elektro.System | Contains operating system related utilities. |
Downloads
There are alternative downloads that integrates with Visual Studio:
ElektroKit ( NuGet Package ) |
Documentation
All the members of ElektroKit source-code are documented and exposed in different ways.
Offline documentation is available as .chm files hosted in the GitHub repository.
ElektroKit v1.9 |
Note there are a lot of code examples for most of the ElektroKit members which can be a good starting place, like this random example:
The code examples are also available in the source-code as part of the Xml documentation.
An xample of the Xml documentation format:
An example of Intellisense preview:
Dependencies
Various members of the ElektroKit project depends on Elektro.Interop assembly or other assemblies that are part of the project. Note that any required assembly will be warned by visual studio, don't worry about.
Some members of the Elektro.Application and Elektro.System assemblies depends on WindowsAPICodePack project, which is included in the source-code, but also can be downloaded from here:
Note that there is no need to reference the WindowsAPICodePack assemblies in your application as long as you don't need to use the members that requires it, and the same for the other Elektro* assemblies.
Bugs and feature requests
Do you have a bug or a feature request? Please use the issue tracker and search for existing and closed issues.
If your problem or request isn't addressed yet, go ahead and open a new issue.
Contributing
You can also get involved and fork the repository to submit your own pull requests.
No coding guidelines to follow (by the moment).
Creators
- Christian Soriano aka. Elektro - for the initial conception of the toolkit and core contributor.
Copyright and license
Code and documentation copyright 2014-2016 ElektroStudios.
Code is licensed under the Microsoft Public License, use it as you wish (but please provide some credit somewhere in your app.)
What can do ElektroKit for me?
It's impossible to summarize all the functionalities in a single page, but here is a list of interesting things that you could do with ElektroKit:
Elektro.Application | Enumerate the loaded assemblies of the current application. |
Enumerate the threads of the current application. | |
Register system-wide hotkeys with the Hotkey type. | |
Represent command-line parameters for CLI applications, with the CommandlineParameter type. | |
Serialize and deserialize objects as Binary, Xml, or JSon formats. | |
The ResXManager class that is a full-featured manager for the creation or edition of .Net managed resources (.resx files). | |
The always useful ExtractResourceToDisk which extracts a managed resource to local disk. | |
Create and manage INI files for your portable application with the IniManager class. | |
Create, save and load MRU lists with the MruUtil class and MruItem type. | |
Retrieve any setting from the AppConfig file with the GetAppConfigSetting function. | |
Dock your application window to any border of the screen with the WindowToScreenDocker class. | |
Dock your application window to other windows on the screen with the WindowToWindowDocker class. | |
Add magnetism to the borders of your window with the WindowMagnetizer class. | |
Lock the parts that composes your window with the WindowLocker class. | |
Add an Undo/Redo mechanism for your controls with the UndoRedo class and their inheritances. | |
Resize controls at run-time by dragging the control, with the ControlResizer class. | |
Manage the hints (cue-banners) of your controls, with the ControlHintManager class. | |
Drag controls at run-time with the ControlDragger class. | |
Make a borderless Form moveable with the FormDragger class. | |
Generate captchas for your application with the CaptchaGenerator class and the Captcha type. | |
Load true-type fonts from a resource or filepath, with the FontData class. | |
Animate forms, center to other forms, activate full-screen mode and other single tasks with the GuiUtil class. | |
Elektro.Application.ThirdParty | A lot of command-line wrappers for 3rd part applications. |
Elektro.Core | Extend IEnumerable types by adding extension-methods to find-by-index an element, split a collection into a number of sequences, randomize, bubble-sorting, etc... |
Use a stack or queue with fixed capacity, with the FixedStack(Of T) and FixedQueue(Of T) types. | |
Permute all the possible sequences of characters. | |
Convert an amount of time, from unit of time to other. | |
Measure time as a chronometer or a countdown in a event-oriented way with the TimeMeasurer class. | |
Manage a simple logfile system with the LogfileWriter class. | |
Retrieve the current Visual Studio instance for further debug or automation operations. | |
Test the execution of a target member and the time that the member takes to finish execution. | |
A keyboard hook in a event-oriented way, with the KeyboardMonitor class. | |
A mouse hook in a event-oriented way, with the MouseMonitor class. | |
A mouse recorder (macro) with the MouseRecorder class. | |
A shortcut manager to create or edit shortcuts, with the Shortcuts class. | |
A file splitter and a file merger, with the FileSplitter class. | |
The Files class that contains helper methods to set the user-rights of a file, manipulate file attributes, find files by patterns, compare files byte-by-byte, create dummy files, etc... | |
The Directories class that contains helper methods set the user-rights of a directory, manipulate directory attributes, find directories by patterns, get the size of a directory, etc... | |
The Hardware class that helps to format a drive, list drives of specific drive-type, getting hardware identifiers (Cpu, Motherdoard) or print a document, etc... | |
The DriveWatcher class that notifies about hardware changes about the insertion or removal of drives (eg. useful for USB monitoring). | |
The FileCopy class that copies files reporting the copy-progress by firing evenets, and can cancel a copy operation. | |
Calculate percentages, determine if number is multiple by, divisible by, prime, positive, negative, etc... | |
Split-by-length, rename in a specific string-case, randomize, measure, determine its size in memory or textfile, reverse, rotate/shift, and much more like custom Find-by-RegEx and Replace-by-RegEx utilities | |
The Patterns class that exposes common regular expression patterns. | |
Beuautify Xml documents. | |
Get X-Paths of Xml documents. | |
Sort or distinct Xml documents by name of element. | |
Elektro.Imaging | Take screenshots from a screen, a Form, a region, or an object with the ImageUtil class. |
Let the end-user select a region on the screen in a event-oriented way with the ScreenRegionSelector class. | |
Transform images into black-and-white or grayscale, set the brightness, gamma, opacity or contrast of a image, resize or scale a image, and much more... | |
Elektro.Interop | The WindowsDataTypes class assists for the creation or manipulation between some unmanaged types (WORD, DWORD, DWORDLONG, etc). |
The Win32 namespace which exposes all the dependant P/invokes of ElektroKit (and a lot of non-dependant more, such as ll-hooks) to arbitrary use them wherever in your applications. | |
Elektro.Multimedia | Record and play Wave files with the WaveRecorder class. |
Play, pause and seek audio files like an audio player with the AudioPlayer class. | |
Create or edit playlists with the PlaylistEditor class. | |
Convert karaoke lyrics with the LyricUtil class. | |
Elektro.Net | Validate an ip, url, or an email. |
A pinger, and a port-scanner. | |
A huge list of known mimetypes and they file-extension relationship | |
Determine if network or specific webpage is available. | |
Manage the Windows Firewall, enable or disable it, and add or remove firewall rules, with the FirewallUtil class. | |
Monitors the network traffic by firing events to notify about changes, with the NetworkTrafficMonitor class. | |
Monitors the network traffic of the current process by firing events to notify about changes, with the ProcessTrafficMonitor class. | |
Translate between languages with the GoogleTranslator class. | |
Geo-locate addresses, download files, upload to FTP, or send emails using Gmail, etc... | |
Elektro.Processes | Monitors the execution and closure of processes, with the ProcessMonitor class. |
Kill or close processes by their name, do WMI queries for processes, run and wait until a process is fully loaded, etc... | |
Manages the creation and manipulation of shared-memory blocks with another application, with the SharedMemory class. | |
Automate external processes, move or resize windows, modify text of an edit-control, flash a window, etc. with the UIAutomation class. | |
Elektro.System | Launch a controlpanel applet, arrange desktop icons, show or hide the desktop or taskbar... |
Add a file to recent docs, pin or unpin a file into taskbar or startmenu, refresh the windows explorer instances... | |
The Theming namespace that manages the personalization of system cursors, wallpapers, fonts, screen saver, and visual themes. | |
The Tweaking namespace that exposes a way to tweak various operating system properties. | |
The Registry class that exposes helper methods to create, find, remove, and manipulate registry keys in general. | |
The UserAccounts class that exposes helper methods to add, find, remove or edit user accounts. | |
Manage the address mappings of the HOSTS file with the Hosts class. | |
Manage the recycle-bins and their items inside with the RecycleBin class. | |
Manage the environment variables with the EnvironmentVariables class. | |
Manage the PATH and EXTPATH content with the EnvironmentPath class. | |
Add or remove items to windows startup with the WinStartup class. |