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();
    }
Beispiel #2
0
    private void SetList(WhisperRoom Room)
    {
        List <WhisperUser> users = Room.GetUsers();

        if (users == null)
        {
            return;
        }
        this.m_InviteList.Clear();
        foreach (WhisperUser current in users)
        {
            ListItem       listItem     = new ListItem();
            NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(current.nFaceKind);

            if (charKindInfo == null)
            {
                TsLog.LogError("WhisperUser NrCharKindInfo == NULL  FaceKind = {0}", new object[]
                {
                    current.nFaceKind
                });
            }
            listItem.SetColumnGUIContent(0, charKindInfo.GetCharKind(), false);
            listItem.SetColumnStr(1, current.Name, NrTSingleton <CTextParser> .Instance.GetTextColor("1101"));
            string text       = string.Empty;
            string strTextKey = string.Empty;
            switch (current.byPlayState)
            {
            case 0:
                strTextKey = "2142";
                break;

            case 1:
                strTextKey = "2143";
                break;

            case 2:
                strTextKey = "2144";
                break;

            default:
                TsLog.LogWarning("byPlayState = {0}", new object[]
                {
                    current.byPlayState
                });
                strTextKey = "2142";
                break;
            }
            text = string.Format("({0})", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(strTextKey));
            TsLog.LogWarning("UserState = {0}", new object[]
            {
                text
            });
            listItem.SetColumnStr(2, text, NrTSingleton <CTextParser> .Instance.GetTextColor("1101"));
            listItem.Key = current;
            this.m_InviteList.Add(listItem);
        }
        this.m_InviteList.RepositionItems();
    }