Files
QuickLook/QuickLook.Plugin.LastResort/Plugin.cs
2017-04-26 00:48:40 +03:00

36 lines
784 B
C#

using System.Windows;
namespace QuickLook.Plugin.LastResort
{
public class Plugin : IViewer
{
private InfoPanel _ip;
public int Priority => int.MinValue;
public bool CanHandle(string sample)
{
return true;
}
public void Prepare(string path, ViewContentContainer container)
{
_ip = new InfoPanel();
container.CanResize = false;
container.PreferedSize = new Size {Width = _ip.Width, Height = _ip.Height};
}
public void View(string path, ViewContentContainer container)
{
_ip.DisplayInfo(path);
container.SetContent(_ip);
}
public void Close()
{
_ip.Stop = true;
}
}
}