Esempio n. 1
0
        internal IDockContent[] Select(DockAreas stateFilter)
        {
            if (DockPane != null)
            {
                throw new InvalidOperationException();
            }

            int count = 0;

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

            IDockContent[] contents = new IDockContent[count];

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

            return(contents);
        }
Esempio n. 2
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));
     }
 }
Esempio n. 3
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);
        }