Minor tweaks made to the FileViewer to report scanning information.
This commit is contained in:
Binary file not shown.
@@ -204,7 +204,10 @@ namespace DataOrganizer
|
|||||||
var rootFolder = new DirectoryInfo(folderGroup.Path);
|
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));
|
files.AddRange(ScanDirectory(dir));
|
||||||
|
}
|
||||||
|
|
||||||
var snapShot = new Snapshot(files, folderGroup);
|
var snapShot = new Snapshot(files, folderGroup);
|
||||||
ActiveSnapshotForPrimaryTree.MergeSnapshot(snapShot);
|
ActiveSnapshotForPrimaryTree.MergeSnapshot(snapShot);
|
||||||
@@ -236,6 +239,7 @@ namespace DataOrganizer
|
|||||||
|
|
||||||
if (!PrimaryTreeNodes.ContainsKey(f.FullPath))
|
if (!PrimaryTreeNodes.ContainsKey(f.FullPath))
|
||||||
{
|
{
|
||||||
|
UpdateStatusStrip($"Scanning {f.FullPath}");
|
||||||
PrimaryTreeNodes.Add(f.FullPath, newNode);
|
PrimaryTreeNodes.Add(f.FullPath, newNode);
|
||||||
PrimaryTreeNodes[f.ParentFolder.FullPath].Nodes.Add(newNode);
|
PrimaryTreeNodes[f.ParentFolder.FullPath].Nodes.Add(newNode);
|
||||||
newFilesCount++;
|
newFilesCount++;
|
||||||
@@ -246,6 +250,7 @@ namespace DataOrganizer
|
|||||||
{
|
{
|
||||||
PrimaryTreeNodes[f.Key].BackColor = Color.Red;
|
PrimaryTreeNodes[f.Key].BackColor = Color.Red;
|
||||||
PrimaryTreeNodes[f.Key].ToolTipText = "This file has been deleted.";
|
PrimaryTreeNodes[f.Key].ToolTipText = "This file has been deleted.";
|
||||||
|
UpdateStatusStrip($"Scanning {f.Key}");
|
||||||
deletedFilesCount++;
|
deletedFilesCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,6 +258,7 @@ namespace DataOrganizer
|
|||||||
{
|
{
|
||||||
PrimaryTreeNodes[f.Key].BackColor = Color.DarkBlue;
|
PrimaryTreeNodes[f.Key].BackColor = Color.DarkBlue;
|
||||||
PrimaryTreeNodes[f.Key].ToolTipText = "This file has been modified.";
|
PrimaryTreeNodes[f.Key].ToolTipText = "This file has been modified.";
|
||||||
|
UpdateStatusStrip($"Scanning {f.Key}");
|
||||||
modifiedFilesCount++;
|
modifiedFilesCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -225,10 +225,12 @@ namespace DataOrganizer
|
|||||||
public Folder Parent { get; private set; }
|
public Folder Parent { get; private set; }
|
||||||
public Dictionary<string, FileSnapshot> Files { get; private set; } = new Dictionary<string, FileSnapshot>();
|
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 Dictionary<string, Folder> Folders { get; private set; } = new Dictionary<string, Folder>();
|
||||||
|
|
||||||
public bool IsEmpty
|
public bool IsEmpty
|
||||||
{
|
{
|
||||||
get { return !(Files.Count > 0 || Folders.Count > 0); }
|
get { return !(Files.Count > 0 || Folders.Count > 0); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsRootFolder
|
public bool IsRootFolder
|
||||||
{
|
{
|
||||||
get { return Parent == null; }
|
get { return Parent == null; }
|
||||||
|
|||||||
Reference in New Issue
Block a user