From 753e67c3705dddb8e913bd853db151f94f81d600 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 05 六月 2023 09:45:05 +0800
Subject: [PATCH] Merge branch 'Dev-Wxr'

---
 HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs |   33 ++++++++++++++++++++++++++++++---
 1 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
index 527e504..3c7a086 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -3,6 +3,7 @@
 using HDL_ON.DAL.Server;
 using HDL_ON.Entity;
 using Shared;
+using static HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod;
 
 namespace HDL_ON.UI
 {
@@ -12,7 +13,7 @@
         /// <summary>
         /// 鍔熻兘鎺у埗鐣岄潰璺宠浆浜嬩欢
         /// </summary>
-        public EventHandler<MouseEventArgs> LoadEvent_SkipFunctionControlPage(Function function, Button btnCollectionIcon, Button btnName, Button btnFromFloor
+        public EventHandler<MouseEventArgs> LoadEvent_SkipFunctionControlPage(Function function, Button btnCollectionIcon, Button btnName, Button btnFromFloor, Comerom comerom,Action action
             )
         {
             EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
@@ -21,6 +22,10 @@
                 //璺宠浆鍒板姛鑳戒俊鎭缃〉闈�
                 switch (function.spk)
                 {
+                    case SPK.GroupControl:
+                         var dialog = new GroupControlPage(FunctionList.List.groupControls.Find((obj) => obj.sid == function.sid));
+                         dialog.ShowDialog();
+                        break;
                     case SPK.AirSwitch:
                         var airSwitchPage = new AirSwitchPage(function);
                         MainPage.BasePageView.AddChidren(airSwitchPage);
@@ -64,13 +69,13 @@
                         MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                         break;
                     case SPK.CurtainRoller:
-                        var rollingShutterView = new VenetianBlindsPage(function);
+                        var rollingShutterView = new RollingShutterPage(function);
                         MainPage.BasePageView.AddChidren(rollingShutterView);
                         rollingShutterView.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
                         MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                         break;
                     case SPK.CurtainShades:
-                        var curtainShadesView = new RollingShutterPage(function);
+                        var curtainShadesView = new VenetianBlindsPage(function);
                         MainPage.BasePageView.AddChidren(curtainShadesView);
                         curtainShadesView.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
                         MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
@@ -234,6 +239,18 @@
                         break;
                     case SPK.IpCam_Imou:
 #if __IOS__
+                        if (Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().AccessToken == null){//鏈垵濮嬪寲鎽勫儚澶�
+                            Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().InitSDKWithAppKey("HDL-HOME-APP-TEST", "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss", OnAppConfig.Instance.RequestHttpsHost);
+                            Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().AccessToken = UserInfo.Current.LoginTokenString;
+                            Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().RefreshToken = UserInfo.Current.RefreshToken;
+                            Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().HomeId = DB_ResidenceData.Instance.CurrentRegion.id;
+                            Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().RefreshDeviceList();
+                        }
+                        //璺宠浆澶у崕鎽勫儚澶�
+                        Shared.Application.currentVC.NavigationController.NavigationBar.BarTintColor = UIKit.UIColor.LightGray;
+                        Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().RefreshDeviceList();
+                        Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().ToMonitorViewWithDeviceId(function.extDevId, function.name, Shared.Application.currentVC);
+                        //Shared.Application.currentVC.NavigationController.NavigationBar.Hidden = false;
 #else
                         FunctionList.List.GetIpCamImouList();
                         if (string.IsNullOrEmpty(Com.Utils.HdlToLcUtils.Instance.SubAccessToken))
@@ -259,6 +276,7 @@
                                         Application.RunOnMainThread(() =>{
                                             try
                                             {
+
                                                 Com.Utils.HdlToLcUtils.Instance.SubAccessToken = pack.Data.ToString();
                                                 Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId, function.name);
                                             }
@@ -298,6 +316,7 @@
                         {
                             try
                             {
+
                                 Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId, function.name);
                             }
                             catch (Exception ex)
@@ -307,6 +326,14 @@
                         }
 #endif
                         break;
+                    case SPK.VideoDoorLock: {
+                            //钀ょ煶瑙嗛闂ㄩ攣
+                            var form = new VideoDoorLockPage(function, btnName, btnFromFloor,comerom,action);
+                            MainPage.BasePageView.AddChidren(form);
+                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                            form.Show();
+                        }
+                        break;
                 }
             };
             return eventHandler;

--
Gitblit v1.8.0