From a3313818a548d51777ae4e6cc006e9d1e2c1036e Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 07 四月 2023 09:15:37 +0800 Subject: [PATCH] 群控备份 --- HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs | 92 +++++++++++++++++++++++++++++++-------------- 1 files changed, 63 insertions(+), 29 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs index 087a854..42919c2 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs @@ -88,8 +88,8 @@ /// 鏋勯�犲嚱鏁� /// </summary> /// <param name="function">璁惧</param> - /// <param name="btnDeviceName">涓婁竴绾х晫闈㈢殑璁惧鍚嶅瓧鎺т欢</param> - /// <param name="btnRoomName">涓婁竴绾х晫闈㈢殑鎴块棿鍚嶅瓧鎺т欢</param> + /// <param name="btnDeviceName">涓婁竴绾х晫闈㈢殑璁惧鍚嶅瓧鎺т欢(娉�:涓嶈兘浼爊ull,娌℃湁鍙互浼爊ew Button())</param> + /// <param name="btnRoomName">涓婁竴绾х晫闈㈢殑鎴块棿鍚嶅瓧鎺т欢(娉�:涓嶈兘浼爊ull,娌℃湁鍙互浼爊ew Button())</param> public VideoDoorLockPage(Function function, Button btnDeviceName, Button btnRoomName, CommonMethod.Comerom comerom, Action action) { this.device = function; @@ -274,36 +274,39 @@ //杩斿洖 this.topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { - RemoveFromParent(); + this.RemoveFromParent(); }; //璁剧疆 this.topView.clickSetBtn.MouseUpEventHandler += (sender, e) => { - //璋冪敤绉�缁曠殑鐣岄潰 - var infoView = new UI.FunctionBaseInfoSetPage(this.device, () => + CommonMethod.Current.MainThread(() => { + //璋冪敤绉�缁曠殑鐣岄潰 + var infoView = new UI.FunctionBaseInfoSetPage(this.device, () => + { + if (this.btnDeviceName == null || this.btnRoomName == null || this.device == null) + { + return; + } + ////鍒锋柊鏄剧ず + this.btnDeviceName.Text = this.device.name; + this.btnRoomName.Text = this.device.GetRoomListName(); + this.btnCurrDeviceName.Text = this.device.name; + this.btnCurrDeviceRoom.Text = this.device.GetRoomListName(); + this.CalculatedPosition();//閲嶆柊璁$畻瀹藉害 + }); + infoView.actionDel += () => + { + //瑙g粦璁惧鍚� + this.RemoveFromParent(); + this.action?.Invoke(); - if (this.btnDeviceName == null || this.btnRoomName == null) - { - return; - } - ////鍒锋柊鏄剧ず - this.btnDeviceName.Text = this.device.name; - this.btnRoomName.Text = this.device.GetRoomListName(); - this.btnCurrDeviceName.Text = this.device.name; - this.btnCurrDeviceRoom.Text = this.device.GetRoomListName(); - this.CalculatedPosition();//閲嶆柊璁$畻瀹藉害 - - }, () => - { - //瑙g粦璁惧鍚� - this.RemoveFromParent(); - this.action?.Invoke(); + }; + MainPage.BasePageView.AddChidren(infoView); + infoView.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }); - MainPage.BasePageView.AddChidren(infoView); - infoView.LoadPage(); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; //鏀惰棌 this.btnCollectIcon.MouseUpEventHandler += (sender, e) => @@ -314,15 +317,17 @@ //瀹炴椂瑙嗛 this.rtvFL.SetClickListener((fl, btnStateImage, btnStateText) => { - CommonMethod.Current.SkipRTVActivity(this.device.sid,this.device.deviceId,this.device.spk); + CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk, false); }); //涓存椂瀵嗙爜 - this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => { - CommonMethod.Current.SkipPSWActivity(); + this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => + { + CommonMethod.Current.SkipPSWActivity(this.device.deviceId); }); //鍘嗗彶璁板綍 - this.recordFL.SetClickListener((fl, btnStateImage, btnStateText) => { - CommonMethod.Current.SkipRecordActivity(); + this.recordFL.SetClickListener((fl, btnStateImage, btnStateText) => + { + CommonMethod.Current.SkipRecordActivity(this.device.deviceId); }); @@ -358,6 +363,8 @@ }); } + + /// <summary> /// 閲嶆柊璁$畻瀹藉害(璁惧鍚嶇О,鎴块棿鎺т欢) /// </summary> @@ -378,6 +385,33 @@ this.cellFrame.X = this.btnCurrDeviceRoom.Right + Application.GetRealWidth(20); } + /// <summary> + /// 鏇存柊鐘舵�� + /// </summary> + public void UpdateState(PushMessageType pushMessageType) + { + CommonMethod.Current.MainThread(() => + { + if (pushMessageType == PushMessageType.Alarm) + { + //闂ㄩ攣鐢垫睜鍊� + if (this.btnCell != null) + { + //videoDoorLockPage.btnCell.Text = ""; + } + } + else + { + if (this.btnDoorLockIcon != null && !this.btnDoorLockIcon.IsSelected) + { + this.btnDoorLockIcon.IsSelected = false; + } + } + + }); + + } + } /// <summary> /// 鑷繁寮勪竴涓狥rameLayout -- Gitblit v1.8.0