Began development on drive details panel
This commit is contained in:
parent
f8f8e3ac9e
commit
6753feb8be
1 changed files with 11 additions and 1 deletions
|
@ -17,7 +17,7 @@ namespace Saviour_Backup_System
|
||||||
scanTimer.Interval = 1000 * 7; //seconds to check for new drives
|
scanTimer.Interval = 1000 * 7; //seconds to check for new drives
|
||||||
scanTimer.Start();
|
scanTimer.Start();
|
||||||
}
|
}
|
||||||
private static List<string> connectedDrives;
|
private static List<string> connectedDrives = null;
|
||||||
private static void driveScanTick(object sender, ElapsedEventArgs e)
|
private static void driveScanTick(object sender, ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
List<string> drivesSnapshot = connectedDrives;
|
List<string> drivesSnapshot = connectedDrives;
|
||||||
|
@ -46,10 +46,20 @@ namespace Saviour_Backup_System
|
||||||
}
|
}
|
||||||
return drivesList.ToArray();
|
return drivesList.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void safelyEjectDrive(string driveChar)
|
public void safelyEjectDrive(string driveChar)
|
||||||
{
|
{
|
||||||
driveChar = driveChar.Remove(driveChar.Length - 1);
|
driveChar = driveChar.Remove(driveChar.Length - 1);
|
||||||
RemoveDriveTools.RemoveDrive(driveChar);
|
RemoveDriveTools.RemoveDrive(driveChar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void displayDriveDetails(string driveName)
|
||||||
|
{
|
||||||
|
DriveInfo selectedDrive;
|
||||||
|
foreach (DriveInfo drive in getConnectedDrives()){ if (drive.Name == driveName){ selectedDrive = drive; break; } }
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue