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