old mode 100755
new mode 100644
| | |
| | | } |
| | | DB_ResidenceData.Instance.CurrentRegion = homeTemp; |
| | | DB_ResidenceData.Instance.SaveResidenceData(); |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | DB_ResidenceData.Instance.EixtAccount(); |
| | | //刷新一次住宅网关 |
| | | new HttpServerRequest().GetHomeGatewayList(); |
| | | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.Name; |
| | | //重置网关状态 |
| | | DriverLayer.Control.Ins.GatewayOnline = false; |
| | | }); |
| | | |
| | | //搜索网关 |
| | | DriverLayer.Control.Ins.SearchLoaclGateway(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.OperationFailed), |
| | | Language.StringByID(StringId.Close)).Show(); |
| | | }); |
| | | MainPage.Log(ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | waitPage.RemoveFromParent(); |
| | | MainPage.InitializationData(); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.Name; |
| | | DB_ResidenceData.Instance.EixtAccount(); |
| | | //刷新住宅数据 |
| | | Common.ApiUtlis.Ins.DownloadData(); |
| | | } |
| | | #endregion |
| | | |