mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
MVVM refactoring for web search plugin, part 1
1. #486 2. fix #778 #763 #742 3. MVVM refactoring 4. remove IMultipleActionKeywords interface, use PluginManager directly
This commit is contained in:
22
Plugins/Wox.Plugin.WebSearch/SettingsViewModel.cs
Normal file
22
Plugins/Wox.Plugin.WebSearch/SettingsViewModel.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Wox.Infrastructure.Storage;
|
||||
|
||||
namespace Wox.Plugin.WebSearch
|
||||
{
|
||||
public class SettingsViewModel
|
||||
{
|
||||
private readonly JsonStrorage<Settings> _storage;
|
||||
|
||||
public SettingsViewModel()
|
||||
{
|
||||
_storage = new PluginJsonStorage<Settings>();
|
||||
Settings = _storage.Load();
|
||||
}
|
||||
|
||||
public Settings Settings { get; set; }
|
||||
|
||||
public void Save()
|
||||
{
|
||||
_storage.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user