C# Class Sharpcraft.Library.Configuration.LauncherSettings

Used to store settings for the Sharpcraft launcher.
Inheritance: Settings
Show file Open project: SijmenSchoon/Sharpcraft Class Usage Examples

Public Properties

Property Type Description
Remember bool
Username string

Public Methods

Method Description
GetPassword ( ) : string

Get plaintext version of the encrypted password.

LauncherSettings ( string settingsFile ) : System

Initialize a new instance of the LauncherSettings class.

SetPassword ( string password ) : void

Set the user's password.

The password will be encrypted using XOR and then converted into a Base64 string.

WriteToFile ( ) : void

Write settings to the settings file.

LauncherSettings overrides Settings.WriteToFile and logs any IO errors instead of crashing.

Method Details

GetPassword() public method

Get plaintext version of the encrypted password.
public GetPassword ( ) : string
return string

LauncherSettings() public method

Initialize a new instance of the LauncherSettings class.
public LauncherSettings ( string settingsFile ) : System
settingsFile string The file containing a JSON serialization of this object.
return System

SetPassword() public method

Set the user's password.
The password will be encrypted using XOR and then converted into a Base64 string.
public SetPassword ( string password ) : void
password string Plaintext version of password.
return void

WriteToFile() public method

Write settings to the settings file.
LauncherSettings overrides Settings.WriteToFile and logs any IO errors instead of crashing.
public WriteToFile ( ) : void
return void

Property Details

Remember public property

Whether or not to remember the password.
public bool Remember
return bool

Username public property

The username of the most recently logged in user.
public string Username
return string