Initial prep of settings and start up default

This commit is contained in:
Jeremy Wu
2019-09-29 14:27:46 +10:00
parent d8a9630548
commit 3f90611edf
2 changed files with 13 additions and 1 deletions

View File

@@ -21,6 +21,17 @@ namespace Wox.Infrastructure.UserSettings
public string ResultFontWeight { get; set; } public string ResultFontWeight { get; set; }
public string ResultFontStretch { 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 bool AutoUpdates { get; set; } = false;
public double WindowLeft { get; set; } public double WindowLeft { get; set; }
@@ -63,7 +74,6 @@ namespace Wox.Infrastructure.UserSettings
[JsonConverter(typeof(StringEnumConverter))] [JsonConverter(typeof(StringEnumConverter))]
public LastQueryMode LastQueryMode { get; set; } = LastQueryMode.Selected; public LastQueryMode LastQueryMode { get; set; } = LastQueryMode.Selected;
} }
public enum LastQueryMode public enum LastQueryMode

View File

@@ -54,6 +54,8 @@ namespace Wox
_settingsVM = new SettingWindowViewModel(); _settingsVM = new SettingWindowViewModel();
_settings = _settingsVM.Settings; _settings = _settingsVM.Settings;
StringMatcher.UserSettingSearchPrecision = _settings.QuerySearchPrecision;
PluginManager.LoadPlugins(_settings.PluginSettings); PluginManager.LoadPlugins(_settings.PluginSettings);
_mainVM = new MainViewModel(_settings); _mainVM = new MainViewModel(_settings);
var window = new MainWindow(_settings, _mainVM); var window = new MainWindow(_settings, _mainVM);