コード例 #1
0
 public void GetUpdateException(object sender, AntivirusLibrary.Events.AddFileInExceptionEventArgs e)
 {
     if (!worker.ExceptionsWork.ExceptionFiles.Select(x => x.Path).Contains(e.Path))
     {
         worker.ExceptionsWork.AddException(Environment.CurrentDirectory + @"\exception.cfg", e.Path);
         antivirusWorker.AddInException(this, new AntivirusLibrary.Events.ExceptionAddEventArgs(new AntivirusLibrary.Files.ExceptionFile(e.Path)));
         UpdateExceptionFiles(true);
     }
 }
コード例 #2
0
 public void DeleteDangerFile(object sender, AntivirusLibrary.Events.AddFileInExceptionEventArgs e)
 {
     antivirusWorker.DangerFiles.FirstOrDefault(x => x.Path == e.Path).DeleteFile();
     antivirusWorker.DangerFiles = antivirusWorker.DangerFiles.Where(x => x.Path != null).ToList();
     GetUpdateFile(this, new AntivirusLibrary.Events.FileCheckEventArgs(false));
 }
コード例 #3
0
 public void RemoveException(object sender, AntivirusLibrary.Events.AddFileInExceptionEventArgs e)
 {
     worker.ExceptionsWork.RemoveException(Environment.CurrentDirectory + @"\exception.cfg", e.Path);
     UpdateExceptionFiles(false);
 }
コード例 #4
0
 public void KillProcess(object sender, AntivirusLibrary.Events.AddFileInExceptionEventArgs e)
 {
     antivirusWorker.KillProcess(antivirusWorker.DangerProcess.Where(x => x.Process.ProcessName == e.Path).First());
     UpdateDangerProcessList(new AntivirusLibrary.Events.AddDangerProcessEventArgs(false));
 }