Move ImageLoader to Wox.Infrastructure, part 2

This commit is contained in:
bao-qian
2016-04-26 01:20:10 +01:00
parent fd139d4903
commit fc2d7b41d8
5 changed files with 12 additions and 10 deletions

View File

@@ -1,10 +1,8 @@
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using Wox.Infrastructure.Storage;
namespace Wox.ImageLoader namespace Wox.Infrastructure.Image
{ {
[Serializable] [Serializable]
public class ImageCache public class ImageCache

View File

@@ -3,16 +3,15 @@ using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Windows; using System.Windows;
using System.Windows.Interop; using System.Windows.Interop;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Linq;
using Wox.Infrastructure;
using Wox.Infrastructure.Storage; using Wox.Infrastructure.Storage;
namespace Wox.ImageLoader namespace Wox.Infrastructure.Image
{ {
public class ImageLoader public class ImageLoader
{ {

View File

@@ -52,8 +52,12 @@
<HintPath>..\packages\Pinyin4DotNet.2016.4.23.4\lib\net452\Pinyin4Net.dll</HintPath> <HintPath>..\packages\Pinyin4DotNet.2016.4.23.4\lib\net452\Pinyin4Net.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
</ItemGroup> </ItemGroup>
@@ -70,6 +74,8 @@
<Compile Include="Exception\WoxPluginException.cs" /> <Compile Include="Exception\WoxPluginException.cs" />
<Compile Include="Hotkey\InterceptKeys.cs" /> <Compile Include="Hotkey\InterceptKeys.cs" />
<Compile Include="Hotkey\KeyEvent.cs" /> <Compile Include="Hotkey\KeyEvent.cs" />
<Compile Include="Image\ImageCache.cs" />
<Compile Include="Image\ImageLoader.cs" />
<Compile Include="Logger\Log.cs" /> <Compile Include="Logger\Log.cs" />
<Compile Include="Storage\PluginSettingsStorage.cs" /> <Compile Include="Storage\PluginSettingsStorage.cs" />
<Compile Include="SyntaxSuger.cs" /> <Compile Include="SyntaxSuger.cs" />

View File

@@ -11,6 +11,7 @@ using Wox.CommandArgs;
using Wox.Core.Plugin; using Wox.Core.Plugin;
using Wox.Helper; using Wox.Helper;
using Wox.Infrastructure; using Wox.Infrastructure;
using Wox.Infrastructure.Image;
using Wox.ViewModel; using Wox.ViewModel;
using Stopwatch = Wox.Infrastructure.Stopwatch; using Stopwatch = Wox.Infrastructure.Stopwatch;
@@ -20,7 +21,7 @@ namespace Wox
{ {
private const string Unique = "Wox_Unique_Application_Mutex"; private const string Unique = "Wox_Unique_Application_Mutex";
public static MainWindow Window { get; private set; } public static MainWindow Window { get; private set; }
public static ImageLoader.ImageLoader ImageLoader; public static ImageLoader ImageLoader;
public static PublicAPIInstance API { get; private set; } public static PublicAPIInstance API { get; private set; }
[STAThread] [STAThread]
@@ -43,7 +44,7 @@ namespace Wox
WoxDirectroy.Executable = Directory.GetParent(Assembly.GetExecutingAssembly().Location).ToString(); WoxDirectroy.Executable = Directory.GetParent(Assembly.GetExecutingAssembly().Location).ToString();
RegisterUnhandledException(); RegisterUnhandledException();
ImageLoader = new ImageLoader.ImageLoader(); ImageLoader = new ImageLoader();
Task.Factory.StartNew(ImageLoader.PreloadImages); Task.Factory.StartNew(ImageLoader.PreloadImages);
PluginManager.Initialize(); PluginManager.Initialize();

View File

@@ -126,7 +126,6 @@
<Compile Include="Converters\ImagePathConverter.cs" /> <Compile Include="Converters\ImagePathConverter.cs" />
<Compile Include="Helper\VisibilityExtensions.cs" /> <Compile Include="Helper\VisibilityExtensions.cs" />
<Compile Include="Helper\SingletonWindowOpener.cs" /> <Compile Include="Helper\SingletonWindowOpener.cs" />
<Compile Include="ImageLoader\ImageCache.cs" />
<Compile Include="NotifyIconManager.cs" /> <Compile Include="NotifyIconManager.cs" />
<Compile Include="PublicAPIInstance.cs" /> <Compile Include="PublicAPIInstance.cs" />
<Compile Include="ResultListBox.xaml.cs"> <Compile Include="ResultListBox.xaml.cs">
@@ -156,7 +155,6 @@
<Compile Include="CommandArgs\QueryCommandArg.cs" /> <Compile Include="CommandArgs\QueryCommandArg.cs" />
<Compile Include="Helper\DataWebRequestFactory.cs" /> <Compile Include="Helper\DataWebRequestFactory.cs" />
<Compile Include="Helper\ErrorReporting.cs" /> <Compile Include="Helper\ErrorReporting.cs" />
<Compile Include="ImageLoader\ImageLoader.cs" />
<Compile Include="Helper\SingleInstance.cs" /> <Compile Include="Helper\SingleInstance.cs" />
<Compile Include="Helper\SyntaxSugars.cs" /> <Compile Include="Helper\SyntaxSugars.cs" />
<Compile Include="Helper\WallpaperPathRetrieval.cs" /> <Compile Include="Helper\WallpaperPathRetrieval.cs" />