Пример #1
0
        public void patchFile(String path, FileRevision fr)
        {
            FileStream fs = File.OpenWrite(path);

            WebClient wc = new WebClient();

            wc.DownloadFileCompleted += new AsyncCompletedEventHandler(delegate(object source, AsyncCompletedEventArgs args){
                DownloadCompleted(fr);
            });
            wc.DownloadProgressChanged += new DownloadProgressChangedEventHandler(delegate(object source, DownloadProgressChangedEventArgs args)
            {
                DownloadProgress(fr, args);
            });
        }
Пример #2
0
 void DownloadProgress(FileRevision fr, DownloadProgressChangedEventArgs args)
 {
     updateStatus(fr, (uint)args.ProgressPercentage);
 }
Пример #3
0
 void DownloadCompleted(FileRevision fr)
 {
     updateStatus(fr, 100);
 }