public void LoadFile(string filename) { CodeEditingForm frm = new CodeEditingForm(""); frm.LoadFile(filename); AddForm(frm); createdADocument = true; }
void NewToolStripMenuItem1Click(object sender, EventArgs e) { CodeEditingForm frm1 = new CodeEditingForm("LSharp Script " + documentcount + ".ls"); frm1.TabText = "LSharp Script " + documentcount + ".ls"; documentcount++; AddForm(frm1); }
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); } }
void NewToolStripMenuItem1Click(object sender, EventArgs e) { if (System.IO.File.Exists(LSharp.Studio.Core.Properties.Settings.Default.DefaultSaveLocation + "\\LSharp Script " + documentcount + ".ls")) { LoadFile(LSharp.Studio.Core.Properties.Settings.Default.DefaultSaveLocation + "\\LSharp Script " + documentcount + ".ls"); documentcount++; return; } CodeEditingForm frm1 = new CodeEditingForm("LSharp Script " + documentcount + ".ls"); frm1.TabText = "LSharp Script " + documentcount + ".ls"; documentcount++; AddForm(frm1); }