예제 #1
0
 private void buttonCleanup_Click(object sender, EventArgs e)
 {
     if (CMessageBox.ShowDialog(Messages.CleanupCheck))
     {
         UserDataIOManager.DeleteAllUserData();
     }
 }
예제 #2
0
 private void SetPasswordTask()
 {
     UserDataIOManager.SaveSession(textBoxPassword1.Text);
     PasswordSet = true;
     Invoke((MethodInvoker) delegate
     {
         CMessageBox.ShowDialog("Password set");
         Close();
     });
 }
예제 #3
0
 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();
         });
     }
 }
예제 #4
0
        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);
            }
        }