CrabtreeOn,印度客户定制APP,迁移2.0平台版本
wxr
2022-11-01 dc14dbad8e3a55b57cadddba40c3f437e5e80fc5
Crabtree/SmartHome/UI/SimpleControl/Phone/Scene/UserDeviceToScene.cs
@@ -264,11 +264,17 @@
                            LongPressFrameLayout.AddChidren (btnDel);
                            btnDel.MouseUpEventHandler += (senderDel, eDel) => {
                                IO.FileUtils.DeleteFile (sceneFilePath);
                                sceneFilePaths.Remove (sceneFilePath);
                                sceneFilePaths.Remove ("");
                                IO.FileUtils.WriteFileByBytes (Scene.GlobalSceneFilePath, System.Text.Encoding.UTF8.GetBytes (Newtonsoft.Json.JsonConvert.SerializeObject (sceneFilePaths)));
                                InitView (isGolba);
                                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);
                                        sceneFilePaths.Remove (sceneFilePath);
                                        sceneFilePaths.Remove ("");
                                        IO.FileUtils.WriteFileByBytes (Scene.GlobalSceneFilePath, System.Text.Encoding.UTF8.GetBytes (Newtonsoft.Json.JsonConvert.SerializeObject (sceneFilePaths)));
                                        InitView (isGolba);
                                    }
                                };
                                alert.Show ();
                            };
                        };