| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace Shared.Phone.UserCenter |
| | | { |
| | | /// <summary> |
| | | /// 做成一个RowLayout型的FrameLayout |
| | | /// </summary> |
| | | public class FrameRowControl : FrameLayoutControl |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | namespace Shared.Phone.UserCenter
|
| | | {
|
| | | /// <summary>
|
| | | /// 做成一个RowLayout型的FrameLayout
|
| | | /// </summary>
|
| | | public class FrameRowControl : FrameLayoutStatuControl
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 此控件的识别主键(自定义设置的)
|
| | | /// </summary> |
| | | /// </summary>
|
| | | public string MainKeys = string.Empty;
|
| | | /// <summary>
|
| | | /// 左偏移量,只针对内置控件有效(这是一个真实值,默认不偏移。正数为向右偏移,负数为向左偏移)
|
| | |
| | | /// </summary>
|
| | | private NormalViewControl btnBottomLine = null;
|
| | |
|
| | | #endregion |
| | | #endregion
|
| | |
|
| | | #region ■ 初始化_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 做成一个RowLayout型的FrameLayout
|
| | | /// </summary> |
| | | /// <param name="i_ChidrenYaxis">子控件Y轴偏移量(真实值,有些界面需要这种特殊操作)</param> |
| | | public FrameRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis) |
| | | { |
| | | /// </summary>
|
| | | /// <param name="i_ChidrenYaxis">子控件Y轴偏移量(真实值,有些界面需要这种特殊操作)</param>
|
| | | public FrameRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
|
| | | {
|
| | | this.Height = ControlCommonResourse.ListViewRowHeight;
|
| | | this.Width = Application.CurrentWidth; |
| | | } |
| | | this.Width = Application.CurrentWidth;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | /// <summary>
|
| | | /// <para>添加底线(如果左边有图标,则先添加图标,再添加底线)</para>
|
| | | /// <para>它的长度为:当前控件宽度-左右固定间距-左边图片宽度(如果有)-右边的偏移量</para>
|
| | | /// </summary> |
| | | /// </summary>
|
| | | public virtual NormalViewControl AddBottomLine()
|
| | | {
|
| | | if (this.btnBottomLine != null)
|
| | |
| | | /// <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)
|
| | |
| | | /// <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;
|
| | |
| | | /// <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)
|
| | |
| | | /// 添加左边图标
|
| | | /// </summary>
|
| | | /// <param name="i_Iconsize">图标大小</param>
|
| | | /// <returns></returns> |
| | | /// <returns></returns>
|
| | | public IconViewControl AddLeftIcon(int i_Iconsize = 81)
|
| | | {
|
| | | var btnIcon = new IconViewControl(i_Iconsize);
|
| | |
| | | /// <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)
|
| | |
| | | btnContr.X += RightOffset;
|
| | | }
|
| | |
|
| | | this.rightIconSize = Application.GetMinRealAverage(i_width);
|
| | | this.rightIconSize = this.GetPictrueRealSize(i_width);
|
| | | if (chidrenYaxis != 0)
|
| | | {
|
| | | btnContr.btnIcon.Y += chidrenYaxis;
|
| | |
| | | return btnContr;
|
| | | }
|
| | |
|
| | | #endregion |
| | | #endregion
|
| | |
|
| | | #region ■ 添加上部的显示文本_________________
|
| | |
|
| | |
| | | /// <param name="i_caption">内容</param>
|
| | | /// <param name="i_width">宽度</param>
|
| | | /// <param name="real">是否计算真实值</param>
|
| | | /// <returns></returns> |
| | | /// <returns></returns>
|
| | | public NormalViewControl AddTopView(string i_caption, int i_width, bool real = true)
|
| | | {
|
| | | if (real == true)
|
| | |
| | | return contr;
|
| | | }
|
| | |
|
| | | #endregion |
| | | #endregion
|
| | |
|
| | | #region ■ 添加下部的显示文本_________________
|
| | |
|
| | |
| | | /// <param name="i_caption">内容</param>
|
| | | /// <param name="i_width">宽度</param>
|
| | | /// <param name="real">是否计算真实值</param>
|
| | | /// <returns></returns> |
| | | /// <returns></returns>
|
| | | public NormalViewControl AddBottomView(string i_caption, int i_width, bool real = true)
|
| | | {
|
| | | if (real == true)
|
| | |
| | | return contr;
|
| | | }
|
| | |
|
| | | #endregion |
| | | } |
| | | } |
| | | #endregion
|
| | | }
|
| | | }
|