public List <LivenessData> FormDailyData(DailyDataType type) { m_dicDailyData[DailyDataType.RiChangHuoDong].Clear(); m_dicDailyData[DailyDataType.XianShiHuoDong].Clear(); m_dicDailyData[DailyDataType.JiJiangKaiShi].Clear(); m_dicDailyData[DailyDataType.ZhouLi].Clear(); for (int i = 0; i < activeList.Count; i++) { DailyDataBase data = GameTableManager.Instance.GetTableItem <DailyDataBase>(activeList[i].type); if (data != null) { int level = MainPlayerHelper.GetPlayerLevel(); if (level >= data.minLevel) { if (data.type == 1) { if (m_dicDailyData.ContainsKey(DailyDataType.RiChangHuoDong)) { m_dicDailyData[DailyDataType.RiChangHuoDong].Add(activeList[i]); } } else if (data.type == 2) { m_dicDailyData[DailyDataType.XianShiHuoDong].Add(activeList[i]); } else { if (IsDailyScheduleInToday(data)) { m_dicDailyData[DailyDataType.XianShiHuoDong].Add(activeList[i]); } else { m_dicDailyData[DailyDataType.JiJiangKaiShi].Add(activeList[i]); } } } else { if (m_dicDailyData.ContainsKey(DailyDataType.JiJiangKaiShi)) { m_dicDailyData[DailyDataType.JiJiangKaiShi].Add(activeList[i]); } } } } return(m_dicDailyData[type]); }
private void OnDailyGridUIEvent(UIEventType eventType, object data, object param) { switch (eventType) { case UIEventType.Click: if (data is UIDailyPushGrid) { UIDailyPushGrid grid = data as UIDailyPushGrid; DailyDataType curType = DataManager.Manager <DailyManager>().GetDailyTypeByID(grid.dailyID); UIPanelBase.PanelJumpData jumpData = new PanelJumpData(); jumpData.Tabs = new int[2]; jumpData.Tabs[0] = 1; jumpData.Tabs[1] = (int)curType; jumpData.Param = grid.dailyID; DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.DailyPanel, jumpData: jumpData); } break; } }
void SetActiveDailyTab(DailyDataType type) { if (m_ctor_TabRoot != null) { UITabGrid tabGrid = m_ctor_TabRoot.GetGrid <UITabGrid>(m_listDataType.IndexOf(curDailyType)); if (tabGrid != null) { tabGrid.SetHightLight(false); } tabGrid = m_ctor_TabRoot.GetGrid <UITabGrid>(m_listDataType.IndexOf(type)); if (tabGrid != null) { tabGrid.SetHightLight(true); } m_trans_DailyNormalRoot.gameObject.SetActive(type != DailyDataType.ZhouLi); m_trans_CalendarPage.gameObject.SetActive(type == DailyDataType.ZhouLi); curDailyType = type; switch (type) { case DailyDataType.RiChangHuoDong: CreateDailyUIList(); break; case DailyDataType.XianShiHuoDong: CreateDailyUIList(); break; case DailyDataType.JiJiangKaiShi: CreateDailyUIList(); break; case DailyDataType.ZhouLi: InitCalendarCreators(); break; } } //面板状态改变 OnPanelStateChanged(); }