Minor tweaks made to the FileViewer to report scanning information.

This commit is contained in:
Admin
2020-12-08 14:46:06 -06:00
parent 27aa247c36
commit f1a0a5966a
3 changed files with 9 additions and 1 deletions
Binary file not shown.
+7 -1
View File
@@ -203,8 +203,11 @@ namespace DataOrganizer
var files = new List<FileInfo>();
var rootFolder = new DirectoryInfo(folderGroup.Path);
foreach (var dir in rootFolder.EnumerateDirectories())
foreach (var dir in rootFolder.EnumerateDirectories())
{
UpdateStatusStrip($"Discovering files in {dir.FullName}");
files.AddRange(ScanDirectory(dir));
}
var snapShot = new Snapshot(files, folderGroup);
ActiveSnapshotForPrimaryTree.MergeSnapshot(snapShot);
@@ -236,6 +239,7 @@ namespace DataOrganizer
if (!PrimaryTreeNodes.ContainsKey(f.FullPath))
{
UpdateStatusStrip($"Scanning {f.FullPath}");
PrimaryTreeNodes.Add(f.FullPath, newNode);
PrimaryTreeNodes[f.ParentFolder.FullPath].Nodes.Add(newNode);
newFilesCount++;
@@ -246,6 +250,7 @@ namespace DataOrganizer
{
PrimaryTreeNodes[f.Key].BackColor = Color.Red;
PrimaryTreeNodes[f.Key].ToolTipText = "This file has been deleted.";
UpdateStatusStrip($"Scanning {f.Key}");
deletedFilesCount++;
}
@@ -253,6 +258,7 @@ namespace DataOrganizer
{
PrimaryTreeNodes[f.Key].BackColor = Color.DarkBlue;
PrimaryTreeNodes[f.Key].ToolTipText = "This file has been modified.";
UpdateStatusStrip($"Scanning {f.Key}");
modifiedFilesCount++;
}
+2
View File
@@ -225,10 +225,12 @@ namespace DataOrganizer
public Folder Parent { get; private set; }
public Dictionary<string, FileSnapshot> Files { get; private set; } = new Dictionary<string, FileSnapshot>();
public Dictionary<string, Folder> Folders { get; private set; } = new Dictionary<string, Folder>();
public bool IsEmpty
{
get { return !(Files.Count > 0 || Folders.Count > 0); }
}
public bool IsRootFolder
{
get { return Parent == null; }