public override bool Initialize(IPluginHost host)
        {
            Terminate();

            if (host == null)
            {
                return(false);
            }

            Host = host;
            prov = new HIBPOfflineColumnProv()
            {
                Host = host
            };

            options            = LoadOptions();
            prov.PluginOptions = options;

            Host.ColumnProviderPool.Add(prov);

            windowAddedHandler = new EventHandler <GwmWindowEventArgs>(WindowAddedHandler);
            GlobalWindowManager.WindowAdded += windowAddedHandler;

            CreateMenuItems();

            return(true);
        }
        public override bool Initialize(IPluginHost host)
        {
            Terminate();

            if (host == null)
            {
                return(false);
            }

            PluginHost = host;

            ToolStripItemCollection tsMenu = PluginHost.MainWindow.ToolsMenu.DropDownItems;

            tsMenu.Add(new ToolStripSeparator());
            ToolStripMenuItem tsMenuItem = new ToolStripMenuItem("HIBP Offline Check...");

            tsMenuItem.Click += new EventHandler(ToolsMenuItemClick);
            tsMenu.Add(tsMenuItem);

            prov = new HIBPOfflineColumnProv()
            {
                Host = host
            };

            options            = LoadOptions();
            prov.PluginOptions = options;

            PluginHost.ColumnProviderPool.Add(prov);

            return(true);
        }
        public override void Terminate()
        {
            if (PluginHost == null)
            {
                return;
            }

            PluginHost.ColumnProviderPool.Remove(prov);
            prov = null;

            PluginHost = null;
        }
Exemplo n.º 4
0
        public override bool Initialize(IPluginHost host)
        {
            Terminate();

            if (host == null)
            {
                return(false);
            }

            PluginHost = host;
            prov       = new HIBPOfflineColumnProv()
            {
                Host = host
            };

            options            = LoadOptions();
            prov.PluginOptions = options;

            PluginHost.ColumnProviderPool.Add(prov);

            return(true);
        }