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