public void Start()
 {
     if (m_checkTimer == null)
     {
         m_detector.StartDetection();
         m_checkTimer          = new Timer(1000);
         m_checkTimer.Elapsed += m_checkTimer_Elapsed;
         m_checkTimer.Start();
     }
 }
        void m_checkTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            m_checkTimer.Stop();

            string[] files = m_detector.GetNewFiles().Union(m_detector.GetModifiedFiles()).ToArray();

            if (files.Length > 0)
            {
                Array.ForEach(files, x => HandleSaveFile(x));

                m_detector = new NewFileDetector(new string[] { ".zds" }, m_dir, true);
                m_detector.StartDetection();
            }

            m_checkTimer.Start();
        }
Example #3
0
 public void Start()
 {
     m_detector = new NewFileDetector(new string[] { ".zds" }, m_dir, true);
     m_detector.StartDetection();
 }