Esempio n. 1
0
            internal MailPageData NextPageData()
            {
                MailPageData pageData = this.GetPageData(this.currentPage + 1);

                if (pageData != null)
                {
                    ++this.currentPage;
                }
                return(pageData);
            }
Esempio n. 2
0
            internal MailPageData PrevPageData()
            {
                MailPageData pageData = this.GetPageData(this.currentPage - 1);

                if (pageData != null)
                {
                    --this.currentPage;
                }
                return(pageData);
            }
Esempio n. 3
0
            internal bool HasNext()
            {
                MailPageData pageData = this.GetPageData(this.currentPage);

                if (pageData != null)
                {
                    return(pageData.hasNext);
                }
                return(false);
            }
Esempio n. 4
0
 internal bool SetPage(MailPageData mailPageData)
 {
     if (mailPageData == null)
     {
         return(false);
     }
     if (this.pageDataList.Find((Predicate <MailPageData>)(pd => pd.page == mailPageData.page)) == null)
     {
         this.pageDataList.Add(mailPageData);
         this.currentPage = mailPageData.page;
         this.pageMax     = mailPageData.pageMax;
         this.mailCount   = mailPageData.mailCount;
     }
     return(true);
 }
Esempio n. 5
0
        private bool AddPage(int addValue)
        {
            MailWindow.TabData currentTabData = this.currentTabData;
            if (currentTabData == null)
            {
                return(false);
            }
            int          page     = currentTabData.currentPage + addValue;
            MailPageData pageData = currentTabData.GetPageData(page);

            if (pageData == null)
            {
                return(false);
            }
            currentTabData.currentPage = page;
            MonoSingleton <GameManager> .Instance.Player.CurrentMails = pageData.mails;
            return(true);
        }