moved set of finish flag so it's quicker.
This commit is contained in:
parent
c526fd3268
commit
4c7ab9cc15
1 changed files with 4 additions and 3 deletions
|
@ -23,6 +23,7 @@ namespace Saviour_Backup_System
|
||||||
private Stopwatch SW = new Stopwatch();
|
private Stopwatch SW = new Stopwatch();
|
||||||
string driveHash;
|
string driveHash;
|
||||||
bool finalised = false;
|
bool finalised = false;
|
||||||
|
|
||||||
public transferWindow(int backups, DriveInfo drive, string hash) {
|
public transferWindow(int backups, DriveInfo drive, string hash) {
|
||||||
driveHash = hash;
|
driveHash = hash;
|
||||||
copyingDrive = drive;
|
copyingDrive = drive;
|
||||||
|
@ -32,14 +33,14 @@ namespace Saviour_Backup_System
|
||||||
SW.Start(); //starts the stopwatch to count how long the copy takes
|
SW.Start(); //starts the stopwatch to count how long the copy takes
|
||||||
}
|
}
|
||||||
|
|
||||||
private void finaliseCopy() {
|
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);
|
databaseTools.createBackupRecord(copyingDrive, startTime, SW.Elapsed.Seconds, driveHash);
|
||||||
setup.CT.progressBars[arrayIndex].ColorTable = DevComponents.DotNetBar.eProgressBarItemColor.Normal;
|
setup.CT.progressBars[arrayIndex].ColorTable = DevComponents.DotNetBar.eProgressBarItemColor.Normal;
|
||||||
setup.CT.progressBars[arrayIndex].Value = 100;
|
setup.CT.progressBars[arrayIndex].Value = 100;
|
||||||
setup.CT.progressBars[arrayIndex].Maximum = 100;
|
setup.CT.progressBars[arrayIndex].Maximum = 100;
|
||||||
setup.CT.progressBars[arrayIndex].Text = "Complete!";
|
setup.CT.progressBars[arrayIndex].Text = "Complete!";
|
||||||
finalised = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(Int32 totalFiles, Int32 copiedFiles, Int64 totalBytes, Int64 copiedBytes, string currentFilename)
|
public void update(Int32 totalFiles, Int32 copiedFiles, Int64 totalBytes, Int64 copiedBytes, string currentFilename)
|
||||||
|
|
Reference in a new issue