Beispiel #1
0
        private void buttonDiscussSend_Click(object sender, EventArgs e)
        {
            if (listBoxDiscuss.SelectedItem != null)
            {
                string[] tmp           = listBoxDiscuss.SelectedItem.ToString().Split(':');
                string   MessageToSend = textBoxDiscussSend.Text;
                textBoxDiscussSend.Clear();

                SmartQQ.Message_Send(2, tmp[0], MessageToSend, false);

                AddAndReNewTextBoxDiscussChat(tmp[0], ("手动发送:" + Environment.NewLine + MessageToSend));
            }
        }
Beispiel #2
0
        private void buttonSend_Click(object sender, EventArgs e)
        {
            if ((textBoxSendMessage.Text.Equals("")) || (!(IsFriendSelent || IsGroupSelent)))
            {
                return;
            }

            if (IsGroupSelent && listBoxGroup.SelectedItem != null)
            {
                string   GName         = "";
                string[] tmp           = listBoxGroup.SelectedItem.ToString().Split(':');
                string   MessageToSend = textBoxSendMessage.Text;

                SmartQQ.Message_Send(1, tmp[0], MessageToSend);

                if (SmartQQ.GroupList.ContainsKey(tmp[0]))
                {
                    GName = SmartQQ.GroupList[tmp[0]].name;
                }
                AddTextToTextBoxResiveMessage("发送至   " + GName + Environment.NewLine + textBoxSendMessage.Text);
            }
            else if (IsFriendSelent && listBoxFriend.SelectedItem != null)
            {
                string   Nick          = "";
                string[] tmp           = listBoxFriend.SelectedItem.ToString().Split(':');
                string   MessageToSend = textBoxSendMessage.Text;

                SmartQQ.Message_Send(0, tmp[0], MessageToSend);

                if (SmartQQ.FriendList.ContainsKey(tmp[0]))
                {
                    Nick = SmartQQ.FriendList[tmp[0]].nick;
                }
                AddTextToTextBoxResiveMessage("发送至   " + Nick + "   " + SmartQQ.Info_RealQQ(tmp[0]) + Environment.NewLine + textBoxSendMessage.Text);
            }
            textBoxSendMessage.Clear();
        }