| | |
| | | /// <summary>
|
| | | /// 删除住宅
|
| | | /// </summary>
|
| | | public async void DeleteResidence()
|
| | | private void DeleteResidence()
|
| | | {
|
| | | //开启进度条
|
| | | this.ShowProgressBar();
|
| | |
| | | Pra.HomeId = Common.Config.Instance.Home.Id;
|
| | | Pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
|
| | |
|
| | | bool result = await UserCenterLogic.GetResultStatuByRequestHttps("App/DelHome", true, Pra);
|
| | | bool result = UserCenterLogic.GetResultStatuByRequestHttps("App/DelHome", true, Pra);
|
| | | if (result == false)
|
| | | {
|
| | | //关闭进度条
|
| | |
| | | HomeId = Common.Config.Instance.Home.Id,
|
| | | PrimaryUserId = Common.Config.Instance.Home.MainUserDistributedMark
|
| | | };
|
| | | bool result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/SubAccountDelShareHome", false, Pra2);
|
| | | bool result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/SubAccountDelShareHome", false, Pra2);
|
| | | if (result == false)
|
| | | {
|
| | | //关闭进度条
|
| | |
| | | Common.Config.Instance.Save();
|
| | |
|
| | | //刷新个人中心的内存及线程
|
| | | await UserCenterLogic.InitUserCenterMenmoryAndThread(false);
|
| | | UserCenterLogic.InitUserCenterMenmoryAndThread(false);
|
| | |
|
| | | //删除住宅
|
| | | HdlResidenceLogic.Current.DeleteHouseMemmory(deleteId);
|
| | |
| | | /// <param name="latitude">纬度</param>
|
| | | /// <param name="longitude">经度</param>
|
| | | /// <param name="addresName">位置名称</param>
|
| | | private async void SaveResidenceAdrress(NormalViewControl btnLocation, double latitude, double longitude, string addresName)
|
| | | private void SaveResidenceAdrress(NormalViewControl btnLocation, double latitude, double longitude, string addresName)
|
| | | {
|
| | | //如果不是虚拟住宅,才更新云端
|
| | | if (Common.Config.Instance.Home.IsVirtually == false)
|
| | |
| | | Pra.Longitude = longitude;
|
| | |
|
| | | //编辑住宅
|
| | | bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", true, Pra);
|
| | | bool flage = UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", true, Pra);
|
| | | if (flage == false)
|
| | | {
|
| | | //关闭进度条
|