示例#1
0
文件: UserLogin.cs 项目: awpro/sbim
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (this.txtUser.Text == "admin" && this.txtPass.Text == "123")
     {
         this.Hide();
         main MDIForm = new main();
         MDIForm.Show();
     }
     else
     {
         MessageBox.Show("Invalid User name or Password!");
     }
 }
示例#2
0
文件: UserLogin.cs 项目: awpro/sbim
 private void txtPass_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (this.txtUser.Text == "admin" && this.txtPass.Text == "123")
         {
             this.Hide();
             main MDIForm = new main();
             MDIForm.Show();
         }
         else
         {
             MessageBox.Show("Invalid User name or Password!");
         }
     }
 }