// Adding Entry for new website private void addToolStripMenuItem_Click(object sender, EventArgs e) { CredentialEditForm form3 = new CredentialEditForm(new Credential()); if (form3.ShowDialog() == DialogResult.OK) { SaveWebsiteCredentials(form3.credential); } }
/// <summary> /// Modify existing credentials /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void editToolStripMenuItem_Click(object sender, EventArgs e) { var credential = GetSelectedCredential(); if (credential != null) { CredentialEditForm form3 = new CredentialEditForm(credential); DialogResult dr = form3.ShowDialog(); if (dr == DialogResult.OK) { SaveWebsiteCredentials(form3.credential); } } }