From 87bc1140ac4a1dc3e46a322444a80a9ce321b57d Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 11 四月 2023 13:33:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/wjc' into Dev-Wxr --- HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs | 63 +++++++++++++++++++------------ 1 files changed, 39 insertions(+), 24 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs index 6613907..0a6aec7 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs @@ -4,6 +4,7 @@ using Shared; using HDL_ON.DAL.Server; #if __IOS__ +using Foundation; #else using Com.Videogo.Hdl; #endif @@ -50,34 +51,44 @@ this.InitializationAndroidData((isEzChildAccessToken) => { - - this.MainThread(() => + this.SunThread(() => { -#if __IOS__ - //璺宠浆娣诲姞钀ょ煶璁惧 - ezsdkDelegate = new IosIHdlInterface(); - ezsdkDelegate.mAction += (serials) => + var list = this.GetVideoDoorLockLockModelsList("notAllowedConfigNetworkModels"); + this.MainThread(() => { - this.GetYingshiDeviceList(serials); - }; - EZSDK.IOS.EZSDK.SharedInstance().Delegate = ezsdkDelegate; - EZSDK.IOS.EZSDK.SharedInstance().AddEzvizMonitorWithDeviceType(spk); +#if __IOS__ + //璺宠浆娣诲姞钀ょ煶璁惧 + ezsdkDelegate = new IosIHdlInterface(); + ezsdkDelegate.mAction += (serials) => + { + this.GetYingshiDeviceList(serials); + }; + EZSDK.IOS.EZSDK.SharedInstance().Delegate = ezsdkDelegate; + NSObject[] nSObject = new NSObject[list.Count]; + for (int i = 0; i < list.Count; i++) + { + string strValue = list[i]; + nSObject[i] = new NSString(strValue); + } + EZSDK.IOS.EZSDK.SharedInstance().ConnectTipModels = nSObject; + EZSDK.IOS.EZSDK.SharedInstance().AddEzvizMonitorWithDeviceType(spk); #else - HDLEzvizSdk.Instance.JumpToEZScanActivity(Application.Activity,spk); - HDLEzvizSdk.SetAddCallback(new AndroidIHdlInterface((isBool, serials) => - { - if (isBool) + HDLEzvizSdk.Instance.JumpToEZScanActivity(Application.Activity, spk,list); + HDLEzvizSdk.SetAddCallback(new AndroidIHdlInterface((isBool, serials) => { - this.GetYingshiDeviceList(serials); - } + if (isBool) + { + this.GetYingshiDeviceList(serials); + } - })); + })); #endif + }); + + }); - - }); @@ -203,6 +214,7 @@ public void InitializationAndroidData(Action<bool> action) { bool isBool = true; + this.Loading.Start(); this.SunThread(() => { try @@ -215,7 +227,7 @@ { //Token isBool = false; - this.ShowTip("鍏堣幏鍙栬悿鐭充簯瀛愯处鍙穞oken澶辫触銆�"); + this.ShowTip("鑾峰彇钀ょ煶浜戝瓙璐﹀彿token澶辫触銆�"); return; } @@ -249,6 +261,7 @@ { this.MainThread(() => { + this.Loading.Hide(); action?.Invoke(isBool); }); } @@ -275,9 +288,9 @@ /// 鑾峰彇銆愰棬閿佸瀷鍙枫�戝垪琛� /// </summary> /// <returns>杩斿洖缁撴灉涓嶄細涓簄ull</returns> - public List<string> GetVideoDoorLockLockModelsList() + public List<string> GetVideoDoorLockLockModelsList(string mode = "lockModels") { - return VideDoorLockSend.Current.GetVideoDoorLockLockModelsList(); + return VideDoorLockSend.Current.GetVideoDoorLockLockModelsList(mode); } /// <summary> /// 闂ㄩ攣鎺ㄩ�� @@ -382,6 +395,7 @@ /// </summary> public string GetVideoDoorLockIcon(Comerom comerom) { + if (comerom == Comerom.collect) { return "FunctionIcon/DoorLock/VideoDoorLockOpen.png"; @@ -531,12 +545,13 @@ collect,//鏀惰棌 room,//鎴块棿 push,//鎺ㄩ�� + sanfan,//娣诲姞绗笁鏂硅澶� } #if __IOS__ IosIHdlInterface ezsdkDelegate; /// <summary> - /// 涓撻棬瀹氫箟缁橧os鍥炶皟鐢ㄧ潃,娌℃湁鐗规畩鍚箟 + /// 涓撻棬瀹氫箟缁橧os鍥炶皟鐢�,娌℃湁鐗规畩鍚箟 /// </summary> public class IosIHdlInterface : EZSDK.IOS.EZSDKDelegate { @@ -557,7 +572,7 @@ } #else /// <summary> - /// 涓撻棬瀹氫箟缁欏畨鍗撳洖璋冪敤鐫�,娌℃湁鐗规畩鍚箟 + /// 涓撻棬瀹氫箟缁欏畨鍗撳洖璋冪敤,娌℃湁鐗规畩鍚箟 /// </summary> public class AndroidIHdlInterface : Java.Lang.Object, IHdlInterface { -- Gitblit v1.8.0