public KeeFoxEntryUserControl(KeePassRPCExt keePassRPCPlugin, PwEntry entry, CustomListViewEx advancedListView, PwEntryForm pwEntryForm, ProtectedStringDictionary strings) { KeePassRPCPlugin = keePassRPCPlugin; _entry = entry; InitializeComponent(); _advancedListView = advancedListView; _pwEntryForm = pwEntryForm; _strings = strings; }
public override void AttachToEntryDialog(KeePassRPCExt plugin, PwEntry entry, TabControl mainTabControl, PwEntryForm form, CustomListViewEx advancedListView, ProtectedStringDictionary strings) { KeeFoxEntryUserControl entryControl = new KeeFoxEntryUserControl(plugin, entry, advancedListView, form, strings); TabPage keefoxTabPage = new TabPage("KeeFox"); entryControl.Dock = DockStyle.Fill; keefoxTabPage.Controls.Add(entryControl); if (mainTabControl.ImageList == null) mainTabControl.ImageList = new ImageList(); int imageIndex = mainTabControl.ImageList.Images.Add(global::KeePassRPC.Properties.Resources.KeeFox16, Color.Transparent); keefoxTabPage.ImageIndex = imageIndex; mainTabControl.TabPages.Add(keefoxTabPage); }
public KeeFoxEntryUserControl(KeePassRPCExt keePassRPCPlugin, PwEntry entry, CustomListViewEx advancedListView, PwEntryForm pwEntryForm, ProtectedStringDictionary strings) { KeePassRPCPlugin = keePassRPCPlugin; _entry = entry; InitializeComponent(); _pwEntryForm = pwEntryForm; _strings = strings; string json = strings.ReadSafe("KPRPC JSON"); if (string.IsNullOrEmpty(json)) _conf = new EntryConfig(); else { try { _conf = (EntryConfig)Jayrock.Json.Conversion.JsonConvert.Import(typeof(EntryConfig), json); } catch (Exception) { MessageBox.Show("There are configuration errors in this entry. To fix the entry and prevent this warning message appearing, please edit the value of the 'KeePassRPC JSON config' advanced string. Please ask for help on http://keefox.org/help/forum if you're not sure how to fix this.", "Warning: Configuration errors", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }
public virtual void AttachToEntryDialog(KeePassRPCExt plugin, PwEntry entry, TabControl mainTabControl, PwEntryForm form, CustomListViewEx advancedListView, ProtectedStringDictionary strings) { return; }
/// <summary> /// The <c>Initialize</c> function is called by KeePass when /// you should initialize your plugin (create menu items, etc.). /// </summary> /// <param name="host">Plugin host interface. By using this /// interface, you can access the KeePass main window and the /// currently opened database.</param> /// <returns>You must return <c>true</c> in order to signal /// successful initialization. If you return <c>false</c>, /// KeePass unloads your plugin (without calling the /// <c>Terminate</c> function of your plugin).</returns> public override bool Initialize(IPluginHost host) { Debug.Assert(host != null); if (host == null) return false; m_host = host; //m_docMgr = host.MainWindow.DocumentManager; // Get a reference to the 'Tools' menu item container m_tsMenu = m_host.MainWindow.ToolsMenu.DropDownItems; // Add a separator at the bottom ToolStripSeparator tsSeparator = new ToolStripSeparator(); m_tsMenu.Add(tsSeparator); m_tsPopup = new ToolStripMenuItem(); m_tsPopup.Text = "KPEnhancedListview"; //m_tsMenu.ToolTipText = tbToolTip; m_tsMenu.Add(m_tsPopup); // We want a notification when the user tried to save the current database m_host.MainWindow.FileSaved += OnFileSaved; // Find the listview control //m_toolMain = (CustomToolStripEx)Util.FindControlRecursive(m_host.MainWindow, m_ctseName); m_lvEntries = (CustomListViewEx)Util.FindControlRecursive(m_host.MainWindow, m_clveName); //m_tsmiMenuView = (ToolStripMenuItem)Util.FindControlRecursive(m_host.MainWindow, m_tsmiName); //m_tvGroups = (CustomTreeViewEx)Util.FindControlRecursive(m_host.MainWindow, m_ctveName); //m_csceSplitVertical = (CustomSplitContainerEx)Util.FindControlRecursive(m_host.MainWindow, m_csceName); // Initialize Sub Plugins KPELInlineEditing = new KPEnhancedListviewInlineEditing(); KPELAddEntry = new KPEnhancedListviewAddEntry(); KPELOpenDirecotory = new KPEnhancedListviewOpenGroup(); KPELEditableNotes = new KPEnhancedListviewEditableNotes(); // Add About dialog // Add About dialog ToolStripMenuItem m_tbItem = null; m_tbItem = new ToolStripMenuItem(); m_tbItem.Text = "About"; m_tbItem.Image = Properties.Resources.B16x16_Help; m_tbItem.Click += OpenAbout; m_tsPopup.DropDownItems.Add(m_tbItem); return true; // Initialization successful }