コード例 #1
0
        }//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
コード例 #2
0
ファイル: MainGameForm.cs プロジェクト: tay1392/Backgammon
 private void DiceTimer_Tick(object sender, EventArgs e)
 {
     DiceTimer.Stop();
     Game.Roll();
 }