mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-12 18:29:24 +08:00
77 lines
2.4 KiB
C#
77 lines
2.4 KiB
C#
using System.Collections.Generic;
|
|
using System.IO;
|
|
|
|
namespace Wox.Infrastructure.UserSettings
|
|
{
|
|
public class UserSetting
|
|
{
|
|
public string Hotkey { get; set; }
|
|
public string Theme { get; set; }
|
|
public string QueryBoxFont { get; set; }
|
|
public string ResultItemFont { get; set; }
|
|
public bool ReplaceWinR { get; set; }
|
|
public List<WebSearch> WebSearches { get; set; }
|
|
public List<ProgramSource> ProgramSources { get; set; }
|
|
public List<CustomPluginHotkey> CustomPluginHotkeys { get; set; }
|
|
public bool StartWoxOnSystemStartup { get; set; }
|
|
public bool EnablePythonPlugins { get; set; }
|
|
|
|
public UserSetting()
|
|
{
|
|
EnablePythonPlugins = true;
|
|
}
|
|
|
|
public List<WebSearch> LoadDefaultWebSearches()
|
|
{
|
|
List<WebSearch> webSearches = new List<WebSearch>();
|
|
|
|
WebSearch googleWebSearch = new WebSearch()
|
|
{
|
|
Title = "Google",
|
|
ActionWord = "g",
|
|
IconPath = Directory.GetCurrentDirectory() + @"\Images\websearch\google.png",
|
|
Url = "https://www.google.com/search?q={q}",
|
|
Enabled = true
|
|
};
|
|
webSearches.Add(googleWebSearch);
|
|
|
|
|
|
WebSearch wikiWebSearch = new WebSearch()
|
|
{
|
|
Title = "Wikipedia",
|
|
ActionWord = "wiki",
|
|
IconPath = Directory.GetCurrentDirectory() + @"\Images\websearch\wiki.png",
|
|
Url = "http://en.wikipedia.org/wiki/{q}",
|
|
Enabled = true
|
|
};
|
|
webSearches.Add(wikiWebSearch);
|
|
|
|
return webSearches;
|
|
}
|
|
|
|
public List<ProgramSource> LoadDefaultProgramSources()
|
|
{
|
|
var list = new List<ProgramSource>();
|
|
list.Add(new ProgramSource()
|
|
{
|
|
BonusPoints = 0,
|
|
Enabled = true,
|
|
Type = "CommonStartMenuProgramSource"
|
|
});
|
|
list.Add(new ProgramSource()
|
|
{
|
|
BonusPoints = 0,
|
|
Enabled = true,
|
|
Type = "UserStartMenuProgramSource"
|
|
});
|
|
list.Add(new ProgramSource()
|
|
{
|
|
BonusPoints = -10,
|
|
Enabled = true,
|
|
Type = "AppPathsProgramSource"
|
|
});
|
|
return list;
|
|
}
|
|
}
|
|
}
|