黄学彪
2020-01-06 72be4f06a683de33ddd563c8447c39f7f17e5b7d
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传感器的【lux值】
                    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);