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; }
private FleetAirliner(SerializationInfo info, StreamingContext ctxt) { if (Version == 1) Data = new OperatingData(); }