private void nbiLoginTest_LinkClicked(object sender, NavBarLinkEventArgs e) { RegistrySettings.Username = "******"; RegistrySettings.Password = "******"; RegistrySettings.LoggedIn = false; RegistrySettings.KeepLoggedIn = false; RegistrySettings.RememberMe = false; RegistrySettings.Save(); Close(); }
private void CbLanguages_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { foreach (string name in Enum.GetNames(typeof(SupportedLanguage))) { if (e.NewValue.ToString().CompareTo(name) == 0) { LanguageManager.ChangeLanguage((SupportedLanguage)Enum.Parse(typeof(SupportedLanguage), name), this); RegistrySettings.Language = name; RegistrySettings.Save(); break; } } }
public void Save() { settings.AlbumArtFilename = "1"; settings.TextFilename = "2"; settings.TextTemplate = "3"; settings.Save(); using (RegistryKey key = Registry.CurrentUser.OpenSubKey(settings.Key)) { key.Should().NotBeNull(); // ReSharper disable once PossibleNullReferenceException key.GetValue("AlbumArtFilename").Should().Be("1"); key.GetValue("TextFilename").Should().Be("2"); key.GetValue("TextTemplate").Should().Be("3"); } }
private void btnLogin_Click(object sender, EventArgs e) { var loginResult = KODevLoginManager.Login(teUsername.Text, tePassword.Text); switch (loginResult.Result.Substring(0, 29)) { //LOGINSTATUS_KEY_3 (TOKEN METHODU İÇİN) Token mevcut, fakat süresi dolmuş. Yeniden ID şifre ile token almak gerekli. case "LS003F5esRwzAPt33psnJdEt7eJkT": //LOGINSTATUS_KEY_4 (TOKEN METHODU İÇİN) Token mevcut, geçerli fakat kullanıcının gönderdiği değer yanlış! case "LS004GUcuNEM67D2P5PbUXqTLPHTt": //LOGINSTATUS_KEY_5 (PAROLA METHODU İÇİN) Hesap şuan kullanımda (token başkasında.) case "LS004rPrCHnnYLHUREjrh2fUggjQJ": //LOGINSTATUS_KEY_1 (PAROLA METHODU İÇİN) ID veya Parola yanlış. case "LS001Gs84DmanHUWmrWwLgDKysrFk": StaticReference.ShowError(this, loginResult.Message); break; //LOGINSTATUS_KEY_2 (TOKEN METHODU İÇİN) Token mevcut, geçerli ve doğru. case "LS002RvkzvsDWeLdGDGCKHDKx8SuP": //LOGINSTATUS_KEY_T (PAROLA METHODU İÇİN) ID ve Parola doğru, token değeri JSON içerisinde token kısmına eklenir. case "LS00TF5esRwzAPt33psnJdEt7eJkT": { RegistrySettings.LoggedIn = true; RegistrySettings.KeepLoggedIn = ceKeepLoggedIn.Checked; RegistrySettings.RememberMe = ceRememberMe.Checked; RegistrySettings.Username = StaticReference.Encrypt(teUsername.Text, RegistrySettings._key, RegistrySettings._keySize); if (RegistrySettings.RememberMe) { RegistrySettings.Password = StaticReference.Encrypt(tePassword.Text, RegistrySettings._key, RegistrySettings._keySize); } else { RegistrySettings.Password = "******"; } RegistrySettings.Save(); Close(); } break; //LOGINSTATUS_KEY_E case "LS00Ef9TV4vPbmGh9tytn7HdTMZp2": StaticReference.ShowError(this, loginResult.Message); break; } }
private void LookAndFeel_StyleChanged(object sender, EventArgs e) { RegistrySettings.SkinName = UserLookAndFeel.Default.SkinName; RegistrySettings.Save(); }