From 0a11352dffeb8d5f31dd40b9728fe1abf4537f04 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期五, 01 九月 2023 18:06:45 +0800 Subject: [PATCH] 2023年09月01日18:06:42 --- HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs | 86 +++++++++++++++++++++++++++++++++++-------- 1 files changed, 70 insertions(+), 16 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs index 868b44f..1f4a5c5 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs @@ -60,6 +60,7 @@ /// 闂ㄩ攣鐘舵�� /// </summary> private Button btnDoorLockIcon; + Button btnDoorlockStatus; /// <summary> /// 瀹炴椂瑙嗛 /// </summary> @@ -239,7 +240,7 @@ this.CalculatedPosition();//閲嶆柊璁$畻瀹藉害 - var btnDoorlockStatus = new Button() + btnDoorlockStatus = new Button() { Width = Application.GetRealWidth(200), Height = Application.GetRealHeight(62), @@ -251,7 +252,7 @@ TextSize = 16, }; whiteFl.AddChidren(btnDoorlockStatus); - + int heightY = btnDoorLockIcon.Bottom + Application.GetRealHeight(133); //瀹炴椂瑙嗛 rtvFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); @@ -283,20 +284,27 @@ recordFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/HistoryList.png"; recordFL.GetTextButton().TextID = StringId.lishijilu; - //鐢ㄦ埛绠$悊 - CustomFrameLayout userManagerView = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); - whiteFl.AddChidren(userManagerView); - userManagerView.Y = heightY; - userManagerView.X = recordFL.Right + Application.GetRealWidth(CustomFrameLayout.interval); - userManagerView.AddImageView(); - userManagerView.AddTextButtonView(); - userManagerView.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/DoorlockUserManager.png"; - userManagerView.GetTextButton().TextID = StringId.UserManagement; + if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) + { + //鐢ㄦ埛绠$悊 + CustomFrameLayout userManagerView = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); + whiteFl.AddChidren(userManagerView); + userManagerView.Y = heightY; + userManagerView.X = recordFL.Right + Application.GetRealWidth(CustomFrameLayout.interval); + userManagerView.AddImageView(); + userManagerView.AddTextButtonView(); + userManagerView.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/DoorlockUserManager.png"; + userManagerView.GetTextButton().TextID = StringId.UserManagement; - userManagerView.SetClickListener((fl, btnImage, btnText) => { + userManagerView.SetClickListener((fl, btnImage, btnText) => + { + var page = new VideoDoorlockUserListPage(device); + MainPage.BasePageView.AddChidren(page); + page.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }); - + }); + } #endregion @@ -370,19 +378,54 @@ CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk, false); }); + var lastClickTime = DateTime.MinValue; //涓存椂瀵嗙爜 this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => { + if (lastClickTime.AddSeconds(3) > DateTime.Now) + { + return; + } + lastClickTime = DateTime.Now; CommonMethod.Current.SkipPSWActivity(this.device.deviceId); }); + //鍘嗗彶璁板綍 this.recordFL.SetClickListener((fl, btnStateImage, btnStateText) => { + if (lastClickTime.AddSeconds(3) > DateTime.Now) + { + return; + } + lastClickTime = DateTime.Now; + //VideoDoorlockHistoryPage historyPage = new VideoDoorlockHistoryPage(device); //MainPage.BasePageView.AddChidren(historyPage); //historyPage.LoadPage(); //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - CommonMethod.Current.SkipRecordActivity(this.device.deviceId); + var waitPage = new Loading(); + this.AddChidren(waitPage); + waitPage.Start(""); + new System.Threading.Thread(() => + { + try + { + Application.RunOnMainThread(() => + { + CommonMethod.Current.SkipRecordActivity(this.device.deviceId); + }); + }catch(Exception ex) + { + + } + finally + { + Application.RunOnMainThread(() => { + waitPage.Hide(); + }); + } + }) + { IsBackground = true }.Start(); }); @@ -404,7 +447,18 @@ //this.cellDiyArcSeekBar.Progress = i; //鏇存柊鐢甸噺鍊� this.btnCell.Text = cellInfo.remain + "%"; - this.btnDoorLockIcon.IsSelected = videoDoorLockInfo.doorStatus == "open"; + if(videoDoorLockInfo.doorStatus == "open") + { + this.btnDoorLockIcon.IsSelected = true; + this.btnDoorlockStatus.TextID = StringId.DoorlockOpen; + this.btnDoorlockStatus.TextColor = CSS_Color.WarningColor; + } + else + { + this.btnDoorLockIcon.IsSelected = false; + this.btnDoorlockStatus.TextID = StringId.DoorlockClose; + this.btnDoorlockStatus.TextColor = 0xFF000000; + } }); } catch { } -- Gitblit v1.8.0