private void btnBuildRunway_Click(object sender, RoutedEventArgs e) { Runway runway = (Runway)PopUpBuildRunway.ShowPopUp(this.Airport); if (runway != null) { double runwayPrice = AirportHelpers.GetAirportRunwayPrice(this.Airport, runway.Length); if (runwayPrice > GameObject.GetInstance().HumanAirline.Money) { WPFMessageBox.Show(Translator.GetInstance().GetString("MessageBox", "2219"), string.Format(Translator.GetInstance().GetString("MessageBox", "2219", "message"), this.Airport.Profile.Name, runwayPrice), WPFMessageBoxButtons.Ok); } else { WPFMessageBoxResult result = WPFMessageBox.Show(Translator.GetInstance().GetString("MessageBox", "2218"), string.Format(Translator.GetInstance().GetString("MessageBox", "2218", "message"), this.Airport.Profile.Name, runwayPrice), WPFMessageBoxButtons.YesNo); if (result == WPFMessageBoxResult.Yes) { this.Airport.Runways.Add(runway); AirlineHelpers.AddAirlineInvoice(GameObject.GetInstance().HumanAirline, GameObject.GetInstance().GameTime, Invoice.InvoiceType.Purchases, runwayPrice); showRunways(); } } } }