mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
#21 Add Disable option for each plugin.
This commit is contained in:
@@ -15,6 +15,14 @@ namespace Wox.Infrastructure.Storage
|
||||
private static object locker = new object();
|
||||
private static T storage;
|
||||
|
||||
public event Action<T> AfterLoadConfig;
|
||||
|
||||
protected virtual void OnAfterLoadConfig(T obj)
|
||||
{
|
||||
Action<T> handler = AfterLoadConfig;
|
||||
if (handler != null) handler(obj);
|
||||
}
|
||||
|
||||
protected abstract string ConfigName { get; }
|
||||
|
||||
public static T Instance
|
||||
@@ -53,6 +61,7 @@ namespace Wox.Infrastructure.Storage
|
||||
try
|
||||
{
|
||||
storage = JsonConvert.DeserializeObject<T>(json);
|
||||
OnAfterLoadConfig(storage);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user