private void 资产分发IToolStripMenuItem_Click(object sender, EventArgs e) { using (IssueDialog dialog = new IssueDialog()) { if (dialog.ShowDialog() != DialogResult.OK) { return; } IssueTransaction tx = dialog.GetTransaction(); if (tx == null) { return; } //TODO: 检查是否符合规则,如是否超过总量、分发方式是否符合约定等; SignatureContext context = new SignatureContext(tx); Program.CurrentWallet.Sign(context); if (context.Completed) { context.Signable.Scripts = context.GetScripts(); InformationBox.Show(context.Signable.ToArray().ToHexString(), "分发交易构造完成,并已完整签名,可以广播。"); } else { InformationBox.Show(context.ToString(), "分发交易构造完成,但签名信息还不完整。"); } } }
private void 资产分发IToolStripMenuItem_Click(object sender, EventArgs e) { using (IssueDialog dialog = new IssueDialog()) { if (dialog.ShowDialog() != DialogResult.OK) { return; } Helper.SignAndShowInformation(dialog.GetTransaction()); } }
private async void 资产分发IToolStripMenuItem_Click(object sender, EventArgs e) { using (IssueDialog dialog = new IssueDialog()) { if (dialog.ShowDialog() != DialogResult.OK) { return; } Transaction tx = dialog.GetTransaction(); if (tx == null) { return; } SignatureContext context = new SignatureContext(tx); Program.CurrentWallet.Sign(context); await ShowInformationAsync(context); } }
private void button2_Click(object sender, EventArgs e) { RegisterTransaction antshare = textBox3.Text.HexToBytes().AsSerializable <RegisterTransaction>(); using (IssueDialog dialog = new IssueDialog(antshare)) { if (dialog.ShowDialog() != DialogResult.OK) { return; } IssueTransaction tx = dialog.GetTransaction(); if (tx.Outputs.Sum(p => p.Value) != antshare.Amount) { MessageBox.Show("发行量不等于总量!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } SignatureContext context = new SignatureContext(tx); InformationBox.Show(context.ToString(), "小蚁股发行签名上下文:"); } }
private void 资产分发IToolStripMenuItem_Click(object sender, EventArgs e) { using (IssueDialog dialog = new IssueDialog()) { if (dialog.ShowDialog() != DialogResult.OK) return; IssueTransaction tx = dialog.GetTransaction(); if (tx == null) return; //TODO: 检查是否符合规则,如是否超过总量、分发方式是否符合约定等; SignatureContext context = new SignatureContext(tx); Program.CurrentWallet.Sign(context); if (context.Completed) { context.Signable.Scripts = context.GetScripts(); InformationBox.Show(context.Signable.ToArray().ToHexString(), "分发交易构造完成,并已完整签名,可以广播。"); } else { InformationBox.Show(context.ToString(), "分发交易构造完成,但签名信息还不完整。"); } } }
private async void 资产分发IToolStripMenuItem_Click(object sender, EventArgs e) { using (IssueDialog dialog = new IssueDialog()) { if (dialog.ShowDialog() != DialogResult.OK) return; Transaction tx = dialog.GetTransaction(); if (tx == null) return; SignatureContext context = new SignatureContext(tx); Program.CurrentWallet.Sign(context); await ShowInformationAsync(context); } }