From 9b44e30275621a48335fbea7b32b5065a2859c9c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 16 三月 2021 16:54:33 +0800
Subject: [PATCH] Merge branch 'WJC' into temp-wxr

---
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs
index d936aef..6af3af1 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs
@@ -177,9 +177,9 @@
                 if (StringId.xiugaimingzi == intValue)
                 {
                     List<string> list = new List<string>();
-                    for (int b = 0; b < Pir.pirDeviceList.Count; b++)
+                    for (int b = 0; b < PirDevice.Pir.pirDeviceList.Count; b++)
                     {
-                        list.Add(Pir.pirDeviceList[b].name);
+                        list.Add(PirDevice.Pir.pirDeviceList[b].name);
                     }
                     Method methodView = new Method();
                     methodView.EditControlName(StringId.xiugaimingzi, list, pirclick.name, (name, view) =>
@@ -202,12 +202,16 @@
                     TipPopView tipPopView = new TipPopView();
                     tipPopView.TipBox(StringId.tip, text, (dialog) =>
                     {
-
                         Thread(dialog, (responsePackNew) =>
-                        {
-                            dialog.Close();
-                            UIView(vv);
-                        }, "鍒犻櫎", pirclick.deviceId, "");
+                                {
+                                    var pir = Pir.pirDeviceList.Find((c) => c.deviceId == pirclick.deviceId);
+                                    if (pir != null)
+                                    {
+                                        Pir.pirDeviceList.Remove(pirclick);
+                                    }
+                                    dialog.Close();
+                                    UIView(vv);
+                                }, "鍒犻櫎", pirclick.deviceId, "");
                     }, () =>
                     {
                         NewSwitchView(pirclick, vv);
@@ -258,7 +262,7 @@
                         else
                         {
                             Method method = new Method();
-                            method.ErrorShow(responsePackNew);
+                            method.ErrorShow(responsePackNew,"");
                         }
 
                     });

--
Gitblit v1.8.0