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(); }
internal void close() { speechRecognizer.Dispose(); EventSingleton.Instance().fixationEvent -= sharedData_fixationEvent; EventSingleton.Instance().systemHook.KeyDown -= sharedData_keyboardEvent; speechRecognizer.SpeechRecognized -= SpeechRecognised; }
private void OnTriggerEnter2D(Collider2D collision) { //on collision with antigen if (collision.gameObject.tag == "Antigen") { collision.gameObject.GetComponent <ItemPickup>().GetPickedUp(); EventSingleton.AddAntigen(); } }
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; }
public MainEngine() { commandList = CommandSingleton.Instance(); controlState = new CommandState(); SetupSpeechRecognition(); EventSingleton.Instance().fixationEvent += sharedData_fixationEvent; }
public EventViewModel() { EventSingleton = EventSingleton.Instance; DateTime dt = System.DateTime.Now; _date = new DateTimeOffset(dt.Year, dt.Month, dt.Day, 0, 0, 0, 0, new TimeSpan()); _time = new TimeSpan(dt.Hour, dt.Minute, dt.Second); EventHandler = new Handler.EventHandler(this); _createEventCommand = new RelayCommand(EventHandler.CreateEvent); }
public MainEngine(MainSystemTray form) { //Fetch the list of commands commandList = SettingsSingleton.Instance().Commands; // Create the speech recognition engine speechRecognizer = createSpeechRecogntionEngine(form); stateController = new StateController(); //Register to the event that provides the fixations EventSingleton.Instance().fixationEvent += sharedData_fixationEvent; //Register to the event that fires when keyboard keys are pressed EventSingleton.Instance().systemHook.KeyDown += sharedData_keyboardEvent; speechRecognizer.SpeechRecognized += SpeechRecognised; }
public StateController() { //Creating the hotspots that will be used to change the states setupStateHotspots(); //Setting the current state to command state currentState = stateHotspots[(int)eState.Command].GetState(); selectedStateHotspot = stateHotspots[(int)eState.Command]; selectedStateHotspot.selected = true; //Registering state controller to be drawn to the overlay form SharedFormsSingleton.Instance().overlayForm.RegisterOverlay(this); //Setting up state controller to listen to the update timer tick EventSingleton.Instance().updateTimer.Tick += updateTimer_Tick; }
public OverlayForm() { InitializeComponent(); TopLevel = true; TopMost = true; //Setting form to fill the primary screen of the computer Top = 0; Left = 0; Height = Screen.PrimaryScreen.Bounds.Height; Width = Screen.PrimaryScreen.Bounds.Width; //Creating buffer for graphics buffer = new Bitmap(Width, Height); bufferGraphics = Graphics.FromImage(buffer); //Getting reference to form graphics formGraphics = CreateGraphics(); EventSingleton.Instance().drawTimer.Tick += drawTimer_Tick; }
public FixationDot() { currentFixationLocation = new Point(0, 0); EventSingleton.Instance().fixationEvent += fixationEvent; }
private void btnAddNewUser_Click(object sender, EventArgs e) { EventSingleton.Instance().eyex.LaunchProfileCreation(); }
private void btnCalibrate_Click(object sender, EventArgs e) { EventSingleton.Instance().eyex.LaunchRecalibration(); }
private void setDebugEyeState() { EventSingleton.Instance().setMouseFixationsStatus(chkbxDebugEyeTracking.Checked); }