internal Action RestorePrimaryButtonClickEvent() { return(() => { if (primaryEvent == Def.Constant.LeftButtonDown) { InputSender.LeftClick(); } else if (primaryEvent == Def.Constant.MiddleButtonDown) { InputSender.MiddleClick(); } else if (primaryEvent == Def.Constant.RightButtonDown) { InputSender.RightClick(); } else if (primaryEvent == Def.Constant.X1ButtonDown) { InputSender.X1Click(); } else if (primaryEvent == Def.Constant.X2ButtonDown) { InputSender.X2Click(); } }); }
public void X1ClickTest() { sender.X1Click(); Assert.AreEqual(mouseEvents[0].Item1, LowLevelMouseHook.Event.WM_XBUTTONDOWN); Assert.IsTrue(mouseEvents[0].Item2.mouseData.asXButton.isXButton1); Assert.AreEqual(mouseEvents[1].Item1, LowLevelMouseHook.Event.WM_XBUTTONUP); Assert.IsTrue(mouseEvents[1].Item2.mouseData.asXButton.isXButton1); }