コード例 #1
0
 public static passwordForm GetInstance()
 {
     if (openForm == null)
     {
         openForm             = new passwordForm();
         openForm.FormClosed += delegate { openForm = null; };
     }
     return(openForm);
 }
コード例 #2
0
 private void searchProjectsButton_Click(object sender, EventArgs e)
 {
     if (_settingsClass.passwordEnabled == true)
     {
         passwordForm passwordForm = new passwordForm();
         passwordForm.ShowDialog();
         //https://stackoverflow.com/questions/4359924/how-can-i-make-execution-pause-until-new-form-is-closed
         if (passwordForm._authPass.correctPasswordInput)
         {
             searchForm = new searchForm();
             searchForm.Show();
         }
     }
     else
     {
         searchForm = new searchForm();
         searchForm.Show();
     }
 }
コード例 #3
0
        private void radioButtonPsDisabled_CheckedChanged(object sender, EventArgs e)
        {
            projectSelectionForm projectSelectionForm = new projectSelectionForm();
            bool pwEnabled = projectSelectionForm._settingsClass.passwordEnabled;

            if (pwEnabled == true)
            {
                passwordForm passwordForm = new passwordForm();
                passwordForm.ShowDialog();
                if (passwordForm._authPass.correctPasswordInput)
                {
                    radioButtonPsDisabled.Checked = true;
                    projectSelectionForm._settingsClass.disablePasswordSetting();
                    projectSelectionForm._settingsClass.passwordEnabled = false;
                }
            }
            if (pwEnabled == false)
            {
                radioButtonPsDisabled.Checked = true;
            }
        }