Exemplo n.º 1
0
        private void MenuItem_NewGame_OnClick(object sender, RoutedEventArgs e)
        {
            StartNewGame newGame = new StartNewGame();
            newGame.Owner = this;
            newGame.WindowStartupLocation = WindowStartupLocation.CenterOwner;

            newGame.ShowDialog();

            if(newGame.DialogResult.HasValue && newGame.DialogResult.Value)
            {
                _playerSession.SetPlayer(newGame.NewPlayer);
            }
        }
Exemplo n.º 2
0
        private void MenuItem_NewGame_OnClick(object sender, RoutedEventArgs e)
        {
            StartNewGame newGame = new StartNewGame();

            newGame.Owner = this;
            newGame.WindowStartupLocation = WindowStartupLocation.CenterOwner;

            newGame.ShowDialog();

            if (newGame.DialogResult.HasValue && newGame.DialogResult.Value)
            {
                _playerSession.SetPlayer(newGame.NewPlayer);
            }
        }