Exemplo n.º 1
0
 private void downloadStopped(SDEventArgs args)
 {
     lock (this.monitor)
     {
         this.CloseFile();
     }
 }
Exemplo n.º 2
0
 private void OnDownloadCompleted(SDEventArgs args)
 {
     lock (this.monitor)
     {
         this.alreadyDownloadedSizes[args.Download] = this.downloadSizes[args.Download];
     }
 }
Exemplo n.º 3
0
 protected virtual void OnDownloadStopped(SDEventArgs args)
 {
     if (this.DownloadStopped != null)
     {
         this.DownloadStopped(args);
     }
 }
Exemplo n.º 4
0
        private void downloadCompleted(SDEventArgs args)
        {
            lock (this.monitor)
            {
                var resumingDownload = (ResumingDownload)args.Download;
                this.downloads.Remove(resumingDownload);
            }

            this.StartDownloadOfNextRange();
        }
Exemplo n.º 5
0
        private void downloadCompleted(SDEventArgs args)
        {
            lock (this.monitor)
            {
                this.CloseDownload();
                this.state    = SDState.Finished;
                this.stopping = true;
            }

            this.OnDownloadCompleted(new SDEventArgs(this));
        }
Exemplo n.º 6
0
        private void OnStoped(SDEventArgs args)
        {
            if (InvokeRequired)
            {
                Invoke(new MethodInvoker(() => OnStoped(args)));
                return;
            }
            isDownloading = false;
            button1.Text  = "Download";

            StatusLabel.Text   = "Speed: 0 MB/s";
            RemTimeLabel.Text  = "Remaining time: 00:00:00";
            label1.Text        = "";
            progressBar1.Value = 0;
        }
Exemplo n.º 7
0
        private void downloadCompleted(SDEventArgs args)
        {
            lock (this.monitor)
            {
                this.CloseFile();
                if (File.Exists(TPath))
                {
                    if (File.Exists(FPath))
                    {
                        File.Delete(FPath);
                    }

                    File.Move(TPath, FPath);
                }
            }
        }
Exemplo n.º 8
0
 void DownloadCompleted(SDEventArgs args)
 {
     OnCompleted?.Invoke(args);
 }
Exemplo n.º 9
0
 void DataStopped(SDEventArgs args)
 {
     OnStopped?.Invoke(args);
 }