wxr
2023-04-11 cd70a2a8a2bdebf51259d8f39ed110a34b9be9e5
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) =>
@@ -64,13 +65,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;
@@ -233,6 +234,20 @@
                        doorLockPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        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.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().RefreshDeviceList();
                        Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().ToMonitorViewWithDeviceId(function.extDevId, function.name, Shared.Application.currentVC);
#else
                        FunctionList.List.GetIpCamImouList();
                        if (string.IsNullOrEmpty(Com.Utils.HdlToLcUtils.Instance.SubAccessToken))
                        {
@@ -254,11 +269,10 @@
                                                new PublicAssmebly().TipMsg(Language.StringByID(StringId.Tip), Language.StringByID(StringId.huoqushujushibao));
                                            });
                                        }
#if __ANDROID__
                                    Application.RunOnMainThread(() =>
                                        {
                                        Application.RunOnMainThread(() =>{
                                            try
                                            {
                                                Com.Utils.HdlToLcUtils.Instance.SubAccessToken = pack.Data.ToString();
                                                Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId, function.name);
                                            }
@@ -267,8 +281,7 @@
                                            }
                                        });
#endif
                                }
                                    }
                                    else
                                    {
                                        Application.RunOnMainThread(() =>
@@ -299,6 +312,7 @@
                        {
                            try
                            {
                                Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId, function.name);
                            }
                            catch (Exception ex)
@@ -306,6 +320,15 @@
                            }
                        }
#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;
                }
            };