Esempio n. 1
0
 public menuForm()
 {
     InitializeComponent();
     this.newAirplaneForm        = new newAirplaneForm();
     this.editAirplaneForm       = new editAirplaneForm();
     this.controllerAirplaneForm = new controllerAirplaneForm();
     this.statsForm = new statsForm();
 }
Esempio n. 2
0
 private void button_switchGameRunning_Click(object sender, EventArgs e)
 {
     this.game.switchGameRunning();
     this.label_runningStatus.Text = this.game.getGameRunning() ? "ON" : "OFF";
     if (this.game.getGameRunning())
     {
         //if game is running, restart edit form
         this.editAirplaneForm.Dispose();
         this.editAirplaneForm = new editAirplaneForm(this.game);
     }
 }
Esempio n. 3
0
 private void button_editAirplanes_Click(object sender, EventArgs e)
 {
     this.label_runningStatus.Text = this.game.getGameRunning() ? "ON" : "OFF";
     if (!this.game.getGameRunning())
     {
         if (this.game.getMap().getAirplanes().Count == 0)
         {
             MessageBox.Show("No airplanes on the map.");
         }
         else
         {
             this.editAirplaneForm.Dispose();
             this.editAirplaneForm = new editAirplaneForm(this.game);
             this.editAirplaneForm.Show();
         }
     }
     else
     {
         MessageBox.Show("Impossible to edit airplanes while simulation is running.");
     }
 }