wxr
2022-05-24 610a6a826a00d47320b17478cb5ca5f60abfa291
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -405,6 +405,23 @@
                        };
                    }
                    break;
                //门锁
                case SPK.DoorLock:
                    {
                        LogicView.FunTypeView view = new LogicView.FunTypeView();
                        view.btnText.TextID = StringId.shifoukaisuoshi;
                        fLayout.AddChidren(view.FLayoutView());
                        view.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            DeviceView(device, view.btnState, StringId.shi, StringId.offLogic,1);
                        };
                        if (edit)
                        {
                            GetEditState(device, index, view.btnState, null, null, null);
                        }
                    }
                    break;
            }
            #region  保存
            ///保存View
@@ -482,12 +499,13 @@
        /// <param name="button">选中状态显示文本Btn控件</param>
        /// <param name="btnText1">属性状态值文本1</param>
        /// <param name="btnText2">属性状态值文本2</param>
        private void DeviceView(Entity.Function device, Button button, int btnText1, int btnText2)
        /// <param name="viewCount">view数量</param>
        private void DeviceView(Entity.Function device, Button button, int btnText1, int btnText2,int viewCount=2)
        {
            FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewTrans60lucence };
            this.AddChidren(frame);
            LogicView.SwitchView switchView = new LogicView.SwitchView();
            switchView.FLayoutView(frame, btnText1, btnText2, button.Text, (intValue) =>
            switchView.FLayoutView(frame, btnText1, btnText2, button.Text, viewCount,(intValue) =>
            {
                //设备属性值,云雀上定义好的;
                string keyVlaue = "on_off";
@@ -540,6 +558,11 @@
                            }
                        }
                        break;
                    case SPK.DoorLock:
                        {
                            keyVlaue = "door_status";
                        }
                        break;
                }
                switch (intValue)
@@ -583,6 +606,7 @@
                            }
                        }
                        break;
                    case StringId.shi:
                    case StringId.kaiqi:
                        {
                            value = "open";
@@ -607,6 +631,8 @@
                        {
                            value = "fall";
                        }; break;
                }
                //显示文本
                button.TextID = intValue;