private void btnAddCooperation_Click(object sender, RoutedEventArgs e)
        {
            object o = PopUpAddCooperation.ShowPopUp(GameObject.GetInstance().HumanAirline, this.Airport.Airport);

            if (o != null && o is CooperationType)
            {
                CooperationType type = (CooperationType)o;

                if (type.Price < GameObject.GetInstance().HumanAirline.Money)
                {

                    Cooperation cooperation = new Cooperation(type, GameObject.GetInstance().HumanAirline, GameObject.GetInstance().GameTime);

                    this.Airport.addCooperation(cooperation);
                }
                else
                    WPFMessageBox.Show(Translator.GetInstance().GetString("MessageBox", "2232"), string.Format(Translator.GetInstance().GetString("MessageBox", "2232", "message")), WPFMessageBoxButtons.Ok);
            }
        }
Example #2
0
 //removes a cooperation from the airport
 public void removeCooperation(Cooperation cooperation)
 {
     this.Cooperations.Remove(cooperation);
 }
Example #3
0
 //adds a cooperation to the airport
 public void addCooperation(Cooperation cooperation)
 {
     this.Cooperations.Add(cooperation);
 }
Example #4
0
 public CooperationMVVM(Airport airport, Cooperation cooperation)
 {
     this.Airport = airport;
     this.Cooperation = cooperation;
 }
Example #5
0
 //removes a cooperation from the airport
 public void removeCooperation(Cooperation cooperation)
 {
     this.Cooperations.Remove(cooperation);
     this.Airport.removeCooperation(cooperation);
 }
Example #6
0
        //adds a cooperation to the airport
        public void addCooperation(Cooperation cooperation)
        {
            this.Cooperations.Add(cooperation);
            this.Airport.addCooperation(cooperation);

            AirlineHelpers.AddAirlineInvoice(cooperation.Airline, cooperation.BuiltDate, Invoice.InvoiceType.Purchases, -cooperation.Type.Price);
        }