Exemplo n.º 1
0
        public IWorkbenchWindow ShowView(IViewContent content)
        {
            if (content.WorkbenchWindow is SdiWorkspaceWindow)
            {
                SdiWorkspaceWindow oldSdiWindow = (SdiWorkspaceWindow)content.WorkbenchWindow;
                if (!oldSdiWindow.IsDisposed)
                {
                    oldSdiWindow.Show(dockPanel);
                    return(oldSdiWindow);
                }
            }
            if (!content.Control.Visible)
            {
                content.Control.Visible = true;
            }
            content.Control.Dock = DockStyle.Fill;
            SdiWorkspaceWindow sdiWorkspaceWindow = new SdiWorkspaceWindow(content);

            if (dockPanel != null)
            {
                sdiWorkspaceWindow.Show(dockPanel);
            }

            return(sdiWorkspaceWindow);
        }
Exemplo n.º 2
0
 void DetachViewContents(bool dispose)
 {
     foreach (IViewContent viewContent in WorkbenchSingleton.Workbench.ViewContentCollection)
     {
         try
         {
             SdiWorkspaceWindow f = (SdiWorkspaceWindow)viewContent.WorkbenchWindow;
             f.DockPanel = null;
             if (dispose)
             {
                 viewContent.WorkbenchWindow = null;
                 f.DetachContent();
                 f.Dispose();
             }
         }
         catch (Exception e) { MessageService.ShowError(e); }
     }
 }
        public IWorkbenchWindow ShowView(IViewContent content)
        {
            if (content.WorkbenchWindow is SdiWorkspaceWindow) {
                SdiWorkspaceWindow oldSdiWindow = (SdiWorkspaceWindow)content.WorkbenchWindow;
                if (!oldSdiWindow.IsDisposed) {
                    oldSdiWindow.Show(dockPanel);
                    return oldSdiWindow;
                }
            }
            if (!content.Control.Visible) {
                content.Control.Visible = true;
            }
            content.Control.Dock = DockStyle.Fill;
            SdiWorkspaceWindow sdiWorkspaceWindow = new SdiWorkspaceWindow(content);
            if (dockPanel != null) {
                sdiWorkspaceWindow.Show(dockPanel);
            }

            return sdiWorkspaceWindow;
        }