private void buttonCleanup_Click(object sender, EventArgs e) { if (CMessageBox.ShowDialog(Messages.CleanupCheck)) { UserDataIOManager.DeleteAllUserData(); } }
private void SetPasswordTask() { UserDataIOManager.SaveSession(textBoxPassword1.Text); PasswordSet = true; Invoke((MethodInvoker) delegate { CMessageBox.ShowDialog("Password set"); Close(); }); }
private void CheckPassword(string Password) { LockUI(false); if (Password.Length < Settings.MinPasswordLength || !UserDataIOManager.IsPasswordCorrect(Password)) { ShowErrorMessage(); LockUI(true); } else { UserDataIOManager.SetSessionKey(Password); LoggedIn = true; Invoke((MethodInvoker) delegate { Dispose(); }); } }
private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (!UserDataIOManager.LoginDataExists) { new NewPasswordForm().ShowDialog(); } else { UserDataIOManager.LoadCryptoRNGData(); } CheckPasswordForm CheckPWForm = new CheckPasswordForm(); CheckPWForm.ShowDialog(); if (CheckPWForm.LoggedIn) { Application.Run(new MainForm()); } else { Environment.Exit(0); } }