Minor tweaks made to the FileViewer to report scanning information.
This commit is contained in:
Binary file not shown.
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user