void _scanProgressOnProgressChanged(object sender, LocalScan.ScanProgress e) { if (ScanProgressChanged != null) { ScanProgressChanged(sender, e); } }
void _localScanOnScanProgressChanged(object sender, LocalScan.ScanProgress e) { _progressLabel.Text = e.Description; try { _progressBar.Value = e.Percentage; } catch (Exception exp) { log.Error(exp.ToString()); } if (e.TargetFilePath != null) { _totalTargetNum++; //if (e.TargetType == PornClassifier.ImageType.P**n) if (e.ItemType != PornDatabase.PornItemType.Undefined) { _totalPornNum++; _pornItemResultView.AddRow(e.TargetFilePath, e.ItemType, PornDatabase.PornItemStatus.Normal); } } string summary = "共扫描对象:{0} 共检出项:{1}"; _scanStatusSummary.Text = string.Format(summary, _totalTargetNum, _totalPornNum); }