From dc14dbad8e3a55b57cadddba40c3f437e5e80fc5 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 01 十一月 2022 09:08:03 +0800
Subject: [PATCH] 备份

---
 Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserScenePage.cs |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserScenePage.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserScenePage.cs
index b39fb1e..9347331 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserScenePage.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserScenePage.cs
@@ -203,12 +203,20 @@
                             LongPressFrameLayout.AddChidren (btnDel);
 
                             btnDel.MouseUpEventHandler += (senderDel, eDel) => {
-                                IO.FileUtils.DeleteFile (sceneFilePath);
-                                room.SceneFilePathList.Remove (sceneFilePath);
-                                room.SceneFilePathList.Remove ("");
-                                room.Save (room.RoomFilePath);
-                                ShowUserScene (Room.GetRoomByFilePath (room.RoomFilePath));
-                                UserDeviceToScene.hasModify = true;
+                                Alert alert = new Alert ("", $"Are you sure to delete the scenario: {scene.Name}?", Language.StringByID (R.MyInternationalizationString.Cancel), Language.StringByID (R.MyInternationalizationString.Confrim));
+                                alert.ResultEventHandler += (sender2, e2) => {
+                                    if (e2) {
+                                        IO.FileUtils.DeleteFile (sceneFilePath);
+                                        room.SceneFilePathList.Remove (sceneFilePath);
+                                        room.SceneFilePathList.Remove ("");
+                                        room.Save (room.RoomFilePath);
+                                        ShowUserScene (Room.GetRoomByFilePath (room.RoomFilePath));
+                                        UserDeviceToScene.hasModify = true;
+                                    }
+                                };
+                                alert.Show ();
+
+
                                 
                                 //if (CommonList.MonitorScenePathList.Count > 0) {
                                 //    foreach (var monitorData in CommonList.MonitorScenePathList) {

--
Gitblit v1.8.0