| | |
| | | /// value:FloorName |
| | | /// </summary> |
| | | public Dictionary<string,string> FloorDics = new Dictionary<string,string> { }; |
| | | /// <summary> |
| | | /// -1:未配置(需要重新选择) 1:无模板有设备 2:有模板有设备 3:无模板无设备(请无视这个变量) |
| | | /// </summary> |
| | | public int TemplateMode = -1; |
| | | /// <summary> |
| | | /// 该住宅是否是展示模板(此变量是给查看模板数据时使用的,请无视这个变量) |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public bool IsShowTemplate = false; |
| | | /// <summary> |
| | | /// 当前住宅选择的模板名字(请无视这个变量) |
| | | /// </summary> |
| | | public string SelectTemplate = string.Empty; |
| | | /// <summary> |
| | | /// 自定义单元的标题名称(与ListUintContent个数匹配,请无视这个变量) |
| | | /// </summary> |
| | | public List<string> ListUintName = new List<string>(); |
| | | /// <summary> |
| | | /// 自定义单元的内容(与ListUintName个数匹配,请无视这个变量) |
| | | /// </summary> |
| | | public List<string> ListUintContent = new List<string>(); |
| | | /// <summary> |
| | | /// 最后编辑的事件(2020.05.26追加) 1970/12/31 23:59格式 |
| | | /// </summary> |
| | | public string LastEditorTime = "1970/12/31 23:59"; |
| | | /// <summary> |
| | | /// 标识此住宅的数据是否已经发送过模板数据给网关(只针对TemplateMode=2,请无视这个变量) |
| | | /// </summary> |
| | | public bool SendTemplateSuccess = false; |
| | | /// <summary> |
| | | /// 这个住宅下所拥有的网关id(2020.05.26追加,null代表没有处理过,请无视这个变量) |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public List<string> listGatewayId = null; |
| | | /// <summary> |
| | | /// <para>标识住宅数据的区分(文件读取时配置,请无视这个变量):</para> |
| | | /// <para>1:本身自己的数据(文件夹名字为住宅id)</para> |
| | | /// <para>2:自己手动创建的保存在本机的备份(文件夹名字以【BackupResidenceData】开头)</para> |
| | | /// <para>3:此数据从云端下载而来(文件夹名字以【DownLoadResidenceData】开头)</para> |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public int HouseDataDiv = 1; |
| | | /// <summary> |
| | | /// 当前住宅的在线状态 -1:虚拟 0:离线 1:本地 2:远程 3:读取中(请无视这个变量) |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string NowHomeOnlineStatu = "3"; |
| | | /// <summary> |
| | | /// 当前存放住宅数据的文件夹名字(此变量是给本机备份,或者云端下载备份使用的,请无视这个变量) |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string SaveDirctoryName = string.Empty; |
| | | |
| | | #endregion |
| | | |
| | |
| | | /// <param name="autoBackup">是否备份</param> |
| | | public void Save(bool autoBackup = true) |
| | | { |
| | | //修改时间 |
| | | this.LastEditorTime = DateTime.Now.ToString("yyyy/MM/dd HH:mm"); |
| | | var path = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Config.Instance.Guid, Id); |
| | | //如果没有存在住宅目录,先创建 |
| | | if (!System.IO.Directory.Exists(path)) |