private void newToolStripMenuItem_Click(object sender, EventArgs e) { EditorForm newFormEditor = new EditorForm(); newFormEditor.FormClosed += (o, args) => { disableSaveButtons(); }; newFormEditor.Text = ""; newFormEditor.MdiParent = this; newFormEditor.Show(); enableSaveButtons(); }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { if(openFileDialog.ShowDialog() == DialogResult.OK) { string path = openFileDialog.FileName; string fileName = openFileDialog.SafeFileName; EditorForm editor = new EditorForm(); editor.FormClosed += (o, args) => { disableSaveButtons(); }; editor.Text = fileName; editor.MdiParent = this; editor.Open(path); editor.Size = new Size(200, 200); editor.Show(); enableSaveButtons(); } }