1
Fork 0

added click event, and added details for backups of drive

This commit is contained in:
Jake Howard 2014-12-29 18:55:35 +00:00
parent d83a51c0e8
commit 5ac2940579
1 changed files with 9 additions and 2 deletions

View File

@ -88,7 +88,6 @@ namespace Saviour_Backup_System
displayDriveDetails(USBTools.getDriveObject(selectedDevice.Substring(0,1)));
}
private void displayDriveDetails(DriveInfo drive) {
selectedDrive = drive;
driveNameDisplay.Text = tools.Trim(selectedDrive.VolumeLabel, 16);
@ -107,9 +106,11 @@ namespace Saviour_Backup_System
driveIconBox.Image = Properties.Resources.hddIcon;
break;
}
backupDirectoryDisplay.Text = databaseTools.getBackupDirectory(USBTools.calculateDriveID(selectedDrive));
creationDateDisplay.Text = databaseTools.getBackupCreationDate(USBTools.calculateDriveID(selectedDrive)).ToString();
if (creationDateDisplay.Text == 0.ToString()) { creationDateDisplay.Text = "NONE"; }
}
private void formatDriveCapacity()
{
DriveInfo drive = selectedDrive;
@ -189,5 +190,11 @@ namespace Saviour_Backup_System
setup.BV = new backupViewer();
setup.BV.Show();
}
private void backupDeviceButton_Click(object sender, EventArgs e)
{
setup.CT.startCopy(selectedDrive, databaseTools.getBackupDirectory(USBTools.calculateDriveID(selectedDrive)), true);
MessageBox.Show("Backup initiated for drive '" + selectedDrive.VolumeLabel + "'", "Backup started", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}