BlockStudio.CustomControls.MessageBoxEx.Show C# (CSharp) Method

Show() public static method

public static Show ( IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defButton, MessageBoxOptions options ) : DialogResult
owner IWin32Window
text string
caption string
buttons MessageBoxButtons
icon MessageBoxIcon
defButton MessageBoxDefaultButton
options MessageBoxOptions
return DialogResult
        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defButton, MessageBoxOptions options)
        {
            _owner = owner;
            Initialize();
            return MessageBox.Show(owner, text, caption, buttons, icon,
                                   defButton, options);
        }

Same methods

MessageBoxEx::Show ( IWin32Window owner, string text ) : DialogResult
MessageBoxEx::Show ( IWin32Window owner, string text, string caption ) : DialogResult
MessageBoxEx::Show ( IWin32Window owner, string text, string caption, MessageBoxButtons buttons ) : DialogResult
MessageBoxEx::Show ( IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon ) : DialogResult
MessageBoxEx::Show ( IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defButton ) : DialogResult
MessageBoxEx::Show ( string text ) : DialogResult
MessageBoxEx::Show ( string text, string caption ) : DialogResult
MessageBoxEx::Show ( string text, string caption, MessageBoxButtons buttons ) : DialogResult
MessageBoxEx::Show ( string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon ) : DialogResult
MessageBoxEx::Show ( string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defButton ) : DialogResult
MessageBoxEx::Show ( string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defButton, MessageBoxOptions options ) : DialogResult

Usage Example

        private void btnPublish_Click(object sender, EventArgs e)
        {
            var accountValue = cmbAccounts.SelectedItem;

            if (accountValue == null)
            {
                var result = MessageBoxEx.Show(this, string.Format("Select an account to publish from"), "Block Studio", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            var account = (Account)accountValue;

            if (account.Balance < 10000000)
            {
                var result = MessageBoxEx.Show(this, string.Format("You do not have enough Ether to publish the contract"), "Block Studio", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            var bin = BlockStudioProjectService.GetFile(SolcProjectFileType.Bin);

            if (bin == null)
            {
                var result = MessageBoxEx.Show(this, string.Format("It appears there is no bytecode generated for this project"), "Block Studio", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            var transaction = new Transaction()
            {
                From = account.Address,
                Data = bin.Value,
                Gas  = txtEstimateGas.Text
            };

            BlockStudioProjectService.PublishedTxHash = BlockStudioProjectService.BlockStudioProject.Connection.EthereumService.SendTransaction(transaction);
            _ethereumFilterManager.AddBlockPendingFilter(BlockStudioProjectService.PublishedTxHash);
            _ethereumFilterManager.Start();
            txtBuildOutput.WriteConsonsoleMessage("contract published with code: {0}", BlockStudioProjectService.GetFile(SolcProjectFileType.Bin).Value);
        }