Monday, January 2, 2017

Windows Registry Classes


Advent

The Home Windows Registry is a hierarchical database that shops settings and configurations for applications, device drivers, products and services, the kernel and extra. These 3 categories are intended to ease the use of Home Windows Registry, they usually can easily grow to be an element of any utility you could be working on.

  1. CoreRegistry: Gets and sets keys and their worth to the Registry. Converts objects to binary
  2. SimpleRegistry: Simplifies the useage of Registry whilst growing massive software
  3. AdvancedRegistry: Presentations find out how to retailer objects akin to Symbol and a customized elegance to Registry

Features

  • Basic types equivalent to int, bool and string are supported
  • Objects reminiscent of DateTime, Image and Colour are supported
  • Start any software with Windows with only one line of code
  • Arrays or Lists can simply are reworked and stored
  • Enum values are supported as key names, and example is given
  • you'll easily upload enhance for direct casting of objects if wanted

easy methods to use

Easy and Advanced categories are initalized with a program and corporate identify. These strings will decide the site of the keys in Registry.

SimpleRegistry reg = new SimpleRegistry("MyProgram", "MyCompany"); AdvancedRegistry adv = new AdvancedRegistry("MyProgram", " MyCompany");

Center gives extra constructor overloads to set the location, and will be directed to any location should you wish to read keys set via any other software.

CoreRegistry reg = new CoreRegistry(RegistryClasses.LocalMachine, @"SOFTWARE\MyCompany\MyProgram\SpecialKeys");

Complex class offers you some way to retailer an array of strings, start your software with Windows and keep an image item to Registry.

adv.SetNameList(textBox1.Lines); adv.StartUpWithWindows = true; adv.SetImage(pictureBox1.Symbol);

Simple elegance will provide you with some way to extend the Core elegance functionality to extra readable code and excellent repairs in 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 achieve from the use of those categories

  • Kind-casting: The RegistryKey magnificence in the Microsoft.Win32 namespace can only retailer gadgets and retrive items. When a string is stored and retrived, it's again as an object and wishes to be casted to string. Same goes for all other types and items, you continuously must do a little casting which those classes are doing for you.
  • Clarity: While You have an application that needs to store great amount of settings and configuration, you need to make the supply-code as readable as conceivable and keep the collection of traces to a minimum. The Use Of those categories achives that objective.
  • Maintanence Retaining all the Registry interaction in a single or two classes not just makes your application more readable, but also improves maintanence and makes it easier for you so as to add new options and functionality that want Registry storage.
  • Hierarchy If the situation is that you may have a “global library” that number of applications use, it's worthwhile to have CoreRegistry in that world library and mixture of SimpleRegistry and AdvancedRegistry within the applications. Then when a function or data type is wanted , the CoreRegistry can be extended permitting the entire other programs to make use of that characteristic seamlessly.

FULL DOWNLOAD

No comments:

Post a Comment

Trik tersembunyi Bermain Slither.io agar menjadi no 1 | cara tau ampuh

Slither.io Unblocked Play Engaging in online game playing avails a chance for one to have a great experience. This opens up an enormous amo...