mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
Misc
This commit is contained in:
@@ -20,11 +20,11 @@ namespace Wox.Plugin.CMD
|
|||||||
private readonly KeyboardSimulator keyboardSimulator = new KeyboardSimulator(new InputSimulator());
|
private readonly KeyboardSimulator keyboardSimulator = new KeyboardSimulator(new InputSimulator());
|
||||||
|
|
||||||
private readonly CMDHistory _settings;
|
private readonly CMDHistory _settings;
|
||||||
private readonly PluginSettingsStorage<CMDHistory> _storage;
|
private readonly PluginJsonStorage<CMDHistory> _storage;
|
||||||
|
|
||||||
public CMD()
|
public CMD()
|
||||||
{
|
{
|
||||||
_storage = new PluginSettingsStorage<CMDHistory>();
|
_storage = new PluginJsonStorage<CMDHistory>();
|
||||||
_settings = _storage.Load();
|
_settings = _storage.Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,11 +26,11 @@ namespace Wox.Plugin.Everything
|
|||||||
private PluginInitContext _context;
|
private PluginInitContext _context;
|
||||||
|
|
||||||
private readonly Settings _settings;
|
private readonly Settings _settings;
|
||||||
private readonly PluginSettingsStorage<Settings> _storage;
|
private readonly PluginJsonStorage<Settings> _storage;
|
||||||
|
|
||||||
public Main()
|
public Main()
|
||||||
{
|
{
|
||||||
_storage = new PluginSettingsStorage<Settings>();
|
_storage = new PluginJsonStorage<Settings>();
|
||||||
_settings = _storage.Load();
|
_settings = _storage.Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ namespace Wox.Plugin.Folder
|
|||||||
private PluginInitContext context;
|
private PluginInitContext context;
|
||||||
|
|
||||||
private readonly Settings _settings;
|
private readonly Settings _settings;
|
||||||
private readonly PluginSettingsStorage<Settings> _storage;
|
private readonly PluginJsonStorage<Settings> _storage;
|
||||||
|
|
||||||
public FolderPlugin()
|
public FolderPlugin()
|
||||||
{
|
{
|
||||||
_storage = new PluginSettingsStorage<Settings>();
|
_storage = new PluginJsonStorage<Settings>();
|
||||||
_settings = _storage.Load();
|
_settings = _storage.Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,11 +32,11 @@ namespace Wox.Plugin.Program
|
|||||||
private static ProgramIndexCache _cache;
|
private static ProgramIndexCache _cache;
|
||||||
private static BinaryStorage<ProgramIndexCache> _cacheStorage;
|
private static BinaryStorage<ProgramIndexCache> _cacheStorage;
|
||||||
private static Settings _settings;
|
private static Settings _settings;
|
||||||
private readonly PluginSettingsStorage<Settings> _settingsStorage;
|
private readonly PluginJsonStorage<Settings> _settingsStorage;
|
||||||
|
|
||||||
public Programs()
|
public Programs()
|
||||||
{
|
{
|
||||||
_settingsStorage = new PluginSettingsStorage<Settings>();
|
_settingsStorage = new PluginJsonStorage<Settings>();
|
||||||
_settings = _settingsStorage.Load();
|
_settings = _settingsStorage.Load();
|
||||||
_cacheStorage = new BinaryStorage<ProgramIndexCache>();
|
_cacheStorage = new BinaryStorage<ProgramIndexCache>();
|
||||||
_cache = _cacheStorage.Load();
|
_cache = _cacheStorage.Load();
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ namespace Wox.Plugin.WebSearch
|
|||||||
{
|
{
|
||||||
public PluginInitContext Context { get; private set; }
|
public PluginInitContext Context { get; private set; }
|
||||||
|
|
||||||
private readonly PluginSettingsStorage<Settings> _storage;
|
private readonly PluginJsonStorage<Settings> _storage;
|
||||||
private readonly Settings _settings;
|
private readonly Settings _settings;
|
||||||
|
|
||||||
public WebSearchPlugin()
|
public WebSearchPlugin()
|
||||||
{
|
{
|
||||||
_storage = new PluginSettingsStorage<Settings>();
|
_storage = new PluginJsonStorage<Settings>();
|
||||||
_settings = _storage.Load();
|
_settings = _storage.Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace Wox.Infrastructure.Storage
|
namespace Wox.Infrastructure.Storage
|
||||||
{
|
{
|
||||||
public class PluginSettingsStorage<T> :JsonStrorage<T> where T : new()
|
public class PluginJsonStorage<T> :JsonStrorage<T> where T : new()
|
||||||
{
|
{
|
||||||
public PluginSettingsStorage()
|
public PluginJsonStorage()
|
||||||
{
|
{
|
||||||
var pluginDirectoryName = "Plugins";
|
var pluginDirectoryName = "Plugins";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user