mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Refactoring
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"ActionKeyword":"*",
|
||||
"Name":"Calculator",
|
||||
"Description":"Provide mathematical calculations.(Try 5*3-2 in Wox)",
|
||||
"Author":"qianlifeng",
|
||||
"Author":"cxfksword",
|
||||
"Version":"1.0.0",
|
||||
"Language":"csharp",
|
||||
"Website":"http://www.getwox.com/plugin",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Wox.Core.Plugin;
|
||||
using Wox.Infrastructure.Storage.UserSettings;
|
||||
|
||||
namespace Wox.Plugin.PluginIndicator
|
||||
@@ -16,7 +17,7 @@ namespace Wox.Plugin.PluginIndicator
|
||||
|
||||
if (allPlugins.Count == 0)
|
||||
{
|
||||
allPlugins = context.API.GetAllPlugins().Where(o => o.Metadata.ActionKeyword != "*").ToList();
|
||||
allPlugins = context.API.GetAllPlugins().Where(o => !PluginManager.IsSystemPlugin(o.Metadata)).ToList();
|
||||
}
|
||||
|
||||
foreach (PluginMetadata metadata in allPlugins.Select(o => o.Metadata))
|
||||
|
||||
@@ -47,6 +47,10 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Wox.Core\Wox.Core.csproj">
|
||||
<Project>{b749f0db-8e75-47db-9e5e-265d16d0c0d2}</Project>
|
||||
<Name>Wox.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Wox.Infrastructure\Wox.Infrastructure.csproj">
|
||||
<Project>{4fd29318-a8ab-4d8f-aa47-60bc241b8da3}</Project>
|
||||
<Name>Wox.Infrastructure</Name>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Wox.Infrastructure;
|
||||
@@ -72,7 +73,11 @@ namespace Wox.Plugin.Program
|
||||
public void Init(PluginInitContext context)
|
||||
{
|
||||
this.context = context;
|
||||
programs = ProgramCacheStorage.Instance.Programs;
|
||||
using (new Timeit("Preload programs"))
|
||||
{
|
||||
programs = ProgramCacheStorage.Instance.Programs;
|
||||
}
|
||||
Debug.WriteLine(string.Format("Preload {0} programs from cache",programs.Count),"Wox");
|
||||
using (new Timeit("Program Index"))
|
||||
{
|
||||
IndexPrograms();
|
||||
|
||||
Reference in New Issue
Block a user