Пример #1
0
 // responsavel por definir o fluxo do programa, qual caminho do arquivo?
 private static void QualArquivo(List <Produto> listaProduto, StreamReader ler)
 {
     if (NomeArquivo == R_POS_EST_S.Nome)
     {
         R_POS_EST_S.Escrita(ler.ReadLine(), listaProduto);
     }
     if (NomeArquivo == R_LIST_CONS_PAC.Nome)
     {
         R_LIST_CONS_PAC.Escrita(ler.ReadLine(), listaProduto);
     }
 }
Пример #2
0
        // retorna o nome do arquivo
        private static bool VerificaNomeArquivo(string arquivo)
        {
            var nome = new FileInfo(arquivo).Name;

            if (R_POS_EST_S.EhMeuNome(nome))
            {
                return(true);
            }
            if (R_LIST_CONS_PAC.EhMeuNome(nome))
            {
                return(true);
            }
            return(false);
        }