diff --git a/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/App.xaml.cs b/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/App.xaml.cs index c20a22bc..6fddd748 100644 --- a/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/App.xaml.cs +++ b/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/App.xaml.cs @@ -16,6 +16,7 @@ public App() => Startup += async (_, _) => catch (Exception e) { Log.Error(e, "Error during application startup"); + Application.Current.Shutdown(); } }; @@ -39,7 +40,7 @@ protected override void OnStartup(StartupEventArgs startupEventArgs) { Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() - .WriteTo.Console() + .WriteTo.Console() .WriteTo.File("logs/log.txt", rollingInterval: RollingInterval.Day, retainedFileCountLimit: 10) .Enrich.WithThreadId() .Enrich.WithThreadName() diff --git a/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/Slices/QuickTagging/AvailableTagPacksSetsVM.cs b/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/Slices/QuickTagging/AvailableTagPacksSetsVM.cs index ffc2e7d0..2eae6903 100644 --- a/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/Slices/QuickTagging/AvailableTagPacksSetsVM.cs +++ b/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/Slices/QuickTagging/AvailableTagPacksSetsVM.cs @@ -2,6 +2,7 @@ using System.Text.Json; using System.Windows; using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; using ImoutoRebirth.Common; using ImoutoRebirth.Navigator.Services.Tags.Model; @@ -53,15 +54,12 @@ private void Load() foreach (var set in savedSets) Sets.Add(set); + } - //foreach (var savedSet in savedSets.Where(x => x.Packs.Any(y => y.Any()))) - //{ - // var set = new TagsPacksSetVM(); - // set. - // foreach (var pack in savedSet.Packs.Where(x => x.Any())) - // set.AddNext(pack); - - // Sets.Add(set); - //} + [RelayCommand] + private void SelectNext() + { + var index = Sets.IndexOf(Selected); + Selected = index == Sets.Count - 1 ? Sets.First() : Sets[index + 1]; } } diff --git a/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/Slices/QuickTagging/QuickTaggingView.xaml b/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/Slices/QuickTagging/QuickTaggingView.xaml index 935dd273..27b49892 100644 --- a/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/Slices/QuickTagging/QuickTaggingView.xaml +++ b/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/Slices/QuickTagging/QuickTaggingView.xaml @@ -147,7 +147,7 @@ - + @@ -155,6 +155,8 @@ + + diff --git a/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/Slices/QuickTagging/QuickTaggingView.xaml.cs b/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/Slices/QuickTagging/QuickTaggingView.xaml.cs index 276008b2..59e5e740 100644 --- a/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/Slices/QuickTagging/QuickTaggingView.xaml.cs +++ b/Source/ImoutoRebirth.Navigator/ImoutoRebirth.Navigator/Slices/QuickTagging/QuickTaggingView.xaml.cs @@ -92,6 +92,13 @@ private async void QuickTaggingView_OnPreviewKeyDown(object sender, KeyEventArgs e.Handled = true; } + // select next pack set + if (e.Key is Key.Space && Keyboard.Modifiers.HasFlag(ModifierKeys.Control)) + { + DataContextVM.AvailableTagPacksSets.SelectNextCommand.Execute(null); + e.Handled = true; + } + // apply packs if (Keyboard.Modifiers.HasFlag(ModifierKeys.Control)) {