示例#1
0
        private void SendMSG()
        {
            Connection.Connection.SendData("CHAT;" + MessageTXT.Text);
            MessageTXT.Clear();

            MessageTXT.SelectionStart = MessageTXT.TextLength;
            MessageTXT.Focus();
        }
示例#2
0
        public void AddMessage(string Message)
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new Action <string>(AddMessage), Message);
                return;
            }
            ChatAreaRTB.Text = ChatAreaRTB.Text + "\n" + Message;

            ChatAreaRTB.SelectionStart = ChatAreaRTB.TextLength;
            ChatAreaRTB.ScrollToCaret();

            ChatAreaRTB.Focus();

            MessageTXT.SelectionStart = MessageTXT.TextLength;
            MessageTXT.Focus();
        }