From 627093aca723d4bfb971b97c828e8b3a22dbda78 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 17 七月 2020 17:26:19 +0800
Subject: [PATCH] 2020-07-17-1
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs | 78 +++++++++++++++++++++++++++-----------
1 files changed, 55 insertions(+), 23 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs
index 6427e96..3a2334a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs
@@ -17,7 +17,7 @@
private bool m_CanClick = true;
/// <summary>
/// 璁剧疆鑳藉惁瑙︾偣鍑讳簨浠�
- /// </summary>
+ /// </summary>
public bool CanClick
{
get { return m_CanClick; }
@@ -37,6 +37,10 @@
{
set { this.Radius = (uint)Application.GetRealHeight(value); }
}
+ /// <summary>
+ /// 澹版槑姝ゅ彉閲�,鏃ㄥ湪瀛愮嚎绋嬩篃鑳藉鍘昏幏鍙栦竴涓帶浠剁殑涓婚敭
+ /// </summary>
+ public string MainKey = string.Empty;
/// <summary>
/// 鐐瑰嚮鐨勫潗鏍�
@@ -55,6 +59,23 @@
/// 鎺т欢瑙﹀彂绉诲姩鐨勪簨浠�(鑷韩鎷ユ湁绠楁硶,褰撶Щ鍔ㄥ灏戝儚绱犲悗,瑙﹀彂浜嬩欢,娉ㄦ剰,璇ヤ簨浠跺彲鑳戒細棰戠箒鐨勮Е鍙�)
/// </summary>
public Action ButtonHappenMoveEvent = null;
+
+ #endregion
+
+ #region 鈻� 閲嶅啓褰摜鐨勫睘鎬____________________
+
+ /// <summary>
+ /// 閲嶅啓Text灞炴��
+ /// </summary>
+ public new string Text
+ {
+ //鍏堣繖涔堝紕鍏堝惂
+ get { return base.Text == null ? string.Empty : base.Text; }
+ set
+ {
+ base.Text = value == null ? string.Empty : value;
+ }
+ }
#endregion
@@ -82,8 +103,8 @@
/// <summary>
/// 鍒濆鍖栨帶浠跺ぇ灏�(涓嶄互骞冲潎鍊艰繘琛岀湡瀹炴暟鍊艰绠�)
/// </summary>
- /// <param name="i_Width">瀹藉害</param>
- /// <param name="i_Height">楂樺害</param>
+ /// <param name="i_Width">瀹藉害</param>
+ /// <param name="i_Height">楂樺害</param>
/// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
public void InitSize(int i_Width, int i_Height, bool real = true)
{
@@ -91,50 +112,50 @@
{
i_Width = Application.GetRealWidth(i_Width);
i_Height = Application.GetRealHeight(i_Height);
- }
- this.Height = i_Height;
+ }
+ this.Height = i_Height;
this.Width = i_Width;
}
/// <summary>
/// 鍒濆鍖栨帶浠跺ぇ灏�(涓嶄互骞冲潎鍊艰繘琛岀湡瀹炴暟鍊艰绠�)
/// </summary>
- /// <param name="i_Width">瀹藉害</param>
+ /// <param name="i_Width">瀹藉害</param>
/// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
public void InitSize(int i_Width, bool real = false)
{
if (real == true)
{
i_Width = Application.GetRealWidth(i_Width);
- }
-
- this.Height = ControlCommonResourse.NormalControlHeight;
+ }
+
+ this.Height = ControlCommonResourse.NormalControlHeight;
this.Width = i_Width;
}
/// <summary>
/// 鍒濆鍖栧浘鏍囨帶浠跺ぇ灏�(浠ュ钩鍧囧�艰繘琛岀湡瀹炴暟鍊艰绠�)
/// </summary>
- /// <param name="i_Width">瀹藉害</param>
- /// <param name="i_Height">楂樺害</param>
+ /// <param name="i_Width">瀹藉害</param>
+ /// <param name="i_Height">楂樺害</param>
/// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
public void InitIconSize(int i_Width, int i_Height, bool real = true)
{
if (real == true)
{
- i_Width = Application.GetMinRealAverage(i_Width);
- i_Height = Application.GetMinRealAverage(i_Height);
- }
-
- this.Height = i_Height;
+ i_Width = this.GetPictrueRealSize(i_Width);
+ i_Height = this.GetPictrueRealSize(i_Height);
+ }
+
+ this.Height = i_Height;
this.Width = i_Width;
}
/// <summary>
/// 鍒濆鍖栧浘鐗囨帶浠跺ぇ灏�
/// </summary>
- /// <param name="i_Width">瀹藉害</param>
- /// <param name="i_Height">楂樺害</param>
+ /// <param name="i_Width">瀹藉害</param>
+ /// <param name="i_Height">楂樺害</param>
/// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
public void InitPictrueSize(int i_Width, int i_Height, bool real = true)
{
@@ -142,9 +163,9 @@
{
i_Width = HdlControlLogic.Current.GetPictrueRealSize(i_Width);
i_Height = HdlControlLogic.Current.GetPictrueRealSize(i_Height);
- }
-
- this.Height = i_Height;
+ }
+
+ this.Height = i_Height;
this.Width = i_Width;
}
@@ -164,7 +185,8 @@
this.MouseUpEventHandler -= ButtonBase_MouseUpEventHandler;
return;
}
- if (CanClick == true)
+ //2020.05.14杩藉姞IsFormAdding:鐣岄潰杩樺湪鍔犺浇涓�,涓嶈兘鍐嶇偣鍑�
+ if (CanClick == true && ControlCommonResourse.IsFormAdding == false)
{
//Log鍑哄姏
this.WriteLog(0);
@@ -319,6 +341,16 @@
#endif
}
+ /// <summary>
+ /// 璁$畻鍥剧墖鐨勭湡瀹為珮瀹藉害
+ /// </summary>
+ /// <param name="i_size"></param>
+ /// <returns></returns>
+ public int GetPictrueRealSize(int i_size)
+ {
+ return HdlControlLogic.Current.GetPictrueRealSize(i_size);
+ }
+
#endregion
#region 鈻� Log鍑哄姏____________________________
@@ -326,7 +358,7 @@
/// <summary>
/// 璇ユ帶浠舵墍灞炵殑鐣岄潰鍚嶅瓧
/// </summary>
- private string formName = null;
+ public string formName = null;
/// <summary>
/// 鎺т欢鍚嶅瓧
/// </summary>
--
Gitblit v1.8.0