private void downloadStopped(SDEventArgs args) { lock (this.monitor) { this.CloseFile(); } }
private void OnDownloadCompleted(SDEventArgs args) { lock (this.monitor) { this.alreadyDownloadedSizes[args.Download] = this.downloadSizes[args.Download]; } }
protected virtual void OnDownloadStopped(SDEventArgs args) { if (this.DownloadStopped != null) { this.DownloadStopped(args); } }
private void downloadCompleted(SDEventArgs args) { lock (this.monitor) { var resumingDownload = (ResumingDownload)args.Download; this.downloads.Remove(resumingDownload); } this.StartDownloadOfNextRange(); }
private void downloadCompleted(SDEventArgs args) { lock (this.monitor) { this.CloseDownload(); this.state = SDState.Finished; this.stopping = true; } this.OnDownloadCompleted(new SDEventArgs(this)); }
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; }
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); } } }
void DownloadCompleted(SDEventArgs args) { OnCompleted?.Invoke(args); }
void DataStopped(SDEventArgs args) { OnStopped?.Invoke(args); }