コード例 #1
0
        private void button5_Click(object sender, EventArgs e)
        {
            this.Hide();
            Highscoremenu highscoremenu = new Highscoremenu();

            highscoremenu.Show();
        }
コード例 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //Writing To Notepad File From Users Name In Highscore & Then Jumps Form
            StreamWriter scoreTextfile;

            if (!File.Exists("highscorefile.txt"))
            {
                scoreTextfile = new StreamWriter("highscorefile.txt");
            }
            else
            {
                scoreTextfile = File.AppendText("highscorefile.txt");
            }
            scoreTextfile.WriteLine(score + " " + highscoreName + " " + " " + DateTime.Now);
            scoreTextfile.Close();
            this.Hide();
            Highscoremenu highscoremenu = new Highscoremenu();

            highscoremenu.Show();
        }