public void StartRecordingMouseMovementChanges(bool clickedOnCanvas) { if (IsRecordingChanges == false) { LastMouseMoveCoordinates.Clear(); IsRecordingChanges = true; ClickedOnCanvas = clickedOnCanvas; StartedRecordingChanges?.Invoke(this, EventArgs.Empty); } }
public void RecordMouseMovementChange(Coordinates mouseCoordinates) { if (IsRecordingChanges) { if (LastMouseMoveCoordinates.Count == 0 || mouseCoordinates != LastMouseMoveCoordinates[^ 1]) { LastMouseMoveCoordinates.Add(mouseCoordinates); MousePositionChanged?.Invoke(this, new MouseMovementEventArgs(mouseCoordinates)); } } }