Ejemplo n.º 1
0
        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();
                }
            }
        }
Ejemplo n.º 2
0
        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);
        }