Exemple #1
0
        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);
                }
            }
        }
Exemple #2
0
 private void SaveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FilesHandler.SaveFile(this);
 }
Exemple #3
0
 private void OpenToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FilesHandler.OpenFile(this);
 }