Exemplo n.º 1
0
 //                  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}!";
     }
 }
Exemplo n.º 2
0
 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();
     }
 }