From ade5917841b0fdcb1df7353ef7c56b1a1bdc9282 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期二, 22 九月 2020 10:03:32 +0800
Subject: [PATCH] 删除 Gateway.Ios文件

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs |  236 ++++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 186 insertions(+), 50 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
index 3276775..037155f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
@@ -1,18 +1,18 @@
-锘縰sing System;
-using System.Collections.Generic;
-
-namespace Shared.Phone.UserCenter
-{
-    /// <summary>
-    /// 鍋氭垚涓�涓猂owLayout鍨嬬殑FrameLayout
-    /// </summary>
-    public class FrameRowControl : FrameLayoutControl
+锘縰sing System;
+using System.Collections.Generic;
+
+namespace Shared.Phone.UserCenter
+{
+    /// <summary>
+    /// 鍋氭垚涓�涓猂owLayout鍨嬬殑FrameLayout
+    /// </summary>
+    public class FrameRowControl : FrameLayoutStatuControl
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
         /// <summary>
         /// 姝ゆ帶浠剁殑璇嗗埆涓婚敭(鑷畾涔夎缃殑)
-        /// </summary>
+        /// </summary>
         public string MainKeys = string.Empty;
         /// <summary>
         /// 宸﹀亸绉婚噺,鍙拡瀵瑰唴缃帶浠舵湁鏁�(杩欐槸涓�涓湡瀹炲��,榛樿涓嶅亸绉汇�傛鏁颁负鍚戝彸鍋忕Щ,璐熸暟涓哄悜宸﹀亸绉�)
@@ -30,30 +30,40 @@
         /// 鍙宠竟鍥炬爣鎺т欢鐨勫ぇ灏�
         /// </summary>
         private int rightIconSize = 0;
+        /// <summary>
+        /// 搴曠嚎鎺т欢
+        /// </summary>
+        private NormalViewControl btnBottomLine = null;
 
-        #endregion
+        #endregion
 
         #region 鈻� 鍒濆鍖朹____________________________
 
         /// <summary>
         /// 鍋氭垚涓�涓猂owLayout鍨嬬殑FrameLayout
-        /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
-        public FrameRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
-        {
+        /// </summary>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
+        public FrameRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
+        {
             this.Height = ControlCommonResourse.ListViewRowHeight;
-            this.Width = Application.CurrentWidth;
-        }
+            this.Width = Application.CurrentWidth;
+        }
 
         #endregion
 
         #region 鈻� 娣诲姞搴曠嚎___________________________
 
         /// <summary>
-        /// 娣诲姞搴曠嚎(濡傛灉宸﹁竟鏈夊浘鏍囷紝鍒欏厛娣诲姞鍥炬爣锛屽啀娣诲姞搴曠嚎)
-        /// </summary>
-        public NormalViewControl AddBottomLine()
+        /// <para>娣诲姞搴曠嚎(濡傛灉宸﹁竟鏈夊浘鏍囷紝鍒欏厛娣诲姞鍥炬爣锛屽啀娣诲姞搴曠嚎)</para>
+        /// <para>瀹冪殑闀垮害涓猴細褰撳墠鎺т欢瀹藉害-宸﹀彸鍥哄畾闂磋窛-宸﹁竟鍥剧墖瀹藉害(濡傛灉鏈�)-鍙宠竟鐨勫亸绉婚噺</para>
+        /// </summary>
+        public virtual NormalViewControl AddBottomLine()
         {
+            if (this.btnBottomLine != null)
+            {
+                //宸茬粡娣诲姞浜嗗簳绾�
+                return btnBottomLine;
+            }
             int lineWidth = this.Width - ControlCommonResourse.XXLeft * 2 - LeftOffset - RightOffset;
             int XX = ControlCommonResourse.XXLeft + LeftOffset;
             if (leftIconSize > 0)
@@ -61,13 +71,13 @@
                 lineWidth = lineWidth - leftIconSize - Application.GetRealWidth(35);
                 XX = XX + leftIconSize + Application.GetRealWidth(35);
             }
-            var btnLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false);
-            btnLine.X = XX;
-            btnLine.Y = this.Height - ControlCommonResourse.BottomLineHeight;
-            btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
-            base.AddChidren(btnLine);
+            this.btnBottomLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false);
+            btnBottomLine.X = XX;
+            btnBottomLine.Y = this.Height - ControlCommonResourse.BottomLineHeight;
+            btnBottomLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
+            base.AddChidren(btnBottomLine);
 
-            return btnLine;
+            return btnBottomLine;
         }
 
         #endregion
@@ -80,7 +90,7 @@
         /// <param name="i_caption">鍐呭</param>
         /// <param name="i_width">瀹藉害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
-        /// <returns></returns>
+        /// <returns></returns>
         public NormalViewControl AddLeftCaption(string i_caption, int i_width, bool real = true)
         {
             if (real == true)
@@ -88,7 +98,7 @@
                 i_width = Application.GetRealWidth(i_width);
             }
             var contr = this.AddLeftCaption(i_caption, i_width, this.Height, false);
-            this.AddChidren(contr, ChidrenBindMode.BindEventOnly);
+            this.AddChidren(contr, ChidrenBindMode.BindEvent);
             if (chidrenYaxis != 0)
             {
                 contr.Y += chidrenYaxis;
@@ -104,7 +114,7 @@
         /// <param name="i_width">瀹藉害</param>
         /// <param name="i_height">楂樺害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
-        /// <returns></returns>
+        /// <returns></returns>
         public NormalViewControl AddLeftCaption(string i_caption, int i_width, int i_height, bool real = true)
         {
             int XX = ControlCommonResourse.XXLeft + LeftOffset;
@@ -112,13 +122,47 @@
             {
                 XX += this.leftIconSize + Application.GetRealWidth(35);
             }
-            var btnCaption = new NormalViewControl(i_width, real);
+            var btnCaption = new NormalViewControl(i_width, i_height, real);
             btnCaption.X = XX;
 
-            btnCaption.Height = i_height;
             btnCaption.Text = i_caption;
 
             return btnCaption;
+        }
+
+        #endregion
+
+        #region 鈻� 娣诲姞宸﹁竟杈撳叆妗哶____________________
+
+        /// <summary>
+        /// 娣诲姞宸﹁竟杈撳叆妗�(濡傛灉鏈夊浘鏍囷紝鍒欏厛娣诲姞鍥炬爣锛屽啀娣诲姞杈撳叆妗�)
+        /// </summary>
+        /// <param name="i_txtValue">鍒濆鍐呭</param>
+        /// <param name="i_width">瀹藉害</param>
+        /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
+        /// <returns></returns>
+        public TextInputControl AddLeftInput(string i_txtValue, int i_width, bool real = true)
+        {
+            if (real == true)
+            {
+                i_width = Application.GetRealWidth(i_width);
+            }
+            int XX = ControlCommonResourse.XXLeft + LeftOffset;
+            if (this.leftIconSize > 0)
+            {
+                XX += this.leftIconSize + Application.GetRealWidth(35);
+            }
+            var contr = new TextInputControl(i_width, this.Height, false);
+            contr.Text = i_txtValue;
+            contr.X = XX;
+
+            this.AddChidren(contr, ChidrenBindMode.NotBind);
+            if (chidrenYaxis != 0)
+            {
+                contr.Y += chidrenYaxis;
+            }
+
+            return contr;
         }
 
         #endregion
@@ -129,13 +173,13 @@
         /// 娣诲姞宸﹁竟鍥炬爣
         /// </summary>
         /// <param name="i_Iconsize">鍥炬爣澶у皬</param>
-        /// <returns></returns>
+        /// <returns></returns>
         public IconViewControl AddLeftIcon(int i_Iconsize = 81)
         {
             var btnIcon = new IconViewControl(i_Iconsize);
             btnIcon.X = ControlCommonResourse.XXLeft + LeftOffset;
             btnIcon.Gravity = Gravity.CenterVertical;
-            this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
+            this.AddChidren(btnIcon, ChidrenBindMode.BindEvent);
             if (chidrenYaxis != 0)
             {
                 btnIcon.Y += chidrenYaxis;
@@ -152,13 +196,13 @@
         /// <summary>
         /// 娣诲姞鍚戝彸鐨勫浘鏍�
         /// </summary>
-        public IconViewControl AddRightIconControl()
+        public IconViewControl AddRightArrow()
         {
             var btnRight = new IconViewControl(58);
             btnRight.Gravity = Gravity.CenterVertical;
             btnRight.X =this.Width - btnRight.IconSize - ControlCommonResourse.XXLeft + RightOffset;
-            btnRight.UnSelectedImagePath = "Item/Next.png";
-            this.AddChidren(btnRight, ChidrenBindMode.BindEventOnly);
+            btnRight.UnSelectedImagePath = "Item/RightNext.png";
+            this.AddChidren(btnRight, ChidrenBindMode.BindEvent);
 
             if (chidrenYaxis != 0)
             {
@@ -173,28 +217,47 @@
         /// <summary>
         /// 娣诲姞鏈�鍙宠竟鐨勭┖鐧藉浘鐗囨帶浠�
         /// </summary>
-        /// <param name="i_width">鎺т欢绌哄害(闈炵湡瀹炲��)</param>
+        /// <param name="i_width">鎺т欢绌哄害(闈炵湡瀹炲��)</param>
         /// <param name="i_height">鎺т欢楂樺害(闈炵湡瀹炲��)</param>
         /// <returns></returns>
         public MostRightIconControl AddMostRightEmptyIcon(int i_width, int i_height)
         {
             var btnContr = new MostRightIconControl(i_width, i_height);
+            btnContr.UseClickStatu = false;
             this.AddChidren(btnContr, ChidrenBindMode.NotBind);
             btnContr.InitControl();
             //澶嶅悎鎺т欢闇�瑕佺壒娈婂鐞�
-            this.ChangedChidrenBindMode(btnContr, ChidrenBindMode.BindEventOnly);
+            this.ChangedChidrenBindMode(btnContr, ChidrenBindMode.BindEvent);
             if (RightOffset != 0)
             {
                 btnContr.X += RightOffset;
             }
 
-            this.rightIconSize = Application.GetMinRealAverage(i_width);
+            this.rightIconSize = this.GetPictrueRealSize(i_width);
             if (chidrenYaxis != 0)
             {
-                btnContr.Y += chidrenYaxis;
+                btnContr.btnIcon.Y += chidrenYaxis;
             }
 
             return btnContr;
+        }
+
+        #endregion
+
+        #region 鈻� 娣诲姞鍙宠竟鐨勫紑鍏冲浘鏍嘷________________
+
+        /// <summary>
+        /// 娣诲姞鍙宠竟鐨勫紑鍏冲浘鏍�
+        /// </summary>
+        /// <returns></returns>
+        public MostRightIconControl AddMostRightSwitchIcon()
+        {
+            var btnSwitch = this.AddMostRightEmptyIcon(104, 63);
+            this.ChangedChidrenBindMode(btnSwitch, ChidrenBindMode.NotBind);
+            btnSwitch.UnSelectedImagePath = "Item/Switch2.png";
+            btnSwitch.SelectedImagePath = "Item/Switch2Selected.png";
+
+            return btnSwitch;
         }
 
         #endregion
@@ -214,13 +277,8 @@
             {
                 i_width = Application.GetRealWidth(i_width);
             }
-            var btnContr = new NormalViewControl(i_width, false);
-            btnContr.X = this.Width - ControlCommonResourse.XXLeft - i_width - rightIconSize + RightOffset;
-            btnContr.Height = this.Height;
-            btnContr.TextAlignment = TextAlignment.CenterRight;
-            btnContr.TextColor = UserCenterColor.Current.TextGrayColor1;
-            btnContr.Text = i_text;
-            this.AddChidren(btnContr, ChidrenBindMode.BindEventOnly);
+            var btnContr = AddMostRightView(i_text, i_width, this.Height, false);
+            this.AddChidren(btnContr, ChidrenBindMode.BindEvent);
             if (chidrenYaxis != 0)
             {
                 btnContr.Y += chidrenYaxis;
@@ -229,6 +287,84 @@
             return btnContr;
         }
 
-        #endregion
-    }
-}
+        /// <summary>
+        /// 娣诲姞鏈�鍙崇殑鏄剧ず鏂囨湰,姝ゆ柟娉曚笉浼氫富鍔ㄦ坊鍔犲埌鐖舵帶浠朵腑(濡傛灉鍙宠竟鏈夊浘鏍囩殑璇�,鍏堟坊鍔犲浘鏍囧悗,鍐嶆坊鍔犺繖涓枃鏈�)
+        /// </summary>
+        /// <param name="i_caption">鍐呭</param>
+        /// <param name="i_width">瀹藉害</param>
+        /// <param name="i_height">楂樺害</param>
+        /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
+        /// <returns></returns>
+        public NormalViewControl AddMostRightView(string i_text, int i_width, int i_height, bool real = true)
+        {
+            if (real == true)
+            {
+                i_width = Application.GetRealWidth(i_width);
+                i_height = Application.GetRealHeight(i_height);
+            }
+            var btnContr = new NormalViewControl(i_width, i_height, false);
+            btnContr.X = this.Width - ControlCommonResourse.XXLeft - i_width - rightIconSize + RightOffset;
+            btnContr.Height = i_height;
+            btnContr.TextAlignment = TextAlignment.CenterRight;
+            btnContr.TextColor = UserCenterColor.Current.TextGrayColor1;
+            btnContr.Text = i_text;
+
+            return btnContr;
+        }
+
+        #endregion
+
+        #region 鈻� 娣诲姞涓婇儴鐨勬樉绀烘枃鏈琠________________
+
+        /// <summary>
+        /// 娣诲姞涓婇儴鐨勬樉绀烘枃鏈�(濡傛灉鏈夊浘鏍囷紝鍒欏厛娣诲姞鍥炬爣锛屽啀娣诲姞鏂囨湰)
+        /// </summary>
+        /// <param name="i_caption">鍐呭</param>
+        /// <param name="i_width">瀹藉害</param>
+        /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
+        /// <returns></returns>
+        public NormalViewControl AddTopView(string i_caption, int i_width, bool real = true)
+        {
+            if (real == true)
+            {
+                i_width = Application.GetRealWidth(i_width);
+            }
+            var contr = this.AddLeftCaption(i_caption, i_width, Application.GetRealHeight(60), false);
+            contr.TextSize = 15;
+            //褰撴寚瀹氬疄闄呭潗鏍囨椂,杩欓噷闇�瑕佺殑鍋忕Щ閲忎负2鍊�
+            contr.Y = Application.GetRealHeight(12) + this.chidrenYaxis * 2;
+            this.AddChidren(contr, ChidrenBindMode.BindEvent);
+
+            return contr;
+        }
+
+        #endregion
+
+        #region 鈻� 娣诲姞涓嬮儴鐨勬樉绀烘枃鏈琠________________
+
+        /// <summary>
+        /// 娣诲姞涓嬮儴鐨勬樉绀烘枃鏈�(濡傛灉鏈夊浘鏍囷紝鍒欏厛娣诲姞鍥炬爣锛屽啀娣诲姞鏂囨湰)
+        /// </summary>
+        /// <param name="i_caption">鍐呭</param>
+        /// <param name="i_width">瀹藉害</param>
+        /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
+        /// <returns></returns>
+        public NormalViewControl AddBottomView(string i_caption, int i_width, bool real = true)
+        {
+            if (real == true)
+            {
+                i_width = Application.GetRealWidth(i_width);
+            }
+            var contr = this.AddLeftCaption(i_caption, i_width, Application.GetRealHeight(50), false);
+            //褰撴寚瀹氬疄闄呭潗鏍囨椂,杩欓噷闇�瑕佺殑鍋忕Щ閲忎负2鍊�
+            contr.Y = Application.GetRealHeight(72) + this.chidrenYaxis * 2;
+            contr.TextSize = 12;
+            contr.TextColor = UserCenterColor.Current.TextGrayColor1;
+            this.AddChidren(contr, ChidrenBindMode.BindEvent);
+
+            return contr;
+        }
+
+        #endregion
+    }
+}

--
Gitblit v1.8.0