Beispiel #1
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (txtBoxLogin.Text == "adm" && txtBoxSenha.Text == "123")
     {
         frmPrincipal FP = new frmPrincipal();
         FP.Show();
         this.Hide();
     }
 }
Beispiel #2
0
 private void btnEntrar_Click(object sender, EventArgs e)
 {
     if (txtUsuario.Text == "adm" && txtSenha.Text == "123")
     {
         frmPrincipal fp = new frmPrincipal();
         this.Hide();
         fp.ShowDialog();
         this.Show();
     }
     else
     {
         MessageBox.Show("Usuário ou Senha inválida!");
         txtUsuario.Focus();
     }
 }