コード例 #1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            AddNavigationItem("最新主题");

            int totalThreads = 0;
            int displayCount = BbsSettings.NewThreadPageCount * BbsSettings.ThreadsPageSize;

            if (PageNumber - 1 < BbsSettings.NewThreadPageCount)
            {
                threadList = PostBOV5.Instance.GetNewThreads(My, null, PageNumber, BbsSettings.ThreadsPageSize, out totalThreads);
            }
            else
            {
                totalThreads = displayCount;
                threadList   = new ThreadCollectionV5();
            }

            if (displayCount > totalThreads || displayCount == 0)
            {
                displayCount = totalThreads;
            }
            SetPager("list", BbsUrlHelper.GetNewThreadListUrlForPager(), PageNumber, BbsSettings.ThreadsPageSize, displayCount);
        }