示例#1
0
        /// <summary>
        /// 讨论组消息处理
        /// </summary>
        /// <param name="value">poll包中的value</param>
        private static void Message_Process_DisscussMessage(JsonPollMessage.paramResult.paramValue value)
        {
            string message    = Message_Process_GetMessageText(value.content);
            string DName      = "讨论组";
            string SenderNick = "未知";

            if (!DisscussList.ContainsKey(value.did))
            {
                Info_DisscussList();
            }
            if (DisscussList.ContainsKey(value.did))
            {
                DName += DisscussList[value.did].name;
                if (DisscussList[value.did].MemberList.ContainsKey(value.send_uin))
                {
                    SenderNick = DisscussList[value.did].MemberList[value.send_uin].nick;
                }
            }
            else
            {
                DName = "未知讨论组";
            }
            if (Info_RealQQ(value.send_uin).Equals("1000000"))
            {
                SenderNick = "系统消息";
            }
            Program.MainForm.AddTextToTextBoxResiveMessage(DName + "   " + SenderNick + "  " + Info_RealQQ(value.send_uin) + Environment.NewLine + message);
            RuiRui.AnswerMessage(value.did, message, 2);
        }
示例#2
0
        /// <summary>
        /// 私聊消息处理
        /// </summary>
        /// <param name="value">poll包中的value</param>
        private static void Message_Process_Message(JsonPollMessage.paramResult.paramValue value)
        {
            string message = Message_Process_GetMessageText(value.content);
            string nick    = "未知";

            if (!FriendList.ContainsKey(value.from_uin))
            {
                Info_FriendList();
            }
            if (FriendList.ContainsKey(value.from_uin))
            {
                nick = FriendList[value.from_uin].nick;
            }
            Program.MainForm.AddTextToTextBoxResiveMessage(nick + "  " + Info_RealQQ(value.from_uin) + Environment.NewLine + message);
            RuiRui.AnswerMessage(value.from_uin, message, 0);
        }
示例#3
0
        /// <summary>
        /// 群聊消息处理
        /// </summary>
        /// <param name="value">poll包中的value</param>
        private static void Message_Process_GroupMessage(JsonPollMessage.paramResult.paramValue value)
        {
            string message = Message_Process_GetMessageText(value.content);
            string gid     = value.from_uin;
            string gno     = AID_GroupKey(gid);

            if (gno.Equals("FAIL"))
            {
                return;
            }
            string nick = "未知";

            if (GroupList[gid].MemberList.ContainsKey(value.send_uin))
            {
                nick = GroupList[gid].MemberList[value.send_uin].nick;
            }
            if (Info_RealQQ(value.send_uin).Equals("1000000"))
            {
                nick = "系统消息";
            }
            Program.MainForm.AddAndReNewTextBoxGroupChat(value.from_uin, (GroupList[gid].name + "   " + nick + "  " + Info_RealQQ(value.send_uin) + Environment.NewLine + message), false);
            RuiRui.AnswerGroupMessage(gid, message, value.send_uin, gno);
        }