protected override void InitPanels()
        {
            NDockZone         zone;
            NDockingPanelHost panelHost;

            zone      = new NDockZone(Orientation.Vertical);
            panelHost = new NDockingPanelHost();
            panelHost.AddChild(GetGenericPanel());
            zone.AddChild(panelHost);

            panelHost = new NDockingPanelHost();
            panelHost.AddChild(GetGenericPanel());
            zone.AddChild(panelHost);

            m_Container.RootZone.AddChild(zone);

            NDockingPanel panel = new NDockingPanel();

            panelHost = new NDockingPanelHost();
            panelHost.AddChild(panel);

            m_Container.RootZone.AddChild(panelHost);

            NDockingPanelContainer container = m_DockManager.AddContainer(DockStyle.Fill);

            container.RootZone.Orientation = Orientation.Vertical;
            container.BackColor            = Color.Red;
            container.DockPadding.All      = 10;
            panel.Controls.Add(container);

            panelHost = new NDockingPanelHost();
            panelHost.AddChild(GetGenericPanel());
            panelHost.AddChild(GetGenericPanel());
            container.RootZone.AddChild(panelHost);
        }
        protected override INDockZone GetMainZone(NExamplesDockManager dockManager)
        {
            NDockZone         zone;
            NDockingPanelHost host;

            //create a zone with vertical orientation which will hold main control host and description/source/web panels
            zone = new NDockZone(Orientation.Vertical);

            //create a host for the example/source panel
            host = new NDockingPanelHost();
            host.SizeInfo.SizeLogic = SizeLogic.FillInterior;
            host.AddChild(dockManager.m_ExamplePanel);
            host.AddChild(dockManager.m_ViewSourcePanel);
            //add it to the zone with vertical orientation
            zone.AddChild(host);

            //create a host for description/web panels
            host = new NDockingPanelHost();
            host.AddChild(dockManager.m_DescriptionPanel);

            //add the host to the zone
            zone.AddChild(host);

            return(zone);
        }
示例#3
0
        protected override void LayoutExample()
        {
            NExampleBaseUC uc = CurrentExampleControl as NExampleBaseUC;

            if (uc == null)
            {
                return;
            }

            int nWidth  = uc.Width + 10;
            int nHeight = uc.Height + 60;

            ExampleLayout newLayout = (nWidth > 330) ? ExampleLayout.WideScreen : ExampleLayout.Standard;

            if (m_CurrentLayout == newLayout)
            {
                if (ExamplePanel.ParentZone != null)
                {
                    if (newLayout == ExampleLayout.WideScreen)
                    {
                        ExamplePanel.SizeInfo.AbsoluteSize = new Size(0, nHeight);
                    }
                    else if (newLayout == ExampleLayout.Standard)
                    {
                        ExamplePanel.SizeInfo.AbsoluteSize = new Size(nWidth, 0);
                    }
                }
            }
            else
            {
                m_CurrentLayout = newLayout;

                NDockingPanelContainer mainContainer = DockManager.MainContainer;

                if (newLayout == ExampleLayout.WideScreen)
                {
                    INDockZone        zone   = DockManager.m_ControlHost.ParentZone;
                    NDockingPanelHost dpHost = FindDockingPanelHostInZone(zone);

                    if (dpHost != null)
                    {
                        ExamplePanel.PerformDock(dpHost, DockStyle.Fill, 0);
                    }
                    else
                    {
                        ExamplePanel.PerformDock(zone, DockStyle.Bottom, 0);
                    }

                    ExamplePanel.SizeInfo.AbsoluteSize = new Size(0, nHeight);
                }
                else if (newLayout == ExampleLayout.Standard)
                {
                    ExamplePanel.PerformDock(mainContainer.RootZone, DockStyle.Right, 0);
                    ExamplePanel.SizeInfo.AbsoluteSize = new Size(nWidth, 0);
                }
            }
        }
        protected override void InitPanels()
        {
            NDockingPanelHost panelHost;

            panelHost = new NDockingPanelHost();
            panelHost.SizeInfo.SizeLogic    = SizeLogic.Absolute;
            panelHost.SizeInfo.AbsoluteSize = new Size(200, 0);
            panelHost.AddChild(new NDockingPanel());

            m_Container.RootZone.AddChild(panelHost);
        }
示例#5
0
        protected override void InitPanels()
        {
            base.InitPanels();

            NDockingPanelHost host = new NDockingPanelHost();

            NDockingPanel panel = new NDockingPanel();

            m_PropertyGrid.Dock = DockStyle.Fill;
            panel.Controls.Add(m_PropertyGrid);

            m_PropertyGrid.SelectedObject = m_DockManager.DockingHintStyle;

            host.AddChild(panel);
            m_Container.RootZone.AddChild(host);
        }
        protected override void InitPanels()
        {
            base.InitPanels();

            NDockingPanelHost host  = new NDockingPanelHost();
            NDockingPanel     panel = new NDockingPanel();

            panel.Text               = "Properties";
            panel.TabInfo.Text       = "Properties";
            panel.TabInfo.ImageIndex = 3;

            m_PropertyBrowser.Visible = true;

            m_PropertyBrowser.Dock = DockStyle.Fill;
            panel.Controls.Add(m_PropertyBrowser);
            host.AddChild(panel);
            m_Container.RootZone.AddChild(host);
        }
        protected override void InitPanels()
        {
            NDockZone         zone;
            NDockingPanelHost panelHost;

            zone      = new NDockZone(Orientation.Vertical);
            panelHost = new NDockingPanelHost();
            panelHost.AddChild(GetGenericPanel());
            zone.AddChild(panelHost);

            panelHost = new NDockingPanelHost();
            panelHost.AddChild(GetGenericPanel());
            zone.AddChild(panelHost);

            m_Container.RootZone.AddChild(zone);

            zone = new NDockZone(Orientation.Vertical);

            panelHost = new NDockingPanelHost();
            panelHost.AddChild(GetGenericPanel());
            panelHost.AddChild(GetGenericPanel());
            zone.AddChild(panelHost);

            m_Container.RootZone.AddChild(zone);

            zone      = new NDockZone(Orientation.Vertical);
            panelHost = new NDockingPanelHost();
            panelHost.AddChild(GetGenericPanel());
            panelHost.AddChild(GetGenericPanel());
            zone.AddChild(panelHost);

            panelHost = new NDockingPanelHost();
            panelHost.AddChild(GetGenericPanel());
            zone.AddChild(panelHost);

            panelHost = new NDockingPanelHost();
            panelHost.AddChild(GetGenericPanel());
            panelHost.AddChild(GetGenericPanel());
            zone.AddChild(panelHost);

            m_Container.RootZone.AddChild(zone);
        }
示例#8
0
        protected virtual void InitPanels()
        {
            NDockZone         zone;
            NDockingPanel     panel;
            NDockingPanelHost panelHost;

            zone      = new NDockZone(Orientation.Vertical);
            panelHost = new NDockingPanelHost();
            panelHost.AddChild(GetGenericPanel());
            zone.AddChild(panelHost);

            m_Container.RootZone.AddChild(zone);

            panel = GetGenericPanel();
            panel.TabInfo.ImageIndex = 1;

            panelHost = new NDockingPanelHost();
            panelHost.AddChild(panel);
            zone.AddChild(panelHost);
        }
示例#9
0
        protected override INDockZone GetMainZone(NExamplesDockManager dockManager)
        {
            INDockZone zone = new NDockZone(Orientation.Vertical);

            WideScreenExampleZone            = new NDockZone();
            WideScreenExampleZone.Referenced = true;
            zone.AddChild(WideScreenExampleZone);

            INDockZone host = new NDockingPanelHost();

            host.SizeInfo.SizeLogic = SizeLogic.FillInterior;
//			NDockingPanel panel = new NDockingPanel();

            host.AddChild((dockManager as NDiagramExamplesDockManager).DiagramDesignerPanel);

            host.AddChild(dockManager.m_DescriptionPanel);
            host.AddChild(dockManager.m_ViewSourcePanel);

            zone.AddChild(host);

            return(zone);
        }
示例#10
0
        private NDockingPanelHost FindDockingPanelHostInZone(INDockZone zone)
        {
            if (zone == null)
            {
                return(null);
            }

            if (zone.LayoutInfo.Orientation != Orientation.Vertical)
            {
                return(null);
            }

            foreach (INDockZoneChild child in zone.Children)
            {
                NDockingPanelHost host = child as NDockingPanelHost;

                if (host != null)
                {
                    return(host);
                }
            }

            return(null);
        }