private void btnGenerateEscrowInvitation_Click(object sender, EventArgs e)
        {
            EscrowCodeSet cs = new EscrowCodeSet();

            txtEscrowForPayer.Text = cs.EscrowInvitationCodeA;
            txtEscrowForPayee.Text = cs.EscrowInvitationCodeB;
        }
        private void btnGenPayee_Click(object sender, EventArgs e)
        {
            try {
                txtPayeeCode.Text = Util.Base58Trim(txtPayeeCode.Text);
                EscrowCodeSet cs = new EscrowCodeSet(txtPayeeCode.Text);
                txtPayeeGeneratedInvite.Text = cs.PaymentInvitationCode;
                txtPayeeGeneratedAddress.Text = cs.BitcoinAddress;
            } catch (Exception ex) {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;

            }
        }
        private void btnPayerDone_Click(object sender, EventArgs e)
        {
            if (btnPayerDone.Text == "Reset") {
                setPayerElementsVisible(false);
                btnPayerDone.Text = "Done";
                return;
            }

            try {
                txtPayerCode1.Text = Util.Base58Trim(txtPayerCode1.Text);
                txtPayerCode2.Text = Util.Base58Trim(txtPayerCode2.Text);
                EscrowCodeSet cs = new EscrowCodeSet(txtPayerCode1.Text, txtPayerCode2.Text);
                txtPayerAddress.Text = cs.BitcoinAddress;
                setPayerElementsVisible(true);
                btnPayerDone.Text = "Reset";
                if (cs.SamePartyWarningApplies) {
                    MessageBox.Show("The Payment Invitation Code appears to have been generated from the same Escrow Invitation Code you entered, " +
                        "and not its mate.  You might be verifying a Payment Invitation you produced yourself, rather than one " +
                        "produced by your trading partner.", "Are you verifying the wrong thing?", MessageBoxButtons.OK, MessageBoxIcon.Warning);

                }
            } catch (Exception ex) {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;

            }
        }
        private void btnRedeem_Click(object sender, EventArgs e)
        {
            try {
                txtRedeemCode1.Text = Util.Base58Trim(txtRedeemCode1.Text);
                txtRedeemCode2.Text = Util.Base58Trim(txtRedeemCode2.Text);
                txtRedeemCode3.Text = Util.Base58Trim(txtRedeemCode3.Text);

                EscrowCodeSet cs = new EscrowCodeSet(txtRedeemCode1.Text, txtRedeemCode2.Text, txtRedeemCode3.Text);
                txtRedeemAddress.Text = cs.BitcoinAddress;
                txtRedeemPrivKey.Text = cs.PrivateKey;
            } catch (Exception ex) {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;

            }
        }