Exemple #1
0
 private void OnSendMsgButtonClick(object sender, EventArgs e)
 {
     udpServer.SendMsg(SendMsgTextBox.Text);
     MessageDisplayTextBox.AppendText(SendMsgTextBox.Text + System.Environment.NewLine);
     MessageDisplayTextBox.Refresh();
     Switch2FirstLine();
 }
Exemple #2
0
 private void OnSendMsgButtonClick(object sender, EventArgs e)
 {
     udpClient.SendMsg(MessageTextBox.Text);
     MessageDisplayTextBox.AppendText(MessageTextBox.Text + "\r\n");
     MessageDisplayTextBox.Refresh();
     MessageTextBox.Clear();
 }
Exemple #3
0
 private void OnMsgKeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         udpServer.SendMsg(SendMsgTextBox.Text);
         MessageDisplayTextBox.AppendText(SendMsgTextBox.Text + System.Environment.NewLine);
         MessageDisplayTextBox.Refresh();
         Switch2FirstLine();
     }
 }
Exemple #4
0
 private void OnKeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         udpClient.SendMsg(MessageTextBox.Text);
         MessageDisplayTextBox.AppendText(MessageTextBox.Text + "\r\n");
         MessageDisplayTextBox.Refresh();
         MessageTextBox.Clear();
     }
 }
Exemple #5
0
        private void AppendToMessageDisplayTextBox(string text)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new Action <string>(AppendToMessageDisplayTextBox), text);
                return;
            }

            MessageDisplayTextBox.AppendText(SetEnvironmentNewLineCharacters(text));
        }
Exemple #6
0
 private void OnUpdateRecvMessage(string msg)
 {
     if (MessageDisplayTextBox.InvokeRequired)
     {
         UdpServer.OnReceivceMsg recvMessage = new UdpServer.OnReceivceMsg(OnUpdateRecvMessage);
         this.Invoke(recvMessage, msg);
     }
     else
     {
         MessageDisplayTextBox.AppendText(msg + System.Environment.NewLine);
         MessageDisplayTextBox.Refresh();
     }
 }
Exemple #7
0
 private void OnUpdateRecvMessage(string msg)
 {
     if (MessageDisplayTextBox.InvokeRequired)
     {
         UdpClient.OnReceivceMsg recvMessage = new UdpClient.OnReceivceMsg(OnUpdateRecvMessage);
         this.Invoke(recvMessage, msg);
     }
     else
     {
         MessageDisplayTextBox.AppendText(msg + "\r\n");
         MessageDisplayTextBox.Refresh();
     }
 }
Exemple #8
0
 private void AppendTextToMessageDisplayTextBox(string text)
 {
     MessageDisplayTextBox.BeginInvokeOnUIThread(t => MessageDisplayTextBox.AppendText(t), text);
 }