wei
2021-02-26 87e614af0fa31d7fd632136d95c0c7e584c28477
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -98,8 +98,28 @@
                            case SPK.SensorDoorWindow:
                                btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorDoorIcon.png";
                                break;
                            default:
                                break;
                        }
                        var powerLowTipAttr = function.status.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
                        if (powerLowTipAttr != null)
                        {
                            if (powerLowTipAttr.value.ToLower() == "low")
                            {
                                Button btnTipPowerLow = new Button()
                                {
                                    X = Application.GetRealWidth(307),
                                    Y = Application.GetRealHeight(25),
                                    Width = Application.GetRealWidth(24),
                                    Height = Application.GetRealWidth(24),
                                    UnSelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
                                    SelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
                                };
                                this.AddChidren(btnTipPowerLow);
                            }
                        }
                        break;
                    case FunctionCategory.Music:
                        btnIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicThinIcon.png";
@@ -110,7 +130,15 @@
            }
            else
            {
                if (function.spk == SPK.ClothesHanger)
                {
                    btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png";
                    ClothesHangerFragment();
                }
                else
                {
                #region 加载开关按钮
                /// <summary>
                /// 开关按钮
                /// </summary>
@@ -202,6 +230,7 @@
                        break;
                }
                #endregion
                }
            }
            LoadEvent_DivSkipEvent();
@@ -374,6 +403,38 @@
            LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose, function as Curtain);
            #endregion
        }
        /// <summary>
        /// 加载晾衣架功能控制卡片
        /// </summary>
        void ClothesHangerFragment()
        {
            #region ClothesHanger
            var btnClothesHangerUp = new Button()
            {
                X = Application.GetRealWidth(163),
                Y = Application.GetRealHeight(58),
                Width = Application.GetMinRealAverage(32),
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1.png",
                SelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1On.png",
            };
            bodyDiv.AddChidren(btnClothesHangerUp);
            var btnClothesHangerDown = new Button()
            {
                X = Application.GetRealWidth(303),
                Y = Application.GetRealHeight(58),
                Width = Application.GetMinRealAverage(32),
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1.png",
                SelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1On.png",
            };
            bodyDiv.AddChidren(btnClothesHangerDown);
            LoadEvent_ControlClothesHanger(function, btnClothesHangerDown, btnClothesHangerUp);
            #endregion
        }
        /// <summary>
        /// 加载音乐功能控制卡片