From 3250c96448f7d09060b175f0da81a9f315926c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=94=84=E5=A4=B4?= Date: Fri, 21 Jun 2024 09:05:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dan/InitAction.cs | 25 ++++++------- .../Data/MCProject/nodeForm/LjDeliver.xml | 36 +++++++++---------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Dan/InitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Dan/InitAction.cs index e537386..a24ef60 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Dan/InitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Dan/InitAction.cs @@ -138,6 +138,7 @@ namespace Mesnac.Action.ChemicalWeighing.Dan cbkA = controll.FirstOrDefault(x => x.Name == "cbkA") as MCCheckBox; + backColor = cbkA.BackColor; cbkB = controll.FirstOrDefault(x => x.Name == "cbkB") as MCCheckBox; cbkC = controll.FirstOrDefault(x => x.Name == "cbkC") as MCCheckBox; @@ -228,24 +229,24 @@ namespace Mesnac.Action.ChemicalWeighing.Dan MCButton2_Click(new object(), new EventArgs()); - backColor=txtBoxA.BackColor; + cbkA.CheckedChanged += CbkA_CheckedChanged; } private void CbkA_CheckedChanged(object sender, EventArgs e) { - //if (sender == cbkA) - //{ - // if (cbkA.Checked) - // { - // txtBoxA.BackColor = Color.Green; - // } - // else - // { - // txtBoxA.BackColor = backColor; - // } - //} + if (sender == cbkA) + { + if (cbkA.Checked) + { + cbkA.BackColor = Color.Green; + } + else + { + cbkA.BackColor = backColor; + } + } } private void MCButton2_Click(object sender, EventArgs e) diff --git a/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml b/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml index 7b27d9a..cb66d80 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml @@ -1625,7 +1625,7 @@ 0 Transparent ButtonHighlight - 166, 110 + 100, 110 CStatus 11, 12 @@ -1646,7 +1646,7 @@ 状态 Transparent ButtonHighlight - 159, 90 + 99, 90 MCLabel346 29, 12 @@ -1664,12 +1664,12 @@ None True True - 压送罐2 + 0 Transparent ButtonHighlight - 102, 112 + 73, 112 linCNum - 47, 12 + 11, 12 @@ -1709,7 +1709,7 @@ 数量 Transparent ButtonHighlight - 93, 90 + 64, 90 MCLabel333 29, 12 @@ -2008,7 +2008,7 @@ 0 Transparent ButtonHighlight - 164, 115 + 99, 118 BStatus 11, 12 @@ -2029,7 +2029,7 @@ 状态 Transparent ButtonHighlight - 156, 96 + 96, 96 MCLabel344 29, 12 @@ -2047,12 +2047,12 @@ None True True - 压送罐2 + 0 Transparent ButtonHighlight - 100, 117 + 71, 117 linBNum - 47, 12 + 11, 12 @@ -2092,7 +2092,7 @@ 数量 Transparent ButtonHighlight - 90, 96 + 61, 96 MCLabel336 29, 12 @@ -2391,7 +2391,7 @@ 0 Transparent ButtonHighlight - 151, 110 + 100, 111 AStatus 11, 12 @@ -2412,7 +2412,7 @@ 状态 Transparent ButtonHighlight - 149, 91 + 98, 92 MCLabel342 29, 12 @@ -2430,12 +2430,12 @@ None True True - 压送罐2 + 0 Transparent ButtonHighlight - 98, 111 + 72, 111 linANum - 47, 12 + 11, 12 @@ -2475,7 +2475,7 @@ 数量 Transparent ButtonHighlight - 90, 92 + 64, 92 MCLabel340 29, 12