2015-10-31 07:17:34 +08:00
|
|
|
|
using System.Collections.Generic;
|
2015-01-26 19:06:03 +08:00
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Reflection;
|
2015-10-31 07:17:34 +08:00
|
|
|
|
using Wox.Infrastructure.Storage;
|
2016-01-06 14:45:08 +08:00
|
|
|
|
using JsonProperty = Newtonsoft.Json.JsonPropertyAttribute;
|
2015-01-26 19:06:03 +08:00
|
|
|
|
|
|
|
|
|
namespace Wox.Plugin.Everything
|
|
|
|
|
{
|
|
|
|
|
public class ContextMenuStorage : JsonStrorage<ContextMenuStorage>
|
|
|
|
|
{
|
2015-02-07 16:53:33 +08:00
|
|
|
|
[JsonProperty] public List<ContextMenu> ContextMenus = new List<ContextMenu>();
|
2015-01-26 19:06:03 +08:00
|
|
|
|
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public int MaxSearchCount { get; set; }
|
|
|
|
|
|
2015-02-07 16:53:33 +08:00
|
|
|
|
public IPublicAPI API { get; set; }
|
|
|
|
|
|
2016-01-07 10:31:17 +08:00
|
|
|
|
protected override string FileName { get; } = "EverythingContextMenu";
|
2015-01-26 19:06:03 +08:00
|
|
|
|
|
2015-02-07 16:53:33 +08:00
|
|
|
|
protected override void OnAfterLoad(ContextMenuStorage obj)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-26 19:06:03 +08:00
|
|
|
|
protected override ContextMenuStorage LoadDefault()
|
|
|
|
|
{
|
|
|
|
|
MaxSearchCount = 100;
|
|
|
|
|
return this;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ContextMenu
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public string Command { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public string Argument { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public string ImagePath { get; set; }
|
|
|
|
|
}
|
2015-02-07 16:53:33 +08:00
|
|
|
|
}
|