private void Event_SendCoinError(object sender, EventArgs e) { using (WarningDlg dialog = new WarningDlg("Error", sendcoinsPan1.GetErrorMessage())) { if (dialog.ShowDialog() != DialogResult.OK) { } } }
public static void SignAndShowInformation(Transaction tx) { if (tx == null) { //MessageBox.Show(Strings.InsufficientFunds); using (WarningDlg dialog = new WarningDlg("Error", Resources.InsufficientFunds)) { if (dialog.ShowDialog() != DialogResult.OK) { } } return; } ContractParametersContext context; try { context = new ContractParametersContext(tx); } catch (InvalidOperationException) { //MessageBox.Show(Strings.UnsynchronizedBlock); using (WarningDlg dialog = new WarningDlg("Error", Resources.UnsynchronizedBlock)) { if (dialog.ShowDialog() != DialogResult.OK) { } } return; } Constant.CurrentWallet.Sign(context); if (context.Completed) { context.Verifiable.Scripts = context.GetScripts(); Constant.CurrentWallet.SaveTransaction(tx); Constant.LocalNode.Relay(tx); //InformationBox.Show(tx.Hash.ToString(), Strings.SendTxSucceedMessage, Strings.SendTxSucceedTitle); } else { //InformationBox.Show(context.ToString(), Strings.IncompletedSignatureMessage, Strings.IncompletedSignatureTitle); } }