Exemple #1
0
        /// <summary>
        /// 显示新的聊天信息
        /// </summary>
        /// <param name="subItem"></param>
        private void AppendNewMessage(ChatItem subItem)
        {
            var selectChatStore = subItem.GetChatStore();

            if (selectChatStore != null)
            {
                if (selectChatStore.NewMessageList != null)
                {
                    foreach (ChatMessage item in selectChatStore.NewMessageList)
                    {
                        AppendMessage(item, false);
                    }
                    GlobalVariable.SaveChatMessage(smsPanel1, subItem.UserName);
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// 加载聊天历史记录
        /// </summary>
        private void LoadChatMessage(ChatItem subItem)
        {
            var chatStore = subItem.GetChatStore();

            if (chatStore == null)
            {
                return;
            }
            if (chatStore.HistoryContent == null)
            {
                chatStore.HistoryContent = new smsPanel();
                panelControl2.Controls.Add(chatStore.HistoryContent);
            }
            smsPanel1 = chatStore.HistoryContent;
            chatStore.HistoryContent.BringToFront();
        }
Exemple #3
0
        /// <summary>
        /// 加载聊天历史记录
        /// </summary>
        private void LoadChatMessage(ChatItem subItem)
        {
            var chatStore = subItem.GetChatStore();

            if (chatStore == null)
            {
                return;
            }
            if (chatStore.HistoryMessagePanel == null)
            {
                chatStore.HistoryMessagePanel = new smsPanel();
                panMessage.Controls.Add(chatStore.HistoryMessagePanel);
            }
            smsPanel1 = chatStore.HistoryMessagePanel;
            chatStore.HistoryMessagePanel.BringToFront();
        }