Требуется имя метода при подписке на событие скачивания файла - C#
Формулировка задачи:
public void downloadFile(string fileName, System.Windows.Forms.ProgressBar pbb1, System.Net.DownloadProgressChangedEventArgs e, object sender)
{
try
{
WebClient web = new WebClient();
Uri url = new Uri(Settings.clientUrl + fileName);
web.DownloadFileCompleted += new AsyncCompletedEventHandler(temp.client_DownloadFileCompleted);
web.DownloadFileAsync(url, launchPath + "\\" + fileName);
web.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(webClient_DownloadProgressChanged(sender,e,pbb1)); --- тут ошибка
}
catch { }
}
public void webClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e , System.Windows.Forms.ProgressBar pbb)
{
pbb.Value = e.ProgressPercentage;
}Решение задачи: «Требуется имя метода при подписке на событие скачивания файла»
textual
Листинг программы
public void webClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e)
{
pbb.Value = e.ProgressPercentage;
}