Ejemplo n.º 1
0
 private void Form2_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyValue == this.tecla_reaccion && ass.count > 0)
     {
         ass.click(DateTime.Now.Millisecond + DateTime.Now.Second * 1000 + DateTime.Now.Minute * 60000 + DateTime.Now.Hour * 3600000, 0);
     }
     if (e.KeyValue == this.tecla_reaccion1 && ass.count > 0)
     {
         ass.click(DateTime.Now.Millisecond + DateTime.Now.Second * 1000 + DateTime.Now.Minute * 60000 + DateTime.Now.Hour * 3600000, 1);
     }
     if (e.KeyValue == 27 && ass.count > 0)
     {
         double mediaEnTiempo    = StatFunctionLibrary.media(ass.tiempostiempo);
         double mediaFueraTiempo = StatFunctionLibrary.media(ass.tiempostiempo);
         Resultado = new Resultado_TRC(codigoPaciente,
                                       ass.tiempostiempo.Count,
                                       mediaEnTiempo,
                                       StatFunctionLibrary.desv_est(ass.tiempostiempo, mediaEnTiempo),
                                       ass.tiempospasado.Count,
                                       mediaFueraTiempo,
                                       StatFunctionLibrary.desv_est(ass.tiempospasado, mediaFueraTiempo),
                                       ass.omisiones,
                                       ass.reaccanti,
                                       ass.equivocaciones,
                                       DateTime.Now,
                                       false);
         this.Dispose();
     }
 }
Ejemplo n.º 2
0
        private void timer_muestra_Tick(object sender, EventArgs e)
        {
            if (ass.count == ass.estimulos)
            {
                double mediaEnTiempo    = StatFunctionLibrary.media(ass.tiempostiempo);
                double mediaFueraTiempo = StatFunctionLibrary.media(ass.tiempostiempo);
                Resultado = new Resultado_TRC(codigoPaciente,
                                              ass.tiempostiempo.Count,
                                              mediaEnTiempo,
                                              StatFunctionLibrary.desv_est(ass.tiempostiempo, mediaEnTiempo),
                                              ass.tiempospasado.Count,
                                              mediaFueraTiempo,
                                              StatFunctionLibrary.desv_est(ass.tiempospasado, mediaFueraTiempo),
                                              ass.omisiones,
                                              ass.reaccanti,
                                              ass.equivocaciones,
                                              DateTime.Now,
                                              true);
                this.Dispose();
            }

            if (ass.hide == false)
            {
                this.panel1.Invalidate();
                ass.hide = true;
                this.timer_muestra.Interval = ass.reaccion;
            }
            else
            {
                if (this.timer_muestra.Interval == ass.reaccion)
                {
                    this.timer_muestra.Interval = random.Next(ass.reaccion + 200, ass.reaccion + 2500);
                    if (ass.time != 0)
                    {
                        ass.time = 0;
                        ass.omisiones++;
                    }
                }
                else
                {
                    ass.time = DateTime.Now.Millisecond + DateTime.Now.Second * 1000 + DateTime.Now.Minute * 60000 + DateTime.Now.Hour * 3600000;
                    this.panel1.Invalidate();
                    ass.count++;
                    ass.hide = false;
                    timer_muestra.Interval = ass.visualizacion;
                }
            }
        }
Ejemplo n.º 3
0
        protected Resultado_AS(TypeAS tipo_atencion, string codigo_paciente, int[] omisiones, int[] equivocaciones, int[] aciertos, int[] aciertos_ext, double[] medias_tr, double[] desviaciones_tr, List <int> tiempos, DateTime fecha, bool completo, TypeOf_AS_Test tipo_prueba)
            : base(tipo_atencion == TypeAS.Simple ? (Table) new _ResASS() : new _ResASC(), codigo_paciente, fecha, completo)
        {
            double m = StatFunctionLibrary.media(tiempos);

            this.TipoAtencion = tipo_atencion;
            init(omisiones, equivocaciones, aciertos, aciertos_ext, medias_tr, desviaciones_tr, m, StatFunctionLibrary.desv_est(tiempos, m), tipo_prueba);
        }