diff --git a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/MainForm.cs b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/MainForm.cs index ed13eb7..a1e0756 100644 --- a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/MainForm.cs +++ b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/MainForm.cs @@ -152,8 +152,8 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 private void MainForm_Load(object sender, EventArgs e) { - string plcIp = "192.168.1.10"; - //string plcIp = "127.0.0.1"; + //string plcIp = "192.168.1.10"; + string plcIp = "127.0.0.1"; bool initSuccess = Data.ModbusResourceManager.Instance.Init(plcIp, 502); if (!initSuccess) { diff --git a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/ManualDebugForm.cs b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/ManualDebugForm.cs index 21089fd..7cc9370 100644 --- a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/ManualDebugForm.cs +++ b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/ManualDebugForm.cs @@ -254,6 +254,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 private void ManualDebugForm_Load(object sender, EventArgs e) { string plcIp = "192.168.1.10"; + //string plcIp = "127.0.0.1"; bool initSuccess = Data.ModbusResourceManager.Instance.Init(plcIp, 502); if (!initSuccess) { diff --git a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PenetrationForm.cs b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PenetrationForm.cs index 77a9428..fb177cc 100644 --- a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PenetrationForm.cs +++ b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PenetrationForm.cs @@ -342,15 +342,13 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 if (uiButton3.IsDisposed || !uiButton3.IsHandleCreated) return; - if (uiButton3.InvokeRequired) + if (value3) { - uiButton3.Invoke(new Action(() => - { - // 再次检查,防止回调执行时控件已被销毁 - if (!uiButton3.IsDisposed && uiButton3.IsHandleCreated && value3) - uiButton3.Text = "灭火中"; - uiButton3.ForeColor = Color.Red; - })); + uiButton3.Invoke(new Action(() => + { + uiButton3.Text = "灭火中"; + uiButton3.ForeColor = Color.Red; + })); } else { @@ -376,14 +374,12 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 if (uiButton11.IsDisposed || !uiButton11.IsHandleCreated) return; - if (uiButton11.InvokeRequired) + if (value4) { uiButton11.Invoke(new Action(() => { - // 再次检查,防止回调执行时控件已被销毁 - if (!uiButton11.IsDisposed && uiButton11.IsHandleCreated && value4) - uiButton11.Text = "开灯中"; - uiButton11.ForeColor = Color.Red; + uiButton11.Text = "开灯中"; + uiButton11.ForeColor = Color.Red; })); } else diff --git a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/SecondaryIgnitionForm.cs b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/SecondaryIgnitionForm.cs index e0828ed..1ecbfa6 100644 --- a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/SecondaryIgnitionForm.cs +++ b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/SecondaryIgnitionForm.cs @@ -558,6 +558,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 private void SecondaryIgnitionForm_Load(object sender, EventArgs e) { string plcIp = "192.168.1.10"; + //string plcIp = "127.0.0.1"; bool initSuccess = Data.ModbusResourceManager.Instance.Init(plcIp, 502); if (!initSuccess) {