예제 #1
0
        protected void RaiseScanProgressChanged(bool isCompleted = false)
        {
            long fileCount, folderCount, size;

            lock (lockDicObj)
            {
                var folders = currentScannedDic.Values.Where(item => item.ItemCount > 0);
                fileCount   = folders.Sum(item => item.ItemCount);
                folderCount = folders.Count();
                size        = folders.Sum(item => item.Size);
            }

            if (!ScanProgressChanged.IsNull())
            {
                FileStatisticEventArgs args = new FileStatisticEventArgs(fileCount, folderCount, size, isCompleted);
                ScanProgressChanged(this, args);
            }
        }
예제 #2
0
 protected virtual void OnScanProgressChanged(ScanProgressChangedEventArgs e) => ScanProgressChanged?.Invoke(this, e);
예제 #3
0
 protected void OnScanProgressChanged(int Progress) => ScanProgressChanged?.Invoke(Progress);