public MagnifierWindowLeftEyeAndHead(Form form, Configuration configuration, OverlayEyeNew overlayEyeNewForm) { mConfiguration = configuration; if (form == null) { throw new ArgumentNullException("form"); } magnification = mConfiguration.ZoomFactor; this.overlayEyeNewForm = overlayEyeNewForm; //mTargetPoint = gazePoint; m_MAGFACTOR = mConfiguration.ZoomFactor; leftEyeGaze = new OneEyeLeft(mConfiguration); headPoints = new EyeXPrecisionPointer(mConfiguration.senitivityOfHeadTracking); this.form = form; this.form.Resize += new EventHandler(form_Resize); this.form.FormClosing += new FormClosingEventHandler(form_FormClosing); timer = new Timer(); timer.Tick += new EventHandler(timer_Tick); timer.Tick += new EventHandler(overlayEyeNewForm.HandleTimer); initialized = NativeMethods.MagInitialize(); if (initialized) { SetupMagnifier(); timer.Interval = NativeMethods.USER_TIMER_MINIMUM; timer.Enabled = true; } }
public MagnifierWindowsBothEyeAndHead(Form form, Configuration configuration, OverlayEyeNew overlayEyeNewForm, MouseController mController) { mConfiguration = configuration; if (form == null) { throw new ArgumentNullException("form"); } magnification = mConfiguration.ZoomFactor; this.overlayEyeNewForm = overlayEyeNewForm; //mTargetPoint = gazePoint; m_MAGFACTOR = mConfiguration.ZoomFactor; eyeXWarpPointer = new EyeXWarpPointer(mConfiguration); combineEyeGaze = new combineEyes(mConfiguration); headPoints = new EyeXPrecisionPointer(sensitivity); controller = mController; this.form = form; this.form.Resize += new EventHandler(form_Resize); this.form.FormClosing += new FormClosingEventHandler(form_FormClosing); timer = new Timer(); timer.Tick += new EventHandler(timer_Tick); if (overlayEyeNewForm.fullScreen == false) //if window mode { timer.Tick += new EventHandler(overlayEyeNewForm.HandleTimer); } initialized = NativeMethods.MagInitialize(); if (initialized) { SetupMagnifier(); timer.Interval = NativeMethods.USER_TIMER_MINIMUM; timer.Enabled = true; } }