From bf3d64379bdf4424394103b31531a25d30be85d8 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 10 十一月 2022 11:45:14 +0800 Subject: [PATCH] 机械手 --- HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs index ac508a3..6c21dc8 100644 --- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs @@ -655,6 +655,10 @@ int functionOnCount = 0; switch (item) { + case ShowFunction.MechanicalArm: + functionCount = FunctionList.List.GetMechanicalArmList().Count; + functionOnCount = FunctionList.List.GetMechanicalArmList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; + break; case ShowFunction.Light: #region Light functionCount = FunctionList.List.GetLightList().Count; @@ -863,6 +867,28 @@ #endregion break; + case ShowFunction.MechanicalArm: + btnName.TextID = StringId.MechanicalArm; + Button btnMaPower = new Button() + { + X = Application.GetRealWidth(120), + Y = specialList.Contains(index) ? Application.GetRealWidth(160) : Application.GetRealWidth(117), + Width = Application.GetRealWidth(32), + Height = Application.GetRealWidth(32), + SelectedImagePath = "Public/PowerOpen.png", + UnSelectedImagePath = "Public/PowerClose.png", + IsSelected = functionOnCount > 0, + Tag = item + "_AllControl", + }; + functionView.AddChidren(btnMaPower); + + btnMaPower.MouseUpEventHandler = (sender, e) => + { + LoadEvent_SwitchFunction(btnMaPower, item, functionView); + }; + functionPageTitleId = StringId.MechanicalArm; + + break; case ShowFunction.AC: #region AC btnName.TextID = StringId.AC; -- Gitblit v1.8.0