| | |
| | | using System; |
| | | using 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; |
| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using LB_VisionProcesses.Communicators.TCom; |
| | | using RJCP.IO.Ports; |
| | | |
| | | namespace LB_VisionProcesses.Communicators |
| | | { |
| | |
| | | cmbType.Text = type.ToString(); |
| | | ckbRuleCheck.Checked = bRuleCheck; |
| | | txtMsg.Text = Msg; |
| | | this.grpSetting.ForeColor= SystemColors.Control; |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | 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) |
| | | { |
| | |
| | | |
| | | 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; |