public void loadfile(string name) { EditorWindow ew = new EditorWindow(name,solution); string data = solution.loadfile(name,ew); ew.EditorClosing += new EditorWindow.EditorClosingHandler(ew_Closing); ew.settext(data); ew.MdiParent = this; ew.DockPanel = this.dockPanel; ew.Show(); editors.Add(name, ew); }
public void loadfile(string name) { EditorWindow ew = new EditorWindow(name, solution); string data = solution.loadfile(name, ew); ew.EditorClosing += new EditorWindow.EditorClosingHandler(ew_Closing); ew.settext(data); ew.MdiParent = this; ew.DockPanel = this.dockPanel; ew.Show(); editors.Add(name, ew); }
void m_solutionExplorer_SelectedFile(object sender, SelectedFileEventArgs e) { //FIXME better document tracking required, //if you undock the document its not in dockPanel anymore foreach (IDockContent d in dockPanel.Documents) { //Only one solution supported at a time currently if (d.GetType() == typeof(SolutionSettings) && e.rootnode == true) { SolutionSettings ss = (SolutionSettings)d; ss.Show(); return; } if (d.GetType() == typeof(EditorWindow) && e.rootnode == false) { EditorWindow ew = (EditorWindow)d; if (ew.filename == e.name) { ew.Show(); return; } } } if (e.rootnode == true) { SolutionSettings ss2 = new SolutionSettings(solution); ss2.MdiParent = this; ss2.DockPanel = this.dockPanel; ss2.Show(); return; } else { loadfile(e.name); } }
private void newfile() { int index = 0; String filename = "New"; while (solution.isnameused(filename) == true) { index++; filename = string.Format("New {0}", index); } EditorWindow ew = new EditorWindow(filename, solution); ew.MdiParent = this; ew.DockPanel = this.dockPanel; ew.Show(); editors.Add(filename, ew); ew.EditorClosing += new EditorWindow.EditorClosingHandler(ew_Closing); solution.addfile(filename, false, ew); }
private void newfile() { int index = 0; String filename = "New"; while (solution.isnameused(filename) == true) { index++; filename = string.Format("New {0}", index); } EditorWindow ew = new EditorWindow(filename,solution); ew.MdiParent = this; ew.DockPanel = this.dockPanel; ew.Show(); editors.Add(filename,ew); ew.EditorClosing += new EditorWindow.EditorClosingHandler(ew_Closing); solution.addfile(filename,false,ew); }