Пример #1
0
 private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (DoAn_QLCC.Properties.Settings.Default.Protect_Option_viewer == true && DoAn_QLCC.Properties.Settings.Default.Enable_security == true)
     {
         Password_checker frm = new Password_checker("optionview");
         frm.Show();
     }
     else
     {
         Options_view frm = new Options_view();
         frm.Show();
     }
 }
Пример #2
0
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "")
     {
         MessageBox.Show("Please enter login information", "Message");
     }
     else
     {
         if (textBox1.Text == DoAn_QLCC.Properties.Settings.Default.Security_pass)
         {
             if (_message == "logview")
             {
                 Log_View frm = new Log_View();
                 frm.Show();
             }
             if (_message == "hiddenmode")
             {
                 HiddenMode_Form frm = new HiddenMode_Form();
                 frm.Show();
             }
             if (_message == "optionview")
             {
                 Options_view frm = new Options_view();
                 frm.Show();
             }
             if (_message == "exit")
             {
                 try
                 {
                     Environment.Exit(1);
                 }
                 catch { Application.Exit(); }
             }
             this.Close();
         }
         else
         {
             MessageBox.Show("Incorrect password", "Message");
         }
     }
 }