public void AddRockToRoute(RockOnRouteViewModel rockOnRouteVM) { if (rockOnRouteVM != null && !rocksOnRoute.Contains(rockOnRouteVM)) { rocksOnRoute.Add(rockOnRouteVM); } }
public void RemoveRockFromRoute(RockOnRouteViewModel rockOnRouteVM) { if (rockOnRouteVM != null) { rocksOnRoute.Remove(rockOnRouteVM); canvas.RemoveChild(rockOnRouteVM.MyRockViewModel.BoulderShape); } }
private Shape DrawBoulderRockOnCanvas(RockOnRouteViewModel rockOnBoulderRoute) { Shape shapeToReturn; switch (rockOnBoulderRoute.BoulderStatus) { case RockOnBoulderStatus.Start: shapeToReturn = DrawStartRockOnCanvas(rockOnBoulderRoute.MyRockViewModel.MyRock); break; case RockOnBoulderStatus.End: shapeToReturn = DrawEndRockOnCanvas(rockOnBoulderRoute.MyRockViewModel.MyRock); break; case RockOnBoulderStatus.Int: default: shapeToReturn = DrawIntermediateRockOnCanvas(rockOnBoulderRoute.MyRockViewModel.MyRock); break; } return(shapeToReturn); }
public void RemoveSelectedRockFromRoute() { RemoveRockFromRoute(SelectedRockOnRoute); SelectedRockOnRoute = null; }