From 7279c77f318cd7e38af279dc98a1fecec33f5e30 Mon Sep 17 00:00:00 2001
From: C3032 <C3032@BC3032>
Date: 星期四, 08 一月 2026 16:07:01 +0800
Subject: [PATCH] 优化相机采集逻辑与亮度图处理功能

---
 LB_VisionProcesses/Communicators/CommunicatorForm.cs |   35 ++++++++++++++++++++++++++++++++---
 1 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/LB_VisionProcesses/Communicators/CommunicatorForm.cs b/LB_VisionProcesses/Communicators/CommunicatorForm.cs
index ca5526d..0de5c45 100644
--- a/LB_VisionProcesses/Communicators/CommunicatorForm.cs
+++ b/LB_VisionProcesses/Communicators/CommunicatorForm.cs
@@ -1,4 +1,7 @@
-锘縰sing System;
+锘縰sing LB_VisionProcesses.Communicators.SiemensS7;
+using LB_VisionProcesses.Communicators.TCom;
+using RJCP.IO.Ports;
+using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -11,8 +14,6 @@
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
-using LB_VisionProcesses.Communicators.TCom;
-using RJCP.IO.Ports;
 
 namespace LB_VisionProcesses.Communicators
 {
@@ -84,6 +85,7 @@
                 cmbType.Text = type.ToString();
                 ckbRuleCheck.Checked = bRuleCheck;
                 txtMsg.Text = Msg;
+                this.grpSetting.ForeColor= SystemColors.Control;
             }
         }
 
@@ -114,12 +116,16 @@
 
                 cmbIP.Visible = true;
                 txtIP.Visible = false;
+                this.lblAddress.Visible = false;
+                this.txtAddress.Visible = false;
+
 
                 lblIP.Text = "涓插彛鍙�";
                 lblIP.Text = "娉㈢壒鐜�";
 
                 cmbIP.Text = communicator.CommunicatorConnections["鍦板潃"].ToString();
                 txtPort.Text = communicator.CommunicatorConnections["绔彛"].ToString();
+                this.grpSetting.ForeColor = SystemColors.Control;
             }
             else if (communicator is LocalMonitor)
             {
@@ -128,17 +134,40 @@
 
                 cmbIP.Visible = false;
                 txtIP.Visible = true;
+                this.lblAddress.Visible = false;
+                this.txtAddress.Visible = false;
+
 
                 lblIP.Text = "鐩戞帶鏂囦欢";
                 lblIP.Text = "鍐欏叆鏂囦欢";
 
                 txtIP.Text = communicator.CommunicatorConnections["鍦板潃"].ToString();
                 txtPort.Text = communicator.CommunicatorConnections["绔彛"].ToString();
+                this.grpSetting.ForeColor = SystemColors.Control;
+            }
+            else if (communicator is SiemensLBS7)
+            {
+                btnSend.Enabled = communicator.bConnected;
+
+                cmbIP.Visible = false;
+                txtIP.Visible = true;
+                this.lblAddress.Visible = true;
+                this.txtAddress.Visible = true;
+                lblIP.Text = "IP";
+                lblIP.Text = "妲�";
+
+                txtIP.Text = communicator.CommunicatorConnections["鍦板潃"].ToString();
+                txtPort.Text = communicator.CommunicatorConnections["绔彛"].ToString();
+                this.txtAddress.Text = communicator.CommunicatorConnections["鍙橀噺鍦板潃"]?.ToString();
+                this.grpSetting.ForeColor = SystemColors.Control;
+                btnRuleSend.Visible = false;
             }
             else
             {
                 btnSend.Enabled = communicator.bConnected;
                 btnRuleSend.Enabled = false;
+                this.lblAddress.Visible = false;
+                this.txtAddress.Visible = false;
 
                 cmbIP.Visible = false;
                 txtIP.Visible = true;

--
Gitblit v1.9.3