From 8301df084faa8f43f4b9cb7f92088e5fd9e64524 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 01 十二月 2022 15:41:53 +0800 Subject: [PATCH] 大华摄像头更新 --- HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs | 68 ++++++++++++++++++++++++++++++++++ 1 files changed, 68 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs index 732abb2..78a0c6a 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; @@ -135,6 +136,10 @@ case SPK.ElectricTuyaWaterValve2: var tyWaterValve = new TuyaWaterValvePage(); tyWaterValve.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); + break; + case SPK.MechanicalArm: + var mechanicalArmPage = new MechanicalArmPage(); + mechanicalArmPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); break; case SPK.ElectricTuyaWeepRobot: case SPK.ElectricTuyaWeepRobot2: @@ -180,6 +185,7 @@ doorwindowPage.ShowColltionButton = false; doorwindowPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); break; + case SPK.SensorMmvPose: case SPK.SenesorMegahealth: case SPK.SenesorMegahealth2: var smPage = new SenesorMegahealthPage(); @@ -226,6 +232,68 @@ var doorLockPage = new DoorLockPage(); doorLockPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); break; + case SPK.IpCam_Imou: + FunctionList.List.GetIpCamImouList(); + + 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("", $"鑾峰彇涔愭鏁版嵁澶辫触"); + }); + } +#if __ANDROID__ + Application.RunOnMainThread(() => + { + try + { + 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(); + Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId, function.name); + } + catch (Exception ex) + { + + } + }); +#endif + } + else + { + Application.RunOnMainThread(() => + { + new PublicAssmebly().TipMsg("", $"鑾峰彇涔愭鏁版嵁澶辫触({pack.Code})"); + }); + } + }catch(Exception ex) + { + MainPage.Log("鍔犺浇涔愭鎽勫儚澶村紓甯�"); + } + finally + { + Application.RunOnMainThread(() => { + if (waitPage != null) + { + waitPage.RemoveFromParent(); + waitPage = null; + } + }); + } + }) + { IsBackground = true }.Start(); + break; } }; return eventHandler; -- Gitblit v1.8.0