예제 #1
0
        void buttonListControlRunning_ItemActivate(object sender, ButtonListControl.ButtonListControlItem item)
        {
            DesktopWindows.Window window = item.Tag as DesktopWindows.Window;
            MS.Win32.SetForegroundWindow(window.Hwnd);

            MS.Win32.WINDOWPLACEMENT placement = new MS.Win32.WINDOWPLACEMENT();
            MS.Win32.GetWindowPlacement(window.Hwnd, ref placement);
            if ((placement.showCmd == MS.Win32.SW.MINIMIZE) ||
                (placement.showCmd == MS.Win32.SW.SHOWMINIMIZED))
            {
                MS.Win32.ShowWindow(window.Hwnd, MS.Win32.SW.RESTORE);
            }

            if (Settings.Current.Minimize)
            {
                SendToTray();
            }
            else
            {
                Close();
            }
        }
예제 #2
0
        void buttonListControlShortcuts_ItemActivate(object sender, ButtonListControl.ButtonListControlItem item)
        {
            Shortcut shortcut = item.Tag as Shortcut;

            ExecuteShortcut(shortcut);
        }