Ejemplo n.º 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);
            }
        }
Ejemplo n.º 2
0
 protected virtual void OnScanProgressChanged(ScanProgressChangedEventArgs e) => ScanProgressChanged?.Invoke(this, e);
Ejemplo n.º 3
0
 protected void OnScanProgressChanged(int Progress) => ScanProgressChanged?.Invoke(Progress);