From f8343a2e765eefe10c8a0d6bdd6db65b0cf0321c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期六, 06 五月 2023 15:33:30 +0800
Subject: [PATCH] 灯光延时

---
 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs
index 409c93e..94be708 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs
@@ -216,15 +216,17 @@
             };
             cellFrame.AddChidren(btnCell);
 
+
 #if __IOS__
+//btnCell.Padding = new Padding(0,0,0,0);
             btnCell.Width += 5;
             cellFrame.Width += 5;
 #else
 #endif
 
 
-                        //闂ㄩ攣鐘舵��
-                        btnDoorLockIcon = new Button
+            //闂ㄩ攣鐘舵��
+            btnDoorLockIcon = new Button
             {
                 X = Application.GetRealWidth(65),
                 Y = Application.GetRealHeight(108),
@@ -320,10 +322,26 @@
                 btnCollectIcon.IsSelected = this.device.collect = !btnCollectIcon.IsSelected;
                 this.device.CollectFunction();
             };
+
+            int delayTimeMaxValue = 0;//
+            var startTime = DateTime.Now;
             //瀹炴椂瑙嗛
             this.rtvFL.SetClickListener((fl, btnStateImage, btnStateText) =>
             {
+                bool isDeyayClick = false;
+                var clickTime = DateTime.Now;
+                if ((clickTime - startTime).TotalMilliseconds > delayTimeMaxValue)
+                {
+                    delayTimeMaxValue = 2*1000;
+                    startTime = clickTime;
+                    isDeyayClick = true;
+                }
+                if (!isDeyayClick)
+                {
+                    return;
+                }
                 CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk, false);
+
             });
             //涓存椂瀵嗙爜
             this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) =>
@@ -377,7 +395,7 @@
         private void CalculatedPosition()
         {
             this.btnCurrDeviceName.Width = this.btnCurrDeviceName.GetTextWidth();
-            this.btnCurrDeviceName.Width += 10;
+            this.btnCurrDeviceName.Width += 10; 
             if (this.btnCurrDeviceName.GetTextWidth() > this.btnCollectIcon.X)
             {
                 //閲嶆柊璁$畻瀹藉害

--
Gitblit v1.8.0