Пример #1
0
        public DownloadBeatmapSetRequest(BeatmapSetInfo set, bool noVideo)
        {
            this.noVideo = noVideo;
            BeatmapSet   = set;

            Progressed += (current, total) => DownloadProgressed?.Invoke(Progress = (float)current / total);
        }
 protected void SetProgress(float progress)
 {
     Progress = progress;
     DownloadProgressed?.Invoke(progress);
 }
Пример #3
0
 /// <summary>
 /// Invoke an <see cref="DownloadProgressed"/> event.
 /// </summary>
 /// <param name="bytesTransferred">The number of bytes downloaded so far.</param>
 /// <param name="bytesTotal">The total number of bytes to be downloaded.</param>
 public void OnDownloadProgressed(long bytesTransferred, long bytesTotal) =>
 DownloadProgressed?.Invoke(bytesTransferred, bytesTotal);
Пример #4
0
        protected ArchiveDownloadRequest(TModel model)
        {
            Model = model;

            Progressed += (current, total) => DownloadProgressed?.Invoke(Progress = (float)current / total);
        }