Пример #1
0
        private void St()
        {
            ronda++;
            while (true)
            {
                estado = Estado_MF.Tres;
                this.Paint(null, null);
                Thread.Sleep(3000);

                estado = Estado_MF.Nueve;
                this.Paint(null, null);

                Thread.Sleep(3000);
                estado = Estado_MF.Descanso;

                //actual.fin_test();
                this.Paint(null, null);
                Thread.Sleep(300);
                ronda++;
                if (ronda >= 3)
                {
                    ronda = 0;
                }
            }
        }
Пример #2
0
        public void Stop()
        {
            this.th.Abort();
            Graphics g = this.c.CreateGraphics();

            g.Clear(fondo);
            ronda  = -1;
            estado = Estado_MF.Nulo;
        }
Пример #3
0
        public Vista_Previa_MF(Control c, ImageSet listaIMG)
        {
            this.c = c;
            cargar_imagenes(listaIMG);
            var ThSt = new ThreadStart(St);

            th            = new Thread(ThSt);
            ronda         = -1;
            estado        = Estado_MF.Nulo;
            this.c.Paint += this.Paint;
        }
Пример #4
0
        public Memoria_Figuras(Control control, int presentacion, int muestra, int descanso, ImageSet listaMF, string codigo_paciente)
            : base(null)
        {
            rand  = new Random(Environment.TickCount);
            tests = new Test_MF[3];
            cargar_imagenes(listaMF);
            this.control = control;
            var ThSt = new ThreadStart(St);

            th                  = new Thread(ThSt);
            EnCurso             = false;
            estado              = Estado_MF.Nulo;
            this.presentacion   = presentacion;
            this.muestra        = muestra;
            this.descanso       = descanso;
            this.codigoPaciente = codigo_paciente;
        }
Пример #5
0
 public override void Stop()
 {
     if (EnCurso)
     {
         int A = 0, O = 0, E = 0;
         foreach (Test_MF t in tests)
         {
             A += t.Aciertos;
             O += t.Omisiones;
             E += t.Errores;
         }
         this.Resultado = new Resultado_MF(this.codigoPaciente, E, O, A, DateTime.Now, true);
     }
     this.EnCurso = false;
     this.th.Abort();
     this.estado = Estado_MF.Nulo;
 }
Пример #6
0
        private void St()
        {
            this.EnCurso = true;
            int      W = this.control.Width;
            int      H = this.control.Height;
            int      a = 2 * this.control.Width / 9;
            int      b = 2 * this.control.Height / 9;
            Graphics g = control.CreateGraphics();

            g.Clear(fondo);

            for (int i = 0; i < 3; i++)
            {
                if (i != 0)
                {
                    Thread.Sleep(descanso);
                }
                actual = tests[i];
                estado = Estado_MF.Tres;
                g.DrawImage(actual.matriz[tests[i].indices[0]], W / 18, 7 * H / 18, a, b);
                g.DrawImage(actual.matriz[tests[i].indices[1]], 7 * W / 18, 7 * H / 18, a, b);
                g.DrawImage(actual.matriz[tests[i].indices[2]], 13 * W / 18, 7 * H / 18, a, b);

                Thread.Sleep(presentacion);
                g.Clear(fondo);

                estado = Estado_MF.Nueve;
                g.DrawImage(actual.matriz[0], W / 18, H / 18, a, b);
                g.DrawImage(actual.matriz[1], 7 * W / 18, H / 18, a, b);
                g.DrawImage(actual.matriz[2], 13 * W / 18, H / 18, a, b);

                g.DrawImage(actual.matriz[3], W / 18, 7 * H / 18, a, b);
                g.DrawImage(actual.matriz[4], 7 * W / 18, 7 * H / 18, a, b);
                g.DrawImage(actual.matriz[5], 13 * W / 18, 7 * H / 18, a, b);

                g.DrawImage(actual.matriz[6], W / 18, 13 * H / 18, a, b);
                g.DrawImage(actual.matriz[7], 7 * W / 18, 13 * H / 18, a, b);
                g.DrawImage(actual.matriz[8], 13 * W / 18, 13 * H / 18, a, b);

                Thread.Sleep(muestra);
                g.Clear(fondo);
                actual.fin_test();
                this.estado = Estado_MF.Descanso;
            }
            this.estado  = Estado_MF.Nulo;
            this.EnCurso = false;

            int A = 0, O = 0, E = 0;

            foreach (Test_MF t in tests)
            {
                A += t.Aciertos;
                O += t.Omisiones;
                E += t.Errores;
            }
            Resultado = new Resultado_MF(this.codigoPaciente, E, O, A, DateTime.Now, true);
            var   f     = new Font(FontFamily.GenericSansSerif, 25, FontStyle.Bold);
            Brush brush = new SolidBrush(Color.LightYellow);

            g.DrawString("Ha terminado la prueba", f, brush, 40, 30);
        }