Example #1
0
        private static void OnKeyDown(object sender, KeyEventArgs e)
        {
            if (s_current != null)
            {
                return;
            }

            DockItem    dockItem    = (DockItem)sender;
            DockControl dockControl = dockItem.DockControl;

            if (dockControl == null)
            {
                return;
            }

            KeyGesture hotkey = GetHotkey(dockControl);

            if (hotkey.Modifiers == ModifierKeys.None)
            {
                return;
            }

            if (hotkey.Key == e.Key && (hotkey.Modifiers & Keyboard.Modifiers) == hotkey.Modifiers)
            {
                e.Handled = true;
                s_current = new WindowSwitcher(dockControl);
                s_current.Show();
            }
        }
Example #2
0
        private static void Close()
        {
            if (s_current == null)
            {
                return;
            }

            WindowSwitcher current = s_current;

            s_current = null;
            current.DoClose();
        }