🎉 集成everything
This commit is contained in:
@@ -255,6 +255,7 @@ namespace GeekDesk.Util
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序图标
|
||||
/// </summary>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user