private void Application_Startup(object sender, StartupEventArgs e) { this.myClient = new MyClient(); this.flightGearModel = new FlightGearModel(myClient); mainVM = new MainViewModel(flightGearModel); mainWindow = new MainWindow(); loginWindow = new LoginWindow(); windowsController = new WindowsController(); loginWindow.Show(); loginWindow.connection_error.DataContext = windowsController; }
public void Application_New() { this.myClient = new MyClient(); this.flightGearModel = new FlightGearModel(myClient); mainVM = new MainViewModel(flightGearModel); mainWindow.Close(); mainWindow = new MainWindow(); loginWindow.Close(); loginWindow = new LoginWindow(); windowsController = new WindowsController(); loginWindow.Show(); }