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
1 changed files with 4 additions and 3 deletions

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;
@ -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)