Exemple #1
0
 private void ChangedText(object sender, NetworkReadEventArgs e)
 {
     textBox2.BeginInvoke(
         new Action(() =>
     {
         textBox2.Text += e.Text + "\r\n";
     }));
 }
Exemple #2
0
 private void ChangedText(object sender, NetworkReadEventArgs e)
 {
     textBox2.BeginInvoke(
         new Action(() =>
     {
         textBox2.Text += e.Text + "\r\n";
     }));
     if (e.Text == "Client disconnected.")
     {
         server.ClientClose();
         server.Read();
     }
 }