From 8407d6631ac8f5b65c4a14fa27babaa48026d4ca Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 30 三月 2023 16:13:40 +0800
Subject: [PATCH] Merge branch 'wjc' into Dev-Branch

---
 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..ff4c689 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.VideDoorLockSend.Current.DelDevice(this.function, (isBool) =>
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            if (!isBool)
+                            {
+                                new Tip()
+                                {
+                                    CloseTime = 1,
+                                    Text = Language.StringByID(StringId.delFail),
+                                    Direction = AMPopTipDirection.None,
+                                }.Show(bodyView);
+                                return;
+                            }
+                            //鍒犻櫎鏈湴鏂囦欢                                  
+                            UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DeleteFunction(this.function);
+                            this.RemoveFromParent();
+                            this.actionDel?.Invoke();
+                        });
+
+                    });
+
+                });
+            };
+            this.delView.MouseUpEventHandler += ClickEvent;
+            this.delTextBtn.MouseUpEventHandler += ClickEvent;
+            this.delRightBtn.MouseUpEventHandler += ClickEvent;
+        }
+
+
     }
 }

--
Gitblit v1.8.0