コード例 #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}!";
     }
 }
コード例 #2
0
ファイル: YouWonForm.cs プロジェクト: tubashark/RouletteNeo
 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();
     }
 }