From 25bb055b0249d86548883083bb315922e6a2076b Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 24 十一月 2020 15:39:08 +0800 Subject: [PATCH] 2020-11-24 1.注册增加服务器选择。 2.增加极光推送接口 --- HDL_ON/UI/UI0-Public/Widget/UpdateTipDialog.cs | 96 +++++++++++++++++++++++++++++++++++------------ 1 files changed, 71 insertions(+), 25 deletions(-) diff --git a/HDL_ON/UI/UI0-Public/Widget/TipDialog.cs b/HDL_ON/UI/UI0-Public/Widget/UpdateTipDialog.cs similarity index 61% rename from HDL_ON/UI/UI0-Public/Widget/TipDialog.cs rename to HDL_ON/UI/UI0-Public/Widget/UpdateTipDialog.cs index d66435d..65ed221 100644 --- a/HDL_ON/UI/UI0-Public/Widget/TipDialog.cs +++ b/HDL_ON/UI/UI0-Public/Widget/UpdateTipDialog.cs @@ -1,17 +1,18 @@ 锘縰sing System; using Shared; using HDL_ON.UI.CSS; +using System.Collections.Generic; namespace HDL_ON.UI { /// <summary> - /// 閫氱敤浜屾纭鐣岄潰 + /// 鏇存柊浜屾纭鐣岄潰 /// 鍙互鑷畾涔夋寜閽枃瀛� /// </summary> - public class TipDialog : Dialog + public class UpdateTipDialog : Dialog { - public TipDialog() + public UpdateTipDialog() { } @@ -25,7 +26,7 @@ /// <param name="cancelAction"></param> /// <param name="cancelID"></param> /// <param name="confirmID"></param> - void ShowDialogBase(string titleStr, string tipStr, string msgStr, Action okAction, Action cancelAction, int cancelID = StringId.Ignore, int confirmID = StringId.Update) + void ShowDialogBase(string titleStr, string tipStr, List<string> msgList, Action okAction, Action cancelAction, int cancelID = StringId.Ignore, int confirmID = StringId.Update) { this.BackgroundColor = CSS_Color.DialogTransparentColor1; @@ -42,7 +43,7 @@ }; this.AddChidren(contentView); - Button btnTipRegisterSuccess = new Button() + Button btnTitle = new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetMinRealAverage(95), @@ -52,12 +53,12 @@ TextSize = CSS_FontSize.EmphasisFontSize_Secondary, Text = titleStr }; - contentView.AddChidren(btnTipRegisterSuccess); + contentView.AddChidren(btnTitle); Button btnTip = new Button() { Gravity = Gravity.CenterHorizontal, - Y = btnTipRegisterSuccess.Bottom, + Y = btnTitle.Bottom, Height = Application.GetMinRealAverage(17), TextAlignment = TextAlignment.Center, TextColor = CSS_Color.PromptingColor1, @@ -66,25 +67,39 @@ }; contentView.AddChidren(btnTip); - Button btnMes = new Button() - { - Gravity = Gravity.CenterHorizontal, - X = Application.GetRealWidth(25), - Y = btnTip.Bottom + Application.GetMinRealAverage(28), - Width = contentView.Width - Application.GetRealWidth(50), - Height = Application.GetRealHeight(80), - TextAlignment = TextAlignment.TopLeft, - TextColor = CSS_Color.TextualColor, - TextSize = CSS_FontSize.TextFontSize, - IsMoreLines = true, - Text = msgStr, + //鏂规1 + int listViewY = btnTip.Bottom + Application.GetMinRealAverage(10); + int lineY = Application.GetRealHeight(250); + var listView = new VerticalScrolViewLayout() + { + X = Application.GetRealWidth(25), + Width = contentView.Width - Application.GetRealWidth(50), + Y = listViewY, + Height = lineY - listViewY, }; - contentView.AddChidren(btnMes); + contentView.AddChidren(listView); + + //鏂规2 + //Button btnMes = new Button() + //{ + // Gravity = Gravity.CenterHorizontal, + // X = Application.GetRealWidth(25), + // Y = btnTip.Bottom + Application.GetMinRealAverage(28), + // Width = contentView.Width - Application.GetRealWidth(50), + // Height = lineY - listViewY, + // TextAlignment = TextAlignment.TopLeft, + // TextColor = CSS_Color.TextualColor, + // TextSize = CSS_FontSize.TextFontSize, + // IsMoreLines = true, + // Text = msgStr, + + //}; + //listView.AddChidren(btnMes); Button btnLine = new Button() { - Y = Application.GetRealHeight(258), + Y = lineY, Height = Application.GetRealHeight(1), Width = contentView.Width, BackgroundColor = CSS_Color.DividingLineColor, @@ -144,22 +159,53 @@ }; this.AddChidren(btnHeadImage); + if(msgList != null && msgList.Count > 0) + { + foreach(var mes in msgList) + { + Button btnMes = new Button() + { + Gravity = Gravity.CenterHorizontal, + Width = listView.Width, + Height = Application.GetRealHeight(17), + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.TextFontSize, + Text = mes, + }; + contentView.AddChidren(btnMes); + } + } + + this.Show(); } + + ///// <summary> + ///// 鍔犺浇鎻愮ずDialog + ///// </summary> + ///// <param name="titleStr"></param> + ///// <param name="tipStr"></param> + ///// <param name="msgStr"></param> + ///// <param name="okAction"></param> + ///// <param name="cancelAction"></param> + //public void ShowDialog(string titleStr, string tipStr, string msgStr, Action okAction, Action cancelAction = null) + //{ + // this.ShowDialogBase(titleStr, tipStr, msgStr, okAction, cancelAction); + //} /// <summary> /// 鍔犺浇鎻愮ずDialog /// </summary> /// <param name="titleStr"></param> /// <param name="tipStr"></param> - /// <param name="msgStr"></param> + /// <param name="msgList"></param> /// <param name="okAction"></param> /// <param name="cancelAction"></param> - public void ShowDialog(string titleStr, string tipStr, string msgStr, Action okAction, Action cancelAction = null) + public void ShowDialog(string titleStr, string tipStr, List<string> msgList, Action okAction, Action cancelAction = null) { - this.ShowDialogBase(titleStr, tipStr, msgStr, okAction, cancelAction); + this.ShowDialogBase(titleStr, tipStr, msgList, okAction, cancelAction); } - } } -- Gitblit v1.8.0