11
wei
2021-02-23 d89a8ccb3d48d39f920b294c1966a3522ee8adbc
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
old mode 100755 new mode 100644
@@ -53,6 +53,7 @@
        /// </summary>
        public void LoadFunctionDiv()
        {
            //todo 增加设备,增加功能列表卡片
            if (function == null)
            {
                this.RemoveFromParent();
@@ -60,7 +61,10 @@
            }
            LoadDiv();
            if (function.Spk_Prefix == FunctionCategory.Curtain || function.Spk_Prefix == FunctionCategory.Music)//窗帘没有开关按钮
            if (function.Spk_Prefix == FunctionCategory.Curtain//窗帘没有开关按钮
                || function.Spk_Prefix == FunctionCategory.Music//音乐没有开关按钮
                || function.Spk_Prefix == FunctionCategory.Sensor//传感器没有开关按钮
                )
            {
                switch (function.Spk_Prefix)
                {
@@ -78,6 +82,24 @@
                                break;
                        }
                        CurtainFragment();
                        break;
                    case FunctionCategory.Sensor:
                        switch (function.spk)
                        {
                            case SPK.SensorPir:
                                btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorPirIcon.png";
                                break;
                            case SPK.SensorWater:
                                btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorWaterImmersionIcon.png";
                                break;
                            case SPK.SensorSmoke:
                                btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorSmokeIcon.png";
                                break;
                            case SPK.SensorDoorWindow:
                                btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorDoorIcon.png";
                                break;
                        }
                        break;
                    case FunctionCategory.Music:
                        btnIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicThinIcon.png";
@@ -172,6 +194,9 @@
                            case SPK.ElectricTuyaWeepRobot:
                                btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobotThinIcon.png";
                                break;
                            case SPK.ElectricTuyaWaterValve:
                                btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WaterValve/WaterValveIcon.png";
                                break;
                        }
                        btnSwitch.IsSelected = function.trait_on_off.curValue.ToString() == "on";
                        break;
@@ -235,7 +260,7 @@
            };
            //bodyDiv.AddChidren(btnCollectionIcon);
            //2020-12-16 如果是成员隐藏收藏功能
            if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
            if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare && function.Spk_Prefix != FunctionCategory.Sensor)
            {
                bodyDiv.AddChidren(btnCollectionIcon);
            }
@@ -393,7 +418,6 @@
            LoadEvent_ControlMusic(btnPlay, btnNext, btnPrev, function as A31MusicModel);
            #endregion
        }
        /// <summary>
        /// 加载功能状态信息按钮