From c0021397eeb8335d6d1f20990c71533c3d94e7af Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 10 一月 2020 17:02:38 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into DEV_GXC --- ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetSettionForm.cs | 31 ++++++++++++++++++++----------- 1 files changed, 20 insertions(+), 11 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetSettionForm.cs index dfd70e0..f1f280b 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetSettionForm.cs @@ -52,7 +52,7 @@ /// <param name="i_iasZone">浼犳劅鍣ㄨ澶�</param> public void ShowForm(IASZone i_iasZone) { - UserView.HomePage.Instance.ScrollEnabled = false; + this.ScrollEnabled = false; deviceIASZone = i_iasZone; //璁剧疆澶撮儴淇℃伅 @@ -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); @@ -588,15 +606,6 @@ #endregion #region 鈻� 涓�鑸柟娉昣__________________________ - - /// <summary> - /// 鐣岄潰鍏抽棴 - /// </summary> - public override void CloseFormBefore() - { - UserView.HomePage.Instance.ScrollEnabled = true; - base.CloseFormBefore(); - } #endregion } -- Gitblit v1.8.0