diff --git a/Saviour Backup System/mainWindow.cs b/Saviour Backup System/mainWindow.cs index f92ee39..77e3a0f 100644 --- a/Saviour Backup System/mainWindow.cs +++ b/Saviour Backup System/mainWindow.cs @@ -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); + } } }