private void btnEntrar_Click(object sender, EventArgs e) { idioma = cblIdioma.SelectedIndex; if (txtUsuario.Text.Trim().Length == 0) { SystemSounds.Beep.Play(); MessageBox.Show("Digite o usuário.", "Erro"); } else if (txtSenha.Text.Trim().Length == 0) { SystemSounds.Beep.Play(); MessageBox.Show("Digite a senha", "Erro"); } else if (cblIdioma.Text.Trim().Length == 0) { SystemSounds.Beep.Play(); MessageBox.Show("Campo do idioma não preenchido", "Erro"); } else { MessageBox.Show("Bem vindo", "Entrada"); if (txtUsuario.Text.Trim() == "admin" && txtSenha.Text.Trim() == "1234") { frmPrincipalA telaPrincipalA = new frmPrincipalA(); telaPrincipalA.ShowDialog(); } else { frmPrincipalU telaPrincipalU = new frmPrincipalU(); telaPrincipalU.ShowDialog(); } } }
private void VoltarBtn_Click(object sender, EventArgs e) { frmPrincipalU principalU = new frmPrincipalU(); principalU.Show(); }