public void AddNewRoute()
 {
     var route = new Route( "Unknow", 100, this._owner );
     this._owner.Routes.AddRoute( route );
     var routeViewModel = new RouteViewModel( route );
     this._routes.Add( routeViewModel );
     this.SelectedRoad = routeViewModel;
 }
        private void SetConnections( BuildRoute convertedRoutes )
        {
            var mark = new Route<RouteElement>( convertedRoutes.Elements );

//            if ( !mark.MoveNext() ) { return; }
            while ( mark.MoveNext() )
            {
                mark.Current.RoadElement.Routes.AddRoadThatBelongToIt(convertedRoutes, mark.Clone() );
            }
        }
 private RouteViewModel Conveter( IControl control, Route route )
 {
     var resutl = new RouteViewModel( route );
     var previousControl = this._controlToControlViewModelConveter.Convert( control );
     foreach ( var routeElement in route.Items )
     {
         var item = this.Convert( routeElement );
         resutl.Add( item );
     }
     return resutl;
 }
예제 #4
0
 public void Remove( Route route )
 {
     if( route == null ) throw new ArgumentNullException( "route" );
     this._routes.Remove( route );
 }
예제 #5
0
 public void AddRoute( Route route )
 {
     if (route == null) throw new ArgumentNullException("route");
     this._routes.Add( route );
 }