| | |
| | | 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);
|
| | |
| | | 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;
|
| | |
|
| | | //蜂鸣器开关:
|
| | |
| | | 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)
|
| | |
| | | if (nowColorValue != oldColorValue)
|
| | | {
|
| | | //发送色温值
|
| | | ((ColorTemperatureLight)this.device).SetColorTemperature(nowColorValue * 100);
|
| | | int value = 1000000 / (nowColorValue * 100);
|
| | | ((ColorTemperatureLight)this.device).SetColorTemperature(value);
|
| | | }
|
| | | }
|
| | | });
|