HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-05-21 98ceb6bd2021f9ff136cda27eef28676dd7b5d92
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs
@@ -56,8 +56,11 @@
        ///  初始化控件(事件要至于它之前)
        /// </summary>
        /// <param name="listTitleText">菜单文字列表</param>
        public void InitControl(List<string> listTitleText)
        /// <param name="rightSpace">右边空白宽度</param>
        public void InitControl(List<string> listTitleText, int rightSpace = 0)
        {
            if (listTitleText.Count == 0) { return; }
            var btnTemp = new NormalViewControl(10, 10, false);
            btnTemp.TextSize = 16;
@@ -69,6 +72,8 @@
                //开始初始化
                XX = this.InitTitleTextControl(i, listTitleText[i], btnTemp.GetRealWidthByText(), XX);
            }
            //调整控件宽度
            this.Width = XX + Application.GetRealWidth(rightSpace);
            //回调方法
            this.frameDefult.ButtonClickEvent?.Invoke(null, null);
        }
@@ -109,7 +114,7 @@
            //底线
            var btnLine = new NormalViewControl(40, 10, true);
            btnLine.Y = btnName.Bottom + Application.GetRealHeight(14);
            btnLine.Y = btnName.Bottom + Application.GetRealHeight(6);
            btnLine.X = btnName.X + btnName.Width / 2 - Application.GetRealWidth(40) / 2;
            btnLine.Radius = (uint)Application.GetRealHeight(10) / 2;
            btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor;