public void RefreshRedPoint() { for (int i = 0; i < this.tabList.get_Count(); i++) { Tab.TAB type = this.tabList.get_Item(i); bool subPageRedPoint = Activity7DayManager.Instance.GetSubPageRedPoint((int)type, this.dayNum); Transform transform = this.btnPages[i].get_transform().FindChild("redPoint"); transform.get_gameObject().SetActive(subPageRedPoint); } for (int j = 0; j < 7; j++) { bool dayRedPoint = Activity7DayManager.Instance.GetDayRedPoint(j + 1); Transform transform2 = this.btnDays[j].get_transform().FindChild("redPoint"); transform2.get_gameObject().SetActive(dayRedPoint); } }
public void RefreshBtnPages(int day) { this.tabList.Clear(); this.pageTab = -1; List <RawInfo> list = Activity7DayManager.Instance.GetRawInfoList(day, 0, false); Dictionary <Tab.TAB, bool> dictionary = new Dictionary <Tab.TAB, bool>(); for (int i = 0; i < list.get_Count(); i++) { RawInfo rawInfo = list.get_Item(i); dictionary.set_Item(rawInfo.tab, true); } using (Dictionary <Tab.TAB, bool> .Enumerator enumerator = dictionary.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <Tab.TAB, bool> current = enumerator.get_Current(); this.tabList.Add(current.get_Key()); } } this.tabList.Sort((Tab.TAB a, Tab.TAB b) => a.CompareTo(b)); for (int j = 0; j < this.btnPages.Length; j++) { GameObject gameObject = this.btnPages[j].get_gameObject(); if (j < this.tabList.get_Count()) { Tab.TAB tAB = this.tabList.get_Item(j); gameObject.SetActive(true); gameObject.get_transform().FindChild("Text").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(this.strTypeName.get_Item(tAB), false)); } else { gameObject.SetActive(false); } } if (this.tabList.get_Count() > 0) { this.pageTab = 0; } }