Esempio n. 1
0
        //returns the "value" of the airline
        public AirlineValue getAirlineValue()
        {
            double value      = GeneralHelpers.GetInflationPrice(getValue() * 1000000);
            double startMoney = GeneralHelpers.GetInflationPrice(this.StartMoney);

            if (value <= startMoney)
            {
                return(AirlineValue.Very_low);
            }
            if (value > startMoney && value < startMoney * 3)
            {
                return(AirlineValue.Low);
            }
            if (value >= startMoney * 3 && value < startMoney * 9)
            {
                return(AirlineValue.Normal);
            }
            if (value >= startMoney * 9 && value < startMoney * 18)
            {
                return(AirlineValue.High);
            }
            if (value >= startMoney * 18)
            {
                return(AirlineValue.Very_high);
            }

            return(AirlineValue.Normal);
        }
Esempio n. 2
0
        //returns the price for a hub at an airport
        public static double GetHubPrice(Airport airport, HubType type)
        {
            double price = type.Price;

            price = price + 25000 * ((int)airport.Profile.Size);
            return(Convert.ToInt64(GeneralHelpers.GetInflationPrice(price)));
        }
        private void btnConvertToCargo_Click(object sender, RoutedEventArgs e)
        {
            double convertPrice = GeneralHelpers.GetInflationPrice(1000 * ((AirlinerPassengerType)this.Airliner.Airliner.Type).MaxSeatingCapacity);

            if (this.Airliner.Airliner.getPrice() > GameObject.GetInstance().HumanAirline.Money)
            {
                WPFMessageBox.Show(Translator.GetInstance().GetString("MessageBox", "2109"), Translator.GetInstance().GetString("MessageBox", "2109", "message"), WPFMessageBoxButtons.Ok);
            }
            else
            {
                WPFMessageBoxResult result = WPFMessageBox.Show(Translator.GetInstance().GetString("MessageBox", "2123"), string.Format(Translator.GetInstance().GetString("MessageBox", "2123", "message"), this.Airliner.Name, new ValueCurrencyConverter().Convert(convertPrice)), WPFMessageBoxButtons.YesNo);
                if (result == WPFMessageBoxResult.Yes)
                {
                    AirlinerPassengerType currentType = this.Airliner.Airliner.Type as AirlinerPassengerType;

                    string airlinerName = string.Format("{0} Freighter", currentType.Name);

                    double cargoSize = AirlinerHelpers.ConvertPassengersToCargoSize(currentType);

                    AirlinerType newCargoType = new AirlinerCargoType(currentType.Manufacturer, airlinerName, currentType.AirlinerFamily, currentType.CockpitCrew, cargoSize, currentType.CruisingSpeed, currentType.Range, currentType.Wingspan, currentType.Length, currentType.FuelConsumption, currentType.Price, currentType.MinRunwaylength, currentType.FuelCapacity, currentType.Body, currentType.RangeType, currentType.Engine, currentType.Produced, currentType.ProductionRate, false);
                    newCargoType.BaseType = currentType;
                    AirlinerTypes.AddType(newCargoType);

                    this.Airliner.Airliner.Type = newCargoType;

                    AirlineHelpers.AddAirlineInvoice(GameObject.GetInstance().HumanAirline, GameObject.GetInstance().GameTime, Invoice.InvoiceType.Airline_Expenses, -convertPrice);

                    PageNavigator.NavigateTo(new PageFleetAirliner(this.Airliner));
                }
            }
        }
Esempio n. 4
0
        //sets the status for hiring of students
        private void setHireStudentsStatus()
        {
            double studentPrice = GeneralHelpers.GetInflationPrice(PilotStudent.StudentCost);

            int studentsCapacity = Math.Min(this.FlightSchool.Instructors.Count * Model.PilotModel.FlightSchool.MaxNumberOfStudentsPerInstructor, this.FlightSchool.FlightSchool.TrainingAircrafts.Sum(f => f.Type.MaxNumberOfStudents));

            this.FlightSchool.HireStudents = studentsCapacity > this.FlightSchool.Students.Count && GameObject.GetInstance().HumanAirline.Money > studentPrice;
        }
Esempio n. 5
0
        //returns the price for a contract at an airport
        public static double GetAirportContractPrice(Airport airport)
        {
            double paxDemand = airport.Profile.MajorDestionations.Sum(d => d.Value) + airport.Profile.Pax;

            double basePrice = 10000;

            return(GeneralHelpers.GetInflationPrice(paxDemand * basePrice));

            //(initial amount, in the millions; and a montly amount probably $50,000 or so
        }
Esempio n. 6
0
        private void btnTrainPilot_Click(object sender, RoutedEventArgs e)
        {
            double substituteDayPrice = 500;

            PilotMVVM pilot = (PilotMVVM)((Button)sender).Tag;

            ComboBox cbAirlinerFamily = new ComboBox();

            cbAirlinerFamily.SetResourceReference(ComboBox.StyleProperty, "ComboBoxTransparentStyle");
            cbAirlinerFamily.ItemTemplate        = this.Resources["TrainingFacility"] as DataTemplate;
            cbAirlinerFamily.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            cbAirlinerFamily.Width = 350;

            var airlinerFamilies = AirlinerTypes.GetTypes(t => t.Produced.From.Year <= GameObject.GetInstance().GameTime.Year&& t.Produced.To > GameObject.GetInstance().GameTime.AddYears(-30)).Select(t => t.AirlinerFamily).Where(t => !pilot.Pilot.Aircrafts.Contains(t)).Distinct().OrderBy(a => a);

            foreach (string family in airlinerFamilies)
            {
                double price = AirlineHelpers.GetTrainingPrice(pilot.Pilot, family);;
                cbAirlinerFamily.Items.Add(new PilotTrainingMVVM(family, AirlineHelpers.GetTrainingDays(pilot.Pilot, family), price));
            }

            cbAirlinerFamily.SelectedIndex = 0;

            if (PopUpSingleElement.ShowPopUp(Translator.GetInstance().GetString("PageAirlineEmployees", "1014"), cbAirlinerFamily) == PopUpSingleElement.ButtonSelected.OK && cbAirlinerFamily.SelectedItem != null)
            {
                PilotTrainingMVVM pilotTraining = (PilotTrainingMVVM)cbAirlinerFamily.SelectedItem;

                if (pilot.Pilot.Airliner == null)
                {
                    AirlineHelpers.SendForTraining(GameObject.GetInstance().HumanAirline, pilot.Pilot, pilotTraining.Family, pilotTraining.TrainingDays, pilotTraining.Price);

                    pilot.OnTraining = true;
                }
                else
                {
                    double substitutePrice = GeneralHelpers.GetInflationPrice(pilotTraining.TrainingDays * substituteDayPrice);

                    WPFMessageBoxResult result = WPFMessageBox.Show(Translator.GetInstance().GetString("MessageBox", "2129"), string.Format(Translator.GetInstance().GetString("MessageBox", "2129", "message"), new ValueCurrencyConverter().Convert(substitutePrice), pilotTraining.TrainingDays), WPFMessageBoxButtons.YesNo);

                    if (result == WPFMessageBoxResult.Yes)
                    {
                        AirlineHelpers.AddAirlineInvoice(this.Airline.Airline, GameObject.GetInstance().GameTime, Invoice.InvoiceType.Airline_Expenses, -substitutePrice);
                        AirlineHelpers.SendForTraining(GameObject.GetInstance().HumanAirline, pilot.Pilot, pilotTraining.Family, pilotTraining.TrainingDays, pilotTraining.Price);

                        pilot.OnTraining = true;
                    }
                }
            }
        }
        private void btnUpgradeLicens_Click(object sender, RoutedEventArgs e)
        {
            double upgradeLicensPrice = GeneralHelpers.GetInflationPrice(1000000);

            Airline.AirlineLicense nextLicenseType = this.Airline.License + 1;

            WPFMessageBoxResult result = WPFMessageBox.Show(Translator.GetInstance().GetString("MessageBox", "2119"), string.Format(Translator.GetInstance().GetString("MessageBox", "2119", "message"), new TextUnderscoreConverter().Convert(nextLicenseType), new ValueCurrencyConverter().Convert(upgradeLicensPrice)), WPFMessageBoxButtons.YesNo);

            if (result == WPFMessageBoxResult.Yes)
            {
                this.Airline.License         = nextLicenseType;
                this.Airline.Airline.License = nextLicenseType;

                AirlineHelpers.AddAirlineInvoice(this.Airline.Airline, GameObject.GetInstance().GameTime, Invoice.InvoiceType.Airline_Expenses, -upgradeLicensPrice);
            }
        }
        private void btnHire_Click(object sender, RoutedEventArgs e)
        {
            Random rnd = new Random();

            ComboBox cbInstructor = new ComboBox();

            cbInstructor.SetResourceReference(ComboBox.StyleProperty, "ComboBoxTransparentStyle");
            cbInstructor.Width = 200;
            cbInstructor.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            cbInstructor.DisplayMemberPath   = "Profile.Name";
            cbInstructor.SelectedValuePath   = "Profile.Name";

            foreach (Instructor instructor in this.FlightSchool.Instructors.Where(i => i.Students.Count < FlightSchool.MaxNumberOfStudentsPerInstructor))
            {
                cbInstructor.Items.Add(instructor);
            }

            cbInstructor.SelectedIndex = 0;

            if (PopUpSingleElement.ShowPopUp(Translator.GetInstance().GetString("PanelFlightSchool", "1005"), cbInstructor) == PopUpSingleElement.ButtonSelected.OK && cbInstructor.SelectedItem != null)
            {
                List <Town> towns = Towns.GetTowns(this.FlightSchool.Airport.Profile.Country);

                Town         town      = towns[rnd.Next(towns.Count)];
                DateTime     birthdate = MathHelpers.GetRandomDate(GameObject.GetInstance().GameTime.AddYears(-55), GameObject.GetInstance().GameTime.AddYears(-23));
                PilotProfile profile   = new PilotProfile(Names.GetInstance().getRandomFirstName(), Names.GetInstance().getRandomLastName(), birthdate, town);

                PilotStudent student = new PilotStudent(profile, GameObject.GetInstance().GameTime, (Instructor)cbInstructor.SelectedItem);

                this.FlightSchool.addStudent(student);
                ((Instructor)cbInstructor.SelectedItem).addStudent(student);

                showStudents();

                this.ParentPage.updatePage();

                txtStudents.Text = this.FlightSchool.NumberOfStudents.ToString();

                double studentPrice = GeneralHelpers.GetInflationPrice(PilotStudent.StudentCost);

                int studentsCapacity = Math.Min(this.FlightSchool.Instructors.Count * FlightSchool.MaxNumberOfStudentsPerInstructor, this.FlightSchool.TrainingAircrafts.Sum(f => f.Type.MaxNumberOfStudents));

                btnHire.IsEnabled = studentsCapacity > this.FlightSchool.Students.Count && GameObject.GetInstance().HumanAirline.Money > studentPrice;

                AirlineHelpers.AddAirlineInvoice(GameObject.GetInstance().HumanAirline, GameObject.GetInstance().GameTime, Invoice.InvoiceType.Airline_Expenses, -studentPrice);
            }
        }
Esempio n. 9
0
        private void btnBuild_Click(object sender, RoutedEventArgs e)
        {
            double price = GeneralHelpers.GetInflationPrice(267050);

            ComboBox cbAirport = new ComboBox();

            cbAirport.SetResourceReference(ComboBox.StyleProperty, "ComboBoxTransparentStyle");
            cbAirport.Width               = 200;
            cbAirport.SelectedValuePath   = "Profile.Town.Name";
            cbAirport.DisplayMemberPath   = "Profile.Town.Name";
            cbAirport.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;

            List <Airport> homeAirports = GameObject.GetInstance().HumanAirline.Airports.FindAll(a => a.getCurrentAirportFacility(GameObject.GetInstance().HumanAirline, AirportFacility.FacilityType.Service).TypeLevel > 0);

            homeAirports.AddRange(GameObject.GetInstance().HumanAirline.Airports.FindAll(a => a.IsHub)); //hubs
            homeAirports = homeAirports.Distinct().ToList();


            foreach (Airport airport in homeAirports)
            {
                if (GameObject.GetInstance().HumanAirline.FlightSchools.Find(f => f.Airport == airport) == null)
                {
                    cbAirport.Items.Add(airport);
                }
            }

            cbAirport.SelectedIndex = 0;

            if (PopUpSingleElement.ShowPopUp(Translator.GetInstance().GetString("PagePilots", "1004"), cbAirport) == PopUpSingleElement.ButtonSelected.OK && cbAirport.SelectedItem != null)
            {
                Airport airport = (Airport)cbAirport.SelectedItem;

                FlightSchool fs = new FlightSchool(airport);

                GameObject.GetInstance().HumanAirline.addFlightSchool(fs);
                this.FlightSchools.Add(fs);

                AirlineHelpers.AddAirlineInvoice(GameObject.GetInstance().HumanAirline, GameObject.GetInstance().GameTime, Invoice.InvoiceType.Airline_Expenses, -price);

                ICollectionView view = CollectionViewSource.GetDefaultView(lvInstructors.ItemsSource);
                view.Refresh();
            }
        }
Esempio n. 10
0
        //returns the price for converting a passenger airliner to a cargo airliner
        public static double GetCargoConvertingPrice(AirlinerPassengerType type)
        {
            double basePrice = 650000;

            if (type.Body == AirlinerType.BodyType.Single_Aisle)
            {
                basePrice = basePrice * 1.2;
            }

            if (type.Body == AirlinerType.BodyType.Narrow_Body)
            {
                basePrice = basePrice * 2.4;
            }

            if (type.Body == AirlinerType.BodyType.Wide_Body)
            {
                basePrice = basePrice * 3.6;
            }

            double paxRate = type.MaxSeatingCapacity * 800;

            return(GeneralHelpers.GetInflationPrice(basePrice + paxRate));
        }
        //clears the values of the boxes
        private void clearValues()
        {
            cbType.Items.Clear();
            foreach (AirlineInsurance.InsuranceType type in Enum.GetValues(typeof(AirlineInsurance.InsuranceType)))
            {
                cbType.Items.Add(type);
            }
            cbType.SelectedIndex = 0;

            cbTerms.Items.Clear();
            foreach (AirlineInsurance.PaymentTerms term in Enum.GetValues(typeof(AirlineInsurance.PaymentTerms)))
            {
                cbTerms.Items.Add(term);
            }
            cbTerms.SelectedIndex = 0;

            cbScope.Items.Clear();
            foreach (AirlineInsurance.InsuranceScope scope in Enum.GetValues(typeof(AirlineInsurance.InsuranceScope)))
            {
                cbScope.Items.Add(scope);
            }
            cbScope.SelectedIndex = 0;

            cbAmount.Items.Clear();
            for (int i = 500000; i < 1000000000; i += 500000)
            {
                cbAmount.Items.Add(GeneralHelpers.GetInflationPrice(i));
            }
            cbAmount.SelectedIndex = 0;

            cbAllAirliners.IsChecked = false;
            cbAllAirliners.Click    += new RoutedEventHandler(cbAllAirliners_onClick);
            ucLength.Value           = 1;

            lbInsurances.ItemsSource = null;
            lbInsurances.ItemsSource = this.Airline.InsurancePolicies;
        }
Esempio n. 12
0
        //returns the price for a gate at a bough terminal
        public long getTerminalGatePrice()
        {
            long price = 75000 * ((int)this.Profile.Size + 1);

            return(Convert.ToInt64(GeneralHelpers.GetInflationPrice(price)));
        }
Esempio n. 13
0
        //returns the fee for landing at the airport
        public double getLandingFee()
        {
            long sizeValue = 151 * ((int)this.Profile.Size + 1);

            return(GeneralHelpers.GetInflationPrice(sizeValue));
        }
Esempio n. 14
0
        //returns the price for a gate
        public long getGatePrice()
        {
            long sizeValue = 100 + 102 * ((int)this.Profile.Size + 1);

            return(Convert.ToInt64(GeneralHelpers.GetInflationPrice(sizeValue)));
        }
        private void btnAircraft_Click(object sender, RoutedEventArgs e)
        {
            ComboBox cbAircraft = new ComboBox();

            cbAircraft.SetResourceReference(ComboBox.StyleProperty, "ComboBoxTransparentStyle");
            cbAircraft.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            cbAircraft.ItemTemplate        = this.Resources["TrainingAircraftTypeItem"] as DataTemplate;
            cbAircraft.Width = 300;

            foreach (TrainingAircraftType type in TrainingAircraftTypes.GetAircraftTypes().FindAll(t => GeneralHelpers.GetInflationPrice(t.Price) < GameObject.GetInstance().HumanAirline.Money))
            {
                cbAircraft.Items.Add(type);
            }

            cbAircraft.SelectedIndex = 0;

            if (PopUpSingleElement.ShowPopUp(Translator.GetInstance().GetString("PanelFlightSchool", "1005"), cbAircraft) == PopUpSingleElement.ButtonSelected.OK && cbAircraft.SelectedItem != null)
            {
                TrainingAircraftType aircraft = (TrainingAircraftType)cbAircraft.SelectedItem;
                double price = aircraft.Price;

                this.FlightSchool.addTrainingAircraft(new TrainingAircraft(aircraft, GameObject.GetInstance().GameTime, this.FlightSchool));

                AirlineHelpers.AddAirlineInvoice(GameObject.GetInstance().HumanAirline, GameObject.GetInstance().GameTime, Invoice.InvoiceType.Airline_Expenses, -price);

                txtTrainingAircrafts.Text = this.FlightSchool.TrainingAircrafts.Count.ToString();

                showTrainingAircrafts();

                int studentsCapacity = Math.Min(this.FlightSchool.Instructors.Count * FlightSchool.MaxNumberOfStudentsPerInstructor, this.FlightSchool.TrainingAircrafts.Sum(f => f.Type.MaxNumberOfStudents));

                btnHire.IsEnabled = studentsCapacity > this.FlightSchool.Students.Count && GameObject.GetInstance().HumanAirline.Money > GeneralHelpers.GetInflationPrice(PilotStudent.StudentCost);
            }
        }
Esempio n. 16
0
        private void btnHire_Click(object sender, RoutedEventArgs e)
        {
            var aircraftsTypesFree = this.FlightSchool.Aircrafts.Select(a => a.Type);

            Dictionary <TrainingAircraftType, int> types = this.FlightSchool.Aircrafts.GroupBy(a => a.Type).
                                                           Select(group =>
                                                                  new
            {
                Type  = group.Key,
                Count = group.Sum(g => g.Type.MaxNumberOfStudents)
            }).ToDictionary(g => g.Type, g => g.Count);;


            foreach (PilotStudent student in this.FlightSchool.Students)
            {
                var firstAircraft = student.Rating.Aircrafts.OrderBy(a => a.TypeLevel).FirstOrDefault(a => types.ContainsKey(a) && types[a] > 0);

                if (firstAircraft != null && types.ContainsKey(firstAircraft))
                {
                    types[firstAircraft]--;
                }
            }

            List <PilotRating> possibleRatings = new List <PilotRating>();

            foreach (PilotRating rating in PilotRatings.GetRatings())
            {
                if (rating.Aircrafts.Exists(a => types.ContainsKey(a) && types[a] > 0))
                {
                    possibleRatings.Add(rating);
                }
            }

            WPFMessageBoxResult result = WPFMessageBox.Show(Translator.GetInstance().GetString("MessageBox", "2811"), string.Format(Translator.GetInstance().GetString("MessageBox", "2811", "message")), WPFMessageBoxButtons.YesNo);

            if (result == WPFMessageBoxResult.Yes)
            {
                List <Town> towns = Towns.GetTowns(this.FlightSchool.FlightSchool.Airport.Profile.Country);

                Town         town      = towns[rnd.Next(towns.Count)];
                DateTime     birthdate = MathHelpers.GetRandomDate(GameObject.GetInstance().GameTime.AddYears(-35), GameObject.GetInstance().GameTime.AddYears(-23));
                PilotProfile profile   = new PilotProfile(Names.GetInstance().getRandomFirstName(town.Country), Names.GetInstance().getRandomLastName(town.Country), birthdate, town);

                Instructor instructor     = (Instructor)cbInstructor.SelectedItem;
                string     airlinerFamily = cbTrainAircraft.SelectedItem.ToString();

                PilotStudent student = new PilotStudent(profile, GameObject.GetInstance().GameTime, instructor, GeneralHelpers.GetPilotStudentRating(instructor, possibleRatings), airlinerFamily);

                TrainingAircraft aircraft = getStudentAircraft(student);

                student.Aircraft = aircraft;

                this.FlightSchool.addStudent(student);
                instructor.addStudent(student);

                setHireStudentsStatus();

                double studentPrice = GeneralHelpers.GetInflationPrice(PilotStudent.StudentCost);

                AirlineHelpers.AddAirlineInvoice(GameObject.GetInstance().HumanAirline, GameObject.GetInstance().GameTime, Invoice.InvoiceType.Airline_Expenses, -studentPrice);
            }
        }
Esempio n. 17
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            long price = System.Convert.ToInt64(value);

            return(GeneralHelpers.GetInflationPrice(price));
        }
Esempio n. 18
0
        private void btnBuyAircraft_Click(object sender, RoutedEventArgs e)
        {
            ComboBox cbAircraft = new ComboBox();

            cbAircraft.SetResourceReference(ComboBox.StyleProperty, "ComboBoxTransparentStyle");
            cbAircraft.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            cbAircraft.ItemTemplate        = this.Resources["TrainingAircraftTypeItem"] as DataTemplate;
            cbAircraft.Width = 300;

            foreach (TrainingAircraftType type in TrainingAircraftTypes.GetAircraftTypes().FindAll(t => GeneralHelpers.GetInflationPrice(t.Price) < GameObject.GetInstance().HumanAirline.Money))
            {
                cbAircraft.Items.Add(type);
            }

            cbAircraft.SelectedIndex = 0;

            if (PopUpSingleElement.ShowPopUp(Translator.GetInstance().GetString("PageShowFlightSchool", "1014"), cbAircraft) == PopUpSingleElement.ButtonSelected.OK && cbAircraft.SelectedItem != null)
            {
                TrainingAircraftType aircraft = (TrainingAircraftType)cbAircraft.SelectedItem;
                double price = aircraft.Price;

                this.FlightSchool.addTrainingAircraft(new TrainingAircraft(aircraft, GameObject.GetInstance().GameTime, this.FlightSchool.FlightSchool));

                AirlineHelpers.AddAirlineInvoice(GameObject.GetInstance().HumanAirline, GameObject.GetInstance().GameTime, Invoice.InvoiceType.Airline_Expenses, -price);

                setHireStudentsStatus();
            }
        }
        //creates the buttons panel
        private WrapPanel createButtonsPanel()
        {
            int studentsCapacity = Math.Min(this.FlightSchool.Instructors.Count * FlightSchool.MaxNumberOfStudentsPerInstructor, this.FlightSchool.TrainingAircrafts.Sum(f => f.Type.MaxNumberOfStudents));

            WrapPanel buttonsPanel = new WrapPanel();

            buttonsPanel.Margin = new Thickness(0, 5, 0, 0);

            btnHire     = new Button();
            btnHire.Uid = "200";
            btnHire.SetResourceReference(Button.StyleProperty, "RoundedButton");
            btnHire.Height  = Double.NaN;
            btnHire.Width   = Double.NaN;
            btnHire.Content = Translator.GetInstance().GetString("PanelFlightSchool", btnHire.Uid);
            btnHire.SetResourceReference(Button.BackgroundProperty, "ButtonBrush");
            btnHire.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            btnHire.Click    += new RoutedEventHandler(btnHire_Click);
            btnHire.IsEnabled = studentsCapacity > this.FlightSchool.Students.Count && GameObject.GetInstance().HumanAirline.Money > GeneralHelpers.GetInflationPrice(PilotStudent.StudentCost);

            buttonsPanel.Children.Add(btnHire);

            Button btnAircraft = new Button();

            btnAircraft.Uid = "201";
            btnAircraft.SetResourceReference(Button.StyleProperty, "RoundedButton");
            btnAircraft.Height  = Double.NaN;
            btnAircraft.Width   = Double.NaN;
            btnAircraft.Content = Translator.GetInstance().GetString("PanelFlightSchool", btnAircraft.Uid);
            btnAircraft.SetResourceReference(Button.BackgroundProperty, "ButtonBrush");
            btnAircraft.Margin = new Thickness(5, 0, 0, 0);
            btnAircraft.Click += btnAircraft_Click;

            buttonsPanel.Children.Add(btnAircraft);


            return(buttonsPanel);
        }
 //returns the termination fee for the contract
 public double getTerminationFee()
 {
     return(GeneralHelpers.GetInflationPrice(this.Length * 1000000));
 }