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(); } }
private void btnConnect_Click(object sender, RoutedEventArgs e) { client.ConnectOrDisconnect(); }