private void addButtonFromKeePassMenuItem_Click(object sender, EventArgs e) { var openDatabaseCount = mExt.pluginHost.MainWindow.DocumentManager.GetOpenDatabases().Count; if (openDatabaseCount == 0) { MessageService.ShowWarning("No open databases found.", "Please open or unlock a database and then try again."); return; } var showConstraintControls = !(mExt.agent is PageantClient); var entryPicker = new EntryPickerDialog(mExt, showConstraintControls); var result = entryPicker.ShowDialog(); if (result == DialogResult.OK) { try { mExt.AddEntry(entryPicker.SelectedEntry, entryPicker.Constraints); } catch (Exception) { // error message already shown } } if (mExt.agent is AgentClient) { keyInfoView.ReloadKeyListView(); } }
private void addButtonFromKeePassMenuItem_Click(object sender, EventArgs e) { var openDatabaseCount = mExt.pluginHost.MainWindow.DocumentManager.GetOpenDatabases().Count; if (openDatabaseCount == 0) { MessageService.ShowWarning("No open databases found.", "Please open or unlock a database and then try again."); return; } var showConstraintControls = !(mExt.agent is PageantClient); var entryPicker = new EntryPickerDialog(mExt.pluginHost, showConstraintControls); var result = entryPicker.ShowDialog(); if (result == DialogResult.OK) { try { mExt.AddEntry(entryPicker.SelectedEntry, entryPicker.Constraints); } catch (Exception) { // error message already shown } } if (mExt.agent is AgentClient) { keyInfoView.ReloadKeyListView(); } }