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);
        }
예제 #2
0
        internal bool IsDockStateValid(DockState dockState)
        {
            foreach (DockPane pane in DockList)
            {
                foreach (DockContent content in pane.Contents)
                {
                    if (!DockHelper.IsDockStateValid(dockState, content.DockableAreas))
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
예제 #3
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));
 }