From 0a7a732a71aed91eadae992ec26d3f4726d04df2 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期四, 03 八月 2023 14:40:58 +0800 Subject: [PATCH] 1 --- ExportMap/cs/Tools.cs | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ExportMap/cs/Tools.cs b/ExportMap/cs/Tools.cs index c251067..68bed79 100644 --- a/ExportMap/cs/Tools.cs +++ b/ExportMap/cs/Tools.cs @@ -171,7 +171,7 @@ /// <param name="isPy">鏄惁涓篞GIS Py鑴氭湰</param> /// <param name="isOut">鏄惁杈撳嚭閿欒</param> /// <returns>鎵ц缁撴灉鎴栧嚭閿欎俊鎭�</returns> - public static string ExecCmd(SysTask task, string cmd, bool isPy = false, bool isOut = false) + public static string ExecCmd(SysTask task, string cmd, bool isPy = false) { List<string> list = new List<string>(); if (isPy) @@ -183,7 +183,7 @@ } list.Add(cmd); - string str = ExecCmd(task, list, isOut); + string str = ExecCmd(task, list); return str; } @@ -195,7 +195,7 @@ /// <param name="list">鍛戒护闆嗗悎</param> /// <param name="isOut">鏄惁杈撳嚭閿欒</param> /// <returns>鎵ц缁撴灉鎴栧嚭閿欎俊鎭�</returns> - public static string ExecCmd(SysTask task, List<string> list, bool isOut = false) + public static string ExecCmd(SysTask task, List<string> list) { string str = null; try @@ -210,10 +210,8 @@ p.StartInfo.RedirectStandardError = true; p.Start(); - //p.Id; - StreamWriter si = p.StandardInput; // 鏍囧噯杈撳叆娴� - StreamReader so = isOut ? p.StandardOutput : null; // 鏍囧噯杈撳嚭娴� + //StreamReader so = isOut ? p.StandardOutput : null; // 鏍囧噯杈撳嚭娴� StreamReader se = p.StandardError; // 鏍囧噯閿欒娴� LogOut.Info("cmd = " + string.Join("锛�", list)); @@ -224,7 +222,7 @@ } si.WriteLine("exit"); - string info = null == so ? null : so.ReadToEnd(); + //string info = null == so ? null : so.ReadToEnd(); str = se.ReadToEnd(); //if (!string.IsNullOrEmpty(info)) LogOut.Debug(info); -- Gitblit v1.9.3