MouseMove(MEvent.X, MEvent.Y);
MouseButton((int)MouseEventFlag.LeftUp, MEvent.X, MEvent.Y, 0, 0);
break;
case MouseEventType.MouseRightDown:
MouseButton((int)MouseEventFlag.RightDown, MEvent.X, MEvent.Y, 0, 0);
break;
case MouseEventType.MouseRightUp:
MouseButton((int)MouseEventFlag.RightUp, MEvent.X, MEvent.Y, 0, 0);
break;
case MouseEventType.MouseClick:
MouseMove(MEvent.X, MEvent.Y);
MouseButton((int)MouseEventFlag.LeftDown, MEvent.X, MEvent.Y, 0, 0);
MouseButton((int)MouseEventFlag.LeftUp, MEvent.X, MEvent.Y, 0, 0);
break;
case MouseEventType.MouseDoubleClick:
MouseMove(MEvent.X, MEvent.Y);
MouseButton((int)MouseEventFlag.LeftDown, MEvent.X, MEvent.Y, 0, 0);
MouseButton((int)MouseEventFlag.LeftDown, MEvent.X, MEvent.Y, 0, 0);
MouseButton((int)MouseEventFlag.LeftUp, MEvent.X, MEvent.Y, 0, 0);
MouseButton((int)MouseEventFlag.LeftUp, MEvent.X, MEvent.Y, 0, 0);
break;
}
}
}
/// <summary>
/// 执行鼠标事件
/// </summary>
/// <param name="code"></param>
private void doMouseEvent(Code code)
{
MouseEvent mouseCode = code as MouseEvent;
MouseHook hook = new MouseHook();
if (mouseCode != null)
{
switch (mouseCode.Type)
{
case MouseEventType.MouseMove:
hook.MouseWork(mouseCode);
break;
case MouseEventType.MouseClick:
hook.MouseWork(mouseCode);
break;
default:
hook.MouseWork(mouseCode);
break;
}
}
}
上一页 [1] [2]