| | |
| | | } |
| | | } |
| | | } |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | new System.Threading.Thread(async() => |
| | | { |
| | | //function.UpdataRoomIds(); |
| | | var pack = ApiUtlis.Ins.HttpRequest.UpdataDevcieBindRoomInfo(function); |
| | | //直接保存本地, |
| | | function.SaveFunctionFile(); |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | if (UI.RoomPage.bodyView != null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | UI.RoomPage.bodyView.ReLoadPage(); |
| | | }); |
| | | } |
| | | Entity.SpatialInfo.CurrentSpatial.InitRoomListFunctions(); |
| | | try |
| | | { |
| | | //初始化住宅所有房间功能数据 |
| | | foreach (var r in Entity.SpatialInfo.CurrentSpatial.RoomList) |
| | | { |
| | | Entity.SpatialInfo.CurrentSpatial.InitRoomFuntion(r); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"Init room function error : {ex.Message}"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); |
| | | } |
| | | |
| | | function.UpdataRoomIds(); |
| | | Entity.SpatialInfo.CurrentSpatial.InitRoomListFunctions(); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | } |
| | | |