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 0940e47e..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 - { - - } + } @@ -124,19 +114,18 @@ 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; } - 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,12 +202,17 @@ along with Foobar. If not, see public async Task Show() { + Reset(); await ControlModalDialog(modalExportdialog, true); } public void Reset() { - selectedStep = "prepareExport"; + prepareExportCompleted = false; + if (stepsRef != null) + { + stepsRef.SelectStep("prepareExport"); + } exportfiles = null; } @@ -243,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; } @@ -271,18 +263,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)