黄学彪
2020-04-28 e22fdb94322e6cec38e5e4a9aec13d431a133fde
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
@@ -152,12 +152,22 @@
            frameBack.AddChidren(seekBar1);
            seekBar1.ProgressChangedEvent += (div, value) =>
            {
                if (value == 0)
                {
                    btnProgress1.Text = (value + 1).ToString();
                }
                else
                {
                btnProgress1.Text = value.ToString();
                }
                switch (value)
                {
                    case 0:
                    case 1:
                        linghtLevelInfo.panelDirectionsLevel = 20;
                        btnLevel.Text = "1" + strRank;
                        break;
                    case 2:
                        linghtLevelInfo.panelDirectionsLevel = 40;
@@ -175,14 +185,22 @@
                        linghtLevelInfo.panelDirectionsLevel = 100;
                        btnLevel.Text = "5" + strRank;
                        break;
                    default:
                        linghtLevelInfo.panelDirectionsLevel = 0;
                        btnLevel.Text = "0" + strRank;
                        break;
                }
            };
            if (linghtLevelInfo.panelDirectionsLevel <= 20 && linghtLevelInfo.panelDirectionsLevel > 0)
            seekBar1.OnStopTrackingTouchEvent += (div, value) =>
            {
                if (value == 0)
                {
                    seekBar1.Progress = 1;
                }
                else
                {
                    seekBar1.Progress = value;
                }
            };
            if (linghtLevelInfo.panelDirectionsLevel <= 20 && linghtLevelInfo.panelDirectionsLevel >= 0)
            {
                btnLevel.Text = "1" + strRank;
                btnProgress1.Text = "1";
@@ -214,9 +232,9 @@
            }
            else
            {
                btnLevel.Text = "0" + strRank;
                btnProgress1.Text = "0";
                seekBar1.Progress = 0;
                btnLevel.Text = "1" + strRank;
                btnProgress1.Text = "1";
                seekBar1.Progress = 1;
            }
            var btnTemp1 = new NormalViewControl(200, 50, true);
@@ -224,7 +242,7 @@
            btnTemp1.Y = Application.GetRealHeight(322);
            btnTemp1.TextSize = 12;
            btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3;
            btnTemp1.Text = "0";
            btnTemp1.Text = "1";
            frameBack.AddChidren(btnTemp1);
            var btnTemp2 = new NormalViewControl(100, 50, true);
@@ -306,15 +324,15 @@
            btnTemp2.Text = "100%";
            frameBack.AddChidren(btnTemp2);
            var frameColor = new FrameLayoutControl();
            var frameColor = new FrameLayoutStatuControl();
            frameColor.UseClickStatu = false;
            frameColor.Width = Application.GetRealHeight(262);
            frameColor.Height = Application.GetMinRealAverage(79);
            frameColor.Height = this.GetPictrueRealSize(79);
            frameColor.Y = Application.GetRealHeight(26);
            frameColor.X = frameBack.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262);
            frameBack.AddChidren(frameColor);
            //颜色
            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), Application.GetMinRealAverage(50), false);
            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(50), false);
            btnColorView.Gravity = Gravity.CenterVertical;
            btnColorView.TextAlignment = TextAlignment.CenterRight;
            btnColorView.TextSize = 12;
@@ -329,29 +347,29 @@
            uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
            //颜色外框
            var btnColorLine = new NormalViewControl(Application.GetMinRealAverage(79), Application.GetMinRealAverage(79), false);
            var btnColorLine = new NormalViewControl(this.GetPictrueRealSize(79), this.GetPictrueRealSize(79), false);
            btnColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
            btnColorLine.Radius = (uint)Application.GetMinRealAverage(79) / 2;
            btnColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
            btnColorLine.BorderWidth = 1;
            btnColorLine.BorderColor = 0xff666666;
            frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEventOnly);
            var btnColor = new NormalViewControl(Application.GetMinRealAverage(69), Application.GetMinRealAverage(69), false);
            var btnColor = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(69), false);
            btnColor.Y = Application.GetRealHeight(5);
            btnColor.X = btnColorView.Right + Application.GetRealHeight(23);
            btnColor.Radius = (uint)Application.GetMinRealAverage(69) / 2;
            btnColor.Radius = (uint)this.GetPictrueRealSize(69) / 2;
            btnColor.BackgroundColor = UserCenterColor.Current.ErrorColor;
            frameColor.AddChidren(btnColor, ChidrenBindMode.BindEventOnly);
            //变更滑动条的颜色
            seekBar1.ProgressBarColor = backColor;
            var btnRight = new NormalViewControl(Application.GetMinRealAverage(58), Application.GetMinRealAverage(58), false);
            var btnRight = new NormalViewControl(this.GetPictrueRealSize(58), this.GetPictrueRealSize(58), false);
            btnRight.UnSelectedImagePath = "Item/RightNext.png";
            btnRight.Y = Application.GetRealHeight(5);
            btnRight.X = frameColor.Width - Application.GetMinRealAverage(58);
            btnRight.X = frameColor.Width - this.GetPictrueRealSize(58);
            frameColor.AddChidren(btnRight, ChidrenBindMode.BindEventOnly);
            btnRight.Y += Application.GetMinRealAverage(8);
            btnRight.Y += this.GetPictrueRealSize(8);
            frameColor.ButtonClickEvent += (sender, e) =>
            {
@@ -565,15 +583,15 @@
            this.ShowProgressBar();
            //节能模式修改(他们说随便一个回路就行)
            //设备同事说默认去1秒时间,这样接近感应功能才合理
            energyModeInfo.time = 1;
            //设备同事说新风面板默认60秒时间,这样接近感应功能才合理
            energyModeInfo.time = 60;
            var result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(panelDevice, energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
            if (result == false)
            {
                this.CloseProgressBar();
                return;
            }
            //接近感应(他们说随便一个回路就行)
            //接近感应(提供设备的同事说随便一个回路就行)
            result = await HdlDevicePanelLogic.Current.SetProximitySensorStatus(panelDevice, proximitySensorsInfo.enable);
            if (result == false)
            {