/// <summary> /// Initializes the configuration module and loads the user's settings. /// </summary> public static void Initialize( ) { CurrentSettings = LastSavedSettings = DefaultSettings; if ( File.Exists( ConfigFileName ) ) Load( ConfigFileName ); CurrentSettings.Save( ); }
/// <summary> /// Saves the current configuration to disk. /// </summary> public void Save( ) { Repair( ); IniConfigSource source = new IniConfigSource( ); IConfig config = source.AddConfig( "General" ); config.Set( "EvernoteUsername", EvernoteUsername ); config.Set( "EvernotePassword", EvernotePassword ); config.Set( "TwitterAccessToken", TwitterAccessToken ); config.Set( "TwitterAccessSecret", TwitterAccessSecret ); source.Save( ConfigFileName ); if ( Changed != null ) Changed( LastSavedSettings ); LastSavedSettings = Clone(); }