diff --git a/Saviour Backup System/transferWindow.cs b/Saviour Backup System/transferWindow.cs index 08188fe..d445012 100644 --- a/Saviour Backup System/transferWindow.cs +++ b/Saviour Backup System/transferWindow.cs @@ -23,6 +23,7 @@ namespace Saviour_Backup_System private Stopwatch SW = new Stopwatch(); string driveHash; bool finalised = false; + public transferWindow(int backups, DriveInfo drive, string hash) { driveHash = hash; copyingDrive = drive; @@ -32,14 +33,14 @@ namespace Saviour_Backup_System SW.Start(); //starts the stopwatch to count how long the copy takes } - private void finaliseCopy() { - SW.Stop(); //stops the stopwatch. Is done a little too early, but it's good enough! + private void finaliseCopy(){ + finalised = true; + SW.Stop(); databaseTools.createBackupRecord(copyingDrive, startTime, SW.Elapsed.Seconds, driveHash); setup.CT.progressBars[arrayIndex].ColorTable = DevComponents.DotNetBar.eProgressBarItemColor.Normal; setup.CT.progressBars[arrayIndex].Value = 100; setup.CT.progressBars[arrayIndex].Maximum = 100; setup.CT.progressBars[arrayIndex].Text = "Complete!"; - finalised = true; } public void update(Int32 totalFiles, Int32 copiedFiles, Int64 totalBytes, Int64 copiedBytes, string currentFilename)