예제 #1
0
 static void Main(string[] args)
 {
     //Core.Classe.Coletor coletor = new Core.Classe.Coletor("http://globoesporte.globo.com/");
     Core.Classe.Transformador transformador = new Transformador();
     transformador.Iniciar();
     Console.ReadKey();
 }
예제 #2
0
 private void timer_Elapsed(object sender, ElapsedEventArgs e)
 {
     try
     {
         if (!AindaExecutando)
         {
             AindaExecutando = true;
             Transformador transformador = new Transformador();
             transformador.Iniciar();
         }
     }
     catch (Exception ex)
     {
         StreamWriter vWriter = new StreamWriter(@"c:\transformadorTexto.txt", true);
         vWriter.WriteLine("Problema ao executar a rotina \n" + ex.Message + "\n\t" +ex.InnerException +" \n\t" +ex.StackTrace + "\n\t" + DateTime.Now.ToString());
         vWriter.Flush();
         vWriter.Close();
         AindaExecutando = false;
         CriarTimer();
     }
 }