-
Notifications
You must be signed in to change notification settings - Fork 22
/
Plugin.cs
40 lines (32 loc) · 933 Bytes
/
Plugin.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System.IO;
using System.Windows;
using System.Windows.Controls;
using QuickLook.Common.Plugin;
namespace QuickLook.Plugin.HelloWorld
{
public class Plugin : IViewer
{
public int Priority => 0;
public void Init()
{
}
public bool CanHandle(string path)
{
return !Directory.Exists(path) && path.ToLower().EndsWith(".zzz");
}
public void Prepare(string path, ContextObject context)
{
context.PreferredSize = new Size {Width = 600, Height = 400};
}
public void View(string path, ContextObject context)
{
var viewer = new Label {Content = "I am a Label. I do nothing at all."};
context.ViewerContent = viewer;
context.Title = $"{Path.GetFileName(path)}";
context.IsBusy = false;
}
public void Cleanup()
{
}
}
}