Ejemplo n.º 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);
            });
        }
Ejemplo n.º 2
0
 void DownloadProgress(FileRevision fr, DownloadProgressChangedEventArgs args)
 {
     updateStatus(fr, (uint)args.ProgressPercentage);
 }
Ejemplo n.º 3
0
 void DownloadCompleted(FileRevision fr)
 {
     updateStatus(fr, 100);
 }