From 171bf03f3664226eeff2b20ee9bd2e914b63a17d Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 13 三月 2020 09:18:50 +0800 Subject: [PATCH] 20200313 --- HDL_ON/UI/UI0-Public/PublicAssmebly.cs | 140 +++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 135 insertions(+), 5 deletions(-) diff --git a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs index b05407d..03b1c68 100644 --- a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs +++ b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs @@ -5,8 +5,9 @@ namespace HDL_ON.UI { - public class PublicAssmebly + public partial class PublicAssmebly { + /* /// <summary> /// 鍚慺ramelayout娣诲姞椤堕儴鍖哄煙 /// </summary> @@ -48,6 +49,51 @@ }; frame.AddChidren(btnTilte); } + + /// <summary> + /// 鍚慺ramelayout娣诲姞椤堕儴鍖哄煙 + /// </summary> + /// <param name="frame"></param> + /// <param name="tilte"></param> + public void LoadTopView(FrameLayout frame, string tilte ,Action action) + { + FrameLayout view = new FrameLayout() + { + Height = Application.GetRealHeight(64), + BackgroundColor = CSS_Color.TopViewColor, + }; + frame.AddChidren(view); + + Button btnBack = new Button() + { + X = Application.GetRealWidth(10), + Y = Application.GetRealHeight(29), + Width = Application.GetRealWidth(40), + Height = Application.GetRealHeight(28), + UnSelectedImagePath = "Public/BackIcon.png", + }; + frame.AddChidren(btnBack); + btnBack.MouseUpEventHandler += (sender, e) => + { + action(); + frame.RemoveFromParent(); + }; + + Button btnTilte = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(30), + Width = Application.GetRealWidth(150), + Height = Application.GetRealHeight(25), + TextAlignment = TextAlignment.Center, + TextSize = CSS_FontSize.HeadlineFontSize, + TextColor = CSS_Color.FirstLevelTitleColor, + Text = tilte + }; + frame.AddChidren(btnTilte); + } + + /// <summary> /// 鍚慸ialog娣诲姞椤堕儴鍖哄煙 @@ -229,7 +275,7 @@ }; } - + */ /// <summary> /// 鍔犺浇淇敼鍙傛暟鐨勫皬寮圭獥 @@ -239,7 +285,7 @@ { Dialog dialog = new Dialog() { - BackgroundColor = 0x99000000, + BackgroundColor = CSS_Color.DialogTransparentColor1, }; FrameLayout contentView = new FrameLayout() @@ -379,7 +425,7 @@ callBackAction(etParater.Text.Trim()); } - if(titleId == StringId.RoomName) + if(titleId == StringId.RoomName || titleId == StringId.ChangeName) { if(editParater != etParater.Text.Trim()) { @@ -401,7 +447,7 @@ { Dialog dialog = new Dialog() { - BackgroundColor = 0x99000000, + BackgroundColor = CSS_Color.DialogTransparentColor1, }; FrameLayout contentView = new FrameLayout() @@ -513,6 +559,90 @@ } + /// <summary> + /// 鍔犺浇鎻愮ず寮圭獥 + /// </summary> + /// <param name="titleId"></param> + /// <param name="msgId"></param> + public void TipMsg(int titleId, int msgId) + { + Dialog dialog = new Dialog() + { + BackgroundColor = CSS_Color.DialogTransparentColor1, + }; + + FrameLayout contentView = new FrameLayout() + { + Gravity = Gravity.Center, + Width = Application.GetRealWidth(270), + Height = Application.GetRealHeight(140), + BackgroundColor = CSS.CSS_Color.MainBackgroundColor, + BorderColor = 0x00000000, + BorderWidth = 0, + Radius = (uint)Application.GetMinRealAverage(10), + }; + dialog.AddChidren(contentView); + + Button btnTitle = new Button() + { + Y = Application.GetRealHeight(16), + Height = Application.GetRealHeight(30), + TextColor = CSS_Color.MainColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextAlignment = TextAlignment.Center, + IsBold = true, + TextID = titleId, + }; + contentView.AddChidren(btnTitle); + + Button btnMsg = new Button() + { + Gravity = Gravity.CenterHorizontal, + Height = Application.GetRealHeight(25), + Y = btnTitle.Bottom, + Width = Application.GetRealHeight(200), + TextAlignment = TextAlignment.Center, + TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextID = msgId, + }; + contentView.AddChidren(btnMsg); + + Button btnLine = new Button() + { + Y = Application.GetRealHeight(96), + Height = Application.GetRealHeight(1), + BackgroundColor = CSS.CSS_Color.DividingLineColor, + }; + contentView.AddChidren(btnLine); + + Button btnConfirm = new Button() + { + Y = btnLine.Bottom, + Height = Application.GetRealHeight(43), + TextAlignment = TextAlignment.Center, + TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.SubheadingFontSize, + SelectedTextColor = CSS_Color.MainBackgroundColor, + SelectedBackgroundColor = CSS_Color.MainColor, + TextID = StringId.Confirm, + }; + contentView.AddChidren(btnConfirm); + + dialog.Show(); + + btnConfirm.MouseDownEventHandler += (sender, e) => + { + btnConfirm.IsSelected = true; + }; + btnConfirm.MouseUpEventHandler += (sender, e) => + { + btnConfirm.IsSelected = false; + dialog.Close(); + }; + + } + } } \ No newline at end of file -- Gitblit v1.8.0