void OnRefreshPropItem(Notification notification) { _allItemList.Clear(); _normalItemList.Clear(); _consumeItemList.Clear(); _allPropsItmeDic.Clear(); _normalPropsItmeDic.Clear(); _consumePropsItmeDic.Clear(); _wrapList.Clear(); ItemDataManager itemManager = new ItemDataManager(); _allItemList = itemManager.GetAllItemData(); _normalItemList = itemManager.GetNormalItemData(); _consumeItemList = itemManager.GetConsumeItemData(); SetWrapContent(_all_grid, _allItemList, _allPropsItmeDic, OnUpdateItemAll); SetWrapContent(_boxs_grid, _consumeItemList, _consumePropsItmeDic, OnUpdateItemConsume); SetWrapContent(_resources_grid, _normalItemList, _normalPropsItmeDic, OnUpdateItemNormal); UpdataItemInfo(_allItemList, _allPropsItmeDic); UpdataItemInfo(_normalItemList, _normalPropsItmeDic); UpdataItemInfo(_consumeItemList, _consumePropsItmeDic); foreach (UIWrapContent wrap in _wrapList) { wrap.SortAlphabetically(); } }
public override void Init() { base.Init(); _allItemList.Clear(); _normalItemList.Clear(); _consumeItemList.Clear(); _allPropsItmeDic.Clear(); _normalPropsItmeDic.Clear(); _consumePropsItmeDic.Clear(); _wrapList.Clear(); ItemDataManager itemManager = new ItemDataManager(); _allItemList = itemManager.GetAllItemData(); _normalItemList = itemManager.GetNormalItemData(); _consumeItemList = itemManager.GetConsumeItemData(); }