Beispiel #1
0
        private void timer_Tick(object sender, EventArgs e)
        {
            if (ascl.count == 100 * bloques && ascl.hide)
            {
                if (ascl.miliseg > 0)
                {
                    ascl.omisiones[(ascl.count - 1) / 100]++;
                }
                if (!ensayo)
                {
                    ascl.Calcula_estadistica();
                    Resultado = new Resultado_ASC(this.codigo_paciente, ascl.omisiones, ascl.equivocaciones, ascl.aciertos, ascl.aciertos_ext, ascl.medias_tr, ascl.desviaciones_tr, ascl.tiempos, DateTime.Now, true, TypeOf_AS_Test.H_Letras);
                }
                this.Dispose();
            }
            else
            {
                if (ascl.hide == false)
                {
                    this.label.Text = "";
                    //panel.BackgroundImage = null;
                    ascl.hide      = true;
                    timer.Interval = ocultamiento;
                }
                else
                {
                    bool omision = false;
                    if (ascl.miliseg > 0)
                    {
                        omision = true;
                        ascl.omisiones[(ascl.count - 1) / 100]++;
                        ascl.miliseg = 0;
                        if (ensayo)
                        {
                            Feedback.Show();
                            Feedback.Text = @"Estimulo no reconocido";
                        }
                    }

                    this.label.Text = secuencia_letras[ascl.secuencia_imagen[ascl.count]] + "";
                    // this.panel.BackgroundImage = imagen[asc.secuencia_imagen[asc.count]];
                    ascl.count++;
                    ascl.hide   = false;
                    ascl.activo = true;
                    if (ascl.secuencia[ascl.count - 1])
                    {
                        ascl.miliseg = DateTime.Now.Millisecond + DateTime.Now.Second * 1000 + DateTime.Now.Minute * 60000 + DateTime.Now.Hour * 3600000;
                    }
                    timer.Interval = visualizacion;
                    if (ensayo && !omision)
                    {
                        Feedback.Hide();
                    }
                }
            }
        }
Beispiel #2
0
        private void FormASC_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyValue == this.tecla_reaccion)
            {
                KeyHasBeenPressed();
                if (asc.miliseg > 0)
                {
                    int x = DateTime.Now.Millisecond + DateTime.Now.Second * 1000 + DateTime.Now.Minute * 60000 + DateTime.Now.Hour * 3600000;
                    asc.click(x, 0);
                    if (ensayo)
                    {
                        Feedback.Show();
                        Feedback.Text = "Acierto";
                    }
                }
                else if (asc.activo)
                {
                    asc.click(0, 0);
                    if (ensayo)
                    {
                        Feedback.Show();
                        Feedback.Text = "Error";
                    }
                }
            }

            if (e.KeyValue == 27 && asc.count > 0)
            {
                if (!ensayo)
                {
                    asc.Calcula_estadistica();
                    Resultado = new Resultado_ASC(this.codigo_paciente, asc.omisiones, asc.equivocaciones, asc.aciertos, asc.aciertos_ext, asc.medias_tr, asc.desviaciones_tr, asc.tiempos, DateTime.Now, false, this.tipo_estimulo);
                }
                this.Dispose();
            }
        }