2013-12-19 23:51:20 +08:00
|
|
|
|
using System;
|
2013-12-23 23:53:38 +08:00
|
|
|
|
using System.Collections;
|
2013-12-20 19:38:10 +08:00
|
|
|
|
using System.Collections.Generic;
|
2013-12-19 23:51:20 +08:00
|
|
|
|
|
2014-01-29 18:33:24 +08:00
|
|
|
|
namespace Wox.Plugin
|
2013-12-19 23:51:20 +08:00
|
|
|
|
{
|
|
|
|
|
public class Result
|
|
|
|
|
{
|
|
|
|
|
public string Title { get; set; }
|
2013-12-20 19:38:10 +08:00
|
|
|
|
public string SubTitle { get; set; }
|
|
|
|
|
public string IcoPath { get; set; }
|
2014-01-03 23:52:36 +08:00
|
|
|
|
|
2014-02-28 23:21:01 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// return true to hide wox after select result
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Func<ActionContext,bool> Action { get; set; }
|
|
|
|
|
public int Score { get; set; }
|
2014-01-15 22:45:02 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Auto add scores for MRU items
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool AutoAjustScore { get; set; }
|
2014-01-05 17:56:02 +08:00
|
|
|
|
|
2014-01-03 23:52:36 +08:00
|
|
|
|
//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; }
|
2013-12-22 19:35:21 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2014-02-09 20:55:18 +08:00
|
|
|
|
/// Don't set this property if you are developing a plugin
|
2013-12-22 19:35:21 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
public string PluginDirectory { get; set; }
|
2014-01-04 20:26:13 +08:00
|
|
|
|
|
|
|
|
|
public new bool Equals(object obj)
|
|
|
|
|
{
|
|
|
|
|
if (obj == null || !(obj is Result)) return false;
|
|
|
|
|
|
|
|
|
|
Result r = (Result)obj;
|
|
|
|
|
return r.Title == Title && r.SubTitle == SubTitle;
|
|
|
|
|
}
|
2014-01-08 23:21:37 +08:00
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return Title + SubTitle;
|
|
|
|
|
}
|
2013-12-19 23:51:20 +08:00
|
|
|
|
}
|
|
|
|
|
}
|