kazelee
2025-05-19 b079910e5de15863c26e479ffab15cc45d706f1a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
using Opc.Ua;
 
namespace HH.WCS.Mobox3.DSZSH.Helpers {
    public class PathHelper {
        /// <summary>
        /// 项目文件夹与Debug/Release文件的相对路径(私有常量)
        /// </summary>
        const string RELATIVE_PATH = "../..";
 
        /// <summary>
        /// GetProjectDirectory:获取项目文件夹路径
        /// </summary>
        public static string GetProjDir(string filepath = "./") {
            return Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, RELATIVE_PATH, filepath));
        }
    }
}