Add modifier key support when user action items.

This commit is contained in:
qianlifeng
2014-02-09 20:55:18 +08:00
parent 953adadd62
commit fcdb9e39c6
23 changed files with 84 additions and 133 deletions

View File

@@ -0,0 +1,15 @@
namespace Wox.Plugin
{
public class ActionContext
{
public SpecialKeyState SpecialKeyState { get; set; }
}
public class SpecialKeyState
{
public bool CtrlPressed { get; set; }
public bool ShiftPressed { get; set; }
public bool AltPressed { get; set; }
public bool WinPressed { get; set; }
}
}

View File

@@ -9,7 +9,7 @@ namespace Wox.Plugin
public string Title { get; set; }
public string SubTitle { get; set; }
public string IcoPath { get; set; }
public Action Action { get; set; }
public Action<ActionContext> Action { get; set; }
public int Score { get; set; }
public bool DontHideWoxAfterSelect { get; set; }
@@ -24,13 +24,9 @@ namespace Wox.Plugin
/// 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>
/// you don't need to set this property if you are developing a plugin
/// Don't set this property if you are developing a plugin
/// </summary>
public string PluginDirectory { get; set; }

View File

@@ -59,7 +59,7 @@
<ItemGroup>
<Compile Include="AllowedLanguage.cs" />
<Compile Include="IPlugin.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="PluginPair.cs" />
<Compile Include="PluginInitContext.cs" />
<Compile Include="PluginMetadata.cs" />
<Compile Include="PluginType.cs" />
@@ -67,6 +67,7 @@
<Compile Include="PythonResult.cs" />
<Compile Include="Query.cs" />
<Compile Include="Result.cs" />
<Compile Include="ActionContext.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.