2014-01-03 10:16:05 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
2014-01-03 15:52:36 +00:00
|
|
|
|
using System.Threading;
|
2014-07-01 14:19:46 +00:00
|
|
|
|
using Wox.Infrastructure.Storage.UserSettings;
|
2014-01-29 10:33:24 +00:00
|
|
|
|
using Wox.Plugin;
|
|
|
|
|
|
using Wox.PluginLoader;
|
2014-01-03 10:16:05 +00:00
|
|
|
|
|
2014-01-29 10:33:24 +00:00
|
|
|
|
namespace Wox.Commands
|
2014-01-03 10:16:05 +00:00
|
|
|
|
{
|
2014-01-03 15:52:36 +00:00
|
|
|
|
public class SystemCommand : BaseCommand
|
2014-01-03 10:16:05 +00:00
|
|
|
|
{
|
2014-03-18 15:41:34 +00:00
|
|
|
|
public override void Dispatch(Query query)
|
2014-01-03 10:16:05 +00:00
|
|
|
|
{
|
2014-03-25 09:08:35 +00:00
|
|
|
|
foreach (PluginPair pair in Plugins.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.System))
|
2014-01-03 15:52:36 +00:00
|
|
|
|
{
|
|
|
|
|
|
PluginPair pair1 = pair;
|
2014-07-01 14:19:46 +00:00
|
|
|
|
|
2014-01-03 15:52:36 +00:00
|
|
|
|
ThreadPool.QueueUserWorkItem(state =>
|
|
|
|
|
|
{
|
2014-03-27 06:50:42 +00:00
|
|
|
|
List<Result> results = pair1.Plugin.Query(query);
|
2014-07-05 15:10:34 +00:00
|
|
|
|
results.ForEach(o=> { o.AutoAjustScore = true; });
|
|
|
|
|
|
|
|
|
|
|
|
App.Window.PushResults(query,pair1.Metadata,results);
|
2014-01-03 15:52:36 +00:00
|
|
|
|
});
|
|
|
|
|
|
}
|
2014-01-03 10:16:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|