public override void AddStation(IStationClient station) { WaitingStations.Add(station); if (Flight == null) { CallNextFlight(); } }
private async void CallNextFlight() { if (WaitingStations.Count > 0) { //Random rnd = new Random(); var nextStation = WaitingStations[0]; WaitingStations.Remove(nextStation); Flight = nextStation.Flight; FlightId = nextStation.FlightId; OnFlightMoveEvent(); nextStation.EvacuateStation(); await Flight.StartOperation(); OperationTimeEnded(); } }