| | |
| | | frameWhiteBack.AddChidren(btnColorBack);
|
| | | //进度条(+60的偏移量,色温的范围是 3000~6000)
|
| | | this.seekBarColor = new SeekBarControl(611 + 120);
|
| | | seekBarColor.Y = btnLightLine.Bottom + Application.GetRealHeight(58);
|
| | | seekBarColor.Y = btnLightLine.Bottom + Application.GetRealHeight(88);
|
| | | seekBarColor.X = Application.GetRealWidth(266 - 60);
|
| | | seekBarColor.Height = Application.GetRealHeight(144);
|
| | | seekBarColor.SeekBarViewHeight = Application.GetRealHeight(20);
|
| | | seekBarColor.SeekBarPadding = Application.GetRealWidth(60);
|
| | | seekBarColor.IsProgressTextShow = true;
|
| | | seekBarColor.ProgressBarColor = UserCenterColor.Current.Transparent;
|
| | | seekBarColor.ProgressBarUnEnableColor = UserCenterColor.Current.Transparent;
|
| | | seekBarColor.SeekBarBackgroundColor = UserCenterColor.Current.Transparent;
|
| | | seekBarColor.ProgressTextSize = 14;
|
| | | seekBarColor.ProgressTextColor = UserCenterColor.Current.TextGrayColor2;
|
| | | seekBarColor.Gravity = Gravity.Frame;
|
| | | seekBarColor.ProgressBarUnitSring = "K";
|
| | | seekBarColor.MinValue = 30;
|
| | | seekBarColor.MaxValue = 60;
|
| | | seekBarColor.ProgressChangeDelayTime = 0;
|
| | | frameWhiteBack.AddChidren(seekBarColor);
|
| | | //显示自定义文本
|
| | | seekBarColor.ShowCustomTextView(Application.GetRealWidth(150), 15, UserCenterColor.Current.TextGrayColor3);
|
| | | //设置初始值
|
| | | int colorValue = ((ColorTemperatureLight)this.device).ColorTemperature;
|
| | | if (colorValue == 0) { colorValue = 3000; }
|
| | | seekBarColor.Progress = colorValue / 100;
|
| | | seekBarColor.SetCustomText(seekBarColor.Progress * 100 + "K");
|
| | |
|
| | | //蜂鸣器开关:
|
| | | var btnBuzzerView = new NormalViewControl(300, 60, true);
|
| | |
| | | int nowColorValue = oldColorValue;//变更的值
|
| | | seekBarColor.OnProgressChangedEvent += (sender, value) =>
|
| | | {
|
| | | //设置自定义的文本
|
| | | seekBarColor.SetCustomText(value * 100 + "K");
|
| | | if (Common.Config.Instance.Home.IsVirtually == false)
|
| | | {
|
| | | if (this.canSetProgressValue == true)
|
| | |
| | | {
|
| | | //当进度值在手动变更中时,不接收推送
|
| | | seekBarColor.Progress = (int)(((ColorTemperatureLight)this.device).ColorTemperature / 100);
|
| | | //设置自定义的文本
|
| | | seekBarColor.SetCustomText(seekBarColor.Progress * 100 + "K");
|
| | | }
|
| | | if (this.btnMiniSwitch.IsSelected == false)
|
| | | {
|