Пример #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;
 }