예제 #1
0
 public virtual void PaginateRecursive(ControlPager pager)
 {
 }
 public virtual void PaginateRecursive(ControlPager pager)
 {
 }
	public ItemPager(ControlPager pager, MobileControl control, int itemCount, int itemsPerPage, int itemWeight) {}
예제 #4
0
        //*********************************************************************
        //
        // MultiPanel.PaginateRecursive Method
        //
        // PaginateRecursive is called by the framework to recursively
        // paginate children. For MultiPanel controls, PaginateRecursive
        // only paginates the active child pane.
        //
        //*********************************************************************
        public override void PaginateRecursive(ControlPager pager)
        {
            Control activePane = (Control) ActivePane;

            // Active pane may not be a mobile control (e.g. it may be
            // a user control).
            MobileControl mobileCtl = activePane as MobileControl;

            if (mobileCtl != null)
            {
                // Paginate the children.
                mobileCtl.PaginateRecursive(pager);

                // Set own first and last page from results of child
                // pagination.
                FirstPage = mobileCtl.FirstPage;
                LastPage = pager.PageCount;
            }
            else
            {
                // Call the DoPaginateChildren utility method to
                // paginate a non-mobile child.
                int firstAssignedPage = -1;
                DoPaginateChildren(pager, activePane, ref firstAssignedPage);

                // Set own first and last page from results of child
                // pagination.
                if (firstAssignedPage != -1)
                {
                    FirstPage = firstAssignedPage;
                }
                else
                {
                    FirstPage = pager.GetPage(100);
                }
                LastPage = pager.PageCount;
            }
        }
예제 #5
0
        //*********************************************************************
        //
        // MultiPanel.DoPaginateRecursive Static Method
        //
        // The DoPaginateRecursive method paginates non-mobile child
        // controls, looking for mobile controls inside them.
        //
        //*********************************************************************
        private static void DoPaginateChildren(ControlPager pager, Control ctl, ref int firstAssignedPage)
        {
            // Search all children of the control.
            if (ctl.HasControls())
            {
                foreach (Control child in ctl.Controls)
                {
                    if (child.Visible)
                    {
                        // Look for a visible mobile control.
                        MobileControl mobileCtl = child as MobileControl;
                        if (mobileCtl != null)
                        {
                            // Paginate the mobile control.
                            mobileCtl.PaginateRecursive(pager);

                            // If this is the first control being paginated,
                            // set the first assigned page.
                            if (firstAssignedPage == -1)
                            {
                                firstAssignedPage = mobileCtl.FirstPage;
                            }
                        }
                        else if (child is UserControl)
                        {
                            // Continue paginating user controls, which may contain
                            // their own mobile children.
                            DoPaginateChildren(pager, child, ref firstAssignedPage);
                        }
                    }
                }
            }
        }
예제 #6
0
 public ItemPager(ControlPager pager, MobileControl control, int itemCount, int itemsPerPage, int itemWeight)
 {
 }