HDL Home App 第二版本 旧平台金堂用 正在使用
hxb
2022-08-30 25429f085093d89d543a0b90e30d0d62d1b7dac9
ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorDimmingModeForm.cs
@@ -92,9 +92,9 @@
            {
                listSelect.Add(i + "%");
            }
            //让它处于10的整倍数
            this.pirConfigure.dimmerLevel = (this.pirConfigure.dimmerLevel / 10) * 10;
            int index = listSelect.IndexOf(this.pirConfigure.dimmerLevel + "%");
            //这个百分比的值,直接算
            int persentValue = HdlDeviceCommonLogic.Current.CalculateLightLevelPersent(this.pirConfigure.dimmerLevel);
            int index = listSelect.IndexOf(persentValue + "%");
            //开灯亮度
            var row1 = new FrameRowControl(listView.rowSpace / 2);
@@ -102,14 +102,17 @@
            var btnCaption1 = row1.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uTurnOnBrightness), 400);
            btnCaption1.TextSize = 15;
            row1.AddRightArrow();
            var btnStatu = row1.AddMostRightView(pirConfigure.dimmerLevel + "%", 400);
            var btnStatu = row1.AddMostRightView(persentValue + "%", 400);
            row1.AddBottomLine();
            row1.ButtonClickEvent += (sender, e) =>
            {
                PickerView.Show(listSelect, (value) =>
                {
                    btnStatu.Text = listSelect[value];
                    pirConfigure.dimmerLevel = Convert.ToInt32(listSelect[value].Replace("%", string.Empty));
                    string myValue = listSelect[value].Replace("%", string.Empty);
                    pirConfigure.dimmerLevel = HdlDeviceCommonLogic.Current.CalculateLightLevel(Convert.ToDecimal(myValue));
                    index = value;
                }, index == -1 ? 0 : index, Language.StringByID(R.MyInternationalizationString.uBrightness),
                Language.StringByID(R.MyInternationalizationString.uFinish),