Example #1
0
 private void LerArquivosPastaIn()
 {
     foreach (string file in Directory.EnumerateFiles(ArquivoUtil.BuscarCaminhoPastaIn(), "*.*"))
     {
         AnalisarArquivoEGerarRelatorioVenda(file);
     }
 }
Example #2
0
        public void MonitorarPastaEGerarRelatorio()
        {
            _monitorar = new FileSystemWatcher(ArquivoUtil.BuscarCaminhoPastaIn(), "*.*")
            {
                IncludeSubdirectories = true
            };
            _monitorar.Created            += OnFileCreated;
            _monitorar.EnableRaisingEvents = true;

            LerArquivosPastaIn();
        }