Initial support for uwp app #198

1. basic support, better than nothing...
2. thanks great contribution from @talynone
3. #198
This commit is contained in:
bao-qian
2016-08-18 01:16:40 +01:00
parent e690bae7d1
commit 01e812aebf
7 changed files with 405 additions and 34 deletions

View File

@@ -1,5 +1,8 @@
using System.Windows.Media;
using System;
using System.Windows.Media;
using System.Windows.Threading;
using Wox.Infrastructure.Image;
using Wox.Infrastructure.Logger;
using Wox.Plugin;
@@ -15,7 +18,29 @@ namespace Wox.ViewModel
}
}
public ImageSource Image => ImageLoader.Load(Result.IcoPath);
public ImageSource Image
{
get
{
if (string.IsNullOrEmpty(Result.IcoPath))
{
ImageSource icon = null;
try
{
return Result.Icon();
}
catch (Exception e)
{
Log.Exception(e);
return ImageLoader.Load(Result.IcoPath);
}
}
else
{
return ImageLoader.Load(Result.IcoPath);
}
}
}
public Result Result { get; }