C# Класс Globals.RegistryAccess

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddRecentFile ( int pos, string fileName ) : void

Adds a file to the Halo 2 recently used list

CloseReg ( ) : void

Closes the Registry read access.

RegistryAccess ( RegistryKey mainKey, string subKey ) : System

Opens access to reading the registry. Call the CloseReg() function when complete

copyKey ( RegistryKey parentKey, string keyNameToCopy, string newKeyName ) : bool

Copy a registry key. The parentKey must be writeable.

getKeys ( ) : string[]
getNames ( ) : string[]
getValue ( string valueName ) : string

Returns a value from the Label in the current path use setKey() to set the current mainKey & path

getValues ( ) : object[]
removeKey ( RegistryKey mainKey, string subKey ) : bool
removeValue ( RegistryKey mainKey, string subKey, string valueName ) : bool

Used to remove a value from the registry

renameSubKey ( RegistryKey parentKey, string subKeyName, string newSubKeyName ) : bool

Renames a subkey of the passed in registry key since the Framework totally forgot to include such a handy feature.

setKey ( RegistryKey mainKey, string subKey ) : void

Sets the current mainkey & path

setValue ( RegistryKey mainKey, string subKey, string valueName, object value ) : bool

Sets a registry value

Приватные методы

Метод Описание
recurseCopyKey ( RegistryKey sourceKey, RegistryKey destinationKey ) : void

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

AddRecentFile() публичный статический Метод

Adds a file to the Halo 2 recently used list
public static AddRecentFile ( int pos, string fileName ) : void
pos int The position in which to add the fileName (0-9)
fileName string The location and name of the file
Результат void

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

Closes the Registry read access.
public CloseReg ( ) : void
Результат void

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

Opens access to reading the registry. Call the CloseReg() function when complete
public RegistryAccess ( RegistryKey mainKey, string subKey ) : System
mainKey Microsoft.Win32.RegistryKey Windows.Win32.Registry (Halo 2 uses CurrentUser)
subKey string The path to the Label
Результат System

copyKey() публичный статический Метод

Copy a registry key. The parentKey must be writeable.
public static copyKey ( RegistryKey parentKey, string keyNameToCopy, string newKeyName ) : bool
parentKey Microsoft.Win32.RegistryKey
keyNameToCopy string
newKeyName string
Результат bool

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

public getKeys ( ) : string[]
Результат string[]

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

public getNames ( ) : string[]
Результат string[]

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

Returns a value from the Label in the current path use setKey() to set the current mainKey & path
public getValue ( string valueName ) : string
valueName string The label name to return (Halo 2 uses RegistryAccess.RegNames)
Результат string

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

public getValues ( ) : object[]
Результат object[]

removeKey() публичный статический Метод

public static removeKey ( RegistryKey mainKey, string subKey ) : bool
mainKey Microsoft.Win32.RegistryKey
subKey string
Результат bool

removeValue() публичный статический Метод

Used to remove a value from the registry
public static removeValue ( RegistryKey mainKey, string subKey, string valueName ) : bool
mainKey Microsoft.Win32.RegistryKey Windows.Win32.Registry (Halo 2 uses CurrentUser)
subKey string The path to the Label
valueName string The Value Label name to remove
Результат bool

renameSubKey() публичный статический Метод

Renames a subkey of the passed in registry key since the Framework totally forgot to include such a handy feature.
public static renameSubKey ( RegistryKey parentKey, string subKeyName, string newSubKeyName ) : bool
parentKey Microsoft.Win32.RegistryKey
subKeyName string The name of the subkey that you want to rename ///
newSubKeyName string The new name of the RegistryKey
Результат bool

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

Sets the current mainkey & path
public setKey ( RegistryKey mainKey, string subKey ) : void
mainKey Microsoft.Win32.RegistryKey Windows.Win32.Registry (Halo 2 uses CurrentUser)
subKey string The path to the Label
Результат void

setValue() публичный статический Метод

Sets a registry value
public static setValue ( RegistryKey mainKey, string subKey, string valueName, object value ) : bool
mainKey Microsoft.Win32.RegistryKey A Windows.Win32.Registry value (Halo2 uses CurrentUser)
subKey string The path to the value (Halo 2 uses RegistryAccess.RegPaths)
valueName string The Label of the value (Halo 2 uses RegistryAccess.RegNames)
value object The new value
Результат bool