Flow.Launcher/Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs
张弘韬 34f51927cf 1. Move PluginsManager constuction to Init().
2. Return HotKeys list when query is like "pm *"
2020-12-27 21:13:25 +08:00

57 lines
No EOL
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace Flow.Launcher.Plugin.PluginsManager
{
internal class Settings
{
internal string HotKeyInstall { get; set; } = "install";
internal string HotkeyUninstall { get; set; } = "uninstall";
internal string HotkeyUpdate { get; set; } = "update";
internal readonly string icoPath = "Images\\pluginsmanager.png";
internal List<Result> HotKeys
{
get
{
return new List<Result>()
{
new Result()
{
Title = HotKeyInstall,
IcoPath = icoPath,
Action = _ =>
{
Main.Context.API.ChangeQuery("pm install ");
return false;
}
},
new Result()
{
Title = HotkeyUninstall,
IcoPath = icoPath,
Action = _ =>
{
Main.Context.API.ChangeQuery("pm uninstall ");
return false;
}
},
new Result()
{
Title = HotkeyUpdate,
IcoPath = icoPath,
Action = _ =>
{
Main.Context.API.ChangeQuery("pm update ");
return false;
}
}
};
}
}
}
}