Ejemplo n.º 1
0
 private void bunifuThinButton21_Click(object sender, EventArgs e)
 {
     if (txt_Username.Text == "admin" && txt_Password.Text == "1234")
     {
         UserLogin ul = new UserLogin();
         this.Hide();
         MainMenuForm mm = new MainMenuForm();
         mm.Show();
     }
     else
     {
         MessageBox.Show("Invalid credentials.", "Error");
     }
 }
Ejemplo n.º 2
0
 private void txt_Password_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Enter)
     {
         if (txt_Username.Text == "admin" && txt_Password.Text == "1234")
         {
             UserLogin ul = new UserLogin();
             this.Hide();
             MainMenuForm mm = new MainMenuForm();
             mm.Show();
         }
         else
         {
             MessageBox.Show("Invalid credentials.", "Error");
         }
     }
 }