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/FrameLayoutControls/FrameRowControl.cs | 142 ++++++++++++++++++++++++++++++++++-------------
1 files changed, 102 insertions(+), 40 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
index 1f8b11b..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,20 +30,24 @@
/// 鍙宠竟鍥炬爣鎺т欢鐨勫ぇ灏�
/// </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
@@ -52,9 +56,14 @@
/// <summary>
/// <para>娣诲姞搴曠嚎(濡傛灉宸﹁竟鏈夊浘鏍囷紝鍒欏厛娣诲姞鍥炬爣锛屽啀娣诲姞搴曠嚎)</para>
/// <para>瀹冪殑闀垮害涓猴細褰撳墠鎺т欢瀹藉害-宸﹀彸鍥哄畾闂磋窛-宸﹁竟鍥剧墖瀹藉害(濡傛灉鏈�)-鍙宠竟鐨勫亸绉婚噺</para>
- /// </summary>
- public NormalViewControl AddBottomLine()
+ /// </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)
@@ -62,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
@@ -81,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)
@@ -89,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;
@@ -105,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;
@@ -131,7 +140,7 @@
/// <param name="i_txtValue">鍒濆鍐呭</param>
/// <param name="i_width">瀹藉害</param>
/// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
- /// <returns></returns>
+ /// <returns></returns>
public TextInputControl AddLeftInput(string i_txtValue, int i_width, bool real = true)
{
if (real == true)
@@ -164,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;
@@ -192,8 +201,8 @@
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)
{
@@ -208,7 +217,7 @@
/// <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)
@@ -218,13 +227,13 @@
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.btnIcon.Y += chidrenYaxis;
@@ -269,7 +278,7 @@
i_width = Application.GetRealWidth(i_width);
}
var btnContr = AddMostRightView(i_text, i_width, this.Height, false);
- this.AddChidren(btnContr, ChidrenBindMode.BindEventOnly);
+ this.AddChidren(btnContr, ChidrenBindMode.BindEvent);
if (chidrenYaxis != 0)
{
btnContr.Y += chidrenYaxis;
@@ -303,6 +312,59 @@
return btnContr;
}
- #endregion
- }
-}
+ #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