| | |
| | | /// <summary> |
| | | /// 仅子账号登陆的时候使用,当【IsOthreShare】为"true",并且【AccountType】为"1"时,该账号拥有管理员权限 |
| | | /// </summary> |
| | | public int AccountType; |
| | | public int AccountType;
|
| | | /// <summary>
|
| | | /// 经度
|
| | | /// </summary>
|
| | | public double Longitude = 0;
|
| | | /// <summary>
|
| | | /// 纬度
|
| | | /// </summary>
|
| | | public double Latitude = 0; |
| | | |
| | | /// <summary> |
| | | /// 房间路径列表 |
| | |
| | | /// </summary> |
| | | public static async System.Threading.Tasks.Task<List<string>> GetHomeLists() |
| | | { |
| | | //清空当前住宅列表 |
| | | Config.Instance.HomeFilePathList.Clear(); |
| | | var pageSetting = new SendDataToServer.ResidenceListPageSettingObj() |
| | | { |
| | | PageSize = CommonPage.PageSize |
| | |
| | | if (responseDataObj.TotalCount == 0) |
| | | { |
| | | //当住宅为空时先提示用户新建住宅 |
| | | var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.CurrentlyTheUserIshHouseIsEmptyPleaseBuildANewHouseFirst), Language.StringByID(R.MyInternationalizationString.Close), Language.StringByID(R.MyInternationalizationString.OK)); |
| | | var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.CurrentlyTheUserIshHouseIsEmptyPleaseBuildANewHouseFirst), Language.StringByID(R.MyInternationalizationString.Close), Language.StringByID(R.MyInternationalizationString.Confrim)); |
| | | alert.Show(); |
| | | alert.ResultEventHandler += (sender, e) => |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | //清空当前住宅列表 |
| | | Config.Instance.HomeFilePathList.Clear(); |
| | | if (Config.Instance.HomeId == string.Empty && responseDataObj.PageData.Count > 0) |
| | | { |
| | | //赋一个初始值 |
| | |
| | | Name = residence.Name, |
| | | IsOthreShare = residence.IsOthreShare, |
| | | AccountType = residence.AccountType, |
| | | MainUserDistributedMark = residence.MainUserDistributedMark |
| | | MainUserDistributedMark = residence.MainUserDistributedMark, |
| | | Longitude = residence.Longitude, |
| | | Latitude = residence.Latitude |
| | | }; |
| | | } |
| | | else |
| | |
| | | house.Name = residence.Name; |
| | | house.IsOthreShare = residence.IsOthreShare; |
| | | house.AccountType = residence.AccountType; |
| | | house.MainUserDistributedMark = residence.MainUserDistributedMark; |
| | | house.MainUserDistributedMark = residence.MainUserDistributedMark;
|
| | | house.Longitude = residence.Longitude;
|
| | | house.Latitude = residence.Latitude; |
| | | } |
| | | Global.CreateHomeDirectory(residence.Id); |
| | | house.Save(); |
| | | house.Save(false); |
| | | } |
| | | //匹配当前住宅 |
| | | if (Config.Instance.HomeFilePathList.Find((obj) => obj == $"House_{Config.Instance.HomeId}.json") == null) |
| | |
| | | } |
| | | return null; |
| | | } |
| | | /// <summary> |
| | | /// InitFloor |
| | | /// </summary> |
| | | public void InitFloor() |
| | | { |
| | | if (Config.Instance.Home.FloorDics.Count > 0 && string.IsNullOrEmpty(CurrentFloorId)) |
| | | { |
| | | foreach (var floor in Config.Instance.Home.FloorDics) |
| | | { |
| | | CurrentFloorId = floor.Key; |
| | | Save(false); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |