From eda3fb873e59544ff36301b51e05aef64f87b0f9 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 27 八月 2021 13:21:21 +0800
Subject: [PATCH] Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into newBranch1
---
HDL_ON/UI/UI0-Public/Widget/ListCellView.cs | 88 ++++++++++++++++++++-----------------------
1 files changed, 41 insertions(+), 47 deletions(-)
diff --git a/HDL_ON/UI/UI0-Public/Widget/ListCellView.cs b/HDL_ON/UI/UI0-Public/Widget/ListCellView.cs
index 971ab31..c7d3114 100644
--- a/HDL_ON/UI/UI0-Public/Widget/ListCellView.cs
+++ b/HDL_ON/UI/UI0-Public/Widget/ListCellView.cs
@@ -4,49 +4,53 @@
namespace HDL_ON.UI
{
+ /// <summary>
+ /// 閫氱敤ListCellView
+ /// 鏀寔瀹氫箟 涓绘爣棰樸�佸壇鏍囬銆乬o鍥炬爣銆佷笅鍒掔嚎銆佺偣鍑讳簨浠�
+ /// </summary>
public class ListCellView : FrameLayout
{
/// <summary>
- ///
+ /// 鏍囬
/// </summary>
- public Button btnTilte;
+ public Button BtnTilte;
/// <summary>
/// 鍓爣棰�
/// </summary>
- public Button btnSubtitle;
+ public Button BtnSubtitle;
/// <summary>
/// 绠ご鍥炬爣
/// </summary>
- public Button btnImage;
-
+ public Button BtnGo;
/// <summary>
- ///
+ /// 鍒嗗壊绾�
/// </summary>
- public string tilteText;
- /// <summary>
- ///
- /// </summary>
- public string subtitleText;
-
+ public LineView LineView;
/// <summary>
/// 鐐瑰嚮瑙﹀彂瀵逛簨浠�
/// </summary>
- public Action goAction;
-
- /// <summary>
- ///
- /// </summary>
- public bool isShowImageBtn = true;
+ public Action GoAction;
/// <summary>
- ///
+ /// ListCellView 榛樿
/// </summary>
public ListCellView()
{
- this.Height = Application.GetRealHeight(50);
- this.BackgroundColor = CSS_Color.MainBackgroundColor;
ShowView();
+ }
+
+ /// <summary>
+ /// ListCellView 鎸囧畾鍙傛暟
+ /// </summary>
+ /// <param name="tilteText"></param>
+ /// <param name="subtitleText"></param>
+ /// <param name="action"></param>
+ /// <param name="isShowImageBtn"></param>
+ public ListCellView(string tilteText, string subtitleText, Action action, bool isShowImageBtn = true)
+ {
+
+ ShowView(tilteText, subtitleText, action, isShowImageBtn);
}
/// <summary>
@@ -56,37 +60,28 @@
/// <param name="subtitleText"></param>
/// <param name="action"></param>
/// <param name="isShowImageBtn"></param>
- public ListCellView(string tilteText, string subtitleText, Action action, bool isShowImageBtn = true)
+ void ShowView(string tilteText = "", string subtitleText = "", Action action = null, bool isShowImageBtn = true)
{
+ this.BackgroundColor = CSS_Color.MainBackgroundColor;
this.Height = Application.GetRealHeight(50);
- this.tilteText = tilteText;
- this.subtitleText = subtitleText;
- this.goAction = action;
- ShowView();
- }
-
- /// <summary>
- ///
- /// </summary>
- void ShowView()
- {
+ this.GoAction = action;
/// <summary>
/// 鏍囬
/// </summary>
- btnTilte = new Button()
+ BtnTilte = new Button()
{
X = Application.GetRealWidth(16),
- Width = Application.GetRealWidth(120),
+ Width = Application.GetRealWidth(220),
TextAlignment = TextAlignment.CenterLeft,
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.SubheadingFontSize,
Text = tilteText,
};
- this.AddChidren(btnTilte);
+ this.AddChidren(BtnTilte);
/// <summary>
/// 鍓爣棰�
/// </summary>
- btnSubtitle = new Button()
+ BtnSubtitle = new Button()
{
X = Application.GetRealWidth(100),
Width = Application.GetRealWidth(230),
@@ -96,12 +91,12 @@
Text = subtitleText,
};
- this.AddChidren(btnSubtitle);
+ this.AddChidren(BtnSubtitle);
/// <summary>
/// 鍓嶈繘鍥炬爣
/// </summary>
- btnImage = new Button()
+ BtnGo = new Button()
{
X = Application.GetRealWidth(339),
Gravity = Gravity.CenterVertical,
@@ -112,20 +107,19 @@
if (isShowImageBtn)
{
- this.AddChidren(btnImage);
+ this.AddChidren(BtnGo);
}
- var lineView = new LineView();
- this.AddChidren(lineView);
- lineView.Y = this.Height - lineView.Height;
+ LineView = new LineView(this.Height);
+ this.AddChidren(LineView);
EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
{
- goAction?.Invoke();
+ GoAction?.Invoke();
};
- btnTilte.MouseUpEventHandler = eventHandler;
- btnSubtitle.MouseUpEventHandler = eventHandler;
- btnImage.MouseUpEventHandler = eventHandler;
+ BtnTilte.MouseUpEventHandler = eventHandler;
+ BtnSubtitle.MouseUpEventHandler = eventHandler;
+ BtnGo.MouseUpEventHandler = eventHandler;
}
}
--
Gitblit v1.8.0