wjc
2023-07-20 e842a3bbfccf8adfde4da0b2d1bd08414c2f30ae
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;
                //插座(有USB)
                case SPK.PanelSocket:
@@ -1007,7 +1008,11 @@
                        break;
                    case SPK.GroupControl:
                        {
                            if (button.Name == "colorful")
                            {
                            keyVlaue = "colorful";
                            }
                        }
                        break;
                }
@@ -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">属性key</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>
        /// 添加选中数据