Ejemplo n.º 1
0
 public static void SetStationPickService(IStationPickService service)
 {
     foreach (var station in Stations)
     {
         station.Lock();
         station.pickService.Detach();
         station.pickService = service.Copy();
         station.Unlock();
     }
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        private void SetUp()
        {
            var Data = new StationViewModel(SimulationModel);

            View = new StationView
            {
                DataContext = Data
            };
            pickService = new DefaultPickService(simulationService);

            if (isLocked)
            {
                Lock();
            }
            else
            {
                Unlock();
            }

            Views.Add(View);
            Stations.Add(this);
        }