2023年03月29日19:02:18
备份一下代码
| | |
| | | //报警推送才弹窗提示(messageType包含Alarm关键字的) |
| | | if (jpushMessageInfo.messageType.Contains(PushMessageType.Alarm.ToString())) |
| | | { |
| | | //报警推送弹窗提示 |
| | | ShowAlarmPushMessage(jpushMessageInfo, true); |
| | | //萤石门锁更新开锁图标 |
| | | HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.UpdateDoorLockState(PushMessageType.Alarm, jpushMessageInfo.HomeId, jpushMessageInfo.spk, jpushMessageInfo.Extras); |
| | | //报警推送弹窗提示 |
| | | ShowAlarmPushMessage(jpushMessageInfo, true); |
| | | } |
| | | else if (jpushMessageInfo.messageType.Contains(PushMessageType.FLCall.ToString())) |
| | | { |
| | |
| | | #endif |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新开锁图标和电池状态 |
| | | /// </summary> |
| | | public void UpdateDoorLockState(PushMessageType pushMessageType, string homeId, string spk, string stateContent) |
| | | { |
| | | if (spk != SPK.VideoDoorLock) |
| | | { |
| | | return; |
| | | } |
| | | this.MainThread(() => |
| | | { |
| | | int childrenCount = MainPage.BasePageView.ChildrenCount - 1; |
| | | for (int i = childrenCount; childrenCount > i; i--) |
| | | { |
| | | View view = MainPage.BasePageView.GetChildren(i); |
| | | if (view is VideoDoorLockPage) |
| | | { |
| | | VideoDoorLockPage videoDoorLockPage = (VideoDoorLockPage)view; |
| | | if (videoDoorLockPage != null) |
| | | { |
| | | videoDoorLockPage.UpdateState(pushMessageType); |
| | | } |
| | | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | |
| | | #region --------- 功能文件保存,删除 -------- |
| | | /// <summary> |
| | | /// 保存本地文件 |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 重新计算宽度(设备名称,房间控件) |
| | | /// </summary> |
| | |
| | | this.cellFrame.X = this.btnCurrDeviceRoom.Right + Application.GetRealWidth(20); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新状态 |
| | | /// </summary> |
| | | public void UpdateState(PushMessageType pushMessageType) |
| | | { |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | if (this.btnDoorLockIcon != null && !this.btnDoorLockIcon.IsSelected) |
| | | { |
| | | this.btnDoorLockIcon.IsSelected = false; |
| | | } |
| | | //门锁电池值 |
| | | if (this.btnCell != null) |
| | | { |
| | | //videoDoorLockPage.btnCell.Text = ""; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 自己弄一个FrameLayout |