// opens the CreatePlayerForm and adds new player to the combobox private void mainCreatePlayerButton_Click(object sender, EventArgs e) { CreatePlayerForm frm = new CreatePlayerForm(); frm.ShowDialog(); if (frm.Response == "ok") { players.Add(frm.NewPlayer); updateBinding(); } }
// pulls create player form up and will update current MainForm with the newly created player private void createPlayerToolStripMenuItem_Click(object sender, EventArgs e) { CreatePlayerForm frm = new CreatePlayerForm(); frm.ShowDialog(); if (frm.Response == "ok") { currentPlayer = frm.NewPlayer; playerNameLabel.Text = currentPlayer.PlayerName; rounds.Clear(); updateBinding(); } }