Exemple #1
0
 public static void IniciarLOG(string Text)
 {
     Console.WriteLine(_path);
     try
     {
         if (!File.Exists(_path))
         {
             using (StreamWriter write = new StreamWriter(_path, true, Encoding.UTF8))
             {
                 write.WriteLine(SistemLog.StringLog(Text));
                 write.Flush();
                 write.Close();
             }
         }
         else
         {
             File.Delete(_path);
             using (StreamWriter write = new StreamWriter(_path, true, Encoding.UTF8))
             {
                 write.WriteLine(SistemLog.StringLog(Text));
                 write.Flush();
                 write.Close();
             }
         }
     }
     catch (Exception e)
     {
     }
 }
Exemple #2
0
 public static void SalvarLog(string Text)
 {
     try
     {
         using (StreamWriter write = new StreamWriter(_path, true, Encoding.UTF8))
         {
             write.WriteLine(SistemLog.StringLog(Text));
             write.Flush();
             write.Close();
         }
     }
     catch (Exception e)
     {
     }
 }
Exemple #3
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     Text_Log.Text = SistemLog.LerLog();
 }
Exemple #4
0
 public motorForm()
 {
     InitializeComponent();
     SistemLog.IniciarLOG("Sistema iniciado");
 }