陈嘉乐
2021-03-09 83df0ebfbd306d0fb5a51a21a7ef2271c0c507ec
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
@@ -116,10 +116,10 @@
                else
                {
                    Method method = new Method();
                    method.AddControl(this, (control1) => {
                    method.AddControl(this, (controlDevice) => {
                        AddButton addButton = new AddButton();
                        MainPage.BasePageView.AddChidren(addButton);
                        addButton.Show(control1);
                        addButton.Show(controlDevice);
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                    });
                }
@@ -129,6 +129,21 @@
            {
                MainPage.BasePageView.RemoveViewByTag("AddControl");
                MainPage.BasePageView.RemoveViewByTag("Pir");
                Entity.Function function = new Entity.Function();
                function.sid = control.sid;
                function.deviceId = control.deviceId;
                function.name = control.name;
                function.spk = control.spk;
                function.attributes.AddRange(function.attributes);
                if (null == Pir.currPir.FunctioList.Find((c) => c.sid == function.sid))
                {
                    Pir.currPir.FunctioList.Add(function);
                }
                //Entity.FunctionAttributes functionAttributes = new Entity.FunctionAttributes();
                //functionAttributes.key
            };
            #endregion
        }