From f7ec551dd64eabcf7e2e84f235a706adf02d823f Mon Sep 17 00:00:00 2001 From: rampaa Date: Sat, 20 Jul 2024 20:04:08 +0300 Subject: [PATCH] Minor --- JL.Windows/App.xaml.cs | 2 ++ JL.Windows/GUI/AddDictionaryWindow.xaml.cs | 2 +- JL.Windows/GUI/AddFrequencyWindow.xaml.cs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/JL.Windows/App.xaml.cs b/JL.Windows/App.xaml.cs index cf1c07c0..e7126ea7 100644 --- a/JL.Windows/App.xaml.cs +++ b/JL.Windows/App.xaml.cs @@ -17,6 +17,8 @@ public App() AppDomain.CurrentDomain.UnhandledException += LogUnhandledException; TaskScheduler.UnobservedTaskException += LogUnobservedTaskException; + Environment.CurrentDirectory = AppContext.BaseDirectory; + ProfileOptimization.SetProfileRoot(AppContext.BaseDirectory); ProfileOptimization.StartProfile("Startup.Profile"); diff --git a/JL.Windows/GUI/AddDictionaryWindow.xaml.cs b/JL.Windows/GUI/AddDictionaryWindow.xaml.cs index 07d873df..43e69e7f 100644 --- a/JL.Windows/GUI/AddDictionaryWindow.xaml.cs +++ b/JL.Windows/GUI/AddDictionaryWindow.xaml.cs @@ -65,7 +65,7 @@ private void SaveButton_Click(object sender, RoutedEventArgs e) return; } - DictType type = typeString!.GetEnum(); + DictType type = typeString.GetEnum(); if (DictUtils.YomichanDictTypes.Contains(type)) { if (type is DictType.NonspecificKanjiYomichan) diff --git a/JL.Windows/GUI/AddFrequencyWindow.xaml.cs b/JL.Windows/GUI/AddFrequencyWindow.xaml.cs index 33e409e9..c49e3f0e 100644 --- a/JL.Windows/GUI/AddFrequencyWindow.xaml.cs +++ b/JL.Windows/GUI/AddFrequencyWindow.xaml.cs @@ -62,7 +62,7 @@ private void SaveButton_Click(object sender, RoutedEventArgs e) return; } - FreqType type = typeString!.GetEnum(); + FreqType type = typeString.GetEnum(); if (type is FreqType.Yomichan or FreqType.YomichanKanji) { bool validPath = Directory.EnumerateFiles(fullPath, "*_bank_*.json", SearchOption.TopDirectoryOnly)