From 43110ef19b9e69d5afd7ce0a978565786baa87b5 Mon Sep 17 00:00:00 2001
From: lss <lsc@hdlchina.com.cn>
Date: 星期三, 27 四月 2022 14:13:53 +0800
Subject: [PATCH] 修复红米手机闪退问题
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomLeftClickButton.cs | 266 ++++++++++++++++++++++++++--------------------------
1 files changed, 133 insertions(+), 133 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomLeftClickButton.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomLeftClickButton.cs
old mode 100755
new mode 100644
index c90de98..ba260e7
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomLeftClickButton.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomLeftClickButton.cs
@@ -1,133 +1,133 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Shared.Phone.UserCenter
-{
- /// <summary>
- /// 浣嶄簬宸︿笅瑙掔殑鍗曞嚮鎺т欢
- /// </summary>
- public class BottomLeftClickButton : FrameLayoutStatuControl
- {
- #region 鈻� 鍙橀噺澹版槑___________________________
-
-#if Android
- /// <summary>
- /// 鎸夐挳(娌″垵濮嬪寲涔嬪墠,瀹冧负null)
- /// </summary>
- private NormalViewControl btnButton = null;
- /// <summary>
- /// 椤堕儴鍦嗚
- /// </summary>
- private NormalViewControl btnTopTemp = null;
- /// <summary>
- /// 宸︿笅瑙掑渾瑙�
- /// </summary>
- private NormalViewControl btnBomTemp = null;
-#endif
-#if iOS
- /// <summary>
- /// 鎸夐挳(娌″垵濮嬪寲涔嬪墠,瀹冧负null)
- /// </summary>
- private NormalClickButton btnButton = null;
-#endif
-
- #endregion
-
- #region 鈻� 鍒濆鍖朹____________________________
-
- /// <summary>
- /// 浣嶄簬宸︿笅瑙掔殑鍗曞嚮鎺т欢
- /// </summary>
- /// <param name="i_width">瀹藉害,鐪熷疄鍊�</param>
- /// <param name="i_height">楂樺害,鐪熷疄鍊�</param>
- /// <param name="i_radius">鍦嗚搴�(鍙瀹夊崜鏈夋晥)</param>
- public BottomLeftClickButton(int i_width, int i_height, int i_radius = 17)
- {
- this.Height = i_height;
- this.Width = i_width;
- this.Gravity = Gravity.BottomLeft;
-
-#if Android
- this.RadiusEx = i_radius;
-#endif
- }
-
- /// <summary>
- /// 鍒濆鍖栨帶浠�
- /// </summary>
- /// <param name="i_text">鏂囨湰淇℃伅</param>
- public void InitControl(string i_text)
- {
- uint i_backColor = 0xfff5f6fa;
-#if Android
- this.BackgroundColor = i_backColor;
- //鎶婁笂鍦嗚瑕嗙洊涓烘柟瑙�
- this.btnTopTemp = new NormalViewControl(this.Width, Application.GetRealHeight(40), false);
- btnTopTemp.BackgroundColor = i_backColor;
- this.AddChidren(btnTopTemp, ChidrenBindMode.BindEvent);
- //鎶婂彸涓嬪渾瑙掕鐩栦负鏂硅
- this.btnBomTemp = new NormalViewControl(this.Width / 2, Application.GetRealHeight(40), false);
- btnBomTemp.BackgroundColor = i_backColor;
- btnBomTemp.Gravity = Gravity.BottomRight;
- this.AddChidren(btnBomTemp, ChidrenBindMode.BindEvent);
- //鍙栨秷鎸夐挳
- this.btnButton = new NormalViewControl(this.Width - Application.GetRealWidth(10), Application.GetRealHeight(60), false);
- btnButton.Gravity = Gravity.Center;
- btnButton.TextColor = UserCenterColor.Current.TextGrayColor1;
- btnButton.Text = i_text;
- btnButton.TextAlignment = TextAlignment.Center;
- btnButton.BackgroundColor = i_backColor;
- this.AddChidren(btnButton, ChidrenBindMode.BindEvent);
-
- //閲嶅啓鎺т欢鐐瑰嚮鐘舵��
- this.SelectStatuEvent += (statu) =>
- {
- if (statu == true)
- {
- this.BackgroundColor = UserCenterColor.Current.ButtonClickStatuColor;
- btnTopTemp.BackgroundColor = UserCenterColor.Current.ButtonClickStatuColor;
- btnBomTemp.BackgroundColor = UserCenterColor.Current.ButtonClickStatuColor;
- btnButton.BackgroundColor = UserCenterColor.Current.ButtonClickStatuColor;
- }
- else
- {
- this.BackgroundColor = i_backColor;
- btnTopTemp.BackgroundColor = i_backColor;
- btnBomTemp.BackgroundColor = i_backColor;
- btnButton.BackgroundColor = i_backColor;
- }
- };
-#endif
-#if iOS
- //鍙栨秷鎸夐挳
- this.btnButton = new NormalClickButton(this.Width, this.Height, false);
- btnButton.Gravity = Gravity.BottomLeft;
- btnButton.TextColor = UserCenterColor.Current.TextGrayColor1;
- btnButton.Text = i_text;
- btnButton.TextAlignment = TextAlignment.Center;
- btnButton.BackgroundColor = i_backColor;
- btnButton.oldBackgroundColor = i_backColor;
- this.AddChidren(btnButton, ChidrenBindMode.BindEvent);
-#endif
- }
-
- #endregion
-
- #region 鈻� 涓�鑸柟娉昣__________________________
-
- /// <summary>
- /// 璁剧疆鎸夐挳鐨勬枃鏈俊鎭�
- /// </summary>
- /// <param name="txtValue"></param>
- public void SetButtonText(string txtValue)
- {
- if (this.btnButton != null)
- {
- this.btnButton.Text = txtValue;
- }
- }
-
- #endregion
- }
-}
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+ /// <summary>
+ /// 浣嶄簬宸︿笅瑙掔殑鍗曞嚮鎺т欢
+ /// </summary>
+ public class BottomLeftClickButton : FrameLayoutStatuControl
+ {
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+#if Android
+ /// <summary>
+ /// 鎸夐挳(娌″垵濮嬪寲涔嬪墠,瀹冧负null)
+ /// </summary>
+ private NormalViewControl btnButton = null;
+ /// <summary>
+ /// 椤堕儴鍦嗚
+ /// </summary>
+ private NormalViewControl btnTopTemp = null;
+ /// <summary>
+ /// 宸︿笅瑙掑渾瑙�
+ /// </summary>
+ private NormalViewControl btnBomTemp = null;
+#endif
+#if iOS
+ /// <summary>
+ /// 鎸夐挳(娌″垵濮嬪寲涔嬪墠,瀹冧负null)
+ /// </summary>
+ private NormalClickButton btnButton = null;
+#endif
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖朹____________________________
+
+ /// <summary>
+ /// 浣嶄簬宸︿笅瑙掔殑鍗曞嚮鎺т欢
+ /// </summary>
+ /// <param name="i_width">瀹藉害,鐪熷疄鍊�</param>
+ /// <param name="i_height">楂樺害,鐪熷疄鍊�</param>
+ /// <param name="i_radius">鍦嗚搴�(鍙瀹夊崜鏈夋晥)</param>
+ public BottomLeftClickButton(int i_width, int i_height, int i_radius = 17)
+ {
+ this.Height = i_height;
+ this.Width = i_width;
+ this.Gravity = Gravity.BottomLeft;
+
+#if Android
+ this.RadiusEx = i_radius;
+#endif
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栨帶浠�
+ /// </summary>
+ /// <param name="i_text">鏂囨湰淇℃伅</param>
+ public void InitControl(string i_text)
+ {
+ uint i_backColor = 0xfff5f6fa;
+#if Android
+ this.BackgroundColor = i_backColor;
+ //鎶婁笂鍦嗚瑕嗙洊涓烘柟瑙�
+ this.btnTopTemp = new NormalViewControl(this.Width, Application.GetRealHeight(40), false);
+ btnTopTemp.BackgroundColor = i_backColor;
+ this.AddChidren(btnTopTemp, ChidrenBindMode.BindEvent);
+ //鎶婂彸涓嬪渾瑙掕鐩栦负鏂硅
+ this.btnBomTemp = new NormalViewControl(this.Width / 2, Application.GetRealHeight(40), false);
+ btnBomTemp.BackgroundColor = i_backColor;
+ btnBomTemp.Gravity = Gravity.BottomRight;
+ this.AddChidren(btnBomTemp, ChidrenBindMode.BindEvent);
+ //鍙栨秷鎸夐挳
+ this.btnButton = new NormalViewControl(this.Width - Application.GetRealWidth(10), Application.GetRealHeight(60), false);
+ btnButton.Gravity = Gravity.Center;
+ btnButton.TextColor = UserCenterColor.Current.TextGrayColor1;
+ btnButton.Text = i_text;
+ btnButton.TextAlignment = TextAlignment.Center;
+ btnButton.BackgroundColor = i_backColor;
+ this.AddChidren(btnButton, ChidrenBindMode.BindEvent);
+
+ //閲嶅啓鎺т欢鐐瑰嚮鐘舵��
+ this.SelectStatuEvent += (statu) =>
+ {
+ if (statu == true)
+ {
+ this.BackgroundColor = UserCenterColor.Current.ButtonClickStatuColor;
+ btnTopTemp.BackgroundColor = UserCenterColor.Current.ButtonClickStatuColor;
+ btnBomTemp.BackgroundColor = UserCenterColor.Current.ButtonClickStatuColor;
+ btnButton.BackgroundColor = UserCenterColor.Current.ButtonClickStatuColor;
+ }
+ else
+ {
+ this.BackgroundColor = i_backColor;
+ btnTopTemp.BackgroundColor = i_backColor;
+ btnBomTemp.BackgroundColor = i_backColor;
+ btnButton.BackgroundColor = i_backColor;
+ }
+ };
+#endif
+#if iOS
+ //鍙栨秷鎸夐挳
+ this.btnButton = new NormalClickButton(this.Width, this.Height, false);
+ btnButton.Gravity = Gravity.BottomLeft;
+ btnButton.TextColor = UserCenterColor.Current.TextGrayColor1;
+ btnButton.Text = i_text;
+ btnButton.TextAlignment = TextAlignment.Center;
+ btnButton.BackgroundColor = i_backColor;
+ btnButton.oldBackgroundColor = i_backColor;
+ this.AddChidren(btnButton, ChidrenBindMode.BindEvent);
+#endif
+ }
+
+ #endregion
+
+ #region 鈻� 涓�鑸柟娉昣__________________________
+
+ /// <summary>
+ /// 璁剧疆鎸夐挳鐨勬枃鏈俊鎭�
+ /// </summary>
+ /// <param name="txtValue"></param>
+ public void SetButtonText(string txtValue)
+ {
+ if (this.btnButton != null)
+ {
+ this.btnButton.Text = txtValue;
+ }
+ }
+
+ #endregion
+ }
+}
--
Gitblit v1.8.0