Esempio n. 1
0
        private void OnElapsedTime2(object source, ElapsedEventArgs e)
        {
            // WriteToFile("Service is recall at " + DateTime.Now);
            if (Global.ProcessStatus != "ready")
            {
                return;
            }

            try
            {
                Global.ProcessStatus = "busy";
                //var frontDir = FileService.Config.GetValue("FrontFolder");
                string dumpDir = FileService.Config.GetValue("DumpFolder");

                FileService.CleanRootFolder();
                FileService.DigForImageFiles(dumpDir, 0);
                //Thread.Sleep(10000);
                if (FileService.CheckIsScannerRunning())
                {
                    Global.RunBaiRocs();
                }
            }
            catch (Exception err)
            {
                Global.LogError(err);
            }
            finally
            {
                Global.ProcessStatus = "ready";
            }
        }