private void RefreshItemList1(List <CommodityInfo> commodities) { ShoppingUIView.Instance.Show2ItemSR.get_gameObject().SetActive(false); ShoppingUIView.Instance.Show1ItemSR.get_gameObject().SetActive(true); for (int i = 0; i < this.ItemList1.Count; i++) { this.ItemList1[i].Items.Clear(); } this.ItemList1.Clear(); if (commodities == null) { return; } commodities.Sort(new Comparison <CommodityInfo>(ShoppingUIViewModel.CommoditySortCompare)); for (int j = 0; j < commodities.get_Count(); j++) { OOShoppingUnit shoppingUnit = this.GetShoppingUnit1(commodities.get_Item(j)); int i2 = j / 6; if (j % 6 == 0) { OOShoppingPage o = new OOShoppingPage(); this.ItemList1.Add(o); } this.ItemList1[i2].Items.Add(shoppingUnit); } }
public void RefreshItem(QueryGuildShopInfoRes shop, CommodityInfo commodityInfo) { if (BaseMarketManager.mMarketClass != MarketClass.GuildMarketManager) { return; } if (shop == null) { return; } this.RefreshInfo(shop.remainingRefreshTime, GuildMarketManager.Instance.GetRemainRefreshTimes()); if (commodityInfo == null) { return; } for (int i = 0; i < this.ItemList1.Count; i++) { OOShoppingPage oOShoppingPage = this.ItemList1[i]; for (int j = 0; j < oOShoppingPage.Items.Count; j++) { if (oOShoppingPage.Items[j].iId == commodityInfo.commodityId) { this.SetShoppingUnit1(oOShoppingPage.Items[j], commodityInfo); return; } } } }