diff --git a/src/SongProcessor.UI/SongProcessor.UI.csproj b/src/SongProcessor.UI/SongProcessor.UI.csproj
index 850320d..ce331bf 100644
--- a/src/SongProcessor.UI/SongProcessor.UI.csproj
+++ b/src/SongProcessor.UI/SongProcessor.UI.csproj
@@ -5,11 +5,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/src/SongProcessor.UI/ViewModels/SongViewModel.cs b/src/SongProcessor.UI/ViewModels/SongViewModel.cs
index ebfcfc9..0d771f5 100644
--- a/src/SongProcessor.UI/ViewModels/SongViewModel.cs
+++ b/src/SongProcessor.UI/ViewModels/SongViewModel.cs
@@ -338,8 +338,15 @@ await HostScreen.Router.Navigate.Execute(new EditViewModel(
));
}
- private Task ExportFixesAsync()
- => _Processor.ExportFixesAsync(Anime, Directory!);
+ private async Task ExportFixesAsync()
+ {
+ var outputFile = await _Processor.ExportFixesAsync(Anime, Directory!).ConfigureAwait(true);
+ await _MessageBoxManager.ShowNoResultAsync(new()
+ {
+ Text = $"Exported to {outputFile}",
+ Title = "Exported Fixes",
+ }).ConfigureAwait(true);
+ }
private async Task GetVolumeInfoAsync(ObservableAnime anime)
{
@@ -414,7 +421,7 @@ private async Task LoadAsync()
}
catch (Exception e)
{
- await _MessageBoxManager.ShowExceptionAsync(e).ConfigureAwait(false);
+ await _MessageBoxManager.ShowExceptionAsync(e).ConfigureAwait(true);
}
}
diff --git a/src/SongProcessor.UI/Views/MessageBox.axaml b/src/SongProcessor.UI/Views/MessageBox.axaml
index 8b1bceb..8e342f9 100644
--- a/src/SongProcessor.UI/Views/MessageBox.axaml
+++ b/src/SongProcessor.UI/Views/MessageBox.axaml
@@ -2,24 +2,31 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- x:Class="SongProcessor.UI.Views.MessageBox"
mc:Ignorable="d" d:DesignWidth="278" d:DesignHeight="133"
- Name="MsgBox" FontFamily="Courier New"
- Title="{Binding Title}" CanResize="{Binding CanResize}"
- Width="{Binding Width}" Height="{Binding Height}">
+ x:Class="SongProcessor.UI.Views.MessageBox"
+ Name="Me"
+ Title="{Binding Title}"
+ FontFamily="Courier New"
+ Width="{Binding Width}"
+ Height="{Binding Height}"
+ CanResize="{Binding CanResize}">
+
+
+
+
-
+
+ SelectedItem="{Binding CurrentOption}" IsVisible="{Binding HasOptions}" />
+ Command="{Binding Ok}" CommandParameter="{Binding ElementName=Me}" />
\ No newline at end of file
diff --git a/src/SongProcessor.UI/Views/MessageBox.axaml.cs b/src/SongProcessor.UI/Views/MessageBox.axaml.cs
index c6a4e6d..da9a7db 100644
--- a/src/SongProcessor.UI/Views/MessageBox.axaml.cs
+++ b/src/SongProcessor.UI/Views/MessageBox.axaml.cs
@@ -19,6 +19,8 @@ public static Task ShowAsync(
return new MessageBox
{
DataContext = viewModel,
+ // Focusable otherwise Escape keybind doesn't work
+ Focusable = true,
}.ShowDialog(window);
}
diff --git a/src/SongProcessor/SongProcessor.csproj b/src/SongProcessor/SongProcessor.csproj
index 5a7cb36..e55a792 100644
--- a/src/SongProcessor/SongProcessor.csproj
+++ b/src/SongProcessor/SongProcessor.csproj
@@ -5,6 +5,6 @@
-
+
diff --git a/src/SongProcessor/Utils/SongUtils.cs b/src/SongProcessor/Utils/SongUtils.cs
index 53d55e9..9963a18 100644
--- a/src/SongProcessor/Utils/SongUtils.cs
+++ b/src/SongProcessor/Utils/SongUtils.cs
@@ -23,7 +23,7 @@ public static class SongUtils
{
public const int LOAD_SLOW = 0;
- public static Task ExportFixesAsync(
+ public static async Task ExportFixesAsync(
this ISongProcessor processor,
IEnumerable anime,
string directory,
@@ -32,7 +32,8 @@ public static Task ExportFixesAsync(
{
var path = Path.Combine(directory, fileName);
var text = processor.CreateFixes(anime);
- return File.WriteAllTextAsync(path, text, cancellationToken);
+ await File.WriteAllTextAsync(path, text, cancellationToken).ConfigureAwait(false);
+ return path;
}
public static IEnumerable GetFiles(this ISongLoader loader, string directory)
diff --git a/tests/SongProcessor.Tests/SongProcessor.Tests.csproj b/tests/SongProcessor.Tests/SongProcessor.Tests.csproj
index ffd6ea3..981121f 100644
--- a/tests/SongProcessor.Tests/SongProcessor.Tests.csproj
+++ b/tests/SongProcessor.Tests/SongProcessor.Tests.csproj
@@ -11,15 +11,15 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
-
-
-
+
+
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all