2015-01-05 22:41:17 +08:00
|
|
|
|
using System;
|
2016-05-22 20:50:06 +01:00
|
|
|
|
using System.Collections.ObjectModel;
|
2015-10-30 23:17:34 +00:00
|
|
|
|
using System.Drawing;
|
2016-03-25 01:22:24 +00:00
|
|
|
|
using Newtonsoft.Json;
|
2017-02-12 22:34:12 +00:00
|
|
|
|
using Newtonsoft.Json.Converters;
|
2016-05-23 22:08:13 +01:00
|
|
|
|
using Wox.Plugin;
|
2014-01-29 22:44:57 +08:00
|
|
|
|
|
2016-06-19 16:18:43 +01:00
|
|
|
|
namespace Wox.Infrastructure.UserSettings
|
2014-01-29 22:44:57 +08:00
|
|
|
|
{
|
2016-05-23 22:08:13 +01:00
|
|
|
|
public class Settings : BaseModel
|
2014-01-29 22:44:57 +08:00
|
|
|
|
{
|
2016-04-21 01:53:21 +01:00
|
|
|
|
public string Hotkey { get; set; } = "Alt + Space";
|
|
|
|
|
|
public string Language { get; set; } = "en";
|
|
|
|
|
|
public string Theme { get; set; } = "Dark";
|
|
|
|
|
|
public string QueryBoxFont { get; set; } = FontFamily.GenericSansSerif.Name;
|
2014-03-25 13:25:43 +08:00
|
|
|
|
public string QueryBoxFontStyle { get; set; }
|
|
|
|
|
|
public string QueryBoxFontWeight { get; set; }
|
|
|
|
|
|
public string QueryBoxFontStretch { get; set; }
|
2016-04-21 01:53:21 +01:00
|
|
|
|
public string ResultFont { get; set; } = FontFamily.GenericSansSerif.Name;
|
2016-02-21 15:19:42 +00:00
|
|
|
|
public string ResultFontStyle { get; set; }
|
|
|
|
|
|
public string ResultFontWeight { get; set; }
|
|
|
|
|
|
public string ResultFontStretch { get; set; }
|
2014-03-25 13:25:43 +08:00
|
|
|
|
|
2016-05-12 03:01:33 +01:00
|
|
|
|
public bool AutoUpdates { get; set; } = true;
|
|
|
|
|
|
|
2014-06-16 14:06:24 +08:00
|
|
|
|
public double WindowLeft { get; set; }
|
|
|
|
|
|
public double WindowTop { get; set; }
|
2016-04-21 01:53:21 +01:00
|
|
|
|
public int MaxResultsToShow { get; set; } = 6;
|
|
|
|
|
|
public int ActivateTimes { get; set; }
|
2014-06-16 14:06:24 +08:00
|
|
|
|
|
2016-03-25 01:22:24 +00:00
|
|
|
|
// Order defaults to 0 or -1, so 1 will let this property appear last
|
|
|
|
|
|
[JsonProperty(Order = 1)]
|
2016-05-05 01:57:03 +01:00
|
|
|
|
public PluginsSettings PluginSettings { get; set; } = new PluginsSettings();
|
2016-05-22 20:50:06 +01:00
|
|
|
|
public ObservableCollection<CustomPluginHotkey> CustomPluginHotkeys { get; set; } = new ObservableCollection<CustomPluginHotkey>();
|
2014-03-23 16:17:41 +08:00
|
|
|
|
|
2015-01-26 22:50:38 +08:00
|
|
|
|
[Obsolete]
|
2016-04-21 01:53:21 +01:00
|
|
|
|
public double Opacity { get; set; } = 1;
|
2014-03-26 17:34:19 +08:00
|
|
|
|
|
2015-01-26 22:50:38 +08:00
|
|
|
|
[Obsolete]
|
2016-04-21 01:53:21 +01:00
|
|
|
|
public OpacityMode OpacityMode { get; set; } = OpacityMode.Normal;
|
2014-03-26 17:34:19 +08:00
|
|
|
|
|
2016-04-21 01:53:21 +01:00
|
|
|
|
public bool DontPromptUpdateMsg { get; set; }
|
|
|
|
|
|
public bool EnableUpdateLog { get; set; }
|
2014-04-10 23:44:57 +02:00
|
|
|
|
|
2016-05-18 19:35:34 +01:00
|
|
|
|
public bool StartWoxOnSystemStartup { get; set; } = true;
|
2016-05-14 21:48:58 +08:00
|
|
|
|
public bool HideOnStartup { get; set; }
|
2016-04-21 01:53:21 +01:00
|
|
|
|
public bool LeaveCmdOpen { get; set; }
|
2014-04-13 10:08:33 +08:00
|
|
|
|
public bool HideWhenDeactive { get; set; }
|
2015-02-20 21:45:42 +08:00
|
|
|
|
public bool RememberLastLaunchLocation { get; set; }
|
2015-10-08 01:02:36 +02:00
|
|
|
|
public bool IgnoreHotkeysOnFullscreen { get; set; }
|
2015-10-08 00:17:37 +02:00
|
|
|
|
|
2016-06-19 16:18:43 +01:00
|
|
|
|
public HttpProxy Proxy { get; set; } = new HttpProxy();
|
2017-02-12 22:34:12 +00:00
|
|
|
|
|
|
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
|
|
|
|
public LastQueryMode LastQueryMode { get; set; } = LastQueryMode.Selected;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public enum LastQueryMode
|
|
|
|
|
|
{
|
|
|
|
|
|
Selected,
|
|
|
|
|
|
Empty,
|
|
|
|
|
|
Preserved
|
2014-03-26 17:34:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2016-05-05 01:57:03 +01:00
|
|
|
|
[Obsolete]
|
2014-03-26 17:34:19 +08:00
|
|
|
|
public enum OpacityMode
|
|
|
|
|
|
{
|
|
|
|
|
|
Normal = 0,
|
|
|
|
|
|
LayeredWindow = 1,
|
|
|
|
|
|
DWM = 2
|
2014-01-29 22:44:57 +08:00
|
|
|
|
}
|
2015-07-17 15:08:39 +08:00
|
|
|
|
}
|