private void importCertificateToolStripMenuItem_Click(object sender, EventArgs e) { using (SelectCertificateDialog dialog = new SelectCertificateDialog()) { if (dialog.ShowDialog() != DialogResult.OK) { return; } listView1.SelectedIndices.Clear(); Account account = Program.CurrentWallet.Import(dialog.SelectedCertificate); foreach (Contract contract in Program.CurrentWallet.GetContracts(account.PublicKeyHash)) { AddContractToListView(contract, true); } } }
private void importCertificateToolStripMenuItem_Click(object sender, EventArgs e) { using (SelectCertificateDialog dialog = new SelectCertificateDialog()) { if (dialog.ShowDialog() != DialogResult.OK) return; ContractListView.SelectedIndices.Clear(); Account account = Program.CurrentWallet.Import(dialog.SelectedCertificate); foreach (Contract contract in Program.CurrentWallet.GetContracts(account.PublicKeyHash)) { AddContractToListView(contract, true); } } }