コード例 #1
0
ファイル: MessageDlg.cs プロジェクト: ruikc/TeamTalk5
        private void button1_Click(object sender, EventArgs e)
        {
            if (newmsgTextBox.Text.Length == 0)
            {
                return;
            }

            TextMessage msg;

            msg.nChannelID     = 0;  //only applies to channel messages
            msg.nFromUserID    = ttclient.GetMyUserID();
            msg.szFromUsername = ""; //not required
            msg.nMsgType       = TextMsgType.MSGTYPE_USER;
            msg.nToUserID      = userid;
            msg.szMessage      = newmsgTextBox.Text;
            newmsgTextBox.Text = "";
            if (ttclient.DoTextMessage(msg) > 0)
            {
                NewMessage(msg);
            }
        }