private void GridForm_FormClosing(object sender, FormClosingEventArgs e) { if (IsGridChanged) { DialogResult closeSaveResult = MessageBox.Show("Do you want to save last changes?", "Save File", MessageBoxButtons.YesNoCancel); if (closeSaveResult == DialogResult.Cancel) { e.Cancel = true; } else if (closeSaveResult == DialogResult.Yes) { FilesHandler.SaveFile(this); } } }
private void SaveToolStripMenuItem_Click(object sender, EventArgs e) { FilesHandler.SaveFile(this); }
private void OpenToolStripMenuItem_Click(object sender, EventArgs e) { FilesHandler.OpenFile(this); }