using System; using System.IO; using System.Reflection; namespace WpfEditor { /// /// 提供应用程序中使用的常量 /// public static class Constant { /// /// 可执行文件所在目录的路径 /// public static readonly string ExecutablePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); /// /// WeChatOcrCpp.dll的路径 /// public static readonly string WeChatOcrDllPath = Path.GetFullPath(Path.Combine(ExecutablePath, "WeChatOcrCpp.dll")); /// /// 当前工作目录(可能是解决方案所在目录) /// public static readonly string CurrentWorkingDirectory = Directory.GetCurrentDirectory(); } }