From 0a70f99e51b0ea0c83288213e3b1f7904d78ede0 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期四, 18 七月 2024 17:52:46 +0800
Subject: [PATCH] 创建PNG

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

diff --git a/SimuTools/FrmMain.cs b/SimuTools/FrmMain.cs
index c888011..63e50df 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("鍦板舰鏂囦欢锛岃姹傚繀椤诲瓨鍦紒");
@@ -107,12 +113,19 @@
             try
             {
                 flag = true;
-                LogOut.Info(">> 寮�濮嬭繍琛� >>");
+                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