| | |
| | | using System; |
| | | using System.Threading; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.Entity; |
| | | using Shared; |
| | | |
| | |
| | | var doorLockPage = new DoorLockPage(); |
| | | doorLockPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); |
| | | break; |
| | | case SPK.IpCam_Imou: |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var http = new HttpServerRequest(); |
| | | var pack = http.GetLcSubAccountToken(); |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | if (pack.Data == null || string.IsNullOrEmpty(pack.Data.ToString())) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new PublicAssmebly().TipMsg("", $"获取乐橙数据失败"); |
| | | }); |
| | | } |
| | | Com.Utils.HdlToLcUtils.Instance.InitData(Shared.Application.Activity, "HDL-HOME-APP-TEST", "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss", OnAppConfig.Instance.RequestHttpsHost); |
| | | Com.Utils.HdlToLcUtils.Instance.HomeId = DB_ResidenceData.Instance.CurrentRegion.id; |
| | | Com.Utils.HdlToLcUtils.Instance.Token = UserInfo.Current.AccessToken; |
| | | Com.Utils.HdlToLcUtils.Instance.SubAccessToken = pack.Data.ToString(); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //Com.Utils.HdlToLcUtils.Instance.OpenActivity(); |
| | | Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId,function.name); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new PublicAssmebly().TipMsg("", $"获取乐橙数据失败({pack.Code})"); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | break; |
| | | } |
| | | }; |
| | | return eventHandler; |