Use own Pdf viewer implementation. wip on universal InfoPanel

This commit is contained in:
Paddy Xu
2017-04-16 01:18:54 +03:00
parent 7388c3874a
commit 431cf1f014
35 changed files with 2894 additions and 213 deletions

View File

@@ -0,0 +1,33 @@
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();
}
}
}