Ejemplo n.º 1
0
        private void btnMic_Click(object sender, EventArgs e)
        {
            if (_dictation != null)
            {
                _dictation.Dispose();
            }

            _dictation = new Dictation();
            SetEvents();
            _dictation.Start();
        }
Ejemplo n.º 2
0
        private void btnWavFile_Click(object sender, EventArgs e)
        {
            if (_dictation != null)
            {
                _dictation.Dispose();
            }

            _dictation = new Dictation();
            SetEvents();
            _dictation.Start("example.wav");
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
 // Checks if the dictation class is still of the correct type, and changes it if requiered
 public void CheckState(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     if (e.PropertyName != "DragonEnabled")
     {
         return;
     }
     if (Settings.Default.DragonEnabled && dictation.GetType() == typeof(WindowsDictation))
     {
         dictation.Dispose();
         dictation = new DragonDictation();
     }
     else if (!Settings.Default.DragonEnabled && dictation.GetType() == typeof(DragonDictation))
     {
         dictation.Dispose();
         dictation = new WindowsDictation();
     }
 }