From 34b65350abbb8b740b9c3bc0b43254cbbe23fcb5 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期二, 19 五月 2020 09:31:44 +0800
Subject: [PATCH] 合并代码,更改面板目标信息
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs | 80 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 80 insertions(+), 0 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs
new file mode 100755
index 0000000..ed13ec9
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs
@@ -0,0 +1,80 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+ /// <summary>
+ /// 鍋氭垚涓�涓垪琛ㄥ瀷鐨凢rameLayout(瀹冧笌VerticalListControl鍚屼竴鎬ц川,浣嗘槸瀹冩槸FrameLayout,瀹冧細鏀瑰彉楂樺害)
+ /// </summary>
+ public class FrameListControl : FrameLayoutBase
+ {
+ /// <summary>
+ /// 琛屼箣闂寸殑闂磋窛
+ /// </summary>
+ public int rowSpace = 0;
+
+ /// <summary>
+ /// 鍋氭垚涓�涓垪琛ㄥ瀷鐨凢rameLayout(瀹冧笌VerticalListControl鍚屼竴鎬ц川,浣嗘槸瀹冩槸FrameLayout,瀹冧細鏀瑰彉楂樺害)
+ /// </summary>
+ /// <param name="i_rowSpace">琛屼箣闂寸殑闂磋窛(杩欎釜鍊兼槸涓庤鎺т欢缁戝畾涓�璧蜂娇鐢ㄧ殑)</param>
+ public FrameListControl(int i_rowSpace = 12)
+ {
+ rowSpace = Application.GetRealHeight(i_rowSpace);
+ }
+
+ /// <summary>
+ /// 娣诲姞瀛愭帶浠�
+ /// </summary>
+ /// <param name="view"></param>
+ public override void AddChidren(View view)
+ {
+ if (view is FrameRowControl || view is RowLayoutControl)
+ {
+ //FrameRowLayout鎺т欢鐨勬椂鍊�,鐩存帴鎵╁ぇ瀹冪殑楂樺害
+ var tempView = this.GetChildren(this.ChildrenCount - 1);
+ if (tempView != null)
+ {
+ view.Y = tempView.Bottom;
+ }
+ base.AddChidren(view);
+ if (rowSpace > 0)
+ {
+ view.Height += rowSpace;
+ }
+ }
+ else
+ {
+ //闈濬rameRowLayout鎺т欢鐨勬椂鍊�,璁$畻鐨勬槸鍧愭爣
+ var tempView = this.GetChildren(this.ChildrenCount - 1);
+ if (tempView != null)
+ {
+ view.Y = tempView.Bottom + rowSpace;
+ }
+ base.AddChidren(view);
+ }
+ }
+
+ /// <summary>
+ /// 璋冩暣鐪熷疄楂樺害
+ /// </summary>
+ /// <param name="bottomSpace">搴曢儴楂樺害(闈炵湡瀹炲��)</param>
+ public void AdjustRealHeight(int bottomSpace = 0)
+ {
+ int bottomHeight = -1;
+
+ for (int i = 0; i < this.ChildrenCount; i++)
+ {
+ var child = this.GetChildren(i);
+ if (child.Bottom > bottomHeight)
+ {
+ bottomHeight = child.Bottom;
+ }
+ }
+ if (bottomHeight != -1)
+ {
+ this.Height = bottomHeight + bottomSpace;
+ }
+ }
+ }
+}
--
Gitblit v1.8.0