From 9bc010fc2b51ff02d1f7d09accc2847e3d925777 Mon Sep 17 00:00:00 2001 From: jace.tang <1536884497@qq.com> Date: 星期五, 17 六月 2022 11:00:01 +0800 Subject: [PATCH] 1.获取高度结果的判断流程修改 --- FormPlcOperation.cs | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/FormPlcOperation.cs b/FormPlcOperation.cs index 1a2d7c4..9fe2695 100644 --- a/FormPlcOperation.cs +++ b/FormPlcOperation.cs @@ -25,6 +25,12 @@ _opc.ReadOneItem_Wrapper(OPCOutputTag.PingbiSafeGuard, ref result); cbPingbiSafeGuard.Checked = result != null && (bool)result ? true : false; + + this.Load += (s, e) => + { + cbPingbiGuangshan.CheckedChanged += cbPingbiGuangshan_CheckedChanged; + cbPingbiSafeGuard.CheckedChanged += cbPingbiSafeGuard_CheckedChanged; + }; } private void cbLoadRbtAlarm_CheckedChanged(object sender, EventArgs e) @@ -54,12 +60,18 @@ private void cbPingbiGuangshan_CheckedChanged(object sender, EventArgs e) { - _opc.Write(OPCOutputTag.PingbiGuangShan, cbPingbiGuangshan.Checked); + if (new ConfigPassword("").ShowDialog() == DialogResult.OK) + { + _opc.Write(OPCOutputTag.PingbiGuangShan, cbPingbiGuangshan.Checked); + } } private void cbPingbiSafeGuard_CheckedChanged(object sender, EventArgs e) { - _opc.Write(OPCOutputTag.PingbiSafeGuard, cbPingbiSafeGuard.Checked); + if (new ConfigPassword("").ShowDialog() == DialogResult.OK) + { + _opc.Write(OPCOutputTag.PingbiSafeGuard, cbPingbiSafeGuard.Checked); + } } } } -- Gitblit v1.8.0