From 3f6685c77beeb12baf840733fb890860f4c26e7c Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期四, 25 七月 2024 17:25:59 +0800 Subject: [PATCH] 2024年07月25日17:24:45 --- HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs | 70 ++++++++++++++++++++-------------- 1 files changed, 41 insertions(+), 29 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs index bf51486..cd0e976 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs @@ -5,9 +5,21 @@ { public class TypeMultiFramLayout { + /// <summary> + /// 鏄惁鍙互鐐瑰嚮 + /// </summary> + private bool mIsClick = true; - private uint UpBackgroundColor = MusicColor.ViewColor; - private uint DownBackgroundColor = 0xFFEFEFEF; + /// <summary> + /// 璁剧疆鎺у埗鐐瑰嚮浜嬩欢 + /// </summary> + /// <param name="isClick">false鐐瑰嚮鏃犳晥</param> + public void setClick(bool isClick) + { + this.mIsClick = isClick; + } + private uint UpBackgroundColor =BaseFramLayout.unParentBackgroundColor; + private uint DownBackgroundColor =BaseFramLayout.seleBackgroundColor; /// <summary> /// 澶氫釜绫诲瀷瀹瑰櫒 @@ -34,7 +46,7 @@ }; - public Button btnBottonLeftImage = new Button + public Button btnLeftImage = new Button { Width = Application.GetRealWidth(16), Height = Application.GetRealWidth(16), @@ -43,16 +55,15 @@ Name = "btnBottonLeftImage", }; - public Button btnBottonName = new Button + public Button btnLeftName = new Button { - Width = Application.GetRealWidth(100), + Width = Application.GetRealWidth(100 + 10), Height = Application.GetRealHeight(23), TextID = StringId.shixuqi, TextSize = TextSize.Text16, TextColor = MusicColor.TextColor, TextAlignment = TextAlignment.CenterLeft, Gravity = Gravity.CenterVertical, - IsMoreLines = true, }; @@ -77,7 +88,7 @@ }; - public Button btnBottonRightImage = new Button + public Button btnRightImage = new Button { Width = Application.GetRealWidth(16), Height = Application.GetRealWidth(16), @@ -86,16 +97,16 @@ }; - public Button btnBottonRightName = new Button + public Button btnRightName = new Button { - Width = Application.GetRealWidth(100), + Width = Application.GetRealWidth(100 + 16), Height = Application.GetRealHeight(23), TextID = StringId.bofangqi, TextSize = TextSize.Text16, TextColor = MusicColor.TextColor, TextAlignment = TextAlignment.CenterRight, Gravity = Gravity.CenterVertical, - IsMoreLines = true, + Padding = new Padding(0, 0, 0, 0), }; @@ -103,16 +114,16 @@ { layout.AddChidren(multiFramLayout); multiFramLayout.AddChidren(leftFramLayout); - leftFramLayout.AddChidren(btnBottonLeftImage); - leftFramLayout.AddChidren(btnBottonName); + leftFramLayout.AddChidren(btnLeftImage); + leftFramLayout.AddChidren(btnLeftName); multiFramLayout.AddChidren(lineFramLayout); multiFramLayout.AddChidren(rightFramLayout); - rightFramLayout.AddChidren(btnBottonRightImage); - rightFramLayout.AddChidren(btnBottonRightName); - btnBottonName.X = btnBottonLeftImage.Right + Application.GetRealWidth(4); + rightFramLayout.AddChidren(btnRightImage); + rightFramLayout.AddChidren(btnRightName); + btnLeftName.X = btnLeftImage.Right + Application.GetRealWidth(4); lineFramLayout.X = leftFramLayout.Right; rightFramLayout.X = lineFramLayout.Right; - btnBottonRightName.X = btnBottonLeftImage.Right + Application.GetRealWidth(4); + btnRightName.X = Application.GetRealWidth(4); } @@ -136,12 +147,12 @@ EventHandler<MouseEventArgs> UpClick = (sender, e) => { //leftFramLayout.BackgroundColor = this.UpBackgroundColor; - + //寮硅捣鏉ヨ繕鍘熻儗鏅鑹� }; leftFramLayout.MouseUpEventHandler += UpClick; - btnBottonLeftImage.MouseUpEventHandler += UpClick; - btnBottonName.MouseUpEventHandler += UpClick; + btnLeftImage.MouseUpEventHandler += UpClick; + btnLeftName.MouseUpEventHandler += UpClick; EventHandler<MouseEventArgs> DownClick = (sender, e) => @@ -151,8 +162,8 @@ action?.Invoke(leftFramLayout); }; leftFramLayout.MouseDownEventHandler += DownClick; - btnBottonLeftImage.MouseDownEventHandler += DownClick; - btnBottonName.MouseDownEventHandler += DownClick; + btnLeftImage.MouseDownEventHandler += DownClick; + btnLeftName.MouseDownEventHandler += DownClick; } /// <summary> @@ -163,26 +174,27 @@ { EventHandler<MouseEventArgs> UpClick = (sender, e) => { + action?.Invoke(rightFramLayout); //rightFramLayout.BackgroundColor = this.UpBackgroundColor; - + //寮硅捣鏉ヨ繕鍘熻儗鏅鑹� }; rightFramLayout.MouseUpEventHandler += UpClick; - btnBottonRightImage.MouseUpEventHandler += UpClick; - btnBottonRightName.MouseUpEventHandler += UpClick; + btnRightImage.MouseUpEventHandler += UpClick; + btnRightName.MouseUpEventHandler += UpClick; EventHandler<MouseEventArgs> DownClick = (sender, e) => { //鎸変笅鍘绘敼鍙樿儗鏅鑹� - //rightFramLayout.BackgroundColor = this.DownBackgroundColor; - action?.Invoke(rightFramLayout); + //rightFramLayout.BackgroundColor =AksCommonMethod.seleBackgroundColor; + }; rightFramLayout.MouseDownEventHandler += DownClick; - btnBottonRightImage.MouseDownEventHandler += DownClick; - btnBottonRightName.MouseDownEventHandler += DownClick; + btnRightImage.MouseDownEventHandler += DownClick; + btnRightName.MouseDownEventHandler += DownClick; } - + } -- Gitblit v1.8.0