Exemplo n.º 1
0
Arquivo: App.xaml.cs Projeto: 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";
 }
Exemplo n.º 2
0
Arquivo: App.xaml.cs Projeto: bdr27/c-
 private void HandleNameMenuItem(object sender, RoutedEventArgs e)
 {
     NameInformationWindow dialog = new NameInformationWindow();
     setNameInformationDialogOwner(dialog);
     dialog.ShowDialog();
     getPlayerNames(dialog);
     changeState();
     updateNameMenu(); 
     updateGameState();                       
 }
Exemplo n.º 3
0
Arquivo: App.xaml.cs Projeto: 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();
     }
 }
Exemplo n.º 4
0
Arquivo: App.xaml.cs Projeto: 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;
     }
 }