| | |
| | | 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"; |
| | |
| | | } |
| | | else |
| | | { |
| | | if (function.spk == SPK.ClothesHanger) |
| | | { |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png"; |
| | | ClothesHangerFragment(); |
| | | } |
| | | else |
| | | { |
| | | #region 加载开关按钮 |
| | | |
| | | /// <summary> |
| | | /// 开关按钮 |
| | | /// </summary> |
| | |
| | | break; |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | | |
| | | LoadEvent_DivSkipEvent(); |
| | |
| | | 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> |
| | | /// 加载音乐功能控制卡片 |