From d743c9fbdb6f54c08518f259e8f2bce2605f33ab Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 4 Dec 2014 12:47:25 +0000 Subject: [PATCH] started work on startup backup system --- Saviour Backup System/setup.cs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Saviour Backup System/setup.cs b/Saviour Backup System/setup.cs index ee617e7..21d0108 100644 --- a/Saviour Backup System/setup.cs +++ b/Saviour Backup System/setup.cs @@ -26,6 +26,8 @@ namespace Saviour_Backup_System SS = new splashScreen(); //displays the splash screen SS.description.Text = "From Setup..."; + databaseTools.init(); + startupBackups(); //run any initialising code here! SS.Close(); @@ -35,7 +37,25 @@ namespace Saviour_Backup_System } private static void startupBackups() { - return; + string[] IDs = databaseTools.getAutomaticBackups(); + DriveInfo[] drives = USBTools.getConnectedDrives(); + List driveIDs = new List(); + List drivesToBackup = new List(); + foreach (DriveInfo drive in drives) + { + driveIDs.Add(USBTools.calculateDriveID(drive)); + } + foreach (string id in IDs) + { + if (driveIDs.Contains(id)) + { + drivesToBackup.Add(id); + } + } + foreach (string id in drivesToBackup) + { + + } } public static void closeProgram() {