wei
2021-01-11 41f9c8837b0551c68f8fd798c06951fa716b7ab8
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs
old mode 100644 new mode 100755
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Threading;
using HDL_ON.UI.CSS;
using Shared;
@@ -52,7 +53,7 @@
                X = Application.GetRealWidth(35),
                Height = Application.GetRealHeight(22),
                Width = Application.GetRealWidth(200),
                TextColor =CSS_Color.textConfirmColor,
                TextColor = CSS_Color.textConfirmColor,
                TextSize = TextSize.text16,
                TextAlignment = TextAlignment.Center,
                TextID = titleId,
@@ -92,8 +93,8 @@
            {
                X = Application.GetRealWidth(194),
                Y = Application.GetRealHeight(8),
                Width = Application.GetMinRealAverage(24),
                Height = Application.GetMinRealAverage(24),
                Width = Application.GetRealWidth(24),
                Height = Application.GetRealWidth(24),
                UnSelectedImagePath = "MusicIcon/clear.png",
            };
            editBjView.AddChidren(clearIconBtn);
@@ -116,7 +117,7 @@
                Width = Application.GetRealWidth(135),
                Height = Application.GetRealHeight(44),
                TextAlignment = TextAlignment.Center,
                TextColor =CSS_Color.textTipColor,
                TextColor = CSS_Color.textTipColor,
                TextSize = TextSize.text16,
                TextID = StringId.cancelMusic,
                Gravity = Gravity.BottomLeft,
@@ -264,8 +265,8 @@
            {
                X = Application.GetRealWidth(194),
                Y = Application.GetRealHeight(8),
                Width = Application.GetMinRealAverage(24),
                Height = Application.GetMinRealAverage(24),
                Width = Application.GetRealWidth(24),
                Height = Application.GetRealWidth(24),
                UnSelectedImagePath = "MusicIcon/clear.png",
            };
            editBjView.AddChidren(clearIconBtn);
@@ -401,7 +402,7 @@
                X = Application.GetRealWidth(20),
                Height = Application.GetRealHeight(22),
                Width = Application.GetRealWidth(270 - 20 * 2),
                TextColor =CSS_Color.textTipColor,
                TextColor = CSS_Color.textTipColor,
                TextSize = TextSize.text12,
                TextAlignment = TextAlignment.Center,
                TextID = tipTxet,
@@ -423,7 +424,7 @@
                Width = Application.GetRealWidth(135),
                Height = Application.GetRealHeight(44),
                TextAlignment = TextAlignment.Center,
                TextColor =CSS_Color.textTipColor,
                TextColor = CSS_Color.textTipColor,
                TextSize = TextSize.text16,
                TextID = StringId.cancelMusic,
                Gravity = Gravity.BottomLeft,
@@ -565,5 +566,84 @@
            };
        }
        /// <summary>
        /// 信息提示窗口,自动关闭
        /// </summary>
        /// <param name="msg">提示错误文本</param>
        public void FlashingBox(string msg)
        {
            new PublicAssmebly().TipMsgAutoClose(msg, false, 2000);
        }
        /// <summary>
        /// 错误信息提示窗口,手动确定关闭
        /// </summary>
        /// <param name="titleId">标题文本</param>
        /// <param name="msgId">提示错误文本</param>
        public void TipBox(int titleId, int msgId)
        {
            Dialog dialog = new Dialog()
            {
                BackgroundColor = CSS_Color.viewTrans60lucence,
            };
            FrameLayout contentView = new FrameLayout()
            {
                Gravity = Gravity.Center,
                Width = Application.GetRealWidth(270),
                Height = Application.GetRealHeight(140),
                BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealHeight(RradiusFrameLayout),
            };
            dialog.AddChidren(contentView);
            Button btnTitle = new Button()
            {
                Y = Application.GetRealHeight(20),
                Height = Application.GetRealHeight(22),
                TextColor = CSS_Color.MainColor,
                TextSize = LogicView.TextSize.text16,
                TextAlignment = TextAlignment.Center,
                TextID= titleId,
            };
            contentView.AddChidren(btnTitle);
            Button btnMsg = new Button()
            {
                Height = Application.GetRealHeight(17),
                Y = Application.GetRealHeight(50),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = LogicView.TextSize.text12,
                TextID = msgId,
            };
            contentView.AddChidren(btnMsg);
            Button btnLine = new Button()
            {
                Y = Application.GetRealHeight(96),
                Height = Application.GetRealHeight(1),
                BackgroundColor = CSS_Color.viewLine,
            };
            contentView.AddChidren(btnLine);
            Button btnConfirm = new Button()
            {
                Y = btnLine.Bottom,
                Height = Application.GetRealHeight(43),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.MainColor,
                TextSize = TextSize.text16,
                TextID = StringId.Close,
            };
            contentView.AddChidren(btnConfirm);
            dialog.Show();
            btnConfirm.MouseUpEventHandler += (sender, e) =>
            {
                dialog.Close();
            };
        }
    }
}