xm
2020-07-20 b02e8275a21dc06bf54b66273485d44e007a2616
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs
old mode 100755 new mode 100644
@@ -449,20 +449,24 @@
            uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
            //颜色外框
            var btnColorLine = new FrameLayoutStatuControl();
            btnColorLine.Width = Application.GetRealHeight(79);
            btnColorLine.Height = this.GetPictrueRealSize(79);
            btnColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
            btnColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
            btnColorLine.BorderWidth = 1;
            btnColorLine.BorderColor = 0xffcccccc;
            frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEvent);
            var frameColorLine = new FrameLayoutStatuControl();
            frameColorLine.UseClickStatu = false;
            frameColorLine.Height = this.GetPictrueRealSize(79);
            frameColorLine.Width = this.GetPictrueRealSize(79);
            frameColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
            frameColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
            frameColorLine.BorderWidth = 1;
            frameColorLine.BorderColor = 0xffcccccc;
            frameColor.AddChidren(frameColorLine, ChidrenBindMode.NotBind);
            var btnColor = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(69), false);
            //分两步计算,不然有可能它得出的结果有误差导致不居中
            int btnColorWidth = frameColorLine.Height - this.GetPictrueRealSize(7) - this.GetPictrueRealSize(7);
            var btnColor = new NormalViewControl(btnColorWidth, btnColorWidth, false);
            btnColor.Gravity = Gravity.Center;
            btnColor.Radius = (uint)this.GetPictrueRealSize(69) / 2;
            btnColor.Radius = (uint)btnColorWidth / 2;
            btnColor.BackgroundColor = backColor;
            btnColorLine.AddChidren(btnColor, ChidrenBindMode.BindEvent);
            frameColorLine.AddChidren(btnColor, ChidrenBindMode.NotBind);
            frameColor.ChangedChidrenBindMode(frameColorLine, ChidrenBindMode.BindEvent);
            //变更滑动条的颜色
            seekBar1.ProgressBarColor = backColor;
@@ -475,31 +479,6 @@
            btnRight.Y += this.GetPictrueRealSize(8);
            frameColor.ButtonClickEvent += (sender, e) =>
            {
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnColorView.ButtonClickEvent += (sender, e) =>
            {
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnColor.ButtonClickEvent += (sender, e) =>
            {
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnColorLine.ButtonClickEvent += (sender, e) =>
            {
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnRight.ButtonClickEvent += (sender, e) =>
            {
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
        }
        /// <summary>
        /// PanelColorBefore
        /// </summary>
        private void PanelColor(NormalViewControl btnColor, SeekBarControl seekBar1, int R1, int G1, int B1)
        {
            var form = new PanelColorSelectForm();
            form.AddForm(R1, G1, B1);
@@ -516,6 +495,7 @@
                btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
                //变更滑动条的颜色
                seekBar1.ProgressBarColor = btnColor.BackgroundColor;
                };
            };
        }
@@ -536,6 +516,7 @@
            btnClick.TextColor = UserCenterColor.Current.TextGrayColor3;
            btnClick.TextID = R.MyInternationalizationString.uAfterClick;
            listview.AddChidren(btnClick);
            //背景
            var frameBack = new FrameLayout();
            frameBack.Y = Application.GetRealHeight(608);
@@ -594,7 +575,6 @@
            frameColor.Y = Application.GetRealHeight(26);
            frameColor.X = listview.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262);
            frameBack.AddChidren(frameColor);
            //颜色
            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(49), false);
            btnColorView.Gravity = Gravity.CenterVertical;
@@ -611,20 +591,24 @@
            uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
            //颜色外框
            var btnColorLine = new FrameLayoutStatuControl();
            btnColorLine.Width = Application.GetRealHeight(79);
            btnColorLine.Height = this.GetPictrueRealSize(79);
            btnColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
            btnColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
            btnColorLine.BorderWidth = 1;
            btnColorLine.BorderColor = 0xffcccccc;
            frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEvent);
            var frameColorLine = new FrameLayoutStatuControl();
            frameColorLine.UseClickStatu = false;
            frameColorLine.Height = this.GetPictrueRealSize(79);
            frameColorLine.Width = this.GetPictrueRealSize(79);
            frameColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
            frameColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
            frameColorLine.BorderWidth = 1;
            frameColorLine.BorderColor = 0xffcccccc;
            frameColor.AddChidren(frameColorLine, ChidrenBindMode.NotBind);
            var btnColor = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(69), false);
            //分两步计算,不然有可能它得出的结果有误差导致不居中
            int btnColorWidth = frameColorLine.Height - this.GetPictrueRealSize(7) - this.GetPictrueRealSize(7);
            var btnColor = new NormalViewControl(btnColorWidth, btnColorWidth, false);
            btnColor.Gravity = Gravity.Center;
            btnColor.Radius = (uint)this.GetPictrueRealSize(69) / 2;
            btnColor.Radius = (uint)btnColorWidth / 2;
            btnColor.BackgroundColor = backColor;
            btnColorLine.AddChidren(btnColor, ChidrenBindMode.BindEvent);
            frameColorLine.AddChidren(btnColor, ChidrenBindMode.NotBind);
            frameColor.ChangedChidrenBindMode(frameColorLine, ChidrenBindMode.BindEvent);
            //变更滑动条的颜色
            seekBar1.ProgressBarColor = backColor;
@@ -637,31 +621,6 @@
            btnRight.Y += this.GetPictrueRealSize(8);
            frameColor.ButtonClickEvent += (sender, e) =>
            {
                PanelAfterColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnColorView.ButtonClickEvent += (sender, e) =>
            {
                PanelAfterColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnColor.ButtonClickEvent += (sender, e) =>
            {
                PanelAfterColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnColorLine.ButtonClickEvent += (sender, e) =>
            {
                PanelAfterColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnRight.ButtonClickEvent += (sender, e) =>
            {
                PanelAfterColor(btnColor, seekBar1, R1, G1, B1);
            };
        }
        /// <summary>
        /// PanelColorBefore
        /// </summary>
        private void PanelAfterColor(NormalViewControl btnColor, SeekBarControl seekBar1, int R1, int G1, int B1)
        {
            var form = new PanelColorSelectForm();
            form.AddForm(R1, G1, B1);
@@ -679,6 +638,7 @@
                //变更滑动条的颜色
                seekBar1.ProgressBarColor = btnColor.BackgroundColor;
            };
            };
        }
        #endregion