Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ThisUser = FineUI.Examples.Lab.Modules.User.FindUser(Session["userID"].ToString());

            if (Session["Rebuild"] == null) //首次登录时为false
            {
                UserMoney.Text = "$" + ThisUser.UserMoney.ToString();
                SetGamble();
                AllMoney.Text      = "除了您,当前场上共有 $" + ThisGamble.GamblingMoney;
                DiceDiv.Visible    = false;
                Session["Rebuild"] = "0";
            }
            else
            {
                if (Session["Rebuild"].ToString() == "1")
                {
                    ThisGamble = new FineUI.Examples.Lab.Modules.Gamble();
                    SetGamble();
                    UserMoney.Text     = "$" + ThisUser.UserMoney.ToString();
                    AllMoney.Text      = "除了您,当前场上共有 $" + ThisGamble.GamblingMoney;
                    DiceDiv.Visible    = false;
                    Session["Rebuild"] = "0";
                }
            }
        }
Exemple #2
0
        private void PushResult(FineUI.Examples.Lab.Modules.Gamble lastGamble)
        {
            for (int i = 0; i < lastGamble.Gamblers.Count - 1; i++)
            {
                Label money = (Label)FindControl("PlayerMoney" + (i + 1).ToString());

                money.Text = money.Text + "+ $" + lastGamble.Gamblers[i].Reward.ToString();
            }
            UserMoney.Text  = UserMoney.Text + " +$" + lastGamble.Gamblers[lastGamble.Gamblers.Count - 1].Reward;
            AllMoney.Text   = "开盘,本轮场上共有赌资 $" + LastRoundMoney;
            Dice.Text       = lastGamble.DiceResult.ToString();
            DiceDiv.Visible = true;
        }