| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | |
| | | // Radius = (uint)Application.GetMinRealAverage(30), |
| | | //}; |
| | | //backView.AddChidren(headImage2); |
| | | |
| | | //开启检测住宅是否已经添加了的线程 |
| | | this.StartCheckResidenceThread(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 开启检测住宅是否已经添加了的线程 |
| | | /// </summary> |
| | | private void StartCheckResidenceThread() |
| | | { |
| | | //获取住宅列表的参数 |
| | | var requestJson = DAL.Server.HttpUtil.GetSignRequestJson(new DAL.Server.GetHomeListObj() { homeType = HomeTypeEnum.ALL.ToString() }); |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | while (this.Parent != null) |
| | | { |
| | | System.Threading.Thread.Sleep(4000); |
| | | |
| | | //访问云端获取列表 |
| | | var resultObj = DAL.Server.HttpUtil.RequestHttpsPost(DAL.Server.NewAPI.API_POST_Gethomepager, requestJson); |
| | | if (resultObj.Code == DAL.Server.StateCode.SUCCESS) |
| | | { |
| | | var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoResNew>>(resultObj.Data.ToString()); |
| | | if (homeList == null || homeList.Count == 0) |
| | | { |
| | | //如果还没有住宅的话,继续下一次检测 |
| | | continue; |
| | | } |
| | | //调用On原来的方法,刷新住宅列表及其缓存 |
| | | var pm = new DAL.Server.HttpServerRequest(); |
| | | pm.GetHomePager(); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //跳转页面---- |
| | | MainPage.GoUserPage(false, () => |
| | | { |
| | | //显示欢迎回家的弹窗界面 |
| | | var form = new WellcomToHomeForm(); |
| | | form.ShowForm(); |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | } |
| | | } |