- Site Template
- WordPress Theme
- Blogging Theme
- CMS Theme
- Marketing Template
- eCommerce Theme
- Forum Theme
- Flash Template
- PSD Web Template
- .NET Script
- PHP Script
- HTML5 Code
- CSS Style
- Edge Animate Template
- Muse Template
- TypeEngine Theme
- Static Site Generator
- Sketch Template
CodeCanyon Windows Registry Classes 94405
.NET Script \ Miscellaneous
Storage \ Windows \ Settings \ Registry \ Casting \ Binary
.NET Script - Windows Registry Classes 94405 by steinikallinn @ CodeCanyon
.NET Script \ Miscellaneous
Last Update: 29 March 10; Compatible Browsers: Chrome 4, Chrome 5, FireFox 2, FireFox 3, IE6, IE7, IE8, Opera, Safari; Software Version: .Net 3.5; Files Included: C# CS.
The Windows Registry is a hierarchical database that stores settings and configurations for applications, device drivers, services, the kernel and more. These three classes are intended to ease the use of Windows Registry, and they can easily become a part of any application you might be working on.
- CoreRegistry: Gets and sets keys and their value to the Registry. Converts objects to binary
- SimpleRegistry: Simplifies the useage of Registry when developing large software
- AdvancedRegistry: Shows how to store objects such as Image and a custom class to Registry
- Basic types such as int, bool and string are supported
- Objects such as DateTime, Image and Color are supported
- Start any program with Windows with only one line of code
- Arrays or Lists can easily are transformed and stored
- Enum values are supported as key names, and example is given
- You can easily add support for direct casting of objects if needed
How to use
Simple and Advanced classes are initalized with a program and company name. These strings will determine the location of the keys in Registry.
SimpleRegistry reg = new SimpleRegistry("MyProgram", "MyCompany");
AdvancedRegistry adv = new AdvancedRegistry("MyProgram", " MyCompany");
Core offers more constructor overloads to set the location, and can be directed to any location if you want to read keys set by another program.
CoreRegistry reg = new CoreRegistry(RegistryClasses.LocalMachine,
Advanced class offers you a way to store an array of strings, start your application with Windows and save an Image object to Registry.
adv.StartUpWithWindows = true;
Simple class offers you a way to extend the Core class functionality to more readable code and good maintenance for your settings.
reg.SomeBoolean = checkBox1.Checked;
reg.SomeColor = label1.BackColor;
reg.SomeDateTime = dateTimePicker1.Value;
reg.SomeInteger = numericUpDown1.Value;
reg.SomeString = textBox1.Text;
if(reg.SomeBoolean && reg. SomeInteger > 10)
reg.SomeString = "Something elseĦ";
What do you gain from using these classes
- Type-casting: The RegistryKey class in the Microsoft.Win32 namespace can only store objects and retrive objects. When a string is stored and retrived, it is returned as an object and needs to be casted to string. Same goes for all other types and objects, you constantly have to do some casting which these classes are doing for you.
- Readability: When you have an application that needs to store large amount of settings and configuration, you want to make the source-code as readable as possible and keep the number of lines to a minimum. Using these classes achives that goal.
- Maintanence Keeping all the Registry interaction in one or two classes not only makes your application more readable, but also improves maintanence and makes it easier for you to add new features and functionality that need Registry storage.
- Hierarchy If the scenario is that you have a “global library” that number of applications use, you could have CoreRegistry in that global library and mixture of SimpleRegistry and AdvancedRegistry in the applications. Then when a feature or data type is needed , the CoreRegistry would be extended enabling all the other applications to use that feature seamlessly.
PHP Setup Wizard; Windows Registry Classes; Password Generation and Evaluation.
Keywords: binary, casting, registry, settings, storage, windows.
Android, Builder, Business, Clean, Corporate, Creative, Design, Ecommerce, Email, Fashion, Gallery, Image, Iphone, Jquery, Landing, Magazine, Magento, Marketing, Minimal, Mobile, Modern, Multi, Multipurpose, Online, Parallax, Personal, Photography, Plugin, Portfolio, Product, Responsive, Simple, Slider, Social, Store, Template, Theme, Video, Woocommerce, Wordpress
Show all tags
Show all tags
- ThemeForest Module A Minimalist Photography WordPress Theme 19716683
- ThemeForest Cizarua Responsive One Page Portfolio Theme 19692781
- ThemeForest Bekas Responsive WordPress Blog Theme 19680464
- ThemeForest Spin Multipurpose Responsive One page HTML Template 19757452
- ThemeForest Cloudio Hosting Instapage Template 19758859
- ThemeForest Reality Pro Real Estate Responsive Template 19719211
- ThemeForest Let's Play Hockey School & Sport Theme 19638415
- ThemeForest Lutty Personal Blog PSD Template 19670984
- ThemeForest Bizmate One page Portfolio Template 19744099
- ThemeForest Moti App Responsive Landing Page 19751641