public void LoadFile(string filename) { CodeEditingForm frm = new CodeEditingForm(""); frm.LoadFile(filename); AddForm(frm); createdADocument = true; }
void OpenToolStripMenuItem1Click(object sender, EventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); dlg.Filter = "L# Scripts (*.ls)|*.ls|All Files (*.*)|*.*"; if (dlg.ShowDialog() == DialogResult.OK) { CodeEditingForm frm = new CodeEditingForm(""); frm.LoadFile(dlg.FileName); AddForm(frm); } }