From 83ccfac04fa6ed6c16f4c6579dd32439488bd0b7 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Mon, 16 Nov 2020 06:29:24 +1100 Subject: [PATCH] move Themes string to Constant --- Flow.Launcher.Core/Resource/Theme.cs | 2 +- Flow.Launcher.Infrastructure/Constant.cs | 2 ++ Flow.Launcher/SettingWindow.xaml.cs | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index 2075137d0..a5f12bbb9 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -21,7 +21,7 @@ namespace Flow.Launcher.Core.Resource private ResourceDictionary _oldResource; private string _oldTheme; public Settings Settings { get; set; } - private const string Folder = "Themes"; + private const string Folder = Constant.Themes; private const string Extension = ".xaml"; private string DirectoryPath => Path.Combine(Constant.ProgramDirectory, Folder); private string UserDirectoryPath => Path.Combine(DataLocation.DataDirectory(), Folder); diff --git a/Flow.Launcher.Infrastructure/Constant.cs b/Flow.Launcher.Infrastructure/Constant.cs index c6a3b48f3..df1464048 100644 --- a/Flow.Launcher.Infrastructure/Constant.cs +++ b/Flow.Launcher.Infrastructure/Constant.cs @@ -33,5 +33,7 @@ namespace Flow.Launcher.Infrastructure public static readonly string QueryTextBoxIconImagePath = $"{ProgramDirectory}\\Images\\mainsearch.png"; public const string DefaultTheme = "Darker"; + + public const string Themes = "Themes"; } } diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index b21bb2904..c38ed4d22 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -8,6 +8,7 @@ using NHotkey; using NHotkey.Wpf; using Flow.Launcher.Core.Plugin; using Flow.Launcher.Core.Resource; +using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Hotkey; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin; @@ -278,7 +279,7 @@ namespace Flow.Launcher private void OpenPluginFolder(object sender, RoutedEventArgs e) { - FilesFolders.OpenPath(Path.Combine(DataLocation.DataDirectory(), "Themes")); + FilesFolders.OpenPath(Path.Combine(DataLocation.DataDirectory(), Constant.Themes)); } } }