Exemplo n.º 1
0
 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);
             }
         }
     }
 }
Exemplo n.º 2
0
 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);
         }
     }
 }
Exemplo n.º 3
0
 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);
         }
     }
 }