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); } }
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)); }
public void RemoveException(object sender, AntivirusLibrary.Events.AddFileInExceptionEventArgs e) { worker.ExceptionsWork.RemoveException(Environment.CurrentDirectory + @"\exception.cfg", e.Path); UpdateExceptionFiles(false); }
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)); }