| | |
| | | |
| | | break; |
| | | } |
| | | var powerLowTipAttr = function.status.Find((obj) => obj.key == FunctionAttributeKey.BatteryState); |
| | | var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState); |
| | | if (powerLowTipAttr != null) |
| | | { |
| | | if (powerLowTipAttr.value.ToLower() == "low") |
| | | if (powerLowTipAttr.state.ToLower() == "low") |
| | | { |
| | | Button btnTipPowerLow = new Button() |
| | | { |
| | |
| | | ProgressTextColor = CSS_Color.FirstLevelTitleColor, |
| | | ProgressTextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | MaxValue = 100, |
| | | Progress = (function as Light).brightness, |
| | | Progress = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.BatteryState)), |
| | | Tag = function.sid + "_DimmerBar", |
| | | SeekBarPadding = Application.GetRealWidth(20), |
| | | }; |
| | |
| | | IsSelected = function.GetAttrState(FunctionAttributeKey.Percent) != "0" |
| | | }; |
| | | bodyDiv.AddChidren(btnCurtainOpen); |
| | | LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose, function as Curtain); |
| | | LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose, function); |
| | | #endregion |
| | | } |
| | | /// <summary> |
| | |
| | | SelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1On.png", |
| | | }; |
| | | bodyDiv.AddChidren(btnClothesHangerDown); |
| | | LoadEvent_ControlClothesHanger(function, btnClothesHangerDown, btnClothesHangerUp); |
| | | LoadEvent_ControlClothesHanger(function, btnClothesHangerUp, btnClothesHangerDown); |
| | | #endregion |
| | | |
| | | |