private void downloadStarted(DownloadStartedEventArgs args) { lock (this.monitor) { this.OpenFileIfNecessary(); } }
protected virtual void OnDownloadStarted(DownloadStartedEventArgs args) { if (this.DownloadStarted != null) { this.DownloadStarted(args); } }
private static void OnDownloadStarted(object sender, DownloadStartedEventArgs e) { AverageSpeed?.Clear(); ConsoleProgress = new ProgressBar(10000, $"Downloading {Path.GetFileName(e.FileName)} ...", ProcessBarOption); ChildConsoleProgresses = new ConcurrentDictionary <string, ChildProgressBar>(); }
private async void Updater_DownloadingStarted(object sender, DownloadStartedEventArgs e) { progressDialog = await MainWindow.ShowProgressAsync($"Downloading update - {e.Version}", "Estimated time left: 0 sec (0 kB of 0 kB downloaded)\n" + "Time spent: 0 sec"); progressDialog.Minimum = 0; progressDialog.Maximum = 100; }
private void OnDownloadStarted(DownloadStartedEventArgs args) { lock (this.monitor) { this.downloadSizes[args.Download] = args.CheckResult.Size; this.alreadyDownloadedSizes[args.Download] = args.AlreadyDownloadedSize; } }
} // SegmentDownloadCompleted #endregion #region OnEvent() methods protected virtual void OnDownloadStarted(object sender, DownloadStartedEventArgs e) { if (DownloadStarted == null) { return; } DownloadStarted(sender, e); } // OnDownloadStarted
} // DvbStpEnhancedClient.SegmentDownloadCompletedEventArgs #endregion #region FireEvent() methods protected virtual void FireDownloadStarted() { if (DownloadStarted == null) { return; } var e = new DownloadStartedEventArgs() { SegmentsCount = this.Payloads.Count }; OnDownloadStarted(this, e); } // FireDownloadStarted
void Download_DownloadStarted(object sender, DownloadStartedEventArgs args) { if (MessageBox.Show("Download file " + args.SuggestedFileName + "?", "Download", MessageBoxButtons.YesNo) == DialogResult.Yes) { size = args.FileSize; label1.Text = args.SuggestedFileName; this.Text = "Download " + args.SuggestedFileName; label2.Text = "0"; this.Show(); } else { Download.Cancel(); this.Close(); } }
/// <summary> /// Method used to handle the event. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">The task information.</param> private void OnDownloadStarted(object sender, TaskEventArgs e) { if (e.Task != null) { e.Task.State = DownloadTaskState.Downloading; DownloadRegistryManager.Current.UpdateTask(e.Task); if (DownloadStarted != null) { var eventArgs = new DownloadStartedEventArgs(e.Task.DownloadItem); DownloadStarted(this, eventArgs); if (eventArgs.Cancel) { CancelDownload(eventArgs.DownloadItem); } } } }
private void downloadStarted(DownloadStartedEventArgs args) { var download = args.Download; bool shouldNotifyDownloadStarted = false; lock (this.monitor) { if (download == this.currentDownload) { if (!this.downloadStartedNotified) { shouldNotifyDownloadStarted = true; this.downloadStartedNotified = true; } } } if (shouldNotifyDownloadStarted) { this.OnDownloadStarted(new DownloadStartedEventArgs(this, args.CheckResult, args.AlreadyDownloadedSize)); } }
private void OnDownloadStarted(object sender, DownloadStartedEventArgs e) { Model.FilePath = e.FileName; Dispatcher.Invoke(DelegateCommandBase.InvalidateRequerySuggested); }
private void updater_DownloadStarted(object sender, DownloadStartedEventArgs e) { //UpdateList("Inizio aggiornamento del manifest: " + e.Manifest.ManifestId); //filesProgressBar.Maximum = e.Manifest.Files.Count; }
} // SegmentDownloadCompleted #endregion #region OnEvent() methods protected virtual void OnDownloadStarted(object sender, DownloadStartedEventArgs e) { DownloadStarted?.Invoke(sender, e); } // OnDownloadStarted