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; }
public static RemoteInstall FromServer(string uri, INotifyDownload notifier, string proxyAddress, string proxyUsername, string proxyPassword) { return(new RemoteInstall(true, uri, notifier, proxyAddress, proxyUsername, proxyPassword)); }
RemoteInstall(bool enabled, string uri, INotifyDownload notifier, string proxyAddress, string proxyUsername, string proxyPassword) { Enabled = enabled; ServerUri = uri; Client = new NotifyProgressWebClient(notifier, proxyAddress, proxyUsername, proxyPassword); }
public static RemoteInstall FromServer(string uri, INotifyDownload notifier, string proxyAddress, string proxyUsername, string proxyPassword) { return new RemoteInstall(true, uri, notifier, proxyAddress, proxyUsername, proxyPassword); }
public static RemoteInstall FromServer(string uri, INotifyDownload notifier) { return new RemoteInstall(true, uri, notifier); }
RemoteInstall(bool enabled, string uri, INotifyDownload notifier) { Enabled = enabled; ServerUri = uri; Client = new NotifyProgressWebClient(notifier); }