diff --git a/Wox.Plugin.SystemPlugins/BaseSystemPlugin.cs b/Wox.Plugin.SystemPlugins/BaseSystemPlugin.cs index 6213fede34..81ba859a5c 100644 --- a/Wox.Plugin.SystemPlugins/BaseSystemPlugin.cs +++ b/Wox.Plugin.SystemPlugins/BaseSystemPlugin.cs @@ -1,39 +1,28 @@ using System.Collections.Generic; -namespace Wox.Plugin.SystemPlugins { +namespace Wox.Plugin.SystemPlugins +{ - public abstract class BaseSystemPlugin : ISystemPlugin { - public string PluginDirectory { get; set; } - 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; } + public abstract class BaseSystemPlugin : ISystemPlugin + { + public string PluginDirectory { get; set; } + public virtual string Name { get { return "System workflow"; } } + public virtual string Description { get { return "System workflow"; } } + public virtual string IcoPath { get { return null; } } - protected abstract List QueryInternal(Query query); - protected abstract void InitInternal(PluginInitContext context); + protected abstract List QueryInternal(Query query); + protected abstract void InitInternal(PluginInitContext context); + public List Query(Query query) + { + if (string.IsNullOrEmpty(query.RawQuery)) return new List(); + return QueryInternal(query); + } - public List Query(Query query) { - if (Enabled && string.IsNullOrEmpty(query.RawQuery)) { - //if (string.IsNullOrEmpty(query.RawQuery)) return new List(); - return QueryInternal(query); - } - else { - new List(); - } - } - - public void Init(PluginInitContext context) { - InitInternal(context); - } - - - /// - /// Used to save settings - /// - public virtual string PluginId { - get { return null; } - } - } + public void Init(PluginInitContext context) + { + InitInternal(context); + } + } } \ No newline at end of file diff --git a/Wox.Plugin.SystemPlugins/ISystemPlugin.cs b/Wox.Plugin.SystemPlugins/ISystemPlugin.cs index 417f9d58f1..cd61777402 100644 --- a/Wox.Plugin.SystemPlugins/ISystemPlugin.cs +++ b/Wox.Plugin.SystemPlugins/ISystemPlugin.cs @@ -3,9 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace Wox.Plugin.SystemPlugins { - public interface ISystemPlugin : IPlugin { - string Name { get; } - string Description { get; } - } +namespace Wox.Plugin.SystemPlugins +{ + public interface ISystemPlugin : IPlugin + { + string Name { get; } + string Description { get; } + } } diff --git a/Wox.Plugin/IPlugin.cs b/Wox.Plugin/IPlugin.cs index e6603540cc..69f2ba4835 100644 --- a/Wox.Plugin/IPlugin.cs +++ b/Wox.Plugin/IPlugin.cs @@ -1,13 +1,10 @@ using System.Collections.Generic; -namespace Wox.Plugin { - public interface IPlugin { - List Query(Query query); - void Init(PluginInitContext context); - - /// - /// Used when saving Plug-in settings - /// - string PluginId { get; } - } +namespace Wox.Plugin +{ + public interface IPlugin + { + List Query(Query query); + void Init(PluginInitContext context); + } } \ No newline at end of file diff --git a/Wox/SettingWindow.xaml b/Wox/SettingWindow.xaml index 15801e6fd3..e58ea5bc96 100644 --- a/Wox/SettingWindow.xaml +++ b/Wox/SettingWindow.xaml @@ -74,7 +74,7 @@ - +