From 3f90611edffa8cf5ec2dd3fcf99ddb5a6fea9d50 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 29 Sep 2019 14:27:46 +1000 Subject: [PATCH] Initial prep of settings and start up default --- Wox.Infrastructure/UserSettings/Settings.cs | 12 +++++++++++- Wox/App.xaml.cs | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Wox.Infrastructure/UserSettings/Settings.cs b/Wox.Infrastructure/UserSettings/Settings.cs index fc676d7838..5e22ca4936 100644 --- a/Wox.Infrastructure/UserSettings/Settings.cs +++ b/Wox.Infrastructure/UserSettings/Settings.cs @@ -21,6 +21,17 @@ namespace Wox.Infrastructure.UserSettings public string ResultFontWeight { get; set; } public string ResultFontStretch { get; set; } + private string _querySearchPrecision { get; set; } = StringMatcher.SearchPrecisionScore.Regular.ToString(); + public string QuerySearchPrecision + { + get { return _querySearchPrecision; } + set + { + _querySearchPrecision = value; + StringMatcher.UserSettingSearchPrecision = value; + } + } + public bool AutoUpdates { get; set; } = false; public double WindowLeft { get; set; } @@ -63,7 +74,6 @@ namespace Wox.Infrastructure.UserSettings [JsonConverter(typeof(StringEnumConverter))] public LastQueryMode LastQueryMode { get; set; } = LastQueryMode.Selected; - } public enum LastQueryMode diff --git a/Wox/App.xaml.cs b/Wox/App.xaml.cs index 3407cf5762..b66549b38a 100644 --- a/Wox/App.xaml.cs +++ b/Wox/App.xaml.cs @@ -54,6 +54,8 @@ namespace Wox _settingsVM = new SettingWindowViewModel(); _settings = _settingsVM.Settings; + StringMatcher.UserSettingSearchPrecision = _settings.QuerySearchPrecision; + PluginManager.LoadPlugins(_settings.PluginSettings); _mainVM = new MainViewModel(_settings); var window = new MainWindow(_settings, _mainVM);