C# Class Globals.RegistryAccess

Afficher le fichier Open project: troymac1ure/Entity Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
recurseCopyKey ( RegistryKey sourceKey, RegistryKey destinationKey ) : void

Method Details

AddRecentFile() public static méthode

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
Résultat void

CloseReg() public méthode

Closes the Registry read access.
public CloseReg ( ) : void
Résultat void

RegistryAccess() public méthode

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
Résultat System

copyKey() public static méthode

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
Résultat bool

getKeys() public méthode

public getKeys ( ) : string[]
Résultat string[]

getNames() public méthode

public getNames ( ) : string[]
Résultat string[]

getValue() public méthode

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)
Résultat string

getValues() public méthode

public getValues ( ) : object[]
Résultat object[]

removeKey() public static méthode

public static removeKey ( RegistryKey mainKey, string subKey ) : bool
mainKey Microsoft.Win32.RegistryKey
subKey string
Résultat bool

removeValue() public static méthode

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
Résultat bool

renameSubKey() public static méthode

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
Résultat bool

setKey() public méthode

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
Résultat void

setValue() public static méthode

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
Résultat bool