mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
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:
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user