mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Add pluginID for result.
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Wox.Plugin
|
||||
{
|
||||
public class PluginInitContext
|
||||
{
|
||||
public PluginMetadata CurrentPluginMetadata { get; set; }
|
||||
public PluginMetadata CurrentPluginMetadata { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Public APIs for plugin invocation
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace Wox.Plugin
|
||||
/// if we need to change the plugin config in the futher, use this to
|
||||
/// indicate config version
|
||||
/// </summary>
|
||||
[Obsolete]
|
||||
public int ConfigVersion
|
||||
{
|
||||
get { return configVersion; }
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的常规信息通过以下
|
||||
// 特性集控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Wox.Plugin")]
|
||||
[assembly: AssemblyDescription("https://github.com/qianlifeng/Wox")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
@@ -13,24 +10,10 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyCopyright("The MIT License (MIT)")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 使此程序集中的类型
|
||||
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
|
||||
// 则将该类型上的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("c22be00d-a6f5-4e45-8ecc-09ebf297c812")]
|
||||
|
||||
// 程序集的版本信息由下面四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
[assembly: InternalsVisibleTo("Wox")]
|
||||
[assembly: InternalsVisibleTo("Wox.Core")]
|
||||
@@ -8,7 +8,6 @@ namespace Wox.Plugin
|
||||
|
||||
public class Result
|
||||
{
|
||||
|
||||
public string Title { get; set; }
|
||||
public string SubTitle { get; set; }
|
||||
public string IcoPath { get; set; }
|
||||
@@ -34,21 +33,15 @@ namespace Wox.Plugin
|
||||
|
||||
public int Score { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Auto add scores for MRU items
|
||||
/// </summary>
|
||||
public bool AutoAjustScore { 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; }
|
||||
internal Query OriginQuery { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Don't set this property if you are developing a plugin
|
||||
/// Plugin directory
|
||||
/// </summary>
|
||||
public string PluginDirectory { get; set; }
|
||||
public string PluginDirectory { get; internal set; }
|
||||
|
||||
public new bool Equals(object obj)
|
||||
{
|
||||
@@ -75,6 +68,14 @@ namespace Wox.Plugin
|
||||
this.SubTitle = SubTitle;
|
||||
}
|
||||
|
||||
public List<Result> ContextMenu { get; set; }
|
||||
/// <summary>
|
||||
/// Context menus associate with this result
|
||||
/// </summary>
|
||||
public List<Result> ContextMenu { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Plugin ID that generate this result
|
||||
/// </summary>
|
||||
public string PluginID { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user