Exemplo n.º 1
0
 public menuForm()
 {
     InitializeComponent();
     this.newAirplaneForm        = new newAirplaneForm();
     this.editAirplaneForm       = new editAirplaneForm();
     this.controllerAirplaneForm = new controllerAirplaneForm();
     this.statsForm = new statsForm();
 }
Exemplo 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);
     }
 }
Exemplo 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.");
     }
 }