using System;
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView
{
public class BaseFramLayout:FrameLayout
{
public BaseFramLayout()
{
}
///
/// 是否可以点击
///
private bool mIsClick = true;
///
/// 设置控制点击事件
///
/// false点击无效
public void setClick(bool isClick)
{
this.mIsClick = isClick;
}
///
/// 调整真实高度
///
/// 底部高度(非真实值)
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);
}
}
///
/// 获取坐标底部最下面的那个控件的底部坐标
///
///
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;
}
}
}