C# Класс NppSharp.Settings

Manages settings stored in the registry.
Показать файл Открыть проект

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

Метод Описание
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.

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

Метод Описание
SplitKey ( string keyPath, string &keyOut, string &nameOut ) : void

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

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

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

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.
Результат bool

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

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.
Результат bool?

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

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.
Результат int

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

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.
Результат int?

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

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.
Результат string

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

Gets a string list value from the registry.
public static GetStringList ( string keyPath ) : List
keyPath string The key-path for the value.
Результат List

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

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.
Результат string

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

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.
Результат void

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

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.
Результат void

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

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.
Результат void

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

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.
Результат void

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

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.
Результат void

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

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.
Результат void