Exemplo n.º 1
0
 //------------------------------------------------------------------------------------------------------
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!ghk.Unregiser() && !ghk2.Unregiser() && !ghk3.Unregiser())
     {
         MessageBox.Show("Hotkey failed to unregister!");
     }
 }
Exemplo n.º 2
0
 private void ProjectExplorer_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!projectExplorer.Unregiser())
     {
         MessageBox.Show("Hotkey failed tto unregister!)");
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// removes the global hot key registration when the app is closed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!showUI.Unregiser())
     {
         MessageBox.Show("Failed to un-register key");
     }
 }
Exemplo n.º 4
0
 private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!globalHotKeys.Unregiser())
     {
         MessageBox.Show("Hotkeys failed to unregister!");
     }
 }
Exemplo n.º 5
0
        //Second clipboard checkbox
        private void manage_backup_clipboard()
        {
            ghk2 = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.D2, this);
            ghk3 = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.D3, this);

            if (checkBox1.Checked)
            {
                if (ghk2.Register() && ghk3.Register())
                {
                    SecClipLabel.Text = "CTRL+2 and CTRL+3 registered";
                }
            }
            if (!checkBox1.Checked)
            {
                if (ghk2.Unregiser() && ghk3.Unregiser())
                {
                    SecClipLabel.Text = "CTRL+2 and CTRL+3 not registered";
                }
            }
        }
Exemplo n.º 6
0
 // Stops the while loop and unregister hotkeys when program is closed for key press status
 private void SpamCity_FormClosed(object sender, FormClosedEventArgs e)
 {
     ghk1.Unregiser();
     ghk2.Unregiser();
     isRunning = false;
 }