コード例 #1
0
 private void Login_Load(object sender, EventArgs e)
 {
     if (Properties.Settings.Default.Password == "")
     {
         //Hide();
         _64bitCreateAccount create_key = new _64bitCreateAccount();
         create_key.CancelButton.Visible = false;
         create_key.ShowDialog();
         if (Properties.Settings.Default.Password == "")
         {
             Close();
         }
     }
     // Hide();
 }
コード例 #2
0
        private void userNamePasswordToolStripMenuItem_Click(object sender, EventArgs e)
        {
            const string message =
                "Are you sure you want to reset your key. You will lose any encrypted files.";
            const string caption = "Reset Key";
            var          result  = MessageBox.Show(message, caption,
                                                   MessageBoxButtons.YesNo,
                                                   MessageBoxIcon.Question);

            // If the no button was pressed ...
            if (result == DialogResult.No)
            {
                // cancel the closure of the form.
                return;
            }
            else
            {
                _64bitCreateAccount _key = new _64bitCreateAccount();
                _key.ShowDialog();
            }
        }