Exemple #1
0
 private void GazeAwareForm_Load(object sender, EventArgs e)
 {
     overlay                 = new OverlayForm(controller);
     overlay.ShowWarpBar     = warpBar.Checked;
     overlay.ShowGazeTracker = gazeTracker.Checked;
     overlay.ShowIfTracking();
 }
Exemple #2
0
        public PrecisionGazeMouseForm()
        {
            InitializeComponent();
            QuitButton.Select();
            log.Debug("Application starting");

            // Set the default mode
            ModeBox.SelectedIndex = 0;
            controller            = new MouseController(this);
            controller.setMode(MouseController.Mode.EYEX_AND_EVIACAM);
            controller.setMovement(MouseController.Movement.HOTKEY);
            controller.Sensitivity = SensitivityInput.Value;
            movementHotKey         = (Keys)Enum.Parse(typeof(Keys), Properties.Settings.Default.MovementKey);
            clickHotKey            = (Keys)Enum.Parse(typeof(Keys), Properties.Settings.Default.ClickOnKey);
            pauseHotKey            = (Keys)Enum.Parse(typeof(Keys), Properties.Settings.Default.PauseOnKey);
            eViacamKey             = (Keys)Enum.Parse(typeof(Keys), Properties.Settings.Default.eViacamKey);

            _globalKeyboardHook = new GlobalKeyboardHook();
            _globalKeyboardHook.KeyboardPressed += OnKeyPressed;

            overlay                 = new OverlayForm(controller);
            overlay.ShowWarpBar     = warpBar.Checked;
            overlay.ShowGazeTracker = gazeTracker.Checked;
            overlay.ShowIfTracking();

            Timer refreshTimer = new System.Windows.Forms.Timer();

            refreshTimer.Tick    += new EventHandler(RefreshScreen);
            refreshTimer.Interval = 33;
            refreshTimer.Start();
        }
        private void updateModeFromSelectedMode()
        {
            switch (ModeBox.SelectedItem)
            {
            case "EyeX and eViacam":
                controller.setMode(MouseController.Mode.EYEX_AND_EVIACAM);
                warpBar.Enabled     = true;
                gazeTracker.Enabled = true;
                overlay.ShowIfTracking();
                eViacamPrompt(ContinuousButton.Checked);
                break;

            case "EyeX and TrackIR":
                controller.setMode(MouseController.Mode.EYEX_AND_TRACKIR);
                warpBar.Enabled     = true;
                gazeTracker.Enabled = true;
                overlay.ShowIfTracking();
                break;

            case "EyeX and SmartNav":
                controller.setMode(MouseController.Mode.EYEX_AND_SMARTNAV);
                warpBar.Enabled     = true;
                gazeTracker.Enabled = true;
                overlay.ShowIfTracking();
                break;

            case "EyeX Only":
                controller.setMode(MouseController.Mode.EYEX_ONLY);
                warpBar.Enabled     = true;
                gazeTracker.Enabled = true;
                overlay.ShowIfTracking();
                break;

            case "eViacam Only":
                controller.setMode(MouseController.Mode.EVIACAM_ONLY);
                warpBar.Enabled     = true;
                gazeTracker.Enabled = true;
                overlay.ShowIfTracking();
                eViacamPrompt(ContinuousButton.Checked);
                break;

            case "TrackIR Only":
                controller.setMode(MouseController.Mode.TRACKIR_ONLY);
                warpBar.Enabled     = false;
                gazeTracker.Enabled = false;
                overlay.Hide();
                break;

            case "TrackIR Only Joystick":
                controller.setMode(MouseController.Mode.TRACKIR_ONLY_JOYSTICK);
                warpBar.Enabled     = false;
                gazeTracker.Enabled = false;
                overlay.Hide();
                break;

            default:
                break;
            }
        }
Exemple #4
0
        private void ModeBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (controller == null)
            {
                return;
            }

            System.Windows.Forms.ComboBox box = (System.Windows.Forms.ComboBox)sender;
            switch ((String)box.SelectedItem)
            {
            case "EyeX and eViacam":
                controller.setMode(MouseController.Mode.EYEX_AND_EVIACAM);
                warpBar.Enabled     = true;
                gazeTracker.Enabled = true;
                overlay.ShowIfTracking();
                eViacamPrompt(ContinuousButton.Checked);
                break;

            case "EyeX and TrackIR":
                controller.setMode(MouseController.Mode.EYEX_AND_TRACKIR);
                warpBar.Enabled     = true;
                gazeTracker.Enabled = true;
                overlay.ShowIfTracking();
                break;

            case "EyeX and SmartNav":
                controller.setMode(MouseController.Mode.EYEX_AND_SMARTNAV);
                warpBar.Enabled     = true;
                gazeTracker.Enabled = true;
                overlay.ShowIfTracking();
                break;

            case "EyeX Only":
                controller.setMode(MouseController.Mode.EYEX_ONLY);
                warpBar.Enabled     = true;
                gazeTracker.Enabled = true;
                overlay.ShowIfTracking();
                break;

            case "eViacam Only":
                controller.setMode(MouseController.Mode.EVIACAM_ONLY);
                warpBar.Enabled     = true;
                gazeTracker.Enabled = true;
                overlay.ShowIfTracking();
                eViacamPrompt(ContinuousButton.Checked);
                break;

            case "TrackIR Only":
                controller.setMode(MouseController.Mode.TRACKIR_ONLY);
                warpBar.Enabled     = false;
                gazeTracker.Enabled = false;
                overlay.Hide();
                break;

            default:
                break;
            }
        }
Exemple #5
0
        public PrecisionGazeMouseForm()
        {
            log.Debug("PrecisionGazeMouseForm constructor starting");

            InitializeComponent();
            QuitButton.Select();

            controller = new MouseController(SetMousePosition);

            _globalKeyboardHook = new GlobalKeyboardHook();
            _globalKeyboardHook.KeyboardPressed += OnKeyPressed;

            overlay                 = new OverlayForm(controller);
            overlay.ShowWarpBar     = warpBar.Checked;
            overlay.ShowGazeTracker = gazeTracker.Checked;
            overlay.ShowIfTracking();

            Timer refreshTimer = new System.Windows.Forms.Timer();

            refreshTimer.Tick    += new EventHandler(RefreshScreen);
            refreshTimer.Interval = 33;
            refreshTimer.Start();

            if (Properties.Settings.Default.ContinuousMovement)
            {
                ChooseContinuousMovement();
            }
            else
            {
                ChooseHotkeyMovement();
            }
            controller.Sensitivity = SensitivityInput.Value;
            updateModeFromSelectedMode();
            movementHotKey = (Keys)Enum.Parse(typeof(Keys), Properties.Settings.Default.MovementKey);
            clickHotKey    = (Keys)Enum.Parse(typeof(Keys), Properties.Settings.Default.ClickOnKey);
            pauseHotKey    = (Keys)Enum.Parse(typeof(Keys), Properties.Settings.Default.PauseOnKey);
            eViacamKey     = (Keys)Enum.Parse(typeof(Keys), Properties.Settings.Default.eViacamKey);

            log.Debug("PrecisionGazeMouseForm constructor completed");
        }