Exemplo n.º 1
0
 private void hotkeyCallback(HotKeyManager.HotKey p_hotKey)
 {
     foreach (Config.Arrangement arrangement in m_config.Arrangements)
     {
         if ((p_hotKey.KeyModifiers == arrangement.Shortcut.KeyModifier) &&
             (p_hotKey.Key == arrangement.Shortcut.Key))
         {
             WindowModifier.ApplyArrangement(m_config, arrangement);
         }
     }
 }
Exemplo n.º 2
0
        private void applyButton_Click(object sender, EventArgs e)
        {
            Forms.ActiveWindowSelector winList = new Forms.ActiveWindowSelector();

            if (winList.ShowDialog() == DialogResult.OK)
            {
                Config.Window   win = new Config.Window(winList.Window);
                Config.Location pos = (Config.Location)positionList.SelectedItem;

                WindowModifier.ApplyModification(win, pos, false);
            }
        }
Exemplo n.º 3
0
        private void PopulateWindowList()
        {
            activeWindowsListBox.Items.Clear();

            IEnumerable <WindowHandle> currentWindows = WindowModifier.GetAllVisibleWindows();

            activeWindowsListBox.BeginUpdate();

            m_currentWindows = new List <WindowHandle>();

            foreach (WindowHandle windowHandle in currentWindows)
            {
                activeWindowsListBox.Items.Insert(activeWindowsListBox.Items.Count, windowHandle.GetWindowText());
                m_currentWindows.Add(windowHandle);
            }

            activeWindowsListBox.EndUpdate();
        }