private void newToolStripMenuItem_Click(object sender, EventArgs e) { frmNewFile frm = new frmNewFile(this); frm.ShowDialog(this); frm.Dispose(); }
private void btnNewFile_Click(object sender, EventArgs e) { using (var frm = new frmNewFile()) { if (frm.ShowDialog(this) == DialogResult.OK) { createFile(Program.LoadedFiles.Last()); } } }