Example #1
0
File: App.xaml.cs Project: bdr27/c-
 private void HandleNameMenuItem(object sender, RoutedEventArgs e)
 {
     NameInformationWindow dialog = new NameInformationWindow();
     dialog.Owner = mainWindow;
     dialog.ShowDialog();
     playerName = dialog.GetName();
     mainWindow.GameStatus.Text = "Status: Ready player 1";
 }
Example #2
0
File: App.xaml.cs Project: bdr27/c-
 private void HandleNameMenuItem(object sender, RoutedEventArgs e)
 {
     NameInformationWindow dialog = new NameInformationWindow();
     setNameInformationDialogOwner(dialog);
     dialog.ShowDialog();
     getPlayerNames(dialog);
     changeState();
     updateNameMenu(); 
     updateGameState();                       
 }
Example #3
0
File: App.xaml.cs Project: bdr27/c-
 private void getPlayerNames(NameInformationWindow dialog)
 {
     if (state == State.WAIT_PLAYER1_NAME)
     {
         player1Name = dialog.GetName();
     }
     else if (state == State.WAIT_PLAYER2_NAME)
     {
         player2Name = dialog.GetName();
     }
 }
Example #4
0
File: App.xaml.cs Project: bdr27/c-
 private void setNameInformationDialogOwner(NameInformationWindow dialog)
 {
     if (state == State.WAIT_PLAYER1_NAME)
     {
         dialog.Owner = player1Window;
     }
     else if(state == State.WAIT_PLAYER2_NAME)
     {
         dialog.Owner = player2Window;
     }
 }