internal static void RecordKeys(Keys keyCode, ActionType type) { if (!MacroForm.sIsRecording) { return; } double totalMilliseconds = (DateTime.Now - MacroForm.mBaseDateTime).TotalMilliseconds; MacroForm.mBaseDateTime = DateTime.Now; MacroForm.AddActionInDictionary(new MacroAction() { ActionType = type, ActionKey = keyCode, DelayFromLastAction = totalMilliseconds }); }
internal static void RecordMouse( double x, double y, double width, double height, MouseButtons button, ActionType type) { if (!MacroForm.sIsRecording) { return; } double totalMilliseconds = (DateTime.Now - MacroForm.mBaseDateTime).TotalMilliseconds; MacroForm.mBaseDateTime = DateTime.Now; MacroForm.AddActionInDictionary(new MacroAction() { ActionType = type, MouseButton = button, ActionPointX = x / width, ActionPointY = y / height, DelayFromLastAction = totalMilliseconds }); }