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();
        }
示例#2
0
 private void btnAddVoiceCommand_Click(object sender, EventArgs e)
 {
     // Checking that the user has filled out the form correctly
     if (txtVoiceCommandWord.Text == "" || txtVoiceCommandKeys.Text == "")
     {
         MessageBox.Show("Please ensure you have added a voice keyword and selected the keys you want to fire.",
                         "Error", MessageBoxButtons.OK);
     }
     else
     {
         string keystrings = "";
         voiceCommandKeys.ForEach(x => keystrings += (x).ToString() + " ");
         keystrings = keystrings.TrimEnd();
         keystrings = keystrings.Replace(" ", ",");
         Command command = new VoiceCommand(txtVoiceCommandWord.Text.ToLower(), keystrings,
                                            SharedObjectsSingleton.Instance().inputSimulator);
         settings.Commands.Add(command);
         // Update the list of commands
         FillVoiceCommandTable();
         // Clear the text fields for possible new input
         txtVoiceCommandWord.Text = "";
         txtVoiceCommandKeys.Text = "";
         //Empty the keylist for new possible input
         voiceCommandKeys = new List <Keys>();
     }
 }
示例#3
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;
        }
示例#4
0
        public ZoomForm()
        {
            InitializeComponent();
            formGraphics = panel1.CreateGraphics();
            bmp          = new Bitmap(Width, Height);
            g            = Graphics.FromImage(bmp);

            //Getting the input simulator from the shared objects
            this.inputSim = SharedObjectsSingleton.Instance().inputSimulator;
            this.Visible  = false;
        }
        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;
        }
示例#6
0
 public void LoadFromJson(JObject jsonData)
 {
     this.VoiceKeyword = (string)jsonData["voice keyword"];
     this.keyStrings   = (string)jsonData["keys"];
     this.keyCombo     = new KeyCombo((string)jsonData["keys"], SharedObjectsSingleton.Instance().inputSimulator);
 }
示例#7
0
 public DragonDictation()
 {
     inputSimulator = SharedObjectsSingleton.Instance().inputSimulator;
     StartDragon();
 }
 public WindowsDictation()
 {
     inputSimulator = SharedObjectsSingleton.Instance().inputSimulator;
 }