| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 | 
							- using UI.CommonGame;
 
- using FairyGUI;
 
- namespace GFGGame
 
- {
 
-     public class SuitPartsDetailView : BaseWindow
 
-     {
 
-         private UI_SuitPartsDetailUI _ui;
 
-         private int[] _items;
 
-         public override void Dispose()
 
-         {
 
-             base.Dispose();
 
-             _items = null;
 
-         }
 
-         protected override void OnInit()
 
-         {
 
-             base.OnInit();
 
-             packageName = UI_SuitPartsDetailUI.PACKAGE_NAME;
 
-             _ui = UI_SuitPartsDetailUI.Create();
 
-             this.viewCom = _ui.target;
 
-             this.modal = true;
 
-             this.viewCom.Center();
 
-             _ui.m_listParts.itemRenderer = ListPartsItemRenderer;
 
-             // _ui.m_listParts.onClickItem.Add(OnClickListPartsItem);
 
-         }
 
-         protected override void OnShown()
 
-         {
 
-             base.OnShown();
 
-             int suitId = (int)this.viewData;
 
-             _items = SuitCfgManager.Instance.GetSuitItems(suitId);
 
-             _ui.m_listParts.numItems = _items.Length;
 
-             if(_ui.m_listParts.numItems > 0)
 
-             {
 
-                 _ui.m_listParts.ScrollToView(0);
 
-             }
 
-             // _ui.m_listParts.ResizeToFit();
 
-             _ui.target.Center();
 
-         }
 
-         protected override void OnHide()
 
-         {
 
-             base.OnHide();
 
-         }
 
-         private void ListPartsItemRenderer(int index, GObject obj)
 
-         {
 
-             int itemId = _items[index];
 
-             ItemData reward = ItemUtil.createItemData(itemId, 1);
 
-             if (obj.data == null)
 
-             {
 
-                 obj.data = new ItemView(obj as GComponent);
 
-             }
 
-             (obj.data as ItemView).SetData(reward);
 
-             (obj.data as ItemView).TxtHasCountVisble = false;
 
-             bool haveItem = DressUpMenuItemDataManager.CheckHasItem(itemId);
 
-             (obj.data as ItemView).ImgNotGotVisible = !haveItem;
 
-         }
 
-         private void OnClickListPartsItem(EventContext context)
 
-         {
 
-             GComponent item = context.data as GComponent;
 
-             int itemId = (int)item.data;
 
-             bool haveItem = DressUpMenuItemDataManager.CheckHasItem(itemId);
 
-             if (haveItem)
 
-             {
 
-                 GoodsItemTipsController.ShowItemTips(itemId);
 
-             }
 
-             else
 
-             {
 
-                 this.Hide();
 
-                 ViewManager.Show(ViewName.APPROACH_OF_ITEM_VIEW, new object[] { itemId, new object[] { ViewName.SUIT_GUIDE_VIEW, this.viewData } });
 
-             }
 
-         }
 
-     }
 
- }
 
 
  |