工具路径为exe时默认显示exe自身图标
ToolItem新增IsExePath计算属性,ExePathToIconConverter通过Icon.ExtractAssociatedIcon提取exe图标并缓存,卡片模板图标区改为三层优先级:FontAwesome > exe图标 > 首字母
This commit is contained in:
@@ -62,4 +62,12 @@ public class ToolItem
|
||||
/// 是否在软件启动时自动运行
|
||||
/// </summary>
|
||||
public bool AutoRunOnStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 路径是否指向 .exe 文件(仅运行时判断,不存入 JSON)
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public bool IsExePath =>
|
||||
!IsGroup && !string.IsNullOrWhiteSpace(ExecutablePath) &&
|
||||
ExecutablePath.EndsWith(".exe", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user