mac
2023-10-14 b55fe675d1dd17748a29e4e7de60d14e36740a6e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView
{
    public class BaseFramLayout:FrameLayout
    {
        public BaseFramLayout()
        {
        }
        /// <summary>
        /// 是否可以点击
        /// </summary>
        private bool mIsClick = true;
 
        /// <summary>
        /// 设置控制点击事件
        /// </summary>
        /// <param name="isClick">false点击无效</param>
        public void setClick(bool isClick)
        {
            this.mIsClick = isClick;
        }
        /// <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 + Application.GetRealHeight(bottomSpace);
            }
        }
 
        /// <summary>
        /// 获取坐标底部最下面的那个控件的底部坐标
        /// </summary>
        /// <returns></returns>
        public int GetLocationMostLastViewBottom()
        {
            int bottomHeight = -1;
 
            for (int i = 0; i < this.ChildrenCount; i++)
            {
                var child = this.GetChildren(i);
                if (child.Bottom > bottomHeight)
                {
                    bottomHeight = child.Bottom;
                }
            }
            return bottomHeight;
        }
    }
 
 
}