예제 #1
0
                protected override void OnError(FileSystemInfoException ex)
                {
                    var isDir = ex.FileSystemInfo is DirectoryInfo;
                    var lvi   = new ListViewItem(new[] { isDir ? "Directory error" : "File error", ex.FileSystemInfo.Name, ex.FileSystemInfo.FullName, ex.Message }, isDir ? DirectoryExceptionImageIndex : FileExceptionImageIndex)
                    {
                        Tag = ex
                    };

                    PendingErrors.Add(lvi);

                    if (ShouldUpdate())
                    {
                        RequestUpdate();
                    }
                }
예제 #2
0
                public void Init()
                {
                    _lastUpdate = DateTime.MinValue;
                    _lastColor  = false;

                    Start          = DateTime.UtcNow;
                    AddedFiles     = 0;
                    AddedSize      = 0;
                    ProcessedFiles = 0;
                    ProcessedSize  = 0;
                    DuplicateFiles = 0;
                    DuplicatesSize = 0;

                    PendingDuplicates.Clear();
                    PendingErrors.Clear();
                }