| | |
| | | using System; |
| | | using System.IO; |
| | | using System.Reflection; |
| | | |
| | | namespace IStation.DAL |
| | | { |
| | |
| | | { |
| | | if (string.IsNullOrEmpty(_root_directory)) |
| | | { |
| | | var directory = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory); |
| | | _root_directory = directory.FullName; |
| | | if (DataFolderHelper.IsExeExcute) |
| | | { |
| | | var directory = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory).FullName; |
| | | _root_directory = directory; |
| | | } |
| | | else |
| | | { |
| | | var directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); |
| | | _root_directory = directory; |
| | | } |
| | | } |
| | | return _root_directory; |
| | | } |
| | | } |
| | | private static string _root_directory; |
| | | |
| | | /// <summary> |
| | | /// 数据文件夹 |
| | | /// </summary> |
| | | public static string DataFolder |
| | | { |
| | | get { return Settings.File.DataFolder; } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 工作文件夹 |