public void OpenFile(string fileName, bool isShowProjFile = true) { FileInfo fi = new FileInfo(fileName); EditorDockForm cvf = FindEditorForm(fi); if (cvf != null) { cvf.Show(this.MainDockPanel); } else { cvf = newEditorDockForm(); cvf.OpenFile(fi); cvf.ParentDockPanel = this.MainDockPanel; cvf.Show(this.MainDockPanel); } if (fileName.EndsWith(ZDevCompiler.ZYYExt, StringComparison.InvariantCultureIgnoreCase)) { //this.procDock.ShowClass(fi); } else if (fileName.EndsWith(ZDevCompiler.ZXMExt, StringComparison.InvariantCultureIgnoreCase)) { this.procDock.ClearTree(); if (isShowProjFile) { //this.projDock.ShowClass(fi); } } }
void NewFile() { EditorDockForm cvf = new EditorDockForm(); cvf.NewFile(newIndex); cvf.ParentDockPanel = this.MainDockPanel; cvf.Editor.NewFile(); cvf.Show(this.MainDockPanel); newIndex++; }