From a0b77501012265c4638c9f49ccfd1e6cd0f71a45 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期四, 09 三月 2023 18:44:00 +0800 Subject: [PATCH] 2023年03月09日18:43:53 --- HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs index 006e71d..3c791b7 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs @@ -12,6 +12,8 @@ { LoadEvent_ChangeFunctionName (); SkipChooseRoomPage(); + DelDeviceEvent(); + } /// <summary> @@ -77,5 +79,45 @@ } } + /// <summary> + /// 瑙g粦璁惧鐨勪簨浠� + /// </summary> + void DelDeviceEvent() + { + + EventHandler<MouseEventArgs> ClickEvent = (sener, e) => + { + new HDL_ON.UI.Music.View.TipView().TipBox(-1, StringId.AreYouSureToDeleteThisDevice, () => + { + UI2.FuntionControlView.VideoDoorLock.Send.Currnet.DelDevice(this.function, (isBool) => + { + Application.RunOnMainThread(() => + { + if (!isBool) + { + new Tip() + { + CloseTime = 1, + Text = Language.StringByID(StringId.delFail), + Direction = AMPopTipDirection.None, + }.Show(bodyView); + return; + } + //鍒犻櫎鏈湴鏂囦欢 + FunctionList.List.DeleteFunction(this.function); + this.RemoveFromParent(); + this.actionDel?.Invoke(); + }); + + }); + + }); + }; + this.delView.MouseUpEventHandler += ClickEvent; + this.delTextBtn.MouseUpEventHandler += ClickEvent; + this.delRightBtn.MouseUpEventHandler += ClickEvent; + } + + } } -- Gitblit v1.8.0