From 20becbe5760fa2c5d9f07c00558513aa4c59f00a Mon Sep 17 00:00:00 2001 From: naoey Date: Sat, 9 Sep 2017 01:53:42 +0530 Subject: [PATCH] Use the specifically created progress action, add license header. --- osu.Game/Online/API/Requests/DownloadBeatmapSetRequest.cs | 5 ++++- osu.Game/Overlays/Direct/DirectPanel.cs | 8 +------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/osu.Game/Online/API/Requests/DownloadBeatmapSetRequest.cs b/osu.Game/Online/API/Requests/DownloadBeatmapSetRequest.cs index 28473d9f66..0ba4adf9c9 100644 --- a/osu.Game/Online/API/Requests/DownloadBeatmapSetRequest.cs +++ b/osu.Game/Online/API/Requests/DownloadBeatmapSetRequest.cs @@ -1,4 +1,7 @@ -using osu.Game.Beatmaps; +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Beatmaps; using System; namespace osu.Game.Online.API.Requests diff --git a/osu.Game/Overlays/Direct/DirectPanel.cs b/osu.Game/Overlays/Direct/DirectPanel.cs index 7f0c8ac350..4bf3442453 100644 --- a/osu.Game/Overlays/Direct/DirectPanel.cs +++ b/osu.Game/Overlays/Direct/DirectPanel.cs @@ -60,13 +60,7 @@ namespace osu.Game.Overlays.Direct Logger.Error(e, "Failed to get beatmap download information"); }; - downloadRequest.Progress += (current, total) => - { - float progress = (float)current / total; - - progressBar.Current.Value = progress; - - }; + downloadRequest.DownloadProgressed += progress => progressBar.Current.Value = progress; downloadRequest.Success += data => {