Beispiel #1
0
        private void OnDownloadProgressChanged(object sender, DownloadFileProgressChangedArgs args)
        {
            if (BytesReceived < args.BytesReceived)
            {
                ////bytes growing? we have connection!
                this.attemptNumber = 1;
            }

            BytesReceived       = args.BytesReceived;
            TotalBytesToReceive = args.TotalBytesToReceive;

            DownloadProgressChanged.SafeInvoke(sender, args);
        }
Beispiel #2
0
 static void OnDownloadProgressChanged(object sender, DownloadFileProgressChangedArgs args)
 {
     Console.Clear();
     Console.WriteLine(args.ProgressPercentage.ToString() + "%");
     //Console.WriteLine("Download {0} bytes from {1} bytes", args.BytesReceived, args.TotalBytesToReceive);
 }
Beispiel #3
0
        private void OnDownloadProgressChanged(object sender, DownloadProgressChangedEventArgs args)
        {
            var e = new DownloadFileProgressChangedArgs(args.ProgressPercentage, args.BytesReceived, args.TotalBytesToReceive);

            OnDownloadProgressChanged(sender, e);
        }