示例#1
0
        private void HighScoreForm_VisibleChanged(object sender, EventArgs e)
        {
            if (this.Visible == true)
            {
                int[]    scores   = score.GetScores();
                string[] initials = score.GetInitials();
                lblIni1.Text = initials[0];
                lblIni2.Text = initials[1];
                lblIni3.Text = initials[2];
                lblIni4.Text = initials[3];
                lblIni5.Text = initials[4];

                lblScore1.Text = scores[0].ToString();
                lblScore2.Text = scores[1].ToString();
                lblScore3.Text = scores[2].ToString();
                lblScore4.Text = scores[3].ToString();
                lblScore5.Text = scores[4].ToString();

                timerCount = 0;
                RevealTimer.Start();
                ReturnTimer.Stop();
                CreditFlashTimer.Start();
                this.Focus();
            }
            else
            {
                HideScores();
                RevealTimer.Stop();
                ReturnTimer.Stop();
                CreditFlashTimer.Stop();
            }
        }
示例#2
0
 private void GameView_VisibleChanged(object sender, EventArgs e)
 {
     if (this.Visible == true)
     {
         ChangeTimer.Start();
         fpsTimer.Start();
         CreditFlashTimer.Start();
         lblHighScore.Text = scoreUtil.getTopScore().ToString();
         this.Focus();
     }
     else
     {
         ChangeTimer.Stop();
         fpsTimer.Stop();
         CreditFlashTimer.Stop();
     }
 }