Exemplo n.º 1
0
        static void ResetWindowActually()
        {
            if (effectViewer == null)
            {
                effectViewer = new Dock.EffectViwer();
                if (dockManager != null)
                {
                    dockManager.Controls.Add(effectViewer);
                }
            }

            var viewerController     = SelectOrShowWindow(typeof(Dock.ViewerController), null);
            var nodeTreeView         = SelectOrShowWindow(typeof(Dock.NodeTreeView), null);
            var commonValues         = SelectOrShowWindow(typeof(Dock.CommonValues), null);
            var locationValues       = SelectOrShowWindow(typeof(Dock.LocationValues), null);
            var rotationValues       = SelectOrShowWindow(typeof(Dock.RotationValues), null);
            var scaleValues          = SelectOrShowWindow(typeof(Dock.ScaleValues), null);
            var rendererCommonValues = SelectOrShowWindow(typeof(Dock.RendererCommonValues), null);
            var rendererValues       = SelectOrShowWindow(typeof(Dock.RendererValues), null);

            uint windowId = NativeManager.BeginDockLayout();

            uint dockLeftID = 0, dockRightID = 0;

            NativeManager.DockSplitNode(windowId, DockSplitDir.Left, 0.65f, ref dockLeftID, ref dockRightID);

            uint dockLeftTop = 0, dockLeftBottom = 0;

            NativeManager.DockSplitNode(dockLeftID, DockSplitDir.Top, 0.85f, ref dockLeftTop, ref dockLeftBottom);

            uint dockRightTop = 0, dockRightBottom = 0;

            NativeManager.DockSplitNode(dockRightID, DockSplitDir.Top, 0.6f, ref dockRightTop, ref dockRightBottom);

            NativeManager.DockSetNodeFlags(dockLeftTop, DockNodeFlags.HiddenTabBar);
            NativeManager.DockSetNodeFlags(dockLeftBottom, DockNodeFlags.HiddenTabBar);

            NativeManager.DockSetWindow(dockLeftTop, effectViewer.WindowID);
            NativeManager.DockSetWindow(dockLeftBottom, viewerController.WindowID);
            NativeManager.DockSetWindow(dockRightTop, commonValues.WindowID);
            NativeManager.DockSetWindow(dockRightTop, locationValues.WindowID);
            NativeManager.DockSetWindow(dockRightTop, rotationValues.WindowID);
            NativeManager.DockSetWindow(dockRightTop, scaleValues.WindowID);
            NativeManager.DockSetWindow(dockRightTop, rendererValues.WindowID);
            NativeManager.DockSetWindow(dockRightTop, rendererCommonValues.WindowID);
            NativeManager.DockSetWindow(dockRightBottom, nodeTreeView.WindowID);

            NativeManager.EndDockLayout();
        }