private void btnGerar_Click(object sender, EventArgs e)
        {
            GeraXmlDestinatario gerarXml = new GeraXmlDestinatario();

            switch (cbAmbiente.SelectedIndex)
            {
            case 0: gerarXml.Ambiente = Enums.NFeAmbiente.Homologacao; break;

            case 1: gerarXml.Ambiente = Enums.NFeAmbiente.Producao; break;
            }

            gerarXml.ArquivoConsultaRecibo    = txtConsRecibo.Text;
            gerarXml.ArquivoEnvioLote         = txtLogEnvio.Text;
            gerarXml.ArquivoSaida             = txtXmlSaida.Text;
            gerarXml.ChaveNota                = txtChaveNota.Text;
            gerarXml.DiretorioEsquemas        = txtEsquemas.Text;
            gerarXml.DiretorioLog             = txtLog.Text;
            gerarXml.DiretorioTemplates       = txtTemplates.Text;
            gerarXml.DiretorioXmlDestinatario = txtXmlSaida.Text;
            gerarXml.NomeCertificado          = cbCertificado.Text;

            gerarXml.VersaoManual = cbLayout.Text;

            try
            {
                gerarXml.GerarXml();
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message);
            }
        }
        public Form1()
        {
            InitializeComponent();

            cbCertificado.Items.AddRange(GeraXmlDestinatario.GetCertificados());
        }