private void DownloadComplete(object sender, MyDownloadEventArgs eventArgs) { FilesDownloaded++; SetFilesToDownloadProgress(); TotalDownloadProgress = FilesDownloaded / TotalFilesToDownload; if (Downloads.All(x => x.Download.State == CurrentDownloadState.Finish)) { AllDownloadsComplete(); } }
void DownloadProgress(object sender, DownloadProgressEventArgs e) { if (e.State == DownloadState.Completed) { if (Pending.Count() > 0) { Start(); } if (Downloads.All(a => a.IsCompleted)) { if (Completed != null) { Completed(this, EventArgs.Empty); } } } }
bool IExplicitHasValue.ExplicitHasValue() { return(!string.IsNullOrWhiteSpace(Version) && !string.IsNullOrWhiteSpace(Description) && Downloads != null && Downloads.All(x => x.HasValue())); }