From 6753feb8be105181eb3afe07a752bf547884c3fe Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 27 Jul 2014 20:59:31 +0100 Subject: [PATCH] Began development on drive details panel --- Saviour Backup System/USBTools.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Saviour Backup System/USBTools.cs b/Saviour Backup System/USBTools.cs index 036f273..6bed2a2 100644 --- a/Saviour Backup System/USBTools.cs +++ b/Saviour Backup System/USBTools.cs @@ -17,7 +17,7 @@ namespace Saviour_Backup_System scanTimer.Interval = 1000 * 7; //seconds to check for new drives scanTimer.Start(); } - private static List connectedDrives; + private static List connectedDrives = null; private static void driveScanTick(object sender, ElapsedEventArgs e) { List drivesSnapshot = connectedDrives; @@ -46,10 +46,20 @@ namespace Saviour_Backup_System } return drivesList.ToArray(); } + + public void safelyEjectDrive(string driveChar) { driveChar = driveChar.Remove(driveChar.Length - 1); RemoveDriveTools.RemoveDrive(driveChar); } + + + public static void displayDriveDetails(string driveName) + { + DriveInfo selectedDrive; + foreach (DriveInfo drive in getConnectedDrives()){ if (drive.Name == driveName){ selectedDrive = drive; break; } } + + } } }