mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Add custom context menu setting for findfile plugin and improve the search speed.
This commit is contained in:
46
Plugins/Wox.Plugin.FindFile/FindFileContextMenuStorage.cs
Normal file
46
Plugins/Wox.Plugin.FindFile/FindFileContextMenuStorage.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
using Wox.Infrastructure.Storage;
|
||||
|
||||
namespace Wox.Plugin.FindFile
|
||||
{
|
||||
public class FindFileContextMenuStorage : BaseStorage<FindFileContextMenuStorage>
|
||||
{
|
||||
[JsonProperty]
|
||||
public List<ContextMenu> ContextMenus = new List<ContextMenu>();
|
||||
|
||||
protected override string ConfigName
|
||||
{
|
||||
get { return "FindFileContextMenu"; }
|
||||
}
|
||||
|
||||
protected override FindFileContextMenuStorage LoadDefaultConfig()
|
||||
{
|
||||
ContextMenus = new List<ContextMenu>()
|
||||
{
|
||||
new ContextMenu()
|
||||
{
|
||||
Name = "Open Containing Folder",
|
||||
Command = "explorer.exe",
|
||||
Argument = " /select \"{path}\""
|
||||
}
|
||||
};
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public class ContextMenu
|
||||
{
|
||||
[JsonProperty]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty]
|
||||
public string Command { get; set; }
|
||||
|
||||
[JsonProperty]
|
||||
public string Argument { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user