protected override void DealShowData() { if (Data is Dictionary <string, object> ) { Dictionary <string, object> dic = (Dictionary <string, object>)Data; if (dic.ContainsKey(_keyData)) { List <object> agencys = (List <object>)dic[_keyData]; if (ShowGrid) { ClearTrans(ShowGrid.transform); if (Item) { for (int i = 0, count = agencys.Count; i < count; i++) { var obj = NGUITools.AddChild(ShowGrid.gameObject, Item.gameObject); if (obj) { AgencyItem item = obj.GetComponent <AgencyItem>(); if (item) { item.RefreshItem(agencys[i]); } } } ShowGrid.repositionNow = true; } } } } }
protected override void DealShowData() { if (Data is Dictionary <string, object> ) { Dictionary <string, object> dic = (Dictionary <string, object>)Data; dic.TryGetValueWitheKey(out _visible, KeyVisible); if (gameObject.activeInHierarchy) { StartCoroutine(OnVisibleAction.WaitExcuteCalls()); } if (dic.ContainsKey(KeyData)) { List <object> agencys = (List <object>)dic[KeyData]; if (dic.ContainsKey(KeyTabName)) { TabName = dic[KeyTabName].ToString(); if (gameObject.activeInHierarchy) { StartCoroutine(OnTabNameSetAction.WaitExcuteCalls()); } } if (ShowGrid) { ShowGrid.transform.DestroyChildren(); if (Item) { for (int i = 0, count = agencys.Count; i < count; i++) { var obj = ShowGrid.gameObject.AddChild(Item.gameObject); if (obj) { AgencyItem item = obj.GetComponent <AgencyItem>(); if (item) { item.RefreshItem(agencys[i]); } } } ShowGrid.repositionNow = true; } } } } }