mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Added Enabled & PluginId to BaseSystemPlugin
We still need a way to save the Enabled property
This commit is contained in:
@@ -7,18 +7,30 @@ namespace Wox.Plugin.SystemPlugins {
|
||||
public virtual string Name { get { return "System workflow"; } }
|
||||
public virtual string Description { get { return "System workflow"; } }
|
||||
public virtual string IcoPath { get { return null; } }
|
||||
public virtual bool Enabled { get; set; }
|
||||
|
||||
protected abstract List<Result> QueryInternal(Query query);
|
||||
|
||||
protected abstract void InitInternal(PluginInitContext context);
|
||||
|
||||
|
||||
|
||||
public List<Result> Query(Query query) {
|
||||
if (string.IsNullOrEmpty(query.RawQuery)) return new List<Result>();
|
||||
return QueryInternal(query);
|
||||
if (Enabled) {
|
||||
if (string.IsNullOrEmpty(query.RawQuery)) return new List<Result>();
|
||||
return QueryInternal(query);
|
||||
}
|
||||
}
|
||||
|
||||
public void Init(PluginInitContext context) {
|
||||
InitInternal(context);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Used to save settings
|
||||
/// </summary>
|
||||
public virtual string PluginId {
|
||||
get { return null; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user