mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-13 11:09:06 +00:00
33 lines
802 B
C#
33 lines
802 B
C#
using System.Drawing;
|
|
using System.Windows;
|
|
using Size = System.Windows.Size;
|
|
|
|
namespace QuickLook.Plugin.LastResort
|
|
{
|
|
public class Plugin : IViewer
|
|
{
|
|
private InfoPanel ip;
|
|
public int Priority => -9999;
|
|
|
|
public bool CanHandle(string sample)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public void View(string path, ViewContentContainer container)
|
|
{
|
|
var s = IconHelper.GetBitmapFromPath(path, IconHelper.IconSizeEnum.ExtraLargeIcon).ToBitmapSource();
|
|
|
|
ip = new InfoPanel();
|
|
ip.image.Source = s;
|
|
|
|
container.SetContent(ip);
|
|
container.PreferedSize = new Size {Width = ip.Width, Height = ip.Height};
|
|
}
|
|
|
|
public void Close()
|
|
{
|
|
//ip.Dispose();
|
|
}
|
|
}
|
|
} |