add AutoAjustScore option for results

This commit is contained in:
qianlifeng
2014-01-15 22:45:02 +08:00
parent 93d8f66afc
commit 56118a7142
15 changed files with 106 additions and 147 deletions

View File

@@ -8,7 +8,7 @@ using System.Windows.Forms;
namespace WinAlfred.Plugin.System
{
public class Sys : ISystemPlugin
public class Sys : BaseSystemPlugin
{
List<Result> availableResults = new List<Result>();
@@ -23,7 +23,7 @@ namespace WinAlfred.Plugin.System
[DllImport("user32")]
public static extern void LockWorkStation();
public List<Result> Query(Query query)
protected override List<Result> QueryInternal(Query query)
{
if (string.IsNullOrEmpty(query.RawQuery) || query.RawQuery.EndsWith(" ") || query.RawQuery.Length <= 1) return new List<Result>();
@@ -39,7 +39,7 @@ namespace WinAlfred.Plugin.System
return results;
}
public void Init(PluginInitContext context)
protected override void InitInternal(PluginInitContext context)
{
availableResults.Add(new Result
{
@@ -74,21 +74,5 @@ namespace WinAlfred.Plugin.System
Action = () => context.CloseApp()
});
}
public string Name
{
get
{
return "sys";
}
}
public string Description
{
get
{
return "provide system commands";
}
}
}
}