From b02e8275a21dc06bf54b66273485d44e007a2616 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期一, 20 七月 2020 14:50:17 +0800 Subject: [PATCH] 新代码 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBrightnessAdjustForm.cs | 103 ++++++++++++++++++++------------------------------- 1 files changed, 41 insertions(+), 62 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBrightnessAdjustForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBrightnessAdjustForm.cs old mode 100755 new mode 100644 index ce40ff6..c9950a5 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBrightnessAdjustForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBrightnessAdjustForm.cs @@ -321,17 +321,17 @@ btnLevelView.Y = Application.GetRealHeight(54); btnLevelView.Gravity = Gravity.CenterVertical; btnLevelView.TextID = R.MyInternationalizationString.BackgroundLightColor; - frameBack.AddChidren(btnLevelView); - + frameBack.AddChidren(btnLevelView); + var frameColor = new FrameLayoutStatuControl(); frameColor.UseClickStatu = false; frameColor.Width = Application.GetRealHeight(262); frameColor.Height = this.GetPictrueRealSize(79); - frameColor.Gravity = Gravity.CenterVertical; - frameColor.X = frameBack.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262); - frameBack.AddChidren(frameColor); - - //棰滆壊 + 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; btnColorView.TextAlignment = TextAlignment.CenterRight; @@ -344,24 +344,28 @@ int R1 = Convert.ToInt32(this.keyColorData.OpenColorR, 16); int G1 = Convert.ToInt32(this.keyColorData.OpenColorG, 16); int B1 = Convert.ToInt32(this.keyColorData.OpenColorB, 16); - uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1); + uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1); + + //棰滆壊澶栨 + 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 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 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); + var btnRight = new NormalViewControl(this.GetPictrueRealSize(58), this.GetPictrueRealSize(58), false); btnRight.UnSelectedImagePath = "Item/RightNext.png"; btnRight.Y = Application.GetRealHeight(5); @@ -371,49 +375,24 @@ frameColor.ButtonClickEvent += (sender, e) => { - PanelColor(btnColor, R1, G1, B1); - }; - btnColorView.ButtonClickEvent += (sender, e) => - { - PanelColor(btnColor, R1, G1, B1); - }; - btnColor.ButtonClickEvent += (sender, e) => - { - PanelColor(btnColor, R1, G1, B1); - }; - btnColorLine.ButtonClickEvent += (sender, e) => - { - PanelColor(btnColor, R1, G1, B1); - }; - btnRight.ButtonClickEvent += (sender, e) => - { - PanelColor(btnColor, R1, G1, B1); - }; - } + var form = new PanelColorSelectForm(); + form.AddForm(R1, G1, B1); + form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) => + { + R1 = Rcolor; + G1 = Gcolor; + B1 = Bcolor; - /// <summary> - /// PanelColorSelectForm - /// </summary> - private void PanelColor(NormalViewControl btnColor, int R1, int G1, int B1) - { - var form = new PanelColorSelectForm(); - form.AddForm(R1, G1, B1); - form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) => - { - R1 = Rcolor; - G1 = Gcolor; - B1 = Bcolor; + this.keyColorData.OpenColorR = Convert.ToString(Rcolor, 16); + this.keyColorData.OpenColorG = Convert.ToString(Gcolor, 16); + this.keyColorData.OpenColorB = Convert.ToString(Bcolor, 16); - this.keyColorData.OpenColorR = Convert.ToString(Rcolor, 16); - this.keyColorData.OpenColorG = Convert.ToString(Gcolor, 16); - this.keyColorData.OpenColorB = Convert.ToString(Bcolor, 16); - - btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor); + btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor); + }; }; - } - + } #endregion - + #region 鈻� 鑺傝兘妯″紡琛宊________________________ /// <summary> /// 娣诲姞鑺傝兘妯″紡琛� @@ -635,7 +614,7 @@ var form = new BottomItemSelectForm(); form.CancelCallEvent = false;//鍏佽鍙栨秷 - form.AddForm(title, listText, nowSelectNo); + form.AddForm(title, listText, null, nowSelectNo); form.FinishSelectEvent += (selectNo) => { if (selectNo == nowSelectNo) -- Gitblit v1.8.0