| | |
| | | SelectedTextColor = CSS_Color.AuxiliaryColor2, |
| | | }; |
| | | FrameWhiteCentet1.AddChidren(btnSuctionView); |
| | | RefreshFormStatu(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | private void RefreshFormStatu() |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var temp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.Status); |
| | | if (temp == null) |
| | | { |
| | | temp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.AlarmStatus); |
| | | } |
| | | if (temp != null) |
| | | { |
| | | if (temp.state == "alarm") |
| | | { |
| | | btnIcon.IsSelected = true; |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorSmokeStateBgIconOn.png"; |
| | | btnSuctionView.TextID = StringId.InAlarm; |
| | | btnSuctionView.IsSelected = true; |
| | | } |
| | | else |
| | | else if (temp.state == "normal") |
| | | { |
| | | btnIcon.IsSelected = false; |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorSmokeStateBgIcon.png"; |
| | | btnSuctionView.TextID = StringId.SensorNormalState; |
| | | btnSuctionView.IsSelected = false; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | #endregion |