protected void GerarChaveNFe()
        {
            int emp = new FindEmpresaThread(Thread.CurrentThread).Index;

            Auxiliar oAux = new Auxiliar();
            ///
            /// processa arquivos XML
            ///
            List <string> lstArquivos = this.ArquivosPasta(Empresa.Configuracoes[emp].PastaEnvio, "*" + ExtXml.GerarChaveNFe_XML);

            foreach (string ArqXMLPedido in lstArquivos)
            {
                oAux.GerarChaveNFe(ArqXMLPedido, true);
            }
            ///
            /// processa arquivos TXT
            ///
            lstArquivos = this.ArquivosPasta(Empresa.Configuracoes[emp].PastaEnvio, "*" + ExtXml.GerarChaveNFe_TXT);
            foreach (string ArqXMLPedido in lstArquivos)
            {
                oAux.GerarChaveNFe(ArqXMLPedido, false);
            }
        }