| | |
| | | /// <para>false:直接无条件添加</para></param> |
| | | public void IniFunctionList(string filePath, bool checkRepeat = false) |
| | | { |
| | | //MainPage.Log("12346890sdkxghjkl"); |
| | | // todo 增加设备,增加功能进功能列表 |
| | | if (filePath.StartsWith("FunctionData_")) |
| | | { |
| | |
| | | var revPack = pm.AddScene(scene); |
| | | if (revPack.Code == StateCode.SUCCESS) |
| | | { |
| | | var sceneList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(revPack.Data.ToString()); |
| | | tempScene = sceneList.Find((obj) => obj.sid == scene.sid); |
| | | var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(tempScene)); |
| | | FileUtlis.Files.WriteFileByBytes(scene.savePath, ssd); |
| | | result = tempScene; |
| | | if (MainPage.NoLoginMode) |
| | | { |
| | | var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(scene)); |
| | | FileUtlis.Files.WriteFileByBytes(scene.savePath, ssd); |
| | | result = scene; |
| | | } |
| | | else |
| | | { |
| | | var sceneList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(revPack.Data.ToString()); |
| | | tempScene = sceneList.Find((obj) => obj.sid == scene.sid); |
| | | var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(tempScene)); |
| | | FileUtlis.Files.WriteFileByBytes(scene.savePath, ssd); |
| | | result = tempScene; |
| | | } |
| | | } |
| | | else |
| | | { |