| | |
| | | switch (tempStatus.state) |
| | | {//0空,1走,2跑,3坐,4跌倒,5站 |
| | | case "0": |
| | | btnStatus.TextID = StringId.SensorNormalState; |
| | | btnStatus.TextID = StringId.wuren; |
| | | btnStatus.TextColor = CSS_Color.MainColor; |
| | | break; |
| | | case "1": |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | else if (SPK.ArmSensorSpkList().Contains(updataFunction.spk)) |
| | | { |
| | | if (cTag == updataFunction.sid + "_Sensor_Status") |
| | | { |
| | | Button btnStatus = (fcView.GetChildren(j) as Button); |
| | | |
| | | var alarm_status = updataFunction.attributes.Find((sta) => sta.key == FunctionAttributeKey.AlarmStatus); |
| | | if (alarm_status != null) |
| | | { |
| | | if (alarm_status.curValue.ToString() == "normal") |
| | | { |
| | | btnStatus.TextID = StringId.SensorNormalState; |
| | | btnStatus.TextColor = CSS_Color.MainColor; |
| | | } |
| | | else |
| | | { |
| | | btnStatus.TextID = StringId.InAlarm; |
| | | btnStatus.TextColor = CSS_Color.WarningColor; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | alarm_status = updataFunction.attributes.Find((sta) => sta.key == "contact_status"); |
| | | if (alarm_status != null) |
| | | { |
| | | if (alarm_status.curValue.ToString() == "close") |
| | | { |
| | | btnStatus.TextID = StringId.Shut; |
| | | btnStatus.TextColor = CSS_Color.MainColor; |
| | | } |
| | | else |
| | | { |
| | | if (updataFunction.spk == SPK.SensorDryContact || updataFunction.spk == SPK.SensorDryContact2) |
| | | { |
| | | btnStatus.TextID = StringId.DryBreak; |
| | | } |
| | | else |
| | | { |
| | | btnStatus.TextID = StringId.Open; |
| | | } |
| | | btnStatus.TextColor = CSS_Color.WarningColor; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | alarm_status = updataFunction.attributes.Find((sta) => sta.key == "people_status"); |
| | | if (alarm_status != null) |
| | | { |
| | | if (alarm_status.curValue.ToString() == "false") |
| | | { |
| | | btnStatus.TextID = StringId.wuren; |
| | | btnStatus.TextColor = CSS_Color.MainColor; |
| | | } |
| | | else |
| | | { |
| | | btnStatus.TextID = StringId.youren; |
| | | btnStatus.TextColor = CSS_Color.WarningColor; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //更新温控器状态 |
| | | else if(SPK.HvacCac == updataFunction.spk) |
| | | { |