コード例 #1
0
        static void PlaceInFloatingFrame(DockNotebook notebook, DockNotebookTab tab, Rectangle allocation, int ox, int oy)
        {
            var newWindow   = new DockWindow();
            var newNotebook = newWindow.Container.GetFirstNotebook();
            var newTab      = newNotebook.AddTab();

            var workspaceWindow = (SdiWorkspaceWindow)tab.Content;

            newTab.Content  = workspaceWindow;
            newWindow.Title = DefaultWorkbench.GetTitle(workspaceWindow);

            workspaceWindow.SetDockNotebook(newNotebook, newTab);
            newWindow.Move(ox - w / 2, oy - h / 2);
            newWindow.Resize(w, h);
            newWindow.ShowAll();
            DockNotebook.ActiveNotebook = newNotebook;
        }
コード例 #2
0
        static PlaceholderWindow()
        {
            IdeApp.Workbench.ActiveDocumentChanged += delegate {
                var doc = IdeApp.Workbench.ActiveDocument;
                if (doc == null)
                {
                    return;
                }
                var rootWindow = doc.Window.ActiveViewContent.Control.Toplevel as DockWindow;
                if (rootWindow == null)
                {
                    return;
                }

                rootWindow.Title = DefaultWorkbench.GetTitle(doc.Window);
            };
        }
コード例 #3
0
        public static DockWindow MoveToFloatingWindow(SdiWorkspaceWindow workspaceWindow, int x, int y, int width, int height)
        {
            var window   = new DockWindow();
            var notebook = window.Container.GetFirstNotebook();
            var tab      = notebook.AddTab();

            tab.Content = workspaceWindow;

            window.Title = DefaultWorkbench.GetTitle(workspaceWindow);

            workspaceWindow.SetDockNotebook(notebook, tab);

            window.Move(x, y);
            window.Resize(width, height);
            window.ShowAll();

            return(window);
        }
コード例 #4
0
        static PlaceholderWindow()
        {
            IdeApp.Workbench.ActiveDocumentChanged += delegate {
                var doc = IdeApp.Workbench.ActiveDocument;
                if (doc == null)
                {
                    return;
                }
                var workspaceWindow = doc.Window as SdiWorkspaceWindow;
                var rootWindow      = workspaceWindow?.Toplevel as DockWindow;
                if (rootWindow == null)
                {
                    return;
                }

                rootWindow.Title = DefaultWorkbench.GetTitle(workspaceWindow);
            };
        }