Exemplo n.º 1
0
        private void btnEntrar_Click(object sender, EventArgs e)
        {
            Controller.Controller controle = new Controller.Controller();
            bool   sucesso;
            string nome = "";

            (sucesso, nome) = controle.Autenticar(Convert.ToInt32(tbLogin.Text), tbSenha2.Text);
            if (sucesso)
            {
                Controller.Controller.obterInstancia().mostrarTelaPrincipal(nome);
                Close();
            }
            else
            {
                lbNotificar.Text = "Usuário ou senha incorreto";
                Task.Delay(1500).Wait();
                lbNotificar.Text = "";
            }
        }