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

@@ -7,14 +7,14 @@ using System.Text;
namespace WinAlfred.Plugin.System
{
public class DirectoryIndicator : ISystemPlugin
public class DirectoryIndicator : BaseSystemPlugin
{
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;
if (CheckIfDirectory(query.RawQuery))
if (Directory.Exists(query.RawQuery))
{
Result result = new Result
{
@@ -30,29 +30,9 @@ namespace WinAlfred.Plugin.System
return results;
}
private bool CheckIfDirectory(string path)
{
return Directory.Exists(path);
}
public void Init(PluginInitContext context)
protected override void InitInternal(PluginInitContext context)
{
}
public string Name
{
get
{
return "DirectoryIndicator";
}
}
public string Description
{
get
{
return "DirectoryIndicator";
}
}
}
}