From a715181089be0d31cd737a5367ffd02690b9d77f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 12 十一月 2020 13:36:01 +0800 Subject: [PATCH] 20201112 --- HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 25 +++++++++++++++++++------ 1 files changed, 19 insertions(+), 6 deletions(-) diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs index dae34db..97d9500 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs @@ -9,7 +9,7 @@ public partial class FunctionControlZone : FrameLayout { #region 鍖哄煙鎺т欢 - FrameLayout bodyDiv; + static FrameLayout bodyDiv; /// <summary> /// 鍔熻兘/鍦烘櫙icon /// </summary> @@ -38,6 +38,7 @@ public FunctionControlZone(Function func) { bodyDiv = this; + bodyDiv.Tag = func.sid; function = func; } @@ -64,7 +65,18 @@ switch (function.functionCategory) { case FunctionCategory.Curtain: - btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainThinIcon.png"; + switch(function.functionType) + { + case FunctionType.Curtain: + btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainThinIcon.png"; + break; + case FunctionType.MotorCurtain: + btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/MotorCurtainIcon.png"; + break; + case FunctionType.RollingShutter: + btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/RollingShutterIcon.png"; + break; + } CurtainFragment(); break; case FunctionCategory.Music: @@ -109,7 +121,7 @@ UnSelectedImagePath = "Public/PowerClose.png", SelectedImagePath = "Public/PowerOpen.png", IsSelected = function.trait_on_off.value.ToString() == "on", - Tag = function.functionType + "_Switch_" + function.sid, + Tag = function.sid + "_Switch", }; bodyDiv.AddChidren(btnSwitch); } @@ -124,7 +136,7 @@ UnSelectedImagePath = "Public/PowerClose.png", SelectedImagePath = "Public/PowerOpen.png", IsSelected = function.trait_on_off.value.ToString() == "on", - Tag = function.functionType + "_Switch_" + function.sid, + Tag = function.sid + "_Switch", }; bodyDiv.AddChidren(btnSwitch); } @@ -270,10 +282,11 @@ ThumbImageHeight = Application.GetRealHeight(54), ProgressBarColor = function.trait_on_off.value.ToString() == "on" ? CSS_Color.AuxiliaryColor1 : CSS_Color.PromptingColor2, ProgressTextColor = CSS_Color.FirstLevelTitleColor, - ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel, + ProgressTextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, MaxValue = 100, Progress = (function as Light).brightness, - Tag = function.functionType + "_DimmerBar_" + function.sid + Tag = function.sid + "_DimmerBar", + SeekBarPadding = Application.GetRealWidth(20), }; bodyDiv.AddChidren(dimmerControlBar); -- Gitblit v1.8.0