Inheritance: BaseModel
コード例 #1
0
 public EngineType(
     string model,
     Manufacturer manufacturer,
     TypeOfEngine engine,
     NoiseLevel noise,
     double consumptation,
     long price,
     int maxspeed,
     int ceiling,
     double runway,
     double range,
     Period<int> produced)
 {
     Model = model;
     Manufacturer = manufacturer;
     Engine = engine;
     ConsumptationModifier = consumptation;
     Price = price;
     MaxSpeed = maxspeed;
     Ceiling = ceiling;
     RunwayModifier = runway;
     RangeModifier = range;
     Produced = produced;
     Types = new List<AirlinerType>();
     Noise = noise;
 }
コード例 #2
0
 public ManufacturerContract(Manufacturer manufacturer, DateTime date, int length, double discount)
 {
     Manufacturer = manufacturer;
     Airliners = length;
     SigningDate = date;
     Length = length;
     Discount = discount;
     ExpireDate = date.AddYears(Length);
     PurchasedAirliners = 0;
 }
コード例 #3
0
 public AirlinerCargoType(
     Manufacturer manufacturer,
     string name,
     string family,
     int cockpitcrew,
     double cargoSize,
     double speed,
     long range,
     double wingspan,
     double length,
     double weight,
     double consumption,
     long price,
     long minRunwaylength,
     long fuelcapacity,
     BodyType body,
     TypeRange rangeType,
     TypeOfEngine engine,
     Period<DateTime> produced,
     int prodRate,
     bool isConvertable,
     bool standardType = true)
     : base(manufacturer,
         TypeOfAirliner.Cargo,
         name,
         family,
         cockpitcrew,
         speed,
         range,
         wingspan,
         length,
         weight,
         consumption,
         price,
         minRunwaylength,
         fuelcapacity,
         body,
         rangeType,
         engine,
         produced,
         prodRate,
         isConvertable,
         standardType)
 {
     CargoSize = cargoSize;
 }
コード例 #4
0
        public PageManufacturer(Manufacturer manufacturer)
        {
            this.NumberOfAirliners = new List<int>();

            for (int i = 1; i <= 50; i++)
            {
                this.NumberOfAirliners.Add(i);
            }

            this.Manufacturer = manufacturer;

            this.Orders = new AirlinerOrdersMVVM();

            this.Airliners = new ObservableCollection<AirlinerType>();
            AirlinerTypes.GetTypes(
                a =>
                    a.Manufacturer == manufacturer && a.Produced.From <= GameObject.GetInstance().GameTime
                    && a.Produced.To >= GameObject.GetInstance().GameTime).ForEach(t => this.Airliners.Add(t));
            this.DataContext = this.Airliners;

            this.Contract = new ManufacturerContractMVVM(
                this.Manufacturer,
                GameObject.GetInstance().HumanAirline.Contract != null
                    ? GameObject.GetInstance().HumanAirline.Contract.Manufacturer
                    : null);

            this.InitializeComponent();

            this.lvAirliners.ItemsSource = this.Airliners;

            var view = (CollectionView)CollectionViewSource.GetDefaultView(this.lvAirliners.ItemsSource);
            view.GroupDescriptions.Clear();

            var groupDescription = new PropertyGroupDescription("AirlinerFamily");
            view.GroupDescriptions.Add(groupDescription);
        }
コード例 #5
0
 protected AirlinerType(
     Manufacturer manufacturer,
     TypeOfAirliner typeOfAirliner,
     string name,
     string family,
     int cockpitCrew,
     double speed,
     long range,
     double wingspan,
     double length,
     double weight,
     double consumption,
     long price,
     long minRunwaylength,
     long fuelcapacity,
     BodyType body,
     TypeRange rangeType,
     TypeOfEngine engine,
     Period<DateTime> produced,
     int prodRate,
     bool isConvertable,
     bool standardType)
 {
     TypeAirliner = typeOfAirliner;
     AirlinerFamily = family;
     Manufacturer = manufacturer;
     Name = name;
     CruisingSpeed = speed;
     Range = range;
     Wingspan = wingspan;
     Length = length;
     Weight = weight;
     CockpitCrew = cockpitCrew;
     Price = price;
     FuelConsumption = consumption;
     Produced = produced;
     Engine = engine;
     Body = body;
     RangeType = rangeType;
     MinRunwaylength = minRunwaylength;
     FuelCapacity = fuelcapacity;
     IsStandardType = standardType;
     ProductionRate = prodRate;
     IsConvertable = isConvertable;
 }
コード例 #6
0
 public AirlinerPassengerType(
     Manufacturer manufacturer,
     string name,
     string family,
     int seating,
     int cockpitcrew,
     int cabincrew,
     double speed,
     long range,
     double wingspan,
     double length,
     double weight,
     double consumption,
     long price,
     int maxAirlinerClasses,
     long minRunwaylength,
     long fuelcapacity,
     BodyType body,
     TypeRange rangeType,
     TypeOfEngine engine,
     Period<DateTime> produced,
     int prodRate,
     bool isConvertable,
     bool standardType = true)
     : base(manufacturer,
         TypeOfAirliner.Passenger,
         name,
         family,
         cockpitcrew,
         speed,
         range,
         wingspan,
         length,
         weight,
         consumption,
         price,
         minRunwaylength,
         fuelcapacity,
         body,
         rangeType,
         engine,
         produced,
         prodRate,
         isConvertable,
         standardType)
 {
     MaxSeatingCapacity = seating;
     CabinCrew = cabincrew;
     MaxAirlinerClasses = maxAirlinerClasses;
 }
コード例 #7
0
 public static void AddManufacturer(Manufacturer manufacturer)
 {
     _manufacturers.Add(manufacturer);
 }
コード例 #8
0
 public ManufacturerContractMVVM(Manufacturer manufacturer, Manufacturer contracted)
 {
     this.Contracted = contracted;
     this.Manufacturer = manufacturer;
 }