修改获取磁盘图标 及 快捷名称获取

This commit is contained in:
liufei
2021-12-22 18:01:29 +08:00
parent 353acec75e
commit 7f585dd095
4 changed files with 18 additions and 4 deletions

View File

@@ -96,8 +96,17 @@ namespace GeekDesk.Util
return FileIcon.GetBitmapImage(filePath);
}
} else if(Directory.Exists(filePath)) {
//文件夹
return ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_DIR_IMAGE_BASE64);
if ((filePath.IndexOf("\\") == filePath.LastIndexOf("\\")) && filePath.IndexOf("\\") == filePath.Length - 1)
{
//磁盘
return ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_DISK_IMAGE_BASE64);
} else
{
//文件夹
return ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_DIR_IMAGE_BASE64);
}
}
return null;
}