From 80e38fc4307f8cb674cb894d63b155ae25c72560 Mon Sep 17 00:00:00 2001 From: qianlifeng Date: Wed, 22 Oct 2014 22:49:34 +0800 Subject: [PATCH] Add find file plugin. --- Plugins/Wox.Plugin.BrowserBookmark/Main.cs | 2 +- Plugins/Wox.Plugin.FindFile/Images/file.png | Bin 0 -> 1145 bytes Plugins/Wox.Plugin.FindFile/Images/find.png | Bin 0 -> 522 bytes Plugins/Wox.Plugin.FindFile/Images/folder.png | Bin 0 -> 4260 bytes .../Wox.Plugin.FindFile/Images/warning.png | Bin 0 -> 5247 bytes Plugins/Wox.Plugin.FindFile/Main.cs | 74 ++++++++ .../Properties/AssemblyInfo.cs | 36 ++++ .../Wox.Plugin.FindFile.csproj | 81 ++++++++ Plugins/Wox.Plugin.FindFile/plugin.json | 12 ++ .../Wox.Plugin.PluginManagement.csproj | 174 +++++++++--------- Wox.Infrastructure/MFTSearch/MFTSearcher.cs | 18 +- .../MFTSearch/MFTSearcherCache.cs | 11 +- Wox.Infrastructure/Properties/AssemblyInfo.cs | 74 ++++---- Wox.Test/MFTSearcherTest.cs | 32 ++++ Wox.Test/Wox.Test.csproj | 1 + Wox.sln | 9 +- Wox/Commands/CommandFactory.cs | 14 +- Wox/Commands/SystemCommand.cs | 4 +- Wox/MainWindow.xaml.cs | 1 + Wox/PluginLoader/Plugins.cs | 3 +- Wox/Properties/AssemblyInfo.cs | 108 +++++------ Wox/Wox.csproj | 12 ++ Wox/app.manifest | 15 ++ 23 files changed, 478 insertions(+), 203 deletions(-) create mode 100644 Plugins/Wox.Plugin.FindFile/Images/file.png create mode 100644 Plugins/Wox.Plugin.FindFile/Images/find.png create mode 100644 Plugins/Wox.Plugin.FindFile/Images/folder.png create mode 100644 Plugins/Wox.Plugin.FindFile/Images/warning.png create mode 100644 Plugins/Wox.Plugin.FindFile/Main.cs create mode 100644 Plugins/Wox.Plugin.FindFile/Properties/AssemblyInfo.cs create mode 100644 Plugins/Wox.Plugin.FindFile/Wox.Plugin.FindFile.csproj create mode 100644 Plugins/Wox.Plugin.FindFile/plugin.json create mode 100644 Wox.Test/MFTSearcherTest.cs create mode 100644 Wox/app.manifest diff --git a/Plugins/Wox.Plugin.BrowserBookmark/Main.cs b/Plugins/Wox.Plugin.BrowserBookmark/Main.cs index 11aa3f9f2f..9bf4c885b3 100644 --- a/Plugins/Wox.Plugin.BrowserBookmark/Main.cs +++ b/Plugins/Wox.Plugin.BrowserBookmark/Main.cs @@ -8,7 +8,7 @@ namespace Wox.Plugin.BrowserBookmark { private PluginInitContext context; - // TODO: periodically refresh the cache? + // TODO: periodically refresh the Cache? private List cachedBookmarks = new List(); public void Init(PluginInitContext context) diff --git a/Plugins/Wox.Plugin.FindFile/Images/file.png b/Plugins/Wox.Plugin.FindFile/Images/file.png new file mode 100644 index 0000000000000000000000000000000000000000..2913d69623b922f210b3910313ceb2fe97a706f0 GIT binary patch literal 1145 zcmV-<1cv*GP)3RSTBK}CXsAACVIT15yxDA*P&J}Q1FRg_9=vq+`JR z{Leji80M6B+kO**Gk89S5CUKf3gnIM49J=sDs@cTCNkL^Vo4pHdtYE!ps;fRYwx-> zsE0x-3WkfERY2bIVAw7u4FglU57TlG9XpGmvl-YXTM$wmmKuyR>AXbU3O6K2QIbyQ)zUZ=);{iUXRY9IDUQWS$19k-*sWaBY;XXc40YrSY$

CwA)bHW_E`%!FAmEP^-B;buym0@ zT6CNo3dVI^ATOMt{^zMtoJo#j@RL_60b84Y7MmZrV^#xBV$M9oN)Wk5a<+iyI>kV+ zIBDc!ENh^qM#G8d2=@KZjp634m4GcDelK2KdrtuH2;dN)sx&4_4-3*{nxe^ZTyU4P zkr76qbk@RUmsX?eR06vX{f?2(UaJIb+S@7`H#}Ul0MZp4(uNRSv^mdtz5<)uFgzP} zp1~Cs0Zgp8B8+2$aq>hvMh|YQ1gvXn5xbvj2ml7nPLKt3MKvXi5c$ZbI;T`oCF>rE z?vVvH^?EKQas{kfaV7rfi{qJnhmmUCUI}Q3d@4TJ{CEJ!7#376f|qLK7L_T*a3Y^6 zDp^E=_;i}wg-60q=mu`Sb{UTSJ%Y!Y4r1cV9hHF9JDNqymPZ4?WWEqMK8X52Y=#gy zs+wSq6ea{*B!M0yYe|Egi5spC<79Lc^^N5i zx#VIB(*)Ku9>C<+ivdu(s!D@PGgcLiT&ICkI#F0Loh%90pnE8Rhav|swHN>b3sj0C z0?-j6F{GEI106~yOKUFx;NKj>N-Ge-rety-SJhsE;{;f9ApmmLGK5(mzDy%NuDQH+ zVZcowYcoJ92{f58-kfQNMjZvfoB30ZX5FL-c&~((IPGm?HOvx=rsPeRyXj zptj+4(ciLd(J!AVtJdv;^~*c+1LWNm(kbG+UMfFx80D{-G6VPrGrycSN)dQN00000 LNkvXXu0mjfx$gec literal 0 HcmV?d00001 diff --git a/Plugins/Wox.Plugin.FindFile/Images/find.png b/Plugins/Wox.Plugin.FindFile/Images/find.png new file mode 100644 index 0000000000000000000000000000000000000000..f4a7b2a0007f3eaaf97c982f531608c6bb206eaa GIT binary patch literal 522 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE0wix1Z>k4UOiAAEE)4(M`_JqL@;D1TB8!2v z2N=7Z%(epwmK8Xr18D^?ZvQoBE&~Ijxu=U`h{y4zQ&*R@7zni4S1AbyY72CTifV_2 zeEB<{X(Ll$U}Hq1gNs5DpXi;UnQtb2nk}PdEI-rJNK@_H%f~5yDjR0CCvBe+vva|8 z{lgB&HQ4SegnP+_{S)_G0nT|>hVLqjW511kdyT>~>K1A}Vbk(CKhzbR0|{wM#WfEpM)UHx3vIVCg!0LdA@=Kufz literal 0 HcmV?d00001 diff --git a/Plugins/Wox.Plugin.FindFile/Images/folder.png b/Plugins/Wox.Plugin.FindFile/Images/folder.png new file mode 100644 index 0000000000000000000000000000000000000000..330cb2e4bf8ac344014dd3d22910de1ae884343a GIT binary patch literal 4260 zcmV;V5L@qwP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&gh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;m-YIj8w~%O9>uu7OQ7ZpXV_0U_5sLZnP}%j`0XW;+-LEUk%}@XP#Sl zw%N*?4}JXopKfeqIB(P&S^X!!e(`5>Gn1uv-!pOF14pax%0*^}E9FwH5I4?>_wncX+7~`@s#+gZU8I5E5MJw^zA>)j@E|mfA2e|K79OvgC{@u zp6O#>{?6~e`i~c{JPm9N+I%+v03P}J5C77>@7_B;CBh59xm%M-9B)MX;}^gA+wYaq zq?+Y&W2Z~&wg66j|JmNJ-#T{x>@T#qeA+HRx1#Mh{yzX~hW#;ZfI(gW0000eRN literal 0 HcmV?d00001 diff --git a/Plugins/Wox.Plugin.FindFile/Images/warning.png b/Plugins/Wox.Plugin.FindFile/Images/warning.png new file mode 100644 index 0000000000000000000000000000000000000000..b1b5f0acd3b8d28f499b2fcc995711ce3b1cd585 GIT binary patch literal 5247 zcmV-_6oBiAP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+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@`CaN3^k2xW%Z2O&Z_~D=dWXsJLWtR^Gte48!m-bf4>U zhUxnNZl$Al`Y)p1{YvfnA6--b zG?rnzeb4)w2tXTv4lK{sP0Rh$S%GEVJ^=6mfMwqPHvngQ(^g4c Query(Query query) + { + if (!initial) + { + return new List() + { + new Result("Wox is indexing your files, please try later.","Images/warning.png") + }; + } + + string q = query.GetAllRemainingParameter(); + return MFTSearcher.Search(q).Take(100).Select(t => ConvertMFTSearch(t, q)).ToList(); + } + + public void Init(PluginInitContext context) + { + this.context = context; + var searchtimestart = DateTime.Now; + MFTSearcher.IndexAllVolumes(); + initial = true; + var searchtimeend = DateTime.Now; + Debug.WriteLine(string.Format("{0} file, {1} folder indexed, {2}ms has spent.", MFTSearcher.IndexedFileCount, MFTSearcher.IndexedFolderCount, searchtimeend.Subtract(searchtimestart).TotalMilliseconds)); + } + + private Result ConvertMFTSearch(MFTSearchRecord record, string query) + { + string icoPath = "Images/file.png"; + if (record.IsFolder) + { + icoPath = "Images/folder.png"; + } + + string name = Path.GetFileName(record.FullPath); + FuzzyMatcher matcher = FuzzyMatcher.Create(query); + return new Result() + { + Title = name, + Score = matcher.Evaluate(name).Score, + SubTitle = record.FullPath, + IcoPath = icoPath, + Action = _ => + { + try + { + Process.Start(record.FullPath); + } + catch + { + context.API.ShowMsg("Can't open " + record.FullPath, string.Empty, string.Empty); + return false; + } + return true; + } + }; + } + } +} diff --git a/Plugins/Wox.Plugin.FindFile/Properties/AssemblyInfo.cs b/Plugins/Wox.Plugin.FindFile/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..1484395d76 --- /dev/null +++ b/Plugins/Wox.Plugin.FindFile/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Wox.Plugin.FindFile")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Wox.Plugin.FindFile")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("93b857b4-07a4-4ac1-a3ee-d038ace03ce9")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Plugins/Wox.Plugin.FindFile/Wox.Plugin.FindFile.csproj b/Plugins/Wox.Plugin.FindFile/Wox.Plugin.FindFile.csproj new file mode 100644 index 0000000000..d16a7a5783 --- /dev/null +++ b/Plugins/Wox.Plugin.FindFile/Wox.Plugin.FindFile.csproj @@ -0,0 +1,81 @@ + + + + + Debug + AnyCPU + {84EA88B4-71F2-4A3D-9771-D7B0244C0D81} + Library + Properties + Wox.Plugin.FindFile + Wox.Plugin.FindFile + v3.5 + 512 + + + + true + full + false + ..\..\Output\Debug\Plugins\Wox.Plugin.FindFile\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\Output\Release\Plugins\Wox.Plugin.FindFile\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + {4fd29318-a8ab-4d8f-aa47-60bc241b8da3} + Wox.Infrastructure + + + {8451ecdd-2ea4-4966-bb0a-7bbc40138e80} + Wox.Plugin + + + + + + Always + + + Always + + + Always + + + + + PreserveNewest + + + + + \ No newline at end of file diff --git a/Plugins/Wox.Plugin.FindFile/plugin.json b/Plugins/Wox.Plugin.FindFile/plugin.json new file mode 100644 index 0000000000..ed9c9f3930 --- /dev/null +++ b/Plugins/Wox.Plugin.FindFile/plugin.json @@ -0,0 +1,12 @@ +{ + "ID":"64EDFA42642446E5BBFF2546EE4549BB", + "ActionKeyword":"f", + "Name":"Find Files and Folders", + "Description":"Search all your files and folders in your disk", + "Author":"qianlifeng", + "Version":"1.0", + "Language":"csharp", + "Website":"http://www.getwox.com/plugin", + "ExecuteFileName":"Wox.Plugin.FindFile.dll", + "IcoPath":"Images\\find.png" +} diff --git a/Plugins/Wox.Plugin.PluginManagement/Wox.Plugin.PluginManagement.csproj b/Plugins/Wox.Plugin.PluginManagement/Wox.Plugin.PluginManagement.csproj index 4b061e3dfd..d080cc10f8 100644 --- a/Plugins/Wox.Plugin.PluginManagement/Wox.Plugin.PluginManagement.csproj +++ b/Plugins/Wox.Plugin.PluginManagement/Wox.Plugin.PluginManagement.csproj @@ -1,88 +1,88 @@ - - - - - Debug - AnyCPU - {049490F0-ECD2-4148-9B39-2135EC346EBE} - Library - Properties - Wox.Plugin.PluginManagement - Wox.Plugin.PluginManagement - v3.5 - 512 - ..\..\ - true - - - true - full - false - ..\..\Output\Debug\Plugins\Wox.Plugin.PluginManagement\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\Output\Release\Plugins\Wox.Plugin.PluginManagement\ - TRACE - prompt - 4 - - - - False - ..\..\packages\Newtonsoft.Json.6.0.5\lib\net35\Newtonsoft.Json.dll - - - - - - - - - - - - - - - - - {8451ecdd-2ea4-4966-bb0a-7bbc40138e80} - Wox.Plugin - - - - - - PreserveNewest - - - - - PreserveNewest - - - - - - - - - - - 这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - - - + + + + + Debug + AnyCPU + {049490F0-ECD2-4148-9B39-2135EC346EBE} + Library + Properties + Wox.Plugin.PluginManagement + Wox.Plugin.PluginManagement + v3.5 + 512 + ..\..\ + true + + + true + full + false + ..\..\Output\Debug\Plugins\Wox.Plugin.PluginManagement\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\Output\Release\Plugins\Wox.Plugin.PluginManagement\ + TRACE + prompt + 4 + + + + False + ..\..\packages\Newtonsoft.Json.6.0.5\lib\net35\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + {8451ecdd-2ea4-4966-bb0a-7bbc40138e80} + Wox.Plugin + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + \ No newline at end of file diff --git a/Wox.Infrastructure/MFTSearch/MFTSearcher.cs b/Wox.Infrastructure/MFTSearch/MFTSearcher.cs index 044969b6d8..317468e885 100644 --- a/Wox.Infrastructure/MFTSearch/MFTSearcher.cs +++ b/Wox.Infrastructure/MFTSearch/MFTSearcher.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -30,13 +31,26 @@ namespace Wox.Infrastructure.MFTSearch { foreach (DriveInfo drive in DriveInfo.GetDrives()) { - IndexVolume(drive.VolumeLabel); + IndexVolume(drive.Name.Replace("\\", "")); } } + public static long IndexedFileCount + { + get { return cache.FileCount; } + } + public static long IndexedFolderCount + { + get { return cache.FolderCount; } + } + public static List Search(string item) { - return null; + if (string.IsNullOrEmpty(item)) return new List(); + + List found = cache.FindByName(item); + found.ForEach(x => FillPath(x.VolumeName, x, cache)); + return found.ConvertAll(o => new MFTSearchRecord(o)); } private static void AddVolumeRootRecord(string volumeName, ref List folders) diff --git a/Wox.Infrastructure/MFTSearch/MFTSearcherCache.cs b/Wox.Infrastructure/MFTSearch/MFTSearcherCache.cs index d6f19bb5bf..87c04aedde 100644 --- a/Wox.Infrastructure/MFTSearch/MFTSearcherCache.cs +++ b/Wox.Infrastructure/MFTSearch/MFTSearcherCache.cs @@ -85,22 +85,19 @@ namespace Wox.Infrastructure.MFTSearch return false; } } - public List FindByName(string filename, out long foundFileCnt, out long fountFolderCnt) + public List FindByName(string filename) { - + filename = filename.ToLower(); var fileQuery = from filesInVolumeDic in _volumes_files.Values from eachFilePair in filesInVolumeDic - where eachFilePair.Value.Name.Contains(filename) + where eachFilePair.Value.Name.ToLower().Contains(filename) select eachFilePair.Value; var folderQuery = from fldsInVolumeDic in _volumes_folders.Values from eachFldPair in fldsInVolumeDic - where eachFldPair.Value.Name.Contains(filename) + where eachFldPair.Value.Name.ToLower().Contains(filename) select eachFldPair.Value; - foundFileCnt = fileQuery.Count(); - fountFolderCnt = folderQuery.Count(); - List result = new List(); result.AddRange(fileQuery); diff --git a/Wox.Infrastructure/Properties/AssemblyInfo.cs b/Wox.Infrastructure/Properties/AssemblyInfo.cs index 1bffb5142d..cc1640d88f 100644 --- a/Wox.Infrastructure/Properties/AssemblyInfo.cs +++ b/Wox.Infrastructure/Properties/AssemblyInfo.cs @@ -1,37 +1,37 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 有关程序集的常规信息通过以下 -// 特性集控制。更改这些特性值可修改 -// 与程序集关联的信息。 -[assembly: AssemblyTitle("Wox.Infrastructure")] -[assembly: AssemblyDescription("https://github.com/qianlifeng/Wox")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Wox.Infrastructure")] -[assembly: AssemblyCopyright("The MIT License (MIT)")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// 将 ComVisible 设置为 false 使此程序集中的类型 -// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, -// 则将该类型上的 ComVisible 特性设置为 true。 -[assembly: ComVisible(false)] - -// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID -[assembly: Guid("aee57a31-29e5-4f03-a41f-7917910fe90f")] - -// 程序集的版本信息由下面四个值组成: -// -// 主版本 -// 次版本 -// 生成号 -// 修订号 -// -// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, -// 方法是按如下所示使用“*”: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: log4net.Config.XmlConfigurator(Watch = true)] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Wox.Infrastructure")] +[assembly: AssemblyDescription("https://github.com/qianlifeng/Wox")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Wox.Infrastructure")] +[assembly: AssemblyCopyright("The MIT License (MIT)")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("aee57a31-29e5-4f03-a41f-7917910fe90f")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: log4net.Config.XmlConfigurator(Watch = true)] diff --git a/Wox.Test/MFTSearcherTest.cs b/Wox.Test/MFTSearcherTest.cs new file mode 100644 index 0000000000..b7f318c33d --- /dev/null +++ b/Wox.Test/MFTSearcherTest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NUnit.Framework; +using Wox.Infrastructure.MFTSearch; + +namespace Wox.Test +{ + [TestFixture] + public class MFTSearcherTest + { + [Test] + public void MatchTest() + { + var searchtimestart = DateTime.Now; + MFTSearcher.IndexAllVolumes(); + var searchtimeend = DateTime.Now; + Console.WriteLine(string.Format("{0} file indexed, {1}ms has spent.", MFTSearcher.IndexedFileCount, searchtimeend.Subtract(searchtimestart).TotalMilliseconds)); + + searchtimestart = DateTime.Now; + List mftSearchRecords = MFTSearcher.Search("q"); + searchtimeend = DateTime.Now; + Console.WriteLine(string.Format("{0} file searched, {1}ms has spent.", mftSearchRecords.Count, searchtimeend.Subtract(searchtimestart).TotalMilliseconds)); + + searchtimestart = DateTime.Now; + mftSearchRecords = MFTSearcher.Search("ss"); + searchtimeend = DateTime.Now; + Console.WriteLine(string.Format("{0} file searched, {1}ms has spent.", mftSearchRecords.Count, searchtimeend.Subtract(searchtimestart).TotalMilliseconds)); + } + } +} diff --git a/Wox.Test/Wox.Test.csproj b/Wox.Test/Wox.Test.csproj index a7f47b1002..54cdca3d43 100644 --- a/Wox.Test/Wox.Test.csproj +++ b/Wox.Test/Wox.Test.csproj @@ -44,6 +44,7 @@ + diff --git a/Wox.sln b/Wox.sln index 1d805d99c7..5f2923c8bf 100644 --- a/Wox.sln +++ b/Wox.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +VisualStudioVersion = 12.0.30723.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Test", "Wox.Test\Wox.Test.csproj", "{FF742965-9A80-41A5-B042-D6C7D3A21708}" EndProject @@ -19,6 +19,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Plugin.PluginManagement EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Plugin.BrowserBookmark", "Plugins\Wox.Plugin.BrowserBookmark\Wox.Plugin.BrowserBookmark.csproj", "{9B130CC5-14FB-41FF-B310-0A95B6894C37}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Plugin.FindFile", "Plugins\Wox.Plugin.FindFile\Wox.Plugin.FindFile.csproj", "{84EA88B4-71F2-4A3D-9771-D7B0244C0D81}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -53,6 +55,10 @@ Global {9B130CC5-14FB-41FF-B310-0A95B6894C37}.Debug|Any CPU.Build.0 = Debug|Any CPU {9B130CC5-14FB-41FF-B310-0A95B6894C37}.Release|Any CPU.ActiveCfg = Release|Any CPU {9B130CC5-14FB-41FF-B310-0A95B6894C37}.Release|Any CPU.Build.0 = Release|Any CPU + {84EA88B4-71F2-4A3D-9771-D7B0244C0D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84EA88B4-71F2-4A3D-9771-D7B0244C0D81}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84EA88B4-71F2-4A3D-9771-D7B0244C0D81}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84EA88B4-71F2-4A3D-9771-D7B0244C0D81}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -60,5 +66,6 @@ Global GlobalSection(NestedProjects) = preSolution {049490F0-ECD2-4148-9B39-2135EC346EBE} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} {9B130CC5-14FB-41FF-B310-0A95B6894C37} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} + {84EA88B4-71F2-4A3D-9771-D7B0244C0D81} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} EndGlobalSection EndGlobal diff --git a/Wox/Commands/CommandFactory.cs b/Wox/Commands/CommandFactory.cs index b248afa716..fc18439b46 100644 --- a/Wox/Commands/CommandFactory.cs +++ b/Wox/Commands/CommandFactory.cs @@ -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); diff --git a/Wox/Commands/SystemCommand.cs b/Wox/Commands/SystemCommand.cs index 50b38959fd..162011f8a8 100644 --- a/Wox/Commands/SystemCommand.cs +++ b/Wox/Commands/SystemCommand.cs @@ -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 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 diff --git a/Wox/MainWindow.xaml.cs b/Wox/MainWindow.xaml.cs index d0b5ca5318..e44a65d539 100644 --- a/Wox/MainWindow.xaml.cs +++ b/Wox/MainWindow.xaml.cs @@ -17,6 +17,7 @@ using NHotkey.Wpf; using Wox.Commands; using Wox.Helper; using Wox.Infrastructure; +using Wox.Infrastructure.MFTSearch; using Wox.Infrastructure.Storage; using Wox.Infrastructure.Storage.UserSettings; using Wox.Plugin; diff --git a/Wox/PluginLoader/Plugins.cs b/Wox/PluginLoader/Plugins.cs index ac373b8c93..102f7c4f70 100644 --- a/Wox/PluginLoader/Plugins.cs +++ b/Wox/PluginLoader/Plugins.cs @@ -32,7 +32,8 @@ namespace Wox.PluginLoader })); } - forker.Join(); + //if plugin init do heavy works, join here will block the UI + //forker.Join(); } public static List AllPlugins diff --git a/Wox/Properties/AssemblyInfo.cs b/Wox/Properties/AssemblyInfo.cs index a96441ba2a..0d694b4f83 100644 --- a/Wox/Properties/AssemblyInfo.cs +++ b/Wox/Properties/AssemblyInfo.cs @@ -1,55 +1,55 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// 有关程序集的常规信息通过以下 -// 特性集控制。更改这些特性值可修改 -// 与程序集关联的信息。 -[assembly: AssemblyTitle("Wox")] -[assembly: AssemblyDescription("https://github.com/qianlifeng/Wox")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Wox")] -[assembly: AssemblyCopyright("The MIT License (MIT)")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// 将 ComVisible 设置为 false 使此程序集中的类型 -// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, -// 则将该类型上的 ComVisible 特性设置为 true。 -[assembly: ComVisible(false)] - -//若要开始生成可本地化的应用程序,请在 -// 中的 .csproj 文件中 -//设置 CultureYouAreCodingWith。例如,如果您在源文件中 -//使用的是美国英语,请将 设置为 en-US。然后取消 -//对以下 NeutralResourceLanguage 特性的注释。更新 -//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //主题特定资源词典所处位置 - //(在页面或应用程序资源词典中 - // 未找到某个资源的情况下使用) - ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 - //(在页面、应用程序或任何主题特定资源词典中 - // 未找到某个资源的情况下使用) -)] - - -// 程序集的版本信息由下面四个值组成: -// -// 主版本 -// 次版本 -// 生成号 -// 修订号 -// -// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, -// 方法是按如下所示使用“*”: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Wox")] +[assembly: AssemblyDescription("https://github.com/qianlifeng/Wox")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Wox")] +[assembly: AssemblyCopyright("The MIT License (MIT)")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +//若要开始生成可本地化的应用程序,请在 +// 中的 .csproj 文件中 +//设置 CultureYouAreCodingWith。例如,如果您在源文件中 +//使用的是美国英语,请将 设置为 en-US。然后取消 +//对以下 NeutralResourceLanguage 特性的注释。更新 +//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //主题特定资源词典所处位置 + //(在页面或应用程序资源词典中 + // 未找到某个资源的情况下使用) + ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 + //(在页面、应用程序或任何主题特定资源词典中 + // 未找到某个资源的情况下使用) +)] + + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/Wox/Wox.csproj b/Wox/Wox.csproj index 14f4194d30..6dbd0ac08f 100644 --- a/Wox/Wox.csproj +++ b/Wox/Wox.csproj @@ -58,6 +58,9 @@ Wox.EntryPoint + + app.manifest + @@ -202,6 +205,7 @@ Designer MSBuild:Compile + MSBuild:Compile Designer @@ -380,6 +384,14 @@ + + + + + + + + diff --git a/Wox/app.manifest b/Wox/app.manifest new file mode 100644 index 0000000000..1eb9c6c494 --- /dev/null +++ b/Wox/app.manifest @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + +