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();
        }
Exemple #2
0
        public CommandState()
        {
            inputsim    = SharedObjectsSingleton.Instance().inputSimulator;
            commandList = SettingsSingleton.Instance().Commands;
            zoomForm    = SharedFormsSingleton.Instance().zoomForm;

            scrollManager   = new ScrollManager();
            keyboardManager = new KeyboardManager();
            toastOverlay    = SharedFormsSingleton.Instance().ToastOverlay;
        }
Exemple #3
0
        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 void RunCommand()
 {
     if ((keyCombo.GetKeyString().Contains("LButton") || keyCombo.GetKeyString().Contains("RButton")) && SettingsSingleton.Instance().ZoomEnabled)
     {
         SharedFormsSingleton.Instance().zoomForm.startZoomClick(keyCombo);
     }
     else
     {
         keyCombo.PressKeys();
     }
 }
Exemple #5
0
 public void RunCommand()
 {
     if (File.Exists(ProgramLocation))
     {
         Process.Start(ProgramLocation);
     }
     else
     {
         SharedFormsSingleton.Instance().ToastOverlay.NewMessage("The program " + ProgramLocation + " was not found.");
     }
 }
        public DictationState()
        {
            inputsim = SharedObjectsSingleton.Instance().inputSimulator;
            toast    = SharedFormsSingleton.Instance().ToastOverlay;

            if (SettingsSingleton.Instance().DragonEnabled)
            {
                dictation = new DragonDictation();
            }
            else
            {
                dictation = new WindowsDictation();
            }
            Settings.Default.PropertyChanged += CheckState;
        }
Exemple #7
0
        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;
        }
 private void btnVisualiseFixations_CheckedChanged(object sender, EventArgs e)
 {
     SharedFormsSingleton.Instance().EnableFixationVisualisation(btnVisualiseFixations.Checked);
 }