From c44b10e4447e84dbdfa9105edf460ef364a8f2b3 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期一, 30 十一月 2020 19:53:35 +0800 Subject: [PATCH] Merge branch 'master' into WJC --- HDL_ON/UI/UI0-Public/Widget/ListIconCellView.cs | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 100 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI0-Public/Widget/ListIconCellView.cs b/HDL_ON/UI/UI0-Public/Widget/ListIconCellView.cs new file mode 100644 index 0000000..2b1a000 --- /dev/null +++ b/HDL_ON/UI/UI0-Public/Widget/ListIconCellView.cs @@ -0,0 +1,100 @@ +锘縰sing System; +using HDL_ON.UI.CSS; +using Shared; + +namespace HDL_ON.UI +{ + /// <summary> + /// 閫氱敤ListIconCellView + /// 鏀寔瀹氫箟 鍥炬爣銆佷富鏍囬銆乬o鍥炬爣銆佷笅鍒掔嚎銆佺偣鍑讳簨浠� + /// </summary> + public class ListIconCellView : FrameLayout + { + /// <summary> + /// 鍥炬爣鎸夐挳 + /// </summary> + public Button BtnIcon; + /// <summary> + /// 鏍囬 + /// </summary> + public Button BtnTilte; + /// <summary> + /// 绠ご鍥炬爣鎸夐挳 + /// </summary> + public Button BtnGo; + /// <summary> + /// 鍒嗗壊绾� + /// </summary> + public LineView LineView; + + /// <summary> + /// 鐐瑰嚮瑙﹀彂瀵逛簨浠� + /// </summary> + public Action GoAction; + + /// <summary> + /// + /// </summary> + public ListIconCellView() + { + ShowView(); + } + + /// <summary> + /// + /// </summary> + void ShowView() + { + this.Height = Application.GetRealHeight(50); + this.BackgroundColor = CSS_Color.MainBackgroundColor; + + BtnIcon = new Button() + { + X = Application.GetRealWidth(16), + Width = Application.GetRealWidth(24), + Height = Application.GetRealWidth(24), + Gravity = Gravity.CenterVertical, + }; + this.AddChidren(BtnIcon); + + /// <summary> + /// 鏍囬 + /// </summary> + BtnTilte = new Button() + { + X = Application.GetRealWidth(52), + Width = Application.GetRealWidth(278), + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.TextFontSize, + }; + + this.AddChidren(BtnTilte); + + /// <summary> + /// 鍓嶈繘鍥炬爣 + /// </summary> + BtnGo = new Button() + { + X = Application.GetRealWidth(339), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/Right.png", + }; + this.AddChidren(BtnGo); + + LineView = new LineView(this.Height); + this.AddChidren(LineView); + //LineView.Y = this.Height - LineView.Height; + + EventHandler<MouseEventArgs> eventHandler = (sender, e) => + { + GoAction?.Invoke(); + }; + BtnTilte.MouseUpEventHandler = eventHandler; + BtnGo.MouseUpEventHandler = eventHandler; + + } + } +} -- Gitblit v1.8.0