From 627093aca723d4bfb971b97c828e8b3a22dbda78 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 17 七月 2020 17:26:19 +0800
Subject: [PATCH] 2020-07-17-1
---
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs | 79 +++++++++++++++++++++++++--------------
1 files changed, 50 insertions(+), 29 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
index 248ffea..45d82b8 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
@@ -70,6 +70,7 @@
listview = new VerticalScrolViewLayout();
listview.Height = Application.GetRealHeight(1981 - 184);
bodyFrameLayout.AddChidren(listview);
+ listview.ScrollEnabled = false;
HdlThreadLogic.Current.RunMain(() =>
{
@@ -79,10 +80,8 @@
//娣诲姞灞忓箷浜害绾у埆鎺т欢
this.AddScreenBrightnesLevelControl();
- //娣诲姞鑳屽厜鐏寒搴︽帶浠躲�愭殏鏃朵笉闇�瑕侊紝鍙兘鍚庢湡鏂伴闈㈡澘鐨勮繖涓鑹茶琛ュ洖鏉ャ��
- this.AddBackLightControl();
- //銆愭殏鏃朵笉闇�瑕侊紝鍙兘鍚庢湡鏂伴闈㈡澘鐨勮繖涓鑹茶琛ュ洖鏉ャ��
- //this.FinishInitControl(listview, energyModeInfo.enable);
+ //娣诲姞鏂伴闈㈡澘鐨勯鑹�
+ this.AddColorControl();
//淇濆瓨
var btnSave = new BottomClickButton();
@@ -262,7 +261,7 @@
/// <summary>
/// 娣诲姞鑳屽厜棰滆壊鎺т欢
/// </summary>
- private void AddBackLightControl()
+ private void AddColorControl()
{
var btnEspace = new NormalViewControl(600, 58, true);
btnEspace.X = ControlCommonResourse.XXLeft;
@@ -299,7 +298,7 @@
btnColorView.Y = Application.GetRealHeight(5);
btnColorView.TextColor = UserCenterColor.Current.TextGrayColor1;
btnColorView.TextID = R.MyInternationalizationString.uColor;
- frameColor.AddChidren(btnColorView, ChidrenBindMode.BindEventOnly);
+ frameColor.AddChidren(btnColorView, ChidrenBindMode.BindEvent);
int R1 = Convert.ToInt32(this.keyColorData.OpenColorR, 16);
int G1 = Convert.ToInt32(this.keyColorData.OpenColorG, 16);
@@ -314,37 +313,61 @@
btnColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
btnColorLine.BorderWidth = 1;
btnColorLine.BorderColor = 0xffcccccc;
- frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEventOnly);
+ frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEvent);
var btnColor = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(69), false);
btnColor.Gravity = Gravity.Center;
btnColor.Radius = (uint)this.GetPictrueRealSize(69) / 2;
btnColor.BackgroundColor = backColor;
- btnColorLine.AddChidren(btnColor, ChidrenBindMode.BindEventOnly);
+ btnColorLine.AddChidren(btnColor, ChidrenBindMode.BindEvent);
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 - this.GetPictrueRealSize(58);
- frameColor.AddChidren(btnRight, ChidrenBindMode.BindEventOnly);
+ frameColor.AddChidren(btnRight, ChidrenBindMode.BindEvent);
btnRight.Y += this.GetPictrueRealSize(8);
frameColor.ButtonClickEvent += (sender, e) =>
{
- var form = new PanelColorSelectForm();
- form.AddForm(R1, G1, B1);
- form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
- {
- R1 = Rcolor;
- G1 = Gcolor;
- B1 = Bcolor;
+ 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);
+ };
+ }
- this.keyColorData.OpenColorR = Convert.ToString(Rcolor, 16);
- this.keyColorData.OpenColorG = Convert.ToString(Gcolor, 16);
- this.keyColorData.OpenColorB = Convert.ToString(Bcolor, 16);
+ /// <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;
- btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
- };
+ 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);
};
}
@@ -382,8 +405,6 @@
{
frameBack.Height -= value;
}
- //瀹瑰櫒琛ュ厖
- this.FinishInitControl(listview, energyModeInfo.enable);
};
if (energyModeInfo.enable == true)
{
@@ -491,7 +512,7 @@
//寮�鍚繘搴︽潯
this.ShowProgressBar();
//浜害璋冭妭(浠栦滑璇撮殢渚挎嬁涓�璺洖璺氨琛屼簡)
- linghtLevelInfo = await HdlDevicePanelLogic.Current.GetDeviceLightSettion(panelDevice);
+ linghtLevelInfo = HdlDevicePanelLogic.Current.GetDeviceLightSettion(panelDevice);
if (linghtLevelInfo == null)
{
//鍏抽棴杩涘害鏉�
@@ -507,14 +528,14 @@
return false;
}
//鑺傝兘妯″紡(浠栦滑璇撮殢渚挎嬁涓�璺洖璺氨琛屼簡)
- energyModeInfo = await HdlDevicePanelLogic.Current.GetDeviceEnergyConservationMode(panelDevice);
+ energyModeInfo = HdlDevicePanelLogic.Current.GetDeviceEnergyConservationMode(panelDevice);
if (energyModeInfo == null)
{
//鍏抽棴杩涘害鏉�
this.CloseProgressBar(ShowReLoadMode.YES);
return false;
}
- keyColorData = await HdlDevicePanelLogic.Current.GetPanelEpointColorInfo(panelDevice);
+ keyColorData = HdlDevicePanelLogic.Current.GetPanelColorInfo(panelDevice);
if (this.keyColorData == null)
{
//鍏抽棴杩涘害鏉�
@@ -541,7 +562,7 @@
//鑺傝兘妯″紡淇敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�)
//璁惧鍚屼簨璇存柊椋庨潰鏉块粯璁�60绉掓椂闂达紝杩欐牱鎺ヨ繎鎰熷簲鍔熻兘鎵嶅悎鐞�
energyModeInfo.time = 60;
- var result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(panelDevice, energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
+ var result = HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(panelDevice, energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
if (result == false)
{
this.CloseProgressBar();
@@ -556,7 +577,7 @@
}
//浜害璋冭妭鏇存敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�)
- result = await HdlDevicePanelLogic.Current.SetDeviceLightSettion(panelDevice, linghtLevelInfo.panelDirectionsLevel, linghtLevelInfo.panelBacklightLevel);
+ result = HdlDevicePanelLogic.Current.SetDeviceLightSettion(panelDevice, linghtLevelInfo.panelDirectionsLevel, linghtLevelInfo.panelBacklightLevel);
if (result == false)
{
this.CloseProgressBar();
@@ -564,7 +585,7 @@
}
//璁剧疆鎸夐敭闈㈡澘棰滆壊鐨勪俊鎭�
- result = await HdlDevicePanelLogic.Current.SetPanelColorInfo(panelDevice, this.keyColorData);
+ result = HdlDevicePanelLogic.Current.SetPanelColorInfo(panelDevice, this.keyColorData);
this.CloseProgressBar();
if (result == false)
{
--
Gitblit v1.8.0