From 642fcdaeb496d9a8f3154e17fd76005be3fcf197 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 03 十二月 2019 12:00:24 +0800
Subject: [PATCH] 2019.12.3
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomRightClickButton.cs | 131 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 131 insertions(+), 0 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomRightClickButton.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomRightClickButton.cs
new file mode 100755
index 0000000..5bc2d3d
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomRightClickButton.cs
@@ -0,0 +1,131 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+ /// <summary>
+ /// 浣嶄簬鍙充笅瑙掔殑鍗曞嚮鎺т欢
+ /// </summary>
+ public class BottomRightClickButton : FrameLayoutControl
+ {
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+#if Android
+ /// <summary>
+ /// 鎸夐挳(娌″垵濮嬪寲涔嬪墠,瀹冧负null)
+ /// </summary>
+ private NormalViewControl btnConfirm = null;
+ /// <summary>
+ /// 椤堕儴鍦嗚
+ /// </summary>
+ private NormalViewControl btnTopTemp = null;
+ /// <summary>
+ /// 宸︿笅瑙掑渾瑙�
+ /// </summary>
+ private NormalViewControl btnBomTemp = null;
+#endif
+#if iOS
+ /// <summary>
+ /// 鎸夐挳(娌″垵濮嬪寲涔嬪墠,瀹冧负null)
+ /// </summary>
+ private NormalClickButton btnConfirm = null;
+#endif
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖朹____________________________
+
+ /// <summary>
+ /// 浣嶄簬鍙充笅瑙掔殑鍗曞嚮鎺т欢
+ /// </summary>
+ /// <param name="i_width">瀹藉害,鐪熷疄鍊�</param>
+ /// <param name="i_height">楂樺害,鐪熷疄鍊�</param>
+ /// <param name="i_radius">鍦嗚搴�(鍙瀹夊崜鏈夋晥)</param>
+ public BottomRightClickButton(int i_width, int i_height, uint i_radius = 8)
+ {
+ this.Height = i_height;
+ this.Width = i_width;
+ this.Gravity = Gravity.BottomRight;
+
+#if Android
+ this.Radius = i_radius;
+#endif
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栨帶浠�
+ /// </summary>
+ /// <param name="i_text">鏂囨湰淇℃伅</param>
+ public void InitControl(string i_text)
+ {
+#if Android
+ this.BackgroundColor = UserCenterColor.Current.ClickButtonDefultColor;
+ //鎶婁笂鍦嗚瑕嗙洊涓烘柟瑙�
+ this.btnTopTemp = new NormalViewControl(this.Width, Application.GetRealHeight(40), false);
+ btnTopTemp.BackgroundColor = UserCenterColor.Current.ClickButtonDefultColor;
+ this.AddChidren(btnTopTemp, ChidrenBindMode.BindEventOnly);
+ //鎶婂乏涓嬪渾瑙掕鐩栦负鏂硅
+ this.btnBomTemp = new NormalViewControl(this.Width / 2, Application.GetRealHeight(40), false);
+ btnBomTemp.BackgroundColor = UserCenterColor.Current.ClickButtonDefultColor;
+ btnBomTemp.Gravity = Gravity.BottomLeft;
+ this.AddChidren(btnBomTemp, ChidrenBindMode.BindEventOnly);
+ //纭鎸夐挳
+ this.btnConfirm = new NormalViewControl(this.Width - Application.GetRealWidth(10), Application.GetRealHeight(60), false);
+ btnConfirm.Gravity = Gravity.Center;
+ btnConfirm.TextColor = UserCenterColor.Current.White;
+ btnConfirm.Text = i_text;
+ btnConfirm.TextAlignment = TextAlignment.Center;
+ this.AddChidren(btnConfirm, ChidrenBindMode.BindEventOnly);
+
+ //閲嶅啓鎺т欢鐐瑰嚮鐘舵��
+ this.SelectStatuEvent += (statu) =>
+ {
+ if (statu == true)
+ {
+ this.BackgroundColor = UserCenterColor.Current.ButtonClickStatuColor;
+ btnTopTemp.BackgroundColor = UserCenterColor.Current.ButtonClickStatuColor;
+ btnBomTemp.BackgroundColor = UserCenterColor.Current.ButtonClickStatuColor;
+ btnConfirm.BackgroundColor = UserCenterColor.Current.ButtonClickStatuColor;
+ }
+ else
+ {
+ this.BackgroundColor = UserCenterColor.Current.ClickButtonDefultColor;
+ btnTopTemp.BackgroundColor = UserCenterColor.Current.ClickButtonDefultColor;
+ btnBomTemp.BackgroundColor = UserCenterColor.Current.ClickButtonDefultColor;
+ btnConfirm.BackgroundColor = UserCenterColor.Current.ClickButtonDefultColor;
+ }
+ };
+#endif
+#if iOS
+ //纭鎸夐挳
+ this.btnConfirm = new NormalClickButton(this.Width, this.Height, false);
+ btnConfirm.Gravity = Gravity.BottomRight;
+ btnConfirm.TextColor = UserCenterColor.Current.White;
+ btnConfirm.Text = i_text;
+ btnConfirm.TextAlignment = TextAlignment.Center;
+ btnConfirm.BackgroundColor = UserCenterColor.Current.ClickButtonDefultColor;
+ btnConfirm.oldBackgroundColor = UserCenterColor.Current.ClickButtonDefultColor;
+ this.AddChidren(btnConfirm, ChidrenBindMode.BindEventOnly);
+#endif
+ }
+
+ #endregion
+
+ #region 鈻� 涓�鑸柟娉昣__________________________
+
+ /// <summary>
+ /// 璁剧疆鎸夐挳鐨勬枃鏈俊鎭�
+ /// </summary>
+ /// <param name="txtValue"></param>
+ public void SetButtonText(string txtValue)
+ {
+ if (this.btnConfirm != null)
+ {
+ this.btnConfirm.Text = txtValue;
+ }
+ }
+
+ #endregion
+ }
+}
--
Gitblit v1.8.0