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

            _dictation = new Dictation();
            SetEvents();
            _dictation.Start("example.wav");
        }
Ejemplo n.º 2
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();
     }
 }