-
Notifications
You must be signed in to change notification settings - Fork 7
/
KeePassSubsetExportExt.cs
43 lines (35 loc) · 991 Bytes
/
KeePassSubsetExportExt.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
41
42
43
using System.Drawing;
using KeePass.Forms;
using KeePass.Plugins;
namespace KeePassSubsetExport
{
public class KeePassSubsetExportExt : Plugin
{
private IPluginHost _host = null;
public override Image SmallIcon
{
get { return Properties.Resources.Key; }
}
public override string UpdateUrl
{
get { return "https://github.com/lukeIam/KeePassSubsetExport/raw/master/keepass.version"; }
}
public override bool Initialize(IPluginHost host)
{
_host = host;
_host.MainWindow.FileSaved += StartExport;
return true;
}
private void StartExport(object sender, FileSavedEventArgs args)
{
Exporter.Export(args.Database);
}
public override void Terminate()
{
if (_host != null)
{
_host.MainWindow.FileSaved -= StartExport;
}
}
}
}