管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2023-07-15 ae436e2cb0980af757511377215a454c17a35308
ExportMap/cs/Tools.cs
@@ -9,6 +9,7 @@
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;
@@ -26,6 +27,9 @@
        private static string tempDir;
        /// <summary>
        /// 临时目录
        /// </summary>
        public static string TempDir
        {
            get
@@ -33,7 +37,10 @@
                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;
@@ -159,7 +166,7 @@
        /// </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)
@@ -280,5 +287,8 @@
                meta.ismeta = idx == -1 ? 1 : args.models[idx];
            }
        }
        [DllImport("ReadLas.dll")]
        public extern static int get_las_cs(string file_name);
    }
}