Add find file plugin.

This commit is contained in:
qianlifeng
2014-10-22 22:49:34 +08:00
parent 581423a87c
commit 80e38fc430
23 changed files with 478 additions and 203 deletions

View File

@@ -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);

View File

@@ -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