From e842a3bbfccf8adfde4da0b2d1bd08414c2f30ae Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 20 七月 2023 10:26:36 +0800
Subject: [PATCH] 2023年07月20日10:26:16

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index db4c83f..26c55dc 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -58,7 +58,7 @@
             {
                 //缇ゆ帶
                 case SPK.GroupControl:
-                    int bottom = 50;
+                    int height = Application.GetRealHeight(50);
                     int attributesNameId=0;
                     int count = 0;
                     foreach (var attr in (device as GroupControl).attributes)
@@ -71,7 +71,7 @@
                         {
                             LogicView.FunTypeView view = new LogicView.FunTypeView();
                             view.btnState.Name = "缇ゆ帶";
-                            view.frameLayout.Y = count * Application.GetRealHeight(50);
+                            view.frameLayout.Y = count * height;
                             fLayout.AddChidren(view.FLayoutView());
                             count++;
                             switch (attr.key)
@@ -118,6 +118,7 @@
                                     break;
                                 case FunctionAttributeKey.Colorful:
                                     attributesNameId = StringId.ColorfulFunction;
+                                    view.btnState.Name = "colorful";
                                     ///寮�鍏崇偣鍑讳簨浠�
                                     view.btnClick.MouseUpEventHandler += (sender, e) =>
                                     {
@@ -129,13 +130,13 @@
                             if (edit)
                             {
                                 //鏄剧ず缂栬緫涔嬪墠鐨勮澶囩姸鎬�
-                                GetEditDeviceState(device, index, view.btnState, null, null, null);
+                                GetEditDeviceState(device, index, view.btnState, null, null, null, attr.key);
                             }
                         }
                     }
 
                     //璁惧寤舵椂iewv
-                    DelayView(fLayout, Application.GetRealHeight(50)* count);
+                    DelayView(fLayout, height* count);
                     break;
                 //鎻掑骇(鏈塙SB)
                 case SPK.PanelSocket:
@@ -1007,7 +1008,11 @@
                         break;
                     case SPK.GroupControl:
                         {
-                            keyVlaue = "colorful";
+                            if (button.Name == "colorful")
+                            {
+                                keyVlaue = "colorful";
+                            }
+
                         }
                         break;
                 }
@@ -1137,7 +1142,7 @@
 
         }
 
-     
+
 
 
         /// <summary>
@@ -1149,7 +1154,8 @@
         /// <param name="button2">鏄剧ずBtn</param>
         /// <param name="button3">鏄剧ずBtn</param>
         /// <param name="button4">鏄剧ずBtn</param>
-        private void GetEditDeviceState(Entity.Function device, int index, Button button1, Button button2, Button button3, Button button4)
+        /// <param name="attribute">灞炴�ey</param>
+        private void GetEditDeviceState(Entity.Function device, int index, Button button1, Button button2, Button button3, Button button4, string attribute="")
         {
             Output outputs = Logic.currlogic.output[index];
             var dicList = outputs.status;
@@ -1166,7 +1172,7 @@
                 this.btnDelay.Text = outputs.delay + "s";
                 this.strdelay = outputs.delay;
             }
-            InpOrOutLogicMethod.Current.EditDeviceState(device, dicList, button1, button2, button3, button4);
+            InpOrOutLogicMethod.Current.EditDeviceState(device, dicList, button1, button2, button3, button4, attribute);
         }
         /// <summary>
         /// 娣诲姞閫変腑鏁版嵁

--
Gitblit v1.8.0