예제 #1
0
 private void btnHighScore_Click(object sender, EventArgs e)
 {
     if (txtUserName.Text == "")
     {
         MessageBox.Show("Điền đầy đủ thông tin");
     }
     else
     {
         TextWriter txt = new StreamWriter(@"E:\highscore.txt");
         String     str = txtUserName.Text + "." + lblHighScore.Text + "\r\n";
         txt.Write(str);
         txt.Close();
         pnlSave.Visible = false;
         this.Close();
         RenewAll();
         var wd = new LoadGame();
         wd.Show();
     }
 }
예제 #2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (txtUserName.Text == "")
     {
         MessageBox.Show("Điền đầy đủ thông tin");
     }
     else
     {
         if (fifty == 1 && Audience == 0)
         {
             remberclick50 = 0;
         }
         TextWriter txt = new StreamWriter(@"E:\save.txt");
         String     str = txtUserName.Text + "." + lblHighScore.Text + "." + (stt + 1) + "." + fifty + "." + Helper
                          + "." + Audience + "." + remberclick50;
         txt.Write(str);
         txt.Close();
         pnlSave.Visible = false;
         this.Close();
         RenewAll();
         var wd = new LoadGame();
         wd.Show();
     }
 }