示例#1
0
 private void btnConnect_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Client.ServerEndpoint = new IPEndPoint(IPAddress.Parse(serverAddress.Text), 50);
         client.ConnectOrDisconnect();
     }
     catch (Exception ex)
     {
         Client.ServerEndpoint = new IPEndPoint(IPAddress.Parse("192.168.10.3"), 50);
         client.ConnectOrDisconnect();
     }
 }
示例#2
0
 private void btnConnect_Click(object sender, RoutedEventArgs e)
 {
     client.ConnectOrDisconnect();
 }