Ejemplo n.º 1
0
        private void addPlayer_Click(object sender, RoutedEventArgs e)
        {
            NewPlayer ply = new NewPlayer();

            ply.Owner = this.Owner;
            ply.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner;
            ply.ShowDialog();
            this.players.Add(ply.player);
            this.player.SelectedItem = ply.player;
        }
 private void button3_Click(object sender, EventArgs e)
 {
     using (NewPlayer np = new NewPlayer())
     {
         if (np.ShowDialog() == DialogResult.OK)
         {
             _playerName = np.PlayerName;
             MessageBox.Show($"Welcome {_playerName}!");
         }
     }
 }