コード例 #1
0
        protected void DealPageData(PageRequestData data)
        {
            var showState = data.DataCount != 0;

            NoDataSign.TrySetComponentValue(!showState);
            HasDataSign.TrySetComponentValue(showState);
            Table.gameObject.TrySetComponentValue(showState);
            if (_isFirst)
            {
                _totalCount   = data.TotalCount;
                _perPageCount = data.PageCount;
                if (gameObject.activeInHierarchy)
                {
                    StartCoroutine(OnFirstAction.WaitExcuteCalls());
                }
                _isFirst = false;
            }
            _curCount += data.DataCount;
            var list = data.DataItems;

            RefreshView(list, Items.Count);
            Items.AddRange(list);
            if (CouldNotDrad() && data.ExistPageNum)
            {
                _curPage = data.PageNumber;
            }
            _request = false;
        }
コード例 #2
0
        protected void DealPageData(PageRequestData data)
        {
            var showState = data.DataCount != 0;

            YxTools.TrySetComponentValue(NoDataSign, !showState);
            YxTools.TrySetComponentValue(Table.gameObject, showState);
            if (_isFirst)
            {
                _totalCount   = data.TotalCount;
                _perPageCount = data.PageCount;
                StartCoroutine(YxTools.WaitExcuteCalls(OnFirstAction));
                _isFirst = false;
            }
            _curCount += data.DataCount;
            var list = data.DataItems;

            RefreshView(list, Items.Count);
            Items.AddRange(list);
            if (CouldNotDrad() && data.ExistPageNum)
            {
                _curPage = data.PageNumber;
            }
            _request = false;
        }
コード例 #3
0
        protected virtual void OnActionCallBackDic()
        {
            PageRequestData data = new PageRequestData(Data, GetItemType());

            DealPageData(data);
        }