private void ShowListBox() { this.m_ListBox.Clear(); WhisperRoom room = NrTSingleton <WhisperManager> .Instance.GetRoom(this.m_RoomUnique); List <WhisperUser> users = room.GetUsers(); List <long> list = new List <long>(); foreach (WhisperUser current in users) { list.Add(current.PersonID); } for (int i = 0; i < this.m_CommunityUserList.Count; i++) { COMMUNITY_USER_INFO cOMMUNITY_USER_INFO = this.m_CommunityUserList[i]; if (cOMMUNITY_USER_INFO != null && !list.Contains(cOMMUNITY_USER_INFO.i64PersonID) && cOMMUNITY_USER_INFO.bConnect) { NewListItem newListItem = new NewListItem(this.m_ListBox.ColumnNum, true, string.Empty); newListItem.SetListItemData(0, cOMMUNITY_USER_INFO.strName, null, null, null); newListItem.SetListItemData(1, NrTSingleton <UIDataManager> .Instance.GetString("Lv ", cOMMUNITY_USER_INFO.i16Level.ToString()), null, null, null); newListItem.SetListItemData(2, CommunityUI_DLG.CommunityIcon(cOMMUNITY_USER_INFO), null, null, null); newListItem.Data = cOMMUNITY_USER_INFO; this.m_ListBox.Add(newListItem); } } this.m_ListBox.RepositionItems(); }
public void UpdateList() { this.m_lxList.Clear(); string empty = string.Empty; string empty2 = string.Empty; int num = (this.m_Page.CURRENT_PAGE - 1) * 14; int num2 = Mathf.Min(num + 14, this.m_CommunityUserList.Count); for (int i = num; i < num2; i++) { COMMUNITY_USER_INFO cOMMUNITY_USER_INFO = this.m_CommunityUserList[i]; NewListItem newListItem = new NewListItem(this.m_lxList.ColumnNum, true, string.Empty); CommunityUI_DLG.CurrentLocationName(cOMMUNITY_USER_INFO, ref empty, ref empty2); newListItem.SetListItemData(0, this.GetLoaderImg(CommunityUI_DLG.CommunityIcon(cOMMUNITY_USER_INFO)), null, null, null); newListItem.SetListItemData(1, cOMMUNITY_USER_INFO.strName, null, null, null); newListItem.SetListItemData(2, cOMMUNITY_USER_INFO.i16Level.ToString(), null, null, null); newListItem.SetListItemData(3, NrTSingleton <CTextParser> .Instance.GetTextColor(empty2) + empty, null, null, null); newListItem.Data = cOMMUNITY_USER_INFO; this.m_lxList.Add(newListItem); } this.m_lxList.RepositionItems(); this.m_bxCurrentPage.Text = string.Format("{0}/{1}", this.m_Page.CURRENT_PAGE, this.m_Page.MAX_PAGE); }