using System;
|
using HDL_ON.UI.CSS;
|
using Shared;
|
|
namespace HDL_ON.UI
|
{
|
/// <summary>
|
/// 通用提示View--内容为空
|
/// 空空如也
|
/// </summary>
|
public class EmptyTipView : FrameLayout
|
{
|
/// <summary>
|
/// 提示文字
|
/// </summary>
|
public Button BtnTipNotText;
|
|
/// <summary>
|
/// 提示图片
|
/// </summary>
|
public Button BtnTipNot;
|
|
/// <summary>
|
///
|
/// </summary>
|
public EmptyTipView(string tipMsg ="",int btnTipNotY=0)
|
{
|
if(tipMsg == "")
|
{
|
tipMsg = Language.StringByID(StringId.ContentIsEmpty);
|
}
|
int tipHeight = Application.GetRealWidth(180 + btnTipNotY);
|
|
this.Height = tipHeight + Application.GetRealHeight(17 +30);
|
|
BtnTipNot = new Button()
|
{
|
Gravity = Gravity.CenterHorizontal,
|
Width = Application.GetRealWidth(180),
|
Height = Application.GetRealWidth(180),
|
UnSelectedImagePath = "TipNot.png",
|
};
|
this.AddChidren(BtnTipNot);
|
if(btnTipNotY!=0)
|
{
|
BtnTipNot.Y = Application.GetRealHeight(btnTipNotY);
|
}
|
|
//空空如也
|
Button btnTipNotText = new Button()
|
{
|
Y = tipHeight + Application.GetRealHeight(10),
|
Height = Application.GetRealHeight(17),
|
Text = tipMsg,
|
TextAlignment = TextAlignment.Center,
|
TextColor = CSS_Color.TextualColor,
|
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
|
};
|
this.AddChidren(btnTipNotText);
|
}
|
|
}
|
}
|