public static void DisposeBy(IHoldBusesUI place) { for (int i = 0; i < routes.Count; i++) { DisposeBy(place, routes[i]); } }
private void Move() { //Current.RemoveBus(this); Previous = Current; Previous?.RemoveBus(this); Current = route.Next(this); Current.AddBus(this); }
private static void DisposeBy(IHoldBusesUI place, RouteCore route) { foreach (var way in route.ways) { if (way == place) { route.Dispose(); } } }
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); }
private bool BusAt(IHoldBusesUI busUI, IHoldBusesUI other) => busUI == other;