public NotifyProgressWebClient(INotifyDownload notifier, string proxyAddress, string proxyUsername, string proxyPassword)
 {
     _notifier      = notifier;
     _proxyAddress  = proxyAddress;
     _proxyUsername = proxyUsername;
     _proxyPassword = proxyPassword;
 }
 public NotifyProgressWebClient(INotifyDownload notifier, string proxyAddress, string proxyUsername, string proxyPassword)
 {
     _notifier = notifier;
     _proxyAddress = proxyAddress;
     _proxyUsername = proxyUsername;
     _proxyPassword = proxyPassword;
 }
 public NotifyProgressWebClient(INotifyDownload notifier)
 {
     _notifier = notifier;
     _webClient.DownloadFileCompleted += DownloadFileCompleted;
     _webClient.DownloadStringCompleted += DownloadStringCompleted;
     _webClient.DownloadDataCompleted += DownloadDataCompleted;
     _webClient.DownloadProgressChanged += DownloadProgressChanged;
 }
 public NotifyProgressWebClient(INotifyDownload notifier)
 {
     _notifier = notifier;
     _webClient.DownloadFileCompleted += DownloadFileCompleted;
     _webClient.DownloadStringCompleted += DownloadStringCompleted;
     _webClient.DownloadDataCompleted += DownloadDataCompleted;
     _webClient.DownloadProgressChanged += DownloadProgressChanged;
     _webProxy.UseDefaultCredentials = true;
     _webClient.Proxy = _webProxy;
 }
        public NotifyProgressWebClient(INotifyDownload notifier, string proxyAddress, string proxyUsername, string proxyPassword)
        {
            _notifier = notifier;
            _webClient.DownloadFileCompleted += DownloadFileCompleted;
            _webClient.DownloadStringCompleted += DownloadStringCompleted;
            _webClient.DownloadDataCompleted += DownloadDataCompleted;
            _webClient.DownloadProgressChanged += DownloadProgressChanged;

            if (proxyAddress != null)
            {
                var proxy = new WebProxy(proxyAddress, false);
                if (proxyUsername != null)
                    proxy.Credentials = new NetworkCredential(proxyUsername, proxyPassword);
                else
                    proxy.UseDefaultCredentials = true;
                _webClient.Proxy = proxy;
            }
            else
                _webClient.Proxy = _webProxy;
        }
Esempio n. 6
0
 public static RemoteInstall FromServer(string uri, INotifyDownload notifier, string proxyAddress, string proxyUsername, string proxyPassword)
 {
     return(new RemoteInstall(true, uri, notifier, proxyAddress, proxyUsername, proxyPassword));
 }
Esempio n. 7
0
 RemoteInstall(bool enabled, string uri, INotifyDownload notifier, string proxyAddress, string proxyUsername, string proxyPassword)
 {
     Enabled   = enabled;
     ServerUri = uri;
     Client    = new NotifyProgressWebClient(notifier, proxyAddress, proxyUsername, proxyPassword);
 }
Esempio n. 8
0
 public static RemoteInstall FromServer(string uri, INotifyDownload notifier, string proxyAddress, string proxyUsername, string proxyPassword)
 {
     return new RemoteInstall(true, uri, notifier, proxyAddress, proxyUsername, proxyPassword);
 }
Esempio n. 9
0
 RemoteInstall(bool enabled, string uri, INotifyDownload notifier, string proxyAddress, string proxyUsername, string proxyPassword)
 {
     Enabled = enabled;
     ServerUri = uri;
     Client = new NotifyProgressWebClient(notifier, proxyAddress, proxyUsername, proxyPassword);
 }
Esempio n. 10
0
 public static RemoteInstall FromServer(string uri, INotifyDownload notifier)
 {
     return new RemoteInstall(true, uri, notifier);
 }
Esempio n. 11
0
 RemoteInstall(bool enabled, string uri, INotifyDownload notifier)
 {
     Enabled = enabled;
     ServerUri = uri;
     Client = new NotifyProgressWebClient(notifier);
 }