Esempio n. 1
0
 void MainForm_TitleButtonOnClick(object sender, Point mousePoint)
 {
     if (sender is UI.Render.MenuButton)
     {
         MainMenuStrip.Show(this, mousePoint.X - 3, mousePoint.Y + 10);
     }
 }
 ////////////////////////////////////////////////////////////////////////////////////////// Password User Control Click
 // Name: loginPswdUserControl1_LoginButtonClicked
 // Arguments : object sender, EventArgs e
 //
 // Description :
 // when the login button is clicked it checks if the username and password is correct
 // then it hides the custom login user control and shows the menu strip
 //
 //////////////////////////////////////////////////////////////////////////////////////////
 private void loginPswdUserControl1_LoginButtonClicked(object sender, EventArgs e)
 {
     //if username and password is admin then grant access
     if (loginPswdUserControl1.Login == "admin" && loginPswdUserControl1.Password == "admin")
     {
         MainMenuStrip.Show();
         loginPswdUserControl1.Hide();
     }
     else
     {
         MessageBox.Show("Incorrect Username Or Password, Try User: admin, Pass: admin", "Incorrect");
     }
 }