Exemple #1
0
 private void 导入私钥IToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (ImportPrivateKeyDialog dialog = new ImportPrivateKeyDialog())
     {
         if (dialog.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         WalletEntry entry = wallet.Import(dialog.WIF);
         wallet.Save(wallet_path, password);
         listView1.Items.Add(new ListViewItem(new[] { entry.Address, "" })
         {
             Name = entry.Address
         });
         RefreshWallet();
         listView1.SelectedIndices.Clear();
         listView1.Items[entry.Address].Selected = true;
     }
 }
Exemple #2
0
 private void 导入私钥IToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (ImportPrivateKeyDialog dialog = new ImportPrivateKeyDialog())
     {
         if (dialog.ShowDialog() != DialogResult.OK) return;
         WalletEntry entry = wallet.Import(dialog.WIF);
         wallet.Save(wallet_path, password);
         listView1.Items.Add(new ListViewItem(new[] { entry.Address, "" }) { Name = entry.Address });
         RefreshWallet();
         listView1.SelectedIndices.Clear();
         listView1.Items[entry.Address].Selected = true;
     }
 }