private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (MessageBox.Show("Bạn có chắc chắn muốn thoát?", "Thông báo!!!", MessageBoxButtons.OKCancel) != System.Windows.Forms.DialogResult.OK) { e.Cancel = true; return; } dictionary.Serialize(); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (MessageBox.Show("Do you want to exit?", "Notifycation", MessageBoxButtons.OKCancel) != DialogResult.OK) { e.Cancel = true; return; } dictionary.Serialize(); }
private void FormDictionary_FormClosing(object sender, FormClosingEventArgs e) { if (MessageBox.Show("Bạn có chắc chắn muốn thoát?", "Thông báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK) { e.Cancel = true; return; } dictionaryManager.Serialize(); }