| | |
| | | |
| | | 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(() => |
| | | { |
| | | LogicMethod.RemoveAllView(); |
| | | Logic.LogicList.Remove(Logic.currlogic); |
| | | MainView.MainShow(); |
| | | //发送删除逻辑命令; |
| | | } |
| | | else |
| | | { |
| | | new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.delFail)); |
| | | } |
| | | 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); |
| | | MainView.MainShow(); |
| | | //发送删除逻辑命令; |
| | | } |
| | | else |
| | | { |
| | | new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.delFail)); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | }); |
| | | |
| | | }; |