Updated the ProfileManager so that users can change the FolderGroup's name (a very hacky job but it'll do). Hooked up the FileViewers 'Update Databse' button so new files can be commited to the database.

This commit is contained in:
Admin
2020-12-07 19:11:05 -06:00
parent 59725feeec
commit 27aa247c36
7 changed files with 347 additions and 239 deletions
+7 -4
View File
@@ -67,7 +67,10 @@ namespace DataOrganizer
private void CommitScanResultsButton_Click(object sender, EventArgs e)
{
throw new NotImplementedException();
var newFiles = ActiveSnapshotForPrimaryTree.Files.Values.Where(x => x.Status == FileSnapshot.FileStatus.PendingInsert).ToList();
var db = new DB();
db.InsertNewFileRecord(newFiles, GetActiveProfile().Id, GetActiveFolderGroup().Id, GetActiveFolderGroup().Path);
}
private void FolderSelectButton_Click1(object sender, EventArgs e)
@@ -319,17 +322,17 @@ namespace DataOrganizer
}
}
private List<DB.FileSnapshot> GetFileSnapshots(string path)
private List<DB.DBFileSnapshot> GetFileSnapshots(string path)
{
var dir = new DirectoryInfo(path);
var profile = GetActiveProfile();
var folderGroup = GetActiveFolderGroup();
var snapshots = new List<DB.FileSnapshot>();
var snapshots = new List<DB.DBFileSnapshot>();
foreach(var file in dir.EnumerateFiles())
{
snapshots.Add(new DB.FileSnapshot
snapshots.Add(new DB.DBFileSnapshot
{
PathNoRoot = file.FullName,
Name = file.Name,