From bc341d193f6ae41cdfe246086fbe2a9f141dae64 Mon Sep 17 00:00:00 2001 From: qianlifeng Date: Wed, 14 Jan 2015 22:19:44 +0800 Subject: [PATCH] Upgrade to .net framework 4.0 --- Plugins/Wox.Plugin.CMD/Wox.Plugin.CMD.csproj | 244 +++++++-------- Plugins/Wox.Plugin.CMD/packages.config | 4 +- .../Wox.Plugin.Caculator.csproj | 173 +++++------ .../Wox.Plugin.Color/Wox.Plugin.Color.csproj | 3 +- .../Wox.Plugin.ControlPanel.csproj | 3 +- .../Wox.Plugin.Folder.csproj | 240 +++++++-------- Plugins/Wox.Plugin.Folder/packages.config | 4 +- .../Wox.Plugin.PluginIndicator.csproj | 3 +- .../Wox.Plugin.Program.csproj | 278 +++++++++--------- Plugins/Wox.Plugin.Program/packages.config | 4 +- Plugins/Wox.Plugin.Sys/Wox.Plugin.Sys.csproj | 276 ++++++++--------- Plugins/Wox.Plugin.Sys/packages.config | 2 +- Plugins/Wox.Plugin.Url/Wox.Plugin.Url.csproj | 4 +- .../Wox.Plugin.WebSearch.csproj | 4 +- Plugins/Wox.Plugin.WebSearch/packages.config | 4 +- Wox.Core/Updater/UpdaterManager.cs | 31 ++ Wox.Core/Wox.Core.csproj | 4 +- Wox.Core/packages.config | 2 +- Wox.CrashReporter/Wox.CrashReporter.csproj | 4 +- Wox.CrashReporter/packages.config | 2 +- Wox.Infrastructure/Wox.Infrastructure.csproj | 3 +- Wox.Infrastructure/packages.config | 4 +- Wox.Test/Wox.Test.csproj | 3 +- Wox.Test/packages.config | 2 +- Wox/App.config | 4 - Wox/Properties/Resources.Designer.cs | 26 +- Wox/Properties/Settings.Designer.cs | 4 +- Wox/SettingWindow.xaml.cs | 42 +-- Wox/Wox.csproj | 14 +- Wox/packages.config | 4 +- 30 files changed, 721 insertions(+), 674 deletions(-) create mode 100644 Wox.Core/Updater/UpdaterManager.cs diff --git a/Plugins/Wox.Plugin.CMD/Wox.Plugin.CMD.csproj b/Plugins/Wox.Plugin.CMD/Wox.Plugin.CMD.csproj index 0434355e3a..558967d68c 100644 --- a/Plugins/Wox.Plugin.CMD/Wox.Plugin.CMD.csproj +++ b/Plugins/Wox.Plugin.CMD/Wox.Plugin.CMD.csproj @@ -1,122 +1,124 @@ - - - - - Debug - AnyCPU - {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0} - Library - Properties - Wox.Plugin.CMD - Wox.Plugin.CMD - v3.5 - 512 - ..\..\ - true - - - true - full - false - ..\..\Output\Debug\Plugins\Wox.Plugin.CMD\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\Output\Release\Plugins\Wox.Plugin.CMD\ - TRACE - prompt - 4 - - - - False - ..\..\packages\log4net.2.0.3\lib\net35-full\log4net.dll - - - False - ..\..\packages\Newtonsoft.Json.6.0.7\lib\net35\Newtonsoft.Json.dll - - - - - - - - - - - - - ..\..\packages\InputSimulator.1.0.4.0\lib\net20\WindowsInput.dll - - - - - - CMDSetting.xaml - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - PreserveNewest - - - MSBuild:Compile - Designer - PreserveNewest - - - MSBuild:Compile - Designer - PreserveNewest - - - - - {4fd29318-a8ab-4d8f-aa47-60bc241b8da3} - Wox.Infrastructure - - - {8451ecdd-2ea4-4966-bb0a-7bbc40138e80} - Wox.Plugin - - - - - - PreserveNewest - - - - - PreserveNewest - - - - - - - 这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - - - + + + + + Debug + AnyCPU + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0} + Library + Properties + Wox.Plugin.CMD + Wox.Plugin.CMD + v4.0 + 512 + ..\..\ + true + + + + true + full + false + ..\..\Output\Debug\Plugins\Wox.Plugin.CMD\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\Output\Release\Plugins\Wox.Plugin.CMD\ + TRACE + prompt + 4 + + + + False + ..\..\packages\log4net.2.0.3\lib\net35-full\log4net.dll + + + False + ..\..\packages\Newtonsoft.Json.6.0.7\lib\net35\Newtonsoft.Json.dll + + + + + + + + + + + + + + ..\..\packages\InputSimulator.1.0.4.0\lib\net20\WindowsInput.dll + + + + + + CMDSetting.xaml + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + PreserveNewest + + + MSBuild:Compile + Designer + PreserveNewest + + + MSBuild:Compile + Designer + PreserveNewest + + + + + {4fd29318-a8ab-4d8f-aa47-60bc241b8da3} + Wox.Infrastructure + + + {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/Plugins/Wox.Plugin.CMD/packages.config b/Plugins/Wox.Plugin.CMD/packages.config index 6c533b9f5c..2604e16d68 100644 --- a/Plugins/Wox.Plugin.CMD/packages.config +++ b/Plugins/Wox.Plugin.CMD/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/Plugins/Wox.Plugin.Caculator/Wox.Plugin.Caculator.csproj b/Plugins/Wox.Plugin.Caculator/Wox.Plugin.Caculator.csproj index d7b5429be1..ecd106896a 100644 --- a/Plugins/Wox.Plugin.Caculator/Wox.Plugin.Caculator.csproj +++ b/Plugins/Wox.Plugin.Caculator/Wox.Plugin.Caculator.csproj @@ -1,87 +1,88 @@ - - - - - Debug - AnyCPU - {59BD9891-3837-438A-958D-ADC7F91F6F7E} - Library - Properties - Wox.Plugin.Caculator - Wox.Plugin.Caculator - v3.5 - 512 - ..\..\ - true - - - true - full - false - ..\..\Output\Debug\Plugins\Wox.Plugin.Caculator\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\Output\Release\Plugins\Wox.Plugin.Caculator\ - TRACE - prompt - 4 - - - - - - - - - - - - ..\..\packages\YAMP.1.4.0\lib\net35\YAMP.dll - - - - - - - - - - PreserveNewest - - - - - {4fd29318-a8ab-4d8f-aa47-60bc241b8da3} - Wox.Infrastructure - - - {8451ecdd-2ea4-4966-bb0a-7bbc40138e80} - Wox.Plugin - - - - - PreserveNewest - - - - - - - 这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - - - + + + + + Debug + AnyCPU + {59BD9891-3837-438A-958D-ADC7F91F6F7E} + Library + Properties + Wox.Plugin.Caculator + Wox.Plugin.Caculator + v4.0 + 512 + ..\..\ + true + + + + true + full + false + ..\..\Output\Debug\Plugins\Wox.Plugin.Caculator\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\Output\Release\Plugins\Wox.Plugin.Caculator\ + TRACE + prompt + 4 + + + + + + + + + + + + ..\..\packages\YAMP.1.4.0\lib\net35\YAMP.dll + + + + + + + + + + PreserveNewest + + + + + {4fd29318-a8ab-4d8f-aa47-60bc241b8da3} + Wox.Infrastructure + + + {8451ecdd-2ea4-4966-bb0a-7bbc40138e80} + Wox.Plugin + + + + + PreserveNewest + + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + \ No newline at end of file diff --git a/Plugins/Wox.Plugin.Color/Wox.Plugin.Color.csproj b/Plugins/Wox.Plugin.Color/Wox.Plugin.Color.csproj index 4d7e14b34a..a58af35ba1 100644 --- a/Plugins/Wox.Plugin.Color/Wox.Plugin.Color.csproj +++ b/Plugins/Wox.Plugin.Color/Wox.Plugin.Color.csproj @@ -9,8 +9,9 @@ Properties Wox.Plugin.Color Wox.Plugin.Color - v3.5 + v4.0 512 + true diff --git a/Plugins/Wox.Plugin.ControlPanel/Wox.Plugin.ControlPanel.csproj b/Plugins/Wox.Plugin.ControlPanel/Wox.Plugin.ControlPanel.csproj index 2e3df674b9..87e3009c69 100644 --- a/Plugins/Wox.Plugin.ControlPanel/Wox.Plugin.ControlPanel.csproj +++ b/Plugins/Wox.Plugin.ControlPanel/Wox.Plugin.ControlPanel.csproj @@ -9,8 +9,9 @@ Properties Wox.Plugin.ControlPanel Wox.Plugin.ControlPanel - v3.5 + v4.0 512 + true diff --git a/Plugins/Wox.Plugin.Folder/Wox.Plugin.Folder.csproj b/Plugins/Wox.Plugin.Folder/Wox.Plugin.Folder.csproj index c218980d1e..6fee33dade 100644 --- a/Plugins/Wox.Plugin.Folder/Wox.Plugin.Folder.csproj +++ b/Plugins/Wox.Plugin.Folder/Wox.Plugin.Folder.csproj @@ -1,120 +1,122 @@ - - - - - Debug - AnyCPU - {787B8AA6-CA93-4C84-96FE-DF31110AD1C4} - Library - Properties - Wox.Plugin.Folder - Wox.Plugin.Folder - v3.5 - 512 - ..\..\ - true - - - true - full - false - ..\..\Output\Debug\Plugins\Wox.Plugin.Folder\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\Output\Release\Plugins\Wox.Plugin.Folder\ - TRACE - prompt - 4 - - - - False - ..\..\packages\log4net.2.0.3\lib\net35-full\log4net.dll - - - False - ..\..\packages\Newtonsoft.Json.6.0.7\lib\net35\Newtonsoft.Json.dll - - - - - - - - - - - - - - - - - FolderPluginSettings.xaml - - - - - - - - PreserveNewest - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - PreserveNewest - - - MSBuild:Compile - Designer - PreserveNewest - - - MSBuild:Compile - Designer - PreserveNewest - - - - - {4fd29318-a8ab-4d8f-aa47-60bc241b8da3} - Wox.Infrastructure - - - {8451ecdd-2ea4-4966-bb0a-7bbc40138e80} - Wox.Plugin - - - - - PreserveNewest - - - - - - - 这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - - - + + + + + Debug + AnyCPU + {787B8AA6-CA93-4C84-96FE-DF31110AD1C4} + Library + Properties + Wox.Plugin.Folder + Wox.Plugin.Folder + v4.0 + 512 + ..\..\ + true + + + + true + full + false + ..\..\Output\Debug\Plugins\Wox.Plugin.Folder\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\Output\Release\Plugins\Wox.Plugin.Folder\ + TRACE + prompt + 4 + + + + False + ..\..\packages\log4net.2.0.3\lib\net35-full\log4net.dll + + + False + ..\..\packages\Newtonsoft.Json.6.0.7\lib\net35\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + FolderPluginSettings.xaml + + + + + + + + PreserveNewest + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + PreserveNewest + + + MSBuild:Compile + Designer + PreserveNewest + + + MSBuild:Compile + Designer + PreserveNewest + + + + + {4fd29318-a8ab-4d8f-aa47-60bc241b8da3} + Wox.Infrastructure + + + {8451ecdd-2ea4-4966-bb0a-7bbc40138e80} + Wox.Plugin + + + + + PreserveNewest + + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + \ No newline at end of file diff --git a/Plugins/Wox.Plugin.Folder/packages.config b/Plugins/Wox.Plugin.Folder/packages.config index 6c533b9f5c..2604e16d68 100644 --- a/Plugins/Wox.Plugin.Folder/packages.config +++ b/Plugins/Wox.Plugin.Folder/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/Plugins/Wox.Plugin.PluginIndicator/Wox.Plugin.PluginIndicator.csproj b/Plugins/Wox.Plugin.PluginIndicator/Wox.Plugin.PluginIndicator.csproj index 9d7e9abba7..7ebd0d1c92 100644 --- a/Plugins/Wox.Plugin.PluginIndicator/Wox.Plugin.PluginIndicator.csproj +++ b/Plugins/Wox.Plugin.PluginIndicator/Wox.Plugin.PluginIndicator.csproj @@ -9,8 +9,9 @@ Properties Wox.Plugin.PluginIndicator Wox.Plugin.PluginIndicator - v3.5 + v4.0 512 + true diff --git a/Plugins/Wox.Plugin.Program/Wox.Plugin.Program.csproj b/Plugins/Wox.Plugin.Program/Wox.Plugin.Program.csproj index f26e8de3bb..995a0b86ec 100644 --- a/Plugins/Wox.Plugin.Program/Wox.Plugin.Program.csproj +++ b/Plugins/Wox.Plugin.Program/Wox.Plugin.Program.csproj @@ -1,139 +1,141 @@ - - - - - Debug - AnyCPU - {FDB3555B-58EF-4AE6-B5F1-904719637AB4} - Library - Properties - Wox.Plugin.Program - Wox.Plugin.Program - v3.5 - 512 - ..\..\ - true - - - true - full - false - ..\..\Output\Debug\Plugins\Wox.Plugin.Program\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\Output\Release\Plugins\Wox.Plugin.Program\ - TRACE - prompt - 4 - - - - ..\..\packages\log4net.2.0.3\lib\net35-full\log4net.dll - - - False - ..\..\packages\Newtonsoft.Json.6.0.7\lib\net35\Newtonsoft.Json.dll - - - - - - - - - - - - - - - - - - - - ProgramSetting.xaml - - - - - - - - - ProgramSuffixes.xaml - - - - - - - - PreserveNewest - - - - - PreserveNewest - - - PreserveNewest - - - MSBuild:Compile - Designer - PreserveNewest - - - - - MSBuild:Compile - Designer - PreserveNewest - - - MSBuild:Compile - Designer - PreserveNewest - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - {4fd29318-a8ab-4d8f-aa47-60bc241b8da3} - Wox.Infrastructure - - - {8451ecdd-2ea4-4966-bb0a-7bbc40138e80} - Wox.Plugin - - - - - - - - 这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - - - + + + + + Debug + AnyCPU + {FDB3555B-58EF-4AE6-B5F1-904719637AB4} + Library + Properties + Wox.Plugin.Program + Wox.Plugin.Program + v4.0 + 512 + ..\..\ + true + + + + true + full + false + ..\..\Output\Debug\Plugins\Wox.Plugin.Program\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\Output\Release\Plugins\Wox.Plugin.Program\ + TRACE + prompt + 4 + + + + ..\..\packages\log4net.2.0.3\lib\net35-full\log4net.dll + + + False + ..\..\packages\Newtonsoft.Json.6.0.7\lib\net35\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + + + ProgramSetting.xaml + + + + + + + + + ProgramSuffixes.xaml + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + PreserveNewest + + + MSBuild:Compile + Designer + PreserveNewest + + + + + MSBuild:Compile + Designer + PreserveNewest + + + MSBuild:Compile + Designer + PreserveNewest + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + + + {4fd29318-a8ab-4d8f-aa47-60bc241b8da3} + Wox.Infrastructure + + + {8451ecdd-2ea4-4966-bb0a-7bbc40138e80} + Wox.Plugin + + + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + \ No newline at end of file diff --git a/Plugins/Wox.Plugin.Program/packages.config b/Plugins/Wox.Plugin.Program/packages.config index 6c533b9f5c..2604e16d68 100644 --- a/Plugins/Wox.Plugin.Program/packages.config +++ b/Plugins/Wox.Plugin.Program/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/Plugins/Wox.Plugin.Sys/Wox.Plugin.Sys.csproj b/Plugins/Wox.Plugin.Sys/Wox.Plugin.Sys.csproj index 16c5390424..a26df36cab 100644 --- a/Plugins/Wox.Plugin.Sys/Wox.Plugin.Sys.csproj +++ b/Plugins/Wox.Plugin.Sys/Wox.Plugin.Sys.csproj @@ -1,138 +1,140 @@ - - - - - Debug - AnyCPU - {0B9DE348-9361-4940-ADB6-F5953BFFCCEC} - Library - Properties - Wox.Plugin.Sys - Wox.Plugin.Sys - v3.5 - 512 - ..\..\ - true - - - true - full - false - ..\..\Output\Debug\Plugins\Wox.Plugin.Sys\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\Output\Release\Plugins\Wox.Plugin.Sys\ - TRACE - prompt - 4 - - - - ..\..\packages\log4net.2.0.3\lib\net35-full\log4net.dll - - - - - - - - - - - - - - - - - SysSettings.xaml - - - - - {4fd29318-a8ab-4d8f-aa47-60bc241b8da3} - Wox.Infrastructure - - - {8451ecdd-2ea4-4966-bb0a-7bbc40138e80} - Wox.Plugin - - - - - MSBuild:Compile - Designer - PreserveNewest - - - MSBuild:Compile - Designer - PreserveNewest - - - MSBuild:Compile - Designer - PreserveNewest - - - MSBuild:Compile - Designer - - - - - - PreserveNewest - - - - - PreserveNewest - - - - - PreserveNewest - - - - - PreserveNewest - - - - - PreserveNewest - - - - - PreserveNewest - - - - - PreserveNewest - - - - - - - 这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - - - + + + + + Debug + AnyCPU + {0B9DE348-9361-4940-ADB6-F5953BFFCCEC} + Library + Properties + Wox.Plugin.Sys + Wox.Plugin.Sys + v4.0 + 512 + ..\..\ + true + + + + true + full + false + ..\..\Output\Debug\Plugins\Wox.Plugin.Sys\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\Output\Release\Plugins\Wox.Plugin.Sys\ + TRACE + prompt + 4 + + + + ..\..\packages\log4net.2.0.3\lib\net35-full\log4net.dll + + + + + + + + + + + + + + + + + + SysSettings.xaml + + + + + {4fd29318-a8ab-4d8f-aa47-60bc241b8da3} + Wox.Infrastructure + + + {8451ecdd-2ea4-4966-bb0a-7bbc40138e80} + Wox.Plugin + + + + + MSBuild:Compile + Designer + PreserveNewest + + + MSBuild:Compile + Designer + PreserveNewest + + + MSBuild:Compile + Designer + PreserveNewest + + + MSBuild:Compile + Designer + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + \ No newline at end of file diff --git a/Plugins/Wox.Plugin.Sys/packages.config b/Plugins/Wox.Plugin.Sys/packages.config index 7eb67aa24b..633096dcf3 100644 --- a/Plugins/Wox.Plugin.Sys/packages.config +++ b/Plugins/Wox.Plugin.Sys/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Plugins/Wox.Plugin.Url/Wox.Plugin.Url.csproj b/Plugins/Wox.Plugin.Url/Wox.Plugin.Url.csproj index 250181b303..71fceb3fa4 100644 --- a/Plugins/Wox.Plugin.Url/Wox.Plugin.Url.csproj +++ b/Plugins/Wox.Plugin.Url/Wox.Plugin.Url.csproj @@ -9,8 +9,9 @@ Properties Wox.Plugin.Url Wox.Plugin.Url - v3.5 + v4.0 512 + true @@ -34,6 +35,7 @@ + diff --git a/Plugins/Wox.Plugin.WebSearch/Wox.Plugin.WebSearch.csproj b/Plugins/Wox.Plugin.WebSearch/Wox.Plugin.WebSearch.csproj index f4128edd73..7a33c574cd 100644 --- a/Plugins/Wox.Plugin.WebSearch/Wox.Plugin.WebSearch.csproj +++ b/Plugins/Wox.Plugin.WebSearch/Wox.Plugin.WebSearch.csproj @@ -9,10 +9,11 @@ Properties Wox.Plugin.WebSearch Wox.Plugin.WebSearch - v3.5 + v4.0 512 ..\..\ true + true @@ -43,6 +44,7 @@ + diff --git a/Plugins/Wox.Plugin.WebSearch/packages.config b/Plugins/Wox.Plugin.WebSearch/packages.config index 6c533b9f5c..2604e16d68 100644 --- a/Plugins/Wox.Plugin.WebSearch/packages.config +++ b/Plugins/Wox.Plugin.WebSearch/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/Wox.Core/Updater/UpdaterManager.cs b/Wox.Core/Updater/UpdaterManager.cs new file mode 100644 index 0000000000..12daa7f8f3 --- /dev/null +++ b/Wox.Core/Updater/UpdaterManager.cs @@ -0,0 +1,31 @@ +using Squirrel; + +namespace Wox.Core.Updater +{ + public class UpdaterManager + { + private static UpdaterManager instance; + + public static UpdaterManager Instance + { + get + { + if (instance == null) + { + instance = new UpdaterManager(); + } + return instance; + } + } + + private UpdaterManager() { } + + public void CheckUpdate() + { + using (var mgr = new UpdateManager("https://path/to/my/update/folder", "nuget-package-id", FrameworkVersion.Net45)) + { + mgr.UpdateApp(); + } + } + } +} diff --git a/Wox.Core/Wox.Core.csproj b/Wox.Core/Wox.Core.csproj index d58b7a7a95..60115067ac 100644 --- a/Wox.Core/Wox.Core.csproj +++ b/Wox.Core/Wox.Core.csproj @@ -9,10 +9,11 @@ Properties Wox.Core Wox.Core - v3.5 + v4.0 512 ..\ true + true @@ -46,6 +47,7 @@ + diff --git a/Wox.Core/packages.config b/Wox.Core/packages.config index 6311fc40d5..f688f319a2 100644 --- a/Wox.Core/packages.config +++ b/Wox.Core/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/Wox.CrashReporter/Wox.CrashReporter.csproj b/Wox.CrashReporter/Wox.CrashReporter.csproj index 708c75f916..0c9dd25698 100644 --- a/Wox.CrashReporter/Wox.CrashReporter.csproj +++ b/Wox.CrashReporter/Wox.CrashReporter.csproj @@ -9,10 +9,11 @@ Properties Wox.CrashReporter Wox.CrashReporter - v3.5 + v4.0 512 ..\ true + true @@ -40,6 +41,7 @@ + diff --git a/Wox.CrashReporter/packages.config b/Wox.CrashReporter/packages.config index 7eb67aa24b..633096dcf3 100644 --- a/Wox.CrashReporter/packages.config +++ b/Wox.CrashReporter/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Wox.Infrastructure/Wox.Infrastructure.csproj b/Wox.Infrastructure/Wox.Infrastructure.csproj index 994ec9dcb2..ce32f2a4e0 100644 --- a/Wox.Infrastructure/Wox.Infrastructure.csproj +++ b/Wox.Infrastructure/Wox.Infrastructure.csproj @@ -9,10 +9,11 @@ Properties Wox.Infrastructure Wox.Infrastructure - v3.5 + v4.0 512 ..\ true + true diff --git a/Wox.Infrastructure/packages.config b/Wox.Infrastructure/packages.config index 6c533b9f5c..2604e16d68 100644 --- a/Wox.Infrastructure/packages.config +++ b/Wox.Infrastructure/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/Wox.Test/Wox.Test.csproj b/Wox.Test/Wox.Test.csproj index b2b4ef6049..d41a01533e 100644 --- a/Wox.Test/Wox.Test.csproj +++ b/Wox.Test/Wox.Test.csproj @@ -9,10 +9,11 @@ Properties Wox.Test Wox.Test - v3.5 + v4.0 512 ..\ true + true diff --git a/Wox.Test/packages.config b/Wox.Test/packages.config index 27bc1f3865..821da41519 100644 --- a/Wox.Test/packages.config +++ b/Wox.Test/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/Wox/App.config b/Wox/App.config index 2725471d1c..fa7610a7c0 100644 --- a/Wox/App.config +++ b/Wox/App.config @@ -25,10 +25,6 @@ - - - - diff --git a/Wox/Properties/Resources.Designer.cs b/Wox/Properties/Resources.Designer.cs index 6d1b535344..7665c71436 100644 --- a/Wox/Properties/Resources.Designer.cs +++ b/Wox/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.18444 +// 此代码由工具生成。 +// 运行时版本:4.0.30319.0 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 // //------------------------------------------------------------------------------ @@ -13,12 +13,12 @@ namespace Wox.Properties { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// 一个强类型的资源类,用于查找本地化的字符串等。 /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] @@ -33,7 +33,7 @@ namespace Wox.Properties { } /// - /// Returns the cached ResourceManager instance used by this class. + /// 返回此类使用的缓存的 ResourceManager 实例。 /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ namespace Wox.Properties { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// 使用此强类型资源类,为所有资源查找 + /// 重写当前线程的 CurrentUICulture 属性。 /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -61,7 +61,7 @@ namespace Wox.Properties { } /// - /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + /// 查找类似于 (Icon) 的 System.Drawing.Icon 类型的本地化资源。 /// internal static System.Drawing.Icon app { get { diff --git a/Wox/Properties/Settings.Designer.cs b/Wox/Properties/Settings.Designer.cs index 07c3c5c393..eb3d4dc309 100644 --- a/Wox/Properties/Settings.Designer.cs +++ b/Wox/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // 此代码由工具生成。 -// 运行时版本:4.0.30319.18052 +// 运行时版本:4.0.30319.0 // // 对此文件的更改可能会导致不正确的行为,并且如果 // 重新生成代码,这些更改将会丢失。 @@ -12,7 +12,7 @@ namespace Wox.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/Wox/SettingWindow.xaml.cs b/Wox/SettingWindow.xaml.cs index b7c1ca520f..56152f8c18 100644 --- a/Wox/SettingWindow.xaml.cs +++ b/Wox/SettingWindow.xaml.cs @@ -10,7 +10,6 @@ using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; -using IWshRuntimeLibrary; using Wox.Core.Plugin; using Wox.Plugin; using Wox.Helper; @@ -19,6 +18,7 @@ using Application = System.Windows.Forms.Application; using File = System.IO.File; using MessageBox = System.Windows.MessageBox; using System.Windows.Data; +using Microsoft.Win32; using Wox.Core.i18n; using Wox.Core.Theme; using Wox.Core.UserSettings; @@ -27,7 +27,6 @@ namespace Wox { public partial class SettingWindow : Window { - string woxLinkPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "wox.lnk"); public MainWindow MainWindow; bool settingsLoaded = false; private Dictionary featureControls = new Dictionary(); @@ -67,7 +66,7 @@ namespace Wox UserSettingStorage.Instance.Save(); }; - cbStartWithWindows.IsChecked = File.Exists(woxLinkPath); + cbStartWithWindows.IsChecked = CheckApplicationIsStartupWithWindow(); cbHideWhenDeactive.IsChecked = UserSettingStorage.Instance.HideWhenDeactive; cbDontPromptUpdateMsg.IsChecked = UserSettingStorage.Instance.DontPromptUpdateMsg; @@ -266,33 +265,40 @@ namespace Wox private void CbStartWithWindows_OnChecked(object sender, RoutedEventArgs e) { - CreateStartupFolderShortcut(); + AddApplicationToStartup(); UserSettingStorage.Instance.StartWoxOnSystemStartup = true; UserSettingStorage.Instance.Save(); } private void CbStartWithWindows_OnUnchecked(object sender, RoutedEventArgs e) { - if (File.Exists(woxLinkPath)) - { - File.Delete(woxLinkPath); - } - + RemoveApplicationFromStartup(); UserSettingStorage.Instance.StartWoxOnSystemStartup = false; UserSettingStorage.Instance.Save(); } - private void CreateStartupFolderShortcut() + private void AddApplicationToStartup() { - WshShellClass wshShell = new WshShellClass(); + using (RegistryKey key = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true)) + { + key.SetValue("Wox", "\"" + Application.ExecutablePath + "\" --hidestart"); + } + } - IWshShortcut shortcut = (IWshShortcut)wshShell.CreateShortcut(woxLinkPath); - shortcut.TargetPath = Application.ExecutablePath; - shortcut.Arguments = "hideStart"; - shortcut.WorkingDirectory = Path.GetDirectoryName(Application.ExecutablePath); - shortcut.Description = "Launch Wox"; - shortcut.IconLocation = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "App.ico"); - shortcut.Save(); + private void RemoveApplicationFromStartup() + { + using (RegistryKey key = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true)) + { + key.DeleteValue("Wox", false); + } + } + + private bool CheckApplicationIsStartupWithWindow() + { + using (RegistryKey key = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true)) + { + return key.GetValue("Wox") != null; + } } void ctlHotkey_OnHotkeyChanged(object sender, System.EventArgs e) diff --git a/Wox/Wox.csproj b/Wox/Wox.csproj index 9f585e94f2..034ab2eac4 100644 --- a/Wox/Wox.csproj +++ b/Wox/Wox.csproj @@ -9,7 +9,7 @@ Properties Wox Wox - v3.5 + v4.0 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 @@ -70,7 +70,7 @@ False - ..\packages\Newtonsoft.Json.6.0.7\lib\net35\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.6.0.8\lib\net40\Newtonsoft.Json.dll ..\packages\NHotkey.1.1.0.0\lib\NHotkey.dll @@ -89,6 +89,7 @@ + @@ -308,15 +309,6 @@ - - {F935DC20-1CF0-11D0-ADB9-00C04FD58A0B} - 1 - 0 - 0 - tlbimp - False - True - {50A7E9B0-70EF-11D1-B75A-00A0C90564FE} 1 diff --git a/Wox/packages.config b/Wox/packages.config index 3db4249dc3..41812a60a8 100644 --- a/Wox/packages.config +++ b/Wox/packages.config @@ -1,8 +1,8 @@  - - + +