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

@@ -19,7 +19,7 @@ namespace WinAlfred.Plugin.System
public int Score { get; set; }
}
public class Programs : ISystemPlugin
public class Programs : BaseSystemPlugin
{
private List<string> indexDirectory = new List<string>();
private List<string> indexPostfix = new List<string> { "lnk", "exe" };
@@ -32,7 +32,7 @@ namespace WinAlfred.Plugin.System
const int CSIDL_COMMON_STARTMENU = 0x16; // \Windows\Start Menu\Programs
const int CSIDL_COMMON_PROGRAMS = 0x17;
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>();
@@ -66,7 +66,7 @@ namespace WinAlfred.Plugin.System
return false;
}
public void Init(PluginInitContext context)
protected override void InitInternal(PluginInitContext context)
{
indexDirectory.Add(Environment.GetFolderPath(Environment.SpecialFolder.Programs));
@@ -126,21 +126,5 @@ namespace WinAlfred.Plugin.System
string name = temp.Substring(0, temp.LastIndexOf('.'));
return name;
}
public string Name
{
get
{
return "Programs";
}
}
public string Description
{
get
{
return "get system programs";
}
}
}
}