internal MailPageData NextPageData() { MailPageData pageData = this.GetPageData(this.currentPage + 1); if (pageData != null) { ++this.currentPage; } return(pageData); }
internal MailPageData PrevPageData() { MailPageData pageData = this.GetPageData(this.currentPage - 1); if (pageData != null) { --this.currentPage; } return(pageData); }
internal bool HasNext() { MailPageData pageData = this.GetPageData(this.currentPage); if (pageData != null) { return(pageData.hasNext); } return(false); }
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); }
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); }