private void bntRecuperarTextoAssinado_Click(object sender, EventArgs e)
        {
            SignatureService service = new SignatureService();
            SignatureStatusRespType respStatus = null;

            txtLogTexto.Text += "Consultando situacao da assinatura...\r\n";
            respStatus = service.StatusQuery(new SignatureStatusReqType() { TransactionId = long.Parse(txtTransacaoTexto.Text) });

            if (respStatus.Status.StatusMessage != "TRANSACTION_IN_PROGRESS")
            {
                txtLogTexto.Text += "Salvando assinatura...\r\n";
                var signedText = string.Format(@"..\..\Signed-{0}.p7s", txtTransacaoTexto.Text);
                File.WriteAllBytes(signedText, respStatus.Signature);
                txtLogTexto.Text += "Assinatura salva como " + signedText + ".\r\n";
            }
            else
            {
                txtLogTexto.Text += "Assinatura pendente com usuário...\r\n";
            }
        }