示例#1
0
 void _scanProgressOnProgressChanged(object sender, LocalScan.ScanProgress e)
 {
     if (ScanProgressChanged != null)
     {
         ScanProgressChanged(sender, e);
     }
 }
示例#2
0
        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);
        }