Beispiel #1
0
 private void FlightSimulatorXView_CloseClicked(object sender, EventArgs e)
 {
     if (_FlightSimulatorXView != null)
     {
         _FlightSimulatorXView.CloseClicked -= FlightSimulatorXView_CloseClicked;
         _FlightSimulatorXView.Close();
         _FlightSimulatorXView.Dispose();
         _FlightSimulatorXView = null;
     }
 }
Beispiel #2
0
 private void menuFlightSimulatorXModeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (_FlightSimulatorXView != null)
     {
         _FlightSimulatorXView.Activate();
     }
     else
     {
         var webServer = Factory.Singleton.ResolveSingleton <IAutoConfigWebServer>().WebServer;
         _FlightSimulatorXView = new FlightSimulatorXView();
         _FlightSimulatorXView.CloseClicked += FlightSimulatorXView_CloseClicked;
         _FlightSimulatorXView.Initialise(null, _FlightSimulatorXAircraftList, webServer);
         _FlightSimulatorXView.Show();
     }
 }
 private void menuFlightSimulatorXModeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if(_FlightSimulatorXView != null) _FlightSimulatorXView.Activate();
     else {
         var webServer = Factory.Singleton.Resolve<IAutoConfigWebServer>().Singleton.WebServer;
         _FlightSimulatorXView = new FlightSimulatorXView();
         _FlightSimulatorXView.CloseClicked += FlightSimulatorXView_CloseClicked;
         _FlightSimulatorXView.Initialise(_BaseStationAircraftList, _FlightSimulatorXAircraftList, webServer);
         _FlightSimulatorXView.Show();
     }
 }
 private void FlightSimulatorXView_CloseClicked(object sender, EventArgs e)
 {
     if(_FlightSimulatorXView != null) {
         _FlightSimulatorXView.CloseClicked -= FlightSimulatorXView_CloseClicked;
         _FlightSimulatorXView.Close();
         _FlightSimulatorXView.Dispose();
         _FlightSimulatorXView = null;
     }
 }