Esempio n. 1
0
 private void scanning()
 {
     foreach (FileDescription file in this.files_to_scan)
     {
         if (!this.started)
         {
             break;
         }
         file.isVirus   = VirusDetector.detect(file.path);
         file.isChecked = true;
     }
 }
Esempio n. 2
0
        private void on_changed(object source, FileSystemEventArgs e)
        {
            string path = e.FullPath;

            Thread.Sleep(3000);

            bool isFile = File.Exists(path);

            if (!isFile)
            {
                return;
            }

            if (!VirusDetector.detect(path))
            {
                return;
            }

            if (!this.viruses.Contains(path))
            {
                this.viruses.Add(path);
            }
        }