Exemple #1
0
        // Set up the UI for a new game
        private void SetUpNewGame()
        {
            Lbl_p1_name.Show();
            Lbl_p1_totalSum.Show();

            Lbl_p2_name.Show();
            Lbl_p2_totalSum.Show();

            Lbl_p3_name.Show();
            Lbl_p3_totalSum.Show();

            Btn_stand.Enabled  = false;
            Btn_hit.Enabled    = false;
            Btn_double.Enabled = false;

            Btn_deal.Enabled  = true;
            Btn_clear.Enabled = true;

            Btn_10.Enabled  = true;
            Btn_25.Enabled  = true;
            Btn_50.Enabled  = true;
            Btn_100.Enabled = true;

            UpdateBalanceAndBetValue();
        }
Exemple #2
0
        // Set the "My Account" value in the UI
        public void UpdateBalanceAndBetValue()
        {
            // Update the "My Account" value
            Tb_myBet.Text = "$" + (refPlayer != null ? refPlayer.Bet.ToString() : "0");

            Lbl_p1_totalSum.Show();
            Lbl_p1_totalSum.Text = game.Players[0] != null ? "$" + game.Players[0].Balance.ToString() : "";

            Lbl_p2_totalSum.Show();
            Lbl_p2_totalSum.Text = game.Players[1] != null ? "$" + game.Players[1].Balance.ToString() : "";

            Lbl_p3_totalSum.Show();
            Lbl_p3_totalSum.Text = game.Players[2] != null ? "$" + game.Players[2].Balance.ToString() : "";
        }
Exemple #3
0
        public void InitializeUI()
        {
            Tb_status.Hide();

            Lbl_dealer_status.Hide();
            Lbl_dealer_cardsSum.Hide();

            Lbl_p1_name.Hide();
            Lbl_p1_totalSum.Hide();
            Lbl_p1_status.Hide();
            Lbl_p1_cardsSum.Hide();

            Lbl_p2_name.Hide();
            Lbl_p2_totalSum.Hide();
            Lbl_p2_status.Hide();
            Lbl_p2_cardsSum.Hide();

            Lbl_p3_name.Hide();
            Lbl_p3_totalSum.Hide();
            Lbl_p3_status.Hide();
            Lbl_p3_cardsSum.Hide();
        }