HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-09-01 dee21bf452a8979d0515d13e534fbb69ed9715dd
ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs
@@ -318,35 +318,31 @@
                        Send.dictionary(brightnessDictionary, "Data2", "0");
                        Button seekIconBtn = new Button
                        {
                            Y = Application.GetRealHeight(140 + 154),
                            Y = Application.GetRealHeight(140 + 160),
                            X = Application.GetRealWidth(78),
                            Height = Application.GetRealHeight(12),
                            Width = Application.GetRealWidth(918),
                            Width = Application.GetRealWidth(918 - 120),
                            UnSelectedImagePath = "ZigeeLogic/seek.png",
                            Gravity = Gravity.CenterHorizontal
                        };
                        completeView.Show(2).AddChidren(seekIconBtn);
                        var horizontalSeekBarVol = new DiyImageSeekBar
                        var horizontalSeekBarVol = new UserCenter.SeekBarControl(918)
                        {
                            Y = Application.GetRealHeight(140),
                            X = Application.GetRealWidth(78),
                            Width = Application.GetRealWidth(918),
                            Height = Application.GetRealHeight(320),//滑动条父控件高度
                            IsProgressTextShow = true,//显示百分比
                            IsClickable = true,//进度条是否滑动
                            ProgressBarColor = 0x00000000,// ZigbeeColor.Current.LogicProgressColorSelected,//选中进度条颜色
                            SeekBarBackgroundColor = 0x00000000,
                            ThumbImagePath = "ZigeeLogic/progressbtn2.png",//进度条按钮图标
                            ThumbImageHeight = Application.GetRealHeight(89),//进度条按钮图标的高度(默认正方形:宽和高一样)
                            ProgressTextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                            ProgressTextSize = 9,//显示百分比字体大小12
                            SeekBarViewHeight = Application.GetRealHeight(12),//进度条的高度10
                            SeekBarViewHeight = Application.GetRealHeight(20),
                            SeekBarPadding = Application.GetRealWidth(60),
                            MinValue = 30,
                            MaxValue = 60,
                            ProgressBarUnitSring = "K",//切换单位
                            ProgressChangeDelayTime = 0,
                        };
                        completeView.Show(2).AddChidren(horizontalSeekBarVol);
                        horizontalSeekBarVol.Y = seekIconBtn.Y - (horizontalSeekBarVol.Height - seekIconBtn.Height) / 2;
                        horizontalSeekBarVol.ShowCustomTextView(Application.GetRealWidth(200), 12, ZigbeeColor.Current.LogicBtnCancelColor);
                        EventHandler<int> progressclick = (sender, e) =>
                        {
                            horizontalSeekBarVol.SetCustomText(e * 100 + "K");
                            selectedDeviceStatus = "8";
                            var lightbrightnessvalue = 1000000 / (100 * horizontalSeekBarVol.Progress);
                            Send.dictionary(brightnessDictionary, "Data1", lightbrightnessvalue.ToString());
@@ -355,7 +351,6 @@
                        };
                        horizontalSeekBarVol.OnProgressChangedEvent += progressclick;
                        horizontalSeekBarVol.OnStopTrackingTouchEvent += progressclick;
                        if (TaskList != null && TaskList.Count != 0)
                        {
@@ -366,11 +361,15 @@
                                    var intvalue = int.Parse(value["Data1"]);
                                    var lightbrightnessvalue = 1000000 / (intvalue * 100);
                                    horizontalSeekBarVol.Progress = lightbrightnessvalue;
                                    break;
                                }
                            }
                        }
                        var intValue = horizontalSeekBarVol.Progress;
                        if (intValue == 0) { intValue = 30; }
                        horizontalSeekBarVol.SetCustomText(intValue * 100 + "K");
                    }
                    break;
                case "蜂鸣器":