From ade5917841b0fdcb1df7353ef7c56b1a1bdc9282 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期二, 22 九月 2020 10:03:32 +0800 Subject: [PATCH] 删除 Gateway.Ios文件 --- ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs | 77 ++++++++++++++++++++++---------------- 1 files changed, 45 insertions(+), 32 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs old mode 100644 new mode 100755 index 049f2e9..0baf350 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs @@ -9,7 +9,7 @@ /// <summary> /// 杩斿洖閿� /// </summary> - public BackButton backButton; + public UserCenter.BackViewControl backButton; /// <summary> /// 鐘舵�佹爮-楂樺害涓�80 /// </summary> @@ -30,29 +30,25 @@ /// <summary> /// 鏋勯�犳柟娉� /// </summary> - public TopFrameLayout(FrameLayout parentFrameLayout) + public TopFrameLayout() { BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor; - Width = Application.GetRealWidth(1080); - Height = Application.GetRealHeight(CommonFormRrsouce.TopFrameLayout_Height); - //鍏堝姞杞藉埌鐖跺鍣紝鍚﹀垯瀛愭帶浠跺竷灞�鏈夐棶棰� - parentFrameLayout.AddChidren(this); - //鍒濆鍖� - InitTopview(parentFrameLayout); + Width = Application.GetRealWidth(CommonFormResouce.AppRealWidth); + Height = Application.GetRealHeight(CommonFormResouce.TopFrameLayout_Height); } #endregion #region 鈼� 鍒濆鍖朹_________________________ - private void InitTopview(FrameLayout parentFrameLayout) + public void InitTopview() { //鐘舵�佹爮 AddTopStatuFrame(); //topview AddTopview(); //娣诲姞杩斿洖閿� - AddBackBtn(parentFrameLayout); + AddBackBtn(); //鏍囬 AddTitle(); } @@ -67,11 +63,20 @@ { topView = new FrameLayout { - Y = Application.GetRealHeight(CommonFormRrsouce.TopStatuFrameLayout_Height), - Height = Application.GetRealHeight(CommonFormRrsouce.Topview_Height), - Width = Application.GetRealWidth(1080) + Y = Application.GetRealHeight(CommonFormResouce.TopStatuFrameLayout_Height), + Height = Application.GetRealHeight(CommonFormResouce.Topview_Height), + Width = Application.GetRealWidth(CommonPage.AppRealWidth), + BackgroundColor=ZigbeeColor.Current.GXCTopViewBackgroundColor }; AddChidren(topView); + + var line = new Button + { + Y=Height-1, + Height=1, + BackgroundColor= UserCenter.UserCenterColor.Current.ButtomLine + }; + AddChidren(line); } #endregion @@ -81,15 +86,13 @@ /// 杩斿洖閿� /// </summary> /// <returns>The back button.</returns> - private void AddBackBtn(FrameLayout parentFrameLayout) + private void AddBackBtn() { - backButton = new BackButton { }; - topView.AddChidren(backButton); - - backButton.MouseUpEventHandler += (sender, e) => - { - parentFrameLayout.RemoveFromParent(); - }; + backButton = new UserCenter.BackViewControl(); + topView.AddChidren(backButton); + backButton.InitControl(); + //鍚庣画鍐嶈皟鏁� + backButton.Y = backButton.Y - Application.GetRealHeight(4); } #endregion @@ -103,8 +106,8 @@ { topStatuFrameLayout = new FrameLayout { - Height = Application.GetRealHeight(CommonFormRrsouce.TopStatuFrameLayout_Height), - Width = Application.GetRealWidth(1080) + Height = Application.GetRealHeight(CommonFormResouce.TopStatuFrameLayout_Height), + Width = Application.GetRealWidth(CommonPage.AppRealWidth) }; AddChidren(topStatuFrameLayout); } @@ -116,15 +119,17 @@ /// 鏍囬 /// </summary> private void AddTitle() - { - topTitle = new Button - { - Height = Application.GetRealHeight(CommonFormRrsouce.TopFrameLayout_Height - CommonFormRrsouce.TopStatuFrameLayout_Height), - Width = Application.GetRealWidth(CommonFormRrsouce.TopTitle_Width), - TextSize = CommonFormRrsouce.TopTitle_TextSize, - TextColor = ZigbeeColor.Current.GXCTextBlackColor, - Gravity = Gravity.CenterHorizontal, - }; + { + topTitle = new Button(); + topTitle.TextSize = 17; + topTitle.X = Application.GetRealWidth(161); + topTitle.Height = Application.GetRealHeight(75); + topTitle.Width = Application.GetRealWidth(850); + topTitle.Gravity = Gravity.CenterVertical; + topTitle.TextColor = UserCenter.UserCenterColor.Current.TopLayoutTitleText; + topTitle.TextAlignment = TextAlignment.CenterLeft; + topTitle.IsBold = true; + topView.AddChidren(topTitle); } /// <summary> @@ -135,6 +140,14 @@ { topTitle.Text = title; } + /// <summary> + /// 璁剧疆鏍囬 + /// </summary> + /// <param name="title"></param> + public void SetTopTitle(int title) + { + SetTopTitle(Language.StringByID(title)); + } #endregion } -- Gitblit v1.8.0