private void addToolStripMenuItem_Click(object sender, EventArgs e) { using (AddDlg dlg = new AddDlg(new EncryptedStorage(mSettings.Filename), false, null)) { if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) ResetResults(); } }
private void ctxEdit_Click(object sender, EventArgs e) { KeyEntry entry = GetCurrentKeyEntry(); if (entry == null) return; gridResults.CurrentRow.Cells[0].Selected = true; using (AddDlg dlg = new AddDlg(new EncryptedStorage(mSettings.Filename), true, entry)) { if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) ResetResults(); } }