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 DelRoom(int roomunique)
    {
        if (!this.RoomList.ContainsKey(roomunique))
        {
            return;
        }
        this.RoomList.Remove(roomunique);
        if (this.RoomList.Count == 0)
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.WHISPER_DLG);

            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.WHISPER_ROOMLIST_DLG);

            NoticeIconDlg.SetIcon(ICON_TYPE.WHISPER, false);
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.WHISPER_COLOR_DLG);
        }
        else
        {
            using (Dictionary <int, WhisperRoom> .ValueCollection.Enumerator enumerator = this.RoomList.Values.GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    WhisperRoom current = enumerator.Current;
                    this.ChangeRoom(current.Room);
                }
            }
        }
        GS_CHAT_EXIT_REQ gS_CHAT_EXIT_REQ = new GS_CHAT_EXIT_REQ();

        gS_CHAT_EXIT_REQ.nRoomUnique = roomunique;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHAT_EXIT_REQ, gS_CHAT_EXIT_REQ);
    }
Exemple #3
0
 private void SetTitle(int RoomIndex, WhisperRoom Room)
 {
     if (RoomIndex >= 4)
     {
         return;
     }
     this.m_lbGroupTitle[RoomIndex].Text = NrTSingleton <CTextParser> .Instance.GetTextColor("1101") + Room.GetRoomName();
 }
Exemple #4
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();
    }
Exemple #5
0
    public void UpdateList(int roomunique)
    {
        if (this.m_CurChatUnique == roomunique)
        {
            WhisperRoom room = NrTSingleton <WhisperManager> .Instance.GetRoom(this.m_CurChatUnique);

            this.SetList(room);
        }
    }
Exemple #6
0
    private void RefreshChat()
    {
        this._ciWhisperChat.ClearList(true);
        WhisperRoom room = NrTSingleton <WhisperManager> .Instance.GetRoom(this.m_CurChatUnique);

        foreach (ChatMsg current in room.GetMsgQueue())
        {
            this.PushMsg(room.Room, current.Name, current.Msg, current.Color.ToString());
        }
    }
Exemple #7
0
 public void SetTitle(WhisperRoom Room)
 {
     for (int i = 0; i < this.m_RoomUniqueList.Count; i++)
     {
         if (Room.Room == this.m_RoomUniqueList[i])
         {
             this.SetTitle(i, Room);
             break;
         }
     }
 }
 public void ChangeFirstRoom()
 {
     using (Dictionary <int, WhisperRoom> .ValueCollection.Enumerator enumerator = this.RoomList.Values.GetEnumerator())
     {
         if (enumerator.MoveNext())
         {
             WhisperRoom current = enumerator.Current;
             this.ChangeRoom(current.Room);
         }
     }
 }
 public bool IsCheckMSG()
 {
     foreach (int current in this.RoomList.Keys)
     {
         WhisperRoom whisperRoom = this.RoomList[current];
         if (whisperRoom != null && !whisperRoom.CheckMSG)
         {
             return(false);
         }
     }
     return(true);
 }
Exemple #10
0
    private void SetData()
    {
        Dictionary <int, WhisperRoom> roomList = NrTSingleton <WhisperManager> .Instance.GetRoomList();

        foreach (int current in roomList.Keys)
        {
            WhisperRoom whisperRoom = roomList[current];
            if (whisperRoom != null)
            {
                this.AddRoom(current);
                this.SetTitle(whisperRoom);
                this.UpdateList(current);
            }
        }
    }
Exemple #11
0
    private void RangeRoom()
    {
        for (int i = 0; i < 4; i++)
        {
            if (i < this.m_RoomUniqueList.Count)
            {
                WhisperRoom room = NrTSingleton <WhisperManager> .Instance.GetRoom(this.m_RoomUniqueList[i]);

                this.SetTitle(i, room);
                this.ShowHideToggle(i, true);
            }
            else
            {
                this.ShowHideToggle(i, false);
            }
        }
    }
Exemple #12
0
    private void LastMessageTime()
    {
        WhisperRoom room = NrTSingleton <WhisperManager> .Instance.GetRoom(this.m_CurChatUnique);

        DateTime dateTime          = room.ReciveLastMessageTime();
        string   textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2046");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
        {
            textFromInterface,
            "hour",
            dateTime.Hour.ToString("00"),
            "minute",
            dateTime.Minute.ToString("00"),
            "second",
            dateTime.Second.ToString("00")
        });

        this.m_lbLastTime.Text = textFromInterface;
    }