예제 #1
0
        private int GetPageCountInSection(LayoutBox box)
        {
            SectionLayoutBox fieldSectionBox = (box as SectionLayoutBox) ?? box.GetCurrentSectionBox();
            int pagesNumber = fieldSectionBox.AssociatedSection.GetAssociatedLayoutBoxes().Count();

            return(pagesNumber);
        }
예제 #2
0
        private int GetCurrentPageFromSectionPages(LayoutBox box)
        {
            int pageCounter = 1;

            SectionLayoutBox fieldLayotBox = (box as SectionLayoutBox) ?? box.GetCurrentSectionBox();

            foreach (SectionLayoutBox layoutBox in fieldLayotBox.AssociatedSection.GetAssociatedLayoutBoxes())
            {
                if (layoutBox.PageNumber == fieldLayotBox.PageNumber)
                {
                    break;
                }

                pageCounter++;
            }

            return(pageCounter);
        }