コード例 #1
0
 private void frmScores_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (btnAdd.Enabled)
     {
         HighScoreList.add(new HighScores(txtName.Text, curScore, coinsAdded, difficulty));
     }
     GTools.saveHighScores(GTools.saveFile);
 }
コード例 #2
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     HighScoreList.add(new HighScores(txtName.Text, curScore, coinsAdded, difficulty));
     txtName.Enabled = false;
     btnAdd.Enabled  = false;
     dgvInit();
     this.Close();
 }