From 87c5e522b8ead5f8d5d201323e14e7aa438e84ec Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 14 三月 2023 19:08:25 +0800
Subject: [PATCH] 2023年03月14日19:08:20

---
 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs |   76 +++++++++++++++++++++++---------------
 1 files changed, 46 insertions(+), 30 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs
index e4c70ef..d324778 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs
@@ -6,6 +6,7 @@
 using HDL_ON.Entity;
 using HDL_ON.DriverLayer;
 using HDL_ON.UI.Music;
+using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock;
 
 namespace HDL_ON.UI
 {
@@ -39,6 +40,10 @@
         /// 鍖哄煙
         /// </summary>
         private Button btnCurrDeviceRoom;
+        /// <summary>
+        /// 鐢甸噺鐖舵帶浠�
+        /// </summary>
+        private FrameLayout cellFrame;
         /// <summary>
         /// 鐢甸噺
         /// </summary>
@@ -164,11 +169,7 @@
             };
             whiteFl.AddChidren(btnCurrDeviceName);
 
-            btnCurrDeviceName.Width = btnCurrDeviceName.GetTextWidth();
-            if (btnCurrDeviceName.GetTextWidth() > btnCollectIcon.X)
-            {
-                btnCurrDeviceName.Width = btnCollectIcon.X;
-            }
+
             btnCurrDeviceRoom = new Button
             {
                 TextSize = TextSize.Text12,
@@ -181,9 +182,8 @@
                 TextAlignment = TextAlignment.CenterLeft,
             };
             whiteFl.AddChidren(btnCurrDeviceRoom);
-            btnCurrDeviceRoom.Width = btnCurrDeviceRoom.GetTextWidth();
 
-            var cellFrame = new FrameLayout
+            cellFrame = new FrameLayout
             {
                 X = btnCurrDeviceRoom.Right + Application.GetRealWidth(20),
                 Y = btnCurrDeviceName.Bottom + Application.GetRealHeight(5),
@@ -191,8 +191,6 @@
                 Height = Application.GetRealHeight(16),
             };
             whiteFl.AddChidren(cellFrame);
-
-
 
             cellDiyArcSeekBar = new DiyArcSeekBar
             {
@@ -221,9 +219,6 @@
             cellFrame.AddChidren(btnCell);
 
 
-
-
-
             //闂ㄩ攣鐘舵��
             btnDoorLockIcon = new Button
             {
@@ -235,6 +230,9 @@
                 SelectedImagePath = "FunctionIcon/DoorLock/UnLocking.png",
             };
             whiteFl.AddChidren(btnDoorLockIcon);
+
+            this.CalculatedPosition();//閲嶆柊璁$畻瀹藉害
+
             int heightY = btnDoorLockIcon.Bottom + Application.GetRealHeight(70);
             //瀹炴椂瑙嗛
             rtvFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout);
@@ -264,6 +262,8 @@
             pswFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/OneOpenLock.png";
             pswFL.GetTextButton().TextID = StringId.linshimima1;
 
+
+
             #endregion
 
 
@@ -278,7 +278,7 @@
             {
                 RemoveFromParent();
 
-              
+
             };
             //璁剧疆
             this.topView.clickSetBtn.MouseUpEventHandler += (sender, e) =>
@@ -295,19 +295,10 @@
                     ////鍒锋柊鏄剧ず
                     this.btnDeviceName.Text = this.device.name;
                     this.btnRoomName.Text = this.device.GetRoomListName();
-                    this.topView.topNameBtn.Text = this.device.name;
                     this.btnCurrDeviceName.Text = this.device.name;
                     this.btnCurrDeviceRoom.Text = this.device.GetRoomListName();
+                    this.CalculatedPosition();//閲嶆柊璁$畻瀹藉害
 
-                    ////浠庢柊璁$畻瀹藉害
-                    //this.btnDeviceName.Text = btnDeviceName.Text;
-                    //this.btnDeviceName.Width = this.btnDeviceName.GetTextWidth();
-
-                    //this.btnRoomName.Text = btnRoomName.Text;
-                    //this.btnRoomName.Width = this.btnRoomName.GetTextWidth();
-
-                    ////鍥炶皟浜嬩欢
-                    //this.SettionFinishEvent?.Invoke();
                 }, () =>
                 {
                     //瑙g粦璁惧鍚�
@@ -327,12 +318,16 @@
             //瀹炴椂瑙嗛
             this.rtvFL.SetClickListener((fl, btnStateImage, btnStateText) =>
             {
-
+               CommonMethod.Current.SkipRTVActivity(this.device.sid,this.device.deviceId,this.device.spk);
             });
             //涓存椂瀵嗙爜
-            this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => { });
+            this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => {
+                CommonMethod.Current.SkipPSWActivity();
+            });
             //鍘嗗彶璁板綍
-            this.recordFL.SetClickListener((fl, btnStateImage, btnStateText) => { });
+            this.recordFL.SetClickListener((fl, btnStateImage, btnStateText) => {
+                CommonMethod.Current.SkipRecordActivity();
+            });
 
 
         }
@@ -349,7 +344,7 @@
                 try
                 {
                     var videoDoorLockInfo = UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetVideoDoorLockState(this.device);
-                    var cellInfo =UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetCellValue(this.device);
+                    var cellInfo = UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetCellValue(this.device);
                     Application.RunOnMainThread(() =>
                     {
                         //this.cellDiyArcSeekBar.Progress = i;
@@ -367,8 +362,29 @@
                     });
                 }
             })
-            { IsBackground = true }.Start() ;
+            { IsBackground = true }.Start();
         }
+
+        /// <summary>
+        /// 閲嶆柊璁$畻瀹藉害(璁惧鍚嶇О,鎴块棿鎺т欢)
+        /// </summary>
+        private void CalculatedPosition()
+        {
+            this.btnCurrDeviceName.Width = this.btnCurrDeviceName.GetTextWidth();
+            if (this.btnCurrDeviceName.GetTextWidth() > this.btnCollectIcon.X)
+            {
+                //閲嶆柊璁$畻瀹藉害
+                this.btnCurrDeviceName.Width = this.btnCollectIcon.X + Application.GetRealWidth(-10);
+            }
+            this.btnCurrDeviceRoom.Width = this.btnCurrDeviceRoom.GetTextWidth();
+            if (this.btnCurrDeviceRoom.GetTextWidth() > this.btnCollectIcon.X)
+            {
+                //閲嶆柊璁$畻瀹藉害
+                this.btnCurrDeviceRoom.Width = this.btnCollectIcon.X + Application.GetRealWidth(-20 - 10);
+            }
+            this.cellFrame.X = this.btnCurrDeviceRoom.Right + Application.GetRealWidth(20);
+        }
+
     }
     /// <summary>
     /// 鑷繁寮勪竴涓狥rameLayout
@@ -405,7 +421,7 @@
             TextID = StringId.dangqianmenweiguan,
             TextSize = TextSize.Text12,
             TextColor = MusicColor.TextCancelColor,
-            TextAlignment=TextAlignment.Center,
+            TextAlignment = TextAlignment.Center,
             Gravity = Gravity.CenterHorizontal,
             Name = "btnStateText"
         };
@@ -492,6 +508,6 @@
 
 
     }
-   
+
 
 }

--
Gitblit v1.8.0