コード例 #1
0
        public FleetAirliner(
            PurchasedType purchased,
            DateTime purchasedDate,
            Airline airline,
            Airliner airliner,
            Airport homebase)
        {
            Airliner = airliner;
            Purchased = purchased;
            PurchasedDate = purchasedDate;
            Airliner.Airline = airline;
            Homebase = homebase;
            Name = airliner.TailNumber;
            Statistics = new AirlinerStatistics(this);
            LastCMaintenance = Airliner.BuiltDate;
            LastAMaintenance = Airliner.BuiltDate;
            LastBMaintenance = Airliner.BuiltDate;
            LastDMaintenance = Airliner.BuiltDate;
            Status = AirlinerStatus.Stopped;
            MaintRoutes = new List<Route>();

            CurrentPosition = Homebase;
            //new GeoCoordinate(this.Homebase.Profile.Coordinates.Latitude,this.Homebase.Profile.Coordinates.Longitude);

            Routes = new List<Route>();
            Pilots = new List<Pilot>();
            InsurancePolicies = new List<AirlinerInsurance>();
            MaintenanceHistory = new Dictionary<Invoice, string>();

            Data = new OperatingData();

            if (Purchased == PurchasedType.Bought || Purchased == PurchasedType.BoughtDownPayment)
                Airliner.Owner = Airliner.Airline;
        }
コード例 #2
0
 private FleetAirliner(SerializationInfo info, StreamingContext ctxt)
 {
     if (Version == 1)
         Data = new OperatingData();
 }