private void TwoPigRadio_CheckedChanged(object sender, EventArgs e) { this.Hide(); Pig_with_Two_Dice_Form GameForm = new Pig_with_Two_Dice_Form(); GameForm.Closed += (s, args) => this.Close(); GameForm.Show(); }
/// <summary> /// Determine which Dice Game the user wants to play. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void radioButton_Click(object sender, EventArgs e) { if (singleDiePigRadioButton.Checked) { Pig_Game_Form pigGameForm = new Pig_Game_Form(); pigGameForm.Show(); } else if (twoDicePigRadioButton.Checked) { Pig_with_Two_Dice_Form pigWithTwoDiceForm = new Pig_with_Two_Dice_Form(); pigWithTwoDiceForm.Show(); } }