public static void ShowBlackListData(ref CFriendModel.stBlackName info, FriendShower com) { if (com == null) { return; } com.ullUid = info.ullUid; com.dwLogicWorldID = info.dwLogicWorldId; com.HttpImage.SetImageUrl(Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(info.szHeadUrl)); if (com.nobeIcon) { com.nobeIcon.CustomSetActive(false); } if (com.HeadIconBack) { com.HeadIconBack.CustomSetActive(false); } if (com.QQVipImage) { com.QQVipImage.CustomSetActive(false); } com.SetFriendItemType(FriendShower.ItemType.BlackList, true); com.SetBGray(false); com.ShowName(info.name); com.ShowLevel(info.dwPvpLvl); com.ShowLastTime(true, UT.GetTimeString(info.dwLastLoginTime)); com.intimacyNode.CustomSetActive(false); com.ShowGenderType(info.bGender); }
public void On_List_ElementEnable(CUIEvent uievent) { int srcWidgetIndexInBelongedList = uievent.m_srcWidgetIndexInBelongedList; FriendShower component = uievent.m_srcWidget.GetComponent <FriendShower>(); if (component != null) { if (this.CurTab == Tab.Friend_SNS) { COMDT_FRIEND_INFO info = this._get_current_info(this.CurTab, srcWidgetIndexInBelongedList); UT.ShowFriendData(info, component, FriendShower.ItemType.Normal, true, CFriendModel.FriendType.SNS); component.sendHeartBtn_eventScript.m_onClickEventID = enUIEventID.Friend_SNS_SendCoin; component.sendHeartBtn_eventScript.m_onClickEventParams.commonUInt64Param1 = info.stUin.ullUid; component.sendHeartBtn_eventScript.m_onClickEventParams.commonUInt64Param2 = info.stUin.dwLogicWorldId; } else if (this.CurTab == Tab.Friend) { COMDT_FRIEND_INFO comdt_friend_info2 = this._get_current_info(this.CurTab, srcWidgetIndexInBelongedList); UT.ShowFriendData(comdt_friend_info2, component, FriendShower.ItemType.Normal, false, CFriendModel.FriendType.GameFriend); component.sendHeartBtn_eventScript.m_onClickEventID = enUIEventID.Friend_SendCoin; component.sendHeartBtn_eventScript.m_onClickEventParams.commonUInt64Param1 = comdt_friend_info2.stUin.ullUid; component.sendHeartBtn_eventScript.m_onClickEventParams.commonUInt64Param2 = comdt_friend_info2.stUin.dwLogicWorldId; } else if (this.CurTab == Tab.Friend_Request) { UT.ShowFriendData(this._get_current_info(this.CurTab, srcWidgetIndexInBelongedList), component, FriendShower.ItemType.Request, false, CFriendModel.FriendType.RequestFriend); } else if (this.CurTab == Tab.Friend_BlackList) { List <CFriendModel.stBlackName> blackList = Singleton <CFriendContoller> .instance.model.GetBlackList(); if (srcWidgetIndexInBelongedList < blackList.Count) { CFriendModel.stBlackName name = blackList[srcWidgetIndexInBelongedList]; if (component != null) { UT.ShowBlackListData(ref name, component); } } } else if (this.CurTab == Tab.Friend_LBS) { ListView <CSDT_LBS_USER_INFO> currentLBSList = Singleton <CFriendContoller> .instance.model.GetCurrentLBSList(); if (srcWidgetIndexInBelongedList < currentLBSList.Count) { CSDT_LBS_USER_INFO csdt_lbs_user_info = currentLBSList[srcWidgetIndexInBelongedList]; if (component != null) { UT.ShowLBSUserData(csdt_lbs_user_info, component); } } } } }
private void _refresh_black_list(CUIListScript listScript, List <CFriendModel.stBlackName> blackList) { if (listScript != null) { int count = blackList.Count; listScript.SetElementAmount(count); for (int i = 0; i < count; i++) { CUIListElementScript elemenet = listScript.GetElemenet(i); if ((elemenet != null) && listScript.IsElementInScrollArea(i)) { FriendShower component = elemenet.GetComponent <FriendShower>(); CFriendModel.stBlackName info = blackList[i]; if (component != null) { UT.ShowBlackListData(ref info, component); } } } } }