private void Store(string username, string password) { PersistedSettingsExtension.Save <RunSettings>(this._settings, delegate(RunSettings s) { s.set_Username(username); s.set_Password(password); }); }
private void WindowClosing(object sender, CancelEventArgs e) { Window window = (Window)sender; PersistedSettingsExtension.Save <AppSettings>(this._settings, delegate(AppSettings s) { s.set_WindowPlacement(window.GetWindowPlacement()); }); }
public void SetAutoConnectToServer(GeographicalServer server) { PersistedSettingsExtension.Save <UserSettings>(this._settings, delegate(UserSettings s) { s.set_AutoConnectMode("server"); s.set_AutoConnectTarget(server.get_Id().ToString()); }); this.RaiseAutoConnectTargetChanged(); }
public void SetAutoConnectToCountry(CountryIdentifier country) { PersistedSettingsExtension.Save <UserSettings>(this._settings, delegate(UserSettings s) { s.set_AutoConnectMode("country"); s.set_AutoConnectTarget(country.get_Code()); }); this.RaiseAutoConnectTargetChanged(); }
public void SetAutoStart(bool value) { try { if (value) { this._appStartup.Enable(); } else { this._appStartup.Disable(); } PersistedSettingsExtension.Save <AppSettings>(this._settings, delegate(AppSettings s) { s.set_StartOnStartup(value); }); } catch (Exception ex) { LogExtensions.ErrorException(this._log, "Can't register/unregister app to autostart", ex, new object[0]); } }