From 666b28d77fc3c1b1dae61c9dfd878c8e683cef8c Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 21 四月 2023 13:37:19 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/wjc' into Dev-Branch --- HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/FunTypeView.cs | 4 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen1.png | 0 HDL-ON_Android/Assets/Language.ini | 10 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 104 ++++++- HDL-ON_iOS/HDL-ON_iOS.csproj | 10 HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 147 +++++++--- HDL-ON_iOS/LaunchScreen.storyboard | 2 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorlockClose1.png | 0 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs | 13 HDL-ON_iOS/AppDelegate.cs | 36 ++ HDL-ON_Android/HDL-ON_Android.csproj | 4 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs | 1 HDL-ON_Android/SplashActivity.cs | 23 - HDL-ON_iOS/Info.plist | 174 ++++++------ HDL-ON_iOS/Resources/Language.ini | 10 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorlockClose1.png | 0 HDL_ON/Common/HDLCommon.cs | 3 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 6 HDL-ON_Android/Resources/Resource.designer.cs | 2 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen1.png | 0 HDL-ON_Android/Application.cs | 4 HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs | 77 +++++ HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs | 37 ++ ys/Jars/hdl_ezvizsdk.aar | 0 DLL/IOS/EZSDK.IOS.dll | 0 HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | 4 /dev/null | 0 HDL_ON/Entity/Function/Function.cs | 16 + HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 25 + HDL_ON/Common/R.cs | 4 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs | 16 + HDL-ON_Android/Other/JPush/JPushReceiver.cs | 18 + 32 files changed, 532 insertions(+), 218 deletions(-) diff --git a/DLL/IOS/EZSDK.IOS.dll b/DLL/IOS/EZSDK.IOS.dll index e3e147e..09be55e 100644 --- a/DLL/IOS/EZSDK.IOS.dll +++ b/DLL/IOS/EZSDK.IOS.dll Binary files differ diff --git a/HDL-ON_Android/Application.cs b/HDL-ON_Android/Application.cs index 3805c35..c5b0a2c 100644 --- a/HDL-ON_Android/Application.cs +++ b/HDL-ON_Android/Application.cs @@ -38,6 +38,10 @@ public Application(IntPtr handle, Android.Runtime.JniHandleOwnership ownerShip) : base(handle, ownerShip) { } public override void OnCreate() { + + + + if (Shared.Application.Activity != null) { //reStartApp(this); diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index d683e18..04445d1 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -1152,7 +1152,7 @@ 8508=History 8509=Fluorite video door lock 8510=Call from the doorbell -8511=User Education +8511=Door opener 8512=Serial number 8513=Model @@ -2430,7 +2430,7 @@ 8508=鍘嗗彶璁板綍 8509=钀ょ煶瑙嗛闂ㄩ攣 8510=鏉ヨ嚜鈥滈棬閾冣�濆懠鍙� -8511=鐢ㄦ埛浜哄憳 +8511=寮�闂ㄤ汉鍛� 8512=搴忓垪鍙� 8513=鍨嬪彿 @@ -3700,7 +3700,7 @@ 8508=History 8509=Fluorite video door lock 8510=Call from the doorbell -8511=User Education +8511=Door opener 8512=Serial number 8513=Model @@ -4966,7 +4966,7 @@ 8508=History 8509=Fluorite video door lock 8510=Call from the doorbell -8511=User Education +8511=Door opener 8512=Serial number 8513=Model @@ -6232,7 +6232,7 @@ 8508=History 8509=Fluorite video door lock 8510=Call from the doorbell -8511=User Education +8511=Door opener 8512=Serial number 8513=Model diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen1.png similarity index 100% rename from HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen.png rename to HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen1.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 deleted file mode 100644 index e4d40fb..0000000 --- a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorlockClose.png +++ /dev/null Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockClose.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorlockClose1.png similarity index 100% rename from HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorLockClose.png rename to HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorlockClose1.png Binary files differ diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj index 9ef0e2b..2d7ca0c 100644 --- a/HDL-ON_Android/HDL-ON_Android.csproj +++ b/HDL-ON_Android/HDL-ON_Android.csproj @@ -416,12 +416,12 @@ <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" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorlockClose1.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorLockOpen1.png" /> </ItemGroup> <ItemGroup> <AndroidResource Include="Resources\values\colors.xml" /> diff --git a/HDL-ON_Android/Other/JPush/JPushReceiver.cs b/HDL-ON_Android/Other/JPush/JPushReceiver.cs index e7cfbd3..fdd0833 100644 --- a/HDL-ON_Android/Other/JPush/JPushReceiver.cs +++ b/HDL-ON_Android/Other/JPush/JPushReceiver.cs @@ -34,6 +34,8 @@ /// <param name="notificationMessage"></param> public override void OnNotifyMessageOpened(Context context, NotificationMessage notificationMessage) { + + //2020-12-23 瑙e喅鐐瑰嚮閫氱煡鏍忔墦寮�涓嶄簡APP闂 //base.OnNotifyMessageOpened(context, notificationMessage); OpenNotification(context, notificationMessage); @@ -146,9 +148,18 @@ Utlis.WriteLine("PushMes extras : " + pushMes.Extras); Utlis.WriteLine("PushMes HomeId : " + pushMes.HomeId); - Intent i = new Intent(context, typeof(BaseActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class); - i.SetFlags(ActivityFlags.NewTask); - context.StartActivity(i); + if (Shared.Application.Activity==null) + { + Intent i = new Intent(context, typeof(SplashActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class); + i.SetFlags(ActivityFlags.NewTask); + context.StartActivity(i); + } + else + { + Intent i = new Intent(context, typeof(BaseActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class); + i.SetFlags(ActivityFlags.NewTask); + context.StartActivity(i); + } //瑙f瀽msg AdjustPushMessage(pushMes); } @@ -160,7 +171,6 @@ public static void AdjustPushMessage(JPushMessageInfo pushMes) { - new System.Threading.Thread(new System.Threading.ThreadStart(() => { while (MainPage.BasePageView == null) diff --git a/HDL-ON_Android/Resources/Resource.designer.cs b/HDL-ON_Android/Resources/Resource.designer.cs index 67dd43b..e2cf986 100644 --- a/HDL-ON_Android/Resources/Resource.designer.cs +++ b/HDL-ON_Android/Resources/Resource.designer.cs @@ -14,7 +14,7 @@ { - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.2.8.165")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] public partial class Resource { diff --git a/HDL-ON_Android/SplashActivity.cs b/HDL-ON_Android/SplashActivity.cs index 7def421..1fbe7c2 100644 --- a/HDL-ON_Android/SplashActivity.cs +++ b/HDL-ON_Android/SplashActivity.cs @@ -16,7 +16,7 @@ namespace HDL_ON_Android { - [Activity(Theme = "@style/SplashTheme", MainLauncher = true, Name = "com.hdl.onpro.SplashActivity",ScreenOrientation = ScreenOrientation.Portrait) ] + [Activity(Theme = "@style/SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTask, Name = "com.hdl.onpro.SplashActivity", ScreenOrientation = ScreenOrientation.Portrait)] [IntentFilter(new string[] { "com.hdl.onpro.SplashActivity", Intent.ActionView })] public class SplashActivity : Activity { @@ -46,21 +46,16 @@ { base.OnCreate(savedInstanceState); - - //Intent i = new Intent(this, typeof(BaseActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class); //StartActivityForResult(i, 1); //OverridePendingTransition(0, 0); //initAll(); - - - if (HDL_ON.OnAppConfig.Instance.FirstRunApp || !HDL_ON.OnAppConfig.Instance.isAgreePrivacyPolicy) { Language.CurrentLanguage = "Chinese"; Locale locale1 = Locale.Default; var localeList = Resources.Configuration.Locale; - Console.WriteLine("褰撳墠璇█缂╁啓:"+localeList.Language); + Console.WriteLine("褰撳墠璇█缂╁啓:" + localeList.Language); if (localeList.Language == "zh") { Language.CurrentLanguage = "Chinese"; @@ -83,7 +78,7 @@ } Intent intent = new Intent(this, typeof(AgreementActivity)); - StartActivityForResult(intent,99); + StartActivityForResult(intent, 99); } else { @@ -95,7 +90,6 @@ initOhterSdk(); Finish();//鍏抽棴鑷繁 } - } void initOhterSdk() @@ -170,12 +164,12 @@ Language.CurrentLanguage = "Chinese"; Locale locale1 = Locale.Default; var localeList = Resources.Configuration.Locale; - Console.WriteLine("褰撳墠璇█缂栧彿"+ localeList.Language); + Console.WriteLine("褰撳墠璇█缂栧彿" + localeList.Language); if (localeList.Language == "zh") { Language.CurrentLanguage = "Chinese"; } - else if(localeList.Language == "es") + else if (localeList.Language == "es") { Language.CurrentLanguage = "Spanish"; } @@ -207,7 +201,7 @@ //} //else //{ - //Console.WriteLine("HHH 缃戠粶鍙樺寲浣嗗浜庡悗鍙�"+internetStatus); + //Console.WriteLine("HHH 缃戠粶鍙樺寲浣嗗浜庡悗鍙�"+internetStatus); //} //缃戠粶鍙樺寲澶勭悊 @@ -333,7 +327,7 @@ } public static bool IsShowTip = true; - + void checkSomeInfo() { try @@ -390,9 +384,8 @@ return false; } + } - - } \ No newline at end of file diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs index af7af24..22ddcd3 100644 --- a/HDL-ON_iOS/AppDelegate.cs +++ b/HDL-ON_iOS/AppDelegate.cs @@ -262,7 +262,7 @@ { Language.CurrentLanguage = "russian"; } - else if (NSLocale.PreferredLanguages[0].Contains( "bul")) + else if (NSLocale.PreferredLanguages[0].Contains("bul")) { Language.CurrentLanguage = "斜褗谢谐邪褉褋泻懈"; } @@ -327,10 +327,11 @@ return true; } - /// <summary> - /// 澶勭悊閫氱煡娑堟伅 - /// </summary> - void HandleNotificationMessageUserInfo(NSDictionary userInfo, bool bFinishedLaunching) + + /// <summary> + /// 澶勭悊閫氱煡娑堟伅 + /// </summary> + void HandleNotificationMessageUserInfo(NSDictionary userInfo, bool bFinishedLaunching) { try { @@ -397,7 +398,7 @@ UserInfo.Current.pushMessageInfo = pushMes; UserInfo.Current.inCall = DateTime.Now; } - + if (bFinishedLaunching) { if (pushMes.Extras != null) @@ -413,13 +414,15 @@ } else { - HDLCommon.Current.AdjustPushMessage(pushMes); + //HDLCommon.Current.AdjustPushMessage(pushMes); + this.CommonAdjustPushMessage(pushMes);//2023骞�04鏈�13鏃�15:55:54 淇敼 } } } else { - HDLCommon.Current.AdjustPushMessage(pushMes); + //HDLCommon.Current.AdjustPushMessage(pushMes); + this.CommonAdjustPushMessage(pushMes); } } @@ -500,6 +503,23 @@ } + public void CommonAdjustPushMessage(JPushMessageInfo pushMes) + { + new System.Threading.Thread(new System.Threading.ThreadStart(() => + { + while (MainPage.BasePageView == null) + { + System.Threading.Thread.Sleep(300); + } + Shared.Application.RunOnMainThread(() => + { + HDLCommon.Current.AdjustPushMessage(pushMes); + }); + })).Start(); + + } + + } } diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index 8958497..512d689 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -142,11 +142,11 @@ <PackageReference Include="Xamarin.Essentials"> <Version>1.7.0</Version> </PackageReference> - <PackageReference Include="Xamarin.iOS.SwiftRuntimeSupport"> - <Version>0.2.1</Version> - </PackageReference> <PackageReference Include="Xamarin.iOS.MJRefresh"> <Version>3.2.2</Version> + </PackageReference> + <PackageReference Include="Xamarin.iOS.SwiftRuntimeSupport"> + <Version>0.2.1</Version> </PackageReference> </ItemGroup> <ItemGroup> @@ -1577,8 +1577,8 @@ <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UnLockPictrue2.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UnLockPictrue3.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\securitydoorezviz.png" /> - <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\VideoDoorLockOpen.png" /> - <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\VideoDoorlockClose.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\VideoDoorlockClose1.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\VideoDoorLockOpen1.png" /> </ItemGroup> <ItemGroup> <ITunesArtwork Include="iTunesArtwork" /> diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist index d47619a..b285c37 100644 --- a/HDL-ON_iOS/Info.plist +++ b/HDL-ON_iOS/Info.plist @@ -2,6 +2,16 @@ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> + <key>CFBundleAllowMixedLocalizations</key> + <true/> + <key>CFBundleDisplayName</key> + <string>On Pro</string> + <key>CFBundleIdentifier</key> + <string>com.hdl.onpro</string> + <key>CFBundleName</key> + <string>On Pro</string> + <key>CFBundleShortVersionString</key> + <string>1.6.602303301</string> <key>CFBundleURLTypes</key> <array> <dict> @@ -13,20 +23,36 @@ <string>AispeechMobile</string> </dict> <dict> + <key>CFBundleTypeRole</key> + <string>Editor</string> <key>CFBundleURLSchemes</key> <array> <string>hdlonpro</string> </array> - <key>CFBundleTypeRole</key> - <string>Editor</string> </dict> <dict> <key>CFBundleURLName</key> <string>qqmusic</string> </dict> </array> + <key>CFBundleVersion</key> + <string>1.6.603301</string> + <key>LSApplicationQueriesSchemes</key> + <array> + <string>weixinULAPI</string> + <string>weixin</string> + <string>xiaoduapp</string> + <string>AispeechMobile</string> + <string>qqmusic</string> + </array> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>MinimumOSVersion</key> + <string>12.2</string> <key>NSAppTransportSecurity</key> <dict> + <key>NSAllowsArbitraryLoads</key> + <true/> <key>NSExceptionDomains</key> <dict> <key>NSExceptionDomains</key> @@ -34,15 +60,52 @@ <key>NSExceptionMinimumTLSVersion</key> <string>TLSv1.0</string> </dict> - <key>NSAllowsArbitraryLoads</key> - <true/> </dict> - <key>CFBundleIdentifier</key> - <string>com.hdl.onpro</string> - <key>LSRequiresIPhoneOS</key> - <true/> - <key>MinimumOSVersion</key> - <string>13.0</string> + <key>NSAppleMusicUsageDescription</key> + <string>App needs to access your music library to connect to an external player to play music.</string> + <key>NSBluetoothAlwaysUsageDescription</key> + <string>This application uses Bluetooth to communicate with the device, this application does not collect, store or record any data that communicates via Bluetooth.</string> + <key>NSBluetoothPeripheralUsageDescription</key> + <string>This application uses Bluetooth to communicate with the device, this application does not collect, store or record any data that communicates via Bluetooth.</string> + <key>NSCameraUsageDescription</key> + <string>App wants to access your camera to set the background picture of the room</string> + <key>NSContactsUsageDescription</key> + <string>LC Video will be use</string> + <key>NSFaceIDUsageDescription</key> + <string>Need to use Face ID for unlock verification</string> + <key>NSLocalNetworkUsageDescription</key> + <string>APP wants to use local network access permissions for WiFi distribution.</string> + <key>NSLocationAlwaysAndWhenInUseUsageDescription</key> + <string>LC Video will be use</string> + <key>NSLocationAlwaysUsageDescription</key> + <string>Use geographic location to provide services such as weather</string> + <key>NSLocationWhenInUseUsageDescription</key> + <string>EZ video will be use</string> + <key>NSMicrophoneUsageDescription</key> + <string>APP wants to use the phone's microphone for voice intercom</string> + <key>NSPhotoLibraryAddUsageDescription</key> + <string>App wants to access your photo library to set the background image of the room</string> + <key>NSPhotoLibraryUsageDescription</key> + <string>App wants to access your photo library to set the background image of the room</string> + <key>NSSiriUsageDescription</key> + <string>On Pro data will be send to Siri.</string> + <key>NSUserActivityTypes</key> + <array> + <string>HDLRunSceneIntent</string> + </array> + <key>NSVoIPUsageDescription</key> + <string>Make audio/video calls</string> + <key>UIAppFonts</key> + <array> + <string>titilliumtext25l005.otf</string> + </array> + <key>UIBackgroundModes</key> + <array> + <string>audio</string> + <string>location</string> + <string>voip</string> + <string>remote-notification</string> + </array> <key>UIDeviceFamily</key> <array> <integer>1</integer> @@ -53,30 +116,8 @@ </array> <key>UIRequiresFullScreen</key> <true/> - <key>NSCameraUsageDescription</key> - <string>App wants to access your camera to set the background picture of the room</string> - <key>NSPhotoLibraryUsageDescription</key> - <string>App wants to access your photo library to set the background image of the room</string> - <key>NSPhotoLibraryAddUsageDescription</key> - <string>App wants to access your photo library to set the background image of the room</string> - <key>NSMicrophoneUsageDescription</key> - <string>APP wants to use the phone's microphone for voice intercom</string> - <key>NSLocalNetworkUsageDescription</key> - <string>APP wants to use local network access permissions for WiFi distribution.</string> - <key>UISupportedInterfaceOrientations</key> - <array> - <string>UIInterfaceOrientationPortrait</string> - <string>UIInterfaceOrientationLandscapeRight</string> - <string>UIInterfaceOrientationLandscapeLeft</string> - </array> - <key>UIAppFonts</key> - <array> - <string>titilliumtext25l005.otf</string> - </array> - <key>UISupportedInterfaceOrientations~ipad</key> - <array> - <string>UIInterfaceOrientationPortrait</string> - </array> + <key>UIStatusBarStyle</key> + <string>UIStatusBarStyleLightContent</string> <key>UIStatusBarTintParameters</key> <dict> <key>UINavigationBar</key> @@ -87,62 +128,21 @@ <false/> </dict> </dict> + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationLandscapeRight</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + </array> + <key>UISupportedInterfaceOrientations~ipad</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + </array> <key>UIViewControllerBasedStatusBarAppearance</key> <false/> - <key>CFBundleName</key> - <string>On Pro</string> <key>XSAppIconAssets</key> <string>Assets.xcassets/AppIcon.appiconset</string> - <key>CFBundleDisplayName</key> - <string>On Pro</string> - <key>UIStatusBarStyle</key> - <string>UIStatusBarStyleLightContent</string> - <key>CFBundleShortVersionString</key> - <string>1.7.1</string> - <key>CFBundleVersion</key> - <string>1.7.1</string> - <key>NSAppleMusicUsageDescription</key> - <string>App needs to access your music library to connect to an external player to play music.</string> - <key>NSLocationAlwaysUsageDescription</key> - <string>Use geographic location to provide services such as weather</string> - <key>LSApplicationQueriesSchemes</key> - <array> - <string>weixinULAPI</string> - <string>weixin</string> - <string>xiaoduapp</string> - <string>AispeechMobile</string> - <string>qqmusic</string> - </array> - <key>UIBackgroundModes</key> - <array> - <string>audio</string> - <string>location</string> - <string>voip</string> - <string>remote-notification</string> - </array> - <key>NSFaceIDUsageDescription</key> - <string>Need to use Face ID for unlock verification</string> - <key>CFBundleAllowMixedLocalizations</key> - <true/> - <key>NSBluetoothPeripheralUsageDescription</key> - <string>This application uses Bluetooth to communicate with the device, this application does not collect, store or record any data that communicates via Bluetooth.</string> - <key>NSBluetoothAlwaysUsageDescription</key> - <string>This application uses Bluetooth to communicate with the device, this application does not collect, store or record any data that communicates via Bluetooth.</string> - <key>NSVoIPUsageDescription</key> - <string>Make audio/video calls</string> - <key>NSSiriUsageDescription</key> - <string>On Pro data will be send to Siri.</string> - <key>NSUserActivityTypes</key> - <array> - <string>HDLRunSceneIntent</string> - </array> - <key>NSContactsUsageDescription</key> - <string>LC Video will be use</string> - <key>NSLocationAlwaysAndWhenInUseUsageDescription</key> - <string>LC Video will be use</string> - <key>NSLocationWhenInUseUsageDescription</key> - <string>EZ video will be use</string> - <key>XSLaunchImageAssets</key> - <string>Assets.xcassets/LaunchImage.launchimage</string> + <key>UILaunchStoryboardName</key> + <string>LaunchScreen</string> </dict> </plist> diff --git a/HDL-ON_iOS/LaunchScreen.storyboard b/HDL-ON_iOS/LaunchScreen.storyboard index 888a9ea..424fa26 100644 --- a/HDL-ON_iOS/LaunchScreen.storyboard +++ b/HDL-ON_iOS/LaunchScreen.storyboard @@ -24,7 +24,7 @@ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> </imageView> </subviews> - <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </view> </viewController> <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index d683e18..04445d1 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -1152,7 +1152,7 @@ 8508=History 8509=Fluorite video door lock 8510=Call from the doorbell -8511=User Education +8511=Door opener 8512=Serial number 8513=Model @@ -2430,7 +2430,7 @@ 8508=鍘嗗彶璁板綍 8509=钀ょ煶瑙嗛闂ㄩ攣 8510=鏉ヨ嚜鈥滈棬閾冣�濆懠鍙� -8511=鐢ㄦ埛浜哄憳 +8511=寮�闂ㄤ汉鍛� 8512=搴忓垪鍙� 8513=鍨嬪彿 @@ -3700,7 +3700,7 @@ 8508=History 8509=Fluorite video door lock 8510=Call from the doorbell -8511=User Education +8511=Door opener 8512=Serial number 8513=Model @@ -4966,7 +4966,7 @@ 8508=History 8509=Fluorite video door lock 8510=Call from the doorbell -8511=User Education +8511=Door opener 8512=Serial number 8513=Model @@ -6232,7 +6232,7 @@ 8508=History 8509=Fluorite video door lock 8510=Call from the doorbell -8511=User Education +8511=Door opener 8512=Serial number 8513=Model diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen1.png similarity index 100% rename from HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen.png rename to HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorLockOpen1.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorlockClose.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorlockClose1.png similarity index 100% rename from HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorlockClose.png rename to HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorlockClose1.png Binary files differ diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs index d81fca1..cf0f68b 100644 --- a/HDL_ON/Common/HDLCommon.cs +++ b/HDL_ON/Common/HDLCommon.cs @@ -258,6 +258,8 @@ { try { + + //Extras涓虹┖涓嶅鐞� if (string.IsNullOrEmpty(jpushMessageInfo.Extras)) return; @@ -396,6 +398,7 @@ HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DoorLockPush(jpushMessageInfo); } + } } catch (Exception EX) diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index 4471ca8..7f2d884 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -3254,9 +3254,9 @@ /// </summary> public const int laizimenlinghujiao = 8510; /// <summary> - /// 鐢ㄦ埛浜哄憳 + /// 寮�闂ㄤ汉鍛� /// </summary> - public const int yonghurenyuan = 8511; + public const int kaimenrenyuan = 8511; /// <summary> /// 搴忓垪鍙� /// </summary> diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index a562b51..6e468e9 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -1416,6 +1416,7 @@ return list; } + /// <summary> /// 鐚溂 /// </summary> @@ -1425,6 +1426,10 @@ /// </summary> public const string VideoDoorLock="security.door.ezviz"; /// <summary> + /// 钀ょ煶鎽勫儚澶� + /// </summary> + public const string Ev_Ipcam = "security.ipcam.ez"; + /// <summary> /// 钀ょ煶瑙嗛闂ㄩ攣spk鍒楄〃 /// </summary> /// <returns></returns> @@ -1435,6 +1440,17 @@ return list; } + /// <summary> + /// 钀ょ煶鎽勫儚澶磗pk鍒楄〃 + /// </summary> + /// <returns></returns> + public static List<string> GetEvIpcamSPKList() + { + var list = new List<string>(); + list.Add(Ev_Ipcam); + return list; + } + #region 鐏厜 /// <summary> /// 锛堝紑鍏崇伅锛� diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs index ef2c271..8f4b4bc 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs @@ -2,7 +2,7 @@ using Shared; using System.Collections.Generic; using HDL_ON.Entity; - +using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; namespace HDL_ON.UI.UI2.Intelligence.Automation { @@ -623,7 +623,7 @@ case SPK.VideoDoorLock: { LogicView.FunTypeView view1 = new LogicView.FunTypeView(); - view1.btnText.TextID=StringId.yonghurenyuan; + view1.btnText.TextID=StringId.kaimenrenyuan; view1.btnText.Name = Language.StringByID(StringId.shipinmensuo); fLayout.AddChidren(view1.FLayoutView()); view1.btnClick.MouseUpEventHandler += (sender, e) => @@ -1060,37 +1060,52 @@ /// <param name="frame">褰撳墠鐣岄潰</param> /// <param name="device">褰撳墠璁惧</param> /// <param name="btnState">鏃х姸鎬�</param> - public void FaceAction(FrameLayout frame, Entity.Function device,Button btnState) { + public void FaceAction(FrameLayout frame, Entity.Function device, Button btnState) + { selectedState = device.spk + "_"; Loading loading = new Loading(); frame.AddChidren(loading); loading.Start(); - System.Threading.Tasks.Task.Run(() => + + CommonMethod.Current.SunThread(() => { try { - var faceIDList = Send.Current.GetListHomeFace(device.deviceId, true); - List<string> faceNameList = new List<string>(); - for (int i = 0; i < faceIDList.Count; i++) - { - var face = faceIDList[i]; - faceNameList.Add(face.userName); - } - Application.RunOnMainThread(() => + var faceIdList = Send.Current.GetListHomeFace(device.deviceId, true); + + CommonMethod.Current.MainThread(() => { loading.Hide(); + string stateValue=btnState.Tag==null?"":btnState.Tag.ToString(); PublicInterface publicInterface = new PublicInterface(); - publicInterface.FrameOrVv(this, faceNameList, new List<string> { btnState.Text }, device.name, (index) => - { - var face = faceIDList[index]; - //鐣岄潰鏄剧ず閫変腑鍊� - btnState.Text = face.userName; - //鏁版嵁灏佽 - AddDictionary("open_type", "1", "integer"); - AddDictionary("user_id", face.userId, "string"); + publicInterface.MultiSelectShow(this, faceIdList, device.name, stateValue, (indexeList) => + { + if (indexeList.Count > 0) + { + dicSateteList.Clear(); + string s = string.Empty; + string tag = string.Empty; + //鏁版嵁灏佽 + AddDictionary("open_type", "1", "integer"); + for (int indexe = 0; indexe < indexeList.Count; indexe++) + { + if (indexe > faceIdList.Count) + { + continue; + } + var face = faceIdList[indexe]; + AddDictionary("user_id", face.userId, "string"); + s += face.userName; + s += ","; + tag += face.userId; + tag += "_"; + } + //鐣岄潰鏄剧ず閫変腑鍊� + btnState.Text = s; + btnState.Tag = tag; + } - }, false); - + }); }); } catch { } @@ -1118,30 +1133,45 @@ Loading loading = new Loading(); frame.AddChidren(loading); loading.Start(); - System.Threading.Tasks.Task.Run(() => + CommonMethod.Current.SunThread(() => { try { - var userList =FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetVideoDoorLockUserListInfo(device); - List<string> userNameList = new List<string>(); - for (int i = 0; i < userList.Count; i++) + var faceIdList = Send.Current.GetVideoDoorLockUserListInfo(device); + CommonMethod.Current.MainThread(() => { - 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); + loading.Hide(); + string stateValue = btnState.Text == null ? "" : btnState.Text.ToString(); + PublicInterface publicInterface = new PublicInterface(); + publicInterface.MultiSelectShow(this, faceIdList, device.name, stateValue, (indexeList) => + { + if (indexeList.Count > 0) + { + dicSateteList.Clear(); + string s = string.Empty; + string tag = string.Empty; + for (int indexe = 0; indexe < indexeList.Count; indexe++) + { + if (indexe > faceIdList.Count) + { + continue; + } + var face = faceIdList[indexe]; + + //鏁版嵁灏佽<楂樿儨璇磋悿鐭抽偅杈规槸鎺ㄩ�佺敤鎴峰悕> + AddDictionary("open_user", face.userName, "string"); + s += face.userName; + s += ","; + tag += face.userId; + tag += "_"; + } + //鐣岄潰鏄剧ず閫変腑鍊� + btnState.Text = s; + btnState.Tag = tag; + } + + }); }); } @@ -1267,16 +1297,45 @@ var dic = dictionaryB[i]; string key = dic["key"]; string comparatorValue = dic["comparator"]; + string value = dic["value"]; if (dictionaryA["key"] == key && dictionaryA["comparator"] == comparatorValue) { - //鍒ゆ柇鏄惁瀛樺湪 - valueInt = i; - break; + if (this.checkSpk()) + { + //鏈変簺璁惧闇�瑕佸鍔犺繖涓垽鏂� + if (dictionaryA["value"] == value) + { + //鍒ゆ柇鏄惁瀛樺湪 + valueInt = i; + break; + } + } + else + { + //鍒ゆ柇鏄惁瀛樺湪 + valueInt = i; + break; + } } } return valueInt; } /// <summary> + /// 妫�鏌ユ槸鍚︽敮鎸� + /// </summary> + /// <returns></returns> + private bool checkSpk() + { + if (this.function.spk == SPK.VideoDoorLock || + this.function.spk == SPK.doorgate + ) + { + return true; + } + return false; + + } + /// <summary> /// 鍒ゆ柇dictionaryB鏄惁瀹屾暣鍖呭惈鍙︿竴涓猟ictionaryA /// </summary> /// <param name="dictionaryA"></param> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs index 58b303f..7055171 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs @@ -409,22 +409,51 @@ break; case SPK.VideoDoorLock: { - string value = this.GetValue(dicList); - inputView.btnState.Text = value; + string s = string.Empty; + string tag = string.Empty; + for (int b = 0; b < dicList.Count; b++) + { + var dic = dicList[b]; + //var userId = dic["value"].ToString(); + //var FaceItem = this.GetVideoDoorLockUserItem(userId, device); + //s += FaceItem.userName; + //s += ","; + //tag += FaceItem.userId; + //tag += "_"; + var userName = dic["value"].ToString(); + s += userName; + s += ","; + } + inputView.btnState.Text = s; } break; case SPK.doorgate: { + string s = string.Empty; if (inputCondition.identifier == "door_call_cloud_event") { - inputView.btnState.Text = Language.StringByID(StringId.shipintonghuahujiao); + s = Language.StringByID(StringId.shipintonghuahujiao); } else { - string userId = this.GetKeyValue("user_id",dicList); - var FaceItem = this.GetFaceItem(userId, device.deviceId); - inputView.btnState.Text = FaceItem.userName; + for (int b = 0; b < dicList.Count; b++) + { + var dic = dicList[b]; + var key = dic["key"].ToString(); + if (key != "user_id") + { + continue; + } + var userId = dic["value"].ToString(); + var FaceItem = this.GetFaceItem(userId, device.deviceId); + s += FaceItem.userName; + s += ","; + + + } + } + inputView.btnState.Text = s; } break; case SPK.IpCam_Imou: @@ -1499,7 +1528,7 @@ //寮�鍏崇伅鍏� case SPK.AirSwitch: case SPK.LightSwitch: - //鏈烘鎵� + //鏈烘鎵� case SPK.MechanicalArm: { foreach (var dic in dicList) @@ -2139,11 +2168,23 @@ break; case SPK.VideoDoorLock: { - foreach (var dic in dicList) + string s = string.Empty; + string tag = string.Empty; + for (int b = 0; b < dicList.Count; b++) { - string value = dic["value"]; - button1.Text = value; + var dic = dicList[b]; + //var userId = dic["value"].ToString(); + //var FaceItem = this.GetVideoDoorLockUserItem(userId, device); + //s += FaceItem.userName; + //s += ","; + //tag += FaceItem.userId; + //tag += "_"; + var userName = dic["value"].ToString(); + s += userName; + s += ","; } + button1.Text = s; + button1.Tag = tag; } break; case SPK.MusicStandard: @@ -2164,11 +2205,28 @@ break; case SPK.doorgate: { - string value = this.GetKeyValue("user_id", dicList); - button2.Text = this.GetFaceItem(value, device.deviceId).userName; + string s = string.Empty; + string tag = string.Empty; + for (int b = 0; b < dicList.Count; b++) + { + var dic = dicList[b]; + var key = dic["key"].ToString(); + if (key != "user_id") + { + continue; + } + var userId = dic["value"].ToString(); + var FaceItem = this.GetFaceItem(userId, device.deviceId); + s += FaceItem.userName; + s += ","; + tag += FaceItem.userId; + tag += "_"; + } + button2.Text = s; + button2.Tag = tag; } break; - + } } /// <summary> @@ -2635,7 +2693,7 @@ } } /// <summary> - /// 鏌ユ壘鎸囧畾userId + /// 鏌ユ壘鎸囧畾鍙瀵硅userId /// </summary> /// <param name="userId"></param> /// <returns></returns> @@ -2652,6 +2710,24 @@ } return face; } + /// <summary> + /// 鏌ユ壘鎸囧畾钀ょ煶瑙嗛闂ㄩ攣userId + /// </summary> + /// <param name="userId"></param> + /// <returns></returns> + public Face GetVideoDoorLockUserItem(string userId, Function device) + { + if (Send.Current.VideoDoorLockUserListInfo.Count == 0) + { + Send.Current.GetVideoDoorLockUserListInfo(device); + } + var face = Send.Current.VideoDoorLockUserListInfo.Find((o) => { return o.userId == userId; }); + if (face == null) + { + face = new Face(); + } + return face; + } } } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs index 6435a0c..9ed7f66 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs @@ -1184,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.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 = "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.LightDimming }, // 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/LogicView/FunTypeView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/FunTypeView.cs index 7ef9350..fef3b95 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/FunTypeView.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/FunTypeView.cs @@ -26,7 +26,7 @@ Gravity = Gravity.CenterVertical, TextAlignment = TextAlignment.CenterLeft, }; - + /// <summary> /// 锛堟潯浠舵垨鑰呯洰鏍囷級璁惧鐘舵�佹枃鏈弿杩� /// </summary> @@ -39,7 +39,7 @@ Y = Application.GetRealHeight(17), X = Application.GetRealWidth(375 - 48 - 130), TextAlignment = TextAlignment.CenterRight, - Text="", + Text = "", }; /// <summary> /// 鍥炬爣 diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs index 0dc90c0..a073cc9 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs @@ -156,6 +156,83 @@ } /// <summary> + /// 澶氶�夋嫨 + /// </summary> + /// <param name="frameLayout">鐖舵帶浠�</param> + /// <param name="list">鏄剧ず鏁版嵁婧�</param> + /// <param name="titleText"></param> + /// <param name="stateTextList">涔嬪墠鐘舵�佹枃鏈�</param> + /// <param name="action">杩斿洖绱㈠紩鍊煎垪琛�</param> + /// <param name="textSize">鏄剧ず鏂囨湰瀛椾綋澶у皬</param> + public void MultiSelectShow(FrameLayout frameLayout, List<Face> list, string titleText, string stateTexts, Action<List<int>> action, int textSize = LogicView.TextSize.text14) + { + LogicView.DateView view = new LogicView.DateView(); + view.btnTitle.Text = titleText; + view.FLayoutView(frameLayout, list.Count); + view.btnCancel.MouseUpEventHandler += (sender, e) => + { + //绉婚櫎fLayout鐣岄潰 + view.frameLayout.RemoveFromParent(); + }; + List<int> intList = new List<int>(); + for (int i = 0; i < list.Count; i++) + { + var face= list[i]; + LogicView.CheckView checkView = new LogicView.CheckView(); + checkView.frameLayout.Y = Application.GetRealHeight(56 + 50 * i); + checkView.btnText.TextSize = textSize; + view.frameLayout.AddChidren(checkView.FLayoutView()); + checkView.btnText.Text = face.userName; + checkView.btnClick.Tag = i;//鏍囪 + + if (stateTexts.Contains(face.userId)) + { + //鏄剧ず涔嬪墠鐨勯�変腑鐘舵�� + checkView.btnCheckIcon.IsSelected = true; + intList.Add(i); + } + //鐐瑰嚮浜嬩欢 + checkView.btnClick.MouseUpEventHandler += (sender1, e1) => + { + + int clickIndex =int.Parse(checkView.btnClick.Tag.ToString()); + checkView.btnClick.IsSelected = !checkView.btnClick.IsSelected; + if (checkView.btnClick.IsSelected) + { + checkView.btnCheckIcon.IsSelected = true; + if (!intList.Contains(clickIndex)) + { + //娣诲姞閫変腑鏁版嵁 + intList.Add(clickIndex); + } + } + else + { + checkView.btnCheckIcon.IsSelected = false; + if (intList.Contains(clickIndex)) + { + //绉婚櫎閫変腑鏁版嵁 + intList.Remove(clickIndex); + } + } + + }; + + } + view.btnConfirm.MouseUpEventHandler += (sender1, e1) => + { + if (intList.Count == 0) + { + return; + } + action(intList); + //绉婚櫎fLayout鐣岄潰 + view.frameLayout.RemoveFromParent(); + }; + + } + + /// <summary> /// 鏈�-澶氶�夋嫨 /// </summary> /// <param name="frameLayout">鐖舵帶浠�</param> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs index fbf8818..8ea607a 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs @@ -23,6 +23,7 @@ } } public List<Face> faceList = new List<Face>(); + public List<Face> VideoDoorLockUserListInfo = new List<Face>(); /// <summary> /// 璋冪敤鑾峰彇浣忓畢瀛愯处鍙峰垪琛� /// </summary> @@ -494,6 +495,30 @@ } + /// <summary> + /// 鑾峰彇闂ㄩ攣鐢ㄦ埛鍒楄〃(钀ょ煶瑙嗛闂ㄩ攣) + /// </summary> + /// <param name="deviceId">璁惧</param> + /// <returns></returns> + public List<Face> GetVideoDoorLockUserListInfo(Function device) + { + var userList = FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetVideoDoorLockUserListInfo(device); + List<Face> faceIdList = new List<Face>(); + for (int i = 0; i < userList.Count; i++) + { + Face face = new Face(); + var user = userList[i]; + face.userId = user.extUserId; + face.userName = user.extUserName; + faceIdList.Add(face); + } + VideoDoorLockUserListInfo.Clear(); + VideoDoorLockUserListInfo.AddRange(faceIdList); + return faceIdList; + } + + + /// <summary> ///璇锋眰鏈嶅姟鍣紙涓庝綇瀹呮湁鍏�:渚嬪锛沨omeId锛� /// </summary> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs index 69ab0ce..b1c6ab8 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs @@ -229,10 +229,10 @@ ///寮�鍏� LogicView.FunTypeView curtainSwitchView = new LogicView.FunTypeView(); curtainSwitchView.btnText.TextID = StringId.switchLogic; - fLayout.AddChidren(curtainSwitchView.FLayoutView()); + //fLayout.AddChidren(curtainSwitchView.FLayoutView());//2023骞�04鏈�17鏃�16:27:10 浜у搧瑕佹眰鐨勫幓鎺� ///鐧惧垎姣� LogicView.FunTypeView crtainPercentumView = new LogicView.FunTypeView(); - crtainPercentumView.frameLayout.Y = curtainSwitchView.frameLayout.Bottom; + //crtainPercentumView.frameLayout.Y = curtainSwitchView.frameLayout.Bottom; crtainPercentumView.btnText.TextID = StringId.percentum; fLayout.AddChidren(crtainPercentumView.FLayoutView()); crtainPercentumView.btnState.Text = "5%";//浜у搧缁忕悊鏅撹緣瑕佹眰鏀圭殑 2021-11-06 diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs index dc82ca1..14acce9 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs @@ -404,6 +404,7 @@ break; case SPK.Peephole: case SPK.VideoDoorLock: + case SPK.Ev_Ipcam: { //璺宠浆鍒癮ndroid,ios閭h竟鍘� HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.SkipAddDeviceActivity(device.spk); diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs index 0a6aec7..1392b63 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs @@ -16,6 +16,7 @@ /// </summary> public class CommonMethod { + private Loading loading; /// <summary> /// 璁板綍褰撳墠鐣岄潰绱㈠紩鍊� @@ -54,6 +55,7 @@ this.SunThread(() => { var list = this.GetVideoDoorLockLockModelsList("notAllowedConfigNetworkModels"); + this.MainThread(() => { #if __IOS__ @@ -127,11 +129,12 @@ /// <param name="isDialog">鏄惁闇�瑕佸脊妗�</param> public void SkipRTVActivity(string deviceSerial, string deviceId, string spk, bool isDialog) { - + this.Loading.Start(); this.InitializationAndroidData((isEzChildAccessToken) => { this.MainThread(() => { + this.Loading.Hide(); if (isDialog) { Video.View.ShowDialog.Currnet.ClickBox(Language.StringByID(StringId.laizimenlinghujiao), (dialog) => @@ -214,7 +217,7 @@ public void InitializationAndroidData(Action<bool> action) { bool isBool = true; - this.Loading.Start(); + //this.Loading.Start(); this.SunThread(() => { try @@ -227,14 +230,21 @@ { //Token isBool = false; - this.ShowTip("鑾峰彇钀ょ煶浜戝瓙璐﹀彿token澶辫触銆�"); + //this.ShowTip("鑾峰彇钀ょ煶浜戝瓙璐﹀彿token澶辫触銆�"); return; } + + string appKey = "1aa98a90489b4838b966b57018b4b04b";//姝e紡鏈嶅姟鍣� + //if (OnAppConfig.Instance.RequestHttpsHost == "https://test-gz.hdlcontrol.com") + //{ + // appKey = "941b1b72b6294998acfd36c14931b675";//鐢ㄥ湪娴嬭瘯鏈嶅姟鍣ㄦ帹閫佺殑 + //} + #if __IOS__ //iOS //鍒濆鍖栬悿鐭充簯SDK锛屼腑鏂囧浗鍐卥ey銆佽嫳鏂囨捣澶杒ey 寮�鍙戣�呰处鍙蜂娇鐢ㄥ簲鐢ㄥ寘鍚嶇敵璇风殑APPKEY锛屼笉鍚屽寘鍚嶅簲鐢ㄩ渶閰嶇疆涓嶅悓鐨凙PPKEY - EZSDK.IOS.EZSDK.SharedInstance().InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b"); + EZSDK.IOS.EZSDK.SharedInstance().InitLibWithAppKey(appKey, appKey); //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); @@ -246,7 +256,8 @@ //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); + + HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, appKey, 1, DB_ResidenceData.Instance.CurrentRegion.id); #endif @@ -261,7 +272,7 @@ { this.MainThread(() => { - this.Loading.Hide(); + //this.Loading.Hide(); action?.Invoke(isBool); }); } @@ -290,7 +301,15 @@ /// <returns>杩斿洖缁撴灉涓嶄細涓簄ull</returns> public List<string> GetVideoDoorLockLockModelsList(string mode = "lockModels") { - return VideDoorLockSend.Current.GetVideoDoorLockLockModelsList(mode); + var lockModels = VideDoorLockSend.Current.GetVideoDoorLockLockModelsList(); + if (mode == "lockModels") + { + return lockModels.lockModels; + } + else + { + return lockModels.notAllowedConfigNetworkModels; + } } /// <summary> /// 闂ㄩ攣鎺ㄩ�� @@ -398,11 +417,11 @@ if (comerom == Comerom.collect) { - return "FunctionIcon/DoorLock/VideoDoorLockOpen.png"; + return "FunctionIcon/DoorLock/VideoDoorLockOpen1.png"; } else { - return "FunctionIcon/DoorLock/VideoDoorlockClose.png"; + return "FunctionIcon/DoorLock/VideoDoorlockClose1.png"; } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs index c6f260d..c43b939 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs @@ -171,24 +171,19 @@ /// </summary> /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param> /// <returns>杩斿洖缁撴灉涓嶄細涓簄ull</returns> - public List<string> GetVideoDoorLockLockModelsList(string mode,TipType tipType = TipType.flicker) + public LockModels 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>(); + return new LockModels(); } var lockModels = Newtonsoft.Json.JsonConvert.DeserializeObject<LockModels>(responsePackNew.Data.ToString()); if (lockModels == null) { - return new LockModels().lockModels; + return new LockModels(); } - if ( mode =="lockModels") { - return lockModels.lockModels; - } - else { - return lockModels.notAllowedConfigNetworkModels; - } + return lockModels; } /// <summary> diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs index b76866c..94be708 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs @@ -322,10 +322,26 @@ btnCollectIcon.IsSelected = this.device.collect = !btnCollectIcon.IsSelected; this.device.CollectFunction(); }; + + int delayTimeMaxValue = 0;// + var startTime = DateTime.Now; //瀹炴椂瑙嗛 this.rtvFL.SetClickListener((fl, btnStateImage, btnStateText) => { + bool isDeyayClick = false; + var clickTime = DateTime.Now; + if ((clickTime - startTime).TotalMilliseconds > delayTimeMaxValue) + { + delayTimeMaxValue = 2*1000; + startTime = clickTime; + isDeyayClick = true; + } + if (!isDeyayClick) + { + return; + } CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk, false); + }); //涓存椂瀵嗙爜 this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => diff --git a/ys/Jars/hdl_ezvizsdk.aar b/ys/Jars/hdl_ezvizsdk.aar index 4bf94e5..d6ea098 100644 --- a/ys/Jars/hdl_ezvizsdk.aar +++ b/ys/Jars/hdl_ezvizsdk.aar Binary files differ -- Gitblit v1.8.0