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

View file

@ -88,7 +88,6 @@ namespace Saviour_Backup_System
displayDriveDetails(USBTools.getDriveObject(selectedDevice.Substring(0,1))); displayDriveDetails(USBTools.getDriveObject(selectedDevice.Substring(0,1)));
} }
private void displayDriveDetails(DriveInfo drive) { private void displayDriveDetails(DriveInfo drive) {
selectedDrive = drive; selectedDrive = drive;
driveNameDisplay.Text = tools.Trim(selectedDrive.VolumeLabel, 16); driveNameDisplay.Text = tools.Trim(selectedDrive.VolumeLabel, 16);
@ -107,9 +106,11 @@ namespace Saviour_Backup_System
driveIconBox.Image = Properties.Resources.hddIcon; driveIconBox.Image = Properties.Resources.hddIcon;
break; 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() private void formatDriveCapacity()
{ {
DriveInfo drive = selectedDrive; DriveInfo drive = selectedDrive;
@ -189,5 +190,11 @@ namespace Saviour_Backup_System
setup.BV = new backupViewer(); setup.BV = new backupViewer();
setup.BV.Show(); 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);
}
} }
} }