private void OnDownloadProgressChanged(object sender, DownloadFileProgressChangedArgs args) { if (this.BytesReceived < args.BytesReceived) { ////bytes growing? we have connection! this.attemptNumber = 1; } this.BytesReceived = args.BytesReceived; this.TotalBytesToReceive = args.TotalBytesToReceive; DownloadProgressChanged.SafeInvoke(sender, args); }
private void OnDownloadProgressChanged(object sender, DownloadProgressChangedEventArgs args) { DownloadFileProgressChangedArgs e = new DownloadFileProgressChangedArgs(args.ProgressPercentage, args.BytesReceived, args.TotalBytesToReceive); this.OnDownloadProgressChanged(sender, e); }