private void btn_login_Click(object sender, EventArgs e) { if (txt_usuario.Text.Length == 0 && txt_password.Text.Length == 0) { MessageBox.Show("Inserta Datos en los campos"); } else { if (con.Verificarlogin(txt_usuario.Text, label2.Text)) { try { ArrayList array = con.login(txt_usuario.Text, label2.Text); //usuario = new UsuarioDao((int)array[0], "" + array[1], "" + array[2], "" + array[3], "" + array[4], "" + array[5], "" + array[6], "" + array[7], (int)array[8], (int)array[9]); Principal obj = new Principal(1); MessageBox.Show("Estamos aquiiiiiiii"); obj.Show(); this.Hide(); } catch (Exception ex) { Console.Write("Error" + ex.StackTrace); } } else { MessageBox.Show("Datos Incorrectos"); } } }
private void timer1_Tick(object sender, EventArgs e) { barra_progreso.Increment(1); Thread.Sleep(100); if (barra_progreso.Value == 100) { timer1.Stop(); this.Visible = false; Principal o = new Principal(1); o.Visible = true; } }