黄学彪
2020-04-28 e22fdb94322e6cec38e5e4a9aec13d431a133fde
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MostRightIconControl.cs
@@ -4,18 +4,18 @@
namespace Shared.Phone.UserCenter
{
    /// <summary>
    /// 做成放在画面右边的的图标控件(注意,它不能用来做【向右】的图标)
    /// </summary>
    public class MostRightIconControl : FrameLayoutControl
    {
    /// <summary>
    /// 做成放在画面右边的的图标控件(注意,它不能用来做【向右】的图标)
    /// </summary>
    public class MostRightIconControl : FrameLayoutStatuControl
    {
        /// <summary>
        /// 图标控件(迫不得己,这个东西开放出去)
        /// </summary>
        public IconControlCommon btnIcon = null;
        /// </summary>
        public IconControlCommon btnIcon = null;
        /// <summary>
        /// UnSelectedImagePath
        /// </summary>
        /// </summary>
        public string UnSelectedImagePath
        {
            get { return btnIcon.UnSelectedImagePath; }
@@ -23,7 +23,7 @@
        }
        /// <summary>
        /// SelectedImagePath
        /// </summary>
        /// </summary>
        public string SelectedImagePath
        {
            get { return btnIcon.SelectedImagePath; }
@@ -31,49 +31,49 @@
        }
        /// <summary>
        /// IsSelected
        /// </summary>
        /// </summary>
        public bool IsSelected
        {
            get { return btnIcon.IsSelected; }
            set { btnIcon.IsSelected = value; }
        }
        }
        /// <summary>
        /// X轴的真实偏移量(请确保已经调用InitControl初始化函数,用法:蓝湖上的X轴,减掉这个值即可)
        /// </summary>
        /// </summary>
        public int XOffset
        {
            get { return (this.Width - btnIcon.Width) / 2; }
        }
        }
        /// <summary>
        /// 做成放在画面右边的的图标控件(注意,它不能用来做【向右】的图标)
        /// </summary>
        /// <param name="i_width">控件空度</param>
        /// <param name="i_height">控件高度</param>
        public MostRightIconControl(int i_width, int i_height)
        {
            this.UseClickStatu = false;
            this.Width = Application.GetMinRealAverage(110);
            this.Height = this.Parent != null ? this.Parent.Height : ControlCommonResourse.ListViewRowHeight;
            this.Gravity = Gravity.CenterVertical;
            var XX = Application.CurrentWidth - Application.GetMinRealAverage(i_width) - ControlCommonResourse.XXLeft;
            this.X = XX - Application.GetMinRealAverage((110 - i_width) / 2);
        /// <param name="i_width">控件空度</param>
        /// <param name="i_height">控件高度</param>
        public MostRightIconControl(int i_width, int i_height)
        {
            this.UseClickStatu = false;
            this.Width = this.GetPictrueRealSize(110);
            this.Height = this.Parent != null ? this.Parent.Height : ControlCommonResourse.ListViewRowHeight;
            this.Gravity = Gravity.CenterVertical;
            var XX = Application.CurrentWidth - this.GetPictrueRealSize(i_width) - ControlCommonResourse.XXLeft;
            this.X = XX - this.GetPictrueRealSize((110 - i_width) / 2);
            this.btnIcon = new IconControlCommon();
            btnIcon.Width = Application.GetMinRealAverage(i_width);
            btnIcon.Height = Application.GetMinRealAverage(i_height);
            btnIcon.Width = this.GetPictrueRealSize(i_width);
            btnIcon.Height = this.GetPictrueRealSize(i_height);
            btnIcon.Gravity = Gravity.Center;
        }
        }
        /// <summary>
        /// 初始化
        /// </summary>
        /// </summary>
        public void InitControl()
        {
            this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
        }
        }
    }
}