黄学彪
2020-04-28 e22fdb94322e6cec38e5e4a9aec13d431a133fde
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
@@ -1,18 +1,18 @@
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>
        /// 左偏移量,只针对内置控件有效(这是一个真实值,默认不偏移。正数为向右偏移,负数为向左偏移)
@@ -30,20 +30,24 @@
        /// 右边图标控件的大小
        /// </summary>
        private int rightIconSize = 0;
        /// <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
@@ -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)
@@ -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,7 +173,7 @@
        /// 添加左边图标
        /// </summary>
        /// <param name="i_Iconsize">图标大小</param>
        /// <returns></returns>
        /// <returns></returns>
        public IconViewControl AddLeftIcon(int i_Iconsize = 81)
        {
            var btnIcon = new IconViewControl(i_Iconsize);
@@ -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)
@@ -224,7 +233,7 @@
                btnContr.X += RightOffset;
            }
            this.rightIconSize = Application.GetMinRealAverage(i_width);
            this.rightIconSize = this.GetPictrueRealSize(i_width);
            if (chidrenYaxis != 0)
            {
                btnContr.btnIcon.Y += chidrenYaxis;
@@ -303,7 +312,7 @@
            return btnContr;
        }
        #endregion
        #endregion
        #region ■ 添加上部的显示文本_________________
@@ -313,7 +322,7 @@
        /// <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)
@@ -328,7 +337,7 @@
            return contr;
        }
        #endregion
        #endregion
        #region ■ 添加下部的显示文本_________________
@@ -338,7 +347,7 @@
        /// <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)
@@ -354,6 +363,6 @@
            return contr;
        }
        #endregion
    }
}
        #endregion
    }
}