当前位置: 首页>>代码示例>>C#>>正文


C# INestedPanesContainer类代码示例

本文整理汇总了C#中INestedPanesContainer的典型用法代码示例。如果您正苦于以下问题:C# INestedPanesContainer类的具体用法?C# INestedPanesContainer怎么用?C# INestedPanesContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


INestedPanesContainer类属于命名空间,在下文中一共展示了INestedPanesContainer类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DockTo

        public DockPane DockTo(INestedPanesContainer container, DockPane previousPane, DockAlignment alignment, double proportion)
        {
            if (container == null)
                throw new InvalidOperationException(Strings.DockPane_DockTo_NullContainer);

            if (container.IsFloat == this.IsFloat)
            {
                InternalAddToDockList(container, previousPane, alignment, proportion);
                return this;
            }

            IDockContent firstContent = GetFirstContent(container.DockState);
            if (firstContent == null)
                return null;

            DockPane pane;
            DockPanel.DummyContent.DockPanel = DockPanel;
            if (container.IsFloat)
                pane = DockPanel.DockPaneFactory.CreateDockPane(DockPanel.DummyContent, (FloatWindow)container, true);
            else
                pane = DockPanel.DockPaneFactory.CreateDockPane(DockPanel.DummyContent, container.DockState, true);

            pane.DockTo(container, previousPane, alignment, proportion);
            SetVisibleContentsToPane(pane);
            DockPanel.DummyContent.DockPanel = null;

            return pane;
        }
开发者ID:RasterCode,项目名称:OtterUI,代码行数:28,代码来源:DockPane.cs

示例2: ResumeRefreshStateChange

 private void ResumeRefreshStateChange(INestedPanesContainer oldContainer, DockState oldDockState)
 {
     ResumeRefreshStateChange();
     RefreshStateChange(oldContainer, oldDockState);
 }
开发者ID:RasterCode,项目名称:OtterUI,代码行数:5,代码来源:DockPane.cs

示例3: RefreshStateChange

        private void RefreshStateChange(INestedPanesContainer oldContainer, DockState oldDockState)
        {
            lock (this)
            {
                if (IsRefreshStateChangeSuspended)
                    return;

                SuspendRefreshStateChange();
            }

            DockPanel.SuspendLayout(true);

            IDockContent contentFocused = GetFocusedContent();
            if (contentFocused != null)
                DockPanel.SaveFocus();
            SetParent();

            if (ActiveContent != null)
                ActiveContent.DockHandler.SetDockState(ActiveContent.DockHandler.IsHidden, DockState, ActiveContent.DockHandler.Pane);
            foreach (IDockContent content in Contents)
            {
                if (content.DockHandler.Pane == this)
                    content.DockHandler.SetDockState(content.DockHandler.IsHidden, DockState, content.DockHandler.Pane);
            }

            if (oldContainer != null)
            {
                Control oldContainerControl = (Control)oldContainer;
                if (oldContainer.DockState == oldDockState && !oldContainerControl.IsDisposed)
                    oldContainerControl.PerformLayout();
            }
            if (DockHelper.IsDockStateAutoHide(oldDockState))
                DockPanel.RefreshActiveAutoHideContent();

            if (NestedPanesContainer.DockState == DockState)
                ((Control)NestedPanesContainer).PerformLayout();
            if (DockHelper.IsDockStateAutoHide(DockState))
                DockPanel.RefreshActiveAutoHideContent();

            if (DockHelper.IsDockStateAutoHide(oldDockState) ||
                DockHelper.IsDockStateAutoHide(DockState))
            {
                DockPanel.RefreshAutoHideStrip();
                DockPanel.PerformLayout();
            }

            ResumeRefreshStateChange();

            if (contentFocused != null)
                contentFocused.DockHandler.Activate();

            DockPanel.ResumeLayout(true, true);

            if (oldDockState != DockState)
                OnDockStateChanged(EventArgs.Empty);
        }
开发者ID:RasterCode,项目名称:OtterUI,代码行数:56,代码来源:DockPane.cs

示例4: InternalAddToDockList

        private void InternalAddToDockList(INestedPanesContainer container, DockPane prevPane, DockAlignment alignment, double proportion)
        {
            if ((container.DockState == DockState.Float) != IsFloat)
                throw new InvalidOperationException(Strings.DockPane_DockTo_InvalidContainer);

            int count = container.NestedPanes.Count;
            if (container.NestedPanes.Contains(this))
                count --;
            if (prevPane == null && count > 0)
                throw new InvalidOperationException(Strings.DockPane_DockTo_NullPrevPane);

            if (prevPane != null && !container.NestedPanes.Contains(prevPane))
                throw new InvalidOperationException(Strings.DockPane_DockTo_NoPrevPane);

            if (prevPane == this)
                throw new InvalidOperationException(Strings.DockPane_DockTo_SelfPrevPane);

            INestedPanesContainer oldContainer = NestedPanesContainer;
            DockState oldDockState = DockState;
            container.NestedPanes.Add(this);
            NestedDockingStatus.SetStatus(container.NestedPanes, prevPane, alignment, proportion);

            if (DockHelper.IsDockWindowState(DockState))
                m_dockState = container.DockState;

            RefreshStateChange(oldContainer, oldDockState);
        }
开发者ID:RasterCode,项目名称:OtterUI,代码行数:27,代码来源:DockPane.cs

示例5: RefreshStateChange

 private void RefreshStateChange(INestedPanesContainer oldContainer, DockState oldDockState)
 {
     lock(this){
         if(this.IsRefreshStateChangeSuspended){
             return;
         }
         this.SuspendRefreshStateChange();
     }
     this.DockPanel.SuspendLayout(true);
     IDockContent contentFocused = this.GetFocusedContent();
     if(contentFocused != null){
         this.DockPanel.SaveFocus();
     }
     this.SetParent();
     if(this.ActiveContent != null){
         this.ActiveContent.DockHandler.SetDockState(this.ActiveContent.DockHandler.IsHidden, this.DockState,
                                                     this.ActiveContent.DockHandler.Pane);
     }
     foreach(IDockContent content in this.Contents){
         if(content.DockHandler.Pane == this){
             content.DockHandler.SetDockState(content.DockHandler.IsHidden, this.DockState,
                                              content.DockHandler.Pane);
         }
     }
     if(oldContainer != null){
         Control oldContainerControl = (Control)oldContainer;
         if(oldContainer.DockState == oldDockState && !oldContainerControl.IsDisposed){
             oldContainerControl.PerformLayout();
         }
     }
     if(DockHelper.IsDockStateAutoHide(oldDockState)){
         this.DockPanel.RefreshActiveAutoHideContent();
     }
     if(this.NestedPanesContainer.DockState == this.DockState){
         ((Control)this.NestedPanesContainer).PerformLayout();
     }
     if(DockHelper.IsDockStateAutoHide(this.DockState)){
         this.DockPanel.RefreshActiveAutoHideContent();
     }
     if(DockHelper.IsDockStateAutoHide(oldDockState) || DockHelper.IsDockStateAutoHide(this.DockState)){
         this.DockPanel.RefreshAutoHideStrip();
         this.DockPanel.PerformLayout();
     }
     this.ResumeRefreshStateChange();
     if(contentFocused != null){
         contentFocused.DockHandler.Activate();
     }
     this.DockPanel.ResumeLayout(true, true);
     if(oldDockState != this.DockState){
         this.OnDockStateChanged(EventArgs.Empty);
     }
 }
开发者ID:hksonngan,项目名称:sharptracing,代码行数:52,代码来源:DockPane.cs


注:本文中的INestedPanesContainer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。