Esempio n. 1
0
 private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     //this.Show();
     notifyIcon1.Visible = false;
     this.WindowState    = FormWindowState.Normal;
     keyboardHookManager.Stop();
 }
Esempio n. 2
0
        private void timer_Tick(object sender, EventArgs e)
        {
            if (Form.ActiveForm == this)
            {
                return;
            }

            string keyToPress;

            if (mainBox.SelectedIndex == 0)
            {
                keyToPress = selected[rand.Next(selected.Length)].ToString();
            }
            else
            {
                if (rand.Next(2) == 0)
                {
                    keyToPress = mainBox.SelectedIndex.ToString();
                }
                else
                {
                    keyToPress = selected[rand.Next(selected.Length)].ToString();
                }
            }

            keyboardHookManager.Stop();
            SendKeys.SendWait(keyToPress);
            keyboardHookManager.Start();
        }
Esempio n. 3
0
        void Exit(object sender, EventArgs e)
        {
            // Hide tray icon, otherwise it will remain shown until user mouses over it
            trayIcon.Visible = false;
            keyBoardManager.Stop();

            Application.Exit();
        }