Exemplo n.º 1
0
        private void 转账TToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Transaction tx;
            UInt160     change_address;
            Fixed8      fee;

            using (TransferDialog dialog = new TransferDialog())
            {
                if (dialog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                tx             = dialog.GetTransaction();
                change_address = dialog.ChangeAddress;
                fee            = dialog.Fee;
            }
            if (tx is InvocationTransaction itx)
            {
                using (InvokeContractDialog dialog = new InvokeContractDialog(itx))
                {
                    if (dialog.ShowDialog() != DialogResult.OK)
                    {
                        return;
                    }
                    tx = dialog.GetTransaction(change_address, fee);
                }
            }
            Helper.SignAndShowInformation(tx);
        }
Exemplo n.º 2
0
 private void invokeContractToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (InvokeContractDialog dialog = new InvokeContractDialog())
     {
         if (dialog.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         Helper.SignAndShowInformation(dialog.GetTransaction());
     }
 }
Exemplo n.º 3
0
        private void deployContractToolStripMenuItem_Click(object sender, EventArgs e)
        {
            InvocationTransaction tx;

            using (DeployContractDialog dialog = new DeployContractDialog())
            {
                if (dialog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                tx = dialog.GetTransaction();
            }
            using (InvokeContractDialog dialog = new InvokeContractDialog(tx))
            {
                if (dialog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                tx = dialog.GetTransaction();
            }
            Helper.SignAndShowInformation(tx);
        }