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(); }
public void RefreshZoom() { magnifier.Stop(); zoomer = new ZoomLens(); magnifier = CreateMagnifier(); zoomer.ResetZoomLens(); magnifier.ResetZoomValue(); EnterWaitState(); }
//Constructor public GazeHighlight(FixationDetection fixationWorker, Graphics zoomerCanvas, EHighlightShaderType shaderType, ZoomLens LensForm) { lensForm = LensForm; fixationWorker.currentProgress += setPercent; canvas = zoomerCanvas; shaderMachine = new GazeHighlightShaderFactory(); gazeShader = shaderMachine.CreateShader(shaderType); fixationPercent = 0; currentGaze = new Point(); }
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(); }
public StateManager(Form1 Toolbar, ShortcutKeyWorker shortCutKeyWorker, FormsEyeXHost EyeXHost) { eyeXHost = EyeXHost; toolbar = Toolbar; SystemFlags.currentState = SystemState.Wait; fixationWorker = new FixationDetection(eyeXHost); scrollWorker = new ScrollControl(200, 5, 50, 20, eyeXHost); SystemFlags.currentState = SystemState.Wait; SystemFlags.hasSelectedButtonColourBeenReset = true; zoomer = new ZoomLens(fixationWorker, eyeXHost); Console.WriteLine(scrollWorker.deadZoneRect.LeftBound + "," + scrollWorker.deadZoneRect.RightBound + "," + scrollWorker.deadZoneRect.TopBound + "," + scrollWorker.deadZoneRect.BottomBound); corner = new Corner(); this.shortCutKeyWorker = shortCutKeyWorker; Run(); }