コード例 #1
0
ファイル: MainForm.cs プロジェクト: cryptian2019/QURAS_CORE
 private void Event_SendCoinError(object sender, EventArgs e)
 {
     using (WarningDlg dialog = new WarningDlg("Error", sendcoinsPan1.GetErrorMessage()))
     {
         if (dialog.ShowDialog() != DialogResult.OK)
         {
         }
     }
 }
コード例 #2
0
        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);
            }
        }