From 18a7f9f40e5fab3bee5d4ac3d8fd0273dea052d6 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期日, 26 四月 2020 12:05:28 +0800
Subject: [PATCH] 先上传一个非最新的版本
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs | 80 +++++++++++++++++++++++++++++++++++-----
1 files changed, 70 insertions(+), 10 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
index 8f57ed6..bb6104d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
@@ -30,6 +30,10 @@
/// 鍙宠竟鍥炬爣鎺т欢鐨勫ぇ灏�
/// </summary>
private int rightIconSize = 0;
+ /// <summary>
+ /// 搴曠嚎鎺т欢
+ /// </summary>
+ private NormalViewControl btnBottomLine = null;
#endregion
@@ -53,8 +57,13 @@
/// <para>娣诲姞搴曠嚎(濡傛灉宸﹁竟鏈夊浘鏍囷紝鍒欏厛娣诲姞鍥炬爣锛屽啀娣诲姞搴曠嚎)</para>
/// <para>瀹冪殑闀垮害涓猴細褰撳墠鎺т欢瀹藉害-宸﹀彸鍥哄畾闂磋窛-宸﹁竟鍥剧墖瀹藉害(濡傛灉鏈�)-鍙宠竟鐨勫亸绉婚噺</para>
/// </summary>
- public NormalViewControl AddBottomLine()
+ 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
@@ -192,7 +201,7 @@
var btnRight = new IconViewControl(58);
btnRight.Gravity = Gravity.CenterVertical;
btnRight.X =this.Width - btnRight.IconSize - ControlCommonResourse.XXLeft + RightOffset;
- btnRight.UnSelectedImagePath = "Item/Next.png";
+ btnRight.UnSelectedImagePath = "Item/RightNext.png";
this.AddChidren(btnRight, ChidrenBindMode.BindEventOnly);
if (chidrenYaxis != 0)
@@ -268,7 +277,7 @@
{
i_width = Application.GetRealWidth(i_width);
}
- var btnContr = AddMostRightView(i_text, i_width, ControlCommonResourse.NormalControlHeight, false);
+ var btnContr = AddMostRightView(i_text, i_width, this.Height, false);
this.AddChidren(btnContr, ChidrenBindMode.BindEventOnly);
if (chidrenYaxis != 0)
{
@@ -295,7 +304,7 @@
}
var btnContr = new NormalViewControl(i_width, i_height, false);
btnContr.X = this.Width - ControlCommonResourse.XXLeft - i_width - rightIconSize + RightOffset;
- btnContr.Height = this.Height;
+ btnContr.Height = i_height;
btnContr.TextAlignment = TextAlignment.CenterRight;
btnContr.TextColor = UserCenterColor.Current.TextGrayColor1;
btnContr.Text = i_text;
@@ -304,5 +313,56 @@
}
#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;
+ contr.Y = Application.GetRealHeight(12) + this.chidrenYaxis;
+ this.AddChidren(contr, ChidrenBindMode.BindEventOnly);
+
+ 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);
+ contr.Y = Application.GetRealHeight(72) + this.chidrenYaxis;
+ contr.TextSize = 12;
+ contr.TextColor = UserCenterColor.Current.TextGrayColor1;
+ this.AddChidren(contr, ChidrenBindMode.BindEventOnly);
+
+ return contr;
+ }
+
+ #endregion
}
}
--
Gitblit v1.8.0