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