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; } }
protected void RollDiceButton_Click(object sender, EventArgs e) { CheckTime(); if (RollDiceManager.IsActive) { RollDiceManager.Roll(); UpdateRollControls(); } }
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()); } }