From 44aa189d9e01f8c0d19e00e44f1ef419ff2cc093 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期四, 08 十二月 2022 22:36:38 +0800 Subject: [PATCH] 2022年12月08日22:36:36 --- HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs | 76 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 76 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs index f3e5160..3a74f8e 100644 --- a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs +++ b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs @@ -1,5 +1,6 @@ 锘縰sing System; using System.Threading; +using HDL_ON.DAL.Server; using HDL_ON.Entity; using Shared; @@ -231,6 +232,81 @@ var doorLockPage = new DoorLockPage(); doorLockPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); break; + case SPK.IpCam_Imou: + FunctionList.List.GetIpCamImouList(); + if (string.IsNullOrEmpty(Com.Utils.HdlToLcUtils.Instance.SubAccessToken)) + { + var waitPage = new Loading(); + MainPage.BaseView.AddChidren(waitPage); + waitPage.Start(""); + new System.Threading.Thread(() => + { + try + { + 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(Language.StringByID(StringId.Tip), Language.StringByID(StringId.huoqushujushibao)); + }); + } +#if __ANDROID__ + Application.RunOnMainThread(() => + { + try + { + Com.Utils.HdlToLcUtils.Instance.SubAccessToken = pack.Data.ToString(); + Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId, function.name); + } + catch (Exception ex) + { + + } + }); +#endif + } + else + { + Application.RunOnMainThread(() => + { + new PublicAssmebly().TipMsg(Language.StringByID(StringId.Tip), Language.StringByID(StringId.huoqushujushibao) + $"({pack.Code})"); + }); + } + } + catch (Exception ex) + { + MainPage.Log("鍔犺浇涔愭鎽勫儚澶村紓甯�"); + } + finally + { + Application.RunOnMainThread(() => + { + if (waitPage != null) + { + waitPage.RemoveFromParent(); + waitPage = null; + } + }); + } + }) + { IsBackground = true }.Start(); + } + else + { + try + { + Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId, function.name); + } + catch (Exception ex) + { + + } + } + break; } }; return eventHandler; -- Gitblit v1.8.0