private void ReportProgressToBanner(float value) { if (value <= 100.0f) { Banner.IsProgressing = true; Banner.Progress = value; Banner.FullTitle = $"{Banner.Title} ({value:0.00}%)"; statusCenterActions.UpdateBanner(Banner); statusCenterActions.UpdateMedianProgress(); return; } else { Debugger.Break(); // Argument out of range :( } Banner.IsProgressing = false; statusCenterActions.UpdateBanner(Banner); }
private void ReportProgressToBanner(float value) { if (CancellationToken.IsCancellationRequested) // file operation has been cancelled, so don't update the progress text { return; } if (value <= 100.0f) { Banner.IsProgressing = value < 100.0f; Banner.Progress = value; Banner.FullTitle = $"{Banner.Title} ({value:0.00}%)"; statusCenterActions.UpdateBanner(Banner); statusCenterActions.UpdateMedianProgress(); } else { Debugger.Break(); // Argument out of range :( } }