Line 109: int firstPageIndex = Math.Max((CurrentPage - 1) / PageButtonsCount * PageButtonsCount, 1);
Line 110: int lastPageIndex = Math.Min(firstPageIndex + PageButtonsCount + 1, PageCount);
Line 111: int[] pages = new int[lastPageIndex - firstPageIndex + 1];
Line 112:
Line 113: for (int i = 0; i < pages.Length; i++)