public IViewContent LoadFile(string fileName) { var window = new WorkbenchWindow(); var view = new MainViewContent(fileName, window); WorkbenchSingleton.Workbench.ShowView(view); UpdateActiveView(view); files.Add(view); return view; }
public IViewContent LoadFile(string fileName) { // Create a new tab page. SharpSnippetCompilerControl snippetControl = new SharpSnippetCompilerControl(); snippetControl.Dock = DockStyle.Fill; SnippetTabPage tabPage = new SnippetTabPage(snippetControl); tabPage.Text = Path.GetFileName(fileName); fileTabControl.TabPages.Add(tabPage); // Load file snippetControl.LoadFile(fileName); snippetControl.Focus(); WorkbenchWindow window = new WorkbenchWindow(fileTabControl, tabPage); MainViewContent view = new MainViewContent(fileName, snippetControl, window); WorkbenchSingleton.Workbench.ShowView(view); UpdateActiveView(view); return view; }