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

@@ -5,12 +5,12 @@ using System.Text;
namespace WinAlfred.Plugin.System
{
public class ThirdpartyPluginIndicator : ISystemPlugin
public class ThirdpartyPluginIndicator : BaseSystemPlugin
{
private List<PluginPair> allPlugins = new List<PluginPair>();
private Action<string> changeQuery;
public List<Result> Query(Query query)
protected override List<Result> QueryInternal(Query query)
{
List<Result> results = new List<Result>();
if (string.IsNullOrEmpty(query.RawQuery)) return results;
@@ -27,7 +27,7 @@ namespace WinAlfred.Plugin.System
Score = 50,
IcoPath = "Images/work.png",
Action = () => changeQuery(metadataCopy.ActionKeyword + " "),
DontHideWinAlfredAfterAction = true
DontHideWinAlfredAfterSelect = true
};
results.Add(result);
}
@@ -35,27 +35,12 @@ namespace WinAlfred.Plugin.System
return results;
}
public void Init(PluginInitContext context)
protected override void InitInternal(PluginInitContext context)
{
allPlugins = context.Plugins;
changeQuery = context.ChangeQuery;
}
public string Name {
get
{
return "ThirdpartyPluginIndicator";
}
}
public string Description
{
get
{
return "ThirdpartyPluginIndicator";
}
}
}
}