示例#1
0
        public Vista_Previa_ET(Control c, int intervaloSalida,
                               int anchoEstimulo, int altoEstimulo, int zonaOpaca, int areaCorrecta,
                               Color estimulo, Color colorZonaOpaca)
        {
            this.IntervaloSalida = intervaloSalida;
            this.anchoEstimulo   = anchoEstimulo * 200 / 1024;
            this.altoEstimulo    = altoEstimulo * 200 / 1024;
            this.zonaOpaca       = zonaOpaca * 200 / 1024;
            this.areaCorrecta    = areaCorrecta * 200 / 1024;

            this.estimulo       = estimulo;
            this.colorZonaOpaca = colorZonaOpaca;
            timer1       = new Timer();
            timer1.Tick += timer1_Tick;

            myPict = new MyPictureBox();

            this.c        = c;
            randSalida    = new Random(Environment.TickCount);
            randVelocidad = new Random(Environment.TickCount + 25);


            rangoSalida = new Point(5, c.Height - 5);
            final       = c.Width;

            estimuloBrush = new SolidBrush(estimulo);
            zonaBrush     = new SolidBrush(colorZonaOpaca);
            estado        = Estado_ET.Nulo;
            ladoDerecho   = (c.Width - this.zonaOpaca) / 2 + this.zonaOpaca;
        }
示例#2
0
        public Estimacion_Tiempo(Control c, string codigoPaciente, int maxEstimulos, int intervaloSalida,
                                 int anchoEstimulo, int altoEstimulo, int zonaOpaca, int areaCorrecta,
                                 Color estimulo, Color colorZonaOpaca, int teclaReaccion)
            : base(null)
        {
            this.codigoPaciente  = codigoPaciente;
            this.maxEstimulos    = maxEstimulos;
            this.intervaloSalida = intervaloSalida;
            this.anchoEstimulo   = anchoEstimulo;
            this.altoEstimulo    = altoEstimulo;
            this.zonaOpaca       = zonaOpaca;
            this.areaCorrecta    = areaCorrecta;
            this.estimulo        = estimulo;
            this.colorZonaOpaca  = colorZonaOpaca;
            this.teclaReaccion   = teclaReaccion;
            this.contEst         = 0;
            timer1       = new Timer();
            timer1.Tick += timer1_Tick;
            myPict       = new MyPictureBox();

            randSalida    = new Random(Environment.TickCount);
            randVelocidad = new Random(Environment.TickCount + 25);
            myPict        = new MyPictureBox {
                Location = new Point(0, 0), Size = new Size(200, 200), Dock = DockStyle.Fill
            };
            myPict.Paint    += pictureBox1_Paint;
            myPict.BackColor = Color.Black;

            c.Controls.Add(myPict);
            c.KeyDown += control_KeyDown;

            rangoSalida = new Point(40, Screen.PrimaryScreen.Bounds.Height - 40);
            final       = Screen.PrimaryScreen.Bounds.Width + 30;

            estimuloBrush = new SolidBrush(estimulo);
            zonaBrush     = new SolidBrush(colorZonaOpaca);
            ladoDerecho   = (Screen.PrimaryScreen.Bounds.Width - zonaOpaca) / 2 + zonaOpaca;

            Estado          = Estado_ET.Nulo;
            reaccion_actual = Reaccion_ET.Omitido;

            Anticipados = 0;
            Dentro      = 0;
            Correctos   = 0;
            Retardados  = 0;
            Omitidos    = 0;
        }