C# Class Zazzles.Settings

Afficher le fichier Open project: FOGProject/zazzles

Private Properties

Свойство Type Description
Save bool
SaveSession bool
Settings System

Méthodes publiques

Méthode Description
Get ( string key ) : string

IsCompatible ( OSType type ) : bool

Check if the current OS is compatible with the given type

Reload ( ) : void

Reparse the settings.json file

Set ( string key, JToken value, bool session = true ) : void

Set the value of a setting. Will automatically save.

SetPath ( string filePath ) : void

Set the filePath of the settings.json file. Will automatically reload.

Private Methods

Méthode Description
Save ( ) : bool

Save the current data to settings.json

SaveSession ( ) : bool
Settings ( ) : System

Method Details

Get() public static méthode

public static Get ( string key ) : string
key string The setting to retrieve
Résultat string

IsCompatible() public static méthode

Check if the current OS is compatible with the given type
public static IsCompatible ( OSType type ) : bool
type OSType The type of OS to check for compatibility with
Résultat bool

Reload() public static méthode

Reparse the settings.json file
public static Reload ( ) : void
Résultat void

Set() public static méthode

Set the value of a setting. Will automatically save.
public static Set ( string key, JToken value, bool session = true ) : void
key string The name of the setting
value JToken The new value of the setting
session bool
Résultat void

SetPath() public static méthode

Set the filePath of the settings.json file. Will automatically reload.
public static SetPath ( string filePath ) : void
filePath string The path of the file
Résultat void