public SimpleWorkbenchWindow() { viewContents = new ViewContentCollection(this); OnTitleNameChanged(this, EventArgs.Empty); // this.TabPageContextMenuStrip = MenuService.CreateContextMenu(this, contextMenuPath); }
public virtual void ShowView(IViewContent content) { System.Diagnostics.Debug.Assert(layout != null); ViewContentCollection.Add(content); layout.ShowView(content); content.WorkbenchWindow.SelectWindow(); }
public virtual void CloseView(IViewContent content) { if (ViewContentCollection.Contains(content)) { ViewContentCollection.Remove(content); } content.Dispose(); content = null; }
public void ShowView(IViewContent content) { System.Diagnostics.Debug.Assert(_layout != null); ViewContentCollection.Add(content); _layout.ShowView(content); content.WorkbenchWindow.SelectWindow(); OnViewOpened(new ViewContentEventArgs(content)); }
public SdiWorkspaceWindow() { viewContents = new ViewContentCollection(this); this.DockAreas = DockAreas.Document; this.DockPadding.All = 2; OnTitleNameChanged(this, EventArgs.Empty); this.TabPageContextMenuStrip = MenuService.CreateContextMenu(this, contextMenuPath); }
public void CloseContent(IViewContent content) { if (ViewContentCollection.Contains(content)) { ViewContentCollection.Remove(content); } OnViewClosed(new ViewContentEventArgs(content)); content.Dispose(); content = null; }
public AvalonWorkbenchWindow(AvalonDockLayout dockLayout) { if (dockLayout == null) { throw new ArgumentNullException("dockLayout"); } CustomFocusManager.SetRememberFocusedChild(this, true); this.IsFloatingAllowed = true; this.dockLayout = dockLayout; viewContents = new ViewContentCollection(this); ResourceService.LanguageChanged += OnTabPageTextChanged; }
public void CloseContent(IViewContent content) { if (PropertyService.Get("SharpDevelop.LoadDocumentProperties", true) && content is IMementoCapable) { StoreMemento(content); } if (ViewContentCollection.Contains(content)) { ViewContentCollection.Remove(content); } OnViewClosed(new ViewContentEventArgs(content)); content.Dispose(); content = null; }
private void NewSolution(string solutionID, string solution) { FormContent form = new FormContent(); form.Solution = SolutionInstance.GetInstance().Solution; form.Solution.SolutionID = solutionID; form.Solution.SolutionName = solution; form.Text = solution + "*"; form.TabText = solution + "*"; form.Init(); form.Show(dockPanel); ViewContentCollection.Add(form); this.InitDockForm(); }
public void ShowView(IViewContent content, bool switchToOpenedView) { WorkbenchSingleton.AssertMainThread(); if (content == null) { throw new ArgumentNullException("content"); } if (ViewContentCollection.Contains(content)) { throw new ArgumentException("ViewContent was already shown"); } System.Diagnostics.Debug.Assert(WorkbenchLayout != null); LoadViewContentMemento(content); WorkbenchLayout.ShowView(content, switchToOpenedView); }
private void OpenSolution(string fileName) { if (File.Exists(fileName)) { FormContent form = new FormContent(); form.FileName = fileName; form.Init(); if (form.Controls.Count == 0) { MessageBox.Show("该文件可能是版本过旧,无法识别"); return; } form.Show(dockPanel); ViewContentCollection.Add(form); this.InitDockForm(); } }
public virtual void ShowView(IViewContent content) { System.Diagnostics.Debug.Assert(layout != null); ViewContentCollection.Add(content); if (PropertyService.Get("SharpDevelop.LoadDocumentProperties", true) && content is IMementoCapable) { try { Properties memento = GetStoredMemento(content); if (memento != null) { ((IMementoCapable)content).SetMemento(memento); } } catch (Exception e) { MessageService.ShowError(e, "Can't get/set memento"); } } layout.ShowView(content); content.WorkbenchWindow.SelectWindow(); OnViewOpened(new ViewContentEventArgs(content)); }