Example #1
0
 public void ShowIfUnlocked()
 {
     if (Visible == false || WindowState == FormWindowState.Minimized)
     {
         if (Conf.Enable_Password_Protect)
         {
             using (var cp = new CheckPasswordForm())
             {
                 cp.ShowDialog(this);
                 if (cp.DialogResult == DialogResult.OK)
                 {
                     ShowForm(-1);
                 }
             }
         }
         else
         {
             ShowForm(-1);
         }
     }
     else
     {
         ShowForm(-1);
     }
 }
Example #2
0
 private void ShowUnlock()
 {
     var cp = new CheckPasswordForm();
     cp.ShowDialog(this);
     if (cp.DialogResult == DialogResult.OK)
     {
         Activate();
         Visible = true;
         if (WindowState == FormWindowState.Minimized)
         {
             Show();
             WindowState = FormWindowState.Normal;
         }
         Focus();
     }
     cp.Dispose();
 }