private void importWIFToolStripMenuItem_Click(object sender, EventArgs e) { using (ImportPrivateKeyDialog dialog = new ImportPrivateKeyDialog()) { if (dialog.ShowDialog() != DialogResult.OK) { return; } listView1.SelectedIndices.Clear(); foreach (string wif in dialog.WifStrings) { Account account; try { account = Program.CurrentWallet.Import(wif); } catch (FormatException) { continue; } foreach (Contract contract in Program.CurrentWallet.GetContracts(account.PublicKeyHash)) { AddContractToListView(contract, true); } } } }
private void 导入私钥IToolStripMenuItem_Click(object sender, EventArgs e) { using (ImportPrivateKeyDialog dialog = new ImportPrivateKeyDialog()) { if (dialog.ShowDialog() != DialogResult.OK) { return; } ContractListView.SelectedIndices.Clear(); Account account = Program.CurrentWallet.Import(dialog.WIF); foreach (Contract contract in Program.CurrentWallet.GetContracts(account.PublicKeyHash)) { AddContractToListView(contract, true); } } }
private void 导入私钥IToolStripMenuItem_Click(object sender, EventArgs e) { using (ImportPrivateKeyDialog dialog = new ImportPrivateKeyDialog()) { if (dialog.ShowDialog() != DialogResult.OK) return; ContractListView.SelectedIndices.Clear(); Account account = Program.CurrentWallet.Import(dialog.WIF); foreach (Contract contract in Program.CurrentWallet.GetContracts(account.PublicKeyHash)) { AddContractToListView(contract, true); } } }