Ejemplo n.º 1
0
 private void DownloadFile(String id, FileEndpoints endpoints, Int32 position)
 {
     var uploadedFileUrl = this.ExtractUploadedFileUrl(position);
     DirectoryHelper.GetOrCreateDirectory(endpoints.Target.DirectoryName);
     this.OnProgressChanged(new CompressProgressChangedEventArgs(id, endpoints, 60));
     this.WebClient.DownloadFile(uploadedFileUrl, endpoints.Target.FilePath);
     this.OnProgressChanged(new CompressProgressChangedEventArgs(id, endpoints, 100));
     this.OnCompleted(new CompressCompletedEventArgs(id, endpoints));
 }
Ejemplo n.º 2
0
        private void DownloadFile(String id, FileEndpoints endpoints, Int32 position)
        {
            var uploadedFileUrl = this.ExtractUploadedFileUrl(position);

            DirectoryHelper.GetOrCreateDirectory(endpoints.Target.DirectoryName);
            this.OnProgressChanged(new CompressProgressChangedEventArgs(id, endpoints, 60));
            this.WebClient.DownloadFile(uploadedFileUrl, endpoints.Target.FilePath);
            this.OnProgressChanged(new CompressProgressChangedEventArgs(id, endpoints, 100));
            this.OnCompleted(new CompressCompletedEventArgs(id, endpoints));
        }
Ejemplo n.º 3
0
 public CompressCompletedEventArgs(String id, FileEndpoints endpoints)
 {
     this.Id = id;
     this.Endpoints = endpoints;
 }
Ejemplo n.º 4
0
 public CompressProgressChangedEventArgs(String id, FileEndpoints endpoints, Single progressPercentage)
 {
     this.Id = id;
     this.Endpoints = endpoints;
     this.ProgressPercentage = progressPercentage;
 }
Ejemplo n.º 5
0
 private void UploadFile(String id, FileEndpoints endpoints)
 {
     this.OnProgressChanged(new CompressProgressChangedEventArgs(id, endpoints, 10));
     this.UploadElement.SendKeys(endpoints.Source.FilePath);
     this.OnProgressChanged(new CompressProgressChangedEventArgs(id, endpoints, 50));
 }
Ejemplo n.º 6
0
 private void UploadFile(String id, FileEndpoints endpoints)
 {
     this.OnProgressChanged(new CompressProgressChangedEventArgs(id, endpoints, 10));
     this.UploadElement.SendKeys(endpoints.Source.FilePath);
     this.OnProgressChanged(new CompressProgressChangedEventArgs(id, endpoints, 50));
 }
Ejemplo n.º 7
0
 public CompressCompletedEventArgs(String id, FileEndpoints endpoints)
 {
     this.Id        = id;
     this.Endpoints = endpoints;
 }
Ejemplo n.º 8
0
 public CompressProgressChangedEventArgs(String id, FileEndpoints endpoints, Single progressPercentage)
 {
     this.Id                 = id;
     this.Endpoints          = endpoints;
     this.ProgressPercentage = progressPercentage;
 }