From c1de48884fa145a16a0f8bcee93274dcfaa0ff82 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 07 五月 2020 10:40:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into dev-2020xm
---
ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 154 insertions(+), 0 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs
new file mode 100755
index 0000000..0baf350
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs
@@ -0,0 +1,154 @@
+锘縰sing System;
+using Shared.Common;
+
+namespace Shared.Phone.Device.CommonForm
+{
+ public class TopFrameLayout : FrameLayout
+ {
+ #region 鈼� 鍙橀噺__________________________
+ /// <summary>
+ /// 杩斿洖閿�
+ /// </summary>
+ public UserCenter.BackViewControl backButton;
+ /// <summary>
+ /// 鐘舵�佹爮-楂樺害涓�80
+ /// </summary>
+ public FrameLayout topStatuFrameLayout;
+ /// <summary>
+ /// The top view.
+ /// </summary>
+ public FrameLayout topView;
+ /// <summary>
+ /// 鏍囬
+ /// </summary>
+ public Button topTitle;
+
+
+ #endregion
+
+ #region 鈼� 鏋勯�犳柟娉昣______________________
+ /// <summary>
+ /// 鏋勯�犳柟娉�
+ /// </summary>
+ public TopFrameLayout()
+ {
+ BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor;
+ Width = Application.GetRealWidth(CommonFormResouce.AppRealWidth);
+ Height = Application.GetRealHeight(CommonFormResouce.TopFrameLayout_Height);
+ }
+
+ #endregion
+
+ #region 鈼� 鍒濆鍖朹_________________________
+
+ public void InitTopview()
+ {
+ //鐘舵�佹爮
+ AddTopStatuFrame();
+ //topview
+ AddTopview();
+ //娣诲姞杩斿洖閿�
+ AddBackBtn();
+ //鏍囬
+ AddTitle();
+ }
+
+ #endregion
+
+ #region 鈼� topview________________________
+ /// <summary>
+ /// Adds the topview.
+ /// </summary>
+ private void AddTopview()
+ {
+ topView = new FrameLayout
+ {
+ 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
+
+ #region 鈼� 杩斿洖閿甠_________________________
+ /// <summary>
+ /// 杩斿洖閿�
+ /// </summary>
+ /// <returns>The back button.</returns>
+ private void AddBackBtn()
+ {
+ backButton = new UserCenter.BackViewControl();
+ topView.AddChidren(backButton);
+ backButton.InitControl();
+ //鍚庣画鍐嶈皟鏁�
+ backButton.Y = backButton.Y - Application.GetRealHeight(4);
+ }
+
+ #endregion
+
+ #region 鈼� 鐘舵�佹爮__________________________
+
+ /// <summary>
+ /// 鐘舵�佹爮
+ /// </summary>
+ private void AddTopStatuFrame()
+ {
+ topStatuFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(CommonFormResouce.TopStatuFrameLayout_Height),
+ Width = Application.GetRealWidth(CommonPage.AppRealWidth)
+ };
+ AddChidren(topStatuFrameLayout);
+ }
+
+ #endregion
+
+ #region 鈼� 鏍囬___________________________
+ /// <summary>
+ /// 鏍囬
+ /// </summary>
+ private void AddTitle()
+ {
+ 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>
+ /// 璁剧疆鏍囬
+ /// </summary>
+ /// <param name="title">Title.</param>
+ public void SetTopTitle(string title)
+ {
+ topTitle.Text = title;
+ }
+ /// <summary>
+ /// 璁剧疆鏍囬
+ /// </summary>
+ /// <param name="title"></param>
+ public void SetTopTitle(int title)
+ {
+ SetTopTitle(Language.StringByID(title));
+ }
+
+ #endregion
+ }
+}
--
Gitblit v1.8.0