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 0000000000..2913d69623 Binary files /dev/null and b/Plugins/Wox.Plugin.FindFile/Images/file.png differ diff --git a/Plugins/Wox.Plugin.FindFile/Images/find.png b/Plugins/Wox.Plugin.FindFile/Images/find.png new file mode 100644 index 0000000000..f4a7b2a000 Binary files /dev/null and b/Plugins/Wox.Plugin.FindFile/Images/find.png differ diff --git a/Plugins/Wox.Plugin.FindFile/Images/folder.png b/Plugins/Wox.Plugin.FindFile/Images/folder.png new file mode 100644 index 0000000000..330cb2e4bf Binary files /dev/null and b/Plugins/Wox.Plugin.FindFile/Images/folder.png differ diff --git a/Plugins/Wox.Plugin.FindFile/Images/warning.png b/Plugins/Wox.Plugin.FindFile/Images/warning.png new file mode 100644 index 0000000000..b1b5f0acd3 Binary files /dev/null and b/Plugins/Wox.Plugin.FindFile/Images/warning.png differ diff --git a/Plugins/Wox.Plugin.FindFile/Main.cs b/Plugins/Wox.Plugin.FindFile/Main.cs new file mode 100644 index 0000000000..a3839ec627 --- /dev/null +++ b/Plugins/Wox.Plugin.FindFile/Main.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Runtime.Serialization.Formatters.Binary; +using System.Text; +using Wox.Infrastructure; +using Wox.Infrastructure.MFTSearch; + +namespace Wox.Plugin.FindFile +{ + public class Main : IPlugin + { + private PluginInitContext context; + private bool initial = false; + + public List 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 @@ + + + + + + + + + + + + + + +