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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user