wxr
2024-11-01 c0c734d7a84cf7105401878ffc4b64cbb67621d1
HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs
@@ -134,7 +134,7 @@
            btnDeviceName.TextColor = CSS_Color.FirstLevelTitleColor;
            btnDeviceName.TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel;
            btnDeviceName.Text = device.name;
            btnDeviceName.Width = btnDeviceName.GetRealWidthByText();
            //btnDeviceName.Width = btnDeviceName.GetRealWidthByText();
            FrameWhiteCentet1.AddChidren(btnDeviceName);
            //房间名字
            this.btnRoomName = new NormalViewControl(270, 21, true);
@@ -143,7 +143,7 @@
            btnRoomName.TextColor = CSS_Color.PromptingColor1;
            btnRoomName.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
            btnRoomName.Text = device.GetRoomListName();
            btnRoomName.Width = btnRoomName.GetRealWidthByText();
            //btnRoomName.Width = btnRoomName.GetRealWidthByText();
            FrameWhiteCentet1.AddChidren(btnRoomName);
            if (ShowColltionButton)
            {
@@ -302,12 +302,20 @@
        /// <param name="btnHigherCollection">上一级界面的收藏控件(原来on的框架太坑)</param>
        /// <param name="btnHigherDeviceName">上一级界面的设备名字控件(原来on的框架太坑)</param>
        private void AddTopSettingIcon(Button btnHigherDeviceName, Button btnHigherRoom)
        {
            //设置图标(门锁界面需要借用这个图标的X轴和Y轴,所以加进来)
            var btnSetting = new PicViewControl(28, 28);
            btnSetting.X = Application.GetRealWidth(337);
            btnSetting.Y = Application.GetRealHeight(9);
            btnSetting.UnSelectedImagePath = "Public/FuncInfoSetIcon.png";
        {
            //设置图标(门锁界面需要借用这个图标的X轴和Y轴,所以加进来)
            var btnSetting = new Button()
            {
                X = Application.GetRealWidth(337),
                Y = Application.GetRealHeight(19),
                Width = Application.GetMinRealAverage(32),
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "Public/FuncInfoSetIcon.png",
            };
            //var btnSetting = new PicViewControl(28, 28);
            //btnSetting.X = Application.GetRealWidth(337);
            //btnSetting.Y = Application.GetRealHeight(9);
            //btnSetting.UnSelectedImagePath = "Public/FuncInfoSetIcon.png";
            btnSetting.Name = "btnSetting";
            topFrameLayout.AddChidren(btnSetting);
@@ -317,7 +325,7 @@
                btnSetting.Visible = false;
            }
            btnSetting.ButtonClickEvent += (sender, e) =>
            btnSetting.MouseUpEventHandler += (sender, e) =>
            {
                var infoView = new UI.FunctionBaseInfoSetPage(this.device, () =>
                {
@@ -327,10 +335,10 @@
                    //从新计算宽度
                    this.btnDeviceName.Text = btnHigherDeviceName.Text;
                    this.btnDeviceName.Width = this.btnDeviceName.GetRealWidthByText();
                    //this.btnDeviceName.Width = this.btnDeviceName.GetRealWidthByText();
                    this.btnRoomName.Text = btnHigherRoom.Text;
                    this.btnRoomName.Width = this.btnRoomName.GetRealWidthByText();
                    //this.btnRoomName.Width = this.btnRoomName.GetRealWidthByText();
                    //回调事件
                    this.SettionFinishEvent?.Invoke();