From c047239d340038cea872bae276e713ef866c0a34 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 02 三月 2021 13:22:21 +0800
Subject: [PATCH] Merge branch 'NewFilePath' into CJL

---
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/TipView.cs |  179 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 179 insertions(+), 0 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/TipView.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/TipView.cs
new file mode 100644
index 0000000..5d70028
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/TipView.cs
@@ -0,0 +1,179 @@
+锘縰sing System;
+using System.Collections.Generic;
+using HDL_ON.UI.CSS;
+using HDL_ON.UI.Music;
+using Shared;
+namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
+{
+    public class TipView
+    {
+        /// <summary>
+        /// 澶ф鍦嗚鍊�
+        /// </summary>
+        public int RradiusFrameLayout = 15;
+        /// <summary>
+        /// 灏忔鍦嗚鍊�
+        /// </summary>
+        public int radiusEditFrameLayout = 4;
+
+        /// <summary>
+        /// 杈撳叆妗�
+        /// </summary>
+        /// <param name="confirmAction">鍥炶皟鍑芥暟</param>
+        public void InputBox(string tnputEditTxet, Action<string, Dialog> confirmAction,bool if_bool=true)
+        {
+            Dialog dialog = new Dialog()
+            {
+                BackgroundColor = MusicColor.PopupBackgroundColor,
+            };
+
+            FrameLayout whiteView = new FrameLayout()
+            {
+                //Gravity = Gravity.Center,
+                X = Application.GetRealWidth(53),
+                Y = Application.GetRealHeight(264),
+                Width = Application.GetRealWidth(270),
+                Height = Application.GetRealHeight(201),
+                BackgroundColor = MusicColor.WhiteColor,
+                BorderColor = 0x00000000,
+                BorderWidth = 0,
+                Radius = (uint)Application.GetRealHeight(RradiusFrameLayout),
+            };
+            dialog.AddChidren(whiteView);
+
+            Button btnTitle = new Button()
+            {
+                Y = Application.GetRealHeight(20),
+                X = Application.GetRealWidth(35),
+                Height = Application.GetRealHeight(22),
+                Width = Application.GetRealWidth(200),
+                TextColor = MusicColor.SelectedColor,
+                TextSize = TextSize.Text16,
+                TextAlignment = TextAlignment.Center,
+                TextID = StringId.shuruyaokongqimingcheng,
+
+            };
+            whiteView.AddChidren(btnTitle);
+
+            FrameLayout editBjView = new FrameLayout()
+            {
+                // Gravity = Gravity.CenterHorizontal,
+                Y = btnTitle.Bottom + Application.GetRealHeight(16),
+                X = Application.GetRealWidth(24),
+                Width = Application.GetRealWidth(222),
+                Height = Application.GetRealHeight(40),
+                BackgroundColor = MusicColor.ViewColor,
+                BorderColor = 0x00000000,
+                BorderWidth = 0,
+                Radius = (uint)Application.GetMinRealAverage(radiusEditFrameLayout),
+            };
+            whiteView.AddChidren(editBjView);
+
+            EditText editText = new EditText()
+            {
+                X = Application.GetRealWidth(12),
+                Y = Application.GetRealHeight(10),
+                Width = Application.GetRealWidth(160),
+                Height = Application.GetRealHeight(20),
+                Text = tnputEditTxet,
+                TextColor = MusicColor.TextColor,
+                TextSize = TextSize.Text14,
+                TextAlignment = TextAlignment.CenterLeft,
+            };
+            editBjView.AddChidren(editText);
+
+            Button clearIconBtn = new Button
+            {
+                X = Application.GetRealWidth(194),
+                Y = Application.GetRealHeight(8),
+                Width = Application.GetRealWidth(24),
+                Height = Application.GetRealWidth(24),
+                UnSelectedImagePath = "MusicIcon/clear.png",
+            };
+            editBjView.AddChidren(clearIconBtn);
+            clearIconBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                editText.Text = "";
+            };
+
+
+            Button btnTipText = new Button
+            {
+                X = Application.GetRealWidth(24),
+                Y = editBjView.Bottom + Application.GetRealHeight(12),
+                Width = Application.GetRealWidth(211),
+                Height = Application.GetRealHeight(35),
+                Text = Language.StringByID(StringId.fengleichazhao).Replace("{\\r\\n}", "\r\n"),
+                IsMoreLines = true,
+                TextColor = MusicColor.MusicNoTxetColor,
+                TextSize = TextSize.Text12,
+                TextAlignment = TextAlignment.CenterLeft,
+            };
+            whiteView.AddChidren(btnTipText);
+
+             Button btnLine = new Button()
+            {
+                Y = whiteView.Height -Application.GetRealHeight(44 + 1),
+                Height = Application.GetRealHeight(1),
+                BackgroundColor = MusicColor.LineColor,
+            };
+            whiteView.AddChidren(btnLine);
+
+            Button btnCancel = new Button()
+            {
+                Y = btnLine.Bottom,
+                Width = Application.GetRealWidth(135),
+                Height = Application.GetRealHeight(44),
+                TextAlignment = TextAlignment.Center,
+                TextColor = MusicColor.TextCancelColor,
+                TextSize = TextSize.Text16,
+                TextID = StringId.cancelMusic,
+                Gravity = Gravity.BottomLeft,
+            };
+            whiteView.AddChidren(btnCancel);
+            btnCancel.SetCornerWithSameRadius(Application.GetRealHeight(RradiusFrameLayout), HDLUtils.RectCornerBottomLeft);
+
+            Button btnConfirm = new Button()
+            {
+                X = btnCancel.Right,
+                Y = btnLine.Bottom,
+                Width = Application.GetRealWidth(135),
+                Height = Application.GetRealHeight(44),
+                TextAlignment = TextAlignment.Center,
+                TextColor = MusicColor.WhiteColor,
+                IsBold = true,
+                TextSize = TextSize.Text16,
+                TextID = StringId.confirmMusic,
+                BackgroundColor = MusicColor.SelectedColor,
+                Gravity = Gravity.BottomRight,
+            };
+            whiteView.AddChidren(btnConfirm);
+            btnConfirm.SetCornerWithSameRadius(Application.GetRealHeight(RradiusFrameLayout), HDLUtils.RectCornerBottomRight);
+            dialog.Show();
+            btnCancel.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+
+
+
+            btnConfirm.MouseUpEventHandler += (sender, e) =>
+            {
+                if (string.IsNullOrEmpty(editText.Text.Trim()))
+                {
+                    return;
+                }
+                confirmAction(editText.Text.Trim(), dialog);
+                if (if_bool) {
+                    dialog.Close();
+                }
+            };
+
+        }
+
+
+       
+
+
+    }
+}

--
Gitblit v1.8.0