Пример #1
0
 private void 多方签名MToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (CreateMultiSigContractDialog dialog = new CreateMultiSigContractDialog())
     {
         if (dialog.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         Contract contract = dialog.GetContract();
         if (contract == null)
         {
             MessageBox.Show(Strings.AddContractFailedMessage);
             return;
         }
         Program.CurrentWallet.AddContract(contract);
         listView1.SelectedIndices.Clear();
         AddContractToListView(contract, true);
     }
 }
Пример #2
0
 private void 多方签名MToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (CreateMultiSigContractDialog dialog = new CreateMultiSigContractDialog())
     {
         if (dialog.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         Contract contract = dialog.GetContract();
         if (contract == null)
         {
             MessageBox.Show(Strings.AddContractFailedMessage);
             return;
         }
         WalletAccount account = Program.CurrentWallet.CreateAccount(contract, dialog.GetKey());
         if (Program.CurrentWallet is NEP6Wallet wallet)
         {
             wallet.Save();
         }
         listView1.SelectedIndices.Clear();
         AddAccount(account, true);
     }
 }