From 3aed3a5deffc5909e7ab812260c42ad8ec9194bf Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Wed, 30 Jun 2021 21:55:22 -0600 Subject: [PATCH] Added "indeterminate" progress bar mode to beginning of Step3. --- AaxDecrypter/AaxcDownloadConverter.cs | 1 + LibationWinForms/BookLiberation/DecryptForm.cs | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/AaxDecrypter/AaxcDownloadConverter.cs b/AaxDecrypter/AaxcDownloadConverter.cs index 9c97aaab..6cb90ee6 100644 --- a/AaxDecrypter/AaxcDownloadConverter.cs +++ b/AaxDecrypter/AaxcDownloadConverter.cs @@ -152,6 +152,7 @@ namespace AaxDecrypter public bool Step3_DownloadAndCombine() { + DecryptProgressUpdate?.Invoke(this, int.MaxValue); bool userSuppliedChapters = chapters != null; string metadataPath = null; diff --git a/LibationWinForms/BookLiberation/DecryptForm.cs b/LibationWinForms/BookLiberation/DecryptForm.cs index 0c03c76f..6788a774 100644 --- a/LibationWinForms/BookLiberation/DecryptForm.cs +++ b/LibationWinForms/BookLiberation/DecryptForm.cs @@ -64,7 +64,14 @@ namespace LibationWinForms.BookLiberation if (percentage == 0) remainingTimeLbl.UIThread(() => remainingTimeLbl.Text = "ETA:\r\n0 sec"); - progressBar1.UIThread(() => progressBar1.Value = percentage); + if (percentage == int.MaxValue) + progressBar1.UIThread(() => progressBar1.Style = ProgressBarStyle.Marquee); + else + progressBar1.UIThread(() => + { + progressBar1.Value = percentage; + progressBar1.Style = ProgressBarStyle.Blocks; + }); } public void UpdateRemainingTime(TimeSpan remaining)