private void Timer1_Tick(object sender, EventArgs e) { if (rl.count2 == 30) { if (this.rl.flag == false) { this.rl.omisiones++; } Resultado = new Resultado_RL(this.codigoPaciente, this.rl.errores, this.rl.omisiones, this.rl.aciertos, this.rl.recordadas1, this.rl.recordadas2, DateTime.Now, true); this.Timer.Dispose(); this.Close(); } else if (this.Timer1.Interval == this.oc2) { if (this.rl.flag == false && this.rl.count2 > 0) { this.rl.omisiones++; } else { this.rl.flag = false; } this.Palabra.Text = rl.distractoras[rl.count2]; this.Timer1.Interval = this.vis2; rl.count2++; } else { this.Palabra.Text = ""; this.Timer1.Interval = this.oc2; } }
private void Recuerdo_KeyDown(object sender, KeyEventArgs e) { if (e.KeyValue == 27) { Resultado = new Resultado_RL(this.codigoPaciente, this.rl.errores, this.rl.omisiones, this.rl.aciertos, this.rl.recordadas1, this.rl.recordadas2, DateTime.Now, false); this.Timer.Dispose(); this.Close(); return; } if (e.KeyValue == 13 && rl.fase == 2 && rl.count2 == 0) { rl.fase = 3; this.Timer1.Start(); this.label1.Visible = false; this.Palabra.Visible = true; } if (this.rl.flag == false && this.rl.count2 > 0) { if (e.KeyValue == 13 && rl.fase == 3) { if (this.rl.pertenece(this.rl.count2 - 1)) { this.rl.errores++; } else { this.rl.aciertos++; } } if (e.KeyValue == 32 && rl.fase == 3) { if (this.rl.pertenece(this.rl.count2 - 1)) { this.rl.aciertos++; } else { this.rl.errores++; } } this.rl.flag = true; } }