protected bool IsGameRunning()
        {
            if (!_isGameRunning.HasValue)
            {
                _isGameRunning = !GamePropertyService.IsGameStopped();
            }

            return(_isGameRunning.Value);
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Admin.Visible = HttpContext.Current.User.IsInRole("admin");

            if (GamePropertyService.IsGameStopped())
            {
                lblRemaining.Text = string.Empty;
            }
            else
            {
                lblRemaining.Text = GetRemainingTimeLabel();
            }

            stopGameLabel.Text = ShowGameStatus();

            if (!Page.IsPostBack)
            {
                LoginView1.DataBind();
            }

            SetControlsVisibility();
        }