Exemple #1
0
 private void Worker_DoWork(object sender, DoWorkEventArgs e)
 {
     try
     {
         Cbr reader = new Cbr(selectedDateTeme);
         reader.Start();
         MessageBox.Show("Загрузка данных завершена", "Загрузка", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemple #2
0
 private void MyTimer_Elapsed(object sender, ElapsedEventArgs e)
 {
     try
     {
         cbr.Start();
     }
     catch (Exception ex)
     {
         if (!File.Exists(@"C:\log.txt"))
         {
             File.Create(@"C:\log.txt");
         }
         WriteLogMessage(ex.ToString());
     }
 }