Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["_game"] == null)
            {
                //_game = new Game();
                //Session["_game"] = _game;

                _game = new Game();
                _questionsFileXML = Server.MapPath("/App_Data/333.xml");
                _game.StartGame(_questionsFileXML);
                HttpContext.Current.Session["_game"] = _game;
                btnA1.Enabled = true;
                btnA2.Enabled = true;
                btnA3.Enabled = true;
                btnA4.Enabled = true;
                btnAksHall.Enabled = true;
                btnAskFriend.Enabled = true;
                btnFifty.Enabled = true;
                InitQuestion();
                ucWiningSum._game = this._game;

                Session["_game"] = _game;
            }
            else
            {
                _game = (Game)Session["_game"];
            }
        }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _game = (Game)Session["_game"];
     lbl_Name.Text = Game.Name + "! ";
     lbl_result.Text = String.Format(_game.OwnMoney().ToString() + "$");
 }