Example #1
0
 //ToDo: Logging to file or eventlog
 private void Run()
 {
     try
     {
         Console.WriteLine("Filservice starting");
         FileChecker fileChecking = new FileChecker(@"C:\Users\pajo0017\Documents\Schema");
         while (_StopFlag != true)
         {
             fileChecking.MoveFilesFromFolder();
             Thread.Sleep(500);
         }
     }
     catch (Exception ex)
     {
         //ToDo: Logging to file or eventlog
         Console.WriteLine(ex.Message);
     }
 }
Example #2
0
 private void Run()
 {
     try
     {
         //Debug.WriteLine("File service starting");
         FileChecker fileChecking = new FileChecker(@"C:\Glossary");
         while (_StopFlag != true)
         {
             fileChecking.readXmlFiles();
             Thread.Sleep(20000);
         }
     }
     catch (Exception ex)
     {
         //Save exceptions to logfile in the future.
         MessageBox.Show("The XML-service caused an error." + ex.Message + " " + ex.InnerException);
         //Debug.WriteLine(ex.Message);
     }
 }