1
Fork 0

moved set of finish flag so it's quicker.

This commit is contained in:
Jake Howard 2015-01-04 14:35:41 +00:00
parent c526fd3268
commit 4c7ab9cc15

View file

@ -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;
@ -33,13 +34,13 @@ namespace Saviour_Backup_System
}
private void finaliseCopy(){
SW.Stop(); //stops the stopwatch. Is done a little too early, but it's good enough!
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)