陈嘉乐
2021-03-12 16277f0b999eb1b2c6bbcf710be04cadaf2a07fa
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs
@@ -19,7 +19,8 @@
            topView.topNameBtn.TextID = StringId.shebeigaunli;
            topView.topIconBtn.Visible = true;
            this.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => {
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) =>
            {
                action();
                this.RemoveFromParent();
            };
@@ -168,10 +169,13 @@
                    IsBold = true,
                };
                devfLayout.AddChidren(stateTextBtn);
                if (pirDevice.online) {
                if (pirDevice.online)
                {
                    stateIconBtn.IsSelected = true;
                    stateTextBtn.IsSelected = true;
                } else {
                }
                else
                {
                    stateIconBtn.IsSelected = false;
                    stateTextBtn.IsSelected = false;
                }
@@ -291,11 +295,14 @@
                    }
                    delBtn.MouseUpEventHandler += (sender, e) =>
                    {
                        var Function = delBtn.Tag as Entity.Function;
                        string text = Language.StringByID(StringId.shanchushebei) + Function.name + "?";
                        TipPopView tipPopView = new TipPopView();
                        tipPopView.TipBox(StringId.tip, text, (dialog) =>
                        {
                        //加载log
                        Loading loading = new Loading();
                        this.AddChidren(loading);
                            dialog.AddChidren(loading);
                        HDL_ON.DAL.Server.ResponsePackNew responsePackNew = null;
                        loading.Start();
                        new System.Threading.Thread(() =>
@@ -314,6 +321,7 @@
                                    {
                                        if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
                                        {
                                                dialog.Close();
                                            var function = pirDevice.FunctioList.Find((c)=>c.sid== Function.sid);
                                            if (function != null)
                                            {
@@ -325,7 +333,6 @@
                                            }
                                            UIView(vv);
                                        }
                                        else
                                        {
                                            Method method = new Method();
@@ -339,6 +346,7 @@
                        })
                        { IsBackground = true }.Start();
                        }, () => { }, false);
                    };
                    EventHandler<MouseEventArgs> editClick = (sender, e) =>
                    {
@@ -358,8 +366,6 @@
                    areaBtn.MouseUpEventHandler += editClick;
                    nextIconBtn.MouseUpEventHandler += editClick;
                }
            }
        }
@@ -387,10 +393,10 @@
                    methodView.EditControlName(StringId.xiugaimingzi, list, pirclick.name, (name, view) =>
                    {
                        pirclick.name = name;
                        HDL_ON.DAL.Server.ResponsePackNew responsePackNew = null;
                        //加载log
                        Loading loading = new Loading();
                        view.AddChidren(loading);
                        HDL_ON.DAL.Server.ResponsePackNew responsePackNew = null;
                        loading.Start();
                        new System.Threading.Thread(() =>
                        {
@@ -420,7 +426,8 @@
                        })
                        { IsBackground = true }.Start();
                    },()=> {
                    }, () =>
                    {
                        NewSwitchView(pirclick, vv);
                    },false);
@@ -431,10 +438,10 @@
                    TipPopView tipPopView = new TipPopView();
                    tipPopView.TipBox(StringId.tip, text, (dialog) =>
                    {
                        HDL_ON.DAL.Server.ResponsePackNew responsePackNew = null;
                        //加载log
                        Loading loading = new Loading();
                        dialog.AddChidren(loading);
                        HDL_ON.DAL.Server.ResponsePackNew responsePackNew = null;
                        loading.Start();
                        new System.Threading.Thread(() =>
                        {