gxc
2020-01-10 c0021397eeb8335d6d1f20990c71533c3d94e7af
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传感器的【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);
@@ -588,15 +606,6 @@
        #endregion
        #region ■ 一般方法___________________________
        /// <summary>
        /// 界面关闭
        /// </summary>
        public override void CloseFormBefore()
        {
            UserView.HomePage.Instance.ScrollEnabled = true;
            base.CloseFormBefore();
        }
        #endregion
    }