예제 #1
0
파일: Login.cs 프로젝트: AlexSB664/ResiTec
        private void button1_Click(object sender, EventArgs e)
        {
            string          Errores;
            Autentificacion auten = new Autentificacion();

            login = (auten.autentificar(textBox1.Text, textBox2.Text, out Errores));

            if (login == true)
            {
                if (a == null)
                {
                    a = new Administradorprincipal(this);
                }
                if (a.IsDisposed)
                {
                    a = new Administradorprincipal(this);
                }
                // th
                textBox1.Text = "";
                textBox2.Text = "";

                this.Visible = false;
                a.Show();
            }
            else
            {
                MessageBox.Show("Credenciales incorrectas");
            }
        }