Example #1
0
    //时时创建UI cell
    void ChatCellUpdata()
    {
        int count = mChatArray.Count;

        for (int i = 0; i < count; i++)
        {
            if (mChatCellStructList.Count > _MaxNum)
            {
                mChatCellStructList.Dequeue()._UIMessageChatCell.dealloc();
            }

            SockWorldChatData _tempdata = mChatArray.Dequeue();
            ChatCellStruct    _ChatCellStruct;
            if (CheckNormalOrVideo(_tempdata.content))
            {
                _ChatCellStruct = new ChatCellStruct(CreateMessageChatCell(), _tempdata, ChatCellType.ChatCellType_NORMAL, _NowCount);
            }
            else
            {
                _ChatCellStruct = new ChatCellStruct(CreateMessageChatCell(), _tempdata, ChatCellType.ChatCellType_VIDEO, _NowCount);
            }
            _ChatCellStruct._UIMessageChatCell.OnShow(_ChatCellStruct._SockWorldChatData, _ChatCellStruct._ChatCellType);
            mChatCellStructList.Enqueue(_ChatCellStruct);
        }
    }
Example #2
0
 public void DeleteChatCell()
 {
     for (int i = 0; i < mChatCellStructList.Count; i++)
     {
         ChatCellStruct _ChatCellStruct = mChatCellStructList.Dequeue();
         _ChatCellStruct._UIMessageChatCell.dealloc();
         mChatCellStructList.Enqueue(_ChatCellStruct);
     }
 }
Example #3
0
 //聊天列表设置内容
 void SetChatListAllData()
 {
     for (int i = 0; i < mChatCellStructList.Count; i++)
     {
         ChatCellStruct mm = mChatCellStructList.Dequeue();
         mm._UIMessageChatCell.OnShow(mm._SockWorldChatData, mm._ChatCellType);
         mChatCellStructList.Enqueue(mm);
     }
 }
Example #4
0
    //Init列表设置内容
    void SetChatListData()
    {
        for (int i = 0; i < mChatCellStructList.Count; i++)
        {
            ChatCellStruct mm = mChatCellStructList.Dequeue();
            if (mm._UIMessageChatCell == null)
            {
                mm.SetCellScript(CreateMessageChatCell());
            }
//			mm._UIMessageChatCell.OnShow(mm._SockWorldChatData,mm._ChatCellType);
            mChatCellStructList.Enqueue(mm);
        }
    }