wei
2021-07-06 649f0223cf1bacbc3df0eada80a839b0d58c7039
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/EditControl.cs
@@ -9,8 +9,9 @@
    {
        public EditControl()
        {
            Tag = "PirView";
        }
        public void Show(Entity.Function control,Action<Entity.Function> action)
        public void Show(Entity.Function control, Action<Entity.Function> action)
        {
            #region 界面布局
            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
@@ -32,7 +33,7 @@
            };
            this.AddChidren(viewLayout);
            //遥控器名称:
            FrameLayout50 editNameFLayout = new FrameLayout50();
            FrameLayout50 editNameFLayout = new FrameLayout50();
            editNameFLayout.btnText.Text = Language.StringByID(StringId.yaokongqimingcheng) + ":";
            editNameFLayout.btnEditText.Text = control.name;
            editNameFLayout.btnNextIcon.Height = Application.GetRealWidth(28);
@@ -40,7 +41,7 @@
            editNameFLayout.btnNextIcon.UnSelectedImagePath = "LogicIcon/editname.png";
            viewLayout.AddChidren(editNameFLayout.FLayoutView());
            //遥控器所属区域:
            FrameLayout50 areaFLayout = new FrameLayout50();
            FrameLayout50 areaFLayout = new FrameLayout50();
            areaFLayout.btnText.Text = Language.StringByID(StringId.yaokongqiquyu);
            areaFLayout.btnEditText.Text = Intelligence.Automation.LogicMethod.GetGetRoomName(control);
            areaFLayout.frameLayout.Y = editNameFLayout.frameLayout.Bottom;
@@ -56,23 +57,23 @@
                {
                    list.Add(Pir.currPir.FunctioList[i].name);
                }
                Method method = new Method();
                method.EditControlName(StringId.editName,list, control.name, (name, dialog) =>
                PirMethod method = new PirMethod();
                method.EditControlName(StringId.editName, list, control.name, (name, dialog) =>
                {
                    Method.ThreadSend(new Control { deviceId = control.deviceId, name = name }, (responsePackNew) =>
                    PirMethod.ThreadSend(new Control { deviceId = control.deviceId, name = name }, (responsePackNew) =>
                    {
                        dialog.Close();
                        editNameFLayout.btnEditText.Text = name;
                        control.name = name;
                    }, "修改名称", "dialog", null, dialog);
                },()=> { });
                }, () => { });
            };
            //遥控器所属区域选中事件
            areaFLayout.btnClick.MouseUpEventHandler += (sender, e) =>
            {
                Method method = new Method();
                PirMethod method = new PirMethod();
                method.ManagementPosition(control, () =>
                {
                    //更新区域