| | |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Runtime.InteropServices; |
| | | using System.Runtime.Serialization; |
| | | using System.Runtime.Serialization.Formatters.Binary; |
| | | using System.Security.AccessControl; |
| | |
| | | |
| | | private static string tempDir; |
| | | |
| | | /// <summary> |
| | | /// 临时目录 |
| | | /// </summary> |
| | | public static string TempDir |
| | | { |
| | | get |
| | |
| | | if (string.IsNullOrWhiteSpace(tempDir)) |
| | | { |
| | | tempDir = Path.Combine(BaseDir, "temp"); |
| | | if (!Directory.Exists(tempDir)) Directory.CreateDirectory(tempDir); |
| | | if (!Directory.Exists(tempDir)) |
| | | { |
| | | Directory.CreateDirectory(tempDir); |
| | | } |
| | | } |
| | | |
| | | return tempDir; |
| | |
| | | /// </summary> |
| | | /// <param name="cmd">命令行</param> |
| | | /// <returns>执行结果或出错信息</returns> |
| | | public static String ExecCmd(string cmd, bool isPy = false, bool isOut = false) |
| | | public static string ExecCmd(string cmd, bool isPy = false, bool isOut = false) |
| | | { |
| | | List<string> list = new List<string>(); |
| | | if (isPy) |
| | |
| | | meta.ismeta = idx == -1 ? 1 : args.models[idx]; |
| | | } |
| | | } |
| | | |
| | | [DllImport("ReadLas.dll")] |
| | | public extern static int get_las_cs(string file_name); |
| | | } |
| | | } |