陈嘉乐
2020-12-04 f7c931e07919d62eb7fb1d1e6f0daaa5929be422
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -75,6 +75,26 @@
                        SwitchBrightnessView(fLayout, device, index, edit, 3);
                    }
                    break;
                case FunctionType.AC: {
                        #region 界面
                        ///开关
                        LogicView.FunTypeView curtainSwitchView = new LogicView.FunTypeView();
                        curtainSwitchView.btnText.TextID = StringId.switchLogic;
                        fLayout.AddChidren(curtainSwitchView.FLayoutView());
                        #endregion
                        #region 点击事件
                        ///开关点击事件
                        curtainSwitchView.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            SwitchViewMethod(device, curtainSwitchView.btnState, 2);
                        };
                        if (edit)
                        {
                            GetEditState(device, index, curtainSwitchView.btnState, null, null, null);
                        }
                        #endregion
                    }
                    break;
            }
            #endregion
@@ -390,6 +410,9 @@
                    }
                    break;
                case FunctionType.Dimmer:
                case FunctionType.RGB:
                case FunctionType.RGBW:
                case FunctionType.CCT:
                    {
                        foreach (var dic in dicList)
                        {
@@ -445,6 +468,47 @@
                        }
                    }
                    break;
                case FunctionType.TrietexCurtain:
                case FunctionType.RollerCurtain: {
                        foreach (var dic in dicList)
                        {
                            string value = dic["value"];
                            switch (dic["key"])
                            {
                                case "on_off":
                                    {
                                        switch (value)
                                        {
                                            case "on":
                                                {
                                                    button1.Text = Language.StringByID(StringId.onLogic);
                                                }
                                                break;
                                            case "off":
                                                {
                                                    button1.Text = Language.StringByID(StringId.offLogic);
                                                }
                                                break;
                                            case "stop":
                                                {
                                                    button1.Text = Language.StringByID(StringId.stop);
                                                }
                                                break;
                                        }
                                    }
                                    break;
                                case "brightness":
                                    {
                                        button2.Text = value;
                                    }
                                    break;
                            }
                        }
                    }
                    break;
            }
        }