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 Newtonsoft.Json;
|
|
|
|
|
using Wox.Infrastructure.Storage;
|
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; }
|
|
|
|
|
|
2015-01-26 19:06:03 +08:00
|
|
|
|
protected override string ConfigName
|
|
|
|
|
{
|
|
|
|
|
get { return "EverythingContextMenu"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override string ConfigFolder
|
|
|
|
|
{
|
|
|
|
|
get { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); }
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
}
|