🎉 集成everything

This commit is contained in:
BookerLiu
2023-03-31 09:06:04 +08:00
parent d0547da214
commit a18a66352c
24 changed files with 610 additions and 1641 deletions

View File

@@ -255,6 +255,7 @@ namespace GeekDesk.Util
/// <summary>
/// 排序图标
/// </summary>

View File

@@ -121,6 +121,34 @@ namespace GeekDesk.Util
}
public static BitmapImage GetBitmapIconByUnknownPath(string path)
{
//string base64 = ImageUtil.FileImageToBase64(path, System.Drawing.Imaging.ImageFormat.Png);
string ext = "";
if (!ImageUtil.IsSystemItem(path))
{
ext = System.IO.Path.GetExtension(path).ToLower();
}
string iconPath = null;
if (".lnk".Equals(ext))
{
string targetPath = FileUtil.GetTargetPathByLnk(path);
iconPath = FileUtil.GetIconPathByLnk(path);
if (targetPath != null)
{
path = targetPath;
}
}
if (StringUtil.IsEmpty(iconPath))
{
iconPath = path;
}
return ImageUtil.GetBitmapIconByPath(iconPath);
}
/// <summary>
///
/// </summary>