From 37c33341f75841dc39c535eb62a3603f596516a1 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 27 二月 2020 17:11:53 +0800 Subject: [PATCH] 20200227 --- HDL_ON/UI/UI0-Public/PublicAssmebly.cs | 74 ++++++++++++++++++++++++++++++++++++- 1 files changed, 72 insertions(+), 2 deletions(-) diff --git a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs index 699b89b..629dd05 100644 --- a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs +++ b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs @@ -1,4 +1,5 @@ 锘縰sing System; +using HDL_ON.Entity; using HDL_ON.UI.CSS; using Shared; @@ -6,6 +7,11 @@ { public class PublicAssmebly { + /// <summary> + /// 鍚慺ramelayout娣诲姞椤堕儴鍖哄煙 + /// </summary> + /// <param name="frame"></param> + /// <param name="tilte"></param> public void LoadTopView(FrameLayout frame, string tilte) { FrameLayout view = new FrameLayout() @@ -20,7 +26,7 @@ X = Application.GetRealWidth(10), Y = Application.GetRealHeight(29), Width = Application.GetRealWidth(40), - Height = Application.GetRealHeight(25), + Height = Application.GetRealHeight(28), UnSelectedImagePath = "Public/BackIcon.png", }; frame.AddChidren(btnBack); @@ -43,6 +49,12 @@ frame.AddChidren(btnTilte); } + /// <summary> + /// 鍚慸ialog娣诲姞椤堕儴鍖哄煙 + /// </summary> + /// <param name="dialog"></param> + /// <param name="frame"></param> + /// <param name="tilte"></param> public void LoadTopView(Dialog dialog, FrameLayout frame, string tilte) { FrameLayout view = new FrameLayout() @@ -57,7 +69,7 @@ X = Application.GetRealWidth(10), Y = Application.GetRealHeight(29), Width = Application.GetRealWidth(40), - Height = Application.GetRealHeight(25), + Height = Application.GetRealHeight(28), UnSelectedImagePath = "Public/BackIcon.png", }; frame.AddChidren(btnBack); @@ -80,6 +92,64 @@ frame.AddChidren(btnTilte); } + /// <summary> + /// 鍚慺ramelayout娣诲姞椤堕儴鍖哄煙,鎷ユ湁鍔熻兘閰嶇疆鎸夐挳 + /// </summary> + /// <param name="frame"></param> + /// <param name="tilte"></param> + public void LoadTopView(FrameLayout frame, string tilte,Function function) + { + 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) => + { + 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); + + var btnSetting = new Button() + { + X = Application.GetRealWidth(337), + Y = Application.GetRealHeight(29), + Width = Application.GetMinRealAverage(28), + Height = Application.GetMinRealAverage(28), + UnSelectedImagePath = "Public/FuncInfoSetIcon.png", + }; + frame.AddChidren(btnSetting); + + btnSetting.MouseUpEventHandler += (sender, e) => { + var infoView = new FunctionBaseInfoSetPage(function); + MainPage.BasePageView.AddChidren(infoView); + infoView.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + } } } \ No newline at end of file -- Gitblit v1.8.0