From 64743ba9326cadb6478348fde4c6716de4f793b9 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 15 一月 2024 10:44:19 +0800 Subject: [PATCH] 集成OSGBlab程序 --- TEWin/FrmWin.cs | 5 +++-- TEWin/app.config | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/TEWin/FrmWin.cs b/TEWin/FrmWin.cs index eaff5f6..67f675e 100644 --- a/TEWin/FrmWin.cs +++ b/TEWin/FrmWin.cs @@ -234,7 +234,7 @@ { Process p = new Process(); p.StartInfo.FileName = path; - p.StartInfo.Arguments = args; + if (!string.IsNullOrEmpty(args)) p.StartInfo.Arguments = args; p.StartInfo.CreateNoWindow = noWindow; p.StartInfo.UseShellExecute = false; p.Start(); @@ -483,7 +483,8 @@ private void InvokeOsgbLab() { - // + ExecCmd(new List<string> { "taskkill /f /t /im OSGBLab.exe" }); + RunExe(ConfigurationManager.AppSettings["osgblabPath"], null, false); } #endregion } diff --git a/TEWin/app.config b/TEWin/app.config index bc1d6c8..791c1b4 100644 --- a/TEWin/app.config +++ b/TEWin/app.config @@ -6,6 +6,7 @@ <add key="testFly" value="E:\data\opting\2022.fly"/> <!--<add key="tePath" value="C:\Program Files\Skyline\TerraExplorer Pro"/>--> <add key="tePath" value="C:\Program Files\SmartEarth\TerraExplorer Pro"/> + <add key="osgblabPath" value="C:\Program Files\OSGBLab\Trial\OSGBLab.exe"/> </appSettings> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> -- Gitblit v1.9.3