/// <summary> /// Mark a waypoint as no longer finished by moving it from the visited list back into the queue. /// </summary> /// <param name="w">The waypoint to mark as no longer finished.</param> public void UnFinishWaypoint(Waypoint w) { VisitedWaypoints.Remove(w); QueuedWaypoints.Add(w); }
/// <summary> /// Mark a waypoint as finished by moving it from the queue to the visited list. /// </summary> /// <param name="w">The waypoint to mark as finished.</param> public void FinishWaypoint(Waypoint w) { QueuedWaypoints.Remove(w); VisitedWaypoints.Add(w); }
/// <summary> /// Remove the given waypoint. /// </summary> /// <param name="w">The waypoint to remove.</param> public void RemoveWaypoint(Waypoint w) { // Remove the waypoint from the correct list if (!w.Visited) QueuedWaypoints.Remove(w); else VisitedWaypoints.Remove(w); }
/// <summary> /// Create a new waypoint at the given location, along with a corresponding ViewModel and notify MATLAB. /// </summary> /// <param name="x">The position of the waypoint on the X-axis.</param> /// <param name="y">The position of the waypoint on the Y-axis.</param> /// <returns>The newly created WaypointViewModel.</returns> public void AddWaypoint(Waypoint w) { // Add Waypoint to the list QueuedWaypoints.Add(w); }