void GetActivityLimitTimeReponse(BaseHttpRequest request, BaseResponse response) { ComLoading.Close(); if (response != null && response.status != BaseResponse.ERROR) { GetActivityLimittimeRewardResponse res = response as GetActivityLimittimeRewardResponse; if (res != null) { GetRewardSucUI.OpenUI(res.data.p, Core.Data.stringManager.getString(5047)); if (res.data != null && res.data.item != null) { m_Item = res.data.item; StringBuilder builder = new StringBuilder(); builder.Append(res.data.item.completeRate.ToString()); builder.Append("/"); builder.Append(res.data.item.completeWhere); if (m_Title2 != null) { m_Title2.SafeText(builder.ToString()); } SetBtnStatus(res.data.item.status); DBUIController.mDBUIInstance.RefreshUserInfo(); Core.Data.HolidayActivityManager.SetNewActivityResponseData(activityItemIndex, res.data.item); } } } if (response != null && response.status == BaseResponse.ERROR) { SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode)); } }
public void SetNewActivityResponseData(int _ItemIndex, NewActivityItem _newActivityItem) { if (_har != null && _har.data != null && _har.data.Length != 0) { if (mActivityIndex >= 0 && mActivityIndex < _har.data.Length) { if (_har.data[mActivityIndex].items != null && _har.data[mActivityIndex].items.Length != 0) { if (_ItemIndex >= 0 && _ItemIndex < _har.data[mActivityIndex].items.Length) { _har.data[mActivityIndex].items[_ItemIndex] = _newActivityItem; } } } } }
public void Init(NewActivityItem _item, string _activityid, int _activityItemIndex) { m_Item = _item; m_ActivityId = _activityid; activityItemIndex = _activityItemIndex; if (m_Title1 != null) { m_Title1.SafeText(_item.completeDesc); } StringBuilder builder = new StringBuilder(); builder.Append(_item.completeRate.ToString()); builder.Append("/"); builder.Append(_item.completeWhere); if (m_Title2 != null) { m_Title2.SafeText(builder.ToString()); } SetBtnStatus(_item.status); CreateCell(m_Item.rewards); m_Grid.Reposition(); m_ScrollBar.value = 0f; }