From da3634e011bbda29cf4e1c168997b780fe795b20 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期三, 13 五月 2020 09:05:23 +0800
Subject: [PATCH] 优化新风模块和新风面板的测试功能,请合并代码
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 159 insertions(+), 0 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs
new file mode 100755
index 0000000..c825e64
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs
@@ -0,0 +1,159 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+ /// <summary>
+ /// 杈撳叆妗嗘帶浠剁殑鏈�鍒濆師鍨�(涓嶅缓璁慨鏀瑰拰鐩存帴浣跨敤):鏍囧噯瀛椾綋棰滆壊锛屾枃瀛楀悜宸﹂潬榻�,14鍙峰瓧
+ /// </summary>
+ public class TextInputBase : EditText
+ {
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+ /// <summary>
+ /// 鑱斿姩搴曠嚎
+ /// </summary>
+ private NormalViewControl btnLineTemp = null;
+ /// <summary>
+ /// 鑱斿姩搴曠嚎(鍊艰緭鍏ヤ箣鍚�,绾跨殑棰滆壊浼氬彉)
+ /// </summary>
+ public NormalViewControl btnLine
+ {
+ set
+ {
+ this.btnLineTemp = value;
+ //鍏夋爣浜嬩欢
+ this.FoucsChanged -= this.TxtCode_FoucsChangedEvent;
+ this.FoucsChanged += this.TxtCode_FoucsChangedEvent;
+ }
+ }
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖朹____________________________
+
+ /// <summary>
+ /// 杈撳叆妗嗘帶浠剁殑鏈�鍒濆師鍨�(涓嶅缓璁慨鏀瑰拰鐩存帴浣跨敤):鏍囧噯瀛椾綋棰滆壊锛屾枃瀛楀悜宸﹂潬榻�,14鍙峰瓧
+ /// </summary>
+ public TextInputBase()
+ {
+ //娴嬭瘯锛屽叏浣撹緭鍏ユ涓�14鍙峰瓧
+ this.TextSize = 14;
+
+ this.PlaceholderTextColor = UserCenterColor.Current.TextTipColor;
+ this.TextColor = UserCenterColor.Current.TextColor1;
+ this.TextAlignment = TextAlignment.CenterLeft;
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栨帶浠跺ぇ灏�(涓嶄互骞冲潎鍊艰繘琛岀湡瀹炴暟鍊艰绠�)
+ /// </summary>
+ /// <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)
+ {
+ if (real == true)
+ {
+ i_Width = Application.GetRealWidth(i_Width);
+ i_Height = Application.GetRealHeight(i_Height);
+ }
+
+ this.Height = i_Height;
+ this.Width = i_Width;
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栨帶浠跺ぇ灏�(涓嶄互骞冲潎鍊艰繘琛岀湡瀹炴暟鍊艰绠�)
+ /// </summary>
+ /// <param name="i_Width">瀹藉害</param>
+ /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
+ public void InitSize(int i_Width, bool real = true)
+ {
+ if (real == true)
+ {
+ i_Width = Application.GetRealWidth(i_Width);
+ }
+
+ this.Height = ControlCommonResourse.NormalControlHeight;
+ this.Width = i_Width;
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栨帶浠跺ぇ灏�(浠ュ钩鍧囧�艰繘琛岀湡瀹炴暟鍊艰绠�)
+ /// </summary>
+ /// <param name="i_Width">瀹藉害</param>
+ /// <param name="i_Height">楂樺害</param>
+ /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
+ public void InitAvgSize(int i_Width, int i_Height, bool real = true)
+ {
+ if (real == true)
+ {
+ i_Width = this.GetPictrueRealSize(i_Width);
+ i_Height = this.GetPictrueRealSize(i_Height);
+ }
+
+ this.Height = i_Height;
+ this.Width = i_Width;
+ }
+
+ #endregion
+
+ #region 鈻� 浜嬩欢_______________________________
+
+ /// <summary>
+ /// 鐒︾偣鍙樻洿浜嬩欢
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void TxtCode_FoucsChangedEvent(object sender, FocusEventArgs e)
+ {
+ if (e.Focus == false)
+ {
+ if (btnLineTemp != null)
+ {
+ btnLineTemp.BackgroundColor = UserCenterColor.Current.ButtomLine;
+ }
+ }
+ else
+ {
+ if (btnLineTemp != null)
+ {
+ btnLineTemp.BackgroundColor = UserCenterColor.Current.TextFrameSelectColor;
+ }
+ }
+ }
+
+ #endregion
+
+ #region 鈻� 涓�鑸柟娉昣__________________________
+
+ /// <summary>
+ /// Y杞撮噸缃�(鐪熷疄鏁板��,娌℃湁鐖跺鍣ㄦ棤鏁�)
+ /// </summary>
+ /// <param name="alignment">涓婁笅瀵归綈鏂瑰紡</param>
+ /// <param name="Space">涓婁笅涓ら儴鍒嗙殑闂磋窛</param>
+ public void ReSetYaxis(UViewAlignment alignment, int Space = 0)
+ {
+ if (this.Parent == null)
+ {
+ return;
+ }
+ //Y杞撮噸缃�
+ this.Y = HdlControlLogic.Current.GetControlChidrenYaxis(this.Parent.Height, this.Height, alignment, Space);
+ }
+
+ /// <summary>
+ /// 璁$畻鍥剧墖鐨勭湡瀹為珮瀹藉害
+ /// </summary>
+ /// <param name="i_size"></param>
+ /// <returns></returns>
+ public int GetPictrueRealSize(int i_size)
+ {
+ return HdlControlLogic.Current.GetPictrueRealSize(i_size);
+ }
+
+ #endregion
+ }
+}
--
Gitblit v1.8.0