From 611786df5108dca0bdcff03834cc285cba4b8e61 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 13 十月 2020 16:48:43 +0800
Subject: [PATCH] 2020-10-13-1

---
 HDL_ON/UI/UI2/FuntionControlView/Music/View/TipView.cs |  163 ++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 134 insertions(+), 29 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/View/TipView.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/View/TipView.cs
index f3ba48c..0f9767e 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/View/TipView.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/View/TipView.cs
@@ -29,7 +29,7 @@
         {
             Dialog dialog = new Dialog()
             {
-                BackgroundColor = Color.PopupBackgroundColor,
+                BackgroundColor = MusicColor.PopupBackgroundColor,
             };
 
             FrameLayout whiteView = new FrameLayout()
@@ -39,7 +39,7 @@
                 Y = Application.GetRealHeight(264),
                 Width = Application.GetRealWidth(270),
                 Height = Application.GetRealHeight(172),
-                BackgroundColor = Color.WhiteColor,
+                BackgroundColor = MusicColor.WhiteColor,
                 BorderColor = 0x00000000,
                 BorderWidth = 0,
                 Radius = (uint)Application.GetRealHeight(RradiusFrameLayout),
@@ -52,7 +52,7 @@
                 X=Application.GetRealWidth(35),
                 Height = Application.GetRealHeight(22),
                 Width=Application.GetRealWidth(200),
-                TextColor =Color.SelectedColor,
+                TextColor =MusicColor.SelectedColor,
                 TextSize =TextSize.Text16,
                 TextAlignment = TextAlignment.Center,
                 TextID = titleId,
@@ -67,7 +67,7 @@
                 X=Application.GetRealWidth(24),
                 Width = Application.GetRealWidth(222),
                 Height = Application.GetRealHeight(40),
-                BackgroundColor =Color.ViewColor,
+                BackgroundColor =MusicColor.ViewColor,
                 BorderColor = 0x00000000,
                 BorderWidth = 0,
                 Radius = (uint)Application.GetMinRealAverage(radiusEditFrameLayout),
@@ -81,7 +81,7 @@
                 Width = Application.GetRealWidth(160),
                 Height=Application.GetRealHeight(20),
                 Text = tnputEditTxet,
-                TextColor = Color.TextColor,
+                TextColor = MusicColor.TextColor,
                 TextSize = TextSize.Text14,
                 TextAlignment=TextAlignment.CenterLeft,
           
@@ -106,7 +106,7 @@
             {
                 Y = whiteView.Height-Application.GetRealHeight(44+1),
                 Height = Application.GetRealHeight(1),
-                BackgroundColor =Color.LineColor,
+                BackgroundColor =MusicColor.LineColor,
             };
             whiteView.AddChidren(btnLine);
 
@@ -116,7 +116,7 @@
                 Width = Application.GetRealWidth(135),
                 Height = Application.GetRealHeight(44),
                 TextAlignment = TextAlignment.Center,
-                TextColor = Color.TextCancelColor,
+                TextColor = MusicColor.TextCancelColor,
                 TextSize = TextSize.Text16,
                 TextID = StringId.cancelMusic,
                 Gravity = Gravity.BottomLeft,
@@ -130,11 +130,11 @@
                 Width = Application.GetRealWidth(135),
                 Height = Application.GetRealHeight(44),
                 TextAlignment = TextAlignment.Center,
-                TextColor = Color.WhiteColor,
+                TextColor = MusicColor.WhiteColor,
                 IsBold = true,
                 TextSize = TextSize.Text16,
                 TextID = StringId.confirmMusic,
-                BackgroundColor = Color.SelectedColor,
+                BackgroundColor = MusicColor.SelectedColor,
                 Gravity = Gravity.BottomRight,
             };
             whiteView.AddChidren(btnConfirm);
@@ -177,7 +177,7 @@
                     btnTip.Width = Application.GetRealWidth(222);
                     btnTip.Height = Application.GetRealHeight(17);
                     btnTip.Text = tipMsgString;
-                    btnTip.TextColor = Color.RedColor;
+                    btnTip.TextColor = MusicColor.RedColor;
                     btnTip.TextSize = TextSize.Text12;
                     btnTip.TextAlignment = TextAlignment.CenterLeft;
 
@@ -202,7 +202,7 @@
         {
             Dialog dialog = new Dialog()
             {
-                BackgroundColor = Color.PopupBackgroundColor,
+                BackgroundColor = MusicColor.PopupBackgroundColor,
             };
 
             FrameLayout whiteView = new FrameLayout()
@@ -212,7 +212,7 @@
                 Y = Application.GetRealHeight(264),
                 Width = Application.GetRealWidth(270),
                 Height = Application.GetRealHeight(172),
-                BackgroundColor = Color.WhiteColor,
+                BackgroundColor = MusicColor.WhiteColor,
                 BorderColor = 0x00000000,
                 BorderWidth = 0,
                 Radius = (uint)Application.GetRealHeight(RradiusFrameLayout),
@@ -225,7 +225,7 @@
                 X = Application.GetRealWidth(35),
                 Height = Application.GetRealHeight(22),
                 Width = Application.GetRealWidth(200),
-                TextColor = Color.SelectedColor,
+                TextColor = MusicColor.SelectedColor,
                 TextSize = TextSize.Text16,
                 TextAlignment = TextAlignment.Center,
                 TextID = titleId,
@@ -240,7 +240,7 @@
                 X = Application.GetRealWidth(24),
                 Width = Application.GetRealWidth(222),
                 Height = Application.GetRealHeight(40),
-                BackgroundColor = Color.ViewColor,
+                BackgroundColor = MusicColor.ViewColor,
                 BorderColor = 0x00000000,
                 BorderWidth = 0,
                 Radius = (uint)Application.GetMinRealAverage(radiusEditFrameLayout),
@@ -254,7 +254,7 @@
                 Width = Application.GetRealWidth(160),
                 Height = Application.GetRealHeight(20),
                 Text = tnputEditTxet,
-                TextColor = Color.TextColor,
+                TextColor = MusicColor.TextColor,
                 TextSize = TextSize.Text14,
                 TextAlignment = TextAlignment.CenterLeft,
             };
@@ -278,7 +278,7 @@
             {
                 Y = whiteView.Height - Application.GetRealHeight(44 + 1),
                 Height = Application.GetRealHeight(1),
-                BackgroundColor = Color.LineColor,
+                BackgroundColor = MusicColor.LineColor,
             };
             whiteView.AddChidren(btnLine);
 
@@ -288,7 +288,7 @@
                 Width = Application.GetRealWidth(135),
                 Height = Application.GetRealHeight(44),
                 TextAlignment = TextAlignment.Center,
-                TextColor = Color.TextCancelColor,
+                TextColor = MusicColor.TextCancelColor,
                 TextSize = TextSize.Text16,
                 TextID = StringId.cancelMusic,
                 Gravity = Gravity.BottomLeft,
@@ -303,11 +303,11 @@
                 Width = Application.GetRealWidth(135),
                 Height = Application.GetRealHeight(44),
                 TextAlignment = TextAlignment.Center,
-                TextColor = Color.WhiteColor,
+                TextColor = MusicColor.WhiteColor,
                 IsBold = true,
                 TextSize = TextSize.Text16,
                 TextID = StringId.confirmMusic,
-                BackgroundColor = Color.SelectedColor,
+                BackgroundColor = MusicColor.SelectedColor,
                 Gravity=Gravity.BottomRight,
             };
             whiteView.AddChidren(btnConfirm);
@@ -341,7 +341,7 @@
                     btnTip.Width = Application.GetRealWidth(222);
                     btnTip.Height = Application.GetRealHeight(17);
                     btnTip.Text = Language.StringByID(errorId_IsNullOrEmpty);
-                    btnTip.TextColor = Color.RedColor;
+                    btnTip.TextColor = MusicColor.RedColor;
                     btnTip.TextSize = TextSize.Text12;
                     btnTip.TextAlignment = TextAlignment.CenterLeft;
                     return;
@@ -365,7 +365,7 @@
         {
             Dialog dialog = new Dialog()
             {
-                BackgroundColor = Color.PopupBackgroundColor,
+                BackgroundColor = MusicColor.PopupBackgroundColor,
             };
 
             FrameLayout whiteView = new FrameLayout()
@@ -375,7 +375,7 @@
                 Y = Application.GetRealHeight(264),
                 Width = Application.GetRealWidth(270),
                 Height = Application.GetRealHeight(140),
-                BackgroundColor = Color.WhiteColor,
+                BackgroundColor = MusicColor.WhiteColor,
                 BorderColor = 0x00000000,
                 BorderWidth = 0,
                 Radius = (uint)Application.GetRealHeight(RradiusFrameLayout),
@@ -388,7 +388,7 @@
                 X = Application.GetRealWidth(35),
                 Height = Application.GetRealHeight(22),
                 Width = Application.GetRealWidth(270 - 35 * 2),
-                TextColor = Color.SelectedColor,
+                TextColor = MusicColor.SelectedColor,
                 TextSize = TextSize.Text16,
                 TextAlignment = TextAlignment.Center,
                 TextID = titleId,
@@ -401,10 +401,10 @@
                 X = Application.GetRealWidth(20),
                 Height = Application.GetRealHeight(22),
                 Width = Application.GetRealWidth(270 - 20 * 2),
-                TextColor = Color.TextCancelColor,
+                TextColor = MusicColor.TextCancelColor,
                 TextSize = TextSize.Text12,
                 TextAlignment = TextAlignment.Center,
-                TextID = tipTxet,
+                TextID = tipTxet, 
             };
             whiteView.AddChidren(tipBtn);
 
@@ -413,7 +413,7 @@
             {
                 Y = whiteView.Height - Application.GetRealHeight(44 + 1),
                 Height = Application.GetRealHeight(1),
-                BackgroundColor = Color.LineColor,
+                BackgroundColor = MusicColor.LineColor,
             };
             whiteView.AddChidren(btnLine);
 
@@ -423,7 +423,7 @@
                 Width = Application.GetRealWidth(135),
                 Height = Application.GetRealHeight(44),
                 TextAlignment = TextAlignment.Center,
-                TextColor = Color.TextCancelColor,
+                TextColor = MusicColor.TextCancelColor,
                 TextSize = TextSize.Text16,
                 TextID = StringId.cancelMusic,
                 Gravity = Gravity.BottomLeft,
@@ -437,11 +437,11 @@
                 Width = Application.GetRealWidth(135),
                 Height = Application.GetRealHeight(44),
                 TextAlignment = TextAlignment.Center,
-                TextColor = Color.WhiteColor,
+                TextColor = MusicColor.WhiteColor,
                 IsBold = true,
                 TextSize = TextSize.Text16,
                 TextID = StringId.confirmMusic,
-                BackgroundColor = Color.SelectedColor,
+                BackgroundColor = MusicColor.SelectedColor,
                 Gravity = Gravity.BottomRight,
             };
             whiteView.AddChidren(btnConfirm);
@@ -460,5 +460,110 @@
 
         }
 
+        /// <summary>
+        /// 纭畾鎻愮ず妗�
+        /// </summary>
+        /// <param name="titleId">鏍囬鏂囨湰</param>
+        /// <param name="tipTxet">鑷畾涔夋彁绀烘枃鏈�</param>
+        /// <param name="confirmAction">鍥炶皟鍑芥暟</param>
+        public void TipBox1(int titleId, int tipTxet, Action confirmAction)
+        {
+            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(155),
+                BackgroundColor = MusicColor.WhiteColor,
+                BorderColor = 0x00000000,
+                BorderWidth = 0,
+                Radius = (uint)Application.GetRealHeight(RradiusFrameLayout),
+            };
+            dialog.AddChidren(whiteView);
+
+            Button titleBtn = new Button()
+            {
+                Y = Application.GetRealHeight(20),
+                X = Application.GetRealWidth(35),
+                Height = Application.GetRealHeight(22),
+                Width = Application.GetRealWidth(270 - 35 * 2),
+                TextColor = MusicColor.SelectedColor,
+                TextSize = TextSize.Text16,
+                TextAlignment = TextAlignment.Center,
+                TextID = titleId,
+            };
+            whiteView.AddChidren(titleBtn);
+
+            Button tipBtn = new Button()
+            {
+                Y = titleBtn.Bottom + Application.GetRealHeight(8),
+                X = Application.GetRealWidth(20),
+                Height = Application.GetRealHeight(22+15),
+                Width = Application.GetRealWidth(270 - 20 * 2),
+                TextColor = MusicColor.TextCancelColor,
+                TextSize = TextSize.Text12,
+                TextAlignment = TextAlignment.Center,
+                Text = Language.StringByID(tipTxet).Replace("{\\r\\n}", "\r\n"),
+                IsMoreLines = true,
+            };
+            whiteView.AddChidren(tipBtn);
+
+
+            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) =>
+            {
+                confirmAction();
+                dialog.Close();
+            };
+
+        }
     }
 }

--
Gitblit v1.8.0