void Execute(string prefix) { if (CBindings.Count > 0) { IList <CBinding> bindings = CBindings.List(prefix); if (bindings.Count > 0) { foreach (CBinding binding in bindings) { CBindings.Unbind(binding.shortCut); } PostNotification(); } } }
bool Execute(string key) { string token = key.ToLower(); CShortCut shortCut; if (!CShortCut.TryParse(token, out shortCut)) { PrintError("Invalid shortcut: {0}", token); return(false); } CBindings.Unbind(shortCut); // TODO: unbind 'operation' commands PostNotification( CCommandNotifications.CBindingsChanged, CCommandNotifications.KeyManualMode, this.IsManualMode ); return(true); }