From 9d447e6fabb17cb3a19525715a669e3b601fb8bd Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 28 三月 2023 15:56:42 +0800
Subject: [PATCH] 2023年03月28日15:56:14

---
 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs |  139 ++++++++++++++++++++++++++++++---------------
 1 files changed, 92 insertions(+), 47 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
index ccca825..8127c21 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
@@ -39,24 +39,27 @@
 
         }
 
-#region  --------- 璺宠浆鍒癆ndroid閭h竟鐨勬柟娉�(钀ょ煶瑙嗛闂ㄩ攣) --------
+        #region  --------- 璺宠浆鍒癆ndroid閭h竟鐨勬柟娉�(钀ょ煶瑙嗛闂ㄩ攣) --------
         /// <summary>
         /// 璇诲彇浜戠鐨勪笂璁惧鍒楄〃(android婧愮敓娣诲姞璁惧鍒颁簯绔垚鍔熷悗)
         /// <paramref name="devSerial"/>璁惧搴忓垪鍙�</param>
         /// </summary>
         public void SkipAddDeviceActivity(string spk)
         {
-#if __IOS__
 
-#else
             this.InitializationAndroidData((isBools) =>
             {
-                if (!isBools) {
-                    this.MainThread(()=> {
+                if (!isBools)
+                {
+                    this.MainThread(() =>
+                    {
                         this.ShowTip("鍏堣幏鍙栬悿鐭充簯瀛愯处鍙穞oken澶辫触銆�");
 
                     });
                 }
+#if __IOS__
+
+#else
                 HDLEzvizSdk.Instance.JumpToEZScanActivity(Application.Activity,spk);
                 HDLEzvizSdk.SetAddCallback(new AndroidIHdlInterface((isBool, adnroidActionDevSerial) =>
                 {
@@ -77,11 +80,12 @@
                     }
 
                 }));
+#endif
             });
 
 
 
-#endif
+
 
         }
         /// <summary>
@@ -90,39 +94,57 @@
         /// <param name="deviceSerial">璁惧搴忓垪鍙�</param>
         /// <param name="deviceId">璁惧id(浜戠涓奷eviceId)</param>
         /// <param name="spk">璁惧spk(浜戦泙涓婂畾涔夊ソ鐨�)</param>
-        public void SkipRTVActivity(string deviceSerial, string deviceId, string spk)
+        /// <param name="isDialog">鏄惁闇�瑕佸脊妗�</param>
+        public void SkipRTVActivity(string deviceSerial, string deviceId, string spk, bool isDialog)
         {
-#if __IOS__
-#else
+
             this.InitializationAndroidData((isBools) =>
             {
                 if (!isBools)
                 {
-                    this.MainThread(() => {
+                    this.MainThread(() =>
+                    {
                         this.ShowTip("鍏堣幏鍙栬悿鐭充簯瀛愯处鍙穞oken澶辫触銆�");
 
                     });
                 }
-                Video.View.ShowDialog.Currnet.ClickBox(Language.StringByID(StringId.laizimenlinghujiao), (dialog) =>
-                {
-                    dialog.Close();
-                    HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk);
-                }, (dialog) =>
-                {
-                    dialog.Close();
-                });
-               
-            });
-          
 
+                if (isDialog)
+                {
+                    Video.View.ShowDialog.Currnet.ClickBox(Language.StringByID(StringId.laizimenlinghujiao), (dialog) =>
+                    {
+                        dialog.Close();
+#if __IOS__
+
+#else
+                    HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk);
 #endif
+                    }, (dialog) =>
+                    {
+                        dialog.Close();
+                    });
+                }
+                else
+                {
+#if __IOS__
+#else
+                    HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk);
+#endif
+                }
+
+
+            });
+
+
+
         }
         /// <summary>
         /// 娴忚鍘嗗彶璁板綍
         /// </summary>
         public void SkipRecordActivity(string deviceId)
         {
-            this.InitializationAndroidData((s)=> {
+            this.InitializationAndroidData((s) =>
+            {
 
 #if __IOS__
 #else
@@ -164,8 +186,8 @@
         /// </summary>
         public void InitializationAndroidData(Action<bool> action)
         {
-           
-   
+
+
             bool isBool = true;
             this.SunThread(() =>
             {
@@ -179,24 +201,24 @@
                         {
                             //Token
                             isBool = false;
-                            return; 
+                            return;
                         }
                         Application.RunOnMainThread(() =>
                         {
 #if __IOS__
-                                //iOS
-                                //鍒濆鍖栬悿鐭充簯SDK锛屼腑鏂囧浗鍐卥ey銆佽嫳鏂囨捣澶杒ey 寮�鍙戣�呰处鍙蜂娇鐢ㄥ簲鐢ㄥ寘鍚嶇敵璇风殑APPKEY锛屼笉鍚屽寘鍚嶅簲鐢ㄩ渶閰嶇疆涓嶅悓鐨凙PPKEY
-                                EZSDK.IOS.EZSDK.SharedInstance().InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b");
-                                //1.璁剧疆鎵�闇�娌充笢鐨凙ccessToken鍜孯efreshToken銆佸煙鍚嶅湴鍧�
-                                EZSDK.IOS.EZSDK.SharedInstance().SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken);
-                                EZSDK.IOS.EZSDK.SharedInstance().SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, DB_ResidenceData.Instance.CurrentRegion.id);
-                                //2.璁剧疆钀ょ煶瀛愯处鍙风殑AccessToken鍒癝DK
-                                EZSDK.IOS.EZSDK.SharedInstance().SetEZAccessToken(ezChildAccessToken);
-                                ////3.鎵撳紑鎽勫儚澶磋澶囧垪琛ㄩ〉闈�
-                                EZSDK.IOS.EZSDK.SharedInstance().Go2EZvizMonitor();
-                                //EZSDK.IOS.EZDeviceInfo info = new EZSDK.IOS.EZDeviceInfo();
-                                //info.de
-                                //EZSDK.IOS.EZSDK.Play(info);
+                            //iOS
+                            //鍒濆鍖栬悿鐭充簯SDK锛屼腑鏂囧浗鍐卥ey銆佽嫳鏂囨捣澶杒ey 寮�鍙戣�呰处鍙蜂娇鐢ㄥ簲鐢ㄥ寘鍚嶇敵璇风殑APPKEY锛屼笉鍚屽寘鍚嶅簲鐢ㄩ渶閰嶇疆涓嶅悓鐨凙PPKEY
+                            EZSDK.IOS.EZSDK.SharedInstance().InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b");
+                            //1.璁剧疆鎵�闇�娌充笢鐨凙ccessToken鍜孯efreshToken銆佸煙鍚嶅湴鍧�
+                            EZSDK.IOS.EZSDK.SharedInstance().SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken);
+                            EZSDK.IOS.EZSDK.SharedInstance().SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, DB_ResidenceData.Instance.CurrentRegion.id);
+                            //2.璁剧疆钀ょ煶瀛愯处鍙风殑AccessToken鍒癝DK
+                            EZSDK.IOS.EZSDK.SharedInstance().SetEZAccessToken(ezChildAccessToken);
+                            //////3.鎵撳紑鎽勫儚澶磋澶囧垪琛ㄩ〉闈�
+                            //EZSDK.IOS.EZSDK.SharedInstance().Go2EZvizMonitor();
+                            //EZSDK.IOS.EZDeviceInfo info = new EZSDK.IOS.EZDeviceInfo();
+                            //info.de
+                            //EZSDK.IOS.EZSDK.Play(info);
 #else
                             HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, "1aa98a90489b4838b966b57018b4b04b", 1, DB_ResidenceData.Instance.CurrentRegion.id);
 
@@ -228,7 +250,7 @@
             if (DB_ResidenceData.Instance.CurrentRegion.id == home.id || string.IsNullOrEmpty(home.id)) return;
 
         }
-#endregion
+        #endregion
 
         /// <summary>
         /// 钀ょ煶瑙嗛闂ㄩ攣鐨勫浘鏍�
@@ -246,7 +268,7 @@
             }
 
         }
-#region  --------- 鍔熻兘鏂囦欢淇濆瓨锛屽垹闄� --------
+        #region  --------- 鍔熻兘鏂囦欢淇濆瓨锛屽垹闄� --------
         /// <summary>
         /// 淇濆瓨鏈湴鏂囦欢
         /// </summary>
@@ -270,7 +292,7 @@
             FunctionList.List.DeleteFunction(function);
             MainPage.Log($"鏂囦欢鍒犻櫎->{function.name}-->{function.spk}");
         }
-#endregion
+        #endregion
         /// <summary>
         /// 鑾峰彇Loading瀵硅薄
         /// </summary>
@@ -317,7 +339,7 @@
 #endif
             return list;
         }
-#region  ---------鑷畾涔夌嚎绋�(瀛愮嚎绋嬶紝涓荤嚎绋�)--------
+        #region  ---------鑷畾涔夌嚎绋�(瀛愮嚎绋嬶紝涓荤嚎绋�)--------
         /// <summary>
         /// 瀛愮嚎绋�
         /// </summary>
@@ -359,8 +381,8 @@
             });
 
         }
-#endregion
-#region  --------- 鎻愮ず妗嗭紝纭妗� --------
+        #endregion
+        #region  --------- 鎻愮ず妗嗭紝纭妗� --------
         /// <summary>
         /// 瀵硅瘽妗�(鍙绋嬪簭鎶ラ敊鐨勬椂鍊欐墠鐢ㄥ埌)
         /// </summary>
@@ -400,7 +422,7 @@
                 new PublicAssmebly().TipMsgAutoClose(msg, false, time * 1000);
             });
         }
-#endregion
+        #endregion
         /// <summary>
         /// 寮规绫诲瀷
         /// </summary>
@@ -422,9 +444,32 @@
         }
 
 #if __IOS__
+        ///// <summary>
+        ///// 涓撻棬瀹氫箟缁橧os鍥炶皟鐢ㄧ潃,娌℃湁鐗规畩鍚箟
+        ///// </summary>
+        //public class IosIHdlInterface : Shared.IOS.HDLLinphoneSDK.HDLLinphoneCallDelegate
+        //{
+
+        //    Action<bool, string> mAction;
+        //    public IosIHdlInterface(Action<bool, string> action)
+        //    {
+        //        mAction = action;
+        //    }
+        //    /// <summary>
+        //    /// 
+        //    /// </summary>
+        //    /// <param name="p0">true鏄叆缃戞垚鍔�(婧愮敓鍥炶皟杩斿洖)</param>
+        //    /// <param name="p1">璁惧鐨勫簭鍒楀寲(婧愮敓鍥炶皟杩斿洖)</param>
+        //    public void AddCallback(bool p0, string p1)
+        //    {
+        //        mAction?.Invoke(p0, p1);
+        //    }
+
+           
+        //}
 #else
         /// <summary>
-        /// 
+        /// 涓撻棬瀹氫箟缁欏畨鍗撳洖璋冪敤鐫�,娌℃湁鐗规畩鍚箟
         /// </summary>
         public class AndroidIHdlInterface : Java.Lang.Object, IHdlInterface
         {
@@ -451,5 +496,5 @@
 
     }
 
- 
+
 }

--
Gitblit v1.8.0