From 0f522b742699f0d81f23adc4cf517205cdf3d45c Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期四, 18 七月 2024 16:30:27 +0800
Subject: [PATCH] 开始执行运行方法

---
 SimuTools/FrmMain.cs |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/SimuTools/FrmMain.cs b/SimuTools/FrmMain.cs
index c888011..41faf90 100644
--- a/SimuTools/FrmMain.cs
+++ b/SimuTools/FrmMain.cs
@@ -87,11 +87,17 @@
 
         private void btnRun_Click(object sender, EventArgs e)
         {
+            string serviceName = this.txtServiceName.Text.Trim();
             string terrainFile = this.txtTerrainPath.Text.Trim();
             string waterPath = this.txtWaterPath.Text.Trim();
             string flowPath = this.txtFlowPath.Text.Trim();
             string outPath = this.txtOutPath.Text.Trim();
 
+            if (string.IsNullOrEmpty(serviceName))
+            {
+                ShowErr("鏈嶅姟鍚嶇О锛岃姹傚繀濉紒");
+                return;
+            }
             if (!File.Exists(terrainFile))
             {
                 ShowErr("鍦板舰鏂囦欢锛岃姹傚繀椤诲瓨鍦紒");
@@ -109,10 +115,17 @@
                 flag = true;
                 LogOut.Info(">> 寮�濮嬭繍琛� >>");
 
+                outPath = Path.Combine(outPath, serviceName);
+                if (!Directory.Exists(outPath))
+                {
+                    Directory.CreateDirectory(outPath);
+                }
+
                 Tools.Handle.Run(terrainFile, waterPath, flowPath, outPath);
 
-                LogOut.Info("<< 杩愯缁撴潫 <<");
                 flag = false;
+                LogOut.Info("<< 杩愯缁撴潫 <<");
+                MessageBox.Show("杩愯缁撴潫锛�", "鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.3