C# Class NppSharp.Settings

Manages settings stored in the registry.
Afficher le fichier Open project: cmrazek/NppSharp

Méthodes publiques

Méthode Description
GetBool ( string keyPath, bool defaultValue ) : bool

Gets a boolean value from the registry.

GetBoolOrNull ( string keyPath, bool defaultValue ) : bool?

Gets an bool? value from the registry.

GetInt ( string keyPath, int defaultValue ) : int

Gets an integer value from the registry.

GetIntOrNull ( string keyPath, int defaultValue ) : int?

Gets an int? value from the registry.

GetString ( string keyPath, string defaultValue ) : string

Gets a string value from the registry.

GetStringList ( string keyPath ) : List

Gets a string list value from the registry.

MakeOwsKeyPath ( OutputStyle style, string name ) : string

Creates a key-path for an output window style. The value will be placed under a sub-key for the style number.

SetBool ( string keyPath, bool value ) : void

Inserts a boolean value into the registry.

SetBoolOrNull ( string keyPath, bool value ) : void

Inserts a bool? value into the registry. If 'value' is null, then the registry value will be deleted if it exists.

SetInt ( string keyPath, int value ) : void

Inserts an integer value into the registry.

SetIntOrNull ( string keyPath, int value ) : void

Inserts an integer value into the registry. If 'value' is null, then the registry value will be deleted if it exists.

SetString ( string keyPath, string value ) : void

Inserts a string value into the registry.

SetStringList ( string keyPath, IEnumerable list ) : void

Inserts a string list value into the registry.

Private Methods

Méthode Description
SplitKey ( string keyPath, string &keyOut, string &nameOut ) : void

Splits a key out into the sub-key and value portions.

Method Details

GetBool() public static méthode

Gets a boolean value from the registry.
public static GetBool ( string keyPath, bool defaultValue ) : bool
keyPath string The key-path for the value.
defaultValue bool If the value does not exist, this will be returned instead.
Résultat bool

GetBoolOrNull() public static méthode

Gets an bool? value from the registry.
public static GetBoolOrNull ( string keyPath, bool defaultValue ) : bool?
keyPath string The key-path for the value.
defaultValue bool If the value does not exist, this will be returned instead.
Résultat bool?

GetInt() public static méthode

Gets an integer value from the registry.
public static GetInt ( string keyPath, int defaultValue ) : int
keyPath string The key-path for the value.
defaultValue int If the value does not exist, this will be returned instead.
Résultat int

GetIntOrNull() public static méthode

Gets an int? value from the registry.
public static GetIntOrNull ( string keyPath, int defaultValue ) : int?
keyPath string The key-path for the value.
defaultValue int If the value does not exist, this will be returned instead.
Résultat int?

GetString() public static méthode

Gets a string value from the registry.
public static GetString ( string keyPath, string defaultValue ) : string
keyPath string The key-path for the value.
defaultValue string If the value does not exist, this will be returned instead.
Résultat string

GetStringList() public static méthode

Gets a string list value from the registry.
public static GetStringList ( string keyPath ) : List
keyPath string The key-path for the value.
Résultat List

MakeOwsKeyPath() public static méthode

Creates a key-path for an output window style. The value will be placed under a sub-key for the style number.
public static MakeOwsKeyPath ( OutputStyle style, string name ) : string
style OutputStyle The style number.
name string The value name.
Résultat string

SetBool() public static méthode

Inserts a boolean value into the registry.
public static SetBool ( string keyPath, bool value ) : void
keyPath string The key-path for the value.
value bool The value to be inserted.
Résultat void

SetBoolOrNull() public static méthode

Inserts a bool? value into the registry. If 'value' is null, then the registry value will be deleted if it exists.
public static SetBoolOrNull ( string keyPath, bool value ) : void
keyPath string The key-path for the value.
value bool The value to be inserted.
Résultat void

SetInt() public static méthode

Inserts an integer value into the registry.
public static SetInt ( string keyPath, int value ) : void
keyPath string The key-path for the value.
value int The value to be inserted.
Résultat void

SetIntOrNull() public static méthode

Inserts an integer value into the registry. If 'value' is null, then the registry value will be deleted if it exists.
public static SetIntOrNull ( string keyPath, int value ) : void
keyPath string The key-path for the value.
value int The value to be inserted.
Résultat void

SetString() public static méthode

Inserts a string value into the registry.
public static SetString ( string keyPath, string value ) : void
keyPath string The key-path for the value.
value string The value to be inserted.
Résultat void

SetStringList() public static méthode

Inserts a string list value into the registry.
public static SetStringList ( string keyPath, IEnumerable list ) : void
keyPath string The key-path for the value.
list IEnumerable The string list to be inserted. /// Will actually be saved as an XML string containing the list.
Résultat void