public void Perform() { if (type == "Key press") { VirtualKeyboard.PressKey(keys, keyModifier); } if (type == "Timer") { Thread.Sleep((int)(timer * 1000)); } }
public void Perform() { switch (Type) { case "Key press": VirtualKeyboard.PressKey(Keys, KeyModifier); break; case "Timer": System.Threading.Thread.Sleep((int)(Timer * 1000)); break; } }
public void perform() { switch (type) { case "Key hold": VirtualKeyboard.HoldKey(keys, keyModifier); break; case "Key press": VirtualKeyboard.PressKey(keys, keyModifier, timer); break; case "Key release": VirtualKeyboard.ReleaseKey(keys, keyModifier); break; case "Timer": System.Threading.Thread.Sleep((int)(timer * 1000)); break; } }