/// <summary> /// 钓鱼排行 /// </summary> public void ReqFishRanking() { stRequestOrderListRelationUserCmd_C cmd = new stRequestOrderListRelationUserCmd_C(); cmd.type = OrderListType.OrderListType_FishCoin; NetService.Instance.Send(cmd); }
protected override void OnShow(object data) { base.OnShow(data); if (data != null) { stRequestOrderListRelationUserCmd_C cmd = new stRequestOrderListRelationUserCmd_C(); OrderListType xx = (OrderListType)Enum.Parse(typeof(OrderListType), data.ToString()); cmd.type = xx; NetService.Instance.Send(cmd); } ShowUI(); if (previous != null) { previous.SetSelect(false); } }
private void SetSelectSecondType(uint type, bool force = false) { if (null == mSecondTabCreator) { return; } if (m_uint_activeStype == type && !force) { return; } UISecondTypeGrid sGrid = null; if (m_uint_activeFType != 0) { sGrid = mSecondTabCreator.GetGrid <UISecondTypeGrid>(mlstFirstTabIds.IndexOf(m_uint_activeFType), m_dic[m_uint_activeFType].IndexOf(m_uint_activeStype)); if (null != sGrid) { sGrid.SetHightLight(false); } } m_uint_activeStype = type; if (m_uint_activeFType != 0) { sGrid = mSecondTabCreator.GetGrid <UISecondTypeGrid>(mlstFirstTabIds.IndexOf(m_uint_activeFType), m_dic[m_uint_activeFType].IndexOf(m_uint_activeStype)); if (null != sGrid) { sGrid.SetHightLight(true); } } stRequestOrderListRelationUserCmd_C cmd = new stRequestOrderListRelationUserCmd_C(); if (sGrid != null) { OrderListType xx = (OrderListType)Enum.Parse(typeof(OrderListType), sGrid.name); cmd.type = xx; NetService.Instance.Send(cmd); } }
protected override void OnLoading() { base.OnLoading(); stRequestOrderListRelationUserCmd_C cmd = new stRequestOrderListRelationUserCmd_C(); OrderListType xx = (OrderListType)Enum.Parse(typeof(OrderListType), "OrderListType_Level"); cmd.type = xx; NetService.Instance.Send(cmd); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.RANKDATAREFRESH, EventCallBack); rankDic = DataManager.Manager <RankManager>().GetRankDataByFirstType(); //GameObject obj = UIManager.GetResGameObj(GridID.Uirankgrid) as GameObject; if (m_ctor_RankScroll != null) { m_ctor_RankScroll.RefreshCheck(); m_ctor_RankScroll.Initialize <UIRankGrid>(m_trans_UIRankGrid.gameObject, OnRankGridDataUpdate, OnRankGridUIEvent); } if (mSecondTabCreator == null) { if (null != m_scrollview_TypeScrollView && null == mSecondTabCreator) { mSecondTabCreator = m_scrollview_TypeScrollView.GetComponent <UISecondTabCreatorBase>(); if (null == mSecondTabCreator) { mSecondTabCreator = m_scrollview_TypeScrollView.gameObject.AddComponent <UISecondTabCreatorBase>(); } if (null != mSecondTabCreator) { // GameObject cloneFTemp = UIManager.GetResGameObj(GridID.Uictrtypegrid) as GameObject; // GameObject cloneSTemp = UIManager.GetResGameObj(GridID.Uisecondtypegrid) as GameObject; mSecondTabCreator.Initialize <UISecondTypeGrid>(m_trans_UICtrTypeGrid.gameObject, m_widget_UISecondTypeGrid.gameObject , OnRankGridDataUpdate, OnUpdateSecondTabGrid, OnRankGridUIEvent); } } } List <int> secondTabsNums = new List <int>(); if (null == mlstFirstTabIds) { mlstFirstTabIds = new List <uint>(); } if (m_dic == null) { m_dic = new Dictionary <uint, List <uint> >(); } mlstFirstTabIds.Clear(); m_dic.Clear(); foreach (var i in rankDic) { mlstFirstTabIds.Add(i.Key); secondTabsNums.Add(i.Value.Count); for (int a = 0; a < i.Value.Count; a++) { if (m_dic.ContainsKey(i.Key)) { m_dic[i.Key].Add(i.Value[a].childID); } else { List <uint> li = new List <uint>(); li.Add(i.Value[a].childID); m_dic.Add(i.Key, li); } } } if (null != mSecondTabCreator) { mSecondTabCreator.CreateGrids(secondTabsNums); } }