From 987241c46c5f76996cc3c77e570d795fdc984113 Mon Sep 17 00:00:00 2001
From: C3032 <C3032@BC3032>
Date: 星期五, 09 一月 2026 10:10:36 +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