Use existing Everything, dll is loaded by platform

fix #574
This commit is contained in:
bao-qian
2016-05-04 02:26:19 +01:00
parent 461e650e05
commit bc0f5a9136
21 changed files with 85 additions and 2783 deletions

View File

@@ -21,7 +21,7 @@ namespace Wox.Infrastructure.Image
private static readonly string DefaultIcon = Path.Combine(Wox.ProgramPath, "Images", "app.png");
private static readonly string ErrorIcon = Path.Combine(Wox.ProgramPath, "Images", "app_error.png");
private static readonly string[] ImageExtions =
private static readonly string[] ImageExtions =
{
".png",
".jpg",
@@ -100,8 +100,12 @@ namespace Wox.Infrastructure.Image
}
public static void PreloadImages()
{
ImageSources[DefaultIcon] = new BitmapImage(new Uri(DefaultIcon));
ImageSources[ErrorIcon] = new BitmapImage(new Uri(ErrorIcon));
foreach (var icon in new[] { DefaultIcon, ErrorIcon })
{
ImageSource img = new BitmapImage(new Uri(DefaultIcon));
img.Freeze();
ImageSources[icon] = img;
}
Task.Factory.StartNew(() =>
{
Stopwatch.Debug("Preload images from cache", () =>