private void safekeyring() { try { DialogResult save_dialog = saveFileDialog2.ShowDialog(); if (save_dialog == DialogResult.OK) { Keyring kk = new Keyring(); kk.SerializeKeyring(cert_mgmt.keyring_certs, saveFileDialog2.FileName); } } catch (Exception ex) { MessageBox.Show("Can't save key ring file!\n" + ex); } }
private void readkeyring() { if (openFileDialog3.ShowDialog() == DialogResult.OK) { string file = openFileDialog3.FileName; try { Keyring kk = new Keyring(); MessageBox.Show(file); cert_mgmt.applied_certs.AddRange(kk.DeserializeKeyring(file)); addToList(cert_mgmt.applied_certs); } catch (Exception ex) { MessageBox.Show("Can't read key ring file!\n" + ex); } } }