예제 #1
0
파일: MainForm.cs 프로젝트: PlumpMath/Pure
        private void 转账TToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Transaction tx;

            using (TransferDialog dialog = new TransferDialog())
            {
                if (dialog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                tx = dialog.GetTransaction();
            }
            if (tx is InvocationTransaction itx)
            {
                using (InvokeContractDialog dialog = new InvokeContractDialog(itx))
                {
                    if (dialog.ShowDialog() != DialogResult.OK)
                    {
                        return;
                    }
                    tx = dialog.GetTransaction();
                }
            }
            Helper.SignAndShowInformation(tx);
        }
예제 #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());
     }
 }
예제 #3
0
        private void  举EToolStripMenuItem_Click(object sender, EventArgs e)
        {
            InvocationTransaction tx;

            using (ElectionDialog dialog = new ElectionDialog())
            {
                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);
        }
예제 #4
0
        private void voteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            InvocationTransaction tx;
            Contract contract = (Contract)listView1.SelectedItems[0].Tag;

            using (VotingDialog dialog = new VotingDialog(contract.ScriptHash))
            {
                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);
        }