C# Класс DSShared.Windows.RegistryInfo

a class to help facilitate the saving and loading of values into the registry in a central location
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddProperty ( ) : void

Adds properties to be saved/loaded

AddProperty ( PropertyInfo property ) : void

adds a property to be saved/loaded

ClearKey ( ) : void

Calls ClearKey(false)

ClearKey ( bool saveOnClose ) : void

Deletes the key located at HKEY_CURRENT_USER\Software\RegKey\ RegKey is the public static parameter of this class

CloseKey ( ) : void

Closes the registry key previously opened by OpenKey()

Closing ( object sender, System e ) : void

Method intended for use with Form.Closing events - directly calls Save

Load ( object sender, EventArgs e ) : void

loads the specified values from the registry. parameters match those needed for a Form.Load event

OpenKey ( ) : RegistryKey

Opens the registry key and returns it for custom read/write

RegistryInfo ( object obj ) : System

Constructor that uses the ToString() value of the object as the name of the constructor parameter

RegistryInfo ( object obj, string name ) : System

Constructor that uses the name parameter as the registry key to save values under

Save ( object sender, EventArgs e ) : void

Saves the specified values into the registry

Описание методов

AddProperty() публичный Метод

Adds properties to be saved/loaded
public AddProperty ( ) : void
Результат void

AddProperty() публичный Метод

adds a property to be saved/loaded
public AddProperty ( PropertyInfo property ) : void
property System.Reflection.PropertyInfo
Результат void

ClearKey() публичный Метод

Calls ClearKey(false)
public ClearKey ( ) : void
Результат void

ClearKey() публичный Метод

Deletes the key located at HKEY_CURRENT_USER\Software\RegKey\ RegKey is the public static parameter of this class
public ClearKey ( bool saveOnClose ) : void
saveOnClose bool if false, a future call to Save() will have no effect
Результат void

CloseKey() публичный Метод

Closes the registry key previously opened by OpenKey()
public CloseKey ( ) : void
Результат void

Closing() публичный Метод

Method intended for use with Form.Closing events - directly calls Save
public Closing ( object sender, System e ) : void
sender object
e System
Результат void

Load() публичный Метод

loads the specified values from the registry. parameters match those needed for a Form.Load event
public Load ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

OpenKey() публичный Метод

Opens the registry key and returns it for custom read/write
public OpenKey ( ) : RegistryKey
Результат Microsoft.Win32.RegistryKey

RegistryInfo() публичный Метод

Constructor that uses the ToString() value of the object as the name of the constructor parameter
public RegistryInfo ( object obj ) : System
obj object
Результат System

RegistryInfo() публичный Метод

Constructor that uses the name parameter as the registry key to save values under
public RegistryInfo ( object obj, string name ) : System
obj object the object to save/load values into the registry
name string the name of the registry key to save/load
Результат System

Save() публичный Метод

Saves the specified values into the registry
public Save ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void