public void OnSetHooks(bool setHooks) { if (setHooks) { SetWindowsHook.Start(devices); } else { SetWindowsHook.Stop(); } }
private void ChkHook_CheckedChanged(object sender, EventArgs e) { if (chkHook.Checked) { SetWindowsHook.Start(devices); } else { SetWindowsHook.Stop(); } }