private void btnIngresar_Click(object sender, EventArgs e) { if (tbUsuario.Text == "Admin" && tbContraseña.Text == "*******") { FrmAlumnos ventana = new FrmAlumnos(); FrmEvaluacion ventana1 = new FrmEvaluacion(); ventana1.Show(); ventana.Show(); this.Hide(); } else { MessageBox.Show("Error, Los campos contraseña y usario no pueden estar vacios."); } }
/// <summary> /// cada 8 segundos pasa otro alumno a evaluar /// </summary> private void Next() { if (this.lstbListaAlumnos.Items.Count > 0) { while (true) { for (int i = 0; i < 29; i++) { this.Invoke(new MethodInvoker(() => { FrmAlumnos.ProximoAlumno((Alumno)this.lstbListaAlumnos.SelectedItem); })); Thread.Sleep(EVALUAR); this.Invoke(new MethodInvoker(() => { this.lstbListaAlumnos.SelectedIndex++; })); } } } }