| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Shared.Phone;
|
| | | using Shared.Phone.UserCenter; |
| | | |
| | | namespace Shared.Common |
| | |
| | | /// <summary> |
| | | /// 是否为其他主用户分享过来的住宅 |
| | | /// </summary> |
| | | public bool IsOthreShare;
|
| | | /// <summary>
|
| | | /// 当前住宅是其他主帐号分享过来的主帐号的分布式Id
|
| | | /// </summary>
|
| | | public string MainUserDistributedMark; |
| | | public bool IsOtherShare; |
| | | /// <summary>
|
| | | /// 该住宅是否是虚拟的,true的话代表网关和设备都是虚拟的(默认为false)
|
| | | /// </summary> |
| | |
| | | /// <summary>
|
| | | /// 纬度
|
| | | /// </summary>
|
| | | public double Latitude = 0; |
| | | public double Latitude = 0;
|
| | | /// <summary>
|
| | | /// 是否拥有远程控制权限
|
| | | /// </summary> |
| | | public bool IsRemoteControl = false; |
| | | /// <summary>
|
| | | /// 住宅所在的地理位置的名称
|
| | | /// </summary> |
| | |
| | | /// 当前存放住宅数据的文件夹名字(此变量是给本机备份,或者云端下载备份使用的,请无视这个变量) |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string SaveDirctoryName = string.Empty; |
| | | public string SaveDirctoryName = string.Empty;
|
| | | |
| | | #endregion |
| | | |
| | |
| | | } |
| | | }
|
| | | /// <summary>
|
| | | /// 当前楼层ID
|
| | | /// 当前楼层id
|
| | | /// </summary>
|
| | | private string m_CurrentFloorId = string.Empty;
|
| | | /// <summary> |
| | | /// 当前楼层Id |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string CurrentFloorId = string.Empty; |
| | | public string CurrentFloorId
|
| | | {
|
| | | //来回切换备份,会出现问题,楼层id没清除
|
| | | get
|
| | | {
|
| | | //没有楼层
|
| | | if (this.FloorDics.Count == 0) { return string.Empty; }
|
| | |
|
| | | if (this.FloorDics.ContainsKey(m_CurrentFloorId) == true)
|
| | | {
|
| | | //当前的楼层id没问题
|
| | | return m_CurrentFloorId;
|
| | | }
|
| | | //如果当前设置的楼层id并不存在的话,重新设置
|
| | | m_CurrentFloorId = string.Empty;
|
| | | var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
|
| | | foreach (var floorId in dicFloor.Keys)
|
| | | {
|
| | | //给一个过去即可
|
| | | m_CurrentFloorId = floorId;
|
| | | break;
|
| | | }
|
| | | return m_CurrentFloorId;
|
| | | }
|
| | | set { m_CurrentFloorId = value; }
|
| | | } |
| | | |
| | | #endregion |
| | | |
| | |
| | | /// <param name="autoBackup">是否备份</param> |
| | | public void Save(bool autoBackup = true) |
| | | { |
| | | //如果当前是展示模板,则不允许保存 |
| | | if (this.IsShowTemplate == true) |
| | | { |
| | | return; |
| | | } |
| | | //修改时间 |
| | | 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 (autoBackup == true && Id == Config.Instance.HomeId) |
| | | { |
| | | HdlAutoBackupLogic.AddOrEditorFile(FileName); |
| | | HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(FileName); |
| | | } |
| | | } |
| | | #endregion |