wxr
2021-05-12 9acd3887f1f8db40d59f991b1726a61aa7c7637c
HDL_ON/UI/UI0-Public/Widget/EmptyTipView.cs
New file
@@ -0,0 +1,59 @@
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 ="")
        {
            if(tipMsg == "")
            {
                tipMsg = Language.StringByID(StringId.ContentIsEmpty);
            }
            int tipHeight = Application.GetRealWidth(180);
            this.Height = tipHeight + Application.GetRealHeight(17);
            BtnTipNot = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Width = tipHeight,
                Height = tipHeight,
                UnSelectedImagePath = "TipNot.png",
            };
            this.AddChidren(BtnTipNot);
            //空空如也
            Button btnTipNotText = new Button()
            {
                Y = tipHeight,
                Height = Application.GetRealHeight(17),
                Text = tipMsg,
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
            };
            this.AddChidren(btnTipNotText);
        }
    }
}