private void btnEntrar_Click(object sender, EventArgs e) { MdlLogin log = new MdlLogin(); log.setLogin(txtLogin.Text); log.setSenha(txtSenha.Text); Login ctlLogin = new Login(); ctlLogin.Verificar(log.getLogin(), log.getSenha()); if (ctlLogin.Acesso() == true) { MessageBox.Show("Acesso Permitido", "Parabéns", MessageBoxButtons.OK, MessageBoxIcon.Information); frmSettings confg = new frmSettings(); Close(); confg.Visible = true; } else { MessageBox.Show("Acesso Negado", "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Error); txtLogin.Text = string.Empty; txtSenha.Text = string.Empty; txtLogin.Focus(); } }