mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Allow download progress to 100%
This commit is contained in:
parent
3b7bf97682
commit
35078e49b4
@ -418,10 +418,8 @@ namespace Bloxstrap
|
|||||||
Dialog.ProgressStyle = ProgressBarStyle.Continuous;
|
Dialog.ProgressStyle = ProgressBarStyle.Continuous;
|
||||||
|
|
||||||
// compute total bytes to download
|
// compute total bytes to download
|
||||||
foreach (var package in VersionPackageManifest)
|
foreach (Package package in VersionPackageManifest)
|
||||||
{
|
|
||||||
TotalBytes += package.PackedSize;
|
TotalBytes += package.PackedSize;
|
||||||
}
|
|
||||||
|
|
||||||
ProgressIncrement = (double)1 / TotalBytes * 100;
|
ProgressIncrement = (double)1 / TotalBytes * 100;
|
||||||
|
|
||||||
@ -433,6 +431,9 @@ namespace Bloxstrap
|
|||||||
await DownloadPackage(package);
|
await DownloadPackage(package);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// allow progress bar to 100% before continuing (purely ux reasons lol)
|
||||||
|
await Task.Delay(1000);
|
||||||
|
|
||||||
Dialog.ProgressStyle = ProgressBarStyle.Marquee;
|
Dialog.ProgressStyle = ProgressBarStyle.Marquee;
|
||||||
|
|
||||||
Debug.WriteLine("Finished downloading");
|
Debug.WriteLine("Finished downloading");
|
||||||
|
Loading…
Reference in New Issue
Block a user