public ScrollManager() { overlayForm = SharedFormsSingleton.Instance().overlayForm;; inputSimulator = SharedObjectsSingleton.Instance().inputSimulator; EventSingleton.Instance().updateTimer.Tick += updateTimer_Tick; scrollState = eScrollState.NOSCROLL; //Getting the images that will be used to upArrow = new Bitmap(Properties.Resources.Arrow); upArrow.MakeTransparent(); downArrow = new Bitmap(Properties.Resources.Arrow); downArrow.MakeTransparent(); downArrow.RotateFlip(RotateFlipType.RotateNoneFlipY); upArrowFocused = new Bitmap(Properties.Resources.ArrowFocused); upArrowFocused.MakeTransparent(); downArrowFocused = new Bitmap(Properties.Resources.ArrowFocused); downArrowFocused.MakeTransparent(); downArrowFocused.RotateFlip(RotateFlipType.RotateNoneFlipY); lastFixation = new Point(0, 0); setupHotspots(); }
public Hotspot(Rectangle hotspotRect, Action callback) { updateTimer = EventSingleton.Instance().updateTimer; updateTimer.Tick += updateTimer_Tick; overlayForm = SharedFormsSingleton.Instance().overlayForm; overlayForm.RegisterOverlay(this); this.hotspotRect = hotspotRect; this.callback = callback; }
protected SharedFormsSingleton() { //Setting up the forms that need to always be available to the program overlayForm = new OverlayForm(); ToastOverlay = new Toast(); overlayForm.RegisterOverlay(ToastOverlay); zoomForm = new ZoomForm(); overlayForm.Show(); fixationDot = new FixationDot(); }