internal IDockableWindow[] Select(DockAreas stateFilter) { if (DockPane != null) { throw new InvalidOperationException(); } int count = 0; foreach (IDockableWindow c in this) { if (DockHelper.IsDockStateValid(c.DockHandler.DockState, stateFilter)) { count++; } } IDockableWindow[] contents = new IDockableWindow[count]; count = 0; foreach (IDockableWindow c in this) { if (DockHelper.IsDockStateValid(c.DockHandler.DockState, stateFilter)) { contents[count++] = c; } } return(contents); }
/// <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)); } }
internal bool IsDockStateValid(DockState dockState) { foreach (DockPane pane in DockList) { foreach (IDockableWindow content in pane.Contents) { if (!DockHelper.IsDockStateValid(dockState, content.DockHandler.DockableAreas)) { return(false); } } } return(true); }