예제 #1
0
 private void buttonCancel_MouseClick(object sender, MouseEventArgs e)
 {
     if (!CheckRecord.CheckForm)
     {
         Menu mn = new Menu();
         mn.Show();
         Hide();
     }
     else
     {
         GameEnd gm = new GameEnd();
         gm.Show();
         Hide();
     }
 }
예제 #2
0
        }//клик мыши

        private void checkEnd()
        {
            if (pl.getCoordY() > this.ClientSize.Height)
            {
                if (Convert.ToInt32(scoresfile[scoresfile.Length - 1]) < scores)
                {
                    scoresfile[scoresfile.Length - 1] = Convert.ToString(scores);
                    CheckRecord.Scores = scores;
                    CheckRecord.Value  = true;
                }

                else
                {
                    CheckRecord.Value = false;
                }
                File.WriteAllLines(fileScores, scoresfile);
                timer1.Stop();
                GameEnd gm = new GameEnd();
                gm.Show();
                Hide();
            }
        }//конец игры