xm
2020-07-14 d87400af518ebc9274f4447f06476959c3aa5102
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/NormalSelectControl.cs
@@ -16,6 +16,10 @@
        /// </summary>
        private string textValue = string.Empty;
        /// <summary>
        /// 下部显示文本
        /// </summary>
        private string textBottomValue = null;
        /// <summary>
        /// 文本控件
        /// </summary>
        private NormalViewControl btnText = null;
@@ -46,7 +50,7 @@
            }
        }
        /// <summary>
        /// 处于非选中状态时,是否把字体变成灰色(默认变成灰色)
        /// 处于选中或者非选中状态时,是否变更字体颜色
        /// </summary>
        public bool ChangedTextColor = true;
@@ -65,6 +69,18 @@
        }
        /// <summary>
        /// 做成一个简单的选择控件
        /// </summary>
        /// <param name="i_topText">上部显示文本</param>
        /// <param name="i_bottomText">下部显示文本</param>
        /// <param name="i_ChidrenYaxis">子控件Y轴偏移量(【列表控件的rowSpace/2】即可,不懂默认为0即可)</param>
        public NormalSelectControl(string i_topText, string i_bottomText, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
        {
            this.textValue = i_topText;
            this.textBottomValue = i_bottomText;
        }
        /// <summary>
        /// 初始化内部控件
        /// </summary>
        /// <param name="iconParh">左侧图标</param>
@@ -76,9 +92,18 @@
                var btnIcon = this.AddLeftIcon();
                btnIcon.UnSelectedImagePath = iconParh;
            }
            //显示文本
            btnText = this.AddLeftCaption(this.textValue, 600);
            btnText.TextColor = UserCenterColor.Current.TextGrayColor3;
            if (this.textBottomValue == null)
            {
                //显示文本
                btnText = this.AddLeftCaption(this.textValue, 600);
                btnText.TextColor = UserCenterColor.Current.TextGrayColor3;
            }
            else
            {
                //显示文本
                btnText = this.AddTopView(this.textValue, 600);
                this.AddBottomView(this.textBottomValue, 600);
            }
            //选择控件
            btnSelect = this.AddMostRightEmptyIcon(58, 58);
            btnSelect.Visible = false;