Пример #1
0
 public void AddErrorScan(ScanFile file)
 {
     Utils.MainThreadDispatch(() =>
     {
         if (ActiveScan != null && ActiveScan.ScanID == file.ScanID)
         {
             ActiveErrorFiles.Add(file);
         }
     });
 }
Пример #2
0
        public void Init()
        {
            Utils.MainThreadDispatch(() => { RepoFactory.Scan.GetAll().ForEach(a => Scans.Add(a)); });
            SVR_Scan runscan = Scans.FirstOrDefault(a => a.GetScanStatus() == ScanStatus.Running);

            if (runscan != null)
            {
                ActiveScan = runscan;
                StartScan();
            }
        }
Пример #3
0
 public void ClearScan()
 {
     if (ActiveScan == null)
     {
         return;
     }
     if (workerIntegrityScanner.IsBusy && RunScan == ActiveScan)
     {
         CancelScan();
     }
     RepoFactory.ScanFile.Delete(RepoFactory.ScanFile.GetByScanID(ActiveScan.ScanID));
     RepoFactory.Scan.Delete(ActiveScan);
     Utils.MainThreadDispatch(() => { Scans.Remove(ActiveScan); });
     ActiveScan = null;
 }