-
-
Notifications
You must be signed in to change notification settings - Fork 110
Closed
Description
Code for filling up the drives ListBox is like this:
var drives = DriveInfo.GetDrives();
foreach (var d in drives)
{
if (d.DriveType == DriveType.Ram)
{
continue;
}
try
{
var s = d.RootDirectory.Name;
if (!string.IsNullOrEmpty(d.VolumeLabel) && d.VolumeLabel != d.RootDirectory.Name)
{
s += " (" + d.VolumeLabel + ")";
}
_listBoxPlaces.Items.Add(new ListItem(s, null, d.RootDirectory.Name)
{
Image = iconDrive,
ImageTextSpacing = ImageTextSpacing
});
}
catch (Exception)
{
}
}Some linux-specific hacks should be added to that code.
Metadata
Metadata
Assignees
Labels
No labels
