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); } }
public void UnregisterPhrase(string phrase) { _speechRecognizer.UnregisterPhrase(phrase); RegisteredCommands.Remove(phrase); }