黄学彪
2020-07-13 f3e65daca7978b21b5888f49b1bf35e1a6e5d4fd
ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceMiniLightDetailCardForm.cs
@@ -123,7 +123,7 @@
            btnColorBack.X = Application.GetRealWidth(266);
            btnColorBack.Y = btnColorView.Y + btnColorView.Height / 2 - HdlControlLogic.Current.GetPictrueRealSize(20) / 2;
            frameWhiteBack.AddChidren(btnColorBack);
            //进度条(+60的偏移量,色温的范围是 3400~6000)
            //进度条(+60的偏移量,色温的范围是 3000~6000)
            this.seekBarColor = new SeekBarControl(611 + 120);
            seekBarColor.Y = btnLightLine.Bottom + Application.GetRealHeight(58);
            seekBarColor.X = Application.GetRealWidth(266 - 60);
@@ -137,12 +137,12 @@
            seekBarColor.ProgressTextColor = UserCenterColor.Current.TextGrayColor2;
            seekBarColor.Gravity = Gravity.Frame;
            seekBarColor.ProgressBarUnitSring = "K";
            seekBarColor.MinValue = 34;
            seekBarColor.MinValue = 30;
            seekBarColor.MaxValue = 60;
            frameWhiteBack.AddChidren(seekBarColor);
            //设置初始值
            int colorValue = ((ColorTemperatureLight)this.device).ColorTemperature;
            if (colorValue == 0) { colorValue = 3400; }
            if (colorValue == 0) { colorValue = 3000; }
            seekBarColor.Progress = colorValue / 100;
            //蜂鸣器开关:
@@ -288,7 +288,8 @@
                    if (nowColorValue != oldColorValue)
                    {
                        oldColorValue = nowColorValue;
                        ((ColorTemperatureLight)this.device).SetColorTemperature(oldColorValue * 100);
                        int value = 1000000 / (oldColorValue * 100);
                        ((ColorTemperatureLight)this.device).SetColorTemperature(value);
                    }
                }
                if (this.canSetProgressValue == true)
@@ -302,7 +303,8 @@
                    if (nowColorValue != oldColorValue)
                    {
                        //发送色温值
                        ((ColorTemperatureLight)this.device).SetColorTemperature(nowColorValue * 100);
                        int value = 1000000 / (nowColorValue * 100);
                        ((ColorTemperatureLight)this.device).SetColorTemperature(value);
                    }
                }
            });