//private void ReadDataFromServer() // { // while (true) // { // try // { // //int ss=Strings.InStr(ll.ReceiveStr,"\0"); // int ss = ll.ReceiveMsg.IndexOf("\0"); // if (ll.ReceiveMsg != "" && ss==-1) // { // //MessageBox.Show(ll.ReceiveStr); // ww.AddRichText(ref richTextBox1, ll.ReceiveMsg + "\r\n"); // //ll.ReceiveStr = ""; // } // ll.ReceiveMsg = ""; // } // catch (Exception)// ex) // { // } // } // } private void btnSend_Click(object sender, EventArgs e) { if (!(Test == null)) { if (richTextBox2.Text != "") { Test.Send(richTextBox2.Text); } else { MessageBox.Show("The contents you want to send is empty."); richTextBox2.Focus(); } } else { MessageBox.Show("You did not open the client station."); } }