From dfcb2a1844fd55b57bae23e290b30ec6380e8508 Mon Sep 17 00:00:00 2001
From: chenqiyang <1406175257@qq.com>
Date: 星期五, 26 八月 2022 15:04:22 +0800
Subject: [PATCH] 更新全视通dll
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/BottomMenuSelectForm.cs | 139 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 139 insertions(+), 0 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/BottomMenuSelectForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/BottomMenuSelectForm.cs
new file mode 100644
index 0000000..56314bb
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/BottomMenuSelectForm.cs
@@ -0,0 +1,139 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+ /// <summary>
+ /// 搴曢儴寮圭獥鐨勮彍鍗曢�夋嫨鎺т欢
+ /// </summary>
+ public class BottomMenuSelectForm : DialogCommonForm
+ {
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+ /// <summary>
+ /// 鑿滃崟楂樺害
+ /// </summary>
+ private int menuHeight = Application.GetRealHeight(156);
+ /// <summary>
+ /// 鑿滃崟鎬绘暟
+ /// </summary>
+ private int m_MenuCount = 0;
+ /// <summary>
+ /// 鑿滃崟妗屽竷鎺т欢
+ /// </summary>
+ private FrameLayout frameMenuTable = null;
+ /// <summary>
+ /// 瀹瑰櫒
+ /// </summary>
+ private FrameLayout frameAnimateTable = null;
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖朹____________________________
+
+ /// <summary>
+ /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+ /// </summary>
+ /// <param name="menuCount">鑿滃崟鎬绘暟(涓嶅惈鍙栨秷鑿滃崟)</param>
+ public void ShowForm(int menuCount)
+ {
+ this.m_MenuCount = menuCount;
+ //鍒濆鍖栦腑閮ㄤ俊鎭�
+ this.InitMiddleFrame(menuCount);
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+ /// </summary>
+ /// <param name="menuCount">鑿滃崟鎬绘暟(涓嶅惈鍙栨秷鑿滃崟)</param>
+ private void InitMiddleFrame(int menuCount)
+ {
+ //瀹瑰櫒
+ int framebackHeight = this.menuHeight * (menuCount + 1) + Application.GetRealHeight(23) * 2;
+ this.frameAnimateTable = new FrameLayout();
+ frameAnimateTable.Height = framebackHeight;
+ frameAnimateTable.Y = bodyFrameLayout.Height - framebackHeight;
+ bodyFrameLayout.AddChidren(frameAnimateTable);
+
+ //鑿滃崟鐨勬甯冩帶浠�
+ this.frameMenuTable = new FrameLayout();
+ frameMenuTable.Gravity = Gravity.CenterHorizontal;
+ frameMenuTable.Radius = (uint)Application.GetRealHeight(35);
+ frameMenuTable.Width = Application.GetRealWidth(1034);
+ frameMenuTable.Height = this.menuHeight * menuCount;
+ frameMenuTable.BackgroundColor = UserCenterColor.Current.White;
+ frameAnimateTable.AddChidren(frameMenuTable);
+
+ //鍙栨秷
+ var frameCancel = new FrameLayout();
+ frameCancel.Y = frameAnimateTable.Height - this.menuHeight - Application.GetRealHeight(23);
+ frameCancel.Gravity = Gravity.CenterHorizontal;
+ frameCancel.Radius = (uint)Application.GetRealHeight(35);
+ frameCancel.Width = Application.GetRealWidth(1034);
+ frameCancel.Height = this.menuHeight;
+ frameCancel.BackgroundColor = UserCenterColor.Current.White;
+ frameAnimateTable.AddChidren(frameCancel);
+ var btnCancel = new NormalViewControl(Application.GetRealWidth(900), this.menuHeight, false);
+ btnCancel.Y = frameAnimateTable.Height - this.menuHeight - Application.GetRealHeight(23);
+ btnCancel.Gravity = Gravity.CenterHorizontal;
+ btnCancel.TextAlignment = TextAlignment.Center;
+ btnCancel.TextColor = 0xff0075ff;
+ btnCancel.TextSize = 17;
+ btnCancel.TextID = R.MyInternationalizationString.uCancel;
+ frameAnimateTable.AddChidren(btnCancel);
+ btnCancel.ButtonClickEvent += (sender, e) =>
+ {
+ //鍏抽棴鐣岄潰
+ this.CloseForm();
+ };
+ }
+
+ #endregion
+
+ #region 鈻� 涓�鑸柟娉昣__________________________
+
+ /// <summary>
+ /// 娣诲姞鑿滃崟
+ /// </summary>
+ /// <param name="strMenu">鑿滃崟鏂囨湰</param>
+ /// <param name="selectEvent">鑿滃崟閫夋嫨鐨勪簨浠�</param>
+ /// <param name="clickClose">鑿滃崟鐐瑰嚮鏃�,鏄惁鏃犳潯浠跺叧闂晫闈�</param>
+ public void AddMenu(string strMenu, Action selectEvent, bool clickClose = true)
+ {
+ //绾�
+ if (this.frameMenuTable.ChildrenCount > 0)
+ {
+ var btnLine = new NormalViewControl(frameMenuTable.Width, ControlCommonResourse.BottomLineHeight, false);
+ btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
+ btnLine.Y = this.frameMenuTable.GetChildren(this.frameMenuTable.ChildrenCount - 1).Bottom;
+ this.frameMenuTable.AddChidren(btnLine);
+ }
+
+ //鑿滃崟
+ var btnMenu = new NormalViewControl(Application.GetRealWidth(900), this.menuHeight, false);
+ if (this.frameMenuTable.ChildrenCount > 0)
+ {
+ btnMenu.Y = this.frameMenuTable.GetChildren(this.frameMenuTable.ChildrenCount - 1).Bottom;
+ }
+ btnMenu.Gravity = Gravity.CenterHorizontal;
+ btnMenu.TextAlignment = TextAlignment.Center;
+ btnMenu.TextColor = 0xff0075ff;
+ btnMenu.TextSize = 17;
+ btnMenu.Text = strMenu;
+ this.frameMenuTable.AddChidren(btnMenu);
+ btnMenu.ButtonClickEvent += (sender, e) =>
+ {
+ if (clickClose == true)
+ {
+ //鍏抽棴鐣岄潰
+ this.CloseForm();
+ }
+ selectEvent?.Invoke();
+ selectEvent = null;
+ };
+ }
+
+ #endregion
+ }
+}
--
Gitblit v1.8.0