From db360479a8f2244ee3af90b39b01184d5dbee457 Mon Sep 17 00:00:00 2001
From: zs <zhousong@weben-smart.com>
Date: 周三, 20 11月 2024 16:46:45 +0800
Subject: [PATCH] 发成生成exe文件

---
 DataCapture_MA/Form1.cs |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/DataCapture_MA/Form1.cs b/DataCapture_MA/Form1.cs
index d025d3d..74496c1 100644
--- a/DataCapture_MA/Form1.cs
+++ b/DataCapture_MA/Form1.cs
@@ -52,10 +52,9 @@
 
             if (!foundTargetSubnet && ipSelect.Items.Count > 0)
             {
-                MessageBox.Show($"鏈壘鍒扮綉娈典负 {targetSubnet} 鐨処P鍦板潃锛屽皢榛樿閫変腑绗竴涓狪P銆�", "鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                //MessageBox.Show($"鏈壘鍒扮綉娈典负 {targetSubnet} 鐨処P鍦板潃锛屽皢榛樿閫変腑绗竴涓狪P銆�", "鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 ipSelect.SelectedIndex = 0;
             }
-
             to_ipTxt.Text = ipSelect.SelectedItem?.ToString();
 
             // 鍒濆鍖� AutoMapper
@@ -70,7 +69,11 @@
             string startupPath = Environment.GetFolderPath(Environment.SpecialFolder.Startup); // 鍚姩鏂囦欢澶硅矾寰�
             CreateShortcut(shortcutName, targetPath, startupPath); // 鍒涘缓蹇嵎鏂瑰紡
 
-            StartReceive(); // 鍚姩绋嬪簭
+            if (ipSelect.Items.Count > 0)
+            {
+                StartReceive(); // 鍚姩绋嬪簭
+                CreateDatabase();  // 鍒濆鍖栨暟鎹簱
+            }
 
             // 鍒犻櫎涓�涓湀鍓嶇殑鏁版嵁
             new Thread(AutoDeleteHistoryDate.Handler).Start();

--
Gitblit v1.9.3