Ejemplo n.º 1
0
        private void DownloadComplete(object sender, MyDownloadEventArgs eventArgs)
        {
            FilesDownloaded++;
            SetFilesToDownloadProgress();
            TotalDownloadProgress = FilesDownloaded / TotalFilesToDownload;

            if (Downloads.All(x => x.Download.State == CurrentDownloadState.Finish))
            {
                AllDownloadsComplete();
            }
        }
Ejemplo n.º 2
0
        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);
                    }
                }
            }
        }
Ejemplo n.º 3
0
 bool IExplicitHasValue.ExplicitHasValue()
 {
     return(!string.IsNullOrWhiteSpace(Version) &&
            !string.IsNullOrWhiteSpace(Description) &&
            Downloads != null && Downloads.All(x => x.HasValue()));
 }