private void Change_Setorder(IUIObject obj) { ListItem listItem = this.m_DropDownList_Setorder.SelectedItem.Data as ListItem; if (this.m_eSolSortType != (SolGuideSlot)((int)listItem.Key)) { this.m_eSolSortType = (SolGuideSlot)((int)listItem.Key); this.SetGuideDataSort(this.bCurrentSeason, this.m_eSolSortType); this.SetViewSolGuide_Data(this.bCurrentSeason, this.bCurrentPage); } }
public void SetGuideGuiSet(bool bElementMark) { this.InitGuideDataSet(); this.SetDropDownList_Season(); this.SetDropDownList_Setorder(); this.m_eSolSortType = SolGuideSlot.SLOTTYPE_GRADE_ASCENDING; this.SetGuideDataSort(this.bCurrentSeason, this.m_eSolSortType); this.SetViewSolGuide_Data(this.bCurrentSeason, this.bCurrentPage); if (!bElementMark) { this.bElementSolCheck = true; this.m_CheckBox_Alchemy.SetCheckState(0); } else { this.bElementSolCheck = false; this.m_CheckBox_Alchemy.SetCheckState(1); } }
private void SetGuideDataSort(byte bSeason, SolGuideSlot eSortType) { List <SolSlotData> list = null; if (this.dicSlotData.ContainsKey(bSeason)) { this.dicSlotData.TryGetValue(bSeason, out list); list.Sort(new Comparison <SolSlotData>(this.CompareSolName)); if (list == null) { TsLog.LogWarning("!!!!!!!!!!!!!!!!!!! Not Data List {0}, {1}", new object[] { bSeason, eSortType }); } else { switch (eSortType) { case SolGuideSlot.SLOTTYPE_NAME: break; case SolGuideSlot.SLOTTYPE_GRADE_ASCENDING: list.Sort(new Comparison <SolSlotData>(this.CompareSolGradeAscend)); break; case SolGuideSlot.SLOTTYPE_GRADE_DESCENDING: list.Sort(new Comparison <SolSlotData>(this.CompareSolGradeDescend)); break; default: TsLog.LogWarning("!!!!!!!!!!!!! Sort Type Error {0}", new object[] { eSortType }); break; } } } }
private void SetDropDownList_Setorder() { this.m_DropDownList_Setorder.SetViewArea(3); this.m_DropDownList_Setorder.Clear(); ListItem listItem = new ListItem(); listItem.Key = SolGuideSlot.SLOTTYPE_GRADE_ASCENDING; listItem.SetColumnStr(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1891")); this.m_DropDownList_Setorder.Add(listItem); ListItem listItem2 = new ListItem(); listItem2.Key = SolGuideSlot.SLOTTYPE_GRADE_DESCENDING; listItem2.SetColumnStr(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1892")); this.m_DropDownList_Setorder.Add(listItem2); ListItem listItem3 = new ListItem(); listItem3.Key = SolGuideSlot.SLOTTYPE_NAME; listItem3.SetColumnStr(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1890")); this.m_DropDownList_Setorder.Add(listItem3); this.m_DropDownList_Setorder.RepositionItems(); this.m_DropDownList_Setorder.SetFirstItem(); this.m_eSolSortType = SolGuideSlot.SLOTTYPE_GRADE_ASCENDING; }