private TcpClient createClient() { var dialog = new DefaultClientDialog(); dialog.ShowDialog(); if (dialog.DialogResult == DialogResult.OK) { var settings = dialog.TcpSettings; return(new TcpClient(settings)); } return(null); }
private HttpClient createClient(InstanceLogger logger) { var dialog = new DefaultClientDialog(); dialog.ShowDialog(); if (dialog.DialogResult == DialogResult.OK) { var settings = dialog.TcpSettings; return(new HttpClient(new HttpClientSettings { TcpSettings = settings }, logger)); } return(null); }