From 72be4f06a683de33ddd563c8447c39f7f17e5b7d Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 06 一月 2020 13:03:50 +0800
Subject: [PATCH] 合并代码

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetSettionForm.cs |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetSettionForm.cs
index dfd70e0..1e676e1 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetSettionForm.cs
@@ -94,11 +94,29 @@
             this.ClearBodyFrame();
 
             //褰撳墠浜害鍊�
+            string txtValue = Language.StringByID(R.MyInternationalizationString.uNowBrightnessValue);
             var frameNowLinght = new FrameRowControl();
             frameNowLinght.UseClickStatu = false;
             frameNowLinght.BackgroundColor = UserCenterColor.Current.White;
             bodyFrameLayout.AddChidren(frameNowLinght);
-            frameNowLinght.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uNowBrightnessValue) + "锛�" + pirLuxValue + "lux", 900);
+            var btnLux = frameNowLinght.AddLeftCaption(txtValue + "锛�" + pirLuxValue + "lux", 900);
+            HdlThreadLogic.Current.RunThread(async () =>
+            {
+                while (this.Parent != null)
+                {
+                    //浠栦滑璇磋繖涓笢瑗胯2绉掑埛鏂颁竴娆�  鑾峰彇PIR浼犳劅鍣ㄧ殑銆恖ux鍊笺��
+                    this.pirLuxValue = await HdlDevicePirSensorLogic.Current.GetPirSensorLux(deviceIASZone, ShowErrorMode.NO);
+                    if (pirLuxValue != -1)
+                    {
+                        HdlThreadLogic.Current.RunMain(() =>
+                        {
+                            btnLux.Text = txtValue + "锛�" + pirLuxValue + "lux";
+                        }, ShowErrorMode.NO);
+                    }
+                    await Task.Delay(2000);
+                }
+            }, ShowErrorMode.NO);
+
 
             var listView = new VerticalListControl(0);
             listView.Y = Application.GetRealHeight(150);

--
Gitblit v1.8.0