From 98ceb6bd2021f9ff136cda27eef28676dd7b5d92 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 21 五月 2020 13:24:02 +0800 Subject: [PATCH] 最后的版本 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs index 373ca78..b503b18 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs @@ -37,7 +37,7 @@ /// <summary> /// 榛樿鐨勯偅涓彍鍗� /// </summary> - private FrameLayoutControl frameDefult = null; + private FrameLayoutStatuControl frameDefult = null; #endregion @@ -56,8 +56,11 @@ /// 鍒濆鍖栨帶浠�(浜嬩欢瑕佽嚦浜庡畠涔嬪墠) /// </summary> /// <param name="listTitleText">鑿滃崟鏂囧瓧鍒楄〃</param> - public void InitControl(List<string> listTitleText) + /// <param name="rightSpace">鍙宠竟绌虹櫧瀹藉害</param> + public void InitControl(List<string> listTitleText, int rightSpace = 0) { + if (listTitleText.Count == 0) { return; } + var btnTemp = new NormalViewControl(10, 10, false); btnTemp.TextSize = 16; @@ -69,6 +72,8 @@ //寮�濮嬪垵濮嬪寲 XX = this.InitTitleTextControl(i, listTitleText[i], btnTemp.GetRealWidthByText(), XX); } + //璋冩暣鎺т欢瀹藉害 + this.Width = XX + Application.GetRealWidth(rightSpace); //鍥炶皟鏂规硶 this.frameDefult.ButtonClickEvent?.Invoke(null, null); } @@ -81,7 +86,7 @@ private int InitTitleTextControl(int i_index, string titleText, int realWidth, int XX) { //鍦烘櫙妗�(鐐瑰嚮鑼冨洿鏈夌偣灏忥紝闇�瑕佹墿澶у畠鐨勭偣鍑昏寖鍥�) - var frameBack = new FrameLayoutControl(); + var frameBack = new FrameLayoutStatuControl(); frameBack.UseClickStatu = false; frameBack.Height = Application.GetRealHeight(90); frameBack.Width = realWidth; @@ -109,7 +114,7 @@ //搴曠嚎 var btnLine = new NormalViewControl(40, 10, true); - btnLine.Y = btnName.Bottom + Application.GetRealHeight(14); + btnLine.Y = btnName.Bottom + Application.GetRealHeight(6); btnLine.X = btnName.X + btnName.Width / 2 - Application.GetRealWidth(40) / 2; btnLine.Radius = (uint)Application.GetRealHeight(10) / 2; btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor; -- Gitblit v1.8.0