From a0512315b0efd205bed7855b90fecea5b0f469e7 Mon Sep 17 00:00:00 2001 From: NeoCoderMatrix86 <40752681+NeoCoderMatrix86@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:43:38 +0200 Subject: [PATCH 1/5] Update ModalExportdialog.razor --- AudioCuesheetEditor/Shared/ModalExportdialog.razor | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/AudioCuesheetEditor/Shared/ModalExportdialog.razor b/AudioCuesheetEditor/Shared/ModalExportdialog.razor index 0940e47e..d5cf6494 100644 --- a/AudioCuesheetEditor/Shared/ModalExportdialog.razor +++ b/AudioCuesheetEditor/Shared/ModalExportdialog.razor @@ -218,6 +218,7 @@ along with Foobar. If not, see public void Reset() { + prepareExportCompleted = false; selectedStep = "prepareExport"; exportfiles = null; } @@ -271,18 +272,6 @@ along with Foobar. If not, see } } - String? GetLocalizedString(Boolean expressionToCheck, String localizedStringName) - { - if (expressionToCheck == true) - { - return _localizer[localizedStringName]; - } - else - { - return null; - } - } - void LocalStorageOptionsProvider_OptionSaved(object? sender, IOptions options) { if (options is ApplicationOptions) From 1c934fdf22a3f69475a38927b98cae011de4d574 Mon Sep 17 00:00:00 2001 From: NeoCoderMatrix86 <40752681+NeoCoderMatrix86@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:44:53 +0200 Subject: [PATCH 2/5] Update ModalExportdialog.razor --- AudioCuesheetEditor/Shared/ModalExportdialog.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AudioCuesheetEditor/Shared/ModalExportdialog.razor b/AudioCuesheetEditor/Shared/ModalExportdialog.razor index d5cf6494..9bb43051 100644 --- a/AudioCuesheetEditor/Shared/ModalExportdialog.razor +++ b/AudioCuesheetEditor/Shared/ModalExportdialog.razor @@ -124,7 +124,7 @@ along with Foobar. If not, see [EditorRequired] public ExportType ExportType { get; set; } - public Exportprofile? SelectedExportProfile{ get; set; } + public Exportprofile? SelectedExportProfile { get; set; } public Boolean IsVisible { get; private set; } public Validations? Validations { get; private set; } From f66988fbf8eb4102e8d76437439da494609bd256 Mon Sep 17 00:00:00 2001 From: NeoCoderMatrix86 <40752681+NeoCoderMatrix86@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:45:22 +0200 Subject: [PATCH 3/5] Update ModalExportdialog.razor --- AudioCuesheetEditor/Shared/ModalExportdialog.razor | 1 - 1 file changed, 1 deletion(-) diff --git a/AudioCuesheetEditor/Shared/ModalExportdialog.razor b/AudioCuesheetEditor/Shared/ModalExportdialog.razor index 9bb43051..b962668e 100644 --- a/AudioCuesheetEditor/Shared/ModalExportdialog.razor +++ b/AudioCuesheetEditor/Shared/ModalExportdialog.razor @@ -128,7 +128,6 @@ along with Foobar. If not, see public Boolean IsVisible { get; private set; } public Validations? Validations { get; private set; } - public Boolean LockUserInputs { get => exportProgress != null; } Modal? modalExportdialog; String selectedStep = "prepareExport"; From cfd2e6541ed803648c275be7d8e0151a95177674 Mon Sep 17 00:00:00 2001 From: NeoCoderMatrix86 <40752681+NeoCoderMatrix86@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:52:29 +0200 Subject: [PATCH 4/5] Update ModalExportdialog.razor --- AudioCuesheetEditor/Shared/ModalExportdialog.razor | 1 + 1 file changed, 1 insertion(+) diff --git a/AudioCuesheetEditor/Shared/ModalExportdialog.razor b/AudioCuesheetEditor/Shared/ModalExportdialog.razor index b962668e..9bb43051 100644 --- a/AudioCuesheetEditor/Shared/ModalExportdialog.razor +++ b/AudioCuesheetEditor/Shared/ModalExportdialog.razor @@ -128,6 +128,7 @@ along with Foobar. If not, see public Boolean IsVisible { get; private set; } public Validations? Validations { get; private set; } + public Boolean LockUserInputs { get => exportProgress != null; } Modal? modalExportdialog; String selectedStep = "prepareExport"; From 4ae9030d5e013dba12c568bf345c5ed1a255287b Mon Sep 17 00:00:00 2001 From: NeoCoderMatrix86 <40752681+NeoCoderMatrix86@users.noreply.github.com> Date: Wed, 3 Apr 2024 11:08:50 +0200 Subject: [PATCH 5/5] Reset active step for modal export --- AudioCuesheetEditor/Shared/MainLayout.razor | 48 +++++-------------- .../Shared/ModalExportdialog.razor | 35 +++++--------- 2 files changed, 25 insertions(+), 58 deletions(-) diff --git a/AudioCuesheetEditor/Shared/MainLayout.razor b/AudioCuesheetEditor/Shared/MainLayout.razor index 05a3cf61..7ee97645 100644 --- a/AudioCuesheetEditor/Shared/MainLayout.razor +++ b/AudioCuesheetEditor/Shared/MainLayout.razor @@ -220,7 +220,7 @@ along with Foobar. If not, see @_localizer["Filename"] - + @@ -237,11 +237,11 @@ along with Foobar. If not, see @_localizer["Select exportprofile"] - + - - + + @if (SelectedExportProfile != null) { @@ -249,7 +249,7 @@ along with Foobar. If not, see @_localizer["Name"] - + @@ -261,7 +261,7 @@ along with Foobar. If not, see @_localizer["Filename"] - + @@ -279,14 +279,14 @@ along with Foobar. If not, see - + - + @_localizer["Select placeholder"] @@ -312,14 +312,14 @@ along with Foobar. If not, see - + - + @_localizer["Select placeholder"] @@ -345,14 +345,14 @@ along with Foobar. If not, see - + - + @_localizer["Select placeholder"] @@ -438,30 +438,6 @@ along with Foobar. If not, see Boolean IsCuesheetExportable => IsCuesheetExportableTooltip == null; - Boolean ModalExportdialogCuesheetLockUserInput - { - get - { - if (modalExportdialogCuesheet != null) - { - return modalExportdialogCuesheet.LockUserInputs; - } - return false; - } - } - - Boolean ModalExportdialogExportprofileLockUserInput - { - get - { - if (modalExportdialogExportprofile != null) - { - return modalExportdialogExportprofile.LockUserInputs; - } - return false; - } - } - protected override async Task OnInitializedAsync() { _localizationService.LocalizationChanged += LocalizationService_LocalizationChanged; diff --git a/AudioCuesheetEditor/Shared/ModalExportdialog.razor b/AudioCuesheetEditor/Shared/ModalExportdialog.razor index 9bb43051..f489cc0c 100644 --- a/AudioCuesheetEditor/Shared/ModalExportdialog.razor +++ b/AudioCuesheetEditor/Shared/ModalExportdialog.razor @@ -34,7 +34,7 @@ along with Foobar. If not, see - + @_localizer["Prepare export"] @_localizer["Result"] @@ -84,26 +84,16 @@ along with Foobar. If not, see - @if (exportProgress != null) + @if (selectedStep != "displayExportResult") { - - @_localizer["Generation in progress, please stand by ..."] - - + + + + } else { - @if (selectedStep != "displayExportResult") - { - - - - - } - else - { - - } + } @@ -128,15 +118,14 @@ along with Foobar. If not, see public Boolean IsVisible { get; private set; } public Validations? Validations { get; private set; } - public Boolean LockUserInputs { get => exportProgress != null; } Modal? modalExportdialog; String selectedStep = "prepareExport"; IReadOnlyCollection? exportfiles; Boolean prepareExportCompleted = false; HotKeysContext? hotKeysContext; - int? exportProgress; ApplicationOptions? applicationOptions; + Steps? stepsRef; Boolean StepNavigationAllowed { @@ -213,13 +202,17 @@ along with Foobar. If not, see public async Task Show() { + Reset(); await ControlModalDialog(modalExportdialog, true); } public void Reset() { prepareExportCompleted = false; - selectedStep = "prepareExport"; + if (stepsRef != null) + { + stepsRef.SelectStep("prepareExport"); + } exportfiles = null; } @@ -244,12 +237,10 @@ along with Foobar. If not, see if (ExportPossible) { GenerateExportfilesClicked?.Invoke(this, EventArgs.Empty); - exportProgress = 0; var generator = new ExportfileGenerator(ExportType, _sessionStateContainer.Cuesheet, SelectedExportProfile, applicationOptions); exportfiles = generator.GenerateExportfiles(); selectedStep = "displayExportResult"; prepareExportCompleted = true; - exportProgress = null; } return Task.CompletedTask; }