From 136b9e2fc48249a5ff89874f1080ba94130e7a9e Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期二, 19 五月 2020 11:12:29 +0800 Subject: [PATCH] Merge branch 'dev-tzy' into dev-2020xm --- ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs | 51 +++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 37 insertions(+), 14 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs index 12b1007..08f7d8c 100644 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs @@ -7,7 +7,7 @@ { public class PanelBackLighWithSensorForm : EditorCommonForm { - #region 鈻� 鍙橀噺澹版槑___________________________ + #region 鈻� 鍙橀噺澹版槑___________________________ /// <summary> /// 鍒楄〃鎺т欢 /// </summary> @@ -102,7 +102,7 @@ #endregion - #region 鈻� 鑺傝兘妯″紡琛宊________________________ + #region 鈻� 鑺傝兘妯″紡琛宊________________________ /// <summary> /// 娣诲姞鑺傝兘妯″紡琛� /// </summary> @@ -322,7 +322,7 @@ int B1 = Convert.ToInt32(this.keyColorData.CloseColorB, 16); uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1); - //棰滆壊澶栨 + //棰滆壊澶栨 var btnColorLine = new FrameLayoutStatuControl(); btnColorLine.Width = Application.GetRealHeight(79); btnColorLine.Height = this.GetPictrueRealSize(79); @@ -351,22 +351,45 @@ 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); + form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) => + { + R1 = Rcolor; + G1 = Gcolor; + B1 = Bcolor; + + this.keyColorData.CloseColorR = Convert.ToString(Rcolor, 16); + this.keyColorData.CloseColorG = Convert.ToString(Gcolor, 16); + this.keyColorData.CloseColorB = Convert.ToString(Bcolor, 16); + + btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor); + //鍙樻洿婊戝姩鏉$殑棰滆壊 + seekBar1.ProgressBarColor = btnColor.BackgroundColor; }; } @@ -513,24 +536,24 @@ 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); }; - } + } #endregion #region 鈻� 鑾峰彇鍒濆鏁版嵁_______________________ @@ -627,7 +650,7 @@ #endregion - #region 鈻� 琛ュ厖瀹瑰櫒___________________________ + #region 鈻� 琛ュ厖瀹瑰櫒___________________________ /// <summary> /// 琛屾暟瓒呰繃瀹瑰櫒鏃讹紝琛ヤ竴涓┖鐧紽rameLayout锛屼娇涔嬭兘婊戝姩 /// </summary> @@ -666,6 +689,6 @@ return (uint)(0xFF000000 + R * 256 * 256 + G * 256 + B); } - #endregion + #endregion } } -- Gitblit v1.8.0