//left click, series of 4 events public void LeftDoubleClick() { lock (ScheduledEvents) { //yes it looks silly but it's easier for me to tell what's going on when it's stacked like this ScheduledEvents.Add(new ScheduledMouseEvent() { Command = MouseEventArgs.LeftDown(), FireTime = 0 }); ScheduledEvents.Add(new ScheduledMouseEvent() { Command = MouseEventArgs.LeftUp(), FireTime = TotalElapsedMilli + DOUBLE_CLICK_DOWN_MILLI }); ScheduledEvents.Add(new ScheduledMouseEvent() { Command = MouseEventArgs.LeftDown(), FireTime = TotalElapsedMilli + DOUBLE_CLICK_DOWN_MILLI + DOUBLE_CLICK_DOWN_MILLI }); ScheduledEvents.Add(new ScheduledMouseEvent() { Command = MouseEventArgs.LeftUp(), FireTime = TotalElapsedMilli + DOUBLE_CLICK_DOWN_MILLI + DOUBLE_CLICK_DOWN_MILLI + DOUBLE_CLICK_DOWN_MILLI }); } }
public void LeftDown() { lock (ScheduledEvents) { ScheduledEvents.Add(new ScheduledMouseEvent() { Command = MouseEventArgs.LeftDown(), FireTime = 0 }); } }
public void LeftClick() { lock (ScheduledEvents) { ScheduledEvents.Add(new ScheduledMouseEvent() { Command = MouseEventArgs.LeftDown(), FireTime = 0, }); ScheduledEvents.Add(new ScheduledMouseEvent() { Command = MouseEventArgs.LeftUp(), FireTime = TotalElapsedMilli + CLICK_DOWN_MILLI, }); } }