Ejemplo n.º 1
0
    protected void SubmitScoreButton_Click(object sender, EventArgs e)
    {
        try
        {
            RollDiceManager.SendResult();

            GamePlaceHolder.Visible           = false;
            EnterTheGamePlaceHolder.Visible   = true;
            CurrentResultsPlaceHolder.Visible = true;
            IsLotteryRunning = false;

            CurrentResultsGridView.DataBind();

            if (RollDiceManager.Score == 0)
            {
                ErrorMessagePanel.Visible = true;
                ErrorMessage.Text         = U6010.RESULTNOTRECORDER;
            }
            else
            {
                SuccMessagePanel.Visible = true;
                SuccMessage.Text         = U6010.RESULTRECORDER;
            }
        }
        catch (MsgException ex)
        {
            ErrorMessagePanel.Visible = true;
            ErrorMessage.Text         = ex.Message;
        }
    }
Ejemplo n.º 2
0
 protected void RollDiceButton_Click(object sender, EventArgs e)
 {
     CheckTime();
     if (RollDiceManager.IsActive)
     {
         RollDiceManager.Roll();
         UpdateRollControls();
     }
 }
Ejemplo n.º 3
0
 private void CheckTime()
 {
     if (!RollDiceManager.IsActive)
     {
         RollDiceButton.Visible = false;
         DiceTimer.Tick        -= DiceTimer_Tick;
     }
     else
     {
         RollDiceManager.CheckTime();
         TimeLiteral.Text = string.Format("{0}: {1}", U4200.TIMELEFT, (RollDiceLotteryManager.GetGameTime - RollDiceManager.Time).ToString());
     }
 }