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);
                return;
            }
            else
            {
                Debugger.Break(); // Argument out of range :(
            }

            Banner.IsProgressing = false;
            statusCenterActions.UpdateBanner(Banner);
        }
示例#2
0
        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 = 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);
        }