Beispiel #1
0
 public static void DisposeBy(IHoldBusesUI place)
 {
     for (int i = 0; i < routes.Count; i++)
     {
         DisposeBy(place, routes[i]);
     }
 }
Beispiel #2
0
 private void Move()
 {
     //Current.RemoveBus(this);
     Previous = Current;
     Previous?.RemoveBus(this);
     Current = route.Next(this);
     Current.AddBus(this);
 }
Beispiel #3
0
 private static void DisposeBy(IHoldBusesUI place, RouteCore route)
 {
     foreach (var way in route.ways)
     {
         if (way == place)
         {
             route.Dispose();
         }
     }
 }
Beispiel #4
0
 public BusCore(RouteCore _route, int _delay, Canvas _canvas)
 {
     delay   = _delay;
     route   = _route;
     Current = null;
     bus     = new Bus(delay);
     view    = new BusView
     {
         DataContext = new BusViewModel(bus),
     };
     canvas = _canvas;
     //(route.SimulationModel as Route).AddBus(bus);
     //Current.AddBus(this);
 }
Beispiel #5
0
 private bool BusAt(IHoldBusesUI busUI, IHoldBusesUI other) => busUI == other;