| | |
| | | |
| | | /// <summary> |
| | | /// 加载功能类型控制卡片 |
| | | /// Tag 功能属性显示 |
| | | /// </summary> |
| | | public void LoadFunctionDiv() |
| | | { |
| | |
| | | { |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/DoorLock.png"; |
| | | } |
| | | else if(SPK.PanelSpkList().Contains(function.spk))//智能面板设备 |
| | | { |
| | | var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState); |
| | | if (powerLowTipAttr != null) |
| | | { |
| | | if (powerLowTipAttr.state.ToLower() == "low") |
| | | { |
| | | Button btnTipPowerLow = new Button() |
| | | { |
| | | X = Application.GetRealWidth(307), |
| | | Y = Application.GetRealHeight(70), |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealWidth(24), |
| | | UnSelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png", |
| | | SelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png", |
| | | }; |
| | | this.AddChidren(btnTipPowerLow); |
| | | } |
| | | } |
| | | var alarmStatusAttr = function.GetAttribute("alarm_status"); |
| | | if(alarmStatusAttr !=null) |
| | | { |
| | | var btnAlarmStatus = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 10 + 32), |
| | | Y = Application.GetRealHeight(53), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(24), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | Tag = "AlarmStatus" |
| | | }; |
| | | if(alarmStatusAttr.state == "alarm") |
| | | { |
| | | btnAlarmStatus.TextID = StringId.InAlarm; |
| | | btnAlarmStatus.TextColor = CSS_Color.WarningColor; |
| | | } |
| | | bodyDiv.AddChidren(btnAlarmStatus); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (function.spk == SPK.ClothesHanger)//晾衣架 |