陈嘉乐
2020-12-15 a35617eb62b317bf3ed92b1462018cf67c920411
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
@@ -95,11 +95,27 @@
            EventHandler<MouseEventArgs> delClick = (sender, e) =>
            {
                Loading loading = new Loading();
                this.AddChidren(loading);
                HDL_ON.DAL.Server.ResponsePackNew responsePackNew = null;
                new LogicView.TipPopView().TipBox(StringId.tip, StringId.delAutomation, () =>
                {
                  var responsePackNew=  Send.delLogic(Logic.currlogic);
                    if (responsePackNew.Code == "0")
                    loading.Start();
                    new System.Threading.Thread(() =>
                    {
                        try
                        {
                            //发送删除逻辑命令;
                            responsePackNew = Send.delLogic(Logic.currlogic);
                        }
                        catch { }
                        finally
                        {
                            Application.RunOnMainThread(() =>
                            {
                                loading.Hide();
                                if (responsePackNew != null && responsePackNew.Code == "0")
                    {
                        LogicMethod.RemoveAllView();
                        Logic.LogicList.Remove(Logic.currlogic);
@@ -111,6 +127,12 @@
                        new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.delFail));
                    }
                });
                        }
                    })
                    { IsBackground = true }.Start();
                });
            };
            btnDel.MouseUpEventHandler += delClick;