示例#1
0
 private void Command_OnCommandChange(object sender, CommandChangeEventArgs e)
 {
     if (e.IsRemoval)
     {
         if (RegisteredCommands.ContainsKey(e.Key))
         {
             RegisteredCommands.Remove(e.Key);
         }
     }
     else
     {
         RegisteredCommands.Add(e.Key, e.IsMasterJob);
     }
 }
示例#2
0
 public void UnregisterPhrase(string phrase)
 {
     _speechRecognizer.UnregisterPhrase(phrase);
     RegisteredCommands.Remove(phrase);
 }