LunarMind/LMETools/DemoResourceInfo.cs

(完整代码) 1012B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SHomeWorkshop.LunarMind.LMETools
{
    public class DemoResourceInfo
    {
        public string LinkTitle { get; set; }

        public string LinkType { get; set; }

        public string RelativePath { get; set; }

        public string AbsolutePath
        {
            get
            {
                try
                {
                    if (string.IsNullOrWhiteSpace(RelativePath)) return "";

                    var resPath = Globals.PathOfWorkspace.TrimEnd('\\') + "\\" + RelativePath.TrimStart('\\');

                    if (System.IO.File.Exists(resPath)) return resPath;

                    var di = new System.IO.DirectoryInfo(Globals.MainWindow.FullPathOfDiskFile).Parent;
                    var path = di.FullName + RelativePath;

                    return System.IO.File.Exists(path) ? path : "";
                }
                catch { return ""; }
            }
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。