Esempio n. 1
0
        private Task MakeMoveFromLastBase(FlightModel flight, int?stationId)
        {
            StationModel flightOldStation = StationsList.FirstOrDefault(s =>
            {
                {
                    return(s.Flight != null && s.Flight.ID == flight.ID);
                }
            });
            FlightModel flightToMove = flightOldStation.Flight;
            Image       plainToFly   = GetPlainImage(flightOldStation);

            RemoveFlightFromStation(flightToMove, flightOldStation);
            return(MoveOutFromStations(plainToFly, flightOldStation));
        }
Esempio n. 2
0
 private Task MakeMoveBetwinStations(FlightModel flight, int?stationId)
 {
     return(curentView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                                      () =>
     {
         StationModel flightNewStation = StationsList.Find(s => s.Id == stationId);
         StationModel flightOldStation = StationsList.FirstOrDefault(s =>
         {
             {
                 return s.Flight != null && s.Flight.ID == flight.ID;
             }
         });
         FlightModel flightToMove = flightOldStation.Flight;
         Image plainToFly = GetPlainImage(flightOldStation);
         RemoveFlightFromStation(flightToMove, flightOldStation);
         PutFilghtInStation(flightToMove, flightNewStation);
         MoveInToStations(plainToFly, flightNewStation);
     }).AsTask());
 }