From c9edc217fdc5c907be6be103545f478a26cff2ed Mon Sep 17 00:00:00 2001 From: bao-qian Date: Mon, 2 Nov 2015 13:43:19 +0000 Subject: [PATCH] Misc --- Wox.sln | 7 +++++-- Wox/App.xaml.cs | 3 ++- Wox/ImageLoader/ImageLoader.cs | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Wox.sln b/Wox.sln index 4fa7835613..1bffc62f8f 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 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.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 @@ -60,6 +60,9 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Plugin.Everything", "Plugins\Wox.Plugin.Everything\Wox.Plugin.Everything.csproj", "{230AE83F-E92E-4E69-8355-426B305DA9C0}" EndProject Global + GlobalSection(Performance) = preSolution + HasPerformanceSessions = true + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU diff --git a/Wox/App.xaml.cs b/Wox/App.xaml.cs index d90577ac92..8808ef1876 100644 --- a/Wox/App.xaml.cs +++ b/Wox/App.xaml.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading; using System.Windows; using Wox.CommandArgs; using Wox.Core.Plugin; @@ -34,9 +35,9 @@ namespace Wox DispatcherUnhandledException += ErrorReporting.DispatcherUnhandledException; AppDomain.CurrentDomain.UnhandledException += ErrorReporting.UnhandledExceptionHandle; + //ThreadPool.QueueUserWorkItem(o => { ImageLoader.ImageLoader.PreloadImages(); }); Window = new MainWindow(); PluginManager.Init(Window); - ImageLoader.ImageLoader.PreloadImages(); CommandArgsFactory.Execute(e.Args.ToList()); } diff --git a/Wox/ImageLoader/ImageLoader.cs b/Wox/ImageLoader/ImageLoader.cs index 712090a6fe..18a5a91d09 100644 --- a/Wox/ImageLoader/ImageLoader.cs +++ b/Wox/ImageLoader/ImageLoader.cs @@ -70,7 +70,7 @@ namespace Wox.ImageLoader if (!imageCache.ContainsKey(image.Key)) { KeyValuePair copyedImg = image; - App.Window.Dispatcher.Invoke(new Action(() => imageCache.Add(copyedImg.Key, img))); + imageCache.Add(copyedImg.Key, img); } } }