From d511823e84953e616da9a24484d730c49c457c08 Mon Sep 17 00:00:00 2001 From: xcd <834800634@qq.com> Date: 星期二, 14 七月 2020 08:54:16 +0800 Subject: [PATCH] 更改M071主界面按钮鼠标样式 --- src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.cs | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.cs b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.cs index 528ef6b..e47edce 100644 --- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.cs +++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardIOStatus.cs @@ -52,8 +52,8 @@ private void IoOut_DoubleClick(string name, bool isOn) { - var index = Convert.ToInt16(name.Substring(6)); - MotionCard.WriteOutput(index, isOn ? IOValue.TRUE : IOValue.FALSE); + var index = Convert.ToInt16(name.Substring(5)); + MotionCard.WriteOutput(index, isOn ? IOValue.FALSE : IOValue.TRUE); } private void RefreshIOStatus(object sender, EventArgs e) @@ -67,7 +67,8 @@ if (ioInArray != null && ioInArray.Length == 1) { var ioIn = ioInArray[0] as IOIndicatorCtrl; - ioIn.IsOn = ioItem.Value == IOValue.FALSE; + + ioIn.IsOn = ioItem.Value == IOValue.TRUE; } } else @@ -76,7 +77,15 @@ if (ioOutArray != null && ioOutArray.Length == 1) { var ioOut = ioOutArray[0] as IOIndicatorCtrl; - ioOut.IsOn = ioItem.Value == IOValue.FALSE; + + if (MotionCard.IConfig.IsOutputReversed) + { + ioOut.IsOn = ioItem.Value == IOValue.TRUE; + } + else + { + ioOut.IsOn = ioItem.Value == IOValue.FALSE; + } } } } -- Gitblit v1.8.0