diff --git a/Flow.Launcher/SettingPages/Views/About.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
similarity index 99%
rename from Flow.Launcher/SettingPages/Views/About.xaml
rename to Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
index e5d58098c..9386c9625 100644
--- a/Flow.Launcher/SettingPages/Views/About.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
@@ -1,5 +1,5 @@
-
\ No newline at end of file
+
diff --git a/Flow.Launcher/SettingPages/Views/General.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
similarity index 97%
rename from Flow.Launcher/SettingPages/Views/General.xaml.cs
rename to Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
index 2aaa0fbc2..012a8b70d 100644
--- a/Flow.Launcher/SettingPages/Views/General.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
@@ -34,7 +34,7 @@ using Flow.Launcher.ViewModel;
namespace Flow.Launcher.SettingPages.Views
{
- public partial class General
+ public partial class SettingsPaneGeneral
{
protected override void OnNavigatedTo(NavigationEventArgs e)
{
diff --git a/Flow.Launcher/SettingPages/Views/Hotkey.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml
similarity index 99%
rename from Flow.Launcher/SettingPages/Views/Hotkey.xaml
rename to Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml
index 20a69971c..c8a510e4f 100644
--- a/Flow.Launcher/SettingPages/Views/Hotkey.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml
@@ -1,5 +1,5 @@
/// Hotkey.xaml에 대한 상호 작용 논리
///
- public partial class Hotkey : Page
+ public partial class SettingsPaneHotkey : Page
{
- public Hotkey()
+ public SettingsPaneHotkey()
{
InitializeComponent();
}
diff --git a/Flow.Launcher/SettingPages/Views/PluginStore.xaml b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
similarity index 99%
rename from Flow.Launcher/SettingPages/Views/PluginStore.xaml
rename to Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
index 3a0d3bac1..bed68e86a 100644
--- a/Flow.Launcher/SettingPages/Views/PluginStore.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
@@ -1,5 +1,5 @@
/// PluginStore.xaml에 대한 상호 작용 논리
///
- public partial class PluginStore : Page
+ public partial class SettingsPanePluginStore : Page
{
- public PluginStore()
+ public SettingsPanePluginStore()
{
InitializeComponent();
}
diff --git a/Flow.Launcher/SettingPages/Views/Plugins.xaml b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
similarity index 99%
rename from Flow.Launcher/SettingPages/Views/Plugins.xaml
rename to Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
index dc8d3ebdf..9a9b05183 100644
--- a/Flow.Launcher/SettingPages/Views/Plugins.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
@@ -1,5 +1,5 @@
/// Plugins.xaml에 대한 상호 작용 논리
///
- public partial class Plugins
+ public partial class SettingsPanePlugins
{
- public Plugins()
+ public SettingsPanePlugins()
{
InitializeComponent();
}
diff --git a/Flow.Launcher/SettingPages/Views/Proxy.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml
similarity index 99%
rename from Flow.Launcher/SettingPages/Views/Proxy.xaml
rename to Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml
index 41742a276..48d7a89d5 100644
--- a/Flow.Launcher/SettingPages/Views/Proxy.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml
@@ -1,5 +1,5 @@
/// Proxy.xaml에 대한 상호 작용 논리
///
- public partial class Proxy : Page
+ public partial class SettingsPaneProxy : Page
{
- public Proxy()
+ public SettingsPaneProxy()
{
InitializeComponent();
}
diff --git a/Flow.Launcher/SettingPages/Views/Theme.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
similarity index 99%
rename from Flow.Launcher/SettingPages/Views/Theme.xaml
rename to Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
index 7ee9c7934..61b0b199b 100644
--- a/Flow.Launcher/SettingPages/Views/Theme.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
@@ -1,5 +1,5 @@
@@ -77,6 +77,7 @@
@@ -91,7 +92,7 @@
Text="{Binding DateText}"
Visibility="{Binding Settings.UseDate, Converter={StaticResource BoolToVisibilityConverter}}" />
-
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index 8f3edc872..08d175d76 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -506,25 +506,32 @@ namespace Flow.Launcher
//}
/** For Navigation View **/
- private void NavigationView_SelectionChanged(ModernWpf.Controls.NavigationView sender, ModernWpf.Controls.NavigationViewSelectionChangedEventArgs args)
+ private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
{
if (args.IsSettingsSelected)
{
- contentFrame.Navigate(typeof(General));
+ ContentFrame.Navigate(typeof(SettingsPaneGeneral));
}
else
{
- var selectedItem = (ModernWpf.Controls.NavigationViewItem)args.SelectedItem;
+ var selectedItem = (NavigationViewItem)args.SelectedItem;
if (selectedItem == null)
{
return;
}
- string selectedItemTag = (string)selectedItem.Tag;
- sender.Header = (string)selectedItem.Content;
- string pageName = $"Flow.Launcher.SettingPages.Views.{selectedItemTag}";
- Type pageType = typeof(About).Assembly.GetType(pageName);
- contentFrame.Navigate(pageType, settings);
+ var pageType = selectedItem.Name switch
+ {
+ nameof(General) => typeof(SettingsPaneGeneral),
+ nameof(Plugins) => typeof(SettingsPanePlugins),
+ nameof(PluginStore) => typeof(SettingsPanePluginStore),
+ nameof(Theme) => typeof(SettingsPaneTheme),
+ nameof(Hotkey) => typeof(SettingsPaneHotkey),
+ nameof(Proxy) => typeof(SettingsPaneProxy),
+ nameof(About) => typeof(SettingsPaneAbout),
+ _ => typeof(SettingsPaneGeneral)
+ };
+ ContentFrame.Navigate(pageType, settings);
}
}
}