private void btnOK_Click(object sender, EventArgs e) { playerName = txtYourName.Text; BuyInAmount = (int)nudBuyIn.Value; if (rbEasy.Checked) { difficulty = 0; } else if (rbMedium.Checked) { difficulty = 1; } else { difficulty = 2; } if (playerName == null || playerAmount < 2) { MessageBox.Show("Please choose game options before beginning."); return; } this.Hide(); FormPoker FormPoker = new FormPoker(playerName, BuyInAmount, playerAmount, difficulty, user); FormPoker.ShowDialog(); }
private void btnOK_Click(object sender, EventArgs e) { playerName = txtYourName.Text; BuyInAmount = (int)nudBuyIn.Value; if (rbEasy.Checked) difficulty = 0; else if (rbMedium.Checked) difficulty = 1; else difficulty = 2; if (playerName == null || playerAmount < 2) { MessageBox.Show("Please choose game options before beginning."); return; } this.Hide(); FormPoker FormPoker = new FormPoker(playerName, BuyInAmount, playerAmount, difficulty, user); FormPoker.ShowDialog(); }