Exemple #1
0
        public StateManager(Form1 Toolbar, ShortcutKeyWorker shortCutKeyWorker, FormsEyeXHost EyeXHost)
        {
            eyeXHost = EyeXHost;
            toolbar  = Toolbar;

            SystemFlags.currentState = SystemState.Wait;

            fixationWorker = new FixationDetection(eyeXHost, 25);

            scrollWorker = new ScrollControl(200, 5, 50, 20, eyeXHost);

            SystemFlags.currentState = SystemState.Wait;

            SystemFlags.hasSelectedButtonColourBeenReset = true;

            // Instantiate the ZoomLens, this is the form that is given to magnifier
            zoomer = new ZoomLens();
            // Instantiate the magnifier, this is Sam Medlocks refactored magnifier
            // This calls the low-level API
            magnifier = CreateMagnifier();

            //Console.WriteLine(scrollWorker.deadZoneRect.LeftBound + "," + scrollWorker.deadZoneRect.RightBound + "," + scrollWorker.deadZoneRect.TopBound + "," + scrollWorker.deadZoneRect.BottomBound);

            this.shortCutKeyWorker = shortCutKeyWorker;

            Run();
        }
Exemple #2
0
        public void RefreshZoom()
        {
            magnifier.Stop();

            zoomer    = new ZoomLens();
            magnifier = CreateMagnifier();
            zoomer.ResetZoomLens();
            magnifier.ResetZoomValue();
            EnterWaitState();
        }
Exemple #3
0
        public StateManager_new()
        {
            /*
             * Set up the timer.
             *      - The timer will run every milisecond it can
             *      - The timer will call the RunCycle method every time it ticks
             */
            ControlTimer          = new Timer();
            ControlTimer.Interval = 1;
            ControlTimer.Enabled  = true;
            ControlTimer.Tick    += RunCycle;

            //Setup the zoom form
            zoomForm       = new ZoomLens();
            magnifier      = CreateMagnifier();
            fixationWorker = new FixationDetection();
        }