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 | 113 +++++++++++++++++++++++---------------------------------
1 files changed, 46 insertions(+), 67 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 052c20c..c9950a5
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBrightnessAdjustForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBrightnessAdjustForm.cs
@@ -54,7 +54,7 @@
set { btnSleepTime.Text = value; }
}
/// <summary>
- ///鐫$湢鏃堕棿
+ ///鐫$湢鏃堕棿
/// </summary>
public NormalViewControl btnSleepTime = null;
#endregion
@@ -133,7 +133,7 @@
#endregion
- #region 鈻� 灞忓箷浜害绾у埆_______________________
+ #region 鈻� 灞忓箷浜害绾у埆_______________________
/// <summary>
/// 娣诲姞灞忓箷浜害绾у埆鎺т欢
/// </summary>
@@ -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,50 +375,25 @@
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 鈻� 鑺傝兘妯″紡琛宊________________________
+
+ #region 鈻� 鑺傝兘妯″紡琛宊________________________
/// <summary>
/// 娣诲姞鑺傝兘妯″紡琛�
/// </summary>
@@ -513,7 +492,7 @@
}
//娣诲姞鎺ヨ繎鎰熷簲
this.AddProximitySensorsRow(frameBack);
- //搴曠嚎
+ //搴曠嚎
var btnLine = new NormalViewControl(965, 5, true);
btnLine.Height = 1;
btnLine.X = Application.GetRealWidth(52);
@@ -619,7 +598,7 @@
};
}
- #region 鈻� 鏄剧ず閫夋嫨璁惧鐫$湢鏃堕棿_______________
+ #region 鈻� 鏄剧ず閫夋嫨璁惧鐫$湢鏃堕棿_______________
/// <summary>
/// 鏄剧ず閫夋嫨璁惧鐫$湢鏃堕棿鐨勭晫闈�
/// </summary>
@@ -747,7 +726,7 @@
}
#endregion
- #region 鈻� 琛ュ厖瀹瑰櫒___________________________
+ #region 鈻� 琛ュ厖瀹瑰櫒___________________________
/// <summary>
/// 琛屾暟瓒呰繃瀹瑰櫒鏃讹紝琛ヤ竴涓┖鐧紽rameLayout锛屼娇涔嬭兘婊戝姩
/// </summary>
--
Gitblit v1.8.0