private void HandleIPAddressMenuItemForPlayer2(object sender, RoutedEventArgs e) { NetworkInformationWindow dialog = new NetworkInformationWindow(); dialog.Owner = player2Window; dialog.ShowDialog(); networkIPAddress = dialog.GetIPAddress(); handler.ConnectTo(networkIPAddress, 50000); }
private void HandleIPAddressMenuItem(object sender, RoutedEventArgs e) { NetworkInformationWindow dialog = new NetworkInformationWindow(); dialog.Owner = player1Window; dialog.ShowDialog(); networkIPAddress = dialog.GetIPAddress(); System.Diagnostics.Debug.WriteLine("Address is: " + networkIPAddress); if(networkIPAddress.Equals("127.0.0.1") && !player2Display) { player2Display = true; player2Window = new MainWindow(); player2Window.Title = "Player 2 Window"; wireHandlers(player2Window); player2Window.Show(); } }
public App() : base() { player1Window = new MainWindow(); player2Window = new MainWindow(); player1Window.Title = "Player 1 Window"; player2Window.Title = "Player 2 Window"; player1Window.Show(); NetworkInformationWindow dialog = new NetworkInformationWindow(); dialog.Owner = player1Window; dialog.ShowDialog(); player2Window.Show(); NetworkInformationWindow dialog2 = new NetworkInformationWindow(); dialog2.Owner = player2Window; dialog2.ShowDialog(); }