}//end UpdatePictureBoxes

        /// <summary>
        /// increments counter, show rolling animation while counter is less than 11
        /// Stops timer, rolls dice and gets values, enables RollButton.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DiceTimer_Tick(object sender, EventArgs e)
        {
            counter++;

            if (counter < 11)
            {
                UpdatePictureBoxes();
            }
            else
            {
                DiceTimer.Stop();
                RollDice();
                RollButton.Enabled = true;
            }
        } //end DiceTimer
Example #2
0
 private void DiceTimer_Tick(object sender, EventArgs e)
 {
     DiceTimer.Stop();
     Game.Roll();
 }