mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
Add find file plugin.
This commit is contained in:
@@ -10,21 +10,11 @@ namespace Wox.Commands
|
||||
{
|
||||
internal static class CommandFactory
|
||||
{
|
||||
private static PluginCommand pluginCmd;
|
||||
private static SystemCommand systemCmd;
|
||||
private static PluginCommand pluginCmd = new PluginCommand();
|
||||
private static SystemCommand systemCmd = new SystemCommand();
|
||||
|
||||
public static void DispatchCommand(Query query)
|
||||
{
|
||||
//lazy init command instance.
|
||||
if (pluginCmd == null)
|
||||
{
|
||||
pluginCmd = new PluginCommand();
|
||||
}
|
||||
if (systemCmd == null)
|
||||
{
|
||||
systemCmd = new SystemCommand();
|
||||
}
|
||||
|
||||
if (Plugins.HitThirdpartyKeyword(query))
|
||||
{
|
||||
pluginCmd.Dispatch(query);
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Wox.Infrastructure.MFTSearch;
|
||||
using Wox.Infrastructure.Storage.UserSettings;
|
||||
using Wox.Plugin;
|
||||
using Wox.Plugin.SystemPlugins;
|
||||
@@ -12,9 +13,10 @@ namespace Wox.Commands
|
||||
{
|
||||
public class SystemCommand : BaseCommand
|
||||
{
|
||||
private IEnumerable<PluginPair> allSytemPlugins = Plugins.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.System);
|
||||
|
||||
public override void Dispatch(Query query)
|
||||
{
|
||||
var allSytemPlugins = Plugins.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.System);
|
||||
if (UserSettingStorage.Instance.WebSearches.Exists(o => o.ActionWord == query.ActionName && o.Enabled))
|
||||
{
|
||||
//websearch mode
|
||||
|
||||
Reference in New Issue
Block a user