| | |
| | | public Scene() |
| | | { |
| | | sid = NewSid(); |
| | | gatewayId = DB_ResidenceData.residenceData.HomeGateway.gatewayId; |
| | | if (!string.IsNullOrEmpty(DB_ResidenceData.residenceData.HomeGateway.gatewayId)) |
| | | { |
| | | gatewayId = DB_ResidenceData.residenceData.HomeGateway.gatewayId; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 云端唯一ID |
| | |
| | | else |
| | | { |
| | | var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)); |
| | | FileUtils.WriteFileByBytes(savePath, ssd); |
| | | Common.FileUtlis.Files.WriteFileByBytes(savePath, ssd); |
| | | MainPage.Log($"Save Scene Data : {savePath}"); |
| | | } |
| | | } |
| | |
| | | if (revPack.Code == StateCode.SUCCESS) |
| | | { |
| | | var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)); |
| | | FileUtils.WriteFileByBytes(savePath, ssd); |
| | | Common.FileUtlis.Files.WriteFileByBytes(savePath, ssd); |
| | | } |
| | | } |
| | | else if (!string.IsNullOrEmpty(createTime) && !string.IsNullOrEmpty(modifyTime)) |
| | |
| | | if (tempScene != null) |
| | | { |
| | | var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(tempScene)); |
| | | FileUtils.WriteFileByBytes(savePath, ssd); |
| | | Common.FileUtlis.Files.WriteFileByBytes(savePath, ssd); |
| | | } |
| | | } |
| | | } |