public override IMyGenDocument Open(IMyGenerationMDI mdi, FileInfo file, params string[] args) { ProjectBrowser edit = null; if (file.Exists) { bool isopen = mdi.IsDocumentOpen(file.FullName); if (!isopen) { edit = new ProjectBrowser(mdi); edit.LoadProject(file.FullName); } else { edit = mdi.FindDocument(file.FullName) as ProjectBrowser; if (edit != null) { edit.Activate(); } } } return edit; }
public override IMyGenDocument Open(IMyGenerationMDI mdi, FileInfo file, params string[] args) { ProjectBrowser edit = null; if (file.Exists) { bool isopen = mdi.IsDocumentOpen(file.FullName); if (!isopen) { edit = new ProjectBrowser(mdi); edit.LoadProject(file.FullName); } else { edit = mdi.FindDocument(file.FullName) as ProjectBrowser; if (edit != null) { edit.Activate(); } } } return(edit); }
private ProjectBrowser OpenProjectEditor(string filename) { ProjectBrowser proj = null; bool isopen = IsProjectOpen(filename); if (!isopen) { proj = new ProjectBrowser(this); proj.LoadProject(filename); proj.Show(dockManager); } return proj; }