예제 #1
0
 private void SetWays(List <Station> _ways)
 {
     ways.Add(StationCore.GetModelBy(_ways.First()));
     for (int i = 1; i < _ways.Count; i++)
     {
         var road   = Road.Find(_ways[i - 1], _ways[i]);
         var roadUI = RoadCore.FindBy(road);
         ways.Add(roadUI);
         ways.Add(StationCore.GetModelBy(_ways[i]));
     }
     //ways.Add(StationCore.GetModelBy(_ways.Last()));
 }
예제 #2
0
        public RoadCore(Canvas _canvas, UserControl _first, UserControl _second, ISimulationService _simulationService, int _length)
        {
            canvas            = _canvas;
            first             = _first;
            second            = _second;
            simulationService = _simulationService;
            road        = new Road(StationCore.GetModelBy(first), StationCore.GetModelBy(second), _length);
            view        = new RoadView();
            pickService = new DefaultPickService(simulationService, false);

            Activate();
            Roads.Add(this);
        }