ComponentFactory.Krypton.Docking.KryptonDockingSpace.PropogatePageList C# (CSharp) Method

PropogatePageList() public method

Propogates a page list request down the hierarchy of docking elements.
public PropogatePageList ( DockingPropogatePageList state, KryptonPageCollection pages ) : void
state DockingPropogatePageList Request that should result in pages collection being modified.
pages KryptonPageCollection Pages collection for modification by the docking elements.
return void
        public override void PropogatePageList(DockingPropogatePageList state, KryptonPageCollection pages)
        {
            switch (state)
            {
                case DockingPropogatePageList.All:
                case DockingPropogatePageList.Docked:
                case DockingPropogatePageList.Floating:
                case DockingPropogatePageList.Filler:
                    {
                        // If the request relevant to this space control?
                        if ((state == DockingPropogatePageList.All) ||
                            ((state == DockingPropogatePageList.Docked) && (ClearStoreAction == DockingPropogateAction.ClearDockedStoredPages)) ||
                            ((state == DockingPropogatePageList.Floating) && (ClearStoreAction == DockingPropogateAction.ClearFloatingStoredPages)) ||
                            ((state == DockingPropogatePageList.Filler) && (ClearStoreAction == DockingPropogateAction.ClearFillerStoredPages)))
                        {
                            // Process each cell in turn
                            KryptonWorkspaceCell cell = SpaceControl.FirstCell();
                            while (cell != null)
                            {
                                // Process each page inside the cell
                                for (int i = cell.Pages.Count - 1; i >= 0; i--)
                                {
                                    // Only add real pages and not placeholders
                                    KryptonPage page = cell.Pages[i];
                                    if ((page != null) && !(page is KryptonStorePage))
                                        pages.Add(page);
                                }

                                cell = SpaceControl.NextCell(cell);
                            }
                        }
                    }
                    break;
            }

            // Let base class perform standard processing
            base.PropogatePageList(state, pages);
        }