From 2fd93008d2ce0052353e5016f2c15d1890ffd2e6 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 23 十月 2023 13:42:37 +0800 Subject: [PATCH] 解决影像图层覆盖了矢量图层 --- ExportMap/cs/Tools.cs | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) diff --git a/ExportMap/cs/Tools.cs b/ExportMap/cs/Tools.cs index 6517612..4b7dc85 100644 --- a/ExportMap/cs/Tools.cs +++ b/ExportMap/cs/Tools.cs @@ -374,6 +374,55 @@ } /// <summary> + /// 鎵ц鍛戒护 + /// </summary> + /// <param name="list">鍛戒护闆嗗悎</param> + public static string ExecCmdForWin(List<string> list, bool noWin = false) + { + string str = null; + Process p = null; + try + { + p = new Process(); + p.StartInfo.FileName = "cmd.exe"; + p.StartInfo.UseShellExecute = false; + p.StartInfo.CreateNoWindow = noWin; + p.StartInfo.RedirectStandardInput = true; + p.StartInfo.RedirectStandardOutput = true; + p.StartInfo.RedirectStandardError = true; + p.Start(); + + StreamWriter si = p.StandardInput; + StreamReader se = p.StandardError; + + LogOut.Info("cmd = " + string.Join("锛�", list)); + si.AutoFlush = true; + foreach (string cmd in list) + { + si.WriteLine(cmd); + } + si.WriteLine("exit"); + + str = se.ReadToEnd(); + se.Close(); + si.Close(); + } + catch (Exception ex) + { + LogOut.Error(ex.Message + "\r\n" + ex.StackTrace); + str = ex.Message; + } + finally + { + if (p != null) + { + p.Close(); + } + } + return str; + } + + /// <summary> /// 鍒涘缓鏁版嵁鍙戝竷绫� /// </summary> public static SysPublish NewPublish(SysMeta meta, XYZArgs args, string url, string path) -- Gitblit v1.9.3