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