示例#1
0
        internal DockContent[] Select(DockAreas stateFilter)
        {
            if (DockPane != null)
            {
                throw new InvalidOperationException();
            }

            int count = 0;

            foreach (DockContent c in this)
            {
                if (DockHelper.IsDockStateValid(c.DockState, stateFilter))
                {
                    count++;
                }
            }

            DockContent[] contents = new DockContent[count];

            count = 0;
            foreach (DockContent c in this)
            {
                if (DockHelper.IsDockStateValid(c.DockState, stateFilter))
                {
                    contents[count++] = c;
                }
            }

            return(contents);
        }
        public Content[] Select(ContentStates stateFilter)
        {
            int count = 0;

            foreach (Content c in this)
            {
                if (DockHelper.IsDockStateValid(c.DockState, stateFilter))
                {
                    count++;
                }
            }

            Content[] contents = new Content[count];

            count = 0;
            foreach (Content c in this)
            {
                if (DockHelper.IsDockStateValid(c.DockState, stateFilter))
                {
                    contents[count++] = c;
                }
            }

            return(contents);
        }
示例#3
0
 /// <include file='CodeDoc\DockContentHandler.xml' path='//CodeDoc/Class[@name="DockContentHandler"]/Method[@name="IsDockStateValid(DockState)"]/*'/>
 public bool IsDockStateValid(DockState dockState)
 {
     if (DockPanel != null && dockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyles.SystemMdi)
     {
         return(false);
     }
     else
     {
         return(DockHelper.IsDockStateValid(dockState, DockableAreas));
     }
 }
示例#4
0
        internal bool IsDockStateValid(DockState dockState)
        {
            foreach (DockPane pane in DockList)
            {
                foreach (IDockContent content in pane.Contents)
                {
                    if (!DockHelper.IsDockStateValid(dockState, content.DockHandler.DockableAreas))
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
示例#5
0
        public bool IsDockStateValid(DockState dockState)
        {
            foreach (ContentWindow cw in ContentWindows)
            {
                foreach (Content c in cw.Contents)
                {
                    if (!DockHelper.IsDockStateValid(dockState, c.AllowedStates))
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
示例#6
0
 public bool IsDockStateValid(DockState dockState)
 {
     return(DockHelper.IsDockStateValid(dockState, AllowedStates));
 }
示例#7
0
 /// <include file='CodeDoc\DockContent.xml' path='//CodeDoc/Class[@name="DockContent"]/Method[@name="IsDockStateValid(DockState)"]/*'/>
 public bool IsDockStateValid(DockState dockState)
 {
     return(DockHelper.IsDockStateValid(dockState, DockableAreas));
 }