Ejemplo n.º 1
0
 public virtual void OnFileDownloaded(FileDownloadCompletedEventArgs args)
 {
     if (this.FileDownloaded != null)
     {
         this.FileDownloaded(this, args);
     }
 }
Ejemplo n.º 2
0
        void client_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
        {
            FileDownloadCompletedEventArgs ex = new FileDownloadCompletedEventArgs();
            ex.Cancelled = e.Cancelled;
            ex.Error = e.Error;
            ex.File = e.UserState as DownloadFileModel;

            this.On_FileDownloadCompleted(ex);
        }
Ejemplo n.º 3
0
            void Manager_FileDownloadCompleted(object sender, FileDownloadCompletedEventArgs e)
            {
                // consider locking here
                // this.downloadUIsPanel.Controls.Remove(this.DownloadUIs[e.File.ID]);
                // this.DownloadUIs.Remove(e.File.ID);

                string exceptionLogFormat = "{0}|{1}|{2}";
                if (e.Error == null && !e.Cancelled)
                {
                    setDownloaded(e.File.ID);
                    success++;

                }
                else
                {
                    downloadExceptions.Add(string.Format(exceptionLogFormat, e.File.ID, e.File.URL, e.Error.Message));
                    failed++;
                }

                refStats();
                if (!stop)
                {
                    LoadDummyDownloadList();
                }
            }
Ejemplo n.º 4
0
        protected virtual void On_FileDownloadCompleted(FileDownloadCompletedEventArgs e)
        {
            if (this.FileDownloadCompleted != null)
            {
                this.FileDownloadCompleted(this, e);
            }

            this.Start();
        }