private void RefurbishListView(TimeThresholdGoodsType type) { this.SetVisible(true); m_wndView.ClearTypeThresholdGoodList(type); switch (type) { case TimeThresholdGoodsType.TIMETHRESHOLDGOODSTYPE_SKIN: { Dictionary <int, List <cmd_Hero_Skin_Info> > SkinData = LogicDataCenter.heroSkinDataManager.HeroSkinData; if (SkinData == null) { this.SetVisible(false); return; } foreach (int nHeroId in SkinData.Keys) { foreach (cmd_Hero_Skin_Info info in SkinData[nHeroId]) { if (!CheckGoodIsInTimeThreshold(type, info.dwDurationTime)) { continue; } SkinInfoScheme skinConfig = new SkinInfoScheme(); if (!GameLogicAPI.GetHeroSkinInfo(info.nSkinId, ref skinConfig)) { continue; } UListTimeThresholdData data = new UListTimeThresholdData(); data.nGoodId = info.nSkinId; data.nGoodIconId = nHeroId; //skinConfig.nSkinIconID; data.sGoodName[0] = "皮肤 :"; data.sGoodName[1] = skinConfig.szSkinName; data.szParam = "英雄"; data.nParam = nHeroId; data.nGoodThresholdTime = info.dwDurationTime; m_wndView.AddThresholdGoodListItem(type, data); } } } break; default: break; } bool bShow = m_wndView.SetThresholdGoodListDataSource(); this.SetVisible(bShow); }
public void AddThresholdGoodListItem(TimeThresholdGoodsType type, UListTimeThresholdData data) { if (TimeThresholdList == null) { return; } ObservableList <UListTimeThresholdData> ListData = TimeThresholdList.GetTypeListTimeThresholdData(type); if (ListData == null) { return; } ListData.Add(data); }