Exemplo n.º 1
0
 protected override void OnEnabling(EnablingEventArgs e)
 {
     try
     {
         SpeechRecognitionManager.Recognize(phrase, Recognized);
     }
     catch (InvalidOperationException ex)
     {
         ErrorLog.AddError(ErrorType.Failure, ex.Message);
         e.Cancel = true;
         return;
     }
 }
Exemplo n.º 2
0
 protected override void OnEnabling(EnablingEventArgs e)
 {
     try
     {
         SpeechRecognitionManager.Recognize(phrase, Recognized);
     }
     catch
     {
         ErrorLog.AddError(ErrorType.Failure, "Unable to start up the Speech Recognition Engine");
         e.Cancel = true;
         return;
     }
 }