mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Implement WebSearch feature.
This commit is contained in:
@@ -47,9 +47,21 @@ namespace Wox.Infrastructure
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//on-op, keep default storage
|
||||
LoadDefaultUserSetting();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadDefaultUserSetting();
|
||||
}
|
||||
}
|
||||
|
||||
private static void LoadDefaultUserSetting()
|
||||
{
|
||||
//default setting
|
||||
Instance.UserSetting.Theme = "Default";
|
||||
Instance.UserSetting.ReplaceWinR = true;
|
||||
Instance.UserSetting.WebSearches = Instance.UserSetting.LoadDefaultWebSearches();
|
||||
}
|
||||
|
||||
public static CommonStorage Instance
|
||||
@@ -70,6 +82,5 @@ namespace Wox.Infrastructure
|
||||
return storage;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,15 +9,7 @@ namespace Wox.Infrastructure.UserSettings
|
||||
public bool ReplaceWinR { get; set; }
|
||||
public List<WebSearch> WebSearches { get; set; }
|
||||
|
||||
public UserSetting()
|
||||
{
|
||||
//default setting
|
||||
Theme = "Default";
|
||||
ReplaceWinR = true;
|
||||
WebSearches = LoadDefaultWebSearches();
|
||||
}
|
||||
|
||||
private List<WebSearch> LoadDefaultWebSearches()
|
||||
public List<WebSearch> LoadDefaultWebSearches()
|
||||
{
|
||||
List<WebSearch> webSearches = new List<WebSearch>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user