交互优化, 断网更新弹框删除,图标显示优化,待办任务bug修复

This commit is contained in:
liufei
2021-07-27 16:53:28 +08:00
parent 15a214aad0
commit 94f32fdb15
19 changed files with 916 additions and 253 deletions

32
Util/FileUtil.cs Normal file
View File

@@ -0,0 +1,32 @@
using IWshRuntimeLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GeekDesk.Util
{
public class FileUtil
{
public static string GetTargetPathByLnk(string filePath)
{
try
{
WshShell shell = new WshShell();
IWshRuntimeLibrary.IWshShortcut shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(filePath);
if (StringUtil.IsEmpty(shortcut.TargetPath))
{
return null;
}
return shortcut.TargetPath;
}
catch (Exception e)
{
return null;
}
}
}
}