private void LoadUserSettings() { try { txtUser.Text = Settings.Instance.Username; if (Settings.Instance.WantSavePassword) { txtPass.Text = UwpHelper.GetPassword(); } } catch (Exception ex) { Log.Error(ex); } // Read user settings if (Settings.Instance.WantCursor) // Old Toontown Cursors { MemoryStream cursorMemoryStream = new MemoryStream(Properties.Resources.toonmono); Cursor = new Cursor(cursorMemoryStream); } // Load last saved user background choice BackgroundImage.Dispose(); if (Settings.Instance.WantRandomBackgrounds) { BackgroundImage = Background.ReturnRandomBackground(); } else { BackgroundImage = Background.ReturnBackground(Settings.Instance.Background); } }
private void FixControls() { var entries = new List <Entry>(); UwpHelper.DeepSearch(_page.Children.ToList(), ref entries); UwpHelper.FixElements(entries); }
public UwpModeItem(string uwpName, Guid guid) { this.Guid = guid; this.UwpName = uwpName; this.InitializeComponents(); this.Visible = UwpHelper.GetPackageName(uwpName) != null; this.Image = GuidInfo.GetImage(guid); this.Text = this.ItemText; }
private void Options_Load(object sender, EventArgs e) { chkCursor.Checked = Settings.Instance.WantCursor; chkClickSounds.Checked = Settings.Instance.WantClickSound; chkRandomBackgrounds.Checked = Settings.Instance.WantRandomBackgrounds; chkSavePassword.Checked = Settings.Instance.WantSavePassword; if (!UwpHelper.IsWindows10()) { chkSavePassword.Enabled = false; chkSavePassword.Checked = false; } }
private void Options_Load(object sender, EventArgs e) { chkCursor.Checked = Properties.Settings.Default.WantsCursor; chkClickSounds.Checked = Properties.Settings.Default.WantsClickSounds; chkRandomBackgrounds.Checked = Properties.Settings.Default.WantsRandomBg; chkSavePassword.Checked = Properties.Settings.Default.WantsPassword; if (!UwpHelper.IsWindows10()) { chkSavePassword.Enabled = false; chkSavePassword.Checked = false; } }
public void SaveCredentials() { Settings.Instance.Username = txtUser.Text; if (Settings.Instance.WantSavePassword) { Log.Info("Trying to save password via Windows Credential Manager..."); try { UwpHelper.SetCredentials(txtUser.Text, txtPass.Text); } catch (Exception ex) { Log.Error(ex); Log.Error("Error when saving password via Credential Manager. Continuing..."); } } }
public void SaveCredentials() { Properties.Settings.Default.Username = txtUser.Text; Properties.Settings.Default.Save(); if (Properties.Settings.Default.WantsPassword) { Log.Info("Trying to save password securely..."); try { UwpHelper.SetCredentials(txtUser.Text, txtPass.Text); } catch (Exception ex) { Log.Error(ex); Log.Error("Don't want to break after trying to save pass so continuing"); } } }