コード例 #1
0
        protected void UnregisterShortcut(Keys key)
        {
            if (!KeyMap.ContainsKey(key))
            {
                throw new InvalidOperationException("The shortcut key is not registered.");
            }
            string command = KeyMap[key];

            KeyMap.Remove(key);
            CommandMap[command].Remove(key);
        }