structure change

This commit is contained in:
qianlifeng
2014-01-03 23:52:36 +08:00
parent 1eb3f449e2
commit dc51bc39ab
27 changed files with 289 additions and 257 deletions

View File

@@ -5,6 +5,6 @@ namespace WinAlfred.Plugin
public interface IPlugin
{
List<Result> Query(Query query);
void Init();
void Init(PluginInitContext context);
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WinAlfred.Plugin
{
public class PluginInitContext
{
public List<PluginPair> Plugins { get; set; }
public Action<string> ChangeQuery { get; set; }
}
}

View File

@@ -11,6 +11,15 @@ namespace WinAlfred.Plugin
public string IcoPath { get; set; }
public Action Action { get; set; }
public int Score { get; set; }
//todo: this should be controlled by system, not visible to users
/// <summary>
/// Only resulsts that originQuery match with curren query will be displayed in the panel
/// </summary>
public Query OriginQuery { get; set; }
/// <summary>
/// context results connected with current reuslt, usually, it can use <- or -> navigate context results
/// </summary>
public List<Result> ContextResults { get; set; }
/// <summary>

View File

@@ -60,6 +60,7 @@
<Compile Include="AllowedLanguage.cs" />
<Compile Include="IPlugin.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="PluginInitContext.cs" />
<Compile Include="PluginMetadata.cs" />
<Compile Include="PluginType.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />