Inform main window that an OS has been added.

This commit is contained in:
2017-05-11 15:06:14 +01:00
parent 5c9a75bedd
commit 3d3c8acf17
5 changed files with 33 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
2017-05-11 Natalia Portillo <claunia@claunia.com>
* Workers.cs:
Inform main window that an OS has been added.
2017-05-11 Natalia Portillo <claunia@claunia.com>
* DBOps.cs:

View File

@@ -592,11 +592,10 @@ namespace osrepodbmgr.Core
if(UpdateProgress != null)
UpdateProgress(null, "Adding OS information", counter, Context.hashes.Count);
long osId;
dbCore.DBOps.AddOS(Context.dbInfo, out osId);
dbCore.DBOps.AddOS(Context.dbInfo, out Context.dbInfo.id);
if(UpdateProgress != null)
UpdateProgress(null, "Creating OS table", counter, Context.hashes.Count);
dbCore.DBOps.CreateTableForOS(osId);
dbCore.DBOps.CreateTableForOS(Context.dbInfo.id);
counter = 0;
foreach(KeyValuePair<string, DBFile> kvp in Context.hashes)
@@ -604,7 +603,7 @@ namespace osrepodbmgr.Core
if(UpdateProgress != null)
UpdateProgress(null, "Adding files to OS in database", counter, Context.hashes.Count);
dbCore.DBOps.AddFileToOS(kvp.Value, osId);
dbCore.DBOps.AddFileToOS(kvp.Value, Context.dbInfo.id);
counter++;
}