private void GoBackButton_Click(object sender, RoutedEventArgs e)
 {
     Window mainMenu = new MainMenu();
     App.Current.MainWindow = mainMenu;
     mainMenu.Show();
     this.Hide();
 }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     //SoundManager.stopSFX();
     Window mainMenu = new MainMenu();
     mainMenu.Show();
     App.Current.MainWindow = mainMenu;
     //Hide();
 }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     Window mainWindow = new MainMenu();
     App.Current.MainWindow = mainWindow;
     mainWindow.Show();
     if (networkUtil != null)
     {
         networkUtil.stop();
     }
     Message.IsOpen = false;
     this.Hide();
 }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     Window mainWindow = new MainMenu();
     App.Current.MainWindow = mainWindow;
     mainWindow.Show();
     if (networkUtil != null)
     {
         networkUtil.stop();
     }
     //this.Hide();
 }
Exemplo n.º 5
0
 private void PeerDisconnected(object sender, EventArgs e)
 {
     this.Dispatcher.BeginInvoke(new Action(delegate() {
         MessageWindow message = new MessageWindow("Disconnected");
         message.ShowDialog();
         Window mainWindow = new MainMenu();
         App.Current.MainWindow = mainWindow;
         mainWindow.Show();
         this.Hide();
         networkUtil.stop();
     }));
 }