예제 #1
0
 public void AddRockToRoute(RockOnRouteViewModel rockOnRouteVM)
 {
     if (rockOnRouteVM != null && !rocksOnRoute.Contains(rockOnRouteVM))
     {
         rocksOnRoute.Add(rockOnRouteVM);
     }
 }
예제 #2
0
 public void RemoveRockFromRoute(RockOnRouteViewModel rockOnRouteVM)
 {
     if (rockOnRouteVM != null)
     {
         rocksOnRoute.Remove(rockOnRouteVM);
         canvas.RemoveChild(rockOnRouteVM.MyRockViewModel.BoulderShape);
     }
 }
예제 #3
0
        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);
        }
예제 #4
0
 public void RemoveSelectedRockFromRoute()
 {
     RemoveRockFromRoute(SelectedRockOnRoute);
     SelectedRockOnRoute = null;
 }