private void OnDriveUnavailable(DriveUnavailableEventArgs e) { if (DriveUnavailable != null) { DriveUnavailable(this, e); } }
private bool CheckDriveExists(string driveLetter) { if (driveLetter != "\\") { var di = new DriveInfo(driveLetter); if (!di.IsReady) { var e = new DriveUnavailableEventArgs(driveLetter, di.DriveType); OnDriveUnavailable(e); return(false); } } return(true); }