2013-12-19 15:51:20 +00:00
|
|
|
|
using System;
|
2013-12-23 15:53:38 +00:00
|
|
|
|
using System.Collections;
|
2013-12-20 11:38:10 +00:00
|
|
|
|
using System.Collections.Generic;
|
2013-12-19 15:51:20 +00:00
|
|
|
|
|
2014-01-29 10:33:24 +00:00
|
|
|
|
namespace Wox.Plugin
|
2013-12-19 15:51:20 +00:00
|
|
|
|
{
|
|
|
|
|
|
public class Result
|
|
|
|
|
|
{
|
|
|
|
|
|
public string Title { get; set; }
|
2013-12-20 11:38:10 +00:00
|
|
|
|
public string SubTitle { get; set; }
|
|
|
|
|
|
public string IcoPath { get; set; }
|
2014-01-03 15:52:36 +00:00
|
|
|
|
|
2014-02-28 15:21:01 +00: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 14:45:02 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Auto add scores for MRU items
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool AutoAjustScore { get; set; }
|
2014-01-05 09:56:02 +00:00
|
|
|
|
|
2014-01-03 15:52:36 +00: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 11:35:21 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2014-02-09 12:55:18 +00:00
|
|
|
|
/// Don't set this property if you are developing a plugin
|
2013-12-22 11:35:21 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string PluginDirectory { get; set; }
|
2014-01-04 12:26:13 +00: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 15:21:37 +00:00
|
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
|
{
|
|
|
|
|
|
return Title + SubTitle;
|
|
|
|
|
|
}
|
2013-12-19 15:51:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|