Example #1
0
 private void OnToggleHook(object sender, EventArgs e)
 {
     if (itemEnabled.Checked)
     {
         mouseHook.Unhook();
         itemEnabled.Checked                 = false;
         itemEnabled.Text                    = Properties.Resources.TextButtonHookDisabled;
         itemUseX1.Enabled                   = false;
         itemUseX2.Enabled                   = false;
         itemPreferAxis.Enabled              = false;
         itemEmulateMiddleButton.Enabled     = false;
         itemReverseVerticalScroll.Enabled   = false;
         itemReverseHorizontalScroll.Enabled = false;
     }
     else
     {
         mouseHook.Hook();
         itemEnabled.Checked                 = true;
         itemEnabled.Text                    = Properties.Resources.TextButtonHookEnabled;
         itemUseX1.Enabled                   = true;
         itemUseX2.Enabled                   = true;
         itemPreferAxis.Enabled              = true;
         itemEmulateMiddleButton.Enabled     = true;
         itemReverseVerticalScroll.Enabled   = true;
         itemReverseHorizontalScroll.Enabled = true;
     }
 }
Example #2
0
 private void OnToggleHook(object sender, EventArgs e)
 {
     if (itemEnabled.Checked)
     {
         mouseHook.Unhook();
         itemEnabled.Checked = false;
         itemEnabled.Text    = Properties.Resources.TextButtonHookDisabled;
     }
     else
     {
         mouseHook.Hook();
         itemEnabled.Checked = true;
         itemEnabled.Text    = Properties.Resources.TextButtonHookEnabled;
     }
 }