| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 | 
							- using UI.Store;
 
- using UI.CommonGame;
 
- using FairyGUI;
 
- using System.Collections.Generic;
 
- using ET;
 
- namespace GFGGame
 
- {
 
-     public class StoreArenaView : BaseWindow
 
-     {
 
-         private UI_StoreExchangeUI _ui;
 
-         private ValueBarController _valueBarController;
 
-         private List<ShopCfg> _shopCfgs;
 
-         public override void Dispose()
 
-         {
 
-             if (_valueBarController != null)
 
-             {
 
-                 _valueBarController.Dispose();
 
-                 _valueBarController = null;
 
-             }
 
-             if (_ui != null)
 
-             {
 
-                 _ui.Dispose();
 
-             }
 
-             _ui = null;
 
-             base.Dispose();
 
-         }
 
-         protected override void OnInit()
 
-         {
 
-             base.OnInit();
 
-             packageName = UI_StoreExchangeUI.PACKAGE_NAME;
 
-             _ui = UI_StoreExchangeUI.Create();
 
-             this.viewCom = _ui.target;
 
-             isfullScreen = true;
 
-             this.clickBlankToClose = false;
 
-             _ui.m_list.itemRenderer = ListItemRenderer;
 
-             _valueBarController = new ValueBarController(_ui.m_valueBar);
 
-         }
 
-         protected override void AddEventListener()
 
-         {
 
-             base.AddEventListener();
 
-             EventAgent.AddEventListener(ConstMessage.SHOP_BUY, UpdateView);
 
-         }
 
-         protected override void OnShown()
 
-         {
 
-             base.OnShown();
 
-             int menu2 = (int)this.viewData;
 
-             _shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_ARENA, menu2);
 
-             _shopCfgs = ShopDataManager.Instance.RemoveNotOpenCfg(_shopCfgs);
 
-             _valueBarController.OnShown();
 
-             _valueBarController.UpdateList(ShopDataManager.Instance.GetShopCostIds(_shopCfgs));
 
-             UpdateView();
 
-         }
 
-         protected override void OnHide()
 
-         {
 
-             base.OnHide();
 
-             _valueBarController.OnHide();
 
-         }
 
-         protected override void RemoveEventListener()
 
-         {
 
-             base.RemoveEventListener();
 
-             EventAgent.RemoveEventListener(ConstMessage.SHOP_BUY, UpdateView);
 
-         }
 
-         private void UpdateView()
 
-         {
 
-             _shopCfgs = ShopDataManager.Instance.SortShopGoodsCfgs(_shopCfgs);
 
-             _ui.m_list.numItems = _shopCfgs.Count;
 
-         }
 
-         private void ListItemRenderer(int index, GObject obj)
 
-         {
 
-             ShopCfg shopCfg = _shopCfgs[index];
 
-             ShopViewManager.Instance.UptadeItem(obj, shopCfg);
 
-             UI_ListShopItem item = UI_ListShopItem.Proxy(obj);
 
-             ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(shopCfg.menu2 == 0 || shopCfg.menu2 == ArenaDataManager.Instance.SeasonId ? shopCfg.costId : shopCfg.oldSeasonCostId);
 
-             item.m_btnBuy.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(costItemCfg.res);
 
-             UI_ListShopItem.ProxyEnd();
 
-         }
 
-     }
 
- }
 
 
  |