From 7e863a33397f317ffc3ffd9288496d0e4f16aa66 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 12 十二月 2019 14:58:20 +0800 Subject: [PATCH] 合并了新代码 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs | 52 +++++++++++++++++++++------------------------------- 1 files changed, 21 insertions(+), 31 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs index a7e1804..9425bde 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs @@ -155,23 +155,17 @@ frameBack.AddChidren(btnProgress1); //杩涘害鏉� - var seekBar1 = new HorizontalSeekBar(); + var seekBar1 = new SeekBarControl(); seekBar1.Y = Application.GetRealHeight(253); - seekBar1.Gravity = Gravity.CenterHorizontal; - seekBar1.Width = Application.GetRealWidth(962); - seekBar1.Height = Application.GetRealHeight(81); - seekBar1.Max = 100; - seekBar1.BackgroundColor = 0xfff5f5f5; - seekBar1.ThumbColor = Common.ZigbeeColor.Current.GXCButtonBlueColor; - seekBar1.ProgressColor = 0xff3e99f4; - seekBar1.Progress = energyModeInfo.level; + seekBar1.ProgressBarColor = 0xff3e99f4; frameBack.AddChidren(seekBar1); - seekBar1.ProgressChanged += (sender, value) => + seekBar1.ProgressChangedEvent += (div, value) => { btnProgress1.Text = value + "%"; //鏁版嵁鍙樻洿 energyModeInfo.level = value; }; + seekBar1.Progress = energyModeInfo.level; var btnTemp1 = new NormalViewControl(200, 49, true); btnTemp1.X = ControlCommonResourse.XXLeft; @@ -240,23 +234,16 @@ frameBack.AddChidren(btnProgress1); //杩涘害鏉� - var seekBar1 = new HorizontalSeekBar(); + var seekBar1 = new SeekBarControl(); seekBar1.Y = Application.GetRealHeight(147); - seekBar1.Gravity = Gravity.CenterHorizontal; - seekBar1.Width = Application.GetRealWidth(962); - seekBar1.Height = Application.GetRealHeight(81); - seekBar1.Max = 100; - seekBar1.BackgroundColor = 0xfff5f5f5; - seekBar1.ThumbColor = Common.ZigbeeColor.Current.GXCButtonBlueColor; - seekBar1.ProgressColor = 0xfffdb500; - seekBar1.Progress = linghtLevelInfo.panelDirectionsLevel; frameBack.AddChidren(seekBar1); - seekBar1.ProgressChanged += (sender, value) => + seekBar1.ProgressChangedEvent += (div, value) => { btnProgress1.Text = value + "%"; //鏁版嵁鍙樻洿 linghtLevelInfo.panelDirectionsLevel = value; }; + seekBar1.Progress = linghtLevelInfo.panelDirectionsLevel; var btnTemp1 = new NormalViewControl(200, 49, true); btnTemp1.X = ControlCommonResourse.XXLeft; @@ -301,6 +288,9 @@ btnColor.BackgroundColor = backColor; frameColor.AddChidren(btnColor, ChidrenBindMode.BindEventOnly); + //鍙樻洿婊戝姩鏉$殑棰滆壊 + seekBar1.ProgressBarColor = backColor; + var btnRight = new NormalViewControl(Application.GetMinRealAverage(58), Application.GetMinRealAverage(58), false); btnRight.UnSelectedImagePath = "Item/Next.png"; btnRight.X = frameColor.Width - Application.GetMinRealAverage(58); @@ -322,6 +312,8 @@ this.keyColorData.CloseColorB = Convert.ToString(Bcolor, 16); btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor); + //鍙樻洿婊戝姩鏉$殑棰滆壊 + seekBar1.ProgressBarColor = btnColor.BackgroundColor; }; }; } @@ -367,23 +359,16 @@ frameBack.AddChidren(btnProgress1); //杩涘害鏉� - var seekBar1 = new HorizontalSeekBar(); + var seekBar1 = new SeekBarControl(); seekBar1.Y = Application.GetRealHeight(147); - seekBar1.Gravity = Gravity.CenterHorizontal; - seekBar1.Width = Application.GetRealWidth(962); - seekBar1.Height = Application.GetRealHeight(81); - seekBar1.Max = 100; - seekBar1.BackgroundColor = 0xfff5f5f5; - seekBar1.ThumbColor = Common.ZigbeeColor.Current.GXCButtonBlueColor; - seekBar1.ProgressColor = 0xff2b62fd; - seekBar1.Progress = linghtLevelInfo.panelBacklightLevel; frameBack.AddChidren(seekBar1); - seekBar1.ProgressChanged += (sender, value) => + seekBar1.ProgressChangedEvent += (div, value) => { btnProgress1.Text = value + "%"; //鏁版嵁鍙樻洿 linghtLevelInfo.panelBacklightLevel = value; }; + seekBar1.Progress = linghtLevelInfo.panelBacklightLevel; var btnTemp1 = new NormalViewControl(200, 49, true); btnTemp1.X = ControlCommonResourse.XXLeft; @@ -428,6 +413,9 @@ btnColor.BackgroundColor = backColor; frameColor.AddChidren(btnColor, ChidrenBindMode.BindEventOnly); + //鍙樻洿婊戝姩鏉$殑棰滆壊 + seekBar1.ProgressBarColor = backColor; + var btnRight = new NormalViewControl(Application.GetMinRealAverage(58), Application.GetMinRealAverage(58), false); btnRight.UnSelectedImagePath = "Item/Next.png"; btnRight.X = frameColor.Width - Application.GetMinRealAverage(58); @@ -448,7 +436,9 @@ 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); + //鍙樻洿婊戝姩鏉$殑棰滆壊 + seekBar1.ProgressBarColor = btnColor.BackgroundColor; }; }; } -- Gitblit v1.8.0