private void btnLogar_Click(object sender, EventArgs e) { if (txtLogin.Text == "" || txtSenha.Text == "") { MessageBox.Show("Digite um usuario e uma senha"); } else { try { LoginDAO loginBD = new LoginDAO(); if (loginBD.logar(login: txtLogin.Text, senha: txtSenha.Text)) { this.Close(); TelaPrincipal abre = new TelaPrincipal(); abre.Show(); } else { MessageBox.Show("Login ou senha invalidos"); } } catch (Exception c) { MessageBox.Show(c.ToString()); } } }
private void timerLoader_Tick(object sender, EventArgs e) { if (loadBar.Value < 100) { loadBar.Value = loadBar.Value + 5; } else { timerLoader.Enabled = false; this.Hide(); TelaPrincipal abre = new TelaPrincipal(); abre.ShowDialog(); } }
private void button1_Click(object sender, EventArgs e) { TelaPrincipal abre = new TelaPrincipal(); abre.Show(); }