| | |
| | | public Scene() |
| | | { |
| | | sid = NewSid(); |
| | | if (!DB_ResidenceData.residenceData.CheckWhetherGatewayIdIsNull()) |
| | | if (!DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull()) |
| | | { |
| | | gatewayId = DB_ResidenceData.residenceData.HomeGateway.gatewayId; |
| | | gatewayId = DB_ResidenceData.Instance.HomeGateway.gatewayId; |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | MainPage.Log($"Save Scene Data : {savePath}"); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 添加场景 |
| | | /// </summary> |
| | | public void AddScene() |
| | | { |
| | | var pm = new HttpServerRequest(); |
| | | var revPack = pm.AddScene(this); |
| | | if (revPack.Code == StateCode.SUCCESS) |
| | | { |
| | | var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)); |
| | | Common.FileUtlis.Files.WriteFileByBytes(savePath, ssd); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 上传数据到云端 |