From 2e7e5f9af5b32cfe1fc3c6ba40bf7eb984bbd0a4 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 11 五月 2020 17:52:06 +0800
Subject: [PATCH] ???????

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs |   94 ++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 77 insertions(+), 17 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
index 86b3602..c825e64 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs
@@ -9,6 +9,28 @@
     /// </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>
@@ -27,8 +49,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)
         {
@@ -36,44 +58,71 @@
             {
                 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 = true)
         {
             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 InitAvgSize(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;
+        }
+
+        #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
@@ -92,8 +141,19 @@
                 return;
             }
             //Y杞撮噸缃�
-            this.Y = UserCenterLogic.GetControlChidrenYaxis(this.Parent.Height, this.Height, alignment, Space);
+            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