Beispiel #1
0
        public string Get(int page, int total, int nowPage, PagingFlag flag, out string text)
        {
            if ((flag & PagingFlag.Control) != 0)
            {
                if ((flag & PagingFlag.Previous) != 0)
                {
                    text = this._previousPageText;
                    if (page == 1)
                    {
                        return("javascript:;");
                    }
                    else
                    {
                        if (nowPage == 1)
                        {
                            return(this._firstLinkFormat);
                        }
                        return(String.Format(this._pagerLinkFormat, nowPage));
                    }
                }
                else if ((flag & PagingFlag.Next) != 0)
                {
                    text = this._nextPageText;
                    if (page == total)
                    {
                        return("javascript:;");
                    }
                    else
                    {
                        return(String.Format(this._pagerLinkFormat, nowPage));
                    }
                }
            }

            text = nowPage.ToString();
            if (nowPage == 1 && this._firstLinkFormat.Length != 0)
            {
                return(this._firstLinkFormat);
            }
            return(String.Format(this._pagerLinkFormat, nowPage));
        }
Beispiel #2
0
        public string Get(int page, int total, int nowPage, PagingFlag flag, out string text)
        {
            if ((flag & PagingFlag.Control) != 0)
            {
                if ((flag & PagingFlag.Previous) != 0)
                {
                    text = this.previousPageText;
                    if (page == 1)
                    {
                        return "javascript:;";
                    }
                    else
                    {
                        if (nowPage == 1)
                        {
                            return this.firstLinkFormat;
                        }
                        return String.Format(this.pagerLinkFormat, nowPage);
                    }
                }
                else if ((flag & PagingFlag.Next) != 0)
                {
                    text = this.nextPageText;
                    if (page == total)
                    {
                        return "javascript:;";
                    }
                    else
                    {
                        return String.Format(this.pagerLinkFormat, nowPage);
                    }
                }
            }

            text = nowPage.ToString();
            if (nowPage == 1 && this.firstLinkFormat.Length != 0)
            {
                return this.firstLinkFormat;
            }
            return String.Format(this.pagerLinkFormat, nowPage);
        }
Beispiel #3
0
 public string Get(int page, int total, int nowPage, PagingFlag flag, out string text)
 {
     return(Getter.Get(page, total, nowPage, flag, out text));
 }
Beispiel #4
0
 public string Get(int page, int total, int nowPage, PagingFlag flag, out string text)
 {
     return getter.Get(page, total, nowPage, flag, out text);
 }