void OnUpdataGridData(UIGridBase grid, int index) { if (grid is UIDeliverGrid) { UIDeliverGrid tab = grid as UIDeliverGrid; if (index < m_lstTransfers.Count) { tab.SetGridData(index); tab.SetData(m_lstTransfers[index]); } } if (grid is UITabGrid) { UITabGrid tab = grid as UITabGrid; if (index < m_lst_TabType.Count) { tab.SetGridData(index); if (m_dic_TabName.ContainsKey(m_lst_TabType[index])) { tab.SetName(m_dic_TabName[m_lst_TabType[index]]); } tab.SetHightLight(index == activedIndex); } } }
private void OnGridUpdate(UIGridBase gridBase, int index) { if (gridBase is UITabGrid) { UITabGrid tGrid = gridBase as UITabGrid; Category c = null; if (category.TryGetCategory(selectfTabID, out c)) { Category s = c.ChildCategoryData[index]; tGrid.SetGridData(s.Id); tGrid.SetName(s.Name, 3); tGrid.SetHightLight(s.Id == selectsTabID); } } else if (gridBase is UIExchangeGrid) { UIExchangeGrid eGrid = gridBase as UIExchangeGrid; Category f = null; Category s = null; if (category.TryGetCategory(selectfTabID, out f) && f.TryGetCategory(selectsTabID, out s)) { eGrid.SetGridData(s.Datas[index]); eGrid.SetHightLight(s.Datas[index] == selectExchangeId); } } }
private void InitWidgets() { m_mgr = DataManager.Manager <ClanManger>(); m_dic_clanPanlTabs = new Dictionary <ClanPanelMode, UITabGrid>(); m_dic_clanPanlTs = new Dictionary <ClanPanelMode, Transform>(); UITabGrid grid = null; Transform ts = null; if (null != m_trans_FunctioToggles && null != m_trans_LeftContent) { for (ClanPanelMode i = ClanPanelMode.None + 1; i < ClanPanelMode.Max; i++) { ts = m_trans_FunctioToggles.Find("Clan" + i.ToString()); if (null != ts) { grid = ts.GetComponent <UITabGrid>(); if (null == grid) { grid = ts.gameObject.AddComponent <UITabGrid>(); } grid.SetGridData(i); grid.RegisterUIEventDelegate(OnUIGridEventDlg); grid.SetHightLight(false); m_dic_clanPanlTabs.Add(i, grid); } ts = m_trans_LeftContent.Find(i.ToString() + "Content"); if (null != ts) { m_dic_clanPanlTs.Add(i, ts); } } } }
protected override void OnLoading() { base.OnLoading(); RegisterGlobalUIEvent(true); m_lst_datas = new List <uint>(); if (null != m_input_Input) { m_input_Input.onChange.Add(new EventDelegate(() => { m_str_inpuSearchInfo = TextManager.GetTextByWordsCountLimitInUnicode(m_input_Input.value , TextManager.CONST_NAME_MAX_WORDS); m_input_Input.value = m_str_inpuSearchInfo; })); m_input_Input.onSubmit.Add(new EventDelegate(() => { m_str_inpuSearchInfo = TextManager.GetTextByWordsCountLimitInUnicode(m_input_Input.value , TextManager.CONST_NAME_MAX_WORDS); m_input_Input.value = m_str_inpuSearchInfo; })); } m_dic_tabs = new Dictionary <ClanDeclareMode, UITabGrid>(); m_dic_ts = new Dictionary <ClanDeclareMode, Transform>(); UITabGrid tab = null; Transform ts = null; for (ClanDeclareMode i = ClanDeclareMode.None + 1; i < ClanDeclareMode.Max; i++) { if (null != m_trans_ToggleContent) { ts = m_trans_ToggleContent.Find(i.ToString()); if (null == ts) { continue; } tab = ts.GetComponent <UITabGrid>(); if (null == tab) { tab = ts.gameObject.AddComponent <UITabGrid>(); } tab.SetGridData(i); tab.RegisterUIEventDelegate(OnGridEventDlg); m_dic_tabs.Add(i, tab); } if (null != m_trans_Content) { ts = m_trans_Content.Find(i.ToString()); if (null == ts) { continue; } m_dic_ts.Add(i, ts); } } SetMode(ClanDeclareMode.History, true); }
private void InitEquipPosWidgets() { if (null == m_dic_EquipPartDic) { m_dic_EquipPartDic = new Dictionary <EquipPartMode, UITabGrid>(); } m_dic_EquipPartDic.Clear(); StructEquipPartInlayData(); //生成装备部位 if (null != m_ctor_InlayScrollView && null != m_trans_UIEquipPosStatusGrid) { m_ctor_InlayScrollView.RefreshCheck(); m_ctor_InlayScrollView.Initialize <UIEquipPosStatusGrid>(m_trans_UIEquipPosStatusGrid.gameObject , OnUpdateInlayGrid, OnInlayGridUIEventDlg); } //列表 if (null == m_dic_EquipPartDic) { m_dic_EquipPartDic = new Dictionary <EquipPartMode, UITabGrid>(); } m_dic_EquipPartDic.Clear(); if (null == m_trans_PartTab) { Engine.Utility.Log.Error("ForgingPanel->InitForgingWidgets failed Transform ListTab null"); } else { UITabGrid tabGrid = null; Transform ts = null; for (EquipPartMode i = EquipPartMode.AttackPart; i < EquipPartMode.Max; i++) { ts = m_trans_PartTab.Find(i.ToString() + "Tab"); if (null == ts) { continue; } tabGrid = ts.GetComponent <UITabGrid>(); if (null == tabGrid) { tabGrid = ts.gameObject.AddComponent <UITabGrid>(); } tabGrid.SetGridData(i); tabGrid.RegisterUIEventDelegate(OnUIEventCallback); tabGrid.SetName(GetEquipPartModeName(i)); tabGrid.SetHightLight(false); m_dic_EquipPartDic.Add(i, tabGrid); } } RefreshAllTab(); }
/// <summary> /// 商城格子数据刷新 /// </summary> /// <param name="grid"></param> /// <param name="index"></param> private void OnUpdateMallGridData(UIGridBase grid, int index) { if (grid is UITabGrid) { if (index > DailyTabValues.Count) { Engine.Utility.Log.Error("DailyPanel OnUpdateMallGridData faield,mallTabDic data errir"); return; } UITabGrid tabGrid = grid as UITabGrid; tabGrid.SetName(DailyTabValues[index]); tabGrid.SetHightLight(activeTabId == index ? true : false); tabGrid.SetGridData(index); } else if (grid is UIDailyGrid) { DailyDataBase data = dailyDataList[index]; if (DataManager.Manager <DailyManager>().ActiveDic.ContainsKey(data.id)) { LivenessData list = DataManager.Manager <DailyManager>().ActiveDic[data.id]; if (data != null && list != null) { UIDailyGrid dailyGrid = grid as UIDailyGrid; dailyGrid.SetDailyData(data, list); dailyGrid.SetSelect(index == m_lstDailyID.IndexOf(selectDailyId)); dailyGrid.onClickDailyGrid = onClickDailyGrid; } } } else if (grid is UIDailyCalendarGrid) { UIDailyCalendarGrid data = grid as UIDailyCalendarGrid; if (data != null) { data.SetGridData(dailyIDs[index]); data.SetBg(todayIsMatch); } } else if (grid is UIDailyRewardGrid) { UIDailyRewardGrid data = grid as UIDailyRewardGrid; if (data != null) { if (index < m_lstRewardID.Count) { data.SetGridData(m_lstRewardID[index]); } } } }
/// <summary> /// 单元格刷新委托 /// </summary> /// <param name="gridBase"></param> /// <param name="index"></param> private void OnUIGridUpdate(UIGridBase grid, int index) { if (grid is UITabGrid) { UITabGrid tab = grid as UITabGrid; tab.SetGridData((ConsignmentItemMode)(index + 1)); tab.SetName(tabNames[index]); if (previous == null && index == 0) { tab.SetHightLight(true); previous = tab; } } }
/// <summary> /// 初始化仓库 /// </summary> private void InitWareHouse() { if (IsInitMode(KnapsackStatus.WareHouse)) { return; } SetInitMode(KnapsackStatus.WareHouse); Transform ts = null; UITabGrid tab = null; m_dic_wareHouseTabs = new Dictionary <GameCmd.PACKAGETYPE, UITabGrid>(); if (null != m_trans_WareHouseContent) { for (GameCmd.PACKAGETYPE i = GameCmd.PACKAGETYPE.PACKAGETYPE_STORE1; i <= GameCmd.PACKAGETYPE.PACKAGETYPE_STORE3; i++) { ts = m_trans_WareHouseContent.Find(GetWareHouseTabNameByStore(i)); if (null == ts) { continue; } tab = ts.GetComponent <UITabGrid>(); if (null == tab) { tab = ts.gameObject.AddComponent <UITabGrid>(); } if (null != tab) { tab.SetGridData(i); tab.RegisterUIEventDelegate(OnWareHouseGridUIEvent); tab.SetHightLight(false); m_dic_wareHouseTabs.Add(i, tab); } } } wareHouseItems = new List <uint>(); if (null != m_ctor_WareHouseItemGridScrollView && null != m_trans_UIItemGrid) { GameObject wareHosueGridClone = UIManager.GetResGameObj(GridID.Uiitemgrid) as GameObject; m_ctor_WareHouseItemGridScrollView.RefreshCheck(); //m_ctor_WareHouseItemGridScrollView.Initialize<UIItemGrid>((uint)GridID.Uiitemgrid // , UIManager.OnObjsCreate, UIManager.OnObjsRelease // , OnWareHouseGridDataUpdate, OnWareHouseGridUIEvent); m_ctor_WareHouseItemGridScrollView.Initialize <UIItemGrid>(m_trans_UIItemGrid.gameObject , OnWareHouseGridDataUpdate, OnWareHouseGridUIEvent); } }
/// <summary> /// 商城格子数据刷新 /// </summary> /// <param name="grid"></param> /// <param name="index"></param> private void OnUpdateMallGridData(UIGridBase grid, int index) { if (grid is UIMallGrid) { if (index >= m_lst_mallDatas.Count) { Engine.Utility.Log.Error("MallPanel OnUpdateMallGridData faield,m_lst_mallDatas data errir"); return; } UIMallGrid mallGrid = grid as UIMallGrid; MallDefine.MallLocalData data = DataManager.Manager <MallManager>().GetMallLocalDataByMallItemId(m_lst_mallDatas[index]); if (null == data) { Engine.Utility.Log.Error("MallPanel OnUpdateMallGridData faield,mall data errir index:{0}", index); return; } mallGrid.SetGridData(data.MallId); bool select = (data.MallId == selectMallItemId) ? true : false; mallGrid.SetHightLight(select); } else if (grid is UITabGrid) { if (index > m_lst_mallTabDatas.Count) { Engine.Utility.Log.Error("MallPanel OnUpdateMallGridData faield,m_lst_mallTabDatas data errir"); return; } int tabKey = m_lst_mallTabDatas[index]; int startDepth = 2 + m_lst_mallTabDatas.Count * 2 - index * 2; UITabGrid tabGrid = grid as UITabGrid; tabGrid.SetName(DataManager.Manager <MallManager>().GetMallTagName((int)activeStore, tabKey)); tabGrid.SetHightLight(activeTabId == tabKey ? true : false); tabGrid.SetGridData(tabKey); tabGrid.SetDepth(startDepth); } else if (grid is UIToggleGrid) { UIToggleGrid tog = grid as UIToggleGrid; uint shopID = DataManager.Manager <Mall_NpcShopManager>().GetNpcShopKey(index); string shopName = DataManager.Manager <Mall_NpcShopManager>().GetNpcShopName(index); tog.SetName(shopName); tog.SetHightLight((uint)activeStore == shopID?true:false); tog.SetGridTab((int)shopID); } }
private void InitWidgets() { m_mgr = DataManager.Manager <ClanManger>(); m_dic_Toggles = new Dictionary <ClanCreateMode, UITabGrid>(); m_dic_trans = new Dictionary <ClanCreateMode, Transform>(); Transform ts = null; UITabGrid tab = null; for (ClanCreateMode i = ClanCreateMode.None; i < ClanCreateMode.Max; i++) { if (null != m_trans_FunctioToggles) { ts = m_trans_FunctioToggles.Find(i.ToString()); if (null != ts) { tab = ts.GetComponent <UITabGrid>(); if (null == tab) { tab = ts.gameObject.AddComponent <UITabGrid>(); } if (null != tab) { tab.SetGridData(i); tab.SetHightLight(false); tab.RegisterUIEventDelegate(OnUIGridEventDlg); m_dic_Toggles.Add(i, tab); } } } if (null != m_trans_FucContent) { ts = m_trans_FucContent.Find(i.ToString()); if (null == ts) { continue; } m_dic_trans.Add(i, ts); } } }
void OnRideViewGridDataUpdate(UIGridBase data, int index) { if (data is UITabGrid) { UITabGrid tab = data as UITabGrid; tab.SetGridData(index + 1); tab.SetName(nameList[index]); bool active = (index == 0); tab.SetHightLight(active); if (active) { rideViewTabIndex = index; OnSelectTabs(1); } } else if (data is UIRideViewGrid) { if (m_lstRidedatasShow != null && index < m_lstRidedatasShow.Count) { data.SetGridData(m_lstRidedatasShow[index]); } } }
/// <summary> /// 随身商店格子滑动数据更新回调 /// </summary> /// <param name="data"></param> /// <param name="index"></param> private void OnCarryShopGridDataUpdate(UIGridBase grid, int index) { if (grid is UIMallGrid) { if (index >= m_lst_shopids.Count) { Engine.Utility.Log.Error("KnapsackPanel OnCarryShopGridDataUpdate faield,mallItemIdsDic data errir"); return; } UIMallGrid mallGrid = grid as UIMallGrid; MallDefine.MallLocalData data = DataManager.Manager <MallManager>().GetMallLocalDataByMallItemId(m_lst_shopids[index]); if (null == data) { Engine.Utility.Log.Error("KnapsackPanel OnCarryShopGridDataUpdate faield,mall data errir index:{0}", index); return; } mallGrid.SetGridData(data.MallId); bool select = (data.MallId == selectMallItemId) ? true : false; mallGrid.SetHightLight(select); } else if (grid is UITabGrid) { if (index > m_lst_shoptabs.Count) { Engine.Utility.Log.Error("KnapsackPanel OnCarryShopGridDataUpdate faield,mallTabDic data errir"); return; } int tabKey = m_lst_shoptabs[index]; int startDepth = 2 + m_lst_shoptabs.Count * 2 - index * 2; UITabGrid tabGrid = grid as UITabGrid; tabGrid.SetHightLight(activeTabId == tabKey ? true : false); tabGrid.SetGridData(tabKey); tabGrid.SetName(DataManager.Manager <MallManager>().GetMallTagName((int)GameCmd.CommonStore.CommonStore_Three, tabKey)); tabGrid.SetDepth(startDepth); } }
private void InitWidgets() { Transform cloneObj = null;// UIManager.GetObj((uint)GridID.Uiiteminfogrid); if (null != m_trans_ItemBaseGridRoot) { cloneObj = m_trans_ItemBaseGridRoot.GetChild(0); } if (null != cloneObj && null == m_exchangeItemBaseGrid) { m_exchangeItemBaseGrid = cloneObj.GetComponent <UIItemInfoGrid>(); if (null == m_exchangeItemBaseGrid) { m_exchangeItemBaseGrid = cloneObj.gameObject.AddComponent <UIItemInfoGrid>(); } if (null != m_exchangeItemBaseGrid) { m_exchangeItemBaseGrid.RegisterUIEventDelegate((eventType, data, param) => { if (eventType == UIEventType.Click) { //if (null != CurrentMallData && null != CurrentMallData.LocalItem) //{ // TipsManager.Instance.ShowItemTips(CurrentMallData.LocalItem); //} } }); } m_trans_ItemBaseGridRoot.localScale = new Vector3(0.9f, 0.9f, 0.9f); } if (null != m_ctor_RightTabRoot && null != m_trans_TogglePanel) { m_ctor_RightTabRoot.Initialize <UITabGrid>(m_trans_TogglePanel.gameObject , (gridBase, index) => { UITabGrid gGRid = gridBase as UITabGrid; if (null != gGRid) { Category tc = category.ChildCategoryData[index]; gGRid.SetGridData(tc.Id); gGRid.SetName(tc.Name); gGRid.SetHightLight((tc.Id == selectfTabID)); } } , (eventType, data, param) => { if (eventType == UIEventType.Click) { UITabGrid gGRid = data as UITabGrid; SetFirstActiveTab((uint)gGRid.Data); } }); } if (null != m_ctor_CategoryTagContent && null != m_trans_UITabGrid) { m_ctor_CategoryTagContent.Initialize <UITabGrid>(m_trans_UITabGrid.gameObject, OnGridUpdate, OnGridEventDlg); } if (null != m_ctor_ExchangeScrollView && null != m_trans_UIExchangeGrid) { m_ctor_ExchangeScrollView.Initialize <UIExchangeGrid>(m_trans_UIExchangeGrid.gameObject, OnGridUpdate, OnGridEventDlg); } }
private void InitProccessWidgets() { if (IsInitStatus(ForgingPanelMode.Proccess)) { return; } SetInitStatus(ForgingPanelMode.Proccess, true); //装备 GameObject preObj = UIManager.GetResGameObj(GridID.Uiitemgrowshowgrid) as GameObject; if (null != preObj) { GameObject cloneObj = null; if (null != m_trans_ProcessInfoRoot && null == m_processGrowShow) { cloneObj = NGUITools.AddChild(m_trans_ProcessInfoRoot.gameObject, preObj); if (null != cloneObj) { m_processGrowShow = cloneObj.GetComponent <UIItemGrowShowGrid>(); if (null == m_processGrowShow) { m_processGrowShow = cloneObj.AddComponent <UIItemGrowShowGrid>(); } m_processGrowShow.RegisterUIEventDelegate(OnUIEventCallback); } } preObj = UIManager.GetResGameObj(GridID.Uiproccessgrid) as GameObject; if (null != m_trans_ProcessCostRoot && null == m_processRsGrowShow) { cloneObj = NGUITools.AddChild(m_trans_ProcessCostRoot.gameObject, preObj); if (null != cloneObj) { m_processRsGrowShow = cloneObj.GetComponent <UIProccessGrid>(); if (null == m_processRsGrowShow) { m_processRsGrowShow = cloneObj.AddComponent <UIProccessGrid>(); } m_processRsGrowShow.RegisterUIEventDelegate((eventType, data, param) => { if (eventType == UIEventType.Click) { if (data is UIItemInfoGrid) { UIItemInfoGrid infoGrid = data as UIItemInfoGrid; if (null != infoGrid && infoGrid.NotEnough && null != param && param is uint) { ShowItemGet((uint)param); } } else if (data is UIProccessGrid) { if (IsPanelMode(ForgingPanelMode.Proccess)) { if (!IsProccessMode(ForgingProccessMode.Fetch)) { if (null != param) { m_uint_selectRSBaseId = 0; m_processRsGrowShow.SetGridData(m_uint_selectRSBaseId, needUnload: true); } else { OnSelectProcessRuneStone(); } } } } } }); } } } if (null == m_dic_fpTabs) { m_dic_fpTabs = new Dictionary <ForgingProccessMode, UITabGrid>(); } m_dic_fpTabs.Clear(); Transform ts = null; if (null != m_trans_ProcessTabs) { UITabGrid tGrid = null; for (ForgingProccessMode i = ForgingProccessMode.Promote; i < ForgingProccessMode.Max; i++) { ts = m_trans_ProcessTabs.Find(i.ToString() + "Tab"); if (null == ts) { continue; } tGrid = ts.GetComponent <UITabGrid>(); if (null == tGrid) { tGrid = ts.gameObject.AddComponent <UITabGrid>(); } tGrid.SetGridData(i); tGrid.RegisterUIEventDelegate(OnUIEventCallback); tGrid.SetHightLight(false); m_dic_fpTabs.Add(i, tGrid); } } if (null == m_dic_propCurGrids) { m_dic_propCurGrids = new Dictionary <ForgingProccessPropertyIndex, UIEquipPropertyGrid>(); } m_dic_propCurGrids.Clear(); if (null == m_dic_propNextGrids) { m_dic_propNextGrids = new Dictionary <ForgingProccessPropertyIndex, UIEquipPropertyGrid>(); } m_dic_propNextGrids.Clear(); if (null == m_dic_propCBs) { m_dic_propCBs = new Dictionary <ForgingProccessPropertyIndex, UIToggle>(); } m_dic_propCBs.Clear(); UIEquipPropertyGrid uPGrid = null; UIToggle toggle = null; //属性格子 for (ForgingProccessPropertyIndex i = ForgingProccessPropertyIndex.One ; i < ForgingProccessPropertyIndex.Max; i++) { if (null != m_trans_ProccessPropertyContentRoot) { //Cur ts = Util.findTransform(m_trans_ProccessPropertyContentRoot, i.ToString() + "CPP"); if (null != ts) { uPGrid = ts.GetComponent <UIEquipPropertyGrid>(); if (null == uPGrid) { uPGrid = ts.gameObject.AddComponent <UIEquipPropertyGrid>(); } m_dic_propCurGrids.Add(i, uPGrid); } //Nex ts = Util.findTransform(m_trans_ProccessPropertyContentRoot, i.ToString() + "NPP"); if (null != ts) { uPGrid = ts.GetComponent <UIEquipPropertyGrid>(); if (null == uPGrid) { uPGrid = ts.gameObject.AddComponent <UIEquipPropertyGrid>(); } m_dic_propNextGrids.Add(i, uPGrid); } //CheckBox ts = Util.findTransform(m_trans_ProccessPropertyContentRoot, i.ToString() + "CB"); if (null != ts) { toggle = ts.GetComponent <UIToggle>(); if (null == uPGrid) { toggle = ts.gameObject.AddComponent <UIToggle>(); } m_dic_propCBs.Add(i, toggle); } } } SetProccessMode(ForgingProccessMode.Promote, true); //InitPromote(); //InitRemove(); //InitFetch(); }
/// <summary> /// 买格子数据刷新 /// </summary> /// <param name="grid"></param> /// <param name="index"></param> private void OnUpdateGridData(UIGridBase grid, int index) { //买 if (grid is UIHomeTradeBuyGrid) { if (index >= m_dicMallItem[m_nSelectTabId].Count) { Engine.Utility.Log.Error("Out Of Index !!!"); return; } UIHomeTradeBuyGrid buyGrid = grid as UIHomeTradeBuyGrid; if (buyGrid == null) { return; } HomeTradeDataBase htDb = GameTableManager.Instance.GetTableItem <HomeTradeDataBase>(m_dicMallItem[m_nSelectTabId][index]);//大管家 if (htDb == null) { Engine.Utility.Log.Error("Can Not Find Data !!!"); return; } SeedAndCubDataBase data = GameTableManager.Instance.GetTableItem <SeedAndCubDataBase>(htDb.itemID);//种子幼崽表中取 if (data == null) { Engine.Utility.Log.Error("Can Not Find Data !!!"); return; } buyGrid.SetGridData(htDb.indexId); buyGrid.SetIcon(data.icon); buyGrid.SetName(data.name); buyGrid.SetNum(htDb.pileNum); //叠加数量 buyGrid.SetPrice((GameCmd.MoneyType)htDb.moneyType, htDb.price); //现在的价格 bool select = (htDb.indexId == m_nSelectMallItemId) ? true : false; buyGrid.SetHightLight(select); //buyGrid.SetTag(""); } //卖 else if (grid is UIHomeTradeSellGrid) { if (index >= m_dicMallItem[m_nSelectTabId].Count) { Engine.Utility.Log.Error("Out Of Index !!!"); return; } UIHomeTradeSellGrid sellGrid = grid as UIHomeTradeSellGrid; if (sellGrid == null) { return; } HomeTradeDataBase htDb = GameTableManager.Instance.GetTableItem <HomeTradeDataBase>(m_dicMallItem[m_nSelectTabId][index]); if (htDb == null) { Engine.Utility.Log.Error("Can Not Find Data !!!"); return; } ItemDataBase data = GameTableManager.Instance.GetTableItem <ItemDataBase>(htDb.itemID);//item表中取 if (data == null) { Engine.Utility.Log.Error("Can Not Find Data !!!"); return; } CropLivestock cropLivestock = m_dicCropLivestock[data.itemID]; sellGrid.SetGridData(htDb.indexId); sellGrid.SetIcon(data.itemIcon); sellGrid.SetName(data.itemName); sellGrid.SetNum(htDb.pileNum); //叠加数量 sellGrid.SetPrice((GameCmd.MoneyType)htDb.moneyType, (uint)cropLivestock.m_nPrice, cropLivestock.m_fPriceChangeRate, cropLivestock.m_bUp); //现在的价格 bool select = (htDb.indexId == m_nSelectMallItemId) ? true : false; sellGrid.SetHightLight(select); //buyGrid.SetTag(""); } //页签 else if (grid is UITabGrid) { if (index > m_lstHomeTradeTab.Count) { Engine.Utility.Log.Error("Can Not Find Data !!!"); return; } UITabGrid tabGrid = grid as UITabGrid; if (grid == null) { return; } tabGrid.SetGridData(m_lstHomeTradeTab[index]); tabGrid.SetName(m_dicHomeTradeTab[m_lstHomeTradeTab[index]]); bool select = m_lstHomeTradeTab[index] == m_nSelectTabId ? true : false; tabGrid.SetHightLight(select); } }