Пример #1
0
        private TcpClient createClient()
        {
            var dialog = new DefaultClientDialog();

            dialog.ShowDialog();
            if (dialog.DialogResult == DialogResult.OK)
            {
                var settings = dialog.TcpSettings;
                return(new TcpClient(settings));
            }
            return(null);
        }
Пример #2
0
        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);
        }