Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public bool IsDockStateValid(DockState dockState)
 {
     return(DockHelper.IsDockStateValid(dockState, DockableAreas));
 }