// CONTROLS EVENT HANDLERS private void RouletteSessionForm_Load(object sender, EventArgs e) { if (CurrentUser.Won == true && CurrentUser.BoughtSub == false) { BuySubForm newBuySub = new BuySubForm(CurrentUser, this); this.Hide(); newBuySub.ShowDialog(); this.Close(); } else { welcomeUserLabel.Text = $"Welcome {CurrentUser.Username}!"; } }
private void playAgainButton_Click(object sender, EventArgs e) { if (CurrentUser.BoughtSub == false) { BuySubForm buySub = new BuySubForm(CurrentUser, rouletteSessionForm); this.Hide(); rouletteSessionForm.Close(); buySub.ShowDialog(); this.Close(); } else { IRouletteSession newRouletteSession = new RouletteSessionForm(CurrentUser); this.Hide(); rouletteSessionForm.Close(); newRouletteSession.ShowDialog(); this.Close(); } }