From 8407d6631ac8f5b65c4a14fa27babaa48026d4ca Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 30 三月 2023 16:13:40 +0800 Subject: [PATCH] Merge branch 'wjc' into Dev-Branch --- HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen.png | 0 HDL-ON_Android/Assets/Language.ini | 41 HDL-ON_iOS/HDL-ON_iOS.csproj | 34 HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 87 + HDL_ON/Common/ApiUtlis.cs | 3 HDL_ON/UI/UI2/2-Classification/RoomPage.cs | 35 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/HistoryList.png | 0 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs | 40 HDL_ON/HDL_ON.projitems | 6 HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs | 13 HDL-ON_Android/HDL-ON_Android.csproj | 36 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/OneOpenLock.png | 0 HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs | 63 + HDL_ON/Common/HDLCommon.cs | 93 + HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 22 HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs | 42 HDL_ON/Entity/Enumerative/MyEnum.cs | 4 HDL_ON/Entity/Room.cs | 3 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLocking.png | 0 HDL_ON/UI/UI2/FuntionControlView/Music/View/SizeClass.cs | 85 HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs | 1 HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs | 2 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/ObjectClass.cs | 104 + HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorlockClose.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLocking.png | 0 HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs | 1 HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/securitydoorezviz.png | 0 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs | 588 ++++++++++ HDL_ON/Common/Constant.cs | 4 HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs | 17 HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs | 2 HDL_ON/Entity/DB_ResidenceData.cs | 4 HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs | 62 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/history.png | 0 HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard | 9 HDL_ON/Entity/Function/Function.cs | 17 HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 12 HDL_ON/UI/UI2/2-Classification/FunctionPage.cs | 6 HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 32 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs | 540 +++++++++ HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/securitydoorezviz.png | 0 HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs | 14 HDL-ON_iOS/BlueWifi.cs | 3 HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs | 66 HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs | 16 HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 22 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/HistoryList.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Cell.png | 0 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 15 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Cell.png | 0 HDL_ON/UI/UI2/UserPage.cs | 3 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/OneOpenLock.png | 0 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs | 237 ++++ HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLocked.png | 0 HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs | 173 ++ HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs | 8 HDL-ON_iOS/Resources/Language.ini | 31 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorLockClose.png | 0 HDL-ON_iOS/Resources/en.lproj/Localizable.strings | 43 HDL_ON/UI/UI0-Stan/Logic/HdlBluetoothAndroidLogic.cs | 2 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs | 222 ++++ HDL-ON_iOS/Resources/Phone/FunctionIcon/FunctionBg/VideoDoorLockFunctionBg.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockClose.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/RTV.png | 0 HDL_ON/DAL/DriverLayer/Control.cs | 92 HDL_ON/Entity/ResponseEntity/ResidenceMemberInfo.cs | 22 HDL-ON_iOS/Resources/EZ/Base.lproj/EZVideoTalkViewcontroller.xib | 20 HDL_APP_Project.sln | 14 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/RTV.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLocked.png | 0 DLL/IOS/EZSDK.IOS.dll | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen.png | 0 HDL_ON/Entity/FunctionList.cs | 9 HDL-ON_iOS/Resources/zh-Hans.lproj/Localizable.strings | 3 HDL_ON/DAL/Server/NewAPI.cs | 46 HDL-ON_Android/Assets/Phone/FunctionIcon/FunctionBg/VideoDoorLockFunctionBg.png | 0 HDL-ON_Android/Resources/drawable/dialog_background2.xml | 2 HDL-ON_iOS/Resources/EZ/Base.lproj/EZMain.storyboard | 22 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/StackTraceLog.cs | 58 + HDL_ON/Common/R.cs | 58 + HDL_ON/DAL/Server/HttpServerRequest.cs | 20 HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs | 11 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs | 4 DLL/EZvizMonitor/ys.dll | 0 HDL-ON_Android/Resources/drawable/btn_disagree.xml | 2 HDL-ON_Android/Other/JPush/JPushReceiver.cs | 3 86 files changed, 2,929 insertions(+), 320 deletions(-) diff --git a/DLL/EZvizMonitor/ys.dll b/DLL/EZvizMonitor/ys.dll index 7c6eb30..8cfec92 100644 --- a/DLL/EZvizMonitor/ys.dll +++ b/DLL/EZvizMonitor/ys.dll Binary files differ diff --git a/DLL/IOS/EZSDK.IOS.dll b/DLL/IOS/EZSDK.IOS.dll index 5d1bcdc..0751c8a 100644 --- a/DLL/IOS/EZSDK.IOS.dll +++ b/DLL/IOS/EZSDK.IOS.dll Binary files differ diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index 91e148e..6d53d64 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -1127,7 +1127,7 @@ 7155=Distress/Normal 7156=Distress 7157=whether to unlock -7158=is +7158=Is 7159=Fall in the alarm 7160=Someone called the police 7161=Warning tone @@ -1135,9 +1135,24 @@ 7163=Video call 7164=Manipulator 7165=Area intrusion alarm -7166=camera -7167=main switch +7166=Camera +7167=Main switch 7168=PM10 + +8501=Video door lock +8502=Electric quantity +8503=The door is now closed +8504=The door is not closed +8505=RVC +8506=One click to open the lock +8507=Temporary password +8508=History +8509=Fluorite video door lock +8510=Call from the doorbell +8511=User Education + + + @@ -2381,6 +2396,26 @@ 7168=PM10 +8501=瑙嗛闂ㄩ攣 +8502=鐢甸噺 +8503=褰撳墠闂ㄥ凡鍏� +8504=褰撳墠闂ㄦ湭鍏� +8505=瀹炴椂瑙嗛 +8506=涓�閿紑閿� +8507=涓存椂瀵嗙爜 +8508=鍘嗗彶璁板綍 +8509=钀ょ煶瑙嗛闂ㄩ攣 +8510=鏉ヨ嚜鈥滈棬閾冣�濆懠鍙� +8511=鐢ㄦ埛浜哄憳 + + + + + + + + + 9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Cell.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Cell.png new file mode 100644 index 0000000..5ae517b --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Cell.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/HistoryList.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/HistoryList.png new file mode 100644 index 0000000..0ad1a69 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/HistoryList.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/OneOpenLock.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/OneOpenLock.png new file mode 100644 index 0000000..779d661 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/OneOpenLock.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/RTV.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/RTV.png new file mode 100644 index 0000000..002d330 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/RTV.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLocked.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLocked.png new file mode 100644 index 0000000..058119f --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLocked.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLocking.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLocking.png new file mode 100644 index 0000000..6c15f4f --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLocking.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockClose.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockClose.png new file mode 100644 index 0000000..e4d40fb --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockClose.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen.png new file mode 100644 index 0000000..5d35a45 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorlockClose.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorlockClose.png new file mode 100644 index 0000000..e4d40fb --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorlockClose.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/history.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/history.png new file mode 100644 index 0000000..7609540 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/history.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/FunctionBg/VideoDoorLockFunctionBg.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/FunctionBg/VideoDoorLockFunctionBg.png new file mode 100644 index 0000000..eeba7ab --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/FunctionBg/VideoDoorLockFunctionBg.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/securitydoorezviz.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/securitydoorezviz.png new file mode 100644 index 0000000..e4d40fb --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/securitydoorezviz.png Binary files differ diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj index ef8047f..dccad48 100644 --- a/HDL-ON_Android/HDL-ON_Android.csproj +++ b/HDL-ON_Android/HDL-ON_Android.csproj @@ -163,15 +163,6 @@ <Reference Include="videophone"> <HintPath>..\DLL\FL\Android\videophone.dll</HintPath> </Reference> - <Reference Include="Square.OkHttp3"> - <HintPath>..\DLL\EZvizMonitor\Square.OkHttp3.dll</HintPath> - </Reference> - <Reference Include="Square.OkIO"> - <HintPath>..\DLL\EZvizMonitor\Square.OkIO.dll</HintPath> - </Reference> - <Reference Include="ys"> - <HintPath>..\DLL\EZvizMonitor\ys.dll</HintPath> - </Reference> <Reference Include="UMSdkDroid"> <HintPath>..\DLL\UMeng\UMSdkDroid.dll</HintPath> </Reference> @@ -421,6 +412,16 @@ <AndroidAsset Include="Assets\h5\static\font\SourceHanSansCN-Normal.otf" /> <AndroidAsset Include="Assets\Phone\MusicIcon\currentPlayList.png" /> <AndroidAsset Include="Assets\Phone\PersonalCenter\CombinedDimmingIcon.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\OneOpenLock.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\RTV.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\UnLocked.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\UnLocking.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorlockClose.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorLockOpen.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\History.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Cell.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\FunctionBg\VideoDoorLockFunctionBg.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\securitydoorezviz.png" /> </ItemGroup> <ItemGroup> <AndroidResource Include="Resources\values\colors.xml" /> @@ -769,14 +770,17 @@ <PackageReference Include="Xamarin.Android.Support.Constraint.Layout.Solver"> <Version>1.1.0</Version> </PackageReference> - <PackageReference Include="Microsoft.AppCenter"> - <Version>4.2.0</Version> - </PackageReference> <PackageReference Include="Microsoft.AppCenter.Crashes"> <Version>4.2.0</Version> </PackageReference> <PackageReference Include="Microsoft.AppCenter.Analytics"> <Version>4.2.0</Version> + </PackageReference> + <PackageReference Include="Microsoft.AppCenter"> + <Version>4.2.0</Version> + </PackageReference> + <PackageReference Include="Square.OkHttp3"> + <Version>3.14.4</Version> </PackageReference> </ItemGroup> <ItemGroup> @@ -1618,7 +1622,7 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\NormallyOpenIcon3.png" /> </ItemGroup> <ItemGroup> - <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\History.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\HistoryList.png" /> </ItemGroup> <ItemGroup> <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\DoorLock.png" /> @@ -1632,6 +1636,12 @@ <Folder Include="Assets\Phone\FunctionIcon\Inverter\" /> <Folder Include="Assets\Phone\FunctionIcon\Electrical\MechanicalArm\" /> </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\ys\ys.csproj"> + <Project>{DF065E3F-C3A1-4908-9582-000974B7C290}</Project> + <Name>ys</Name> + </ProjectReference> + </ItemGroup> <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. diff --git a/HDL-ON_Android/Other/JPush/JPushReceiver.cs b/HDL-ON_Android/Other/JPush/JPushReceiver.cs index 07f2fcb..e7cfbd3 100644 --- a/HDL-ON_Android/Other/JPush/JPushReceiver.cs +++ b/HDL-ON_Android/Other/JPush/JPushReceiver.cs @@ -36,7 +36,6 @@ { //2020-12-23 瑙e喅鐐瑰嚮閫氱煡鏍忔墦寮�涓嶄簡APP闂 //base.OnNotifyMessageOpened(context, notificationMessage); - OpenNotification(context, notificationMessage); } @@ -48,7 +47,7 @@ public override void OnNotifyMessageArrived(Context context, NotificationMessage notificationMessage) { base.OnNotifyMessageArrived(context, notificationMessage); - + var pushMes = new JPushMessageInfo() { Title = notificationMessage.NotificationTitle, diff --git a/HDL-ON_Android/Resources/drawable/btn_disagree.xml b/HDL-ON_Android/Resources/drawable/btn_disagree.xml index c129eee..b6d14b6 100644 --- a/HDL-ON_Android/Resources/drawable/btn_disagree.xml +++ b/HDL-ON_Android/Resources/drawable/btn_disagree.xml @@ -8,7 +8,7 @@ <!-- 濉厖棰滆壊 --> <solid - android:color="@color/white" /> + android:color="#FFFFFF"/> <!-- 杈规棰滆壊--> <stroke diff --git a/HDL-ON_Android/Resources/drawable/dialog_background2.xml b/HDL-ON_Android/Resources/drawable/dialog_background2.xml index 47caf57..197bb29 100644 --- a/HDL-ON_Android/Resources/drawable/dialog_background2.xml +++ b/HDL-ON_Android/Resources/drawable/dialog_background2.xml @@ -8,6 +8,6 @@ <!-- 濉厖棰滆壊 --> <solid - android:color="@color/white" /> + android:color="#FFFFFF"/> </shape> \ No newline at end of file diff --git a/HDL-ON_iOS/BlueWifi.cs b/HDL-ON_iOS/BlueWifi.cs index aad7a0c..e0217f9 100644 --- a/HDL-ON_iOS/BlueWifi.cs +++ b/HDL-ON_iOS/BlueWifi.cs @@ -30,13 +30,14 @@ //public string GetPer() //{ //share. - //} + //}1 /// <summary> /// 鎼滅储鍒拌摑鐗欒澶囦箣鍚庡埌浠g悊浜嬩欢 /// </summary> FBYBleDeviceBackBlock getBlufiDeviceDelegate; + /// <summary> /// 璁惧鎼滅储鍒拌摑鐗欒澶囦箣鍚庡埌浠g悊浜嬩欢 /// </summary> diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index 2b904d6..60b6ad2 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -26,7 +26,7 @@ <MtouchLink>Full</MtouchLink> <MtouchDebug>true</MtouchDebug> <CodesignKey>iPhone Developer</CodesignKey> - <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC";-w</MtouchExtraArgs> + <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs> <CodesignProvision>On+Dev-20210616-1</CodesignProvision> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> @@ -93,29 +93,29 @@ <Reference Include="Shared.IOS.HDLSceneSiri"> <HintPath>..\DLL\IOS\Shared.IOS.HDLSceneSiri.dll</HintPath> </Reference> - <Reference Include="Shared.IOS.HDLLinphoneSDK"> - <HintPath>..\DLL\Linphone\iOS\Shared.IOS.HDLLinphoneSDK.dll</HintPath> - </Reference> <Reference Include="HDL.Shared.IOS.ScanQRCode"> <HintPath>..\DLL\IOS\HDL.Shared.IOS.ScanQRCode.dll</HintPath> </Reference> <Reference Include="Shared.IOS"> <HintPath>..\DLL\Shared.IOS.dll</HintPath> </Reference> - <Reference Include="Shared.IOS.HDLFVSDK"> - <HintPath>..\DLL\IOS\Shared.IOS.HDLFVSDK.dll</HintPath> + <Reference Include="Shared.IOS.HDLLinphoneSDK"> + <HintPath>..\DLL\Linphone\iOS\Shared.IOS.HDLLinphoneSDK.dll</HintPath> </Reference> - <Reference Include="Shared.IOS.ESVideoOnSDK"> - <HintPath>..\DLL\FL\iOS\Shared.IOS.ESVideoOnSDK.dll</HintPath> - </Reference> - <Reference Include="EZSDK.IOS"> - <HintPath>..\DLL\IOS\EZSDK.IOS.dll</HintPath> + <Reference Include="Shared.IOS.LCVideoOnSDK"> + <HintPath>..\DLL\LC\IOS\Shared.IOS.LCVideoOnSDK.dll</HintPath> </Reference> <Reference Include="Shared.IOS.HDLCNVRSDK"> <HintPath>..\DLL\IOS\Shared.IOS.HDLCNVRSDK.dll</HintPath> </Reference> - <Reference Include="Shared.IOS.LCVideoOnSDK"> - <HintPath>..\DLL\LC\IOS\Shared.IOS.LCVideoOnSDK.dll</HintPath> + <Reference Include="Shared.IOS.ESVideoOnSDK"> + <HintPath>..\DLL\FL\iOS\Shared.IOS.ESVideoOnSDK.dll</HintPath> + </Reference> + <Reference Include="Shared.IOS.HDLFVSDK"> + <HintPath>..\DLL\IOS\Shared.IOS.HDLFVSDK.dll</HintPath> + </Reference> + <Reference Include="EZSDK.IOS"> + <HintPath>..\DLL\IOS\EZSDK.IOS.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -1597,10 +1597,6 @@ <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\1024.png" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\HdlBluWi\Blufi.csproj"> - <Project>{2DDF4C3C-6998-432E-9F43-6786D82F0630}</Project> - <Name>Blufi</Name> - </ProjectReference> <ProjectReference Include="..\SiriIntents\SiriIntents.csproj"> <IsAppExtension>true</IsAppExtension> <Project>{760980F5-1CD3-4F4F-9134-34D87BECD790}</Project> @@ -1615,6 +1611,10 @@ <Project>{8B1652FA-5158-4D57-B90D-07BB91766625}</Project> <Name>SiriKit</Name> </ProjectReference> + <ProjectReference Include="..\HdlBluWi\Blufi.csproj"> + <Project>{2DDF4C3C-6998-432E-9F43-6786D82F0630}</Project> + <Name>Blufi</Name> + </ProjectReference> </ItemGroup> <ItemGroup> <Content Include="Base.lproj\Intents.intentdefinition" /> diff --git a/HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard b/HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard index f5af9fc..d802080 100644 --- a/HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard +++ b/HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="1Qq-y9-5Vr"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="1Qq-y9-5Vr"> <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> @@ -984,8 +985,8 @@ </scenes> <inferredMetricsTieBreakers> <segue reference="9TP-S2-hhI"/> - <segue reference="9Lc-Kx-oZS"/> - <segue reference="ikM-Zn-H8f"/> + <segue reference="Lmt-j9-vhw"/> + <segue reference="VYk-37-nb6"/> </inferredMetricsTieBreakers> <resources> <image name="addDevice_success" width="320" height="185"/> diff --git a/HDL-ON_iOS/Resources/EZ/Base.lproj/EZMain.storyboard b/HDL-ON_iOS/Resources/EZ/Base.lproj/EZMain.storyboard index 0db5c3a..63dec62 100644 --- a/HDL-ON_iOS/Resources/EZ/Base.lproj/EZMain.storyboard +++ b/HDL-ON_iOS/Resources/EZ/Base.lproj/EZMain.storyboard @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="tPl-Go-Tmu"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="tPl-Go-Tmu"> <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment version="4352" identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17505"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/> <capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -35,7 +35,7 @@ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <prototypes> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="R2t-zM-WMl"> - <rect key="frame" x="0.0" y="28" width="375" height="44"/> + <rect key="frame" x="0.0" y="44.5" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="R2t-zM-WMl" id="a02-NK-SeS"> <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> @@ -222,7 +222,7 @@ <color key="backgroundColor" red="0.94117647059999998" green="0.94117647059999998" blue="0.94509803920000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <prototypes> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="EZDeviceCell" rowHeight="73" id="Xkg-Dw-w2X" customClass="DeviceListCell"> - <rect key="frame" x="0.0" y="28" width="375" height="73"/> + <rect key="frame" x="0.0" y="44.5" width="375" height="73"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Xkg-Dw-w2X" id="Iet-JC-0rQ"> <rect key="frame" x="0.0" y="0.0" width="375" height="73"/> @@ -356,7 +356,7 @@ </tableView> <navigationItem key="navigationItem" id="QiI-QE-qqY"> <rightBarButtonItems> - <barButtonItem systemItem="add" id="yGh-cj-oPZ"> + <barButtonItem id="yGh-cj-oPZ"> <connections> <action selector="go2AddDevice:" destination="PUV-T9-WXJ" id="D58-zZ-Ox4"/> </connections> @@ -392,7 +392,7 @@ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <prototypes> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="EZCameraCell" id="7Im-ni-l3z"> - <rect key="frame" x="0.0" y="28" width="375" height="44"/> + <rect key="frame" x="0.0" y="44.5" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="7Im-ni-l3z" id="DdN-J1-0fa"> <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> @@ -512,7 +512,7 @@ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <prototypes> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="DemoAPICell" id="wpS-t4-02o"> - <rect key="frame" x="0.0" y="28" width="375" height="44"/> + <rect key="frame" x="0.0" y="44.5" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="wpS-t4-02o" id="8mM-ux-z21"> <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> @@ -551,7 +551,7 @@ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <prototypes> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="UVM-wN-ME4"> - <rect key="frame" x="0.0" y="28" width="375" height="44"/> + <rect key="frame" x="0.0" y="44.5" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="UVM-wN-ME4" id="PFk-ak-8nJ"> <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> @@ -648,7 +648,7 @@ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <prototypes> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="VhH-MZ-U0P"> - <rect key="frame" x="0.0" y="28" width="375" height="44"/> + <rect key="frame" x="0.0" y="44.5" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="VhH-MZ-U0P" id="Kep-2I-4hb"> <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> @@ -1809,7 +1809,7 @@ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <prototypes> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="MessageCell" rowHeight="75" id="St6-kz-bZE" customClass="MessageListCell"> - <rect key="frame" x="0.0" y="28" width="375" height="75"/> + <rect key="frame" x="0.0" y="44.5" width="375" height="75"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="St6-kz-bZE" id="gqt-AI-8vk"> <rect key="frame" x="0.0" y="0.0" width="375" height="75"/> @@ -1927,7 +1927,7 @@ <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <prototypes> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="EZSettingCell" id="Mk7-Ag-WW0"> - <rect key="frame" x="0.0" y="55.5" width="375" height="44"/> + <rect key="frame" x="0.0" y="49.5" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Mk7-Ag-WW0" id="Pt3-DC-cCE"> <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> diff --git a/HDL-ON_iOS/Resources/EZ/Base.lproj/EZVideoTalkViewcontroller.xib b/HDL-ON_iOS/Resources/EZ/Base.lproj/EZVideoTalkViewcontroller.xib index 3d57751..904768e 100644 --- a/HDL-ON_iOS/Resources/EZ/Base.lproj/EZVideoTalkViewcontroller.xib +++ b/HDL-ON_iOS/Resources/EZ/Base.lproj/EZVideoTalkViewcontroller.xib @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <device id="retina5_9" orientation="portrait" appearance="light"/> <dependencies> <deployment version="2304" identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> + <capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> @@ -26,7 +27,7 @@ <rect key="frame" x="195" y="64" width="160" height="160"/> <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </view> - <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="249" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9ko-k4-F0N"> + <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="249" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9ko-k4-F0N"> <rect key="frame" x="20" y="302" width="85" height="30"/> <color key="backgroundColor" red="0.80782043147208116" green="0.80782043147208116" blue="0.80782043147208116" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <state key="normal" title="鍒涘缓鎴块棿"> @@ -42,7 +43,7 @@ <action selector="createRoomAction:" destination="333-bP-4tK" eventType="touchUpInside" id="rAq-LO-B2O"/> </connections> </button> - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qiF-2z-Rwj"> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qiF-2z-Rwj"> <rect key="frame" x="145" y="302" width="85" height="30"/> <color key="backgroundColor" red="0.80782043150000005" green="0.80782043150000005" blue="0.80782043150000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <state key="normal" title="鍔犲叆鎴块棿"> @@ -73,7 +74,7 @@ <fontDescription key="fontDescription" type="system" pointSize="14"/> <textInputTraits key="textInputTraits"/> </textField> - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YO9-MU-r4L"> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YO9-MU-r4L"> <rect key="frame" x="270" y="302" width="85" height="30"/> <color key="backgroundColor" red="0.80782043150000005" green="0.80782043150000005" blue="0.80782043150000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <state key="normal" title="绂诲紑鎴块棿"> @@ -90,7 +91,8 @@ </connections> </button> </subviews> - <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> + <viewLayoutGuide key="safeArea" id="gRk-Lv-awz"/> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="YO9-MU-r4L" firstAttribute="height" secondItem="9ko-k4-F0N" secondAttribute="height" id="3hn-CA-7hn"/> <constraint firstItem="3UU-E8-PbA" firstAttribute="leading" secondItem="gRk-Lv-awz" secondAttribute="leading" constant="20" id="4Rd-ZV-SEq"/> @@ -116,7 +118,6 @@ <constraint firstItem="6Wf-7i-TE6" firstAttribute="centerY" secondItem="jc8-E1-NYw" secondAttribute="centerY" id="r2S-JH-0Bo"/> <constraint firstItem="qiF-2z-Rwj" firstAttribute="leading" secondItem="9ko-k4-F0N" secondAttribute="trailing" constant="40" id="rkn-HZ-QQp"/> </constraints> - <viewLayoutGuide key="safeArea" id="gRk-Lv-awz"/> </view> <connections> <outlet property="localView" destination="3UU-E8-PbA" id="JEa-Cq-Kuk"/> @@ -126,4 +127,9 @@ <point key="canvasLocation" x="-143.19999999999999" y="131.52709359605913"/> </viewController> </objects> + <resources> + <systemColor name="systemBackgroundColor"> + <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + </systemColor> + </resources> </document> diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index 4b73348..e1a9b45 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -1120,7 +1120,7 @@ 7155=Distress/Normal 7156=Distress 7157=whether to unlock -7158=is +7158=Is 7159=Fall in the alarm 7160=Someone called the police 7161=Warning tone @@ -1128,9 +1128,22 @@ 7163=Video call 7164=Manipulator 7165=Area intrusion alarm -7166=camera -7167=main switch +7166=Camera +7167=Main switch 7168=PM10 + +8501=Video door lock +8502=Electric quantity +8503=The door is now closed +8504=The door is not closed +8505=RVC +8506=One click to open the lock +8507=Temporary password +8508=History +8509=Fluorite video door lock +8510=Call from the doorbell +8511=User Education + @@ -2368,6 +2381,18 @@ 7167=鎬绘帶寮�鍏� 7168=PM10 +8501=瑙嗛闂ㄩ攣 +8502=鐢甸噺 +8503=褰撳墠闂ㄥ凡鍏� +8504=褰撳墠闂ㄦ湭鍏� +8505=瀹炴椂瑙嗛 +8506=涓�閿紑閿� +8507=涓存椂瀵嗙爜 +8508=鍘嗗彶璁板綍 +8509=钀ょ煶瑙嗛闂ㄩ攣 +8510=鏉ヨ嚜鈥滈棬閾冣�濆懠鍙� +8511=鐢ㄦ埛浜哄憳 + diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Cell.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Cell.png new file mode 100644 index 0000000..5ae517b --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Cell.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/HistoryList.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/HistoryList.png new file mode 100644 index 0000000..0ad1a69 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/HistoryList.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/OneOpenLock.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/OneOpenLock.png new file mode 100644 index 0000000..779d661 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/OneOpenLock.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/RTV.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/RTV.png new file mode 100644 index 0000000..002d330 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/RTV.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLocked.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLocked.png new file mode 100644 index 0000000..058119f --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLocked.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLocking.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLocking.png new file mode 100644 index 0000000..6c15f4f --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLocking.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorLockClose.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorLockClose.png new file mode 100644 index 0000000..e4d40fb --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorLockClose.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen.png new file mode 100644 index 0000000..5d35a45 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/FunctionBg/VideoDoorLockFunctionBg.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/FunctionBg/VideoDoorLockFunctionBg.png new file mode 100644 index 0000000..eeba7ab --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/FunctionBg/VideoDoorLockFunctionBg.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/securitydoorezviz.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/securitydoorezviz.png new file mode 100644 index 0000000..e4d40fb --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/securitydoorezviz.png Binary files differ diff --git a/HDL-ON_iOS/Resources/en.lproj/Localizable.strings b/HDL-ON_iOS/Resources/en.lproj/Localizable.strings index 0e4e516..13d6889 100644 --- a/HDL-ON_iOS/Resources/en.lproj/Localizable.strings +++ b/HDL-ON_iOS/Resources/en.lproj/Localizable.strings @@ -28,6 +28,9 @@ "get_info_fail"="Searching for failed. Poor network."; "ad_input_manual"="Manual Input"; +"ad_result_verify_local_lock"="Please verify the added primary user fingerprint, key or sensor card within 2 minutes. Click the Verified button after verification"; +"ad_verified"="Verified"; + "device_camera_list_title"="Device Channel List"; "device_input_vierify_code"="Input the device verification code."; "device_verify_code_wrong"="Incorrect verification code."; @@ -64,6 +67,46 @@ "device_account_pw_empty"="The user name or password is required."; "device_lan_preview_title"="Live View via LAN"; +"device_open"="Open"; +"device_open_success"="Success to open the door!"; +"device_please_input_door_password"="Input the unlock password"; +"device_history"="History"; +"device_his_no_more_data"="No more data"; +"device_temp_pass"="Temporary password"; +"device_temp_year"="."; +"device_temp_month"="."; +"device_temp_date"="."; +"device_temp_left"="Left"; +"device_temp_times"="times"; +"device_temp_save"="Save"; +"device_temp_valid_date"="Term of validity"; +"device_temp_valid_begin"="Begin"; +"device_temp_valid_end"="End"; +"device_temp_use_times"="Use times"; +"device_temp_user"="User"; +"device_temp_please_select"="Please select"; +"device_temp_unlimited_times"="Unlimited"; +"device_temp_sure"="Sure"; +"device_temp_cancle"="Cancle"; +"device_temp_please_input"="Please input"; +"device_temp_input_use_count_describe"="Enter an integer from 1 to 100. Null means unlimited times"; +"device_temp_input_pure_number"="Please enter a pure number"; +"device_temp_input_valid_number"="Please enter a number between 1-100"; +"device_temp_unit_year"="Y"; +"device_temp_unit_month"="M"; +"device_temp_unit_date"="D"; +"device_temp_unit_hour"="h"; +"device_temp_unit_minute"="m"; +"device_temp_please_input_user_name"="Please input a user name"; +"device_temp_please_select_begin_time"="Please select the start time"; +"device_temp_please_select_end_time"="Please select the end time"; +"device_temp_please_end_time_should_later"="The end time cannot be earlier than the start time"; +"device_temp_unlimited_use_times"="Unlimited times"; +"device_temp_total"="Total "; +"device_temp_copied"="Copied"; +"device_temp_long_tap_copy"="Long press to copy"; +"device_temp_sure_to_delete"="Are you sure to delete the temporary password?"; + "dmessage_title"="Message"; "message_read"="Mark as Read"; "message_deleting"="Deleting. Please wait..."; diff --git a/HDL-ON_iOS/Resources/zh-Hans.lproj/Localizable.strings b/HDL-ON_iOS/Resources/zh-Hans.lproj/Localizable.strings index 7eac42e..bd2e958 100644 --- a/HDL-ON_iOS/Resources/zh-Hans.lproj/Localizable.strings +++ b/HDL-ON_iOS/Resources/zh-Hans.lproj/Localizable.strings @@ -69,6 +69,9 @@ "device_open"="寮�闂�"; "device_open_success"="寮�闂ㄦ垚鍔燂紒"; +"device_please_input_door_password"="璇疯緭鍏ュ紑閿佸瘑鐮�"; +"device_history"="鍘嗗彶璁板綍"; +"device_his_no_more_data"="娌℃湁鏇村鏁版嵁"; "device_temp_pass"="涓存椂瀵嗙爜"; "device_temp_year"="骞�"; "device_temp_month"="鏈�"; diff --git a/HDL_APP_Project.sln b/HDL_APP_Project.sln index 84800828..3865cd5 100644 --- a/HDL_APP_Project.sln +++ b/HDL_APP_Project.sln @@ -18,6 +18,8 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UMSdk", "UMSdk\UMSdk.csproj", "{5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ys", "..\ys\ys.csproj", "{DF065E3F-C3A1-4908-9582-000974B7C290}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution HDL_ON\HDL_ON.projitems*{09712674-2a38-407b-b1e2-560b2c352f9a}*SharedItemsImports = 4 @@ -119,6 +121,18 @@ {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|iPhone.Build.0 = Release|Any CPU {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhone.Build.0 = Debug|Any CPU + {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.Build.0 = Release|Any CPU + {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhone.ActiveCfg = Release|Any CPU + {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhone.Build.0 = Release|Any CPU + {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhoneSimulator.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs index 0692981..1e28e4d 100644 --- a/HDL_ON/Common/ApiUtlis.cs +++ b/HDL_ON/Common/ApiUtlis.cs @@ -229,7 +229,7 @@ foreach (var newFunction in deviceList.list) { newFunction.AssembleStatus(); - newFunction.SaveFunctionFile(); + newFunction.SaveFunctionFile(); FunctionList.List.IniFunctionList(newFunction.savePath,true); MainPage.Log($"============璁惧============{iiii++}"); } @@ -314,6 +314,7 @@ //======================鐧诲綍鍏ㄨ閫�==================== if (isInterphoneType_FREEVIEW) { + #if __IOS__ List<VisitorTempPassword> dataList = new List<VisitorTempPassword>(); Dictionary<string, object> dictionary = new Dictionary<string, object>(); diff --git a/HDL_ON/Common/Constant.cs b/HDL_ON/Common/Constant.cs index 0dd7756..92b1527 100644 --- a/HDL_ON/Common/Constant.cs +++ b/HDL_ON/Common/Constant.cs @@ -309,6 +309,10 @@ /// HDL鍙瀵硅 /// </summary> HDL_INTERPHONE, + /// <summary> + /// 闂ㄩ搩鎺ㄩ��(钀ょ煶瑙嗛闂ㄩ攣) + /// </summary> + DOOR_BELL, } /// <summary> diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs index afe7b93..800c3d2 100644 --- a/HDL_ON/Common/HDLCommon.cs +++ b/HDL_ON/Common/HDLCommon.cs @@ -7,7 +7,6 @@ using HDL_ON.Entity; using System.Threading; using HDL_ON.DriverLayer; - namespace HDL_ON { /// <summary> @@ -278,6 +277,8 @@ { //鎶ヨ鎺ㄩ�佸脊绐楁彁绀� ShowAlarmPushMessage(jpushMessageInfo, true); + //钀ょ煶闂ㄩ攣鎺ㄩ�� + HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DoorLockPush(jpushMessageInfo); } else if (jpushMessageInfo.messageType.Contains(PushMessageType.FLCall.ToString())) { @@ -304,8 +305,9 @@ } else if (jpushMessageInfo.messageType.Contains(PushMessageType.HDL_INTERPHONE.ToString())) { + if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return; - + //瀛楁鍏煎闂锛屽彧鑳界洿鎺ュ彇鍊间簡 var json = Newtonsoft.Json.Linq.JObject.Parse(jpushMessageInfo.expantContent); try @@ -385,7 +387,15 @@ else if (jpushMessageInfo.messageType.Contains(PushMessageType.Prompt.ToString())) { ShowAlarmPushMessage(jpushMessageInfo, false); + //钀ょ煶闂ㄩ攣鎺ㄩ�� + HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DoorLockPush(jpushMessageInfo); } + else if (jpushMessageInfo.messageType.Contains(PushMessageType.DOOR_BELL.ToString())) + { + //钀ょ煶闂ㄩ攣鎺ㄩ�� + HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DoorLockPush(jpushMessageInfo); + } + } } catch (Exception EX) @@ -395,12 +405,12 @@ } //{"code":0,"data":{"list":[{"createTime":"1625798305115","modifyTime":"1625798305115","region":"100000000000000001","id":"1413326644794294273","alarmId":"20210709103818-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709103818-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:38:17","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{"createTime":"1625798057197","modifyTime":"1625798057197","region":"100000000000000001","id":"1413325604946640898","alarmId":"20210709103413-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709103413-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:34:12","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625797973320","modifyTime":"1625797973320","region":"100000000000000001","id":"1413325253141004289","alarmId":"20210709103236-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709103236-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:32:31","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625797782136","modifyTime":"1625797782136","region":"100000000000000001","id":"1413324451261382658","alarmId":"20210709102937-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709102937-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:29:37","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625797668771","modifyTime":"1625797668771","region":"100000000000000001","id":"1413323975769915394","alarmId":"20210709102743-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709102743-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:27:42","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625797539846","modifyTime":"1625797539846","region":"100000000000000001","id":"1413323435023466498","alarmId":"20210709102534-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709102534-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:25:34","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625797530627","modifyTime":"1625797530627","region":"100000000000000001","id":"1413323396351983618","alarmId":"20210709102525-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709102525-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:25:25","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625796028089","modifyTime":"1625796028089","region":"100000000000000001","id":"1413317094255034369","alarmId":"20210709100024-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709100024-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:00:23","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625795974558","modifyTime":"1625795974558","region":"100000000000000001","id":"1413316869729746946","alarmId":"20210709095931-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709095931-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T09:59:31","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625795966933","modifyTime":"1625795966933","region":"100000000000000001","id":"1413316837748178946","alarmId":"20210709095923-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709095923-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T09:59:22","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"}],"totalCount":"13","totalPage":"2","pageNo":"1","pageSize":"10"},"timestamp":"1625807415164","isSuccess":true} //{"platform":"1","timestamp":"1625805660249","appKey":"HDL-HOME-APP-TEST","sign":"02e433c40485b30451ebdc5ca3cd959c","deviceSerial":"F41014762","homeId":"1396717478877241345"} - /// <summary> - /// 瑙f瀽涓版灄鍙瀵硅鎺ㄩ�佹暟鎹� - /// </summary> - /// <param name="jsonStr"></param> - /// <returns></returns> - ESVideoInfo GetESOnVideoJson(string jsonStr) + /// <summary> + /// 瑙f瀽涓版灄鍙瀵硅鎺ㄩ�佹暟鎹� + /// </summary> + /// <param name="jsonStr"></param> + /// <returns></returns> + ESVideoInfo GetESOnVideoJson(string jsonStr) { try { @@ -467,7 +477,7 @@ //5.鍏ㄨ閫氱櫥鍑� Shared.IOS.HDLFVSDK.Video.Logout(); //6.娓呯┖Siri鍏变韩鏁版嵁淇℃伅 - new Other.SkipControl().SetData(false, "", "", "",""); + new Other.SkipControl().SetData(false, "", "", "", ""); var sDM = new SiriKit.SceneDateManager(); Console.WriteLine($"IsLogin:{sDM.IsLgoin};accessToken:{sDM.AccessToken};refreshToken:{sDM.RefreshToken};RegionUrl:{sDM.RegionUrl};HomeId:{sDM.HomeId}"); #endif @@ -572,9 +582,9 @@ } -#endregion + #endregion -#region 鈻� 甯哥敤鏂规硶_______________________ + #region 鈻� 甯哥敤鏂规硶_______________________ /// <summary> /// 璁剧疆涓嬪垝绾挎寜閽姸鎬� /// 缁熶竴灏佽璁剧疆鏂规硶 @@ -649,9 +659,9 @@ Control.Ins.SearchLoaclGateway(); } } -#endregion + #endregion -#region 璺宠浆鎵撳紑钀ょ煶浜戞柟娉� + #region 璺宠浆鎵撳紑钀ょ煶浜戞柟娉� /// <summary> /// 鑾峰彇瀛愯处鍙穞oken骞惰烦杞澶囧垪琛ㄩ〉闈� @@ -667,6 +677,7 @@ { try { + var list = UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockLockModelsList(); //鍏堣幏鍙栬悿鐭充簯瀛愯处鍙穞oken var result = new HttpServerRequest().EZGetChildToken(); if (result.Code == StateCode.SUCCESS) @@ -678,7 +689,9 @@ { if (!string.IsNullOrEmpty(ezChildAccessToken)) { + #if __IOS__ + //iOS //鍒濆鍖栬悿鐭充簯SDK锛屼腑鏂囧浗鍐卥ey銆佽嫳鏂囨捣澶杒ey 寮�鍙戣�呰处鍙蜂娇鐢ㄥ簲鐢ㄥ寘鍚嶇敵璇风殑APPKEY锛屼笉鍚屽寘鍚嶅簲鐢ㄩ渶閰嶇疆涓嶅悓鐨凙PPKEY EZSDK.IOS.EZSDK.SharedInstance().InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b"); @@ -687,16 +700,25 @@ EZSDK.IOS.EZSDK.SharedInstance().SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, DB_ResidenceData.Instance.CurrentRegion.id); //2.璁剧疆钀ょ煶瀛愯处鍙风殑AccessToken鍒癝DK EZSDK.IOS.EZSDK.SharedInstance().SetEZAccessToken(ezChildAccessToken); - //Console.WriteLine("loginToken锛�" + UserInfo.Current.LoginTokenString); - //Console.WriteLine("refreshToken锛�" + UserInfo.Current.RefreshToken); - - ////3.鎵撳紑鎽勫儚澶磋澶囧垪琛ㄩ〉闈� - EZSDK.IOS.EZSDK.SharedInstance().Go2EZvizMonitor(); + //////3.鎵撳紑鎽勫儚澶磋澶囧垪琛ㄩ〉闈� + //EZSDK.IOS.EZSDK.SharedInstance().Go2EZvizMonitor(); //EZSDK.IOS.EZDeviceInfo info = new EZSDK.IOS.EZDeviceInfo(); //info.de //EZSDK.IOS.EZSDK.Play(info); + + //2023骞�03鏈�29鏃�13:08:35 淇敼 + Foundation.NSObject[] nSObject = new Foundation.NSObject[list.Count]; + for (int i = 0; i < list.Count; i++) + { + string strValue = list[i]; + nSObject[i] = new Foundation.NSString(strValue); + } + EZSDK.IOS.EZSDK.SharedInstance().ToEZDeviceListViewWithFilterTypes(nSObject); + + + #else //Android //1.璁剧疆鎵�闇�娌充笢鐨則oken銆佸煙鍚嶅湴鍧� @@ -708,21 +730,24 @@ { ((BaseActivity)Shared.Application.Activity).SetPermission(result => { - if(result) - { - Android.Content.Intent intent = new Android.Content.Intent(); - var bundle = new Android.OS.Bundle(); - //浼犻�抧ame鍙傛暟涓簍inyphp - bundle.PutString("EzChildAccessToken", ezChildAccessToken); - bundle.PutString("HdlToken", UserInfo.Current.LoginTokenString); - bundle.PutString("Url", OnAppConfig.Instance.RequestHttpsHost); - bundle.PutString("EzvizAppKey", "1aa98a90489b4838b966b57018b4b04b"); - bundle.PutInt("Platform", 1); - bundle.PutString("HomeId", DB_ResidenceData.Instance.CurrentRegion.id); - intent.PutExtras(bundle); - intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity")); - Shared.Application.Activity.StartActivity(intent); - } + //2023骞�03鏈�29鏃�13:08:35 淇敼 + Com.Videogo.Hdl.HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, "1aa98a90489b4838b966b57018b4b04b", 1, DB_ResidenceData.Instance.CurrentRegion.id); + Com.Videogo.Hdl.HDLEzvizSdk.Instance.JumpToCameraListActivity(Shared.Application.Activity, list); + //if (result) + //{ + // Android.Content.Intent intent = new Android.Content.Intent(); + // var bundle = new Android.OS.Bundle(); + // //浼犻�抧ame鍙傛暟涓簍inyphp + // bundle.PutString("EzChildAccessToken", ezChildAccessToken); + // bundle.PutString("HdlToken", UserInfo.Current.LoginTokenString); + // bundle.PutString("Url", OnAppConfig.Instance.RequestHttpsHost); + // bundle.PutString("EzvizAppKey", "1aa98a90489b4838b966b57018b4b04b"); + // bundle.PutInt("Platform", 1); + // bundle.PutString("HomeId", DB_ResidenceData.Instance.CurrentRegion.id); + // intent.PutExtras(bundle); + // intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity")); + // Shared.Application.Activity.StartActivity(intent); + //} }, "android.permission.RECORD_AUDIO"); } @@ -757,6 +782,6 @@ { IsBackground = true }.Start(); } -#endregion + #endregion } } diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index ac5cd29..0795813 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -2062,11 +2062,11 @@ /// <summary> /// 寰簭寰幆 /// </summary> - public const int orderMode =5048; + public const int orderMode = 5048; /// <summary> /// 鍗曟洸鎾斁 /// </summary> - public const int single =5049; + public const int single = 5049; @@ -3122,7 +3122,59 @@ /// <summary> /// PM210 /// </summary> - public const int pm10= 7168; + public const int pm10 = 7168; + + /// <summary> + /// 瑙嗛闂ㄩ攣 + /// </summary> + public const int shipinmensuo = 8501; + /// <summary> + /// 鐢甸噺 + /// </summary> + public const int dianliang = 8502; + /// <summary> + /// 褰撳墠闂ㄥ凡鍏� + /// </summary> + public const int dangqianmenyiguan = 8503; + /// <summary> + /// 褰撳墠闂ㄦ湭鍏� + /// </summary> + public const int dangqianmenweiguan = 8504; + /// <summary> + /// 瀹炴椂瑙嗛 + /// </summary> + public const int shishishipin = 8505; + /// <summary> + /// 涓�閿紑閿� + /// </summary> + public const int yijiankaisuo = 8506; + /// <summary> + /// 涓存椂瀵嗙爜 + /// </summary> + public const int linshimima1 = 8507; + /// <summary> + /// 鍘嗗彶璁板綍 + /// </summary> + public const int lishijilu = 8508; + /// <summary> + /// 钀ょ煶瑙嗛闂ㄩ攣 + /// </summary> + public const int yingshishipinmensuo = 8509; + /// <summary> + /// 鏉ヨ嚜鈥滈棬閾冣�濆懠鍙� + /// </summary> + public const int laizimenlinghujiao = 8510; + /// <summary> + /// 鐢ㄦ埛浜哄憳 + /// </summary> + public const int yonghurenyuan = 8511; + + + + + + + diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs index fba2cc1..29e90a2 100644 --- a/HDL_ON/DAL/DriverLayer/Control.cs +++ b/HDL_ON/DAL/DriverLayer/Control.cs @@ -83,8 +83,10 @@ /// <summary> /// 鍒ゆ柇鏄惁鏈湴鍔犲瘑骞朵笖鍔犲瘑key涓嶄负绌� /// </summary> - public bool IsLocalEncryptAndGetAesKey { - get { + public bool IsLocalEncryptAndGetAesKey + { + get + { return IsLocalEncrypt && (!string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.localSecret)); } } @@ -139,7 +141,7 @@ if (_GatewayOnline_Cloud != value) { _GatewayOnline_Cloud = value; - if(GatewayOnline_Local) + if (GatewayOnline_Local) { return; } @@ -249,7 +251,7 @@ public void SearchLoaclGateway() { //2021-01-15 : 浣忓畢娌℃湁缁戝畾缃戝叧鐨勬椂鍊欎笉鐢ㄦ悳绱紝骞朵笖涓嶈兘閾炬帴mqtt - if(DB_ResidenceData.Instance.HomeGateway == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.gatewayId)) + if (DB_ResidenceData.Instance.HomeGateway == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.gatewayId)) { return; } @@ -308,9 +310,10 @@ /// </summary> public void LoginGateway() { - if(loginGatewayThread== null) + if (loginGatewayThread == null) { - loginGatewayThread = new System.Threading.Thread(() => { + loginGatewayThread = new System.Threading.Thread(() => + { while (!Ins.myTcpClient.isConnected) { if (Ins.GatewayOnline_Local && myTcpClient.isConnected) @@ -337,7 +340,8 @@ try { loginGatewayThread?.Abort(); - }catch (Exception ex) + } + catch (Exception ex) { MainPage.Log($"閲嶅惎鐧诲綍缃戝叧绾跨▼寮傚父:{ex.Message}"); } @@ -347,7 +351,7 @@ LoginGateway(); } } - + } @@ -357,9 +361,9 @@ public void ControlScene(Scene scene) { //浣撻獙妯″紡 - if(MainPage.NoLoginMode) + if (MainPage.NoLoginMode) { - foreach(var sceneFunction in scene.functions) + foreach (var sceneFunction in scene.functions) { var revString = ""; var upDataObj = new AlinkFunctionStatusObj(); @@ -406,7 +410,7 @@ /// <param name="function"></param> /// <param name="useRemote">鏄惁鐩存帴浣跨敤杩滅▼鍙戦��</param> /// <returns></returns> - public bool SendWriteCommand(Function function, Dictionary<string, string> commandDictionary, bool useRemote = false,int resend = 3) + public bool SendWriteCommand(Function function, Dictionary<string, string> commandDictionary, bool useRemote = false, int resend = 3) { function.controlCounter++; function.refreshTime = DateTime.Now; @@ -504,7 +508,7 @@ var functionControlDataObj = function.GetGatewayAlinkControlData(commandDictionary); var functionControlDataJson = Newtonsoft.Json.JsonConvert.SerializeObject(functionControlDataObj); var sendBytes = Ins.ConvertSendBodyData(CommunicationTopic.ct.ControlFunctionTopic, functionControlDataJson); - new Control_Udp().SendLocalHdlLinkData(sendBytes, functionControlDataObj.id,resend); + new Control_Udp().SendLocalHdlLinkData(sendBytes, functionControlDataObj.id, resend); MainPage.Log($"鏈湴閫氳 鍙戦�丠DL-Link鏁版嵁:{functionControlDataJson}"); } } @@ -522,7 +526,7 @@ commandDictionary.Add(FunctionAttributeKey.OnOff, commandDictionary[FunctionAttributeKey.Brightness] == "0" ? "off" : "on"); } } - if(function.spk == SPK.LightCCT) + if (function.spk == SPK.LightCCT) { if (!commandDictionary.ContainsKey(FunctionAttributeKey.CCT)) { @@ -546,10 +550,10 @@ /// <summary> /// 鍏ㄥ紑鍏ㄥ叧鍔熻兘 /// </summary> - public void SwtichFunctions(bool open,List<Function> functions) + public void SwtichFunctions(bool open, List<Function> functions) { //dome妯″紡鎺у埗 - if(MainPage.NoLoginMode) + if (MainPage.NoLoginMode) { new System.Threading.Thread(() => { @@ -557,7 +561,7 @@ { Dictionary<string, string> d1 = new Dictionary<string, string>(); d1.Add(FunctionAttributeKey.OnOff, open ? "on" : "off"); - if (function.spk == SPK.PanelSocket) + if (function.spk == SPK.PanelSocket) { if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null) { @@ -623,16 +627,16 @@ { var pm = new DAL.Server.HttpServerRequest(); var pack = pm.GetDeviceInfoList(functionIds); - if(pack!= null&& pack.Data!=null) + if (pack != null && pack.Data != null) { //寰呮祴璇�2021-03-04 var ddd = Newtonsoft.Json.JsonConvert.DeserializeObject<List<AlinkStatusData>>(pack.Data.ToString()); - if(ddd!= null) + if (ddd != null) { - foreach(var function in ddd) + foreach (var function in ddd) { var temp = FunctionList.List.GetDeviceFunctionList().Find((obj) => obj.deviceId == function.deviceId); - if(temp!= null) + if (temp != null) { if (SPK.Get3tySpk(SPK.BrandType.Tuya).Contains(temp.spk)) { @@ -648,7 +652,7 @@ /// 鍙戦�佽鍙栧懡浠� /// 鑷姩鍒ゆ柇鏄惁涓篈鍗忚璁惧 /// </summary> - public void SendReadCommand(Function function ,bool forceRemote = false) + public void SendReadCommand(Function function, bool forceRemote = false) { function.refreshTime = DateTime.Now; if (forceRemote) @@ -732,7 +736,7 @@ { busClient.ReadBusData(function); } - + } catch (Exception ex) { @@ -776,7 +780,7 @@ /// <summary> /// 瀹夐槻鎺у埗 /// </summary> - public void ControlSecurity(SecurityAlarm securityAlarm,string state) + public void ControlSecurity(SecurityAlarm securityAlarm, string state) { if (!Ins.GatewayOnline_Local)//缃戝叧鏈湴涓嶅湪绾� { @@ -834,7 +838,7 @@ }; var aLinkJson = Newtonsoft.Json.JsonConvert.SerializeObject(aLinkData); var sendBytes = Ins.ConvertSendBodyData(CommunicationTopic.ct.ControlScene, aLinkJson); - new Control_Udp().SendLocalHdlLinkData(sendBytes, aLinkData.id,0); + new Control_Udp().SendLocalHdlLinkData(sendBytes, aLinkData.id, 0); } } @@ -928,10 +932,10 @@ /// 杞崲鎺ユ敹鍒扮殑鏁版嵁 /// </summary> /// <returns></returns> - public void ConvertReceiveData(byte[] receiveBytes,string ip) + public void ConvertReceiveData(byte[] receiveBytes, string ip) { var reString = Encoding.UTF8.GetString(receiveBytes); - AnalysisReceiveData(reString, receiveBytes,ip); + AnalysisReceiveData(reString, receiveBytes, ip); } /// <summary> /// 杞崲鎺ユ敹鍒扮殑鏁版嵁 @@ -939,7 +943,7 @@ /// <param name="receiveString">杞琒tring鍚庣殑鏁版嵁</param> /// <param name="originalReceiveBytes"鍘熷Bytes鏁版嵁</param> /// <returns></returns> - public LocalCommunicationData AnalysisReceiveData(string receiveString, byte[] originalReceiveBytes , string sIp = null) + public LocalCommunicationData AnalysisReceiveData(string receiveString, byte[] originalReceiveBytes, string sIp = null) { LocalCommunicationData receiveObj = new LocalCommunicationData(); @@ -1118,7 +1122,8 @@ MainPage.Log($"瀹夐槻灞�鍩熺綉寮傚父锛歿ex.Message}"); } } - else if (receiveObj.Topic == $"/user/{GatewayId}/custom/gateway/login_reply") { + else if (receiveObj.Topic == $"/user/{GatewayId}/custom/gateway/login_reply") + { var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<JObject>(receiveObj.BodyDataString); if (temp.GetValue("objects").ToString().Contains("success")) { @@ -1161,7 +1166,7 @@ } else { - if(processedDataList.Count> 50) + if (processedDataList.Count > 50) { processedDataList.RemoveAt(0); } @@ -1175,7 +1180,7 @@ /// A鍗忚鏁版嵁 /// </summary> /// <param name="updateBytes"></param> - public void UpdataFunctionStatus(string revString, byte[] usefulBytes,bool isCloudData = false) + public void UpdataFunctionStatus(string revString, byte[] usefulBytes, bool isCloudData = false) { ////test 浜戠杩炴帴鎴愬姛鏃讹紝涓嶉�傜敤鏈湴鏁版嵁鏇存柊 //if (Ins.GatewayOnline_Cloud && !isCloudData) @@ -1218,7 +1223,7 @@ if (Ins.GatewayOnline_Local && isCloudData)//鏈湴閾炬帴锛岄櫎浜嗘秱楦﹁澶囨暟鎹箣澶栫殑浜戠鏁版嵁涓嶅鐞� { - if (!SPK.Get3tySpk(SPK.BrandType.All3tyBrand).Contains(localFunction.spk) && !SPK.MusicSpkList().Contains( localFunction.spk)) + if (!SPK.Get3tySpk(SPK.BrandType.All3tyBrand).Contains(localFunction.spk) && !SPK.MusicSpkList().Contains(localFunction.spk)) { //MainPage.Log($"A鍗忚鏇存柊鐘舵��:鏈湴閾炬帴锛岄櫎浜嗘秱楦﹁澶囨暟鎹箣澶栫殑浜戠鏁版嵁涓嶅鐞�........"); @@ -1255,7 +1260,7 @@ break; case SPK.AirSwitch: AirSwitchPage.UpdataState(localFunction); - if(localFunction.GetAttribute(FunctionAttributeKey.Power)!=null)//濡傛灉鏄甫鐢甸噺鐨勭┖寮�涔熻鏇存柊鑳芥簮鐣岄潰 + if (localFunction.GetAttribute(FunctionAttributeKey.Power) != null)//濡傛灉鏄甫鐢甸噺鐨勭┖寮�涔熻鏇存柊鑳芥簮鐣岄潰 { EnergyMainPage.UpdataStatus(localFunction); } @@ -1294,7 +1299,7 @@ CurtainModulePage.UpdataState(localFunction); break; case SPK.CurtainDream: - if(localFunction.GetAttrState(FunctionAttributeKey.Percent) == "0") + if (localFunction.GetAttrState(FunctionAttributeKey.Percent) == "0") { localFunction.SetAttrState(FunctionAttributeKey.OnOff, "off"); } @@ -1387,7 +1392,7 @@ case SPK.SensorTemperature: case SPK.SensorHumidity: case SPK.SensorHcho: - if(localFunction.spk == SPK.SensorTemperature) + if (localFunction.spk == SPK.SensorTemperature) { HomePage.LoadEvent_RefreshEnvirIndoorTemp(); } @@ -1489,7 +1494,7 @@ case SPK.AvMusic: case SPK.MusicStandard: //UI.Music.MusicMain.mMusicMain.RefreshView(updateTemp); - Console.WriteLine("闊充箰鎾斁鍣ㄦ樉绀虹姸鎬�======="+ revString); + Console.WriteLine("闊充箰鎾斁鍣ㄦ樉绀虹姸鎬�=======" + revString); //wjc break; case SPK.Inverter: @@ -1523,12 +1528,12 @@ /// <summary> /// //涓�閿紙杩滅▼锛夊紑閿� /// </summary> - public void OneKeyUnlocking(Function doorlock,string extStr) + public void OneKeyUnlocking(Function doorlock, string extStr) { if (Ins.GatewayOnline_Local) { Dictionary<string, string> dic = new Dictionary<string, string>(); - var functionControlDataObj = doorlock.GetGatewayAlinkDoorlockData(UserInfo.Current.ID,extStr); + var functionControlDataObj = doorlock.GetGatewayAlinkDoorlockData(UserInfo.Current.ID, extStr); var functionControlDataJson = Newtonsoft.Json.JsonConvert.SerializeObject(functionControlDataObj); var sendBytes = Ins.ConvertSendBodyData($"/base/{Control.Ins.GatewayId}/thing/service/doorRemoteOpen/down", functionControlDataJson); new Control_Udp().SendLocalHdlLinkData(sendBytes, functionControlDataObj.id, 0); @@ -1543,7 +1548,7 @@ /// </summary> /// <param name="functionId"></param> /// <param name="pwd"></param> - public void ConfirmUnlocking(string functionId,string pwd) + public void ConfirmUnlocking(string functionId, string pwd) { Loading loading = new Loading(); MainPage.BaseView.AddChidren(loading); @@ -1579,8 +1584,10 @@ //{ // return false; //} - if (pack.Code != StateCode.SUCCESS) { - Application.RunOnMainThread(() => { + if (pack.Code != StateCode.SUCCESS) + { + Application.RunOnMainThread(() => + { new PublicAssmebly().TipMsg(Language.StringByID(StringId.Tip), pack.message); UserInfo.Current.doorPasswordString = "";// UserInfo.Current.LastTimeOpenDoor = DateTime.MinValue; @@ -1589,8 +1596,9 @@ } if (pack.Code != StateCode.SUCCESS) { - Application.RunOnMainThread(() => { - if(string.IsNullOrEmpty(pack.message)) + Application.RunOnMainThread(() => + { + if (string.IsNullOrEmpty(pack.message)) { new PublicAssmebly().TipMsg(Language.StringByID(StringId.Tip), Language.StringByID(StringId.OperationFailed)); diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index 04c6273..449da8d 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -2928,9 +2928,25 @@ } -#endregion + /// <summary> + /// 鑾峰彇绗笁鏂规敞鍐岀殑id + /// </summary> + /// <param homeId="homeId">浣忓畢id</param> + /// <returns></returns> + public ResponsePackNew GetExtUserId(string homeId) + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", homeId); -#region 鈻� 闂ㄩ攣鐩稿叧____________________________ + var requestJson = HttpUtil.GetSignRequestJson(d); + var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetExtUserId, requestJson); + + return pack; + } + + #endregion + + #region 鈻� 闂ㄩ攣鐩稿叧____________________________ /// <summary> /// 鑾峰彇闂ㄩ攣鍘嗗彶璁板綍(鎸夋棩鏈熼檷搴�) diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs index 726f116..c987e9d 100644 --- a/HDL_ON/DAL/Server/NewAPI.cs +++ b/HDL_ON/DAL/Server/NewAPI.cs @@ -474,6 +474,47 @@ /// 璁惧娑堟伅瑙勫垯閰嶇疆 /// </summary> public const string Api_Post_DeviceMessageRulesSet = "/home-wisdom/app/device/deviceMessageRulesSet"; + + #endregion + + #region Kaede -- 钀ょ煶瑙嗛闂ㄩ攣鎺ュ彛____________________________ + /// <summary> + /// 鍒犻櫎璁惧锛堣悿鐭宠棰戦棬閿侊級 + /// </summary> + public const string Api_Post_DeleteDevice = "/home-wisdom/platform/yingshi/child/deleteDevice"; + /// <summary> + /// 鐢垫睜璇︽儏锛堣悿鐭宠棰戦棬閿侊級 + /// </summary> + public const string Api_Post_Details = "/home-wisdom/platform/yingshi/lock/battery/details"; + /// <summary> + /// 闂ㄩ攣鐢ㄦ埛鍒楄〃锛堣悿鐭宠棰戦棬閿侊級 + /// </summary> + public const string Api_Post_UserList = "/home-wisdom/platform/yingshi/lock/user/list"; + /// <summary> + /// 闂ㄩ攣鐘舵�侊紙钀ょ煶瑙嗛闂ㄩ攣锛� + /// </summary> + public const string Api_Post_Lockstatus = "/home-wisdom/platform/yingshi/lock/status"; + /// <summary> + /// 鑾峰彇鎶ヨ鍒楄〃锛堣悿鐭宠棰戦棬閿侊級 + /// </summary> + public const string Api_Post_Records = "/home-wisdom/platform/yingshi/alarm/records"; + /// <summary> + /// 鍒犻櫎鎶ヨ璁板綍锛堣悿鐭宠棰戦棬閿侊級 + /// </summary> + public const string Api_Post_AlarmDelet= "/home-wisdom/platform/yingshi/alarm/delete"; + /// <summary> + /// 杩滅▼寮�閿侊紙钀ょ煶瑙嗛闂ㄩ攣锛� + /// </summary> + public const string Api_Post_OpenDoor = "/home-wisdom/platform/yingshi/lock/remote/open/door"; + /// <summary> + /// 闂ㄩ攣鍨嬪彿鍒楄〃锛堣悿鐭宠棰戦棬閿侊級 + /// </summary> + public const string Api_Post_Lock_Models = "/home-wisdom/platform/yingshi/lock/models"; + + + + + #endregion #region Kaede -- 鍦烘櫙鎺ュ彛____________________________ @@ -802,7 +843,10 @@ /// </summary> public const string Api_Post_GetListHomeFace = "/home-wisdom/app/logic/listHomeFace"; - + /// <summary> + /// 鑾风涓夋柟娉ㄥ唽userId + /// </summary> + public const string Api_Post_GetExtUserId = "/community-wisdom/app/visitor/freeview/getExtMemberInfo"; #endregion diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs index 37fc391..ca12ddc 100644 --- a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs +++ b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs @@ -82,7 +82,7 @@ if (interphoneType == InterphoneType.IMOUVISIAL.ToString()) { //涔愭鍙瀵硅 - //1.鍒濆鍖朙COpenSDK_Api + //1.鍒濆鍖朙COpenSDK_Api(Shared.IOS.LCVideoOnSDK) LCApiKit.SharedInstance().IsChinaMainland = GetIsChinaMainland(); LCApiKit.SharedInstance().InitSDKOpenApi(mESVideoInfo.Lc_AccessToken); LCApiKit.SharedInstance().CurrentDevicePlayToken = mESVideoInfo.Lc_PlayToken; @@ -98,12 +98,11 @@ } else if(interphoneType == InterphoneType.FLVI.ToString()) { + //Shared.IOS.ESVideoOnSDK ESOnMonitorViewController vc = new ESOnMonitorViewController(); vc.MESVideoID = mESVideoInfo.ESVideoUUID; vc.MESRoomID = roomID; vc.DeviceName = mESVideoInfo.DeviceName; - //vc.RoomName = mESVideoInfo.RoomName; - //vc.MESCallDelegate = new OnESCallDelegate(this); Shared.Application.currentVC.NavigationController.PushViewController(vc, true); } else if (interphoneType == InterphoneType.HDL.ToString()) @@ -188,7 +187,7 @@ if (interphoneType == InterphoneType.IMOUVISIAL.ToString()) { //涔愭鍙瀵硅 - //1.鍒濆鍖朙COpenSDK_Api + //1.鍒濆鍖朙COpenSDK_Api(Shared.IOS.LCVideoOnSDK) LCApiKit.SharedInstance().IsChinaMainland = GetIsChinaMainland(); LCApiKit.SharedInstance().InitSDKOpenApi(mESVideoInfo.Lc_AccessToken); //2021-05-18 鐩墠鎺ㄩ�佺殑PlayToken;鏈夐棶棰樹細瀵艰嚧SDK宕╂簝锛屾殏鏃朵笉浼� @@ -226,6 +225,7 @@ } else if (interphoneType == InterphoneType.FLVI.ToString()) { + //Shared.IOS.ESVideoOnSDK ESOnIntercomViewController vc = new ESOnIntercomViewController(); vc.MESVideoID = mESVideoInfo.ESVideoUUID; vc.MESRoomID = roomID; @@ -568,7 +568,7 @@ #if __IOS__ #region OnESCallDelegate /////// <summary> - /////// OnESCallDelegate 缁ф壙鍝嶅簲浜嬩欢 + /////// OnESCallDelegate 缁ф壙鍝嶅簲浜嬩欢(Shared.IOS.ESVideoOnSDK) /////// </summary> OnESCallDelegate mOnESCallDelegate; @@ -644,7 +644,7 @@ #region OnLCCallDelegate /////// <summary> - /////// OnLCCallDelegate 缁ф壙鍝嶅簲浜嬩欢 + /////// OnLCCallDelegate 缁ф壙鍝嶅簲浜嬩欢(Shared.IOS.LCVideoOnSDK) /////// </summary> OnLCCallDelegate mOnLCCallDelegate; @@ -712,7 +712,7 @@ #endregion - + #endif ///// <summary> diff --git a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs index d7f4105..f759daa 100644 --- a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs +++ b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs @@ -95,7 +95,7 @@ Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().InitalLinPhone(); //璁剧疆鏀跺埌鏉ョ數鍚庛�佹槸鍚﹂渶鑷姩璺宠浆鍛煎彨椤甸潰鏂规 Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().IsAutoJumpCallView = IsAutoJumpCallView; - //璁剧疆Listener鐩戝惉 + //璁剧疆Listener鐩戝惉(Shared.IOS.HDLLinphoneSDK) mOnHDLLinphoneCallDelegate = new OnHDLLinphoneCallDelegate(this); Console.WriteLine(UserInfo.Current.ID); Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().HdlLinphoneCallDelegate = mOnHDLLinphoneCallDelegate; @@ -125,8 +125,7 @@ #if __IOS__ - //Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login("1003", "123456", "192.168.31.194:5060"); - //Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login("6666", "85521566", "116.62.26.215:5060"); + Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm); #else if (mInterphoneType == InterphoneType.FREEVIEW.ToString()) @@ -163,7 +162,7 @@ this.mHDLCallVideoInfo = null; #if __IOS__ - HDLLinPhoneSDK.Instance().LogoutAllLinphoneUser(); + Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().LogoutAllLinphoneUser(); #else HDLLinphoneKit.Instance.Logout(); #endif @@ -176,7 +175,7 @@ { #if __IOS__ - HDLLinPhoneSDK.Instance().ClearAllConfigs(); + Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().ClearAllConfigs(); #else HDLLinphoneKit.Instance.ClearProxyConfig(); #endif @@ -427,7 +426,7 @@ #if __IOS__ - HDLLinPhoneSDK.Instance().CallWithUserName(mHDLCallVideoInfo.DeviceSipAccount, mHDLCallVideoInfo.DeviceName); + Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().CallWithUserName(mHDLCallVideoInfo.DeviceSipAccount, mHDLCallVideoInfo.DeviceName); #else //1.鍏堝懠鍙澶� @@ -495,7 +494,7 @@ { #if __IOS__ //鑷爺鍙瀵硅 - HDLLinPhoneSDK.Instance().GotoHDLSRLinphoneIntercomVC(mHDLCallVideoInfo.DeviceName,mHDLCallVideoInfo.DeviceSipAccount); + Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().GotoHDLSRLinphoneIntercomVC(mHDLCallVideoInfo.DeviceName, mHDLCallVideoInfo.DeviceSipAccount); #else var intent = new Intent(Shared.Application.Activity, typeof(Com.Hdl.Hdllinphonesdk.Activity.HDLLinphoneReverseCallActivity)); if (mHDLCallVideoInfo != null) @@ -513,7 +512,7 @@ if (IsAutoJumpCallView) return; //鍏堢粨鏉熸帀涔嬪墠鐨勭嚎绋� EndCheckIncomingCallThread(); - //妫�娴嬫槸鍚︽潵鐢典簡濡傛灉鏄洿鎺ヨ皟鏁村懠鍙〉闈㈠鏋滀笉鏄垯寮�鍚嚎绋嬬瓑寰呭垽鏂� + //妫�娴嬫槸鍚︽潵鐢典簡濡傛灉鏄洿鎺ヨ皟鏁村懠鍙〉闈㈠鏋滀笉鏄垯寮�鍚嚎绋嬬瓑寰呭垽鏂�(Shared.IOS.HDLLinphoneSDK) if (IsIncomingReceivedCallState()) { Utlis.WriteLine("CALL 宸茬粡鏉ョ數浜嗐�傘�傘�傛墦寮�鍛煎彨椤甸潰"); @@ -530,12 +529,13 @@ } /// <summary> - /// 鏄惁鏉ョ數鐘舵�� + /// 鏄惁鏉ョ數鐘舵��(Shared.IOS.HDLLinphoneSDK) /// </summary> /// <returns></returns> - bool IsIncomingReceivedCallState() { + bool IsIncomingReceivedCallState() + { #if __IOS__ - return HDLLinPhoneSDK.Instance().IsIncomingReceivedCallState; + return Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().IsIncomingReceivedCallState; #else return HDLLinphoneKit.Instance.IsIncomingReceivedCallState; #endif @@ -548,7 +548,7 @@ #if __IOS__ - HDLLinPhoneSDK.Instance().GotoHDLLinphoneIntercomVC(mHDLCallVideoInfo.DeviceName); + Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().GotoHDLLinphoneIntercomVC(mHDLCallVideoInfo.DeviceName); #else var intent = new Intent(Shared.Application.Activity, typeof(Com.Hdl.Hdllinphonesdk.Activity.HDLLinphoneIntercomActivity)); @@ -597,7 +597,7 @@ threadTime--; Utlis.WriteLine("CALL 妫�娴嬩腑...." + threadTime); Thread.Sleep(1000); - //鏉ョ數浜嗭紝璺宠浆鍛煎彨椤甸潰 + //鏉ョ數浜嗭紝璺宠浆鍛煎彨椤甸潰(Shared.IOS.HDLLinphoneSDK) if (IsIncomingReceivedCallState()) { Utlis.WriteLine("CALL 鏉ョ數浜嗐�傘�傘�傛墦寮�鍛煎彨椤甸潰"); @@ -649,10 +649,10 @@ return checkIncomingCallThread == null || checkIncomingCallThread.ThreadState != ThreadState.Running; } -#endregion + #endregion -#region 鈻� -- Android鐩稿叧鎿嶄綔_______________________________ + #region 鈻� -- Android鐩稿叧鎿嶄綔_______________________________ #if __Android__ @@ -747,23 +747,23 @@ } #endif -#endregion + #endregion -#region 鈻� -- iOS鐩稿叧鎿嶄綔_______________________________ + #region 鈻� -- iOS鐩稿叧鎿嶄綔_______________________________ #if __IOS__ -#region OnHDLLinphoneCallDelegate + #region OnHDLLinphoneCallDelegate /// <summary> /// /// </summary> OnHDLLinphoneCallDelegate mOnHDLLinphoneCallDelegate; - + /// <summary> /// /// </summary> public class OnHDLLinphoneCallDelegate : HDLLinphoneCallDelegate - { + { [Weak] HDLLinphone hdlLinphone; public OnHDLLinphoneCallDelegate(HDLLinphone mHDLLinphone) @@ -799,16 +799,16 @@ /// <summary> /// 鎴浘鎴愬姛 /// </summary> - /// <param name="image"></param> - //public override void OnScreenshotSuccessfulAction(UIImage image) - //{ - ////NSData imageData = UIImagePNGRepresentation(image); UIImage - //NSData imageData = image.AsPNG(); - //byte[] dataBytes = new byte[imageData.Length]; - //System.Runtime.InteropServices.Marshal.Copy(imageData.Bytes, dataBytes, 0, Convert.ToInt32(imageData.Length)); - ////image.g - ////hdlLinphone.ScreenshotSuccessfulAction(dataBytes); - //} + /// <param name = "image" ></ param > + public void OnScreenshotSuccessfulAction(UIImage image) + { + //NSData imageData = UIImagePNGRepresentation(image); UIImage + NSData imageData = image.AsPNG(); + byte[] dataBytes = new byte[imageData.Length]; + System.Runtime.InteropServices.Marshal.Copy(imageData.Bytes, dataBytes, 0, Convert.ToInt32(imageData.Length)); + //image.g + //hdlLinphone.ScreenshotSuccessfulAction(dataBytes); + } /// <summary> /// 寮�閿佹垚鍔� @@ -825,15 +825,15 @@ { Utlis.WriteLine("OnIncomingCall :" + userName); } - + } -#endregion + #endregion #endif -#endregion + #endregion } diff --git a/HDL_ON/Entity/DB_ResidenceData.cs b/HDL_ON/Entity/DB_ResidenceData.cs index 3a0e4ee..207a7dc 100644 --- a/HDL_ON/Entity/DB_ResidenceData.cs +++ b/HDL_ON/Entity/DB_ResidenceData.cs @@ -76,7 +76,9 @@ ShowFunction.Sensor,ShowFunction.VideoIntercom, ShowFunction.SecurityCenter,ShowFunction.Acst, ShowFunction.MechanicalArm , - ShowFunction.SecurityMonitoring,}; + ShowFunction.SecurityMonitoring, + ShowFunction.VideoDoorLock, + }; } return dddd; } diff --git a/HDL_ON/Entity/Enumerative/MyEnum.cs b/HDL_ON/Entity/Enumerative/MyEnum.cs index a02276c..2fb5ccc 100644 --- a/HDL_ON/Entity/Enumerative/MyEnum.cs +++ b/HDL_ON/Entity/Enumerative/MyEnum.cs @@ -185,6 +185,10 @@ /// ip鎽勫儚澶� /// </summary> IpCam = 0x25, + /// <summary> + /// 钀ょ煶瑙嗛闂ㄩ攣 + /// </summary> + VideoDoorLock = 0x26, } diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index 0ce3348..af35197 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -1382,6 +1382,7 @@ /// 闂ㄩ攣 /// </summary> public const string DoorLock = "security.door"; + /// <summary> /// 闂ㄩ攣spk鍒楄〃 /// </summary> @@ -1392,8 +1393,20 @@ list.Add(DoorLock); return list; } - - + /// <summary> + /// 钀ょ煶瑙嗛闂ㄩ攣 + /// </summary> + public const string VideoDoorLock="security.door.ezviz"; + /// <summary> + /// 钀ょ煶瑙嗛闂ㄩ攣spk鍒楄〃 + /// </summary> + /// <returns></returns> + public static List<string> GetVideoDoorLockSPKList() + { + var list = new List<string>(); + list.Add(VideoDoorLock); + return list; + } #region 鐏厜 /// <summary> diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index f8e9c99..2f075d3 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -159,6 +159,15 @@ var spkList = SPK.GetDoorLockSPKList(); return Functions.FindAll((obj) => spkList.Contains(obj.spk)); } + /// <summary> + /// 鑾峰彇钀ょ煶瑙嗛闂ㄩ攣 + /// </summary> + /// <returns></returns> + public List<Function> GetVideoDoorLockList() + { + var spkList = SPK.GetVideoDoorLockSPKList(); + return Functions.FindAll((obj) => spkList.Contains(obj.spk)); + } /// <summary> /// 鏂伴鍒楄〃 diff --git a/HDL_ON/Entity/ResponseEntity/ResidenceMemberInfo.cs b/HDL_ON/Entity/ResponseEntity/ResidenceMemberInfo.cs index 465a0cc..36b2dd1 100644 --- a/HDL_ON/Entity/ResponseEntity/ResidenceMemberInfo.cs +++ b/HDL_ON/Entity/ResponseEntity/ResidenceMemberInfo.cs @@ -188,4 +188,26 @@ //} + + /// <summary> + /// 绗笁鏂规敞鍐屼俊鎭� + /// </summary> + public class extUserInfo + { + + public string extUserId = ""; + + public string extPlatform = ""; + + public string homeId = ""; + + public string extServerIp = ""; + + public string extTenantCode = ""; + + public string extUUID = ""; + + public string extra = ""; + + } } diff --git a/HDL_ON/Entity/Room.cs b/HDL_ON/Entity/Room.cs index 609e788..1fdebfd 100644 --- a/HDL_ON/Entity/Room.cs +++ b/HDL_ON/Entity/Room.cs @@ -568,5 +568,6 @@ scenes.Remove(scenes.Find((obj) => obj.sid == scene.sid)); } } - + + } \ No newline at end of file diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems index 5ae2b38..c9da4f9 100644 --- a/HDL_ON/HDL_ON.projitems +++ b/HDL_ON/HDL_ON.projitems @@ -538,6 +538,12 @@ <Compile Include="$(MSBuildThisFileDirectory)Entity\ResponseEntity\FreeviewMemberInfo.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\CombinedDimming\GroupChooseRoomPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\CombinedDimming\AddGroupControlPage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideDoorLockSend.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\StackTraceLog.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\ObjectClass.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\CommonMethod.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorLockPage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorLockListPage.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" /> diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs index 25f51a0..0fe6cc6 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) => @@ -235,7 +236,8 @@ case SPK.IpCam_Imou: #if __IOS__ - if (Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().AccessToken==null) {//鏈垵濮嬪寲鎽勫儚澶� + 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; @@ -244,8 +246,6 @@ } //璺宠浆澶у崕鎽勫儚澶� Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().RefreshDeviceList(); - //Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().ToMonitorViewWithDeviceId(function.extDevId, function.name); - Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().ToMonitorViewWithDeviceId(function.extDevId, function.name, Shared.Application.currentVC); #else FunctionList.List.GetIpCamImouList(); @@ -322,6 +322,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; diff --git a/HDL_ON/UI/UI0-Stan/Logic/HdlBluetoothAndroidLogic.cs b/HDL_ON/UI/UI0-Stan/Logic/HdlBluetoothAndroidLogic.cs index b416038..16f00c6 100644 --- a/HDL_ON/UI/UI0-Stan/Logic/HdlBluetoothAndroidLogic.cs +++ b/HDL_ON/UI/UI0-Stan/Logic/HdlBluetoothAndroidLogic.cs @@ -379,6 +379,8 @@ } } + + /// <summary> /// 鎶凷DK鐨勶紝鎴戜篃涓嶇煡閬撹繖涓槸浠�涔� /// </summary> diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index 788f78b..70a5fc2 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -725,6 +725,7 @@ { int index = 0; var list = FunctionList.List.GetDeviceFunctionList(); + foreach (var function in list) { //闊充箰妯″潡鏈変富浠庡叧绯伙紝闇�瑕佺壒娈婂鐞� @@ -1202,7 +1203,11 @@ btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; } - + else if (function.spk == SPK.VideoDoorLock) + { + btnIcon.UnSelectedImagePath =UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockIcon(UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect); + //btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; + } else { Button btnSwitch; @@ -1238,7 +1243,9 @@ }; - var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollection, btnName, btnZone); + var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollection, btnName, btnZone, UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect,()=> { + this.LoadDeviceFunctionControlZone();//鍒犻櫎璁惧鍚庨噸鏂板埛鏂癠I + }); view.MouseUpEventHandler = skipControlPageEvent; btnName.MouseUpEventHandler = skipControlPageEvent; btnIcon.MouseUpEventHandler = skipControlPageEvent; @@ -1452,11 +1459,14 @@ LoadEvent_ControlScene(btnCoverd, btnName, btnZone, btnShowDelay, scene); - btnSettingIcon.MouseUpEventHandler = (sender, e) => { - Action backAction = () => { + btnSettingIcon.MouseUpEventHandler = (sender, e) => + { + Action backAction = () => + { //LoadSceneFunctionControlZone(); }; - Action refreshAction = () => { + Action refreshAction = () => + { btnName.Text = scene.name; btnZone.Text = scene.GetRoomListName(); //view.BackgroundImagePath = (scene as Scene).ImagePath; @@ -1465,7 +1475,7 @@ }; var aep = new SceneEditPage(scene, backAction); MainPage.BasePageView.AddChidren(aep); - aep.LoadPage( refreshAction); + aep.LoadPage(refreshAction); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; //鍦烘櫙姝e湪鍊掕鏃舵墽琛屼腑 diff --git a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs index b2635af..30afa04 100644 --- a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs @@ -832,6 +832,7 @@ { if (bodyView != null) { + //Utlis.WriteLine("GetPushMessageAction M鏀跺埌鎺ㄩ��"); GetPushMessageList(showMesType); } diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs index 04ca7f2..3a04c19 100644 --- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs @@ -5,6 +5,7 @@ using HDL_ON.Entity; using HDL_ON.UI; using HDL_ON.UI.CSS; +using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Shared; @@ -605,21 +606,35 @@ }; } - /// <summary> /// 鍔犺浇鍔熻兘鍒楄〃鐣岄潰 /// </summary> - void LoadFunctionPageView() + void LoadFunctionPageView () { - #region functionsPageView = new VerticalScrolViewLayout() { BackgroundColor = CSS_Color.BackgroundColor, Height = Application.GetRealHeight(667 - 64 - 49 + 20), }; contentPageView.AddChidren(functionsPageView); + this.RefreshFunctionView(); - FrameLayout functionContentView; + } + FrameLayout functionContentView; + /// <summary> + /// 鏄剧ず鍔熻兘鍒楄〃鐣岄潰 + /// </summary> + void RefreshFunctionView() + { + #region + //functionsPageView = new VerticalScrolViewLayout() + //{ + // BackgroundColor = CSS_Color.BackgroundColor, + // Height = Application.GetRealHeight(667 - 64 - 49 + 20), + //}; + //contentPageView.AddChidren(functionsPageView); + + //FrameLayout functionContentView; functionContentView = new FrameLayout() { Y = Application.GetRealHeight(16), @@ -745,6 +760,14 @@ functionCount = FunctionList.List.GetAcstParentList().Count; functionOnCount = FunctionList.List.GetAcstParentList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; break; + case ShowFunction.VideoDoorLock: + functionCount = FunctionList.List.GetVideoDoorLockList().Count; +#if DEBUG + //functionCount = 1; +#endif + functionOnCount = 1; + break; + } @@ -798,7 +821,7 @@ TextAlignment = TextAlignment.CenterLeft, IsMoreLines = true, }; - functionView.AddChidren(btnName); + functionView.AddChidren(btnName); if (item != ShowFunction.Environmental && item != ShowFunction.Sensor && item != ShowFunction.VideoIntercom && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir && item != ShowFunction.Music @@ -1143,16 +1166,35 @@ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; break; - + case ShowFunction.VideoDoorLock: + //钀ょ煶瑙嗛闂ㄩ攣 + btnName.TextID = StringId.yingshishipinmensuo; + btnFunctionViewBg.MouseUpEventHandler = (sender, e) => + { + var list =CommonMethod.Current.GetVideoDoorLockList(); + var form = new VideoDoorLockListPage(()=> { + functionContentView?.RemoveFromParent(); + this.RefreshFunctionView(); + }); + form.AddForm(list); + }; + break; } - //鐣岄潰璺宠浆--闊充箰璺宠浆鑷繁鐨勭晫闈�--鐜璺宠浆鑷繁鐨勭晫闈� - if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring && item != ShowFunction.DoorLock - && ShowFunction.EnergyMonitoring != item && ShowFunction.VideoIntercom != item && ShowFunction.SecurityCenter != item + //鐣岄潰璺宠浆--闊充箰璺宠浆鑷繁鐨勭晫闈�--鐜璺宠浆鑷繁鐨勭晫闈�--(钀ょ煶瑙嗛闂ㄩ攣)璺宠浆鑷繁鐨勭晫闈� + if (item != ShowFunction.VideoDoorLock + && item != ShowFunction.Music + && item != ShowFunction.Environmental + && item != ShowFunction.SecurityMonitoring + && item != ShowFunction.DoorLock + && ShowFunction.EnergyMonitoring != item + && ShowFunction.VideoIntercom != item && + ShowFunction.SecurityCenter != item && ShowFunction.Acst != item) { btnFunctionViewBg.MouseUpEventHandler = (sender, e) => { + var skipView = new FunctionPage(); MainPage.BasePageView.AddChidren(skipView); skipView.LoadPage(functionPageTitleId); @@ -1444,6 +1486,8 @@ #endregion } + + void refreshInverterInfo(Button btnPowerTenerationToday, Button btnWorkingMode, Button btnCurrentPowerGeneration) { new System.Threading.Thread(() => diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs index 5160aa0..221c195 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs @@ -38,12 +38,18 @@ /// 鏄惁鍦ㄨ皟鍏� /// </summary> bool onDimmerBar; + /// <summary> + /// 鍒犻櫎璁惧鍚庡洖璋冪粰鐣岄潰鍒锋柊 + /// </summary> + Action action; + #endregion - public FunctionControlZone(Function func) + public FunctionControlZone(Function func,Action action) { bodyDiv = this; bodyDiv.Tag = func.sid; function = func; + this.action = action; } public override void RemoveFromParent() @@ -186,6 +192,10 @@ { btnIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/DoorLock.png"; } + else if (function.spk == SPK.VideoDoorLock) + { + btnIcon.UnSelectedImagePath = UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockIcon(UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.function); + } else if (function.spk == SPK.HvacCac) { var btnHumidityIcon = new Button() diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs index f2a4587..1fb2267 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs @@ -405,7 +405,7 @@ /// </summary> void LoadEvent_DivSkipEvent() { - var eventHandler = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollectionIcon, btnName, btnFromFloor); + var eventHandler = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollectionIcon, btnName, btnFromFloor, UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.room,this.action); this.MouseUpEventHandler = eventHandler; btnName.MouseUpEventHandler = eventHandler; btnFromFloor.MouseUpEventHandler = eventHandler; diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs index 2a74a67..74b7a31 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs @@ -255,7 +255,7 @@ } if (function.spk == SPK.LightRGBW || function.spk == SPK.LightRGB || function.spk == SPK.LightDimming) { - var functionDiv = new FunctionControlZone(function) + var functionDiv = new FunctionControlZone(function,null) { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), @@ -272,7 +272,7 @@ } else if (function.spk == SPK.IpCam_Imou) { - var functionDiv = new FunctionControlZone(function) + var functionDiv = new FunctionControlZone(function,null) { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), @@ -289,7 +289,7 @@ } else { - var functionDiv = new FunctionControlZone(function) + var functionDiv = new FunctionControlZone(function,null) { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), diff --git a/HDL_ON/UI/UI2/2-Classification/RoomPage.cs b/HDL_ON/UI/UI2/2-Classification/RoomPage.cs index ab78fd4..3c04eec 100644 --- a/HDL_ON/UI/UI2/2-Classification/RoomPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/RoomPage.cs @@ -53,6 +53,7 @@ deleteAction = delAction; this.modifyImageAction = modifyImageAction; } + /// <summary> /// 閲嶈浇鐣岄潰 /// </summary> @@ -65,22 +66,25 @@ } } + public void LoadPage() { bodyView.BackgroundColor = CSS_Color.BackgroundColor; - new TopViewDiv(bodyView,room.roomName).LoadTopView_RoomTop(ReloadRoomName, skipEditPageAction); + new TopViewDiv(bodyView, room.roomName).LoadTopView_RoomTop(ReloadRoomName, skipEditPageAction); functionListView = new VerticalScrolViewLayout() { Y = Application.GetRealHeight(64), - Height = Application.GetRealHeight(603-12), + Height = Application.GetRealHeight(603 - 12), }; bodyView.AddChidren(functionListView); - foreach (var function in room.GetRoomFunctions(false)) + var list = room.GetRoomFunctions(false); + + foreach (var function in list) { - if (MainPage.RoomNotSupportFunctionList.Contains( function.spk)) + if (MainPage.RoomNotSupportFunctionList.Contains(function.spk)) { continue; } @@ -89,7 +93,7 @@ if (function.spk == SPK.LightRGB || function.spk == SPK.LightDimming) { - var functionDiv = new FunctionControlZone(function) + var functionDiv = new FunctionControlZone(function, null) { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), @@ -105,7 +109,10 @@ } else { - var functionDiv = new FunctionControlZone(function) + var functionDiv = new FunctionControlZone(function, () => + { + this.ReLoadPage(); + }) { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), @@ -132,7 +139,7 @@ BorderColor = 0x00FFFFFF, BorderWidth = 1, BackgroundColor = CSS_Color.MainBackgroundColor, - Tag = "Scene-" + scene.sid + Tag = "Scene-" + scene.sid }; functionListView.AddChidren(sceneRow); LoadSceneRow(sceneRow, scene); @@ -147,7 +154,7 @@ /// </summary> public void LoadSceneRow(FrameLayout bodyDiv, Scene scene) { - var btnIcon = new Button() + var btnIcon = new Button() { X = Application.GetRealWidth(10), Y = Application.GetRealHeight(15), @@ -214,15 +221,15 @@ btnName.X = Application.GetRealWidth(52 + 16); } //鍔犺浇鍦烘櫙鎺у埗浜嬩欢 - LoadEvent_ControlScene(btnName,btnFromFloor,bodyDiv,scene ); + LoadEvent_ControlScene(btnName, btnFromFloor, bodyDiv, scene); - LoadEvent_FunctionCollection(btnCollectionIcon,scene); + LoadEvent_FunctionCollection(btnCollectionIcon, scene); } /// <summary> /// 鍔犺浇鍔熻兘鏀惰棌鎸夐挳浜嬩欢 /// </summary> - void LoadEvent_FunctionCollection(Button btnCollectionIcon,Scene scene) + void LoadEvent_FunctionCollection(Button btnCollectionIcon, Scene scene) { btnCollectionIcon.MouseUpEventHandler += (sender, e) => { @@ -233,9 +240,10 @@ /// <summary> /// 鍔犺浇鍦烘櫙鎺у埗浜嬩欢 /// </summary> - void LoadEvent_ControlScene(Button btnName,Button btnFromFloor,FrameLayout bodyDiv, Scene scene) + void LoadEvent_ControlScene(Button btnName, Button btnFromFloor, FrameLayout bodyDiv, Scene scene) { - EventHandler<MouseEventArgs> upEvent = (sender, e) => { + EventHandler<MouseEventArgs> upEvent = (sender, e) => + { DriverLayer.Control.Ins.ControlScene(scene); string msg = scene.name + Language.StringByID(StringId.AlreadyOpened); new PublicAssmebly().TipMsgAutoClose(msg, false); @@ -245,5 +253,6 @@ bodyDiv.MouseUpEventHandler = upEvent; } + } } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs index 6faca99..ef2c271 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs @@ -619,7 +619,25 @@ } } break; - + //钀ょ煶瑙嗛闂ㄩ攣 + case SPK.VideoDoorLock: + { + LogicView.FunTypeView view1 = new LogicView.FunTypeView(); + view1.btnText.TextID=StringId.yonghurenyuan; + view1.btnText.Name = Language.StringByID(StringId.shipinmensuo); + fLayout.AddChidren(view1.FLayoutView()); + view1.btnClick.MouseUpEventHandler += (sender, e) => + { + this.identifier = "open_door";//寮�閿佷簨浠� + this.VideoDoorLockAction(this, device, view1.btnState); + }; + if (edit) + { + this.GetEditState(device, index, view1.btnState,null, null, null); + } + } + break; + } #region 淇濆瓨 ///淇濆瓨View @@ -669,6 +687,12 @@ //condition榛樿[] inputDevice.condition = new List<Dictionary<string, string>>(); } + } + else if (device.spk == SPK.VideoDoorLock) + { + ////钀ょ煶瑙嗛闂ㄩ攣 + inputDevice.condition_type = "9"; + inputDevice.identifier = this.identifier; } @@ -1045,7 +1069,7 @@ { try { - var faceIDList = Send.Current.GetListHomeFace(device.deviceId,true); + var faceIDList = Send.Current.GetListHomeFace(device.deviceId, true); List<string> faceNameList = new List<string>(); for (int i = 0; i < faceIDList.Count; i++) { @@ -1070,6 +1094,65 @@ }); } catch { } + finally + { + Application.RunOnMainThread(() => + { + loading.Hide(); + }); + } + + }); + + } + + /// <summary> + /// 钀ょ煶瑙嗛闂ㄩ攣涓撶敤 + /// </summary> + /// <param name="frame">褰撳墠鐣岄潰</param> + /// <param name="device">褰撳墠璁惧</param> + /// <param name="btnState">鏃х姸鎬�</param> + public void VideoDoorLockAction(FrameLayout frame, Entity.Function device, Button btnState) + { + selectedState = device.spk + "_"; + Loading loading = new Loading(); + frame.AddChidren(loading); + loading.Start(); + System.Threading.Tasks.Task.Run(() => + { + try + { + var userList =FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetVideoDoorLockUserListInfo(device); + List<string> userNameList = new List<string>(); + for (int i = 0; i < userList.Count; i++) + { + var user = userList[i]; + userNameList.Add(user.extUserName); + } + Application.RunOnMainThread(() => + { + loading.Hide(); + PublicInterface publicInterface = new PublicInterface();//鐢ㄦ埛鐣岄潰 + publicInterface.FrameOrVv(this, userNameList, new List<string> { btnState.Text }, device.name, (index) => + { + var userId = userNameList[index]; + //鐣岄潰鏄剧ず閫変腑鍊� + btnState.Text = userId; + //鏁版嵁灏佽 + AddDictionary("open_user", userId, "string"); + + }, false); + + }); + } + catch { } + finally + { + Application.RunOnMainThread(() => + { + loading.Hide(); + }); + } }); diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs index 16f5d56..58b303f 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs @@ -407,6 +407,12 @@ } } break; + case SPK.VideoDoorLock: + { + string value = this.GetValue(dicList); + inputView.btnState.Text = value; + } + break; case SPK.doorgate: { if (inputCondition.identifier == "door_call_cloud_event") @@ -2131,6 +2137,15 @@ } } break; + case SPK.VideoDoorLock: + { + foreach (var dic in dicList) + { + string value = dic["value"]; + button1.Text = value; + } + } + break; case SPK.MusicStandard: case SPK.AvMusic: { diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs index 91ba766..c0e98f6 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs @@ -187,7 +187,7 @@ var list2 = this.GetVideoDeviceList(); list.AddRange(list1); list.AddRange(list2); - //GetTestDevice(ref list, true); + GetTestDevice(ref list, true); return list; } /// <summary> @@ -360,7 +360,8 @@ { return "LogicIcon/sensor.png"; } - else if (SPK.DoorLock == device.spk) + else if (SPK.DoorLock == device.spk + || SPK.VideoDoorLock == device.spk) { return "FunctionIcon/DoorLock/DoorLock.png"; } @@ -519,7 +520,7 @@ deviceStrTypeList.Add(Language.StringByID(StringId.Curtain)); } ///绌鸿皟绫� - var ac = deviceList.Find((device) => device.spk == SPK.AcStandard || device.spk == SPK.AcIr || device.spk == SPK.HvacAC); + var ac = deviceList.Find((device) => device.spk == SPK.AcStandard || device.spk == SPK.HvacAC|| device.spk == SPK.AcIr); if (ac != null) { deviceStrTypeList.Add(Language.StringByID(StringId.AC)); @@ -577,7 +578,8 @@ deviceStrTypeList.Add(Language.StringByID(StringId.Electric)); } ///闂ㄩ攣绫� - var doorlock = deviceList.Find((device) => device.spk == SPK.DoorLock); + var doorlock = deviceList.Find((device) => device.spk == SPK.DoorLock + || device.spk == SPK.VideoDoorLock); if (doorlock != null) { deviceStrTypeList.Add(Language.StringByID(StringId.DoorLock)); @@ -698,6 +700,7 @@ else if (deviceType == Language.StringByID(StringId.DoorLock)) { functionTypeList.Add(SPK.DoorLock); + functionTypeList.Add(SPK.VideoDoorLock); } ///闊充箰绫� else if (deviceType == Language.StringByID(StringId.Music)) @@ -776,6 +779,8 @@ functionTypeList.Add(SPK.MechanicalArm); functionTypeList.Add(SPK.IpCam_Imou); functionTypeList.Add(SPK.SensorPm10); + functionTypeList.Add(SPK.VideoDoorLock); + functionTypeList.Add(SPK.AcIr); } @@ -835,6 +840,8 @@ deviceTypeList.Add(SPK.doorgate); deviceTypeList.Add(SPK.IpCam_Imou); deviceTypeList.Add(SPK.SensorPm10); + deviceTypeList.Add(SPK.VideoDoorLock); + deviceTypeList.Add(SPK.AcIr); } break; @@ -858,6 +865,7 @@ deviceTypeList.Add(SPK.MusicStandard); deviceTypeList.Add(SPK.AvMusic); deviceTypeList.Add(SPK.MechanicalArm); + deviceTypeList.Add(SPK.AcIr); } break; } @@ -1176,9 +1184,9 @@ //new Entity.Function { sid = "1234567890", name = "瓒呭0娉紶鎰熷櫒", spk = Entity.SPK.SensorUtrasonic }, // new Entity.Function { sid = "1234567891", name = "娓╁害浼犳劅鍣�", spk = Entity.SPK.SensorTemperature }, // new Entity.Function { sid = "1234567892", name = "婀垮害浼犳劅鍣�", spk = Entity.SPK.SensorHumidity }, - new Entity.Function { sid = "12345678933456", name = "璋冨厜鐏�", spk = Entity.SPK.LightDimming }, - new Entity.Function { sid = "1234567895444", name = "闈㈡澘", spk = Entity.SPK.PanelSocket }, - new Entity.Function { sid = "12345678968888", name = "pm10", spk = Entity.SPK.SensorPm10 }, + new Entity.Function { sid = "12345678933456", name = "闂ㄩ攣", spk = Entity.SPK.DoorLock }, + new Entity.Function { sid = "1234567895444", name = "瑙嗛闂ㄩ攣", spk = Entity.SPK.VideoDoorLock }, + //new Entity.Function { sid = "12345678968888", name = "pm10", spk = Entity.SPK.SensorPm10 }, // new Entity.Function { sid = "1234567897", name = "姣背娉紶鎰熷櫒1", spk = Entity.SPK.SenesorMegahealth2 }, // new Entity.Function { sid = "1234567899", name = "闂ㄧ浼犳劅鍣�", spk = Entity.SPK.SensorDoorWindow }, // new Entity.Function { sid = "12345678991234", name = "HDL鏈烘鎵�", spk = Entity.SPK.MechanicalArm }, diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs index d6835e6..fbf8818 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs @@ -462,6 +462,38 @@ } + /// <summary> + /// 鑾峰彇浣忓畢宸插綍鍏ヤ汉鑴镐俊鎭� + /// </summary> + /// <param name="deviceId">鍙瀵硅璁惧id</param> + /// <returns></returns> + public List<Face> GetHomeFaceList(string deviceId, bool isTip) + { + var jObject = new JObject(); + jObject.Add("homeId", LogicMethod.Current.HomeId); + jObject.Add("deviceId", deviceId); + var responsePackNew = RequestServerhomeId(jObject, NewAPI.Api_Post_GetListHomeFace, "鑾峰彇浣忓畢宸插綍鍏ヤ汉鑴镐俊鎭�"); + //濡傛灉鏄痶oken杩囨湡鍒欏埛鏂皌oken + if (responsePackNew.Code == StateCode.TOKEN_EXPIRED) + { + RefreshToken(); + GetListHomeFace(deviceId, isTip); + } + if (Check(responsePackNew, isTip) == false) + { + return new List<Face>(); + } + var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Face>>(responsePackNew.Data.ToString()); + if (list == null) + { + list = new List<Face>(); + } + faceList.Clear(); + faceList.AddRange(list); + return list; + + } + /// <summary> ///璇锋眰鏈嶅姟鍣紙涓庝綇瀹呮湁鍏�:渚嬪锛沨omeId锛� /// </summary> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs index 84822aa..a7845f1 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs @@ -92,11 +92,12 @@ //鏃ュ嚭/鏃ヨ惤/姝e崍鐐瑰嚮浜嬩欢 timeSpecialView.btnClick.MouseUpEventHandler += (sen, e) => { - if (string.IsNullOrEmpty( Entity.DB_ResidenceData.Instance.CurrentRegion.homeAddress))//.longitude == 0 && Entity.DB_ResidenceData.Instance.CurrentRegion.latitude == 0) - { - new PublicAssmebly().TipMsg(StringId.tip, StringId.GatewayLocationInformationIsNotConfigured); - return; - } + + //if (string.IsNullOrEmpty( Entity.DB_ResidenceData.Instance.CurrentRegion.homeAddress))//.longitude == 0 && Entity.DB_ResidenceData.Instance.CurrentRegion.latitude == 0) + //{ + // new PublicAssmebly().TipMsg(StringId.tip, StringId.GatewayLocationInformationIsNotConfigured); + // return; + //} SpeciaTime speciaTime = new SpeciaTime(); MainPage.BasePageView.AddChidren(speciaTime); speciaTime.Show(); diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs index 21466f5..c0a6841 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs @@ -19,6 +19,7 @@ #if __ANDROID__ public class dddxx { } #else + //澶у崕鎽勫儚澶磗dk浠g悊锛圫hared.IOS.HDLCNVRSDK) hdlLCNVRSDKDelegate hdlLCNVRDelegate; public class hdlLCNVRSDKDelegate : HDLLCNVRSDKDelegate { @@ -193,7 +194,7 @@ 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) hdlLCNVRDelegate = new hdlLCNVRSDKDelegate(() => {//娣诲姞鎴愬姛杩斿洖浜嬩欢 refreshView.BeginHeaderRefreshing(); @@ -421,6 +422,11 @@ this.RemoveFromParent(); }; break; + case SPK.VideoDoorLock: { + //璺宠浆鍒癮ndroid閭h竟鍘� + HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.SkipAddDeviceActivity(SPK.VideoDoorLock); + } + break; } }; } diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs index 6708c7d..efa787c 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs @@ -11,7 +11,7 @@ using Shared; namespace HDL_ON.UI { - public class DeviceListPage : FrameLayout + public class DeviceListPage : FrameLayout { FrameLayout bodyView; VerticalRefreshLayout contentView; @@ -59,7 +59,8 @@ { var waitPage = new Loading(); waitPage.Start(); - new System.Threading.Thread(() => { + new System.Threading.Thread(() => + { try { var pm = new HttpServerRequest(); @@ -77,7 +78,7 @@ } else { - var tipView = new EmptyTipView(Language.StringByID(StringId.NotAddedAnyDevices),160) + var tipView = new EmptyTipView(Language.StringByID(StringId.NotAddedAnyDevices), 160) { Gravity = Gravity.CenterHorizontal, }; @@ -96,7 +97,8 @@ } finally { - Application.RunOnMainThread(() => { + Application.RunOnMainThread(() => + { if (waitPage != null) { waitPage.RemoveFromParent(); @@ -113,6 +115,10 @@ bool isFrist = true; foreach (var device in deviceList) { + if (!this.CheckSupportDevice(device)) + { + continue; + } var row = new RowLayout() { Height = Application.GetRealHeight(50), @@ -168,7 +174,8 @@ }; row.AddChidren(btnName); - btnName.MouseUpEventHandler = (sender, e) => { + btnName.MouseUpEventHandler = (sender, e) => + { switch (device.spk) { case SPK.IrModule: @@ -187,7 +194,8 @@ contentView.BeginHeaderRefreshing(); }; break; - case SPK.SensorEnvironment:case SPK.SensorEnvironmentHailin: + case SPK.SensorEnvironment: + case SPK.SensorEnvironmentHailin: case SPK.SensorEnvironment2: case SPK.SensorEnvironment3: var smPage1 = new SensorEnvironmentManagerPage(); @@ -267,7 +275,8 @@ Width = Application.GetRealWidth(150), }; row.AddChidren(btnEdit); - btnEdit.MouseUpEventHandler = (sender, e) =>{ + btnEdit.MouseUpEventHandler = (sender, e) => + { Action<string> callBack = (str) => { if (string.IsNullOrEmpty(str)) @@ -337,6 +346,23 @@ } + /// <summary> + /// 妫�鏌ユ槸鍚︽敮鎸� + /// </summary> + /// <param name="function"></param> + /// <returns></returns> + bool CheckSupportDevice(Function function) + { + + if (function == null) return false; + if (function.spk == SPK.VideoDoorLock) + { + return false; + } + return true; + + } + } diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs index f485677..e503084 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs @@ -226,6 +226,7 @@ dialog.Close(); LoadEvent_ChangeCurHome(home); LoadContentView(); + HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.ChangeCurrHome(home); }; } dialog.Show(); @@ -415,6 +416,7 @@ dialog.Close(); LoadEvent_ChangeCurHome(home); LoadContentView(); + HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.ChangeCurrHome(home); }; } diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs index b4b4f4a..eb2e32c 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs @@ -828,6 +828,7 @@ MainPage.BasePageView.AddChidren(myServerInfoPage); myServerInfoPage.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; myServerInfoCellView.GoAction = selectAction; myServerInfoCellView.BtnTilte.Text = Language.StringByID(StringId.ServerInformation); diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs index ce10df7..26b7215 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs @@ -4,6 +4,11 @@ using HDL_ON.Entity; using Shared; +#if __IOS__ +using UIKit; +using Foundation; +#endif + namespace HDL_ON.UI { public partial class PersonalDataPage @@ -439,7 +444,6 @@ MainPage.BasePageView.AddChidren(aep); aep.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; _QRcodeView.MouseUpEventHandler = eventHandler; btnQRcode.MouseUpEventHandler = eventHandler; @@ -447,7 +451,7 @@ btnQRcodeRight.MouseUpEventHandler = eventHandler; } - #region 淇敼缁戝畾閭 +#region 淇敼缁戝畾閭 /// <summary> /// 淇敼缁戝畾閭 /// </summary> @@ -459,6 +463,7 @@ { btnUserEmailInfo.Text = GetBindAccountText(email); + }; if (CheckIfUnbound(btnUserEmailInfo.Text)) @@ -493,6 +498,7 @@ Action<string> action = (phone) => { btnUserPhoneInfo.Text = GetBindAccountText(phone); + }; if (CheckIfUnbound(btnUserPhoneInfo.Text)) @@ -511,15 +517,14 @@ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; } - }; btnUserPhoneInfo.MouseUpEventHandler = eventHandler; btnUserPhoneRight.MouseUpEventHandler = eventHandler; userPhoneInfoView.MouseUpEventHandler = eventHandler; } - #endregion +#endregion - #region 瑙i攣璁剧疆鍖哄煙 +#region 瑙i攣璁剧疆鍖哄煙 //void LoadEvent_SkipInterpretationSettings() //{ // EventHandler<MouseEventArgs> eventHandler = (sender, e) => @@ -535,7 +540,7 @@ // btnInterpretationSettingsTip.MouseUpEventHandler = eventHandler; //} - #endregion +#endregion /// <summary> /// 璺宠浆淇敼瀵嗙爜鐣岄潰 diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs index 7084db6..a37633b 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs @@ -291,10 +291,10 @@ /// <returns></returns> public static ResponsePackNew RequestServerhomeId(object o, string api_Url, int mTimeout = 20) { - MainPage.Log("绾㈠瀹濊姹傛暟鎹�:"+api_Url+"\r\n"+o.ToString()); + MainPage.Log("绾㈠瀹�->鍙戦�佹暟鎹�:"+api_Url+"\r\n"+o.ToString()); var requestJson = HttpUtil.GetSignRequestJson(o); var responsePackNew= HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout); - MainPage.Log("鍥炲绾㈠瀹濊姹傛暟鎹�:" + "\r\n"+ Newtonsoft.Json.JsonConvert.SerializeObject(responsePackNew)); + MainPage.Log("绾㈠瀹�->鍥炲鏁版嵁:" + "\r\n"+ Newtonsoft.Json.JsonConvert.SerializeObject(responsePackNew)); return responsePackNew; } diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs index 6080247..9375aa5 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs @@ -29,6 +29,18 @@ /// 浣嶇疆淇℃伅璺宠浆缂栬緫鎸夐挳 /// </summary> Button btnLocationInfoRight; + /// <summary> + /// 鍒犻櫎璁惧 + /// </summary> + Button delTextBtn; + /// <summary> + /// 涓嬩竴绾у浘鏍� + /// </summary> + Button delRightBtn; + /// <summary> + /// 鍒犻櫎璁惧琛孎rameLayout + /// </summary> + FrameLayout delView; #endregion @@ -38,6 +50,11 @@ /// 鍚庨��鏃讹紝鍒锋柊涔嬪墠鐣岄潰鐨勬樉绀轰俊鎭� /// </summary> Action actionRefresh; + + /// <summary> + /// 瑙g粦璁惧鍥炶皟 + /// </summary> + public Action actionDel; #endregion public FunctionBaseInfoSetPage(Function func, Action action) @@ -180,13 +197,13 @@ #endregion } #region 鍏变韩 + //var sharedView = new FrameLayout() //{ // Height = Application.GetRealHeight(55), // BackgroundColor = CSS_Color.MainBackgroundColor, //}; //contentView.AddChidren(sharedView); - //var btnSharedText = new Button() //{ // X = Application.GetRealWidth(16), @@ -219,6 +236,50 @@ // }); #endregion + #region 鍒犻櫎璁惧琛� + + delView = new FrameLayout() + { + Height = Application.GetRealHeight(55), + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + if (this.function.spk == SPK.VideoDoorLock) + { + contentView.AddChidren(delView); + } + var lineBtn = new Button() + { + Gravity = Gravity.CenterHorizontal, + BackgroundColor = CSS_Color.DividingLineColor, + Width = Application.GetRealWidth(343), + Height = Application.GetRealHeight(1) + }; + delView.AddChidren(lineBtn); + delTextBtn = new Button() + { + X = Application.GetRealWidth(16), + Width = Application.GetRealWidth(160), + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextID = StringId.DeleteDevice, + }; + delView.AddChidren(delTextBtn); + + delRightBtn= new Button() + { + X = Application.GetRealWidth(339), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/RightIcon.png", + }; + delView.AddChidren(delRightBtn); + + + + + #endregion #if stage2 #region 娣诲姞鍒版闈� var addToDesktopView = new FrameLayout() diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs index 006e71d..ff4c689 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs @@ -12,6 +12,8 @@ { LoadEvent_ChangeFunctionName (); SkipChooseRoomPage(); + DelDeviceEvent(); + } /// <summary> @@ -77,5 +79,45 @@ } } + /// <summary> + /// 瑙g粦璁惧鐨勪簨浠� + /// </summary> + void DelDeviceEvent() + { + + EventHandler<MouseEventArgs> ClickEvent = (sener, e) => + { + new HDL_ON.UI.Music.View.TipView().TipBox(-1, StringId.AreYouSureToDeleteThisDevice, () => + { + UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.DelDevice(this.function, (isBool) => + { + Application.RunOnMainThread(() => + { + if (!isBool) + { + new Tip() + { + CloseTime = 1, + Text = Language.StringByID(StringId.delFail), + Direction = AMPopTipDirection.None, + }.Show(bodyView); + return; + } + //鍒犻櫎鏈湴鏂囦欢 + UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DeleteFunction(this.function); + this.RemoveFromParent(); + this.actionDel?.Invoke(); + }); + + }); + + }); + }; + this.delView.MouseUpEventHandler += ClickEvent; + this.delTextBtn.MouseUpEventHandler += ClickEvent; + this.delRightBtn.MouseUpEventHandler += ClickEvent; + } + + } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs index d631763..7aed7ce 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs @@ -86,7 +86,7 @@ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceIds", functionIds); var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_RefreshDeviceStatus, "鍒锋柊璁惧鐘舵��"); - if (!this.dataChecking(responsePackNew)) + if (!this.DataChecking(responsePackNew)) { return; } @@ -123,7 +123,7 @@ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceIds", new List<string> { music.deviceId }); var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_PlayerList, "鑾峰彇闊充箰鍒楄〃"); - if (!this.dataChecking(responsePackNew)) + if (!this.DataChecking(responsePackNew)) { return; } @@ -173,7 +173,7 @@ } d.Add("deviceInfos", new List<Dictionary<string, object>> { deviceIds }); var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GroupList, "鑾峰彇鍒楄〃鍚嶅垪琛�"); - if (!this.dataChecking(responsePackNew)) + if (!this.DataChecking(responsePackNew)) { return new List<GroupList>(); } @@ -238,7 +238,7 @@ d.Add("sidGroups", new List<Dictionary<string, object>> { d1 }); var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GroupPlayerList, "閫氳繃鍒楄〃鍚嶈幏鍙栨瓕鏇插垪琛�"); - if (!this.dataChecking(responsePackNew)) + if (!this.DataChecking(responsePackNew)) { return new List<PalyerSongListInfo>(); } @@ -282,10 +282,11 @@ /// </summary> /// <param name="responsePackNew">鍥炲鏁版嵁瀵硅薄</param> /// <returns></returns> - private bool dataChecking(ResponsePackNew responsePackNew) + private bool DataChecking(ResponsePackNew responsePackNew) { - if (responsePackNew.Code != "0" || responsePackNew.Data == null || responsePackNew.Data.ToString() == "") + if (responsePackNew.Data == null||responsePackNew.Code != "0" || responsePackNew.Data.ToString() == "") { + return false; } return true; diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/View/SizeClass.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/View/SizeClass.cs index e2d5c9d..f0eeb8a 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Music/View/SizeClass.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Music/View/SizeClass.cs @@ -1,93 +1,94 @@ 锘縰sing System; namespace HDL_ON.UI.Music { - public static class TextSize + public class TextSize { - public static int TopLine = 1; - public static int MiddleLine =1; - public static int DownLine = 1; + public const int TopLine = 1; + public const int MiddleLine = 1; + public const int DownLine = 1; - public static int Text24 = 24; - public static int Text20 = 20; - public static int Text18 = 18; - public static int Text16 = 16; - public static int Text14 = 14; - public static int Text12 = 12; - public static int Text10 = 10; + public const int Text24 = 24; + public const int Text20 = 20; + public const int Text18 = 18; + public const int Text16 = 16; + public const int Text14 = 14; + public const int Text12 = 12; + public const int Text10 = 10; } - public static class MusicColor + public class MusicColor { /// <summary> /// 椤堕儴鑳屾櫙棰滆壊 /// </summary> - public static uint TopViewColor = 0xFFF7F7F7; + public const uint TopViewColor = 0xFFF7F7F7; /// <summary> /// 鐣岄潰鑳屾櫙棰滆壊 /// </summary> - public static uint ViewColor = 0xFFF2F3F7; + public const uint ViewColor = 0xFFF2F3F7; /// <summary> /// 鐧借壊鑳屾櫙棰滆壊 /// </summary> - public static uint WhiteColor = 0xFFFFFFFF; + public const uint WhiteColor = 0xFFFFFFFF; /// <summary> /// 绾㈣壊鑳屾櫙棰滆壊 /// </summary> - public static uint RedColor = 0xFFFF4747; - - /// <summary> - /// 绾挎潯棰滆壊 - /// </summary> - public static uint LineColor =0xFFECEDEE; - /// <summary> - /// 寮圭獥鑳屾櫙棰滆壊 - /// </summary> - public static uint PopupBackgroundColor = 0x90000000; + public const uint RedColor = 0xFFFF4747; /// <summary> /// 绾挎潯棰滆壊 /// </summary> - public static uint MusicEditColor = 0xFFFC9C04; + public const uint LineColor = 0xFFECEDEE; /// <summary> /// 寮圭獥鑳屾櫙棰滆壊 /// </summary> - public static uint MusicDelColor = 0xFFFF7474; + public const uint PopupBackgroundColor = 0x90000000; - public static uint Text18Color = 0xFF1B2D4D; - public static uint MusicTxet14SelectedColor = 0xFF4484F4; - public static uint MusicTxet14Color = 0xFF1B2D4D; - public static uint MusicTxet12SelectedColor = 0xFF4484F4; - - public static uint MusicNoTxetColor = 0xFFC0C7D4; - public static uint TextColor = 0xFF1B2D4D; - public static uint SelectedColor = 0xFF4484F4; + /// <summary> + /// 绾挎潯棰滆壊 + /// </summary> + public const uint MusicEditColor = 0xFFFC9C04; + /// <summary> + /// 寮圭獥鑳屾櫙棰滆壊 + /// </summary> + public const uint MusicDelColor = 0xFFFF7474; - public static uint TextTimeColor = 0xFF798394; + public const uint Text18Color = 0xFF1B2D4D; + public const uint MusicTxet14SelectedColor = 0xFF4484F4; + public const uint MusicTxet14Color = 0xFF1B2D4D; + public const uint MusicTxet12SelectedColor = 0xFF4484F4; - public static uint TextCancelColor = 0xFF798394; + public const uint MusicNoTxetColor = 0xFFC0C7D4; + public const uint TextColor = 0xFF1B2D4D; + public const uint SelectedColor = 0xFF4484F4; + + public const uint TextTimeColor = 0xFF798394; + + public const uint TextCancelColor = 0xFF798394; } - public static class H_W { + public class H_W + { /// <summary> /// app楂樺害 /// </summary> - public static int H = 667; + public const int H = 667; /// <summary> /// app瀹藉害 /// </summary> - public static int W = 375; + public const int W = 375; /// <summary> /// 椤堕儴楂樺害 /// </summary> - public static int T_Height = 64; + public const int T_Height = 64; /// <summary> /// 绾块珮搴� /// </summary> - public static int Line = 1; + public const int Line = 1; } diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs index d5a2001..8ab919c 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs @@ -1,23 +1,49 @@ 锘縰sing System; +using HDL_ON.UI.CSS; using HDL_ON.UI.Music; using Shared; namespace HDL_ON.UI.UI2.FuntionControlView.Video.View { public class ShowDialog { + + private static ShowDialog showDialog; + + public static ShowDialog Currnet + { + get + { + if (showDialog == null) + { + + showDialog = new ShowDialog(); + } + + return showDialog; + + } + } + + + public Dialog dialog; + /// <summary> /// /// </summary> /// <param name="title">鏍囬</param> - /// <param name="action1">鍥炶皟鍑芥暟</param> - /// <param name="action2">鍥炶皟鍑芥暟</param> - public void ClickBox(string title, Action<Dialog> action1, Action<Dialog> action2) + /// <param name="jieTingAction">鍥炶皟鍑芥暟</param> + /// <param name="guanBiAction">鍥炶皟鍑芥暟</param> + public void ClickBox(string title, Action<Dialog> jieTingAction, Action<Dialog> guanBiAction) { - Dialog dialog = new Dialog() + if (dialog != null) + { + //闃叉浜岄噸鐣岄潰 + dialog.Close(); + } + dialog = new Dialog() { BackgroundColor = MusicColor.PopupBackgroundColor, }; - FrameLayout whiteView = new FrameLayout() { X = Application.GetRealWidth(56), @@ -50,7 +76,7 @@ TextColor = MusicColor.TextColor, TextSize = TextSize.Text16, TextAlignment = TextAlignment.CenterLeft, - Text = "鏉ヨ嚜鈥滃洿澧欐満鈥濆懠鍙�", + Text = title, }; whiteView.AddChidren(btnTitle); @@ -77,14 +103,135 @@ guaduanIconBtn.MouseUpEventHandler += (sender, e) => { - action1(dialog); + guanBiAction(dialog); }; jietingIconBtn.MouseUpEventHandler += (sender, e) => { - - action2(dialog); + jieTingAction(dialog); }; + } + + /// <summary> + /// 鍒濆鍖朌ialog + /// </summary> + /// <param name="titleStr">鏍囬</param> + /// <param name="msgStr">鎻愮ず淇℃伅</param> + /// <param name="okAction"></param> + /// <param name="cancelAction"></param> + /// <param name="cancelID"></param> + /// <param name="confirmID"></param> + public void ShowDialogBase(string titleStr, string msgStr, Action okAction, Action cancelAction, int cancelID = StringId.Cancel, int confirmID = StringId.Confirm, bool isAlarmColor = false) + { + if (dialog != null) + { + //闃叉浜岄噸鐣岄潰 + dialog.Close(); + } + dialog = new Dialog() + { + BackgroundColor = MusicColor.PopupBackgroundColor, + }; + + var bodyView = new FrameLayout(); + dialog.AddChidren(bodyView); + + FrameLayout contentView = new FrameLayout() + { + Gravity = Gravity.Center, + Width = Application.GetRealWidth(270), + Height = Application.GetRealHeight(140), + BackgroundColor = CSS_Color.MainBackgroundColor, + BorderColor = 0x00000000, + BorderWidth = 0, + Radius = (uint)Application.GetMinRealAverage(10), + }; + bodyView.AddChidren(contentView); + + Button btnTitle = new Button() + { + Y = Application.GetRealHeight(20), + Height = Application.GetRealHeight(22), + TextColor = CSS_Color.MainColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextAlignment = TextAlignment.Center, + IsBold = true, + Text = titleStr, + }; + contentView.AddChidren(btnTitle); + int Width135 = Application.GetRealWidth(135); + //鎻愮ず鍐呭鎸夐挳 + Button btnMsg = new Button() + { + Y = btnTitle.Bottom + Application.GetRealHeight(4), + X = Application.GetRealWidth(6), + Height = Application.GetRealHeight(46), + Width = Application.GetRealWidth(258), + TextAlignment = TextAlignment.Center, + TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + Text = msgStr, + IsMoreLines = true, + }; + contentView.AddChidren(btnMsg); + + Button btnLine = new Button() + { + Y = Application.GetRealHeight(96), + Height = Application.GetRealHeight(1), + Width = Application.GetRealWidth(270 / 2), + BackgroundColor = CSS_Color.DividingLineColor, + }; + contentView.AddChidren(btnLine); + + Button btnCancel = new Button() + { + Y = btnLine.Bottom, + Width = Width135, + Height = Application.GetRealHeight(43), + TextAlignment = TextAlignment.Center, + TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextID = cancelID, + }; + contentView.AddChidren(btnCancel); + + Button btnConfirm = new Button() + { + X = contentView.Width - Width135, + Y = btnLine.Y, + Width = Width135, + Height = Application.GetRealHeight(45), + TextAlignment = TextAlignment.Center, + //TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextColor = CSS_Color.MainBackgroundColor, + BackgroundColor = CSS_Color.MainColor, + TextID = confirmID, + }; + contentView.AddChidren(btnConfirm); + //渚嬶細鍙充笅鍦嗚 澶у皬涓�50 + int mRectCornerID = HDLUtils.RectCornerBottomRight; + btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), mRectCornerID); + + btnCancel.MouseUpEventHandler += (sender, e) => + { + dialog.Close(); + cancelAction?.Invoke(); + }; + + btnConfirm.MouseUpEventHandler += (sender, e) => + { + dialog.Close(); + okAction?.Invoke(); + }; + + if (isAlarmColor) + { + btnTitle.TextColor = CSS_Color.WarningColor; + btnConfirm.TextColor = CSS_Color.MainBackgroundColor; + btnConfirm.BackgroundColor = CSS_Color.WarningColor; + } } @@ -94,7 +241,7 @@ /// <param name="str1">鏍囬</param> public void QRcode(string str1) { - Dialog dialog = new Dialog() + Dialog dialog = new Dialog() { BackgroundColor = CSS.CSS_Color.viewTrans60lucence, }; @@ -119,18 +266,18 @@ TextSize = TextSize.Text16, TextAlignment = TextAlignment.Center, IsBold = true, - TextID=StringId.linshimima, + TextID = StringId.linshimima, }; whiteView.AddChidren(btnTitle); //瀵嗙爜 Button btnpaw = new Button() { - X=Application.GetRealWidth(100), + X = Application.GetRealWidth(100), Y = Application.GetRealHeight(62), Height = Application.GetRealHeight(32), Width = Application.GetRealWidth(82), TextColor = MusicColor.SelectedColor, - TextSize =24, + TextSize = 24, TextAlignment = TextAlignment.Center, IsBold = true, Text = str1, diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs new file mode 100644 index 0000000..6613907 --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs @@ -0,0 +1,588 @@ +锘縰sing System; +using HDL_ON.Entity; +using System.Collections.Generic; +using Shared; +using HDL_ON.DAL.Server; +#if __IOS__ +#else +using Com.Videogo.Hdl; +#endif + +namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock +{ + /// <summary> + /// 钀ょ煶瑙嗛闂ㄩ攣鍏叡鏂规硶绫� + /// </summary> + public class CommonMethod + { + private Loading loading; + /// <summary> + /// 璁板綍褰撳墠鐣岄潰绱㈠紩鍊� + /// </summary> + private int pageLayoutIndexValue; + + private static CommonMethod commonMethod = null; + /// <summary> + /// 鑾峰彇瀵硅薄 + /// </summary> + public static CommonMethod Current + { + get + { + if (commonMethod == null) + { + commonMethod = new CommonMethod(); + } + + return commonMethod; + + } + + } + + #region --------- 璺宠浆鍒癆ndroid锛宨os閭h竟鐨勬柟娉�(钀ょ煶瑙嗛闂ㄩ攣) -------- + /// <summary> + /// android,ios婧愮敓娣诲姞璁惧鍒颁簯绔垚鍔熷悗鍥炶皟鏂规硶 + /// 鍐嶈鍙栦簯绔殑涓婅悿鐭宠澶囧垪琛� + /// <paramref name="spk"/>spk</param> + public void SkipAddDeviceActivity(string spk) + { + + this.InitializationAndroidData((isEzChildAccessToken) => + { + + this.MainThread(() => + { +#if __IOS__ + //璺宠浆娣诲姞钀ょ煶璁惧 + ezsdkDelegate = new IosIHdlInterface(); + ezsdkDelegate.mAction += (serials) => + { + this.GetYingshiDeviceList(serials); + }; + EZSDK.IOS.EZSDK.SharedInstance().Delegate = ezsdkDelegate; + EZSDK.IOS.EZSDK.SharedInstance().AddEzvizMonitorWithDeviceType(spk); + +#else + HDLEzvizSdk.Instance.JumpToEZScanActivity(Application.Activity,spk); + HDLEzvizSdk.SetAddCallback(new AndroidIHdlInterface((isBool, serials) => + { + if (isBool) + { + this.GetYingshiDeviceList(serials); + } + + })); +#endif + + }); + + + }); + + + + + + } + /// <summary> + /// 璇诲彇浜戠鐨勪笂钀ょ煶璁惧鍒楄〃 + /// <paramref name="serials"/>搴忓垪鍙�</param> + private void GetYingshiDeviceList(string serials) + { + this.SunThread(() => + { + var list = VideDoorLockSend.Current.GetVideoDoorLockDeviceList(SPK.VideoDoorLock); + this.MainThread(() => + { + if (list.Count > 0) + { + var function = list.Find((o) => o.sid == serials); + if (function != null) + { + this.SaveFunctionFile(function); + } + } + }); + }); + + } + /// <summary> + /// 鎵撳紑瀹炴椂瑙嗛鐢婚潰 + /// </summary> + /// <param name="deviceSerial">璁惧搴忓垪鍙�</param> + /// <param name="deviceId">璁惧id(浜戠涓奷eviceId)</param> + /// <param name="spk">璁惧spk(浜戦泙涓婂畾涔夊ソ鐨�)</param> + /// <param name="isDialog">鏄惁闇�瑕佸脊妗�</param> + public void SkipRTVActivity(string deviceSerial, string deviceId, string spk, bool isDialog) + { + + this.InitializationAndroidData((isEzChildAccessToken) => + { + this.MainThread(() => + { + if (isDialog) + { + Video.View.ShowDialog.Currnet.ClickBox(Language.StringByID(StringId.laizimenlinghujiao), (dialog) => + { + dialog.Close(); + this.SkipRTVActivity(deviceSerial, deviceId, spk); + }, (dialog) => { dialog.Close(); }); + } + else + { + this.SkipRTVActivity(deviceSerial, deviceId, spk); + } + + }); + }); + + } + /// <summary> + /// 鎵撳紑瀹炴椂瑙嗛鐢婚潰 + /// </summary> + /// <param name="deviceSerial">璁惧搴忓垪鍙�</param> + /// <param name="deviceId">璁惧id(浜戠涓奷eviceId)</param> + /// <param name="spk">璁惧spk(浜戦泙涓婂畾涔夊ソ鐨�)</param> + private void SkipRTVActivity(string deviceSerial, string deviceId, string spk) + { + +#if __IOS__ + //鎵撳紑钀ょ煶瑙嗛鐣岄潰 + EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(deviceSerial, deviceId, spk); + +#else + HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk); +#endif + + + } + + /// <summary> + /// 娴忚鍘嗗彶璁板綍 + /// </summary> + public void SkipRecordActivity(string deviceId) + { + this.InitializationAndroidData((s) => + { + this.MainThread(() => + { +#if __IOS__ + //鎵撳紑钀ょ煶鍘嗗彶璁板綍鐣岄潰 + EZSDK.IOS.EZSDK.SharedInstance().ToDeviceMsgListView(deviceId); +#else + HDLEzvizSdk.Instance.JumpLockHistoryActivity(Application.Activity, deviceId); +#endif + }); + }); + + } + /// <summary> + /// 涓存椂瀵嗙爜寮�闂� + /// <paramref name="deviceId"/> + /// </summary> + public void SkipPSWActivity(string deviceId) + { + this.InitializationAndroidData((isBools) => + { + this.MainThread(() => + { +#if __IOS__ + //鎵撳紑钀ょ煶涓存椂瀵嗙爜鐣岄潰 + EZSDK.IOS.EZSDK.SharedInstance().ToTemPassView(deviceId); +#else + HDLEzvizSdk.Instance.JumpTempPasswordActivity(Application.Activity, deviceId); +#endif + }); + }); + } + + /// <summary> + /// 鍒濆鍖栬悿鐭砈DK(瀹為檯灏辨槸浼犲弬鏁�,澶氭璋冪敤涔熸病鏈夊奖鍝�) + /// </summary> + public void InitializationAndroidData(Action<bool> action) + { + bool isBool = true; + this.SunThread(() => + { + try + { + //鍏堣幏鍙栬悿鐭充簯瀛愯处鍙穞oken + var ezChildAccessToken = VideDoorLockSend.Current.GetEZGetChildToken(); + this.MainThread(() => + { + if (string.IsNullOrEmpty(ezChildAccessToken)) + { + //Token + isBool = false; + this.ShowTip("鍏堣幏鍙栬悿鐭充簯瀛愯处鍙穞oken澶辫触銆�"); + return; + } + +#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); +#else + HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, "1aa98a90489b4838b966b57018b4b04b", 1, DB_ResidenceData.Instance.CurrentRegion.id); + +#endif + + + }); + + } + catch (Exception e) + { + } + finally + { + this.MainThread(() => + { + action?.Invoke(isBool); + }); + } + }); + } + + /// <summary> + /// 鏇存崲浣忓畢 + /// </summary> + /// <param name="home">瀵硅薄</param> + public void ChangeCurrHome(RegionInfoRes home) + { + + if (DB_ResidenceData.Instance.CurrentRegion.id == home.id || string.IsNullOrEmpty(home.id)) return; +#if __IOS__ +#else + HDLEzvizSdk.Instance.SetHomeId(home.id); +#endif + + } + #endregion + + /// <summary> + /// 鑾峰彇銆愰棬閿佸瀷鍙枫�戝垪琛� + /// </summary> + /// <returns>杩斿洖缁撴灉涓嶄細涓簄ull</returns> + public List<string> GetVideoDoorLockLockModelsList() + { + return VideDoorLockSend.Current.GetVideoDoorLockLockModelsList(); + } + /// <summary> + /// 闂ㄩ攣鎺ㄩ�� + /// </summary> + /// <param name="pushMessageType"></param> + /// <param name="jPushMessageInfo"></param> + public void DoorLockPush(JPushMessageInfo jpushMessageInfo) + { + this.MainThread(() => + { + if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return; + //{ "deviceSid":"J92513662","type":"opendoormsg","extDevId":"J92513662","deviceId":"1641010144999936001","spk":"security.door.ezviz"} + var expantContent = Newtonsoft.Json.JsonConvert.DeserializeObject<ExpantContent>(jpushMessageInfo.expantContent); + if (expantContent == null) + { + return; + } + if (expantContent.spk != SPK.VideoDoorLock) + { + return; + } + if (jpushMessageInfo.messageType.Contains(PushMessageType.DOOR_BELL.ToString())) + { + ///鎵撳紑瑙嗛闂ㄩ攣 + this.SkipRTVActivity(expantContent.devSerial, expantContent.deviceId, expantContent.spk, true); + } + else if (jpushMessageInfo.messageType.Contains(PushMessageType.Alarm.ToString())) + { + //浣庣數閲忔帹閫� + this.UpdateDoorLockState(PushMessageType.Alarm); + } + else if (jpushMessageInfo.messageType.Contains(PushMessageType.Prompt.ToString())) + { + //寮�闂ㄦ帹閫� + this.UpdateDoorLockState(PushMessageType.Prompt); + } + }); + + } + /// <summary> + /// 鏇存柊寮�閿佸浘鏍囧拰鐢垫睜鐘舵�� + /// </summary> + private void UpdateDoorLockState(PushMessageType pushMessageType) + { + int childrenCount = MainPage.BasePageView.ChildrenCount - 1; + for (int i = childrenCount; childrenCount > i; i--) + { + View view = MainPage.BasePageView.GetChildren(i); + if (view is VideoDoorLockPage) + { + VideoDoorLockPage videoDoorLockPage = (VideoDoorLockPage)view; + if (videoDoorLockPage != null) + { + videoDoorLockPage.UpdateState(pushMessageType); + } + + } + } + + } + /// <summary> + /// 鑾峰彇钀ょ煶瑙嗛銆愰棬閿併�戝垪琛� + /// </summary> + /// <returns></returns> + public List<Function> GetVideoDoorLockList() + { + var list = FunctionList.List.GetVideoDoorLockList(); +#if DEBUG + //list.Add(new Function { name = "瑙嗛闂ㄩ攣涓�", sid = "23456789", spk = SPK.VideoDoorLock }); + //list.Add(new Function { name = "瑙嗛闂ㄩ攣浜�", sid = "2345678922", spk = SPK.VideoDoorLock }); +#endif + return list; + } + #region --------- 鍔熻兘鏂囦欢淇濆瓨锛屽垹闄� -------- + /// <summary> + /// 淇濆瓨鏈湴鏂囦欢 + /// </summary> + /// <param name="function">褰撳墠璁惧</param> + public void SaveFunctionFile(Function function) + { + if (function == null) return; + function.AssembleStatus(); + function.SaveFunctionFile(); + FunctionList.List.IniFunctionList(function.savePath, true); + MainPage.Log($"鏂囦欢淇濆瓨->{function.name}-->{function.spk}"); + } + + /// <summary> + /// 鍒犻櫎鏈湴鏂囦欢 + /// </summary> + /// <param name="function">褰撳墠璁惧</param> + public void DeleteFunction(Function function) + { + if (function == null) return; + FunctionList.List.DeleteFunction(function); + MainPage.Log($"鏂囦欢鍒犻櫎->{function.name}-->{function.spk}"); + } + #endregion + /// <summary> + /// 钀ょ煶瑙嗛闂ㄩ攣鐨勫浘鏍� + /// <param name="comerom">鏉ヨ嚜閭i噷</param> + /// </summary> + public string GetVideoDoorLockIcon(Comerom comerom) + { + if (comerom == Comerom.collect) + { + return "FunctionIcon/DoorLock/VideoDoorLockOpen.png"; + } + else + { + return "FunctionIcon/DoorLock/VideoDoorlockClose.png"; + } + + } + + /// <summary> + /// 鑾峰彇Loading瀵硅薄 + /// </summary> + /// <returns></returns> + public Loading Loading + { + get + { + this.MainThread(() => + { + //if (loading != null && this.pageLayoutIndexValue == MainPage.BasePageView.ChildrenCount - 1) + //{ + // //闃叉浜岄噸娣诲姞瀵硅薄 + // return; + //} + if (loading == null)//|| MainPage.BasePageView.ChildrenCount < 1) + { + loading = new Loading(); + } + //loading.BringToFront(); + Application.MainPage.AddChidren(loading); + //View view = MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1); + //if (view is ViewGroup) + //{ + // pageLayoutIndexValue = MainPage.BasePageView.ChildrenCount - 1; + // ((ViewGroup)view).AddChidren(loading); + //} + }); + return loading; + } + + } + + + #region ---------鑷畾涔夌嚎绋�(瀛愮嚎绋嬶紝涓荤嚎绋�)-------- + /// <summary> + /// 瀛愮嚎绋� + /// </summary> + /// <paramref name="tipType"/>鏄惁瑕佹彁绀洪敊璇俊鎭�(榛樿鏄剧ず)<paramref> + /// <param name="action"></param> + public void SunThread(Action action, TipType tipType = TipType.confirmation) + { + new System.Threading.Thread(() => + { + try + { + action?.Invoke(); + } + catch (Exception e) + { + this.ShowAlert(e, tipType); + } + }) + { IsBackground = true }.Start(); + + } + /// <summary> + /// 涓荤嚎绋�(UI鏇存柊) + /// </summary> + /// <paramref name="tipType"/>鏄惁瑕佹彁绀洪敊璇俊鎭�(榛樿鏄剧ず)<paramref> + /// <param name="action"></param> + public void MainThread(Action action, TipType tipType = TipType.confirmation) + { + Application.RunOnMainThread(() => + { + try + { + action?.Invoke(); + } + catch (Exception e) + { + this.ShowAlert(e, tipType); + } + }); + + } + #endregion + #region --------- 鎻愮ず妗嗭紝纭妗� -------- + /// <summary> + /// 瀵硅瘽妗�(鍙绋嬪簭鎶ラ敊鐨勬椂鍊欐墠鐢ㄥ埌) + /// </summary> + /// <paramref name="e"/>寮傚父瀵硅薄<paramref> + /// <paramref name="tipType"/>鏄惁瑕佹彁绀洪敊璇俊鎭�(榛樿鏄剧ず)<paramref> + private void ShowAlert(Exception e, TipType tipType) + { + + if (tipType != TipType.confirmation) + { + return; + } + Application.RunOnMainThread(() => + { + string msg = e.Message + "\r\n" + e.StackTrace; + Alert alert = new Alert("鎶辨瓑绋嬪簭鍑洪敊浜�.", "鎸塡"纭畾\"鑳借幏鍙栨洿璇︾粏鐨勯敊璇俊鎭�.", "鍙栨秷", "纭畾"); + alert.Show(); + alert.ResultEventHandler += (alerts, isBool) => + { + alert.Dismiss(); + if (isBool) + { + StackTraceLog stackTraceLog = new StackTraceLog(msg); + stackTraceLog.Show(); + } + }; + }); + } + /// <summary> + /// 淇℃伅鎻愮ず绐楀彛锛岃嚜鍔ㄥ叧闂� + /// </summary> + /// <param name="msg">鎻愮ず閿欒鏂囨湰</param> + public void ShowTip(string msg, int time = 2) + { + Application.RunOnMainThread(() => + { + new PublicAssmebly().TipMsgAutoClose(msg, false, time * 1000); + }); + } + + + #endregion + /// <summary> + /// 寮规绫诲瀷 + /// </summary> + public enum TipType + { + none,//鏃犳彁绀� + flicker,//闂儊妗� + confirmation//纭妗� + } + /// <summary> + /// 琛ㄧず鏉ヨ嚜閭d釜鐣岄潰 + /// </summary> + public enum Comerom + { + function,//鍔熻兘 + collect,//鏀惰棌 + room,//鎴块棿 + push,//鎺ㄩ�� + } + +#if __IOS__ + IosIHdlInterface ezsdkDelegate; + /// <summary> + /// 涓撻棬瀹氫箟缁橧os鍥炶皟鐢ㄧ潃,娌℃湁鐗规畩鍚箟 + /// </summary> + public class IosIHdlInterface : EZSDK.IOS.EZSDKDelegate + { + public Action<string> mAction; + public IosIHdlInterface() + { + + } + /// <summary> + /// + /// </summary> + /// <param name="p0">true鏄叆缃戞垚鍔�(婧愮敓鍥炶皟杩斿洖)</param> + /// <param name="p1">璁惧鐨勫簭鍒楀寲(婧愮敓鍥炶皟杩斿洖)</param> + public override void AddDeviceSuccessed(string deviceSerial) + { + mAction?.Invoke(deviceSerial); + } + } +#else + /// <summary> + /// 涓撻棬瀹氫箟缁欏畨鍗撳洖璋冪敤鐫�,娌℃湁鐗规畩鍚箟 + /// </summary> + public class AndroidIHdlInterface : Java.Lang.Object, IHdlInterface + { + + Action<bool,string> mAction; + public AndroidIHdlInterface(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); + } + + + } +#endif + + + } + + +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/ObjectClass.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/ObjectClass.cs new file mode 100644 index 0000000..f893ff1 --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/ObjectClass.cs @@ -0,0 +1,104 @@ +锘縰sing System; +using System.Collections.Generic; +using HDL_ON.Entity; + +namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock +{ + public class ObjectClass + { + + + } + /// <summary> + /// 鐢ㄦ埛淇℃伅(钀ょ煶瑙嗛闂ㄩ攣) + /// </summary> + public class UserVideoDoorLockInfo + { + /// <summary> + /// 鐢ㄦ埛id + /// </summary> + public string extUserId = string.Empty; + /// <summary> + /// 鐢ㄦ埛鍚嶇О + /// </summary> + public string extUserName = string.Empty; + + } + /// <summary> + /// 闂ㄩ攣鐘舵��(钀ょ煶瑙嗛闂ㄩ攣) + /// </summary> + public class VideoDoorLockInfo + { + /// <summary> + /// 閿佺姸鎬侊紙lock:閿侊紱unlock:瑙i攣锛� + /// </summary> + public string lockStatus = string.Empty; + /// <summary> + /// 闂ㄧ姸鎬侊紙open锛氬紑锛沜lose锛氬叧锛� + /// </summary> + public string doorStatus = string.Empty; + + } + + /// <summary> + /// 鐢垫睜璇︽儏(钀ょ煶瑙嗛闂ㄩ攣) + /// </summary> + public class CellInfo + { + /// <summary> + /// 鐢甸噺 + /// </summary> + public string remain = string.Empty; + /// <summary> + /// 鐢垫睜鍚嶇О + /// </summary> + public string name = string.Empty; + + } + /// <summary> + /// 鑾峰彇闂ㄩ攣鍒楄〃 + /// </summary> + public class DoorLockList + { + /// <summary> + /// 闂ㄩ攣璁惧鍒楄〃 + /// </summary> + public List<Function> list = new List<Function>(); + } + /// <summary> + /// 闂ㄩ攣鍨嬪彿鍒楄〃 + /// </summary> + public class LockModels { + /// <summary> + /// 鍨嬪彿鍒楄〃 + /// </summary> + public List<string> lockModels = new List<string>(); + } + /// <summary> + /// 鎺ㄩ�佸唴瀹瑰璞� + /// </summary> + public class ExpantContent + { + /// <summary> + /// 璁惧搴忓垪鍙� + /// </summary> + public string devSerial = string.Empty; + /// <summary> + /// 璁惧id + /// </summary> + public string deviceId = string.Empty; + /// <summary> + /// 涓嶇煡閬撴槸鍟� + /// </summary> + public string interphoneTypeEnum = string.Empty; + /// <summary> + /// 涓嶇煡閬撴槸鍟� + /// </summary> + public string subToken = string.Empty; + /// <summary> + /// 浜戦泙涓婂畾涔夌殑璁惧spk + /// </summary> + public string spk = string.Empty; + } + +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/StackTraceLog.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/StackTraceLog.cs new file mode 100644 index 0000000..05ad631 --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/StackTraceLog.cs @@ -0,0 +1,58 @@ +锘縰sing System; +using HDL_ON.UI.CSS; +using HDL_ON.UI.Music; +using Shared; + +namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock +{ + public class StackTraceLog + { + /// <summary> + /// 鍫嗗彔璺熻釜鏃ュ織 + /// </summary> + public string msg; + + public StackTraceLog(string msg) + { + this.msg = msg; + } + public void Show() + { + + Dialog dialog = new Dialog() + { + BackgroundColor = CSS_Color.textWhiteColor, + }; + dialog.Show(); + TopView topView = new TopView(); + topView.topNameBtn.Text="閿欒鏃ュ織淇℃伅"; + dialog.AddChidren(topView.TopFLayoutView()); + topView.clickBackBtn.MouseUpEventHandler += (sen, e) => + { + dialog.Close(); + }; + + var middleFl = new FrameLayout + { + Y = topView.fLayout.Bottom, + Height = Application.GetRealHeight(H_W.H - H_W.T_Height), + }; + dialog.AddChidren(middleFl); + + Button btnLogText = new Button + { + //TextSize = TextSize.Text14, + TextColor = MusicColor.Text18Color, + Width = Application.GetRealWidth(H_W.W - 16 - 16), + Height = middleFl.Height, + X = Application.GetRealWidth(16), + Text = this.msg, + TextAlignment = TextAlignment.TopLeft, + IsMoreLines = true, + }; + middleFl.AddChidren(btnLogText); + + + } + } +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs new file mode 100644 index 0000000..021f52d --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs @@ -0,0 +1,237 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Threading; +using HDL_ON.DAL.Server; +using HDL_ON.Entity; +using Shared; +using static HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod; + + +namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock +{ + /// <summary> + /// 钀ょ煶瑙嗛闂ㄩ攣鏁版嵁鍙戦�� + /// </summary> + public class VideDoorLockSend + { + + private static VideDoorLockSend send = null; + /// <summary> + /// 鑾峰彇褰撳墠鐨勫璞� + /// </summary> + public static VideDoorLockSend Current + { + get + { + if (send == null) + { + send = new VideDoorLockSend(); + } + + return send; + } + } + /// <summary> + /// 瑙g粦璁惧(钀ょ煶瑙嗛闂ㄩ攣) + /// </summary> + /// <param name="function">褰撳墠鐨勮澶�</param> + /// <param name="action">鍥炶皟缁撴灉</param> + /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param> + public void DelDevice(Function function, Action<bool> action, TipType tipType = TipType.flicker) + { + new Thread(() => + { + try + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("deviceSerial", function.sid);//绛夊悓闂ㄩ攣搴忓垪鍙� + d.Add("platform", 1);//骞冲彴 + var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_DeleteDevice, "鍒犻櫎钀ょ煶闂ㄩ攣璁惧"); + if (!this.DataChecking(responsePackNew, tipType)) + { + return; + } + + if (function != null) + { + action?.Invoke(true); + } + } + catch (Exception s) + { + } + }) + { IsBackground = true }.Start(); + + } + /// <summary> + /// 鑾峰彇闂ㄩ攣鐘舵��(钀ょ煶瑙嗛闂ㄩ攣) + /// </summary> + /// <param name="function">褰撳墠鐨勮澶�</param> + /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param> + /// <param name="return">杩斿洖缁撴灉涓嶄細涓簄ull</param> + public VideoDoorLockInfo GetVideoDoorLockState(Function function, TipType tipType = TipType.flicker) + { + + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("deviceId", function.deviceId); + var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_Lockstatus, "鑾峰彇钀ょ煶瑙嗛闂ㄩ攣鐘舵��"); + if (!this.DataChecking(responsePackNew,tipType)) + { + return new VideoDoorLockInfo(); + } + + var videoDoorLockInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<VideoDoorLockInfo>(responsePackNew.Data.ToString()); + if (videoDoorLockInfo == null) + { + return new VideoDoorLockInfo(); + } + return videoDoorLockInfo; + + + + } + /// <summary> + /// 鑾峰彇鐢垫睜鐢甸噺(钀ょ煶瑙嗛闂ㄩ攣) + /// </summary> + /// <param name="function">褰撳墠鐨勮澶�</param> + /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param> + /// <param name="return">杩斿洖缁撴灉涓嶄細涓簄ull</param> + public CellInfo GetCellValue(Function function, TipType tipType = TipType.flicker) + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("deviceId", function.deviceId); + var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_Details, "鑾峰彇钀ょ煶闂ㄩ攣璁惧鐢甸噺"); + if (!this.DataChecking(responsePackNew,tipType)) + { + return new CellInfo(); + } + var cellInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<CellInfo>(responsePackNew.Data.ToString()); + if (cellInfo == null) + { + return new CellInfo(); + } + + return cellInfo; + + } + /// <summary> + /// 鑾峰彇闂ㄩ攣鐢ㄦ埛鍒楄〃(钀ょ煶瑙嗛闂ㄩ攣) + /// </summary> + /// <param name="function">褰撳墠鐨勮澶�</param> + /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param> + /// <param name="return">杩斿洖缁撴灉涓嶄細涓簄ull</param> + public List<UserVideoDoorLockInfo> GetVideoDoorLockUserListInfo(Function function, TipType tipType = TipType.flicker) + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("deviceId", function.deviceId); + var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_UserList, "鑾峰彇钀ょ煶闂ㄩ攣鐢ㄦ埛鍒楄〃"); + if (!this.DataChecking(responsePackNew, tipType)) + { + return new List<UserVideoDoorLockInfo>(); + } + var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<UserVideoDoorLockInfo>>(responsePackNew.Data.ToString()); + if (list == null) + { + return new List<UserVideoDoorLockInfo>(); + } + return list; + } + /// <summary> + /// 鑾峰彇闂ㄩ攣璁惧鍒楄〃(钀ょ煶瑙嗛闂ㄩ攣) + /// </summary> + /// <param name="spk">鎸囧畾spk鑾峰彇</param> + /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param> + /// <returns>杩斿洖缁撴灉涓嶄細涓簄ull</returns> + public List<Function> GetVideoDoorLockDeviceList(string spk, TipType tipType = TipType.flicker) + { + + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("spk", spk); + var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_GetDevcieList, "鑾峰彇钀ょ煶闂ㄩ攣璁惧鍒楄〃"); + if (!this.DataChecking(responsePackNew, tipType)) + { + return new List<Function>(); + } + var doorLockList = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLockList>(responsePackNew.Data.ToString()); + if (doorLockList == null) + { + return new DoorLockList().list; + } + return doorLockList.list; + } + + /// <summary> + /// 鑾峰彇闂ㄩ攣鍨嬪彿鍒楄〃(钀ょ煶瑙嗛闂ㄩ攣) + /// </summary> + /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param> + /// <returns>杩斿洖缁撴灉涓嶄細涓簄ull</returns> + public List<string> GetVideoDoorLockLockModelsList(TipType tipType = TipType.flicker) + { + var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(new object { }, NewAPI.Api_Post_Lock_Models, "鑾峰彇钀ょ煶闂ㄩ攣鍨嬪彿鍒楄〃"); + if (!this.DataChecking(responsePackNew, tipType)) + { + return new List<string>(); + } + var lockModels = Newtonsoft.Json.JsonConvert.DeserializeObject<LockModels>(responsePackNew.Data.ToString()); + if (lockModels == null) + { + return new LockModels().lockModels; + } + return lockModels.lockModels; + } + + /// <summary> + /// 鍏堣幏鍙栬悿鐭充簯瀛愯处鍙穞oken + /// </summary> + /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param> + public string GetEZGetChildToken(TipType tipType = TipType.flicker) + { + //鍏堣幏鍙栬悿鐭充簯瀛愯处鍙穞oken + var responsePackNew = new HttpServerRequest().EZGetChildToken(); + if (!this.DataChecking(responsePackNew, tipType)) + { + return ""; + } + return responsePackNew.Data.ToString(); + } + /// <summary> + /// 妫�楠屾暟鎹洖澶嶆垚鍔熸垨鑰呭け璐� + /// </summary> + /// <param name="responsePackNew">鍥炲鏁版嵁瀵硅薄</param> + /// <param name="tipType">鏄惁闇�瑕佹彁绀�</param> + /// <returns></returns> + private bool DataChecking(ResponsePackNew responsePackNew, TipType tipType) + { + if (responsePackNew.Data == null || responsePackNew.Code != "0" || responsePackNew.Data.ToString() == "") + { + if (TipType.flicker == tipType) + { + if (responsePackNew == null) + { + responsePackNew = new ResponsePackNew { message = "娌″洖澶�,璇风‘璁ょ綉缁滄槸鍚︽甯�.", Code = "-1", }; + } + Application.RunOnMainThread(() => + { + //new Tip() + //{ + // CloseTime = 1, + // Text = responsePackNew.message + "(" + responsePackNew.Code + ")", + // Direction = AMPopTipDirection.None, + //}.Show(MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1)); + CommonMethod.Current.ShowTip(responsePackNew.message + "(" + responsePackNew.Code + ")"); + }); + } + return false; + } + return true; + } + + + } +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs new file mode 100644 index 0000000..11c271d --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs @@ -0,0 +1,222 @@ +锘縰sing Shared; +using HDL_ON.Stan; +using System; +using System.Collections.Generic; +using System.Text; +using HDL_ON.UI.CSS; +using HDL_ON.Entity; + +namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock +{ + /// <summary> + /// 瑙嗛闂ㄩ攣鍒楄〃鐣岄潰 + /// </summary> + public class VideoDoorLockListPage : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 闂ㄩ攣璁惧鍒楄〃 + /// </summary> + private List<Function> listDevice = new List<Function>(); + /// <summary> + /// 鐢垫睜鎺т欢鍒楄〃(key:璁惧鐨剆id) + /// </summary> + private Dictionary<string, BatteryPersentControl> dicBatteryContr = new Dictionary<string, BatteryPersentControl>(); + /// <summary> + /// 鍒楄〃鎺т欢 + /// </summary> + private VerticalListControl listView = null; + /// <summary> + /// 鍒犻櫎璁惧鍚庨渶瑕佹洿鏂扮晫闈㈢殑鍥炶皟 + /// </summary> + public Action action; + + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + public VideoDoorLockListPage(Action action) { + this.action = action; + } + + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_listDevice">闂ㄩ攣璁惧鍒楄〃</param> + public void ShowForm(List<Function> i_listDevice) + { + this.listDevice.AddRange(i_listDevice); + //鏅鸿兘闂ㄩ攣 + base.SetTitleText(Language.StringByID(StringId.shipinmensuo)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + string nowSelectId = string.Empty; + //妤煎眰涓嬫媺鍥炬爣 + var btnFloor = new NormalViewControl(500, Application.GetRealHeight(16), false); + var btnFloorIcon = new IconViewControl(16); + btnFloorIcon.X = HdlControlResourse.XXLeft; + btnFloorIcon.Y = Application.GetRealHeight(18); + btnFloorIcon.UnSelectedImagePath = "Public/DownIcon.png"; + bodyFrameLayout.AddChidren(btnFloorIcon); + btnFloorIcon.ButtonClickEvent += (sender, e) => + { + //鏄剧ず涓嬫媺鍒楄〃 + var form = new FloorRoomSelectPopupView(); + form.ShowDeviceFunctionView(btnFloor, this.listDevice, (selectId, listFunc) => + { + btnFloor.Width = btnFloor.GetRealWidthByText();//閲嶇疆鏂囨湰瀹藉害 + nowSelectId = selectId; + //閲嶆柊鍒濆鍖栭棬閿佸垪琛ㄦ帶浠� + this.InitDoorListControl(listFunc); + + }, nowSelectId); + }; + //妤煎眰 + btnFloor.X = btnFloorIcon.Right + Application.GetRealWidth(2); + btnFloor.TextColor = CSS_Color.FirstLevelTitleColor; + btnFloor.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnFloor.Text = DB_ResidenceData.Instance.CurFloor.roomName; + //btnFloor.Width = btnFloor.GetRealWidthByText(); + bodyFrameLayout.AddChidren(btnFloor); + //璁╁畠鐩稿鍥炬爣灞呬腑 + btnFloor.Y = btnFloorIcon.Y + (btnFloorIcon.Height - btnFloor.Height) / 2; + btnFloor.ButtonClickEvent += (sender, e) => + { + btnFloorIcon.ButtonClickEvent(null, null); + }; + + //鍒楄〃鎺т欢 + this.listView = new VerticalListControl(); + listView.Y = Application.GetRealHeight(53); + listView.Height = bodyFrameLayout.Height - Application.GetRealHeight(53); + bodyFrameLayout.AddChidren(listView); + + //鍒濆鍖栭棬閿佸垪琛ㄦ帶浠� + this.InitDoorListControl(this.listDevice); + } + + #endregion + + #region 鈻� 娣诲姞闂ㄩ攣鎺т欢_______________________ + + /// <summary> + /// 鍒濆鍖栭棬閿佸垪琛ㄦ帶浠� + /// </summary> + private void InitDoorListControl(List<Function> i_listDevice) + { + this.listView.RemoveAll(); + this.dicBatteryContr = new Dictionary<string, BatteryPersentControl>(); + + //鐢熸垚闂ㄩ攣鎺т欢 + foreach (var device in i_listDevice) + { + this.AddDoorControl(device); + } + } + + /// <summary> + /// 娣诲姞闂ㄩ攣鎺т欢 + /// </summary> + /// <param name="i_device">闂ㄩ攣瀵硅薄</param> + private void AddDoorControl(Function i_device) + { + //鐧借壊鑳屾櫙瀹瑰櫒 + var frameBack = new FrameLayoutStatuControl(); + frameBack.Width = Application.GetRealWidth(343); + frameBack.Height = Application.GetRealHeight(96); + frameBack.Radius = (uint)Application.GetRealWidth(12); + frameBack.Gravity = Gravity.CenterHorizontal; + frameBack.BackgroundColor = CSS_Color.MainBackgroundColor; + this.listView.AddChidren(frameBack); + //闂ㄩ攣鍥炬爣 + var btnIcon = new IconViewControl(32); + btnIcon.X = Application.GetRealWidth(10); + btnIcon.Y = Application.GetRealHeight(15); + btnIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/DoorLock.png"; + frameBack.AddChidren(btnIcon, ChidrenBindMode.BindEvent); + //璁惧鍚嶅瓧 + var btnName = new Button(); + btnName.X = btnIcon.Right + Application.GetRealWidth(12); + btnName.Y = Application.GetRealHeight(12); + btnName.Width = Application.GetRealWidth(150); + btnName.Height = Application.GetRealHeight(20); + btnName.TextColor = CSS_Color.FirstLevelTitleColor; + btnName.TextAlignment = TextAlignment.CenterLeft; + btnName.Text = i_device.name; + frameBack.AddChidren(btnName, ChidrenBindMode.BindEvent); + //鎴块棿 + var btnRoom = new Button(); + btnRoom.X = btnName.X; + btnRoom.Y = btnName.Bottom + Application.GetRealHeight(4); + btnRoom.Width = Application.GetRealWidth(150); + btnRoom.Height = Application.GetRealHeight(15); + btnRoom.TextColor = CSS_Color.PromptingColor1; + btnRoom.TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel; + btnRoom.TextAlignment = TextAlignment.CenterLeft; + btnRoom.Text = i_device.GetRoomListName(); + frameBack.AddChidren(btnRoom, ChidrenBindMode.BindEvent); + //鐢垫睜鍥炬爣 + var btnBattery = new BatteryPersentControl(); + btnBattery.Y = Application.GetRealHeight(62); + //frameBack.AddChidren(btnBattery, ChidrenBindMode.BindEvent); + btnBattery.InitControl(); + btnBattery.SetValue(80); + btnBattery.X = frameBack.Width - btnBattery.Width - Application.GetRealWidth(12); + this.dicBatteryContr[i_device.sid] = btnBattery; + frameBack.ButtonClickEvent += (sender, e) => + { + + var form = new VideoDoorLockPage(i_device, btnName, btnRoom, CommonMethod.Comerom.function,()=> { + this.CloseForm(); + this.action?.Invoke(); + }); + MainPage.BasePageView.AddChidren(form); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + form.Show(); + + }; + + //搴曢儴鍐嶅姞涓棿璺� + var frameSpace = new FrameLayout(); + frameSpace.Height = Application.GetRealHeight(12); + this.listView.AddChidren(frameSpace); + } + + #endregion + + + #region 鈻� 璁惧鐘舵�佹帹閫乢______________________ + + /// <summary> + /// 璁惧鐘舵�佹帹閫� + /// </summary> + /// <param name="i_LocalDevice"></param> + public override void DeviceStatuPush(Function i_LocalDevice) + { + //涓嶆槸鐩爣璁惧 + if (this.dicBatteryContr.ContainsKey(i_LocalDevice.sid) == false) + { + return; + } + + } + + #endregion + + + } +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs new file mode 100644 index 0000000..42919c2 --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs @@ -0,0 +1,540 @@ +锘縰sing Shared; +using System; +using System.Collections.Generic; +using System.Text; +using HDL_ON.UI.CSS; +using HDL_ON.Entity; +using HDL_ON.DriverLayer; +using HDL_ON.UI.Music; +using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; + +namespace HDL_ON.UI +{ + /// <summary> + /// 瑙嗛闂ㄩ攣鐨勬帶鍒剁晫闈� + /// </summary> + public class VideoDoorLockPage : FrameLayout + { + #region 鈻� 鍙橀噺澹版槑___________________________ + /// <summary> + /// 璁惧 + /// </summary> + private Function device; + /// <summary> + /// 涓婁竴绾х晫闈㈢殑璁惧鍚嶅瓧鎺т欢 + /// </summary> + private Button btnDeviceName; + /// <summary> + /// 涓婁竴绾х晫闈㈢殑鎴块棿鍚嶅瓧鎺т欢 + /// </summary> + private Button btnRoomName; + /// <summary> + /// 澶撮儴甯冨眬 + /// </summary> + private TopView topView; + /// <summary> + /// 褰撳墠璁惧鍚嶇О + /// </summary> + private Button btnCurrDeviceName; + /// <summary> + /// 鍖哄煙 + /// </summary> + private Button btnCurrDeviceRoom; + /// <summary> + /// 鐢甸噺鐖舵帶浠� + /// </summary> + private FrameLayout cellFrame; + /// <summary> + /// 鐢甸噺 + /// </summary> + private Button btnCell; + /// <summary> + /// 鐢甸噺杩涘害鏉� + /// </summary> + private DiyArcSeekBar cellDiyArcSeekBar; + /// <summary> + ///鏀惰棌鍥炬爣 + /// </summary> + private Button btnCollectIcon; + /// <summary> + /// 闂ㄩ攣鐘舵�� + /// </summary> + private Button btnDoorLockIcon; + /// <summary> + /// 瀹炴椂瑙嗛 + /// </summary> + private CustomFrameLayout rtvFL; + /// <summary> + /// 涓存椂瀵嗙爜 + /// </summary> + private CustomFrameLayout pswFL; + /// <summary> + /// 鍘嗗彶璁板綍 + /// </summary> + private CustomFrameLayout recordFL; + + /// <summary> + /// 琛ㄧず鏉ヨ嚜閭d釜鐣岄潰 + /// </summary> + private CommonMethod.Comerom comerom; + /// <summary> + /// 鍒犻櫎璁惧鍚庨渶瑕佹洿鏂扮晫闈㈢殑鍥炶皟 + /// </summary> + public Action action; + #endregion + + + /// <summary> + /// 鏋勯�犲嚱鏁� + /// </summary> + /// <param name="function">璁惧</param> + /// <param name="btnDeviceName">涓婁竴绾х晫闈㈢殑璁惧鍚嶅瓧鎺т欢(娉�:涓嶈兘浼爊ull,娌℃湁鍙互浼爊ew Button())</param> + /// <param name="btnRoomName">涓婁竴绾х晫闈㈢殑鎴块棿鍚嶅瓧鎺т欢(娉�:涓嶈兘浼爊ull,娌℃湁鍙互浼爊ew Button())</param> + public VideoDoorLockPage(Function function, Button btnDeviceName, Button btnRoomName, CommonMethod.Comerom comerom, Action action) + { + this.device = function; + this.btnDeviceName = btnDeviceName; + this.btnRoomName = btnRoomName; + this.comerom = comerom; + this.action = action; + + } + + public void Show() + { + //鍒濆鍖朥I + this.InitUI(); + //鍒濆鍖栦簨浠� + this.EventListener(); + //璇诲彇鏁版嵁 + this.ReadData(); + + } + + + /// <summary> + /// 鍒濆鍖栫晫闈� + /// </summary> + private void InitUI() + { + #region ---鐣岄潰甯冨眬--- + this.BackgroundColor = MusicColor.ViewColor; + this.topView = new TopView(); + this.topView.setBtn.Visible = true; + this.topView.topNameBtn.TextID = StringId.shipinmensuo; + this.AddChidren(topView.TopFLayoutView()); + var middleFl = new FrameLayout + { + Y = topView.fLayout.Bottom, + Height = Application.GetRealHeight(H_W.H - H_W.T_Height), + }; + this.AddChidren(middleFl); + + var whiteFl = new FrameLayout + { + Y = Application.GetRealHeight(24), + X = Application.GetRealWidth(24), + Height = Application.GetRealHeight(526), + Width = Application.GetRealWidth(327), + BackgroundImagePath = "MusicIcon/playBj.png", + Name = "fl", + }; + middleFl.AddChidren(whiteFl); + + btnCollectIcon = new Button + { + X = Application.GetRealWidth(264), + Y = Application.GetRealHeight(14), + Width = Application.GetRealWidth(40), + Height = Application.GetRealWidth(40), + UnSelectedImagePath = "MusicIcon/collect.png", + SelectedImagePath = "MusicIcon/collectSelected.png", + IsSelected = this.device.collect, + Name = "collect" + }; + whiteFl.AddChidren(btnCollectIcon); + + btnCurrDeviceName = new Button + { + TextSize = TextSize.Text24, + TextColor = MusicColor.Text18Color, + Width = Application.GetRealWidth(160), + Height = Application.GetRealHeight(33), + Y = Application.GetRealHeight(16), + X = Application.GetRealWidth(16), + Text = this.device.name, + TextAlignment = TextAlignment.CenterLeft, + }; + whiteFl.AddChidren(btnCurrDeviceName); + + + btnCurrDeviceRoom = new Button + { + TextSize = TextSize.Text12, + TextColor = MusicColor.MusicNoTxetColor, + Width = Application.GetRealWidth(160), + Height = Application.GetRealHeight(17), + Y = btnCurrDeviceName.Bottom + Application.GetRealHeight(4), + X = Application.GetRealWidth(16), + Text = this.device.GetRoomListName(), + TextAlignment = TextAlignment.CenterLeft, + }; + whiteFl.AddChidren(btnCurrDeviceRoom); + + cellFrame = new FrameLayout + { + X = btnCurrDeviceRoom.Right + Application.GetRealWidth(20), + Y = btnCurrDeviceName.Bottom + Application.GetRealHeight(5), + Width = Application.GetRealWidth(30), + Height = Application.GetRealHeight(16), + }; + whiteFl.AddChidren(cellFrame); + + cellDiyArcSeekBar = new DiyArcSeekBar + { + X = Application.GetRealWidth(3), + Y = Application.GetRealHeight(3), + Width = cellFrame.Width + Application.GetRealWidth(-6), + Height = cellFrame.Height + Application.GetRealHeight(-6), + Progress = 60, + ProgressBarColor = MusicColor.MusicNoTxetColor, + MaxValue = 100, + MinValue = 0, + + //IsCanMove = false, + //IsCanScrolled=false, + }; + //cellFrame.AddChidren(cellDiyArcSeekBar); + + btnCell = new Button + { + TextSize = TextSize.Text10, + TextColor = MusicColor.TextColor, + Text = "60" + "%", + TextAlignment = TextAlignment.Center, + UnSelectedImagePath = "FunctionIcon/DoorLock/Cell.png", + }; + cellFrame.AddChidren(btnCell); + + + //闂ㄩ攣鐘舵�� + btnDoorLockIcon = new Button + { + X = Application.GetRealWidth(65), + Y = Application.GetRealHeight(108), + Width = Application.GetRealWidth(198), + Height = Application.GetRealWidth(200), + UnSelectedImagePath = "FunctionIcon/DoorLock/UnLocked.png", + SelectedImagePath = "FunctionIcon/DoorLock/UnLocking.png", + }; + whiteFl.AddChidren(btnDoorLockIcon); + + this.CalculatedPosition();//閲嶆柊璁$畻瀹藉害 + + int heightY = btnDoorLockIcon.Bottom + Application.GetRealHeight(70); + //瀹炴椂瑙嗛 + rtvFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); + whiteFl.AddChidren(rtvFL); + rtvFL.Y = heightY; + rtvFL.X = Application.GetRealWidth(41); + rtvFL.AddImageView(); + rtvFL.AddTextButtonView(); + rtvFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/RTV.png"; + rtvFL.GetTextButton().TextID = StringId.shishishipin; + //鍘嗗彶璁板綍 + recordFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); + whiteFl.AddChidren(recordFL); + recordFL.Y = heightY; + recordFL.X = rtvFL.Right + Application.GetRealWidth(CustomFrameLayout.interval); + recordFL.AddImageView(); + recordFL.AddTextButtonView(); + recordFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/HistoryList.png"; + recordFL.GetTextButton().TextID = StringId.lishijilu; + //涓存椂瀵嗙爜 + pswFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); + whiteFl.AddChidren(pswFL); + pswFL.Y = heightY; + pswFL.X = recordFL.Right + Application.GetRealWidth(CustomFrameLayout.interval); + pswFL.AddImageView(); + pswFL.AddTextButtonView(); + pswFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/OneOpenLock.png"; + pswFL.GetTextButton().TextID = StringId.linshimima1; + + + + #endregion + + + } + /// <summary> + /// 娉ㄥ唽浜嬩欢 + /// </summary> + private void EventListener() + { + //杩斿洖 + this.topView.clickBackBtn.MouseUpEventHandler += (sender, e) => + { + this.RemoveFromParent(); + }; + //璁剧疆 + this.topView.clickSetBtn.MouseUpEventHandler += (sender, e) => + { + CommonMethod.Current.MainThread(() => + { + //璋冪敤绉�缁曠殑鐣岄潰 + var infoView = new UI.FunctionBaseInfoSetPage(this.device, () => + { + if (this.btnDeviceName == null || this.btnRoomName == null || this.device == null) + { + return; + } + ////鍒锋柊鏄剧ず + this.btnDeviceName.Text = this.device.name; + this.btnRoomName.Text = this.device.GetRoomListName(); + this.btnCurrDeviceName.Text = this.device.name; + this.btnCurrDeviceRoom.Text = this.device.GetRoomListName(); + this.CalculatedPosition();//閲嶆柊璁$畻瀹藉害 + + }); + infoView.actionDel += () => + { + //瑙g粦璁惧鍚� + this.RemoveFromParent(); + this.action?.Invoke(); + + }; + MainPage.BasePageView.AddChidren(infoView); + infoView.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }); + }; + //鏀惰棌 + this.btnCollectIcon.MouseUpEventHandler += (sender, e) => + { + btnCollectIcon.IsSelected = this.device.collect = !btnCollectIcon.IsSelected; + this.device.CollectFunction(); + }; + //瀹炴椂瑙嗛 + this.rtvFL.SetClickListener((fl, btnStateImage, btnStateText) => + { + CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk, false); + }); + //涓存椂瀵嗙爜 + this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => + { + CommonMethod.Current.SkipPSWActivity(this.device.deviceId); + }); + //鍘嗗彶璁板綍 + this.recordFL.SetClickListener((fl, btnStateImage, btnStateText) => + { + CommonMethod.Current.SkipRecordActivity(this.device.deviceId); + }); + + + } + /// <summary> + /// 鍒濆鏁版嵁 + /// </summary> + private void ReadData() + { + CommonMethod.Current.Loading.Start(); + CommonMethod.Current.SunThread(() => + { + try + { + var videoDoorLockInfo = VideDoorLockSend.Current.GetVideoDoorLockState(this.device); + var cellInfo = VideDoorLockSend.Current.GetCellValue(this.device); + CommonMethod.Current.MainThread(() => + { + //this.cellDiyArcSeekBar.Progress = i; + //鏇存柊鐢甸噺鍊� + this.btnCell.Text = cellInfo.remain + "%"; + this.btnDoorLockIcon.IsSelected = videoDoorLockInfo.doorStatus == "open"; + }); + } + catch { } + finally + { + Application.RunOnMainThread(() => + { + CommonMethod.Current.Loading.Hide(); + }); + } + }); + } + + + + /// <summary> + /// 閲嶆柊璁$畻瀹藉害(璁惧鍚嶇О,鎴块棿鎺т欢) + /// </summary> + private void CalculatedPosition() + { + this.btnCurrDeviceName.Width = this.btnCurrDeviceName.GetTextWidth(); + if (this.btnCurrDeviceName.GetTextWidth() > this.btnCollectIcon.X) + { + //閲嶆柊璁$畻瀹藉害 + this.btnCurrDeviceName.Width = this.btnCollectIcon.X + Application.GetRealWidth(-10); + } + this.btnCurrDeviceRoom.Width = this.btnCurrDeviceRoom.GetTextWidth(); + if (this.btnCurrDeviceRoom.GetTextWidth() > this.btnCollectIcon.X) + { + //閲嶆柊璁$畻瀹藉害 + this.btnCurrDeviceRoom.Width = this.btnCollectIcon.X + Application.GetRealWidth(-20 - 10); + } + this.cellFrame.X = this.btnCurrDeviceRoom.Right + Application.GetRealWidth(20); + } + + /// <summary> + /// 鏇存柊鐘舵�� + /// </summary> + public void UpdateState(PushMessageType pushMessageType) + { + CommonMethod.Current.MainThread(() => + { + if (pushMessageType == PushMessageType.Alarm) + { + //闂ㄩ攣鐢垫睜鍊� + if (this.btnCell != null) + { + //videoDoorLockPage.btnCell.Text = ""; + } + } + else + { + if (this.btnDoorLockIcon != null && !this.btnDoorLockIcon.IsSelected) + { + this.btnDoorLockIcon.IsSelected = false; + } + } + + }); + + } + + } + /// <summary> + /// 鑷繁寮勪竴涓狥rameLayout + /// </summary> + class CustomFrameLayout : FrameLayout + { + public const int widthFrameLayout = 48; + public const int heightFrameLayout = 53; + public const int yFrameLayout = 378; + public const int xFrameLayout = 41; + public const int interval = 51;//琛屼腑鐨勫垪闂撮殧鍊� + + public CustomFrameLayout(int width, int height, int x = 0, int y = 0) + { + this.Width = Application.GetRealWidth(width); + this.Height = Application.GetRealHeight(height); + this.X = Application.GetRealWidth(x); + this.Y = Application.GetRealHeight(y); + + } + Button btnStateImage = new Button + { + Width = Application.GetRealWidth(32), + Height = Application.GetRealWidth(32), + Gravity = Gravity.TopCenter, + Name = "btnStateImage", + + }; + Button btnStateText = new Button + { + Y = Application.GetRealHeight(4), + Width = Application.GetRealWidth(100), + Height = Application.GetRealWidth(20), + TextID = StringId.dangqianmenweiguan, + TextSize = TextSize.Text12, + TextColor = MusicColor.TextCancelColor, + TextAlignment = TextAlignment.Center, + Gravity = Gravity.CenterHorizontal, + Name = "btnStateText" + }; + public void AddImageView() + { + this.AddChidren(btnStateImage); + + } + public void AddTextButtonView() + { + btnStateText.Y += btnStateImage.Bottom; + this.AddChidren(btnStateText); + } + public Button GetImageButton() + { + //if (!this.AddWithout(this.btnStateImage)) + //{ + // this.AddImageView(); + //} + return this.btnStateImage; + } + public Button GetTextButton() + { + //if (!this.AddWithout(this.btnStateText)) + //{ + // this.AddTextButtonView(); + //} + return this.btnStateText; + } + + /// <summary> + /// 浜嬩欢鐩戝惉鏂规硶 + /// </summary> + /// <param name="action">鍥炶皟(绗竴涓槸鐖剁被瀵硅薄;绗簩涓槸鍥炬爣瀵硅薄;绗笁涓槸鐘舵�佸璞�</param> + /// <param name="button1">娉ㄦ剰:鍦⊿etClickListener()鍓嶉潰璋冪敤AddImageView()鎵嶆湁鏁�</param> + /// <param name="button2">娉ㄦ剰:鍦⊿etClickListener()鍓嶉潰璋冪敤AddImageView()鎵嶆湁鏁�</param> + public void SetClickListener(Action<FrameLayout, Button, Button> action) + { + EventHandler<MouseEventArgs> click = (sender, e) => + { + action?.Invoke(this, btnStateImage, btnStateText); + }; + this.MouseUpEventHandler += click; + btnStateImage.MouseUpEventHandler += click; + btnStateText.MouseUpEventHandler += click; + + } + + + + /// <summary> + /// 鍦ㄧ埗甯冨眬鏌ユ壘瀛愭帶浠舵槸鍚﹀瓨鍦� + /// </summary> + /// <param name="btn">鏌ユ壘瀵硅薄</param> + /// <returns>瀛樺湪涓簍rue,鍚﹀垯涓篺alse</returns> + private bool AddWithout(View btn) + { + + if (this.ChildrenCount <= 0 || btn == null) + { + return false; + } + for (int i = 0; i < this.ChildrenCount; i++) + { + View view = this.GetChildren(i); + if (view == null) + { + continue; + } + if (view is Button) + { + if (view.Name == btn.Name) + { + return true; + } + } + + } + return false; + + } + + + + + } + + +} diff --git a/HDL_ON/UI/UI2/UserPage.cs b/HDL_ON/UI/UI2/UserPage.cs index 6a3074f..b2fd6b5 100644 --- a/HDL_ON/UI/UI2/UserPage.cs +++ b/HDL_ON/UI/UI2/UserPage.cs @@ -485,9 +485,10 @@ { btnNavigationSelectionIcon.SetRotation(0f); ContextView.RemoveAll(); - var classificaitionView = new ClassificationPage(); + var classificaitionView = new ClassificationPage(); ContextView.AddChidren(classificaitionView); classificaitionView.LoadPage(); + }); }) { IsBackground = true, Priority = System.Threading.ThreadPriority.Lowest }.Start(); -- Gitblit v1.8.0