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(); } }
}//клик мыши 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(); } }//конец игры