wjc
2022-01-19 07b0239f824ddb5a0cadf93f20ff6247f72baca2
Merge remote-tracking branch 'origin/wxr0114' into wjc
76个文件已添加
66个文件已修改
14530 ■■■■■ 已修改文件
DLL/EZvizMonitor/ys.dll 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Scan/ScanSdk.dll 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Shared.Droid.HDLWidget-BackgroudLocation.dll 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Shared.Droid.HDLWidget.dll 补丁 | 查看 | 原始文档 | blame | 历史
DLL/UMeng/UMSdk.dll 补丁 | 查看 | 原始文档 | blame | 历史
DLL/UMeng/UMSdkDroid.dll 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/AgreementActivity.cs 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Application.cs 497 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg2.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg3.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg4.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Other/HDLONUtils.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/Resource.designer.cs 9405 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/drawable/btn_agree.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/drawable/btn_disagree.xml 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/drawable/dialog_background2.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/layout/activity_splash.xml 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/layout/activity_webview.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/layout/activity_zxing_layout.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/layout/zxing_layout.xml 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/values-zh/strings.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/values/strings.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Scan.cs 144 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/SplashActivity.cs 318 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/WebviewActivity.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/ZXingOverlayView.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Zxing/CustomCaptureActivity.cs 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Zxing/ScanActivity.cs 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/libs/arm64-v8a/libelianjni.so 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg2.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg3.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg4.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Scan.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/ViewController.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/Constant.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/OnAppConfig.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Mqtt/MqttClient.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Scene.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/SecurityAlarm.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/FunctionList.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/BindingResidence/BindingResidencePage.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/MainPage.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmebly.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/Widget/ListCellView.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/Widget/WebViewDialog.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPage.cs 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/ComplaintsPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/CancelAccountPage.cs 201 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPageBLL.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferInputPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs 208 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockListPage.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs 156 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs 183 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPageBLL.cs 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_CumulativePowerConsumption.cs 404 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_InstantaneousValue.cs 196 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntents/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntentsUI/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/ApiDefinitions.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/compiler.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/gradle.xml 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/jarRepositories.xml 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/misc.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/vcs.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/build.gradle 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/proguard-rules.pro 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/AndroidManifest.xml 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/java/com/hdl/onproumengsdk/FirstFragment.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/java/com/hdl/onproumengsdk/MainActivity.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/java/com/hdl/onproumengsdk/SecondFragment.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/drawable-v24/ic_launcher_foreground.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/drawable/ic_launcher_background.xml 170 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/layout/activity_main.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/layout/content_main.xml 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/layout/fragment_first.xml 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/layout/fragment_second.xml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/menu/menu_main.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-hdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-mdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-xhdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/navigation/nav_graph.xml 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values-land/dimens.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values-night/themes.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values-w1240dp/dimens.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values-w600dp/dimens.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values/colors.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values/dimens.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values/strings.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values/themes.xml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/build.gradle 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/gradle.properties 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/gradle/wrapper/gradle-wrapper.jar 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/gradle/wrapper/gradle-wrapper.properties 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/gradlew 185 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/gradlew.bat 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/settings.gradle 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/__MACOSX/OnproUmengSdk/._.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/__MACOSX/OnproUmengSdk/app/._.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
ThirdPartyIntegration/OnproUmengSdk/__MACOSX/OnproUmengSdk/umengSdk/._.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
DLL/EZvizMonitor/ys.dll
Binary files differ
DLL/Scan/ScanSdk.dll
Binary files differ
DLL/Shared.Droid.HDLWidget-BackgroudLocation.dll
Binary files differ
DLL/Shared.Droid.HDLWidget.dll
Binary files differ
DLL/UMeng/UMSdk.dll
Binary files differ
DLL/UMeng/UMSdkDroid.dll
Binary files differ
HDL-ON_Android/AgreementActivity.cs
New file
@@ -0,0 +1,77 @@
using System;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.Net;
using Android.OS;
using CN.Jpush.Android.Api;
//using Android.Widget;
using Com.Hdl.ON.Jpush.Androidjpush;
using HDL_ON;
using Java.Util;
using Microsoft.AppCenter;
using Microsoft.AppCenter.Analytics;
using Microsoft.AppCenter.Crashes;
using Shared;
namespace HDL_ON_Android
{
    [Activity(Label = "AgreementActivity", Theme = "@style/MyTheme1", ScreenOrientation = ScreenOrientation.Portrait)]
    public class AgreementActivity : Activity
    {
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            // Create your application here
            SetContentView(Resource.Layout.activity_splash);
            Android.Widget.TextView tvPrivacyPolicy = FindViewById<Android.Widget.TextView>(Resource.Id.privacy_policy_btn);
            Android.Widget.TextView tvServiceAgreement = FindViewById<Android.Widget.TextView>(Resource.Id.service_agreement_btn);
            Android.Widget.Button btnDisagree = FindViewById<Android.Widget.Button>(Resource.Id.disagree_btn);
            Android.Widget.Button btnAgree = FindViewById<Android.Widget.Button>(Resource.Id.agree_btn);
            tvPrivacyPolicy.Click += (sender, e) =>
            {
                Intent i = new Intent(this, typeof(WebviewActivity));
                i.PutExtra("url", HDL_ON.Constant.URL_PRIVACYPOLICY);
                StartActivity(i);
                Intent data = new Intent();
                data.PutExtra("data", "disagree");
                SetResult(Result.Canceled, Intent);
            };
            tvServiceAgreement.Click += (sender, e) =>
            {
                Intent i = new Intent(this, typeof(WebviewActivity));
                i.PutExtra("url",HDL_ON.Constant.URL_USERAGREEMENT);
                StartActivity(i);
                Intent data = new Intent();
                data.PutExtra("data", "disagree");
                SetResult(Result.Canceled, Intent);
            };
            btnDisagree.Click += (sender, e) =>
            {
                //Java.Lang.JavaSystem.Exit(0);
                FinishAffinity();
            };
            btnAgree.Click += (sender, e) =>
            {
                OnAppConfig.Instance.isAgreePrivacyPolicy = true;
                OnAppConfig.Instance.FirstRunApp = false;
                OnAppConfig.Instance.SaveConfig();
                Intent data = new Intent();
                data.PutExtra("data", "agree");
                SetResult(Result.Ok, Intent);
                Finish();
            };
        }
    }
}
HDL-ON_Android/Application.cs
@@ -18,400 +18,159 @@
namespace HDL_ON_Android
{
  /// <summary>
  /// 设定为默认启动的Application
  /// </summary>
  [Android.App.Application]
  public class Application : Android.App.Application, Android.App.Application.IActivityLifecycleCallbacks
  {
    static void reStartApp(Android.App.Application application)
    {
      var intent = new Intent(application, typeof(BaseActivity));
      intent.AddFlags(ActivityFlags.NewTask);
      application.StartActivity(intent);
      Android.OS.Process.KillProcess(Android.OS.Process.MyPid());
    }
    public Application(IntPtr handle, Android.Runtime.JniHandleOwnership ownerShip) : base(handle, ownerShip) { }
    public override void OnCreate()
    {
      //注册未处理异常事件
      AppCenter.Start("64ac5859-2cd7-4ef8-a5da-5455e29679ec", typeof(Analytics), typeof(Crashes));
      if (Shared.Application.Activity != null)
      {
        reStartApp(this);
        return;
      }
      base.OnCreate();
      RegisterActivityLifecycleCallbacks(this);
      initAll();
    }
    /// <summary>
    /// 所有初始化全部在这个方法实现
    /// 设定为默认启动的Application
    /// </summary>
    void initAll()
    [Android.App.Application]
    public class Application : Android.App.Application, Android.App.Application.IActivityLifecycleCallbacks
    {
      string[] permissions = new string[] { Manifest.Permission.WriteExternalStorage, Manifest.Permission.RecordAudio,
            Manifest.Permission.Camera, Manifest.Permission.ProcessOutgoingCalls, Manifest.Permission.GetAccounts};
      //禁止屏幕长亮
      BaseActivity.KeepScreenON = false;
      //隐藏虚拟按键
      BaseActivity.IsHideVirualButtons = true;
      //实现安卓返回按键
      BaseActivity.BackKeyAction = () =>
      {
        try
        static void reStartApp(Android.App.Application application)
        {
          var result = MainPage.LoadEvent_BackAction();
          switch (result)
          {
            case 0:
              break;
            case 1:
            case 2:
              BaseActivity.VerifyDateTime = DateTime.MaxValue;
              break;
            default:
              BaseActivity.VerifyDateTime = DateTime.MaxValue;
              break;
          }
            var intent = new Intent(application, typeof(BaseActivity));
            intent.AddFlags(ActivityFlags.NewTask);
            application.StartActivity(intent);
            Android.OS.Process.KillProcess(Android.OS.Process.MyPid());
        }
        catch (Exception ex)
        public Application(IntPtr handle, Android.Runtime.JniHandleOwnership ownerShip) : base(handle, ownerShip) { }
        public override void OnCreate()
        {
          MainPage.Log(ex.Message);
          BaseActivity.VerifyDateTime = DateTime.MaxValue;
        }
      };
      init();
      BaseActivity.OnCreateActoin += (activity, application) =>
      {
        Language.CurrentLanguage = "Chinese";
        Locale locale1 = Locale.Default;
        var localeList = Resources.Configuration.Locale;
        if (localeList.Language == "zh")
        {
          Language.CurrentLanguage = "Chinese";
        }
        else
        {
          Language.CurrentLanguage = "English";
        }
        //获取极光推送ID
        GetJPushRegistrationID(activity);
        BaseActivity.NetworkStateChanged += (int internetStatus) =>
              {
                //if (!IsEnterBackground)
                //{
                //    ////BusSocket.Stop();
                //    //new System.Threading.Thread(() =>
                //    //{
                //    //    System.Threading.Thread.Sleep(1000);
                //    //    //BusSocket.Start();
                //    //})
                //    //{ IsBackground = true }.Start();
                //}
                //else
                //{
                //    Console.WriteLine("HHH 网络变化但处于后台");
                //}
                //网络变化处理
                HDLCommon.Current.UpdateInternetStatus((int)internetStatus, MainPage.IsEnterBackground);
              };
      };
      BaseActivity.RefreshUIAction += (activity) =>
      {
        MainPage.Show();
        checkSomeInfo();
      };
      BaseActivity.OnResumeAction += (activity) =>
      {
        checkSomeInfo();
      };
      BaseActivity.OnDestroyAction += (activity) =>
      {
        Console.WriteLine("OnDestroyAction");
        //BusSocket.Stop();
        //UserInfo.Current.unlockTime = DateTime.Now;
      };
      HDLUtils.SetAuthoritiesName("com.hdl.onpro.fileProvider");
      //Shared.Application.IsGpsEnable = true;
      bool isfirst = true;
      //获取经纬度
      Shared.Application.LocationAction = (lon, lat) =>
      {
        try
        {
          if (isfirst)
          {
            //只触发一次
            //Shared.Application.LocationAction = null;
            new HDL_ON.DAL.Server.HttpServerRequest().GetCityWeatherInfo(lon.ToString(), lat.ToString());
          }
          isfirst = false;
          ///监听经纬度
          HDL_ON.UI.UI2.Intelligence.Automation.LogicMethod.CurrLogicMethod.AppLatAndLonEvent(lon, lat);
          //关闭定位服务
          //Shared.Application.StopGPSLocationService();
        }
        catch (Exception ex)
        {
          Utlis.WriteLine("GetCityInfo catch" + ex.Message);
        }
        MainPage.Log($"经纬度:::{lon}:{lat}");
      };
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="activity"></param>
    void GetJPushRegistrationID(BaseActivity activity)
    {
      try
      {
        //保存获取的极光服务器上的注册ID到本地文件
        var tokenID = JPushInterface.GetRegistrationID(activity);
        Console.WriteLine("RegistrationID:  " + tokenID);
        if (!string.IsNullOrEmpty(tokenID) && OnAppConfig.Instance.PushDeviceToken != tokenID)
        {
          OnAppConfig.Instance.PushDeviceToken = tokenID;
          OnAppConfig.Instance.PhoneName = Android.OS.Build.Manufacturer;
          OnAppConfig.Instance.SaveConfig();
        }
        int loadTokenCount = 0;
        System.Threading.Tasks.Task.Run(() =>
        {
          while (string.IsNullOrEmpty(tokenID))
          {
            System.Threading.Thread.Sleep(1000);
            tokenID = JPushInterface.GetRegistrationID(activity);
            Console.WriteLine("Sleep.tokenID + " + JPushInterface.GetRegistrationID(activity));
            loadTokenCount++;
            if (loadTokenCount > 30)
            if (Shared.Application.Activity != null)
            {
              break;
                //reStartApp(this);
                return;
            }
          }
          Console.WriteLine("RegistrationID:  " + tokenID);
          if (!string.IsNullOrEmpty(tokenID) && OnAppConfig.Instance.PushDeviceToken != tokenID)
          {
            OnAppConfig.Instance.PushDeviceToken = tokenID;
            OnAppConfig.Instance.PhoneName = Android.OS.Build.Manufacturer;
            OnAppConfig.Instance.SaveConfig();
          }
        });
      }
      catch
      {
      }
    }
    public static bool IsShowTip = true;
    void init()
    {
      //手机名称 Android.OS.Build.Manufacturer;
      //OnAppConfig.Instance.PhoneName = Android.OS.Build.Manufacturer;
      //#if DEBUG
      //CN.Jpush.Android.Api.JPushInterface.SetDebugMode(true);
      //#endif
      CN.Jpush.Android.Api.JPushInterface.Init(this);
    }
    void checkSomeInfo()
    {
      try
      {
        IsShowTip = true;
        var status = isNetworkAvailable(this);
        int internetStatus = 0;
        if (!status)
        {
          internetStatus = 0;
            base.OnCreate();
            RegisterActivityLifecycleCallbacks(this);
        }
        var isWifi = isWifiConnected(this);
        if (isWifi)
        public void OnActivityCreated(Activity activity, Bundle savedInstanceState)
        {
          internetStatus = 2;
        }
        else
        public void OnActivityDestroyed(Activity activity)
        {
          internetStatus = 1;
            //throw new NotImplementedException ();
        }
      }
      catch (Exception ex)
      {
        Console.WriteLine($"android check some info erorr : {ex.Message}");
      }
    }
    bool isNetworkAvailable(Context context)
    {
      var cm = (ConnectivityManager)context.GetSystemService(ConnectivityService);
      if (cm == null || cm.ActiveNetworkInfo == null)
      {
        return false;
      }
      else
      {
        return cm.ActiveNetworkInfo.IsAvailable;
      }
    }
    bool isWifiConnected(Context context)
    {
      if (context != null)
      {
        var mConnectivityManager = (ConnectivityManager)context.GetSystemService
        (ConnectivityService);
        var mWiFiNetworkInfo = mConnectivityManager.GetNetworkInfo(ConnectivityType.Wifi);
        if (mWiFiNetworkInfo != null)
        public void OnActivityPaused(Activity activity)
        {
          return mWiFiNetworkInfo.IsAvailable;
            //throw new NotImplementedException ();
        }
      }
      return false;
    }
    public void OnActivityCreated(Activity activity, Bundle savedInstanceState)
    {
    }
    public void OnActivityDestroyed(Activity activity)
    {
      //throw new NotImplementedException ();
    }
    public void OnActivityPaused(Activity activity)
    {
      //throw new NotImplementedException ();
    }
    public void OnActivityResumed(Activity activity)
    {
      //throw new NotImplementedException ();
    }
    public void OnActivitySaveInstanceState(Activity activity, Bundle outState)
    {
      //throw new NotImplementedException ();
    }
    public void OnActivityStarted(Activity activity)
    {
      //throw new NotImplementedException ();
      mCount++;
      if (mCount == 1)
      {
        Console.WriteLine("HHH OnActivityStarted:foreground");
        BusSocketStart();
        //后台回到前台
        new HDL_ON.UI.AppUnlockPage().LoadPage();
      }
    }
    public void OnActivityStopped(Activity activity)
    {
      mCount--;
      if (mCount == 0)
      {
        Console.WriteLine("HHH OnActivityStopped: background");
        BusSocketStop();
        //进入后台
        UserInfo.Current.unlockTime = DateTime.Now;
      }
    }
    public override void OnTerminate()
    {
      base.OnTerminate();
      UnregisterActivityLifecycleCallbacks(this);
    }
    int mCount;
    ///// <summary>
    ///// 是否进入后台
    ///// </summary>
    //public bool IsEnterBackground = false;
    /// <summary>
    /// 进入后台的时间
    /// </summary>
    DateTime CloseTime = DateTime.Now;
    /// <summary>
    /// BusSocketStop
    /// </summary>
    void BusSocketStop()
    {
      //IsEnterBackground = true;
      CloseTime = DateTime.Now;
      MainPage.IsEnterBackground = true;
      //进入后台mqtt正在连接重置状态
      HDL_ON.DAL.Mqtt.MqttClient.RemoteMqttIsConnecting = false;
      HDL_ON.DriverLayer.UdpSocket._BusSocket.Stop();
    }
    /// <summary>
    /// BusSocketStart
    /// </summary>
    void BusSocketStart()
    {
      //IsEnterBackground = false;
      if (CloseTime.AddSeconds(10) < DateTime.Now)
      {
        //后台超过10s就断开MQTT重连
        //if (HDL_ON.DriverLayer.Control.Ins.IsRemote)
        public void OnActivityResumed(Activity activity)
        {
          HDL_ON.DAL.Mqtt.MqttClient.DisConnectRemote("closeTime", false);
            //throw new NotImplementedException ();
        }
      }
      MainPage.IsEnterBackground = false;
      HDL_ON.DriverLayer.UdpSocket._BusSocket.Start();
      HDL_ON.DriverLayer.Control.Ins.SearchLoaclGateway();
    }
        public void OnActivitySaveInstanceState(Activity activity, Bundle outState)
        {
            //throw new NotImplementedException ();
        }
    protected override void Dispose(bool disposing)
    {
      base.Dispose(disposing);
    }
        public void OnActivityStarted(Activity activity)
        {
            //throw new NotImplementedException ();
            if (HDL_ON.OnAppConfig.Instance.FirstRunApp)
            {
                return;
            }
            mCount++;
            if (mCount == 1)
            {
                Console.WriteLine("HHH OnActivityStarted:foreground");
                BusSocketStart();
                //后台回到前台
                new HDL_ON.UI.AppUnlockPage().LoadPage();
            }
        }
    /// <summary>
    /// 查询通知权限,并提示
    /// </summary>
    public void QueryNotificationPermission()
    {
        public void OnActivityStopped(Activity activity)
        {
            mCount--;
            if (mCount == 0)
            {
                Console.WriteLine("HHH OnActivityStopped: background");
                BusSocketStop();
                //进入后台
                UserInfo.Current.unlockTime = DateTime.Now;
            }
        }
        public override void OnTerminate()
        {
            base.OnTerminate();
            UnregisterActivityLifecycleCallbacks(this);
        }
        public int mCount;
        ///// <summary>
        ///// 是否进入后台
        ///// </summary>
        //public bool IsEnterBackground = false;
        /// <summary>
        /// 进入后台的时间
        /// </summary>
        DateTime CloseTime = DateTime.Now;
        /// <summary>
        /// BusSocketStop
        /// </summary>
        void BusSocketStop()
        {
            //IsEnterBackground = true;
            CloseTime = DateTime.Now;
            MainPage.IsEnterBackground = true;
            //进入后台mqtt正在连接重置状态
            HDL_ON.DAL.Mqtt.MqttClient.RemoteMqttIsConnecting = false;
            HDL_ON.DriverLayer.UdpSocket._BusSocket.Stop();
        }
        /// <summary>
        /// BusSocketStart
        /// </summary>
        void BusSocketStart()
        {
            //IsEnterBackground = false;
            if (CloseTime.AddSeconds(10) < DateTime.Now)
            {
                //后台超过10s就断开MQTT重连
                //if (HDL_ON.DriverLayer.Control.Ins.IsRemote)
                {
                    HDL_ON.DAL.Mqtt.MqttClient.DisConnectRemote("closeTime", false);
                }
            }
            MainPage.IsEnterBackground = false;
            HDL_ON.DriverLayer.UdpSocket._BusSocket.Start();
            HDL_ON.DriverLayer.Control.Ins.SearchLoaclGateway();
        }
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }
        /// <summary>
        /// 查询通知权限,并提示
        /// </summary>
        public void QueryNotificationPermission()
        {
        }
    }
  }
}
}
HDL-ON_Android/Assets/Language.ini
@@ -293,7 +293,7 @@
289=Remove The Binding
290=Fail to get the history
291=No favorites
292=About ON+
292=About On Pro
293=Member
294=Administrator
295=Change password
@@ -369,7 +369,7 @@
365=Can not communicate with the server, fail to edit the scene information
366=Can not communicate with the server, fail to delete the scene
367=Can not communicate with the server, fail to delete the floor
368=Welcome to enjoy ON+
368=Welcome to enjoy On Pro
369=Add new residence
370=Become family member
371=Can not use the function, please bind the gateway
@@ -422,7 +422,7 @@
436=Added Devices
437=Device List
438=humidity:{0}%    air:{1}    wind:{2}
439=Real time: {0} kw
439=Real time: {0} kW
440=Next step
441=Please select all areas of capture status
442=Generate Scene
@@ -502,6 +502,16 @@
514=Gateway location information is not configured
515=Add Security
516=Withdrawal
517=Instantaneous value
518=Cumulative power consumption
519=Voltage (V)
520=Electric Current (A)
521=Power (W)
522=Refresh
523=Delay alarm
524=Bypass
525=Enable
526=Cancel account
 
1000=Room Humidity
1001=V-chip
@@ -1495,7 +1505,7 @@
365=无法与服务器通讯,场景信息编辑失败。
366=无法与服务器通讯,场景删除失败。
367=无法与服务器通讯,楼层删除失败。
368=欢迎使用ON+
368=欢迎使用On Pro
369=添加新住宅
370=成为家庭成员
371=功能无法使用,请绑定网关
@@ -1627,6 +1637,16 @@
514=未配置网关位置信息
515=添加安防
516=撤销同意
517=瞬时值
518=累计用电
519=电压(V)
520=电流(A)
521=功率(W)
522=刷新
523=延时报警
524=停用
525=启用
526=注销账号
 
1000=室内湿度
1001=童锁
@@ -1731,7 +1751,7 @@
1093=
1094=选择时间
1095=选择日期
1096=Generate
1096=生成
1097=临时密码已经复制
1098=清除当前临时密码?
1099=生效时间必须大于失效时间
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg2.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg3.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg4.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -64,6 +64,7 @@
    <AndroidSigningStorePass>85521566</AndroidSigningStorePass>
    <AndroidSigningKeyPass>85521566</AndroidSigningKeyPass>
    <AndroidSigningKeyAlias>on_plus</AndroidSigningKeyAlias>
    <AndroidSupportedAbis>armeabi-v7a;arm64-v8a</AndroidSupportedAbis>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Shared.Droid.JPush">
@@ -167,14 +168,20 @@
    <Reference Include="Square.OkIO">
      <HintPath>..\DLL\EZvizMonitor\Square.OkIO.dll</HintPath>
    </Reference>
    <Reference Include="ys">
      <HintPath>..\DLL\EZvizMonitor\ys.dll</HintPath>
    </Reference>
    <Reference Include="Shared.Droid.HDLLinphone">
      <HintPath>..\DLL\Linphone\Android\Shared.Droid.HDLLinphone.dll</HintPath>
    </Reference>
    <Reference Include="Shared.Droid.LCVideoSDK">
      <HintPath>..\DLL\LC\Android\Shared.Droid.LCVideoSDK.dll</HintPath>
    </Reference>
    <Reference Include="ys">
      <HintPath>..\DLL\EZvizMonitor\ys.dll</HintPath>
    </Reference>
    <Reference Include="UMSdkDroid">
      <HintPath>..\DLL\UMeng\UMSdkDroid.dll</HintPath>
    </Reference>
    <Reference Include="ScanSdk">
      <HintPath>..\DLL\Scan\ScanSdk.dll</HintPath>
    </Reference>
  </ItemGroup>
  <ItemGroup>
@@ -200,6 +207,10 @@
    <Compile Include="LeChengVideo\Form\ReverseCallFragment.cs" />
    <Compile Include="LeChengVideoActivity.cs" />
    <Compile Include="Other\HDLONUtils.cs" />
    <Compile Include="WebviewActivity.cs" />
    <Compile Include="AgreementActivity.cs" />
    <Compile Include="Zxing\CustomCaptureActivity.cs" />
    <Compile Include="Zxing\ScanActivity.cs" />
  </ItemGroup>
  <ItemGroup>
    <AndroidAsset Include="Assets\agconnect-services.json" />
@@ -210,6 +221,10 @@
    <AndroidAsset Include="Assets\Phone\FunctionIcon\AirFresh\btnCloseIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\AirFresh\btnInfoIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\AirFresh\HumiOnIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg1.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg2.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg3.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg4.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidResource Include="Resources\values\colors.xml" />
@@ -441,6 +456,33 @@
      </SubType>
      <Generator>
      </Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\layout\activity_splash.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\dialog_background2.xml">
      <SubType></SubType>
      <Generator></Generator>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\btn_agree.xml">
      <SubType></SubType>
      <Generator></Generator>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\btn_disagree.xml">
      <SubType></SubType>
      <Generator></Generator>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </AndroidResource>
    <AndroidResource Include="Resources\layout\activity_webview.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\layout\activity_zxing_layout.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
  </ItemGroup>
  <ItemGroup>
@@ -1308,6 +1350,7 @@
  </ItemGroup>
  <ItemGroup>
    <AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" />
    <AndroidNativeLibrary Include="libs\arm64-v8a\libelianjni.so" />
  </ItemGroup>
  <ItemGroup>
    <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Connect.png" />
@@ -1387,6 +1430,7 @@
  <ItemGroup />
  <ItemGroup>
    <Folder Include="libs\arm64-v8a\" />
    <Folder Include="Zxing\" />
  </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" />
HDL-ON_Android/Other/HDLONUtils.cs
@@ -31,5 +31,13 @@
                System.Console.WriteLine("发送广播刷新图库 catch");
            }
        }
        public static void StartSplashActivity()
        {
            Intent intent = new Intent(Shared.Application.Activity, typeof(SplashActivity));
            Shared.Application.Activity.StartActivity(intent);
            Shared.Application.Activity.Finish();
        }
    }
}
HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,6 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202112131" android:versionName="1.4.3" package="com.hdl.onpro">
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202201141" android:versionName="1.5.2" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools">
    <uses-sdk android:minSdkVersion="28" android:targetSdkVersion="30" />
    <!--友盟-->
    <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>-->
    <!--<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>-->
    <!--<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>-->
    <!--<uses-permission android:name="android.permission.READ_PHONE_STATE"/>-->
    <!--<uses-permission android:name="android.permission.INTERNET"/>-->
    <!-- 乐橙可视对讲需要的权限 -->
    <!--<uses-permission android:name="android.permission.INTERNET" />-->
    <!--网络访问-->
@@ -82,7 +88,17 @@
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.READ_LOGS" />
    <!-- 极光推送结束 -->
    <application android:allowBackup="true" android:icon="@drawable/Icon" android:networkSecurityConfig="@xml/network_security_config" android:largeHeap="true" android:label="On Pro">
    <application android:allowBackup="true" android:debuggable="true" android:icon="@drawable/Icon" android:networkSecurityConfig="@xml/network_security_config" android:largeHeap="true" android:label="On Pro">
        <!--/扫描二维码activity-->
        <!--<activity
            android:name="com.journeyapps.barcodescanner.CaptureActivity"
            android:screenOrientation="portrait"
            tools:replace="screenOrientation" />-->
        <!--CustomCaptureActivity-->
        <!--<activity
            android:name=".CustomCaptureActivity"
            android:screenOrientation="portrait"
            tools:replace="screenOrientation" />-->
        <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.hdl.onpro.fileProvider" android:grantUriPermissions="true" android:exported="false">
            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
        </provider>
HDL-ON_Android/Resources/Resource.designer.cs
Diff too large
HDL-ON_Android/Resources/drawable/btn_agree.xml
New file
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <!-- 圆角的半径 -->
    <corners android:radius="4dp"/>
    <!-- 填充颜色 -->
    <solid
        android:color="#245ec3"        />
    <!--    边框颜色-->
    <stroke
        android:width="0.01dp"
        android:color="#245ec3"/>
</shape>
HDL-ON_Android/Resources/drawable/btn_disagree.xml
New file
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <!-- 圆角的半径 -->
    <corners android:radius="4dp"/>
    <!-- 填充颜色 -->
    <solid
        android:color="@color/white"        />
    <!--    边框颜色-->
    <stroke
        android:width="0.01dp"
        android:color="#245ec3"/>
<!--        <corners-->
<!--            android:topLeftRadius="4dp"-->
<!--            android:topRightRadius="4dp"-->
<!--            android:bottomLeftRadius="4dp"-->
<!--            android:bottomRightRadius="114dp" />-->
</shape>
HDL-ON_Android/Resources/drawable/dialog_background2.xml
New file
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <!-- 圆角的半径 -->
    <corners android:radius="4dp"/>
    <!-- 填充颜色 -->
    <solid
        android:color="@color/white"        />
</shape>
HDL-ON_Android/Resources/layout/activity_splash.xml
New file
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8" ?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/loading"
    android:orientation="vertical">
    <FrameLayout
        android:id="@+id/live_window"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="#55000000">
        <LinearLayout
            android:layout_width="280dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:orientation="vertical"
            android:background="@drawable/dialog_background2">
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/title_tv"
                android:text="@string/privacy_policy_and_service_agreement"
                android:textColor="#bb000000"
                android:layout_marginTop="15dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:textSize="18sp"
                android:gravity="center"/>
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/msg_content_tv"
                android:layout_marginTop="10dp"
                android:layout_marginLeft="16dp"
                android:layout_marginRight="16dp"
                android:text="@string/read_privacy_policy_and_service_agreement_tip"
                android:textColor="#66000000"
                />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="30dp"
                android:id="@+id/privacy_policy_btn"
                android:gravity="center"
                android:text="@string/login_privacy_policy"
                android:textColor="#E6000000"
                android:layout_marginTop="10dp"
                android:layout_marginLeft="16dp"/>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="30dp"
                android:text="@string/login_user_service_agreement"
                android:textColor="#E6000000"
                android:id="@+id/service_agreement_btn"
                android:layout_marginTop="10dp"
                android:layout_marginLeft="16dp"
                android:gravity="center"/>
            <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                android:layout_marginTop="120dp"
                android:layout_marginBottom="20dp"
                android:orientation="horizontal">
                <Button
                    android:layout_width="120dp"
                    android:layout_height="52dp"
                    android:id="@+id/disagree_btn"
                    android:text="@string/disagree"
                    android:textColor="#245ec3"
                    android:layout_marginLeft="13dp"
                    android:layout_alignParentBottom="true"
                    android:background="@drawable/btn_disagree"/>
                <Button
                    android:layout_width="120dp"
                    android:layout_height="52dp"
                    android:id="@+id/agree_btn"
                    android:text="@string/agree"
                    android:textColor="@color/color_white"
                    android:layout_alignParentRight="true"
                    android:layout_alignParentBottom="true"
                    android:layout_marginLeft="14dp"
                    android:background="@drawable/btn_agree"/>
            </LinearLayout>
        </LinearLayout>
    </FrameLayout>
</LinearLayout>
HDL-ON_Android/Resources/layout/activity_webview.xml
New file
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#FFFFFF"
    android:orientation="vertical">
    <LinearLayout
        android:layout_width="80dp"
        android:id="@+id/webview_back_ll"
        android:background="#FFFFFF"
        android:orientation="vertical"
        android:layout_height="44dp">
        <ImageView
            android:layout_width="12dp"
            android:layout_height="20dp"
            android:layout_marginLeft="20dp"
            android:layout_marginTop="11dp"
            android:id="@+id/webview_back_img"
            android:background="@drawable/back_icon"/>
    </LinearLayout>
    <android.webkit.WebView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/webView1"
        android:background="#ffffff"/>
</LinearLayout>
HDL-ON_Android/Resources/layout/activity_zxing_layout.xml
New file
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto/"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <com.journeyapps.barcodescanner.DecoratedBarcodeView
        android:id="@+id/zxing_barcode_scanner"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:zxing_preview_scaling_strategy="centerCrop"
        app:zxing_use_texture_view="true"/>
</LinearLayout>
HDL-ON_Android/Resources/layout/zxing_layout.xml
@@ -1,35 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent">
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center">
      <GateWay.Droid.ZXingOverlayView
      android:layout_width="match_parent"
      android:layout_height="match_parent"/>
    <RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="50dp"
    android:layout_gravity="top"
    android:background="#99000000">
<!--
    <ImageButton
        android:id="@+id/capture_imageview_back"
        android:layout_width="42dp"
        android:layout_height="42dp"
        android:layout_centerVertical="true"
        android:background="@drawable/abc_ic_ab_back_material"/>
-->
    <TextView
        android:id="@+id/tv_zxing_scan"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
    <GateWay.Droid.ZXingOverlayView
        android:layout_width="match_parent"
        android:layout_height="1400dp"
        android:layout_centerInParent="true"
        android:textColor="#ffffffff"
        android:textSize="20sp"
        android:text="扫一扫"/>
        />
</RelativeLayout>
        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="50dp"
            android:layout_gravity="top"
            android:backgroundTint="#99000000">
            <TextView
                android:id="@+id/tv_zxing_scan"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:textColor="#ffffffff"
                android:textSize="20sp"
                android:text="扫一扫"/>
        </RelativeLayout>
  <TextView
      android:id="@+id/tv_zxing_back"
@@ -52,7 +49,6 @@
      android:paddingBottom="10dp"
      android:text="闪光灯"
      android:layout_alignParentRight ="true"
      android:layout_alignParentBottom="true"
        />
      android:layout_alignParentBottom="true"/>
</RelativeLayout>
HDL-ON_Android/Resources/values-zh/strings.xml
@@ -22,4 +22,11 @@
    <string name="talk_open_failed">对讲打开失败</string>
    <string name="unlock_fail">开锁失败</string>
    <string name="screenshot_fail">截图失败</string>
        <string name="login_user_service_agreement">《用户服务协议》</string>
        <string name="login_privacy_policy">《隐私权政策》</string>
        <string name="privacy_policy_and_service_agreement">隐私权政策及服务条款</string>
        <string name="read_privacy_policy_and_service_agreement_tip">为了更好的保障您的合法权益,请您阅读并同意以下协议</string>
        <string name="disagree">不同意</string>
        <string name="agree">同意</string>
</resources>
HDL-ON_Android/Resources/values/strings.xml
@@ -21,4 +21,12 @@
        <string name="talk_open_failed">Intercom failed to open</string>
        <string name="unlock_fail">Fail to unlock</string>
        <string name="screenshot_fail">Fail to screenshot</string>
        <string name="login_user_service_agreement">《User service agreement》</string>
        <string name="login_privacy_policy">《Privacy policy》</string>
        <string name="privacy_policy_and_service_agreement">Privacy policy and terms of service</string>
        <string name="read_privacy_policy_and_service_agreement_tip">In order to better protect your legitimate rights and interests, please read and agree to the following agreement</string>
        <string name="disagree">Disagree</string>
        <string name="agree">Agree</string>
</resources>
HDL-ON_Android/Scan.cs
@@ -1,70 +1,121 @@
using System;
using System.IO;
using Android.Content;
using Shared;
using ZXing.Mobile;
namespace HDL_ON
{
    public class Scan
    public class Scan: Java.Lang.Object,HDL_ON_Android.ScanActivity.ScanResult
    {
        public Scan()
        {
        }
        static MobileBarcodeScanner scanner;
        public static void OpenScan(Action<string> action)
        private static Scan ins;
        public static Scan Ins
        {
            string cancel = "取消";
            string flashText = "";
            string titleText = "二维码扫描";
            if (Language.CurrentLanguage != "Chinese")
            get
            {
                cancel = "Cancel";
                flashText = "";
                titleText = "Scan";
                if (ins == null)
                {
                    ins = new Scan();
                }
                return ins;
            }
        }
        public string TipMsg = string.Empty;
        Action<string> resultAction;
        static MobileBarcodeScanner scanner;
        public void OpenScan(Action<string> action)
        {
            resultAction = action;
            //string cancel = "取消";
            //string flashText = "";
            //string titleText = "二维码扫描";
            //if (Language.CurrentLanguage != "Chinese")
            //{
            //    cancel = "Cancel";
            //    flashText = "";
            //    titleText = "Scan";
            //}
            ((BaseActivity)Shared.Application.Activity).SetCamera(async (obj) =>
            {
                if (obj)
                if (obj)//权限是否打开
                {
                    if (scanner == null)
                    {
                        MobileBarcodeScanner.Initialize(Shared.Application.Activity.Application);
                        var mZXingCustomScanView = new ZXingCustomScanView(Shared.Application.Activity.Application);
                        mZXingCustomScanView.cancelTextView.Text = cancel;
                        mZXingCustomScanView.flashTextView.Text = flashText;
                        mZXingCustomScanView.titleTextView.Text = titleText;
                        var bOn = false;
                        scanner = new ZXing.Mobile.MobileBarcodeScanner()
                        {
                            UseCustomOverlay = true,
                            CustomOverlay = mZXingCustomScanView
                        };
                        mZXingCustomScanView.OnCancel += () =>
                        {
                        var intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.ScanActivity));
                        Shared.Application.Activity.StartActivity(intent);
                            scanner?.Cancel();
                        };
                        HDL_ON_Android.ScanActivity.InitDdd(this);
                        mZXingCustomScanView.OnTorch += () =>
                        {
                            bOn = !bOn;
                            scanner?.Torch(bOn);
                        };
                        //MobileBarcodeScanner.Initialize(Shared.Application.Activity.Application);
                        //var mZXingCustomScanView = new ZXingCustomScanView(Shared.Application.Activity.Application);
                        //mZXingCustomScanView.cancelTextView.Text = cancel;
                        //mZXingCustomScanView.flashTextView.Text = flashText;
                        //mZXingCustomScanView.titleTextView.Text = titleText;
                        //mZXingCustomScanView.SetMinimumWidth( 1800);
                        //var bOn = false;
                        //scanner = new ZXing.Mobile.MobileBarcodeScanner()
                        //{
                        //    UseCustomOverlay = true,
                        //    CustomOverlay = mZXingCustomScanView
                        //};
                        ////scanner.CustomOverlay.width
                        //mZXingCustomScanView.OnCancel += () =>
                        //{
                        //    scanner?.Cancel();
                        //};
                        //mZXingCustomScanView.OnTorch += () =>
                        //{
                        //    bOn = !bOn;
                        //    scanner?.Torch(bOn);
                        //};
                    }
                    var result = await scanner.Scan();
                    if (result != null)
                        action?.Invoke(result.Text);
                    else
                        action?.Invoke(null);
                    //var result = await scanner.Scan();
                    //if (result != null)
                    //    action?.Invoke(result.Text);
                    //else
                    //    action?.Invoke(null);
                }
                else
                {
                    action?.Invoke(null);
                    Action action1 = () => {
                        Intent intent = new Intent(Android.Provider.Settings.ActionApplicationDetailsSettings);
                        intent.AddFlags(ActivityFlags.NewTask);
                        Android.Net.Uri uri = Android.Net.Uri.FromParts("package", Application.Activity.PackageName, null);
                        intent.SetData(uri);
                        Application.Activity.StartActivity(intent);
                    };
                    if (string.IsNullOrEmpty(TipMsg))
                    {
                        if (Language.CurrentLanguage == "Chinese")
                        {
                            new HDL_ON.UI.PublicAssmebly().TipOptionMsg(StringId.Tip, "相机访问权限已被拒绝,请前往系统设置打开相关权限。", action1);
                        }
                        else
                        {
                            new HDL_ON.UI.PublicAssmebly().TipOptionMsg(StringId.Tip, "Camera access has been denied. Please go to system settings to open relevant permissions.", action1);
                        }
                    }
                    else
                    {
                        new HDL_ON.UI.PublicAssmebly().TipOptionMsg(StringId.Tip, TipMsg,action1,45);
                        TipMsg = string.Empty;
                    }
                }
            });
        }
@@ -122,5 +173,22 @@
        //        }
        //    });
        //}
        //static void initFromCameraParameters(Android.Graphics.Camera camera)
        //{
        //    //camera.SetLocation
        //}
        public void onResult(string result)
        {
            if (!string.IsNullOrEmpty( result))
                resultAction?.Invoke(result);
            else
                resultAction?.Invoke(null);
        }
    }
}
HDL-ON_Android/SplashActivity.cs
@@ -1,28 +1,332 @@
using Android.App;
using System;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.Net;
using Android.OS;
using CN.Jpush.Android.Api;
//using Android.Widget;
using Com.Hdl.ON.Jpush.Androidjpush;
using HDL_ON;
using Java.Util;
using Microsoft.AppCenter;
using Microsoft.AppCenter.Analytics;
using Microsoft.AppCenter.Crashes;
using Shared;
namespace HDL_ON_Android
{
    [Activity(Theme = "@style/SplashTheme", MainLauncher = true, Name = "com.hdl.onpro.SplashActivity")]
    [Activity(Theme = "@style/SplashTheme", MainLauncher = true, Name = "com.hdl.onpro.SplashActivity",ScreenOrientation = ScreenOrientation.Portrait) ]
    [IntentFilter(new string[] { "com.hdl.onpro.SplashActivity", Intent.ActionView })]
    public class SplashActivity : Activity
    {
        protected override void OnActivityResult(int requestCode, Result resultVal, Intent data)
        {
            if (requestCode == 99)
            {
                if (resultVal == Result.Ok)
                {
                    if (!OnAppConfig.Instance.FirstRunApp)
                    {
                        //初始化友盟sdk
                        Com.Hdl.Umsdk.UmSdk.InitUmSdk(this, "61d565d9e0f9bb492bbc3d5a", "Android");
                        //初始化友盟sdk config
                        Com.Hdl.Umsdk.UmSdk.InitUMConfigure(this, "61d565d9e0f9bb492bbc3d5a", "Android", "");
                        ////打开baseActivity
                        Intent i = new Intent(this, typeof(BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
                        StartActivityForResult(i, 1);
                        OverridePendingTransition(0, 0);
                        initAll();
                        initOhterSdk();
                        Finish();//关闭自己
                    }
                }
            }
            base.OnActivityResult(requestCode, resultVal, data);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            //Intent i = new Intent(this, typeof(BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
            //StartActivityForResult(i, 1);
            //OverridePendingTransition(0, 0);
            //initAll();
            //打开baseActivity
            Intent i = new Intent(this, typeof(BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
            StartActivity(i);
            OverridePendingTransition(0, 0);
            Finish();
            if (HDL_ON.OnAppConfig.Instance.FirstRunApp || !HDL_ON.OnAppConfig.Instance.isAgreePrivacyPolicy)
            {
                Intent intent = new Intent(this, typeof(AgreementActivity));
                StartActivityForResult(intent,99);
            }
            else
            {
                //初始化友盟sdk
                Com.Hdl.Umsdk.UmSdk.InitUmSdk(this, "61d565d9e0f9bb492bbc3d5a", "Android");
                //初始化友盟sdk config
                Com.Hdl.Umsdk.UmSdk.InitUMConfigure(this, "61d565d9e0f9bb492bbc3d5a", "Android","");
                ////打开baseActivity
                Intent i = new Intent(this, typeof(BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
                StartActivityForResult(i, 1);
                OverridePendingTransition(0, 0);
                initAll();
                initOhterSdk();
                Finish();//关闭自己
            }
        }
        void initOhterSdk()
        {
            //注册未处理异常事件
            AppCenter.Start("64ac5859-2cd7-4ef8-a5da-5455e29679ec", typeof(Analytics), typeof(Crashes));
            //手机名称 Android.OS.Build.Manufacturer;
            //OnAppConfig.Instance.PhoneName = Android.OS.Build.Manufacturer;
            //#if DEBUG
            //CN.Jpush.Android.Api.JPushInterface.SetDebugMode(true);
            //#endif
            JPushInterface.Init(this);
            BaseActivity.OnCreateActoin += (activity, application) =>
            {
                //获取极光推送ID
                GetJPushRegistrationID(activity);
            };
        }
        /// <summary>
        /// 所有初始化全部在这个方法实现
        /// </summary>
        void initAll()
        {
            //禁止屏幕长亮
            BaseActivity.KeepScreenON = false;
            //隐藏虚拟按键
            BaseActivity.IsHideVirualButtons = true;
            //实现安卓返回按键
            BaseActivity.BackKeyAction = () =>
            {
                try
                {
                    var result = MainPage.LoadEvent_BackAction();
                    switch (result)
                    {
                        case 0:
                            break;
                        case 1:
                        case 2:
                            BaseActivity.VerifyDateTime = DateTime.MaxValue;
                            break;
                        default:
                            BaseActivity.VerifyDateTime = DateTime.MaxValue;
                            break;
                    }
                }
                catch (Exception ex)
                {
                    MainPage.Log(ex.Message);
                    BaseActivity.VerifyDateTime = DateTime.MaxValue;
                }
            };
            BaseActivity.OnCreateActoin += (activity, application) =>
            {
                Language.CurrentLanguage = "Chinese";
                Locale locale1 = Locale.Default;
                var localeList = Resources.Configuration.Locale;
                if (localeList.Language == "zh")
                {
                    Language.CurrentLanguage = "Chinese";
                }
                else
                {
                    Language.CurrentLanguage = "English";
                }
                BaseActivity.NetworkStateChanged += (int internetStatus) =>
                {
                    //if (!IsEnterBackground)
                    //{
                    //    ////BusSocket.Stop();
                    //    //new System.Threading.Thread(() =>
                    //    //{
                    //    //    System.Threading.Thread.Sleep(1000);
                    //    //    //BusSocket.Start();
                    //    //})
                    //    //{ IsBackground = true }.Start();
                    //}
                    //else
                    //{
                    //    Console.WriteLine("HHH 网络变化但处于后台");
                    //}
                    //网络变化处理
                    HDLCommon.Current.UpdateInternetStatus((int)internetStatus, MainPage.IsEnterBackground);
                };
            };
            BaseActivity.RefreshUIAction += (activity) =>
            {
                MainPage.Show();
                checkSomeInfo();
            };
            BaseActivity.OnResumeAction += (activity) =>
            {
                checkSomeInfo();
            };
            BaseActivity.OnDestroyAction += (activity) =>
            {
                Console.WriteLine("OnDestroyAction");
                //BusSocket.Stop();
                //UserInfo.Current.unlockTime = DateTime.Now;
            };
            HDLUtils.SetAuthoritiesName("com.hdl.onpro.fileProvider");
            //Shared.Application.IsGpsEnable = true;
            bool isfirst = true;
            //获取经纬度
            Shared.Application.LocationAction = (lon, lat) =>
            {
                try
                {
                    if (isfirst)
                    {
                        //只触发一次
                        //Shared.Application.LocationAction = null;
                        new HDL_ON.DAL.Server.HttpServerRequest().GetCityWeatherInfo(lon.ToString(), lat.ToString());
                    }
                    isfirst = false;
                    ///监听经纬度
                    HDL_ON.UI.UI2.Intelligence.Automation.LogicMethod.CurrLogicMethod.AppLatAndLonEvent(lon, lat);
                    //关闭定位服务
                    //Shared.Application.StopGPSLocationService();
                }
                catch (Exception ex)
                {
                    Utlis.WriteLine("GetCityInfo catch" + ex.Message);
                }
                MainPage.Log($"经纬度:::{lon}:{lat}");
            };
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="activity"></param>
        void GetJPushRegistrationID(BaseActivity activity)
        {
            try
            {
                //保存获取的极光服务器上的注册ID到本地文件
                var tokenID = JPushInterface.GetRegistrationID(activity);
                Console.WriteLine("RegistrationID:  " + tokenID);
                if (!string.IsNullOrEmpty(tokenID) && OnAppConfig.Instance.PushDeviceToken != tokenID)
                {
                    OnAppConfig.Instance.PushDeviceToken = tokenID;
                    OnAppConfig.Instance.PhoneName = Android.OS.Build.Manufacturer;
                    OnAppConfig.Instance.SaveConfig();
                }
                int loadTokenCount = 0;
                System.Threading.Tasks.Task.Run(() =>
                {
                    while (string.IsNullOrEmpty(tokenID))
                    {
                        System.Threading.Thread.Sleep(1000);
                        tokenID = JPushInterface.GetRegistrationID(activity);
                        Console.WriteLine("Sleep.tokenID + " + JPushInterface.GetRegistrationID(activity));
                        loadTokenCount++;
                        if (loadTokenCount > 30)
                        {
                            break;
                        }
                    }
                    Console.WriteLine("RegistrationID:  " + tokenID);
                    if (!string.IsNullOrEmpty(tokenID) && OnAppConfig.Instance.PushDeviceToken != tokenID)
                    {
                        OnAppConfig.Instance.PushDeviceToken = tokenID;
                        OnAppConfig.Instance.PhoneName = Android.OS.Build.Manufacturer;
                        OnAppConfig.Instance.SaveConfig();
                    }
                });
            }
            catch
            {
            }
        }
        public static bool IsShowTip = true;
        void checkSomeInfo()
        {
            try
            {
                IsShowTip = true;
                var status = isNetworkAvailable(this);
                int internetStatus = 0;
                if (!status)
                {
                    internetStatus = 0;
                }
                var isWifi = isWifiConnected(this);
                if (isWifi)
                {
                    internetStatus = 2;
                }
                else
                {
                    internetStatus = 1;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"android check some info erorr : {ex.Message}");
            }
        }
        bool isNetworkAvailable(Context context)
        {
            var cm = (ConnectivityManager)context.GetSystemService(ConnectivityService);
            if (cm == null || cm.ActiveNetworkInfo == null)
            {
                return false;
            }
            else
            {
                return cm.ActiveNetworkInfo.IsAvailable;
            }
        }
        bool isWifiConnected(Context context)
        {
            if (context != null)
            {
                var mConnectivityManager = (ConnectivityManager)context.GetSystemService
                (ConnectivityService);
                var mWiFiNetworkInfo = mConnectivityManager.GetNetworkInfo(ConnectivityType.Wifi);
                if (mWiFiNetworkInfo != null)
                {
                    return mWiFiNetworkInfo.IsAvailable;
                }
            }
            return false;
        }
    }
}
HDL-ON_Android/WebviewActivity.cs
New file
@@ -0,0 +1,40 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Webkit;
using Android.Widget;
namespace HDL_ON_Android
{
    [Activity(Label = "WebviewActivity",Theme = "@style/MyTheme1")]
    public class WebviewActivity : Activity
    {
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            // Create your application here
            SetContentView(Resource.Layout.activity_webview);
            string url = Intent.GetStringExtra("url");
            WebView view = FindViewById<WebView>(Resource.Id.webView1);
            view.LoadUrl(url);
            LinearLayout btnBack = FindViewById<LinearLayout>(Resource.Id.webview_back_ll);
            btnBack.Click += (sender, e) => {
                Finish();
            };
        }
    }
}
HDL-ON_Android/ZXingOverlayView.cs
@@ -7,7 +7,7 @@
namespace GateWay.Droid
{
    public class ZXingOverlayView: View
    public class ZXingOverlayView : View
    {
        float screenRate;
        float lineWidth;
@@ -50,7 +50,7 @@
            lineWidth = 2 * context.Resources.DisplayMetrics.Density;
            textSize = 16 * context.Resources.DisplayMetrics.Density;
        }
        //添加屏幕半透明填充色
HDL-ON_Android/Zxing/CustomCaptureActivity.cs
New file
@@ -0,0 +1,102 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.OS;
using Android.Runtime;
using Android.Support.V7.App;
using Android.Views;
using Android.Widget;
using Com.Journeyapps.Barcodescanner;
namespace HDL_ON_Android
{
    [Activity(Label = "CustomCaptureActivity", Theme = "@style/MyTheme1", ScreenOrientation = ScreenOrientation.Portrait)]
    public class CustomCaptureActivity : AppCompatActivity//Activity
    {
        /**
         * 条形码扫描管理器
         */
        private CaptureManager mCaptureManager;
        /**
         * 条形码扫描视图
         */
        private DecoratedBarcodeView mBarcodeView;
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_zxing_layout);
            mBarcodeView = (DecoratedBarcodeView)FindViewById(Resource.Id.zxing_barcode_scanner);
            mCaptureManager = new CaptureManager(this, mBarcodeView);
            mCaptureManager.InitializeFromIntent(this.Intent, savedInstanceState);//getIntent(),
            mCaptureManager.Decode();
        }
        protected override void OnResume()
        {
            base.OnResume();
            mCaptureManager.OnResume();
        }
        protected override void OnPause()
        {
            base.OnPause();
            mCaptureManager.OnPause();
        }
        protected override void OnDestroy()
        {
            base.OnDestroy();
            mCaptureManager.OnDestroy();
        }
        protected override void OnSaveInstanceState(Bundle outState)
        {
            base.OnSaveInstanceState(outState);
            mCaptureManager.OnSaveInstanceState(outState);
        }
        /**
         * 权限处理
         */
        public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults)
        {
            int[] rg = new int[grantResults.Length] ;
            foreach(var g in grantResults)
            {
                rg.Append((int)g);
            }
            mCaptureManager.OnRequestPermissionsResult(requestCode, permissions, rg);
        }
        //public override void OnRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults)
        //{
        //    mCaptureManager.onRequestPermissionsResult(requestCode, permissions, grantResults);
        //}
        /**
         * 按键处理
         */
        public override bool OnKeyDown([GeneratedEnum] Keycode keyCode, KeyEvent e)
        {
            //return base.OnKeyDown(keyCode, e);
            return mBarcodeView.OnKeyDown(keyCode, e) || base.OnKeyDown(keyCode, e);
        }
        //public boolean onKeyDown(int keyCode, KeyEvent event) {
        //    return mBarcodeView.onKeyDown(keyCode, event) || super.onKeyDown(keyCode, event);
        //}
    }
}
HDL-ON_Android/Zxing/ScanActivity.cs
New file
@@ -0,0 +1,82 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Com.Google.Zxing.Integration.Android;
namespace HDL_ON_Android
{
    [Activity(Label = "ScanActivity")]
    public class ScanActivity : Activity
    {
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            // Create your application here
            IntentIntegrator intentIntegrator = new IntentIntegrator(this);
            intentIntegrator.SetCaptureActivity(Java.Lang.Class.FromType(typeof(HDL_ON_Android.CustomCaptureActivity)));
            intentIntegrator.SetOrientationLocked(false);
            intentIntegrator.SetPrompt("");
            intentIntegrator.InitiateScan();
        }
        protected override void OnRestart()
        {
            base.OnRestart();
            Finish();
        }
        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            // 获取解析结果
            IntentResult result = IntentIntegrator.ParseActivityResult(requestCode, (int)resultCode, data);
            if (result != null)
            {
                if (result.Contents != null)
                {
#if DEBUG
                    Console.WriteLine("二维码扫描结果:" + result.Contents);
#endif
                    if(scanResult != null)
                    {
                        scanResult.onResult(result.Contents);
                    }
                }
            }
            else
            {
                base.OnActivityResult(requestCode, resultCode, data);
            }
        }
        public static ScanResult scanResult;
        public static void InitDdd(ScanResult sr)
        {
            scanResult = sr;
        }
        public interface ScanResult
        {
            void onResult(string result);
        }
    }
}
HDL-ON_Android/libs/arm64-v8a/libelianjni.so
Binary files differ
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -110,6 +110,9 @@
        <Reference Include="Shared.IOS.HDLSceneSiri">
          <HintPath>..\..\HDLXamarinSceneSiri\Shared.IOS.HDLSceneSiri\Shared.IOS.HDLSceneSiri\bin\Release\Shared.IOS.HDLSceneSiri.dll</HintPath>
        </Reference>
        <Reference Include="UMSdk">
          <HintPath>..\DLL\UMeng\UMSdk.dll</HintPath>
        </Reference>
    </ItemGroup>
    <ItemGroup>
      <PackageReference Include="Newtonsoft.Json">
@@ -1380,6 +1383,10 @@
      <BundleResource Include="Resources\Phone\FunctionIcon\AirFresh\btnInfoIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\AirFresh\HumiOnIcon.png" />
      <BundleResource Include="Resources\Phone\PersonalCenter\SiriIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg1.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg2.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg3.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg4.png" />
    </ItemGroup>
    <ItemGroup>
      <ITunesArtwork Include="iTunesArtwork" />
HDL-ON_iOS/Info.plist
@@ -100,9 +100,9 @@
    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleLightContent</string>
    <key>CFBundleShortVersionString</key>
    <string>1.4.302112152</string>
    <string>1.5.102101121</string>
    <key>CFBundleVersion</key>
    <string>1.4.12151</string>
    <string>1.5.101121</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Use geographic location to provide services such as weather</string>
    <key>NSAppleMusicUsageDescription</key>
HDL-ON_iOS/Resources/Language.ini
@@ -293,7 +293,7 @@
289=Remove The Binding
290=Fail to get the history
291=No favorites
292=About ON+
292=About On Pro
293=Member
294=Administrator
295=Change password
@@ -369,7 +369,7 @@
365=Can not communicate with the server, fail to edit the scene information
366=Can not communicate with the server, fail to delete the scene
367=Can not communicate with the server, fail to delete the floor
368=Welcome to enjoy ON+
368=Welcome to enjoy On Pro
369=Add new residence
370=Become family member
371=Can not use the function, please bind the gateway
@@ -422,7 +422,7 @@
436=Added Devices
437=Device List
438=humidity:{0}%    air:{1}    wind:{2}
439=Real time: {0} kw
439=Real time: {0} kW
440=Next step
441=Please select all areas of capture status
442=Generate Scene
@@ -502,6 +502,16 @@
514=Gateway location information is not configured
515=Add Security
516=Withdrawal
517=Instantaneous value
518=Cumulative power consumption
519=Voltage (V)
520=Electric Current (A)
521=Power (W)
522=Refresh
523=Delay alarm
524=Bypass
525=Enable
526=Cancel account
 
1000=Room Humidity
1001=V-chip
@@ -1495,7 +1505,7 @@
365=无法与服务器通讯,场景信息编辑失败。
366=无法与服务器通讯,场景删除失败。
367=无法与服务器通讯,楼层删除失败。
368=欢迎使用ON+
368=欢迎使用On Pro
369=添加新住宅
370=成为家庭成员
371=功能无法使用,请绑定网关
@@ -1627,6 +1637,16 @@
514=未配置网关位置信息
515=添加安防
516=撤销同意
517=瞬时值
518=累计用电
519=电压(V)
520=电流(A)
521=功率(W)
522=刷新
523=延时报警
524=停用
525=启用
526=注销账号
 
1000=室内湿度
1001=童锁
@@ -1728,10 +1748,9 @@
1092=生效时间
1092=Effective time
1093=失效时间
1093=
1094=选择时间
1095=选择日期
1096=Generate
1096=生成
1097=临时密码已经复制
1098=清除当前临时密码?
1099=生效时间必须大于失效时间
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg2.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg3.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg4.png
HDL-ON_iOS/Scan.cs
@@ -8,12 +8,27 @@
    public class Scan
    {
        public string TipMsg = "";
        public Scan()
        {
        }
        private static Scan ins;
        public static Scan Ins
        {
            get
            {
                if (ins == null)
                {
                    ins = new Scan();
                }
                return ins;
            }
        }
        static MobileBarcodeScanner scanner;
        public static async void OpenScan(Action<string> action)
        public async void OpenScan(Action<string> action)
        {
            string cancel = "取消";
            string flashText = "";
HDL-ON_iOS/ViewController.cs
@@ -48,6 +48,19 @@
            }
            //启动友盟sdk
            new System.Threading.Thread(() => {
                while (true)
                {
                    if (OnAppConfig.Instance.IsLogin)
                    {
                        var um = new UMSdk.HDLUMSDK();
                        um.InitUMSDKWithAppKey("61d56642e0f9bb492bbc3e72", "IOS");
                    }
                    System.Threading.Thread.Sleep(1000);
                }
            }) { IsBackground = true }.Start();
        }
        public override UIStatusBarStyle PreferredStatusBarStyle()
        {
HDL_ON/Common/Constant.cs
@@ -1,4 +1,6 @@
using System;
using Shared;
namespace HDL_ON
{
    #region ■ 全局常量 ____________________________
@@ -10,11 +12,34 @@
        /// <summary>
        /// 用户协议
        /// </summary>
        public const string URL_USERAGREEMENT = "https://developer.hdlcontrol.com/HDLOnPlusUserAgreement.html";
        public static string URL_USERAGREEMENT {
            get {
                if (Language.CurrentLanguage == "Chinese") {
                    return "https://developer.hdlcontrol.com/HDLOnPlusUserAgreement.html";
                }
                else
                {
                    return "https://developer.hdlcontrol.com/OnProServiceAgreement-En.html";
                }
            }
        }
        /// <summary>
        /// 隐私政策
        /// </summary>
        public const string URL_PRIVACYPOLICY = "https://developer.hdlcontrol.com/HDLOnPlusPrivacyPolicy.html";
        public static string URL_PRIVACYPOLICY
        {
            get
            {
                if (Language.CurrentLanguage == "Chinese")
                {
                    return "https://developer.hdlcontrol.com/HDLOnPlusPrivacyPolicy.html";
                }
                else
                {
                    return "https://developer.hdlcontrol.com/OnProUserAgreement-En.html";
                }
            }
        }
        /// <summary>
        /// 技术支持电话号码
        /// </summary>
HDL_ON/Common/OnAppConfig.cs
@@ -90,6 +90,10 @@
        /// 是否同意协议
        /// </summary>
        public bool isAgreePrivacyPolicy;
        /// <summary>
        /// 第一次启动app
        /// </summary>
        public bool FirstRunApp = true;
        /// <summary>
        /// 忽略更新的版本号
HDL_ON/Common/R.cs
@@ -4,6 +4,47 @@
{
    public static class StringId
    {
        /// <summary>
        /// 注销账号
        /// </summary>
        public const int CancelAccount = 526;
        /// <summary>
        /// 启用
        /// </summary>
        public const int Enable = 525;
        /// <summary>
        /// 停用
        /// </summary>
        public const int Bypass = 524;
        /// <summary>
        /// 触发后延时报警
        /// </summary>
        public const int DelayAlarm = 523;
        /// <summary>
        /// 刷新
        /// </summary>
        public const int Refresh = 522;
        /// <summary>
        /// 功率(W)
        /// </summary>
        public const int ActivePowerAndUnit = 521;
        /// <summary>
        /// 电流(A)
        /// </summary>
        public const int CurrentAndUnit = 520;
        /// <summary>
        /// 电压(V)
        /// </summary>
        public const int VoltageAndUnit = 519;
        /// <summary>
        /// 累计用电
        /// </summary>
        public const int CumulativePowerConsumption = 518;
        /// <summary>
        /// 瞬时值
        /// </summary>
        public const int InstantaneousValue = 517;
        /// <summary>
        /// 撤销同意
        /// </summary>
HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs
@@ -196,5 +196,15 @@
                return $"/user/{Control.Ins.GatewayId}/custom/security/list/get";
            }
        }
        #region 门锁
        public string OneKeyUnlock
        {
            get
            {
                return $"/base/{Control.Ins.GatewayId}/thing/service/doorRemoteOpen/down";
            }
        }
        #endregion
    }
}
HDL_ON/DAL/DriverLayer/Control.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using HDL_ON.DAL.Server;
using HDL_ON.Entity;
using HDL_ON.UI;
using Shared;
@@ -25,7 +26,7 @@
    public class Control
    {
        static Control _control;
        public static Control Ins
        {
@@ -503,11 +504,18 @@
            {
                new System.Threading.Thread(() =>
                {
                    foreach (var temp in functions)
                    foreach (var function in functions)
                    {
                        Dictionary<string, string> d1 = new Dictionary<string, string>();
                        d1.Add(FunctionAttributeKey.OnOff, open ? "on" : "off");
                        SendWriteCommand(temp, d1);
                         if (function.spk == SPK.PanelSocket)
                        {
                            if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null)
                            {
                                d1.Add("on_off_usb", function.trait_on_off.curValue.ToString());
                            }
                        }
                        SendWriteCommand(function, d1);
                        System.Threading.Thread.Sleep(100);
                    }
                })
@@ -761,8 +769,8 @@
            topicAndLengthBytes.CopyTo(sendDataBytes, 0);
            bodyBytes.CopyTo(sendDataBytes, topicAndLengthBytes.Length);
            //var sendDataString = Encoding.UTF8.GetString(sendDataBytes);
            //MainPage.Log($"转换HDL-Link数据\r\n{sendDataString}\r\n");
            var sendDataString = Encoding.UTF8.GetString(sendDataBytes);
            MainPage.Log($"转换HDL-Link数据\r\n{sendDataString}\r\n");
            //***************************************************************
            return sendDataBytes;
@@ -835,7 +843,7 @@
                            var revString = Encoding.UTF8.GetString(receiveBytes);
                            receiveObj.BodyDataString = revString;
                            MainPage.Log($"局域网信息: 解密后:" + receiveObj.BodyDataString);
                            //if(receiveObj.Topic.EndsWith("/thing/property/up"))
                            //if (receiveObj.Topic.EndsWith("/thing/property/up"))
                            //{
                            //    MsgInfoList.Add(revString + "\r\n");
                            //}
@@ -858,7 +866,7 @@
                if (receiveObj.Topic == CommunicationTopic.SearchLoaclGatewayReply || receiveObj.Topic == CommunicationTopic.GatewayBroadcast)
                {
                    var bodyJObj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponsePack>(res[1]);
                    if (bodyJObj == null)
                    {
@@ -974,6 +982,8 @@
                        {
                            continue;
                        }
                        MainPage.Log(localFunction.name);
                        if (Ins.GatewayOnline_Local && isCloudData)//本地链接,除了涂鸦设备数据之外的云端数据不处理
                        {
                            if (!SPK.Get3tySpk(SPK.BrandType.All3tyBrand).Contains(localFunction.spk) && !SPK.MusicSpkList().Contains( localFunction.spk))
@@ -998,6 +1008,7 @@
                        {
                            localFunction.time_stamp = temp.time_stamp;
                            localFunction.SetAttrState(attr.key, attr.value);
                            //Console.WriteLine("音乐播放器添加缓存数据=======" + revString);
                        }
@@ -1154,6 +1165,7 @@
                            case SPK.ElectricSocket:
                            case SPK.PanelSocket:
                                SocketPage.UpdataState(localFunction);
                                SocketPage_InstantaneousValue.UpdataView(localFunction);
                                break;
                            case SPK.ElectricTV:
                                break;
@@ -1201,5 +1213,35 @@
            }
        }
        #region 门锁
        /// <summary>
        /// //一键(远程)开锁
        /// </summary>
        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 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);
            }
            else
            {
                Dictionary<string, object> d = new Dictionary<string, object>();
                d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
                d.Add("deviceId", doorlock.deviceId);
                var requestJson = HttpUtil.GetSignRequestJson(d);
                HttpUtil.RequestHttpsPost("/home-wisdom/app/device/door/remoteOpen", requestJson);
            }
        }
        //密码冻结
        //密码验证
        #endregion
    }
}
}
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -454,10 +454,10 @@
                                            var securityString = Encoding.UTF8.GetString(securityBytes);
                                            var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityStatusObj>(securityString);
                                            MainPage.Log($"安防状态变化:{securityString}");
                                            //Control.Ins.MsgInfoList.Add($"远程安防状态变化:{securityString}" + "\r\n");
                                            if (temp != null)
                                            {
                                                Control_Udp.ReceiveRepeatManager(temp.id, null);
                                                foreach (var updataSecurity in temp.objects)
                                                {
                                                    var updataLocalSecurity = FunctionList.List.securities.Find((obj) => obj.sid == updataSecurity.sid);
@@ -484,6 +484,7 @@
                                    var revString = Encoding.UTF8.GetString(bytes);
                                    MainPage.Log($"mqtt 状态更新:{revString}");
                                    Control.Ins.UpdataFunctionStatus(revString, null, true);
                                    //Control.Ins.MsgInfoList.Add(revString + "\r\n");
                                }
                                //一端口数据解析
                                else
@@ -752,6 +753,9 @@
        /// </summary>
        static void ReceiveNotifySqueezeAsync(string mMes)
        {
#if DEBUG
            return;
#endif
            if (mMes == PushSignStr) return;//是自己的登录推送不处理//或者当前不是远程链接状态
            //测试账号,不挤下线
            switch (UserInfo.Current.userMobileInfo)
@@ -808,7 +812,9 @@
        static void SendPushSignOut()
        {
            byte[] message = Encoding.UTF8.GetBytes(PushSignStr);
#if DEBUG
            MqttRemoteSend(message, 4);
#endif
        }
        /// <summary>
HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </summary>
        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        /// <summary>
        /// RegionMark
        /// </summary>
HDL_ON/Entity/Function/Function.cs
@@ -170,6 +170,9 @@
                    case SPK.HvacFan:
                        iconPath = "electricalfan";
                        break;
                    case SPK.HvacFloorHeat:
                        iconPath = "floorHeatstandard";
                        break;
                    case SPK.ElectricTuyaFan2:
                        iconPath = "electricaltyqborgovyzytytz";
                        break;
@@ -698,6 +701,24 @@
            sendDataObj.objects.Add(acd);
            return sendDataObj;
        }
        public AlinkDoorlockObj GetGatewayAlinkDoorlockData(string userId,string extStr)
        {
            var sendDataObj = new AlinkDoorlockObj();
            sendDataObj.id = Control.Ins.msg_id.ToString();
            sendDataObj.time_stamp = Utlis.GetTimestamp();
            var acd = new AlinkDoorlockStatus();
            acd.sid = sid;
            acd.user_id = userId;
            acd.ext_str = extStr;
#if DEBUG
            acd.user_id = "013";
            acd.ext_str = "999999";
#endif
            sendDataObj.objects.Add(acd);
            return sendDataObj;
        }
        /// <summary>
        /// 获取Api控制数据
        /// </summary>
@@ -751,6 +772,24 @@
        public string time_stamp = "";
        public string id = "";
    }
    /// <summary>
    /// 门锁通讯数据
    /// </summary>
    public class AlinkDoorlockObj
    {
        public List<AlinkDoorlockStatus> objects = new List<AlinkDoorlockStatus>();
        public string time_stamp = "";
        public string id = "";
    }
    public class AlinkDoorlockStatus
    {
        public string sid;
        public string user_id;
        public string ext_str;
    }
    /// <summary>
    /// 本地状态读取
    /// A协议状态读取格式对象
@@ -1110,7 +1149,17 @@
    public static class SPK
    {
        /// <summary>
        /// 门锁
        /// </summary>
        public const string DoorLock = "security.door";
        public static List<string> GetDoorLockSPKList()
        {
            var list = new List<string>();
            list.Add(DoorLock);
            return list;
        }
        #region 灯光
HDL_ON/Entity/Function/Scene.cs
@@ -515,7 +515,7 @@
            var cctState = status.Find((obj) => obj.key == FunctionAttributeKey.CCT);
            if(cctState != null)
            {
                sceneFunctionInfo += cctState.value + "%" + " ";
                sceneFunctionInfo += cctState.value + "K" + " ";
            }
            var rgbState = status.Find((obj) => obj.key == FunctionAttributeKey.RGB);
            if(rgbState!=null)
HDL_ON/Entity/Function/SecurityAlarm.cs
@@ -33,6 +33,10 @@
        /// </summary>
        public string delay ="0";
        /// <summary>
        /// 报警延时
        /// </summary>
        public string output_delay = "0";
        /// <summary>
        /// 状态
        /// 布防:enable
        /// 撒防:disable
@@ -272,9 +276,9 @@
        /// </summary>
        public string sid;
        /// <summary>
        /// Bypass设置 true:启用中、false:临时bypass中
        /// Bypass设置 false:启用中、true:临时bypass中
        /// </summary>
        public string bypass;
        public string bypass = "false";
        /// <summary>
        /// 安防输入条件
        /// </summary>
@@ -457,6 +461,10 @@
        /// 值    
        /// </summary>
        public string value;
        /// <summary>
        /// Bypass设置 true:临时bypass中、false:启用中
        /// </summary>
        public bool bypass = false;
    }
    /// <summary>
@@ -483,7 +491,7 @@
        /// <summary>
        /// 本地不存在数据(数据可能被删了)
        /// </summary>
        public bool NoLocalData ()
        public bool LocalData ()
        {
            var function = FunctionList.List.GetLightList().Find((obj) => obj.sid == sid);
            if (function != null)
HDL_ON/Entity/FunctionList.cs
@@ -72,6 +72,12 @@
            return Functions.FindAll((obj) => spkList.Contains(obj.spk));
        }
        public List<Function> GetDoorLockList()
        {
            var spkList = SPK.GetDoorLockSPKList();
            return Functions.FindAll((obj) => spkList.Contains(obj.spk));
        }
        /// <summary>
        /// 新风列表
        /// </summary>
@@ -139,6 +145,23 @@
            var spkList = SPK.ArmSensorSpkList();
            return Functions.FindAll((obj) => spkList.Contains(obj.spk));
        }
        /// <summary>
        /// 安防中心支持的传感器列表
        /// </summary>
        public List<Function> GetArmCenterList()
        {
            var spkList = new List<string>()
            {
                SPK.SensorPir,
                SPK.SensorDoorWindow,
                SPK.SensorSmoke,
                SPK.SensorWater,
                SPK.SensorGas,
            };
            return Functions.FindAll((obj) => spkList.Contains(obj.spk));
        }
        /// <summary>
        /// 可视对讲列表,当为null或size为0则不显示可视对讲icon
@@ -175,6 +198,19 @@
        /// </summary>
        public List<SecurityAlarm> securities = new List<SecurityAlarm>();
        public List<SecurityAlarm> GetOrdinarySecurities()
        {
            var ordinarySecurities = new List<SecurityAlarm>();
            foreach (var mode in securities)
            {
                if (mode.type == "all_day" || mode.type == "mute")
                {
                    continue;
                }
                ordinarySecurities.Add(mode);
            }
            return ordinarySecurities;
        }
        /// <summary>
        /// 加载功能列表
HDL_ON/HDL_ON.projitems
@@ -463,6 +463,9 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\2-Classification\SceneControlZone.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\CalculatedDistance.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\PushConfigPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\SocketPage_InstantaneousValue.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\SocketPage_CumulativePowerConsumption.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\CancelAccountPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Music\MusicMain.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Music\A31MusicModel.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Music\A31MusicSourcePage.cs" />
HDL_ON/UI/BindingResidence/BindingResidencePage.cs
@@ -91,7 +91,15 @@
            btnAddNewResidence.MouseUpEventHandler = (sender, e) =>
            {
                Scan.OpenScan((scanString) =>
                if (Language.CurrentLanguage == "Chinese")
                {
                    Scan.Ins.TipMsg = "您已拒绝App相机访问权限,这将导致您无法使用扫描二维码绑定我的家庭,但您可以通过加入其他用户的家庭,体验智能家居服务,如需启用绑定我的家庭服务,请前往手机系统设置打开相关权限";
                }
                else
                {
                    Scan.Ins.TipMsg = "You have denied access to the app camera, which will make you unable to bind my family with the scanned QR code, but you can experience smart home services by joining other users' families. To enable the bind my family service, please go to the mobile phone system settings to open the relevant permissions";
                }
                Scan.Ins.OpenScan((scanString) =>
                {
                    //执行绑定住宅
                    this.DoBindResidence(scanString);
@@ -218,7 +226,7 @@
            btnRedo.MouseUpEventHandler += (sender, e) =>
            {
                Scan.OpenScan((scanString) =>
                Scan.Ins.OpenScan((scanString) =>
                {
                    frameBack.Close();
                    //执行绑定住宅
HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@
    /// <summary>
    /// 版本号
    /// </summary>
    public static string VersionString = "1.4.3";
    public static string VersionString = "1.5.2";
    ///// <summary>
    ///// 客户端类型
    ///// </summary>
@@ -146,6 +146,7 @@
        BaseView = Application.MainPage;
        Application.MainPage.BackgroundColor = CSS_Color.MainBackgroundColor;
        Language.UpdateLanguage();
        //#region 测试
        //var ddd = new UI.test.TestDialog();
        //ddd.InitView();
HDL_ON/UI/UI0-Public/PublicAssmebly.cs
@@ -243,7 +243,7 @@
        /// <param name="titleId"></param>
        /// <param name="msgId"></param>
        /// <param name="callBackAction"></param>
        public void TipOptionMsg(int titleId, string msg, Action callBackAction)
        public void TipOptionMsg(int titleId, string msg, Action callBackAction,int extraHeight = 0)
        {
            Dialog dialog = new Dialog()
            {
@@ -253,8 +253,8 @@
            FrameLayout contentView = new FrameLayout()
            {
                Gravity = Gravity.Center,
                Width = Application.GetRealWidth(270),
                Height = Application.GetRealHeight(140),
                Width = Application.GetRealWidth(270 ),
                Height = Application.GetRealHeight(140 + extraHeight),
                BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
                BorderColor = 0x00000000,
                BorderWidth = 0,
@@ -277,7 +277,7 @@
            Button btnMsg = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Height = Application.GetRealHeight(25),
                Height = Application.GetRealHeight(35 + extraHeight),
                Y = btnTitle.Bottom,
                Width = Application.GetRealHeight(200),
                TextAlignment = TextAlignment.Center,
@@ -290,7 +290,7 @@
            Button btnLine = new Button()
            {
                Y = Application.GetRealHeight(96),
                Y = Application.GetRealHeight(96 + extraHeight),
                Height = Application.GetRealHeight(1),
                Width = Application.GetRealWidth(270 / 2),
                BackgroundColor = CSS.CSS_Color.DividingLineColor,
@@ -463,7 +463,7 @@
            Button btnMsg = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Height = Application.GetRealHeight(25),
                Height = Application.GetRealHeight(35),
                Y = btnTitle.Bottom,
                Width = Application.GetRealHeight(200),
                TextAlignment = TextAlignment.Center,
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -196,6 +196,10 @@
                        var airFresh2 = new AirFreshRelayControlPage();
                        airFresh2.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
                    case SPK.DoorLock:
                        var doorLockPage = new DoorLockListPage();
                        doorLockPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
                }
            };
            return eventHandler;
HDL_ON/UI/UI0-Public/Widget/ListCellView.cs
@@ -71,11 +71,12 @@
            BtnTilte = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(220),
                Width = Application.GetRealWidth(260),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                Text = tilteText,
                IsMoreLines = true
            };
            this.AddChidren(BtnTilte);
            /// <summary>
HDL_ON/UI/UI0-Public/Widget/WebViewDialog.cs
@@ -92,6 +92,7 @@
                }
                Action withdramAction = () => {
                    OnAppConfig.Instance.isAgreePrivacyPolicy = false;
                    OnAppConfig.Instance.FirstRunApp = true;
                    OnAppConfig.Instance.SaveConfig();
                    HDLCommon.Current.Logout();
                    Close();
HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -168,6 +168,9 @@
        /// </summary>
        public void LoadView(UserInfo userInfo = null)
        {
#if __Android__
            OnAppConfig.Instance.isAgreePrivacyPolicy = true;
#endif
            var btnIcon = new Button()
            {
                X = Application.GetRealWidth(28),
@@ -204,16 +207,15 @@
                //return;
                if (b)
                {
                    //etAccount.Text = "tf@smarttech.com.ua";//国外账号,有住宅,登录无法显示
                    //etAccount.Text = "13375012446";//测试服务器
                    //etAccount.Text = "1033326940@qq.com";
                    //etAccount.Text = "18022428438";//wjc
                    //etAccount.Text = "13602944661";//kx
                    etAccount.Text = "13226233133";//豆豆
                    //etAccount.Text = "13226233133";//豆豆
                    etAccount.Text = "18316672920";
                    //etAccount.Text = "18316120654";//tujie
                    etAccount.Text = "15626203746";
                    //etAccount.Text = "13450425807";//黄竹溪 knx项目
                    //etAccount.Text = "18140004933";
                }
                else
                {
@@ -230,22 +232,24 @@
                    //etAccount.Text = "15971583093";//高胜
                    //etAccount.Text = "15217626103";//昆明金茂项目
                    //etAccount.Text = "18598273624";
                    //etAccount.Text = "tf@smarttech.com.ua";
                    etAccount.Text = "tf@smarttech.com.ua";
                    //etAccount.Text = "18814122445";//董泽斌 天河办公室
                    etAccount.Text = "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
                    //etAccount.Text = "18402017839";//wjc
                    etAccount.Text = "18402017839";//wjc
                    //etAccount.Text = "13430286286";//cwc
                    //etAccount.Text = "13709260805";
                    //etAccount.Text = "support5@hdlchina.com.cn";
                    //etAccount.Text = "13375012441";
                    //etAccount.Text = "info@smartlife-ks.com";
                    //etAccount.Text = "551775569@qq.com";//wcf
                    etAccount.Text = "15626203746";
                    etAccount.Text = "zhangquansongjava@163.com";
                }
                b = !b;
                etPassword.Text = "123456";
                if(etAccount.Text == "fslcjm5@163.com")
                if(etAccount.Text == "zhangquansongjava@163.com")
                {
                    etPassword.Text = "a123456";
                    etPassword.Text = "BVVEAAMZ";
                }
                //etPassword.Text = "Hdl85521566";
                btnLogin.IsSelected = true;
@@ -278,9 +282,9 @@
                TextSize = CSS_FontSize.TextFontSize,
            };
            bodyView.AddChidren(btnEmailLogin);
            #endregion
#endregion
            #region 账号填写
#region 账号填写
            accountView = new FrameLayout()
            {
                X = Application.GetRealWidth(28),
@@ -368,9 +372,9 @@
                accountView.AddChidren(btnAccountIcon);
            }
            #endregion
#endregion
            #region 密码填写
#region 密码填写
            passwordView = new FrameLayout()
            {
                X = Application.GetRealWidth(28),
@@ -414,7 +418,7 @@
            };
            passwordView.AddChidren(etPassword);
            #region 密码登录-控件加载
#region 密码登录-控件加载
            btnVisiblePassword = new Button()
            {
                X = Application.GetRealWidth(223),
@@ -446,9 +450,9 @@
                TextSize = 12,
            };
            passwordView.AddChidren(btnForgetPassword);
            #endregion
#endregion
            #region 验证码登录-控件加载
#region 验证码登录-控件加载
            btnGetVerificationCode = new Button()
            {
                X = Application.GetRealWidth(219),
@@ -462,7 +466,7 @@
                IsSelected = false,
            };
            passwordView.AddChidren(btnGetVerificationCode);
            #endregion
#endregion
            btnPasswordViewBottomLine = new Button()
            {
@@ -473,9 +477,9 @@
            };
            passwordView.AddChidren(btnPasswordViewBottomLine);
            #endregion
#endregion
            #region 注册与快捷登录
#region 注册与快捷登录
            btnRegister = new Button()
            {
                X = Application.GetRealWidth(28),
@@ -502,7 +506,7 @@
            };
            bodyView.AddChidren(btnSwitchLoginMode);
            #endregion
#endregion
            btnLogin = new Button()
            {
@@ -547,7 +551,7 @@
                //楼层房间列表
                var floor1 = new SpatialInfo("FLOOR") { roomName = "F1", parentId = DB_ResidenceData.Instance.CurrentRegion.id };
                floor1.SaveRoomFile();
                #region 房间一 -- 客厅
#region 房间一 -- 客厅
                //处理房间列表
                var room1 = new Room()
@@ -627,8 +631,8 @@
                SpatialInfo.CurrentSpatial.RoomList.Add(room4);
                #region 客厅
                #region 功能
#region 客厅
#region 功能
                var lightRgb1 = new Function()
                {
                    sid = "light1",
@@ -754,8 +758,8 @@
                    },
                };
                fh.SaveFunctionFile();
                #endregion
                #region 场景
#endregion
#region 场景
                var scene1 = new Scene()
                {
                    sid = "scene1",
@@ -907,9 +911,9 @@
                };
                scene2.SaveSceneFile();
                #endregion
                #endregion
                #region 餐厅
#endregion
#endregion
#region 餐厅
                var lightSwitch3 = new Function()
                {
                    sid = "light6",
@@ -1013,8 +1017,8 @@
                    }
                };
                scene4.SaveSceneFile();
                #endregion
                #region 卧室
#endregion
#region 卧室
                var ac = new Function()
                {
                    sid = "ac1",
@@ -1053,7 +1057,7 @@
                //    collect = false,
                //};
                //scene6.SaveSceneFile();
                #endregion
#endregion
                var lightSwitch6 = new Function()
@@ -1071,7 +1075,7 @@
                };
                lightSwitch6.SaveFunctionFile();
                #endregion
#endregion
                var fileList = Common.FileUtlis.Files.ReadFiles();
                foreach(var file in fileList)
@@ -1090,7 +1094,7 @@
            LoadEventList();
            account = etAccount.Text.Trim();
            #if DEBUG1211
#if DEBUG1211
            //本地模式
            Button btnLocalMode = new Button()
            {
@@ -1112,9 +1116,9 @@
            MainPage.Log("etAccount.TextAlignment : " + etAccount.TextAlignment.ToString());
            #endif
#endif
            #region 隐私政策
#region 隐私政策
            AddServiceAgreementControl(bodyView);
            #endregion
@@ -1129,6 +1133,11 @@
        private void AddServiceAgreementControl(FrameLayout frameLayout)
        {
            isAgreePrivacyPolicy = OnAppConfig.Instance.isAgreePrivacyPolicy;
            var frameRow = new FrameLayout()
            {
                Height = Application.GetRealHeight(28),
@@ -1155,7 +1164,7 @@
                Height = Application.GetMinRealAverage(28),
                UnSelectedImagePath = "Public/ChooseIcon.png",
                SelectedImagePath = "Public/ChooseOnIcon.png",
                IsSelected = isAgreePrivacyPolicy,
                IsSelected = OnAppConfig.Instance.isAgreePrivacyPolicy,
                Gravity = Gravity.Center
            };
            agreeView.AddChidren(agreeBtn);
@@ -1235,6 +1244,13 @@
            {
                OpenWebViewPage(true);
            };
            #if __ANDROID__
            //if(OnAppConfig.Instance.FirstRunApp || !OnAppConfig.Instance.isAgreePrivacyPolicy)
            //{
            //    HDL_ON_Android.HDLONUtils.StartSplashActivity();
            //}
            #endif
        }
        /// <summary>
@@ -1263,6 +1279,6 @@
            return true;
        }
        #endregion
#endregion
    }
}
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -390,7 +390,7 @@
                    SelectedImagePath = "Collection/DefenseStatusIcon.png",
                    UnSelectedImagePath = "Collection/DisarmStatusIcon.png"
                };
                if (false && DB_ResidenceData.Instance.GatewayType == 1)
                if (DB_ResidenceData.Instance.GatewayType == 1)
                {
                        
                    topView.AddChidren(btnSecurityStatus);
@@ -553,6 +553,55 @@
#if DEBUG
            //FunctionList.List.Functions.Add(new Function
            //{
            //    name = "门锁",
            //    spk = SPK.DoorLock,
            //    sid = "12345",
            //    attributes = new List<FunctionAttributes> {
            //        new FunctionAttributes(){ key = "door_status",curValue= "open",state = "open" },
            //        new FunctionAttributes(){ key = "normal_open",curValue= "true",state = "true" },
            //        new FunctionAttributes(){ key = "normal_open_countdown",curValue= "10",state = "10" },
            //        new FunctionAttributes(){ key = "local_id",curValue= "10",state = "10" },
            //        new FunctionAttributes(){ key = "door_volume",curValue= "10",state = "10" },
            //        new FunctionAttributes(){ key = "door_volume_step",curValue= "up",state = "up" },
            //        new FunctionAttributes(){ key = "battery_value",curValue= "100",state = "100" },
            //        new FunctionAttributes(){ key = "battery_percentage",curValue= "100",state = "100" },
            //        new FunctionAttributes(){ key = "battery_state",curValue= "high",state = "high" },
            //    }
            //});
            //FunctionList.List.Functions.Add(new Function
            //{
            //    name = "门锁1",
            //    spk = SPK.DoorLock,
            //    sid = "123",
            //    attributes = new List<FunctionAttributes> {
            //        new FunctionAttributes(){ key = "door_status",curValue= "open",state = "open" },
            //        new FunctionAttributes(){ key = "normal_open",curValue= "true",state = "true" },
            //        new FunctionAttributes(){ key = "normal_open_countdown",curValue= "10",state = "10" },
            //        new FunctionAttributes(){ key = "local_id",curValue= "10",state = "10" },
            //        new FunctionAttributes(){ key = "door_volume",curValue= "10",state = "10" },
            //        new FunctionAttributes(){ key = "door_volume_step",curValue= "up",state = "up" },
            //        new FunctionAttributes(){ key = "battery_value",curValue= "100",state = "100" },
            //        new FunctionAttributes(){ key = "battery_percentage",curValue= "100",state = "100" },
            //        new FunctionAttributes(){ key = "battery_state",curValue= "high",state = "high" },
            //    }
            //});
            //FunctionList.List.Functions.Add(new Function()
            //{
            //    spk = SPK.PanelSocket,
            //    name = "面板插座",
            //    attributes = new List<FunctionAttributes>
            //    {
            //        new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" },
            //        new FunctionAttributes(){ key = "on_off_usb",curValue= "on",state = "on" },
            //        new FunctionAttributes(){ key = "active_power",curValue= "220",state = "220" },
            //        new FunctionAttributes(){ key = "voltage",curValue= "5",state = "5" },
            //        new FunctionAttributes(){ key = "current",curValue= "110",state = "110" },
            //        new FunctionAttributes(){ key = "total_electricity",curValue= "123.33",state = "123.33" },
            //    }
            //});
            //FunctionList.List.Functions.Add(new Function()
            //{
@@ -586,23 +635,23 @@
            //});
            FunctionList.List.Functions.Add(new Function()
            {
                spk = SPK.HvacAirFreshJinmao,
                name = "测试金茂新风",
                attributes = new List<FunctionAttributes>()
                {
                    new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" },
                    new FunctionAttributes(){ key = "mode",curValue= "humidification",state = "humidification" ,value = new List<string>(){ "humidification", "fan" } },
                    new FunctionAttributes(){ key = "energy",curValue= "true",state = "true" ,value = new List<string>(){ "true", "false" } },
                    new FunctionAttributes(){ key = "fan",curValue= "level_1",state = "level_1" ,value = new List<string>(){ "level_1", "level_2", "level_3","auto" } },
                    new FunctionAttributes(){ key = "humidity",curValue= "0",state = "0" ,value = new List<string>(){  },min = 0,max = 100 },
                    new FunctionAttributes(){ key = "indoor_temp",curValue= "26",state = "26" ,value = new List<string>(){  },min = 0,max = 100 },
                    new FunctionAttributes(){ key = "indoor_humidity",curValue= "0",state = "0" ,value = new List<string>(){  },min = 0,max = 100 },
                    new FunctionAttributes(){ key = "filter_remain",curValue= "0",state = "0" ,value = new List<string>(){  },min = 0,max = 100 },
                    new FunctionAttributes(){ key = "filter_timeout",curValue= "false",state = "false" ,value = new List<string>(){ "true", "false"  }},
                },
            });
            //FunctionList.List.Functions.Add(new Function()
            //{
            //    spk = SPK.HvacAirFreshJinmao,
            //    name = "测试金茂新风",
            //    attributes = new List<FunctionAttributes>()
            //    {
            //        new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" },
            //        new FunctionAttributes(){ key = "mode",curValue= "humidification",state = "humidification" ,value = new List<string>(){ "humidification", "fan" } },
            //        new FunctionAttributes(){ key = "energy",curValue= "true",state = "true" ,value = new List<string>(){ "true", "false" } },
            //        new FunctionAttributes(){ key = "fan",curValue= "level_1",state = "level_1" ,value = new List<string>(){ "level_1", "level_2", "level_3","auto" } },
            //        new FunctionAttributes(){ key = "humidity",curValue= "0",state = "0" ,value = new List<string>(){  },min = 0,max = 100 },
            //        new FunctionAttributes(){ key = "indoor_temp",curValue= "26",state = "26" ,value = new List<string>(){  },min = 0,max = 100 },
            //        new FunctionAttributes(){ key = "indoor_humidity",curValue= "0",state = "0" ,value = new List<string>(){  },min = 0,max = 100 },
            //        new FunctionAttributes(){ key = "filter_remain",curValue= "0",state = "0" ,value = new List<string>(){  },min = 0,max = 100 },
            //        new FunctionAttributes(){ key = "filter_timeout",curValue= "false",state = "false" ,value = new List<string>(){ "true", "false"  }},
            //    },
            //});
            //FunctionList.List.Functions.Add(new Function()
            //{
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -493,6 +493,14 @@
                        d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime));
                        Control.Ins.SendWriteCommand(function, d);
                    }
                    else if (function.spk == SPK.PanelSocket)
                    {
                        if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null)
                        {
                            d.Add("on_off_usb", function.trait_on_off.curValue.ToString());
                        }
                        Control.Ins.SendWriteCommand(function, d);
                    }
                    else
                    {
                        d.Add("on_off", function.trait_on_off.curValue.ToString());
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -678,6 +678,8 @@
                        #endregion
                        break;
                    case ShowFunction.DoorLock:
                        functionCount = FunctionList.List.GetDoorLockList().Count;
                        functionOnCount = 1;
                        break;
                    case ShowFunction.Electric:
                        #region 电器
@@ -934,6 +936,10 @@
                        break;
                    case ShowFunction.DoorLock:
                        btnName.TextID = StringId.DoorLock;
                        btnFunctionViewBg.MouseUpEventHandler = (sende, e) => {
                            var form = new DoorLockListPage();
                            form.AddForm(FunctionList.List.GetDoorLockList());
                        };
                        break;
                    case ShowFunction.Electric:
                        #region 电器
@@ -1050,7 +1056,7 @@
                }
                //界面跳转--音乐跳转自己的界面--环境跳转自己的界面
                if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring
                if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring && item != ShowFunction.DoorLock
                    && ShowFunction.EnergyMonitoring!= item && ShowFunction.VideoIntercom != item && ShowFunction.SecurityCenter != item)
                {
                    btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -86,7 +86,7 @@
            //判断是否需要隐藏自动化
            if (HideAutoPage)
            {
                if (false && DB_ResidenceData.Instance.GatewayType == 1)//网关需要加载安防--2021-11-28 19:56:53  刘晓辉将安防放入改界面
                if (DB_ResidenceData.Instance.GatewayType == 1)//网关需要加载安防--2021-11-28 19:56:53  刘晓辉将安防放入该界面
                {
                    btnSceneTilte  = new Button()
                    {
@@ -139,7 +139,7 @@
            }
            else
            {
                if (false && DB_ResidenceData.Instance.GatewayType == 1)//网关需要加载安防--2021-11-28 19:56:53  刘晓辉将安防放入改界面
                if (DB_ResidenceData.Instance.GatewayType == 1)
                {
                    btnAutomationTitle = new Button()
                    {
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs
@@ -468,7 +468,7 @@
                EventHandler<MouseEventArgs> skipEvent= (sender, e) =>
                {
                    var ssf = new SceneFunctionInfoEditPage(scene, scenefunction, refreshFunctionRowAction);
                    var ssf = new SceneFunctionInfoEditPage(scene, scenefunction.localFunction.ConvertSceneFunction(), refreshFunctionRowAction);
                    MainPage.BasePageView.AddChidren(ssf);
                    ssf.LoadPage();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
@@ -235,6 +235,51 @@
            });
            #endregion
            #region 组号
            //var grounpView = new FrameLayout()
            //{
            //    Height = Application.GetRealWidth(50),
            //};
            //contentView.AddChidren(grounpView);
            //Button btnGroupTitle = new Button()
            //{
            //    X = Application.GetRealWidth(16),
            //    //Width = Application.GetRealWidth(90),
            //    TextAlignment = TextAlignment.CenterLeft,
            //    TextColor = CSS_Color.FirstLevelTitleColor,
            //    TextSize = CSS_FontSize.TextFontSize,
            //    Text = "组号"
            //};
            //grounpView.AddChidren(btnGroupTitle);
            //var etGroup = new EditText()
            //{
            //    TextAlignment = TextAlignment.CenterRight,
            //    Width = Application.GetRealWidth(350),
            //    Text = scene.group,
            //    TextColor = CSS_Color.PromptingColor1,
            //    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
            //    IsNumberKeyboardType = true
            //};
            //grounpView.AddChidren(etGroup);
            //etGroup.TextChangeEventHandler = (sender, e) => {
            //    scene.group = e;
            //};
            //Button btnGroupLine = new Button()
            //{
            //    Y = Application.GetRealWidth(49),
            //    Gravity = Gravity.CenterHorizontal,
            //    Height = Application.GetRealHeight(1),
            //    Width = Application.GetRealWidth(343),
            //    BackgroundColor = CSS_Color.DividingLineColor,
            //};
            //grounpView.AddChidren(btnGroupLine);
            #endregion
            #region 场景延时row
            if (DB_ResidenceData.Instance.GatewayType == 1)
            {
@@ -391,10 +436,12 @@
                        var tempScene = sceneList.Find((obj) => obj.userSceneId == scene.userSceneId);
                        if (tempScene != null)
                        {
                            scene.functions = tempScene.functions;
                            scene = tempScene;
                        }
                        Application.RunOnMainThread(() =>
                        {
                            btnSceneName.Text = scene.name;
                            //etGroup.Text = scene.group;
                            LoadFunctionRow();
                            waitPage.Hide();
                            waitPage.RemoveFromParent();
@@ -513,7 +560,7 @@
                EventHandler<MouseEventArgs> skipEvent = (sender, e) =>
                {
                    var ssf = new SceneFunctionInfoEditPage(scene, scenefunction, refreshFunctionRowAction);
                    var ssf = new SceneFunctionInfoEditPage(scene, scenefunction.localFunction.ConvertSceneFunction(), refreshFunctionRowAction);
                    MainPage.BasePageView.AddChidren(ssf);
                    ssf.LoadPage();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs
@@ -105,26 +105,26 @@
            bodyView.AddChidren(lineView);
            #region 功能介绍
            var functionView = new ListCellView()
            {
                Y = lineView.Bottom,
            };
            bodyView.AddChidren(functionView);
            functionView.BtnTilte.TextID = StringId.FunctionIntroduced;
            Action functionAction = () =>
            {
                var mPage = new FunctionIntroductionPage();
                MainPage.BasePageView.AddChidren(mPage);
                mPage.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            functionView.GoAction = functionAction;
            //var functionView = new ListCellView()
            //{
            //    Y = lineView.Bottom,
            //};
            //bodyView.AddChidren(functionView);
            //functionView.BtnTilte.TextID = StringId.FunctionIntroduced;
            //Action functionAction = () =>
            //{
            //    var mPage = new FunctionIntroductionPage();
            //    MainPage.BasePageView.AddChidren(mPage);
            //    mPage.LoadPage();
            //    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            //};
            //functionView.GoAction = functionAction;
            #endregion
            #region 投诉
            var complaintsView = new ListCellView()
            {
                Y = functionView.Bottom,
                Y = lineView.Bottom,
            };
            bodyView.AddChidren(complaintsView);
            complaintsView.BtnTilte.TextID = StringId.Complaints;
HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/ComplaintsPage.cs
@@ -124,7 +124,7 @@
            {
                X = btnEmailTitle.Right,
                Y = btnEmailText.Bottom + Application.GetRealWidth(4),
                Height = Application.GetRealWidth(20),
                Height = Application.GetRealWidth(25),
                Width = Application.GetRealWidth(266),
                TextAlignment = TextAlignment.TopLeft,
                TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs
@@ -136,7 +136,7 @@
                textView.AddChidren(btnScan);
                btnScan.MouseUpEventHandler = (sender, e) =>
                {
                    Scan.OpenScan((scanString) =>
                    Scan.Ins.OpenScan((scanString) =>
                    {
                        editText.Text = scanString;
                    });
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs
@@ -88,7 +88,7 @@
            textView.AddChidren(btnScan);
            btnScan.MouseUpEventHandler = (sender, e) =>
            {
                Scan.OpenScan((scanString) =>
                Scan.Ins.OpenScan((scanString) =>
                {
                    editText.Text = scanString;
                });
HDL_ON/UI/UI2/4-PersonalCenter/CancelAccountPage.cs
New file
@@ -0,0 +1,201 @@
using System;
using Shared;
using HDL_ON.UI.CSS;
using Xamarin.Essentials;
namespace HDL_ON.UI
{
    public class CancelAccountPage : FrameLayout
    {
        /// <summary>
        ///
        /// </summary>
        FrameLayout bodyView;
        /// <summary>
        ///
        /// </summary>
        public CancelAccountPage()
        {
            bodyView = this;
            BackgroundColor = CSS_Color.MainBackgroundColor;
        }
        /// <summary>
        ///
        /// </summary>
        public void LoadPage()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.CancelAccount)).LoadTopView();
            var textView = new Button()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(150),
                Padding = new Padding( Application.GetRealWidth(16), Application.GetRealWidth(16), Application.GetRealWidth(16), Application.GetRealWidth(16)),
                IsMoreLines = true,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.TopLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
            };
            if(Language.CurrentLanguage == "Chinese")
            {
                textView.Text = "您可通过电话专线与电子邮件的形式向我们申请注销账户,我们收到您的申请后,会第一时间安排工程人员对您App应用账户数据、以及智能家居智能硬件本地数据全部删除!";
            }
            else
            {
                textView.Text = "You can apply to us for cancellation of your account through special telephone line and e-mail. After receiving your application, we will arrange engineers to delete all your app account data and local data of smart home smart hardware at the first time!";
            }
            bodyView.AddChidren(textView);
            #region 投诉联系
            FrameLayout phoneRow = new FrameLayout()
            {
                Y = Application.GetRealHeight(214),
                Height = Application.GetRealWidth(50),
            };
            bodyView.AddChidren(phoneRow);
            Button btnPhoneTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(48),
                TextID = StringId.Telephone,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
            };
            phoneRow.AddChidren(btnPhoneTitle);
            if (Language.CurrentLanguage == "English")
            {
                btnPhoneTitle.Text = "Tel.:";
            }
            Button btnPhoneText = new Button()
            {
                X = btnPhoneTitle.Right,
                Width = Application.GetRealWidth(266),
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.TextFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                Text = "400 855 8535",
            };
            phoneRow.AddChidren(btnPhoneText);
            /// <summary>
            /// 前进图标
            /// </summary>
            var btnImage = new Button()
            {
                X = Application.GetRealWidth(343),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetRealWidth(16),
                Height = Application.GetRealWidth(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            phoneRow.AddChidren(btnImage);
            phoneRow.AddChidren(new Button() { X = Application.GetRealWidth(16), Y = Application.GetRealWidth(49), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor });
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                PhoneDialer.Open(Constant.SUPPORT_TELEPHONENUMBER);
            };
            phoneRow.MouseUpEventHandler = eventHandler;
            btnPhoneText.MouseUpEventHandler = eventHandler;
            btnImage.MouseUpEventHandler = eventHandler;
            #endregion
            #region 联系邮箱
            FrameLayout emailRow = new FrameLayout()
            {
                Y = phoneRow.Bottom,
                Height = Application.GetRealWidth(54),
            };
            bodyView.AddChidren(emailRow);
            Button btnEmailTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(48),
                TextID = StringId.Email_,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
            };
            emailRow.AddChidren(btnEmailTitle);
            Button btnEmailText = new Button()
            {
                X = btnEmailTitle.Right,
                Y = Application.GetRealWidth(8),
                Height = Application.GetRealWidth(20),
                Width = Application.GetRealWidth(266),
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.TextFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                Text = Constant.SUPPORT_EMAIL,
            };
            emailRow.AddChidren(btnEmailText);
            Button btnEmailTipText = new Button()
            {
                X = btnEmailTitle.Right,
                Y = btnEmailText.Bottom + Application.GetRealWidth(4),
                Height = Application.GetRealWidth(25),
                Width = Application.GetRealWidth(266),
                TextAlignment = TextAlignment.TopLeft,
                TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
                TextColor = CSS_Color.PromptingColor1,
                TextID = StringId.WillGivePriorityToTheTreatmen,
            };
            emailRow.AddChidren(btnEmailTipText);
            if (Language.CurrentLanguage == "English")
            {
                btnEmailTitle.Width = Application.GetRealWidth(80);
                emailRow.Height = Application.GetRealWidth(65);
                btnEmailTipText.IsMoreLines = true;
            }
            /// <summary>
            /// 前进图标
            /// </summary>
            var btnImage2 = new Button()
            {
                X = Application.GetRealWidth(343),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetRealWidth(16),
                Height = Application.GetRealWidth(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            emailRow.AddChidren(btnImage2);
            emailRow.AddChidren(new Button() { X = Application.GetRealWidth(16), Y = emailRow.Height - Application.GetRealHeight(1), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor });
            EventHandler<MouseEventArgs> eventHandler2 = (sender, e) =>
            {
                CopyToClipboard(Constant.SUPPORT_EMAIL);
            };
            emailRow.MouseUpEventHandler = eventHandler2;
            btnEmailText.MouseUpEventHandler = eventHandler2;
            btnImage2.MouseUpEventHandler = eventHandler2;
            #endregion
        }
        /// <summary>
        /// 复制到剪切板
        /// </summary>
        /// <param name="text"></param>
        void CopyToClipboard(string text)
        {
            Clipboard.SetTextAsync(text);
            Utlis.ShowTip(text + "\n" + Language.StringByID(StringId.CopySuccess));
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/AddMemberScanPageBLL.cs
@@ -85,7 +85,7 @@
        {
            btnScan.MouseUpEventHandler = (sender, e) =>
            {
                Scan.OpenScan((scanString) =>
                Scan.Ins.OpenScan((scanString) =>
                {
                    action(scanString);
                });
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
@@ -142,7 +142,7 @@
        ///// <summary>
        ///// 获取支持文本
        ///// </summary>
        //Button btnSupportText;
        Button btnSupportText;
        /// <summary>
        /// 关于On文本
@@ -935,7 +935,8 @@
            //    BackgroundColor = 0xFFFF0000,
            //};
            //supportView.AddChidren(supView);
            //supView.MouseUpEventHandler = (sender, e) => {
            //supView.MouseUpEventHandler = (sender, e) =>
            //{
            //    Dialog dialog = new Dialog();
            //    var bodyView = new FrameLayout();
@@ -957,7 +958,8 @@
            //        TextAlignment = TextAlignment.CenterLeft,
            //        TextSize = CSS_FontSize.SubheadingFontSize,
            //    };
            //    btnClose.MouseUpEventHandler = (sender, e) => {
            //    btnClose.MouseUpEventHandler = (sender9, e0) =>
            //    {
            //        dialog.Close();
            //    };
            //    bodyView.AddChidren(btnClose);
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
@@ -183,10 +183,10 @@
        /// <summary>
        /// 解锁设置区域
        /// </summary>
        FrameLayout interpretationSettingsView;
        Button btnInterpretationSettingsTitle;
        Button btnInterpretationSettingsTip;
        Button btnInterpretationSettingsRight;
        //FrameLayout interpretationSettingsView;
        //Button btnInterpretationSettingsTitle;
        //Button btnInterpretationSettingsTip;
        //Button btnInterpretationSettingsRight;
        #endregion
        /// <summary>
@@ -560,7 +560,7 @@
            btnAddResidenceText.MouseUpEventHandler = (sender, e) =>
            {
                Scan.OpenScan((scanString) =>
                Scan.Ins.OpenScan((scanString) =>
                {
                    if (string.IsNullOrEmpty(scanString))
                    {
@@ -679,62 +679,62 @@
            }
            #endregion
            #region 解锁设置区域
            var topPaddingView2 = new FrameLayout()
            {
                Height = Application.GetRealHeight(8)
            };
            bodyScrolView.AddChidren(topPaddingView2);
            /// <summary>
            /// 解锁设置区域
            /// </summary>
            interpretationSettingsView = new FrameLayout()
            {
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Height = Application.GetRealHeight(70),
            };
            bodyScrolView.AddChidren(interpretationSettingsView);
            if(Language.CurrentLanguage != "Chinese")
            {
                interpretationSettingsView.Height = Application.GetRealHeight(80);
            }
            btnInterpretationSettingsTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Height = Application.GetRealHeight(32),
                TextAlignment = TextAlignment.BottomLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.InterpretationSettings,
            };
            interpretationSettingsView.AddChidren(btnInterpretationSettingsTitle);
            #region 解锁设置区域
            ///// <summary>
            ///// 解锁设置区域
            ///// </summary>
            //interpretationSettingsView = new FrameLayout()
            //{
            //    BackgroundColor = CSS_Color.MainBackgroundColor,
            //    Height = Application.GetRealHeight(70),
            //};
            //bodyScrolView.AddChidren(interpretationSettingsView);
            //if(Language.CurrentLanguage != "Chinese")
            //{
            //    interpretationSettingsView.Height = Application.GetRealHeight(80);
            //}
            btnInterpretationSettingsTip = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = btnInterpretationSettingsTitle.Bottom,
                Height = Application.GetRealHeight(32),
                Width = Application.GetRealWidth(310),
                TextAlignment = TextAlignment.TopLeft,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                TextID = StringId.AppUnlockSettingsTip,
                IsMoreLines = true,
            };
            interpretationSettingsView.AddChidren(btnInterpretationSettingsTip);
            //btnInterpretationSettingsTitle = new Button()
            //{
            //    X = Application.GetRealWidth(16),
            //    Height = Application.GetRealHeight(32),
            //    TextAlignment = TextAlignment.BottomLeft,
            //    TextColor = CSS_Color.FirstLevelTitleColor,
            //    TextSize = CSS_FontSize.SubheadingFontSize,
            //    TextID = StringId.InterpretationSettings,
            //};
            //interpretationSettingsView.AddChidren(btnInterpretationSettingsTitle);
            btnInterpretationSettingsRight = new Button()
            {
                X = Application.GetRealWidth(339),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            interpretationSettingsView.AddChidren(btnInterpretationSettingsRight);
            interpretationSettingsView.AddChidren(new LineView(interpretationSettingsView.Height));
            //btnInterpretationSettingsTip = new Button()
            //{
            //    X = Application.GetRealWidth(16),
            //    Y = btnInterpretationSettingsTitle.Bottom,
            //    Height = Application.GetRealHeight(32),
            //    Width = Application.GetRealWidth(310),
            //    TextAlignment = TextAlignment.TopLeft,
            //    TextColor = CSS_Color.PromptingColor1,
            //    TextSize = CSS_FontSize.TextFontSize,
            //    TextID = StringId.AppUnlockSettingsTip,
            //    IsMoreLines = true,
            //};
            //interpretationSettingsView.AddChidren(btnInterpretationSettingsTip);
            //btnInterpretationSettingsRight = new Button()
            //{
            //    X = Application.GetRealWidth(339),
            //    Gravity = Gravity.CenterVertical,
            //    Width = Application.GetMinRealAverage(16),
            //    Height = Application.GetMinRealAverage(16),
            //    UnSelectedImagePath = "Public/Right.png",
            //};
            //interpretationSettingsView.AddChidren(btnInterpretationSettingsRight);
            //interpretationSettingsView.AddChidren(new LineView(interpretationSettingsView.Height));
            #endregion
            #region 服务器信息
@@ -752,7 +752,27 @@
            };
            myServerInfoCellView.GoAction = selectAction;
            myServerInfoCellView.BtnTilte.Text = Language.StringByID(StringId.ServerInformation);
            myServerInfoCellView.LineView.RemoveFromParent();
            //myServerInfoCellView.LineView.RemoveFromParent();
            #endregion
            #region 注销账号
            ListCellView logOffView = new ListCellView()
            {
            };
            bodyScrolView.AddChidren(logOffView);
            //注销账号界面
            Action logOffAction = () =>
            {
                var myServerInfoPage = new CancelAccountPage();
                MainPage.BasePageView.AddChidren(myServerInfoPage);
                myServerInfoPage.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            logOffView.GoAction = logOffAction;
            logOffView.BtnTilte.Text = Language.StringByID(StringId.CancelAccount);
            logOffView.LineView.RemoveFromParent();
            #endregion
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs
@@ -16,7 +16,7 @@
            LoadEvent_ChangeHeadImageView();
            LoadEvent_Logout();
            LoadEvent_EditUserName();
            LoadEvent_SkipInterpretationSettings();
            //LoadEvent_SkipInterpretationSettings();
            LoadEvent_ChangeBindEmail();
            LoadEvent_ChangeBindPhone();
            LoadEvent_SkipModifyPassword();
@@ -520,20 +520,20 @@
        #endregion
        #region 解锁设置区域
        void LoadEvent_SkipInterpretationSettings()
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                var page = new AppUnlockSettingsPage();
                MainPage.BasePageView.AddChidren(page);
                page.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
        //void LoadEvent_SkipInterpretationSettings()
        //{
        //    EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
        //    {
        //        var page = new AppUnlockSettingsPage();
        //        MainPage.BasePageView.AddChidren(page);
        //        page.LoadPage();
        //        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
        //    };
            btnInterpretationSettingsRight.MouseUpEventHandler = eventHandler;
            btnInterpretationSettingsTitle.MouseUpEventHandler = eventHandler;
            btnInterpretationSettingsTip.MouseUpEventHandler = eventHandler;
        }
        //    btnInterpretationSettingsRight.MouseUpEventHandler = eventHandler;
        //    btnInterpretationSettingsTitle.MouseUpEventHandler = eventHandler;
        //    btnInterpretationSettingsTip.MouseUpEventHandler = eventHandler;
        //}
        #endregion
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferInputPage.cs
@@ -97,7 +97,7 @@
            bodyFrameLayout.AddChidren(btnQrcode);
            btnQrcode.ButtonClickEvent += (sender, e) =>
            {
                Scan.OpenScan((scanString) =>
                Scan.Ins.OpenScan((scanString) =>
                {
                    if (string.IsNullOrEmpty(scanString) == true)
                    {
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -881,8 +881,10 @@
            };
            arcBar.OnStopTrackingTouchEvent = (sender, e) =>
            {
                temp = arcBar.Progress;
                device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
                btnTemp.Text = arcBar.Progress.ToString();
                controlTime = DateTime.Now;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
                Control.Ins.SendWriteCommand(device, d);
@@ -1010,6 +1012,13 @@
                        arcBar.IsClickable = false;
                        arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png";
                    }
                    if(device.GetAttrState(FunctionAttributeKey.Mode) == "dry")
                    {
                        arcBar.IsOffline = true;
                        arcBar.IsClickable = false;
                    }
                }
            });
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs
@@ -26,15 +26,7 @@
        SecurityAlarm securityAlarm;
        Action refreshAction;
        /// <summary>
        /// 安防输出-临时
        /// </summary>
        List<SecurityOutput> tempOutput = new List<SecurityOutput>();
        /// <summary>
        /// 安防输入-临时
        /// </summary>
        List<SecurityInput> tempInput = new List<SecurityInput>();
        public AddAlarmDeploymentPage(SecurityAlarm alarm, Action action)
        {
@@ -132,7 +124,7 @@
                };
                delayedRow.AddChidren(btnDelayedTitle);
                btnDelayedTitle.Text += ":";
                btnDelayedTitle.Width = btnDelayedTitle.GetTextWidth()+Application.GetRealWidth(10);
                btnDelayedTitle.Width = btnDelayedTitle.GetTextWidth() + Application.GetRealWidth(10);
                var btnDelayedText = new Button()
                {
@@ -175,6 +167,7 @@
            else
            {
                new TopViewDiv(bodyView, title).LoadTopView();
                securityAlarm.status = "enable";
            }
            //布防功能
@@ -341,22 +334,22 @@
                    tip.Show(MainPage.BaseView);
                    return;
                }
                if (securityAlarm.output.Count == 0)
                {
                    var tipText = "请选择告警目标";
                    if(Language.CurrentLanguage !="Chinese")
                    {
                        tipText = "Please select the alarm target";
                    }
                    var tip = new Tip()
                    {
                        Text = tipText,
                        CloseTime = 3,
                        Direction = AMPopTipDirection.None
                    };
                    tip.Show(MainPage.BaseView);
                    return;
                }
                //if (securityAlarm.output.Count == 0)
                //{
                //    var tipText = "请选择告警目标";
                //    if(Language.CurrentLanguage !="Chinese")
                //    {
                //        tipText = "Please select the alarm target";
                //    }
                //    var tip = new Tip()
                //    {
                //        Text = tipText,
                //        CloseTime = 3,
                //        Direction = AMPopTipDirection.None
                //    };
                //    tip.Show(MainPage.BaseView);
                //    return;
                //}
                var waitPage = new Loading();
                waitPage.Start();
@@ -478,8 +471,15 @@
                {
                    if (target.GetFunction() != null)
                    {
                        inputTargetView.AddChidren(new InputRow(target.GetFunction().name, target.GetFunction().GetRoomListName(), target.StateText()));
                    inputTargetView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
                        var inputView = new InputRow(target);
                        inputTargetView.AddChidren(inputView);
                        inputView.InitView();
                        EventHandler<MouseEventArgs> eventHandler = (sener, e) => {
                            securityAlarm.input.Remove(target);
                            iniInputTargetView();
                        };
                        inputView.SetDelClickeEvent(eventHandler);
                        inputTargetView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
                    }
                    count++;
                }
@@ -564,7 +564,6 @@
            };
            contentView.AddChidren(outputTargetView);
            outputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.output.Count);
            iniAlarmListView();
            #endregion
@@ -578,13 +577,79 @@
        private void iniAlarmListView()
        {
            outputTargetView.RemoveAll();
            if (securityAlarm.output.Count > 0)
            {
                if (securityAlarm.type == "all_day" || securityAlarm.type == "mute")
                { }
                else
                {
                    #region 告警延时
                    var delayedRow = new FrameLayout()
                    {
                        Height = Application.GetRealHeight(50),
                        BackgroundColor = CSS_Color.MainBackgroundColor,
                    };
                    outputTargetView.AddChidren(delayedRow);
                    var btnDelayedTitle = new Button()
                    {
                        X = Application.GetRealWidth(16),
                        Width = Application.GetRealWidth(72),
                        TextAlignment = TextAlignment.CenterLeft,
                        TextColor = CSS_Color.FirstLevelTitleColor,
                        TextSize = CSS_FontSize.TextFontSize,
                        TextID = StringId.DelayAlarm,
                    };
                    delayedRow.AddChidren(btnDelayedTitle);
                    btnDelayedTitle.Text += ":";
                    btnDelayedTitle.Width = btnDelayedTitle.GetTextWidth() + Application.GetRealWidth(10);
                    var btnDelayedText = new Button()
                    {
                        X = btnDelayedTitle.Right,
                        Width = Application.GetRealWidth(330),
                        TextAlignment = TextAlignment.CenterLeft,
                        TextColor = CSS_Color.TextualColor,
                        TextSize = CSS_FontSize.TextFontSize,
                        Text = securityAlarm.output_delay + "s"
                    };
                    delayedRow.AddChidren(btnDelayedText);
                    btnDelayedText.MouseUpEventHandler = (sender, e) =>
                    {
                        Action<string> action = (obj) =>
                        {
                            securityAlarm.output_delay = obj;
                            btnDelayedText.Text = securityAlarm.output_delay + "s";
                        };
                        new PublicAssmebly().SetSceneDelayDialog(action, securityAlarm.output_delay);
                    };
                    var btnDelayedRight = new Button()
                    {
                        X = Application.GetRealWidth(343),
                        Gravity = Gravity.CenterVertical,
                        Width = Application.GetMinRealAverage(16),
                        Height = Application.GetMinRealAverage(16),
                        UnSelectedImagePath = "Public/RightIcon.png",
                    };
                    delayedRow.AddChidren(btnDelayedRight);
                    delayedRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
                    #endregion
                }
                foreach (var outTarget in securityAlarm.output)
                {
                    if (outTarget.NoLocalData())
                    if (outTarget.LocalData())
                    {
                        var outputRow = new OutputRow(outTarget.name, outTarget.RoomName, outTarget);
                        var outputRow = new OutputRow( outTarget);
                        outputTargetView.AddChidren(outputRow);
                        outputRow.InitView(outTarget.name, outTarget.RoomName);
                        EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
                            var delTemp = securityAlarm.output.Find((obj) => obj.sid == outTarget.sid);
                            if(delTemp!=null)
@@ -594,11 +659,11 @@
                            outputRow.RemoveFromParent();
                            outputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.output.Count);
                        };
                        outputTargetView.AddChidren(outputRow);
                        outputRow.SetDelClickeEvent(eventHandler);
                    }
                    outputTargetView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
                }
                outputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.output.Count);
                outputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.output.Count + 50);
            }
            else
            {
@@ -658,18 +723,28 @@
        Button btnSubTitle;
        public InputRow(string title, string subtitle,string state)
        Button btnDel;
        Button btnBypass;
        SecurityInput input;
        public InputRow(SecurityInput input)
        {
            this.LineColor = 0x00000000;
            this.Height = Application.GetRealHeight(65);
            this.BackgroundColor = CSS_Color.MainBackgroundColor;
            this.input = input;
        }
        public void InitView( )//(, , );
        {
            btnTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Height = Application.GetRealHeight(44),
                Width = Application.GetRealWidth(320),
                Text = title,
                Text = input.GetFunction().name,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
@@ -682,7 +757,7 @@
                Y = Application.GetRealHeight(24),
                Height = Application.GetRealHeight(44),
                Width = Application.GetRealWidth(320),
                Text = subtitle,
                Text = input.GetFunction().GetRoomListName(),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
@@ -696,10 +771,46 @@
                TextAlignment = TextAlignment.CenterRight,
                TextSize = CSS_FontSize.TextFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                Text = state
                Text = input.StateText()
            };
            this.AddChidren(btnState);
            btnBypass = new Button()
            {
                BackgroundColor = CSS_Color.WarningColor,
                TextColor = CSS_Color.MainBackgroundColor,
                TextID = StringId.Bypass,
                TextAlignment = TextAlignment.Center,
            };
            this.AddRightView(btnBypass);
            btnBypass.MouseUpEventHandler = (sender, e) => {
                if (input.bypass == "true")
                {
                    input.bypass = "false";
                    btnBypass.BackgroundColor = CSS_Color.WarningColor;
                    btnBypass.TextID = StringId.Bypass;
                }
                else
                {
                    input.bypass = "true";
                    btnBypass.BackgroundColor = CSS_Color.MainColor;
                    btnBypass.TextID = StringId.Enable;
                }
            };
            if (input.bypass == "true")
            {
                btnBypass.BackgroundColor = CSS_Color.MainColor;
                btnBypass.TextID = StringId.Enable;
            }
            btnDel = new Button()
            {
                BackgroundColor = CSS_Color.TextualColor,
                TextColor = CSS_Color.MainBackgroundColor,
                TextID = StringId.Del,
                TextAlignment = TextAlignment.Center,
            };
            this.AddRightView(btnDel);
        }
@@ -708,6 +819,11 @@
            this.MouseUpEventHandler = eventHandler;
            btnTitle.MouseUpEventHandler = eventHandler;
            btnSubTitle.MouseUpEventHandler = eventHandler;
        }
        public void SetDelClickeEvent(EventHandler<MouseEventArgs> eventHandler)
        {
            btnDel.MouseUpEventHandler = eventHandler;
        }
    }
@@ -728,13 +844,17 @@
        SecurityOutput output;
        public OutputRow(string title, string subtitle, SecurityOutput inOutput)
        public OutputRow(SecurityOutput inOutput)
        {
            output = inOutput;
            this.LineColor = 0x00000000;
            this.Height = Application.GetRealHeight(65);
            this.BackgroundColor = CSS_Color.MainBackgroundColor;
        }
        public void InitView(string title, string subtitle )
        {
            btnTitle = new Button()
            {
@@ -807,17 +927,14 @@
            {
                BackgroundColor = CSS_Color.WarningColor,
                TextColor = CSS_Color.MainBackgroundColor,
                TextAlignment = TextAlignment.Center,
                TextID = StringId.Del,
            };
            this.AddRightView(btnDel);
        }
        public void SetDelClick(EventHandler<MouseEventArgs> eventHandler)
        {
            btnDel.MouseUpEventHandler = eventHandler;
        }
        public void SetClickEvent(EventHandler<MouseEventArgs> eventHandler)
        {
            btnState.MouseUpEventHandler = eventHandler;
@@ -825,7 +942,10 @@
            btnSubTitle.MouseUpEventHandler = eventHandler;
        }
        public void SetDelClickeEvent(EventHandler<MouseEventArgs> eventHandler)
        {
            btnDel.MouseUpEventHandler = eventHandler;
        }
        private void ShowStateDialog()
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs
@@ -66,7 +66,7 @@
            btnFloor.MouseUpEventHandler = (sender, e) =>
            {
                string nowSelectId = null;
                var list = FunctionList.List.GetArmSensorList();
                var list = FunctionList.List.GetArmCenterList();
#if DEBUG
                list.AddRange(FunctionList.List.GetLightList());
@@ -93,7 +93,7 @@
            bodyView.AddChidren(functionListView);
            var listAllFun = FunctionList.List.GetArmSensorList();
            var listAllFun = FunctionList.List.GetArmCenterList();
#if DEBUG
            listAllFun.AddRange(FunctionList.List.GetLightList());
#endif
@@ -145,7 +145,7 @@
            if (functions == null)
            {
                //初始值
                functions = FunctionList.List.GetArmSensorList();
                functions = FunctionList.List.GetArmCenterList();
            }
@@ -177,6 +177,8 @@
                            inValue = "alarm";
                            break;
                        case SPK.SensorDoorWindow:
                        case SPK.SensorDryContact:
                        case SPK.SensorDryContact2:
                            inKey = "contact_status";
                            inValue = "open";
                            break;
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs
@@ -198,7 +198,6 @@
            #region 固定布防区域
            /*
            var fixedDeploymentView = new FrameLayout()
            {
                Height = Application.GetRealHeight(133),
@@ -286,9 +285,8 @@
                addDefensePage.LoadPage(Language.StringByID(StringId.BurglarAlarm));
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            disasterAlarmView.SetClick(disasterAlarmViewClick);
            burglarAlarmView.SetClick(burglarAlarmViewClick);
            fixedDeploymentTypeView.AddChidren(burglarAlarmView);
            */
            #endregion
@@ -331,6 +329,10 @@
            armDiyViewList.Clear();
            foreach (var mode in FunctionList.List.securities)
            {
                if(mode.type== "all_day"|| mode.type == "mute")
                {
                    continue;
                }
                var armDiyView = new ArmDiyView("FunctionIcon/ArmCenter/AtHomeDefenseIcon.png", "FunctionIcon/ArmCenter/AtHomeDefenseIconOn.png",
                mode.name,mode.sid);
                customDeploymentView.AddChidren(armDiyView);
@@ -350,7 +352,7 @@
                armDiyViewList.Add(armDiyView);
            }
            if (FunctionList.List.securities.Count < 4)
            if (FunctionList.List.GetOrdinarySecurities().Count < 4)
            {
                var view = new ArmDiyView("FunctionIcon/ArmCenter/AddDefenseIcon.png", "FunctionIcon/ArmCenter/AddDefenseIcon.png",
                  Language.StringByID(StringId.Custom),"customSid");
@@ -430,6 +432,7 @@
                TextID = StringId.Cancel,
                TextColor = CSS_Color.WarningColor,
                IsBold = true,
                TextSize = CSS_FontSize.SubheadingFontSize,
            };
            contentView.AddChidren(btnCancel);
@@ -488,6 +491,10 @@
                {
                    if (bodyView != null)
                    {
                        if(updataTemp.type == "all_day"|| updataTemp.type == "mute")
                        {
                            return;
                        }
                        bodyView.refreshAction?.Invoke();
                        //布防
@@ -506,8 +513,9 @@
                        else
                        {
                            //撤防
                            if(bodyView.InDefenseMode.sid == updataTemp.sid)
                            if (bodyView.InDefenseMode.sid == updataTemp.sid)
                            {
                                bodyView.InDefenseMode.status = updataTemp.status;
                                foreach (var tempView in bodyView.armDiyViewList)
                                {
                                    tempView.LightingView(false);
@@ -653,6 +661,7 @@
                TextSize = CSS_FontSize.TextFontSize,
                Text = title,
                IsBold = true,
                IsMoreLines = true,
            };
            this.AddChidren(btnTitle);
HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockListPage.cs
@@ -38,6 +38,14 @@
        /// <param name="i_listDevice">门锁设备列表</param>
        public void ShowForm(List<Function> i_listDevice)
        {
#if DEBUG
#endif
            this.listDevice.AddRange(i_listDevice);
            //智能门锁
HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
@@ -5,6 +5,7 @@
using System.Text;
using HDL_ON.UI.CSS;
using HDL_ON.Entity;
using HDL_ON.DriverLayer;
namespace HDL_ON.UI
{
@@ -96,24 +97,26 @@
            this.dicText["已连接"] = Language.StringByID(StringId.Connected);
            this.dicText["未连接"] = Language.StringByID(StringId.UnConnected);
            //左右翻页的事件
            base.PageChangeEvent += (index) =>
            {
                if (index == 1)
                {
                    //初始化门锁历史记录以及控件
                    this.InitDoorHistoryLogAndControl();
                }
            };
            ////左右翻页的事件
            //base.PageChangeEvent += (index) =>
            //{
            //    if (index == 1)
            //    {
            //        //初始化门锁历史记录以及控件
            //        this.InitDoorHistoryLogAndControl();
            //    }
            //};
            //刷新当前设备的状态缓存
            this.RefreshNowDeviceStatuMemory(this.device);
            //初始化第一个索引页的内容
            this.InitFrameWhiteContent1();
            //初始化第二个索引页(历史记录)
            this.InitFrameWhiteContent2();
            ////初始化第二个索引页(历史记录)
            //this.InitFrameWhiteContent2();
            //刷新界面状态
            this.RefreshFormStatu();
            //读取设备状态
            Control.Ins.SendReadCommand(device);
        }
        /// <summary>
@@ -182,42 +185,42 @@
            frameTempPsw.Visible = false;
            FrameWhiteCentet1.AddChidren(frameTempPsw);
            //声音
            this.btnVoice = new IconViewControl(24);
            btnVoice.UnSelectedImagePath = "FunctionIcon/DoorLock/Voice.png";
            btnVoice.X = Application.GetRealWidth(23);
            btnVoice.Y = Application.GetRealHeight(410);
            FrameWhiteCentet1.AddChidren(btnVoice);
            ////声音
            //this.btnVoice = new IconViewControl(24);
            //btnVoice.UnSelectedImagePath = "FunctionIcon/DoorLock/Voice.png";
            //btnVoice.X = Application.GetRealWidth(23);
            //btnVoice.Y = Application.GetRealHeight(410);
            //FrameWhiteCentet1.AddChidren(btnVoice);
            //声音的滑动条
            this.seekBarVoiceControl = new SeekBarImageControl(215);
            seekBarVoiceControl.Gravity = Gravity.CenterHorizontal;
            FrameWhiteCentet1.AddChidren(seekBarVoiceControl);
            seekBarVoiceControl.Y = btnVoice.Y - (seekBarVoiceControl.Height - btnVoice.Height) / 2;
            //绑定PageLayout控件
            seekBarVoiceControl.BindPageLayout();
            ////声音的滑动条
            //this.seekBarVoiceControl = new SeekBarImageControl(215);
            //seekBarVoiceControl.Gravity = Gravity.CenterHorizontal;
            //FrameWhiteCentet1.AddChidren(seekBarVoiceControl);
            //seekBarVoiceControl.Y = btnVoice.Y - (seekBarVoiceControl.Height - btnVoice.Height) / 2;
            ////绑定PageLayout控件
            //seekBarVoiceControl.BindPageLayout();
            //声音百分比
            this.btnVoicePersent = new NormalViewControl(Application.GetRealWidth(50), btnVoice.Height, false);
            btnVoicePersent.X = seekBarVoiceControl.Right + Application.GetRealWidth(8) - seekBarVoiceControl.SeekBarPadding;
            btnVoicePersent.Y = btnVoice.Y;
            btnVoicePersent.TextColor = CSS_Color.PromptingColor1;
            btnVoicePersent.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
            btnVoicePersent.Text = "100%";
            FrameWhiteCentet1.AddChidren(btnVoicePersent);
            ////声音百分比
            //this.btnVoicePersent = new NormalViewControl(Application.GetRealWidth(50), btnVoice.Height, false);
            //btnVoicePersent.X = seekBarVoiceControl.Right + Application.GetRealWidth(8) - seekBarVoiceControl.SeekBarPadding;
            //btnVoicePersent.Y = btnVoice.Y;
            //btnVoicePersent.TextColor = CSS_Color.PromptingColor1;
            //btnVoicePersent.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
            //btnVoicePersent.Text = "100%";
            //FrameWhiteCentet1.AddChidren(btnVoicePersent);
            seekBarVoiceControl.ProgressChangedEvent += (div, value) =>
            {
                btnVoicePersent.Text = value + "%";
                if (div == 1)
                {
                }
            };
            //seekBarVoiceControl.ProgressChangedEvent += (div, value) =>
            //{
            //    btnVoicePersent.Text = value + "%";
            //    if (div == 1)
            //    {
            //    }
            //};
            //初始化开锁菜单(一键开锁,临时密码开锁)
            this.InitUnLockMenuControl();
            //初始化底部菜单图标
            this.InitBottomMenuIconControl();
            //this.InitBottomMenuIconControl();
        }
        /// <summary>
@@ -226,7 +229,7 @@
        private void InitUnLockMenuControl()
        {
            //如果是成员,则只有一键开锁
            if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true)
            if (true)// DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true)
            {
                //一键开锁
                var btnOneKey = new NormalViewControl(100, 25, true);
@@ -908,6 +911,7 @@
                HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipRemind, Language.StringByID(StringId.DeviceNotOnline), null, null, null, 2);
                return;
            }
            Control.Ins.OneKeyUnlocking(this.device, this.device.GetAttrState("key"));
            //第一次使用,请先绑定门锁密码
            //HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.PleaseBindTheDoorPswFirst), () =>
            //{
@@ -921,42 +925,40 @@
            //    });
            //});
            if (UserInfo.Current.appUnlockPage.Contains("3") == true)
            {
                //调起安全认证
                HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) =>
                {
                    //锁已打开
                    if (div == 1)
                    {
                        HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipSuccess, Language.StringByID(StringId.LockIsOpened), null, null, null, 2);
                    }
                    else
                    {
                        //为了安全,请跳转至个人中心{0}设置个人密码,并应用于门锁开锁
                        HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
                        {
                            var page = new AppUnlockSettingsPage();
                            MainPage.BasePageView.AddChidren(page);
                            page.LoadPage();
                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        }, Language.StringByID(StringId.Jump));
                    }
                });
            }
            else
            {
                //为了安全,请跳转至个人中心{0}设置个人密码,并应用于门锁开锁
                HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
                {
                    var page = new AppUnlockSettingsPage();
                    MainPage.BasePageView.AddChidren(page);
                    page.LoadPage();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }, Language.StringByID(StringId.Jump));
            }
            //if (UserInfo.Current.appUnlockPage.Contains("3") == true)
            //{
            //    //调起安全认证
            //    HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) =>
            //    {
            //        //锁已打开
            //        if (div == 1)
            //        {
            //            HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipSuccess, Language.StringByID(StringId.LockIsOpened), null, null, null, 2);
            //        }
            //        else
            //        {
            //            //为了安全,请跳转至个人中心{0}设置个人密码,并应用于门锁开锁
            //            HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
            //            {
            //                var page = new AppUnlockSettingsPage();
            //                MainPage.BasePageView.AddChidren(page);
            //                page.LoadPage();
            //                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            //            }, Language.StringByID(StringId.Jump));
            //        }
            //    });
            //}
            //else
            //{
            //    //为了安全,请跳转至个人中心{0}设置个人密码,并应用于门锁开锁
            //    HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
            //    {
            //        var page = new AppUnlockSettingsPage();
            //        MainPage.BasePageView.AddChidren(page);
            //        page.LoadPage();
            //        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            //    }, Language.StringByID(StringId.Jump));
            //}
        }
        #endregion
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs
@@ -2,6 +2,7 @@
using Shared;
using HDL_ON.UI.CSS;
using HDL_ON.Entity;
using HDL_ON.DriverLayer;
namespace HDL_ON.UI
{
@@ -132,6 +133,94 @@
            };
            controlView.AddChidren(btnSwitch);
            if (function.attributes.Find((obj) => obj.key == "active_power" || obj.key == "voltage" || obj.key == "current") != null)
            {
                //加载瞬时值
                var btnInstantaneousValue = new Button()
                {
                    X = Application.GetRealWidth(67),
                    Y = Application.GetRealHeight(377),
                    Width = Application.GetMinRealAverage(32),
                    Height = Application.GetMinRealAverage(32),
                    UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png",
                };
                controlView.AddChidren(btnInstantaneousValue);
                var btnInstantaneousValueText = new Button()
                {
                    X = Application.GetRealWidth(35),
                    Y = btnInstantaneousValue.Bottom,
                    Width = Application.GetRealWidth(96),
                    Height = Application.GetRealHeight(29),
                    TextAlignment = TextAlignment.Center,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                    TextColor = CSS_Color.TextualColor,
                    TextID = StringId.InstantaneousValue,
                    IsMoreLines = true
                };
                controlView.AddChidren(btnInstantaneousValueText);
                EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
                    var page = new SocketPage_InstantaneousValue(function);
                    MainPage.BasePageView.AddChidren(page);
                    page.LoadPage();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                };
                btnInstantaneousValue.MouseUpEventHandler = eventHandler;
                btnInstantaneousValueText.MouseUpEventHandler = eventHandler;
            }
            if(function.attributes.Find((obj)=>obj.key == "total_electricity") != null)
            {
                //加载累计用电
                var btnTotalElectricity = new Button()
                {
                    X = Application.GetRealWidth(200),
                    Y = Application.GetRealHeight(377),
                    Height = Application.GetMinRealAverage(32),
                    TextColor = CSS_Color.MainColor,
                    TextSize = CSS_FontSize.EmphasisFontSize_Secondary,
                    Text = function.GetAttrState("total_electricity"),
                    TextAlignment = TextAlignment.BottomLeft,
                };
                btnTotalElectricity.Width = btnTotalElectricity.GetTextWidth();
                controlView.AddChidren(btnTotalElectricity);
                var btnTotalElectricityUnit = new Button()
                {
                    X = btnTotalElectricity.Right,
                    Y = Application.GetRealHeight(377),
                    Width = Application.GetRealWidth(100),
                    Height = Application.GetMinRealAverage(32),
                    TextColor = CSS_Color.TextualColor,
                    TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
                    Text = "kW·h",
                    TextAlignment = TextAlignment.BottomLeft,
                };
                controlView.AddChidren(btnTotalElectricityUnit);
                var btnTotalElectricityText = new Button()
                {
                    X = Application.GetRealWidth(200),
                    Y = btnTotalElectricity.Bottom,
                    Width = Application.GetRealWidth(100),
                    Height = Application.GetRealHeight(29),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                    TextColor = CSS_Color.TextualColor,
                    TextID = StringId.CumulativePowerConsumption,
                    IsMoreLines = true
                };
                controlView.AddChidren(btnTotalElectricityText);
                EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
                    var page = new SocketPage_CumulativePowerConsumption(function);
                    MainPage.BasePageView.AddChidren(page);
                    page.LoadPage();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                };
                btnTotalElectricity.MouseUpEventHandler = eventHandler;
                btnTotalElectricityUnit.MouseUpEventHandler = eventHandler;
                btnTotalElectricityText.MouseUpEventHandler = eventHandler;
            }
            LoadEventList();
            new TopViewDiv(bodyView, Language.StringByID(StringId.Socket)).LoadTopView_FunctionTop(function, actionRefresh);
@@ -143,4 +232,98 @@
        }
    }
    public partial class SocketPage
    {
        /// <summary>
        /// 更新灯光状态
        /// </summary>
        public static void UpdataState(Function uFan)
        {
            Application.RunOnMainThread(() =>
            {
                try
                {
                    if (bodyView == null)
                        return;
                    bodyView.btnSwitch.IsSelected = bodyView.btnSwitchIcon.IsSelected = uFan.trait_on_off.curValue.ToString() == "on";
                }
                catch (Exception ex)
                {
                    MainPage.Log($"RelayPage error {ex.Message}");
                }
            });
        }
        /// <summary>
        /// 加载事件列表
        /// </summary>
        void LoadEventList()
        {
            LoadSwitchEvent();
            LoadCollectionEvent();
            //回退刷新信息事件
            actionRefresh = () => {
                btnFunctionName.Text = btnFunctionName_Out.Text = function.name;
                btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
                function.UpdataFuncitonInfo();
            };
        }
        /// <summary>
        /// 收藏功能按钮事件
        /// </summary>
        void LoadCollectionEvent()
        {
            btnCollection.MouseUpEventHandler += (sender, e) => {
                btnCollection.IsSelected = function.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected;
                function.CollectFunction();
            };
        }
        /// <summary>
        /// 加载开关事件
        /// </summary>
        void LoadSwitchEvent()
        {
            btnSwitchIcon.MouseUpEventHandler += (sender, e) =>
            {
                btnSwitchIcon.IsSelected = btnSwitch.IsSelected = !btnSwitchIcon.IsSelected;
                new System.Threading.Thread(() =>
                {
                    function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("on_off", function.trait_on_off.curValue.ToString());
                    if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null) {
                        d.Add("on_off_usb", function.trait_on_off.curValue.ToString());
                    }
                    Control.Ins.SendWriteCommand(function, d);
                })
                { IsBackground = true }.Start();
            };
            btnSwitch.MouseUpEventHandler += (sender, e) =>
            {
                btnSwitch.IsSelected = btnSwitchIcon.IsSelected = !btnSwitch.IsSelected;
                new System.Threading.Thread(() =>
                {
                    function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("on_off", function.trait_on_off.curValue.ToString());
                    if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null)
                    {
                        d.Add("on_off_usb", function.trait_on_off.curValue.ToString());
                    }
                    Control.Ins.SendWriteCommand(function, d);
                })
                { IsBackground = true }.Start();
            };
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPageBLL.cs
@@ -5,89 +5,4 @@
namespace HDL_ON.UI
{
    public partial class SocketPage
    {
        /// <summary>
        /// 更新灯光状态
        /// </summary>
        public static void UpdataState(Function uFan)
        {
            Application.RunOnMainThread(() =>
            {
                try
                {
                    if (bodyView == null)
                        return;
                    bodyView.btnSwitch.IsSelected = bodyView.btnSwitchIcon.IsSelected = uFan.trait_on_off.curValue.ToString() == "on";
                }
                catch (Exception ex)
                {
                    MainPage.Log($"RelayPage error {ex.Message}");
                }
            });
        }
        /// <summary>
        /// 加载事件列表
        /// </summary>
        void LoadEventList()
        {
            LoadSwitchEvent();
            LoadCollectionEvent();
            //回退刷新信息事件
            actionRefresh = () => {
                btnFunctionName.Text = btnFunctionName_Out.Text = function.name;
                btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
                function.UpdataFuncitonInfo();
            };
        }
        /// <summary>
        /// 收藏功能按钮事件
        /// </summary>
        void LoadCollectionEvent()
        {
            btnCollection.MouseUpEventHandler += (sender, e) => {
                btnCollection.IsSelected = function.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected;
                function.CollectFunction();
            };
        }
        /// <summary>
        /// 加载开关事件
        /// </summary>
        void LoadSwitchEvent()
        {
            btnSwitchIcon.MouseUpEventHandler += (sender, e) =>
            {
                btnSwitchIcon.IsSelected = btnSwitch.IsSelected = !btnSwitchIcon.IsSelected;
                new System.Threading.Thread(() =>
                {
                    function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                    //Control.Send(CommandType_A.write, this.function);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("on_off", function.trait_on_off.curValue.ToString());
                    Control.Ins.SendWriteCommand(function, d);
                })
                { IsBackground = true }.Start();
            };
            btnSwitch.MouseUpEventHandler += (sender, e) =>
            {
                btnSwitch.IsSelected = btnSwitchIcon.IsSelected = !btnSwitch.IsSelected;
                new System.Threading.Thread(() =>
                {
                    function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                    //Control.Send(CommandType_A.write, this.function);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("on_off", function.trait_on_off.curValue.ToString());
                    Control.Ins.SendWriteCommand(function, d);
                })
                { IsBackground = true }.Start();
            };
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_CumulativePowerConsumption.cs
New file
@@ -0,0 +1,404 @@
using System;
using System.Collections.Generic;
using HDL_ON.DAL.Server;
using HDL_ON.DriverLayer;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI
{
    public class SocketPage_CumulativePowerConsumption : FrameLayout
    {
        static SocketPage_CumulativePowerConsumption bodyView;
        /// <summary>
        /// 顶部区域
        /// </summary>
        FrameLayout generalTableView;
        /// <summary>
        /// 实时功耗
        /// </summary>
        Button btnRealTimeData;
        /// <summary>
        /// 实时功耗单位
        /// </summary>
        Button btnTotalValueUint;
        /// <summary>
        /// 总功耗
        /// </summary>
        TextButton btnTotalValue;
        /// <summary>
        /// 历史数据区域
        /// </summary>
        FrameLayout diagramView;
        /// <summary>
        /// 曲线图数据string
        /// </summary>
        EchartsOption_BrokenLine brokenLine;
        /// <summary>
        /// 插查询的能源列表
        /// </summary>
        List<Function> queryList = new List<Function>();
        /// <summary>
        /// 查询条件
        /// hour、week、month
        /// </summary>
        string curQueryType = "hour";
        /// <summary>
        /// 能源列表区域
        /// </summary>
        FrameLayout energyListView;
        /// <summary>
        /// 历史数据图表
        /// </summary>
        MyEchartsViewOn myEchartsView_Line;
        Function function;
        /// <summary>
        /// 主页
        /// </summary>
        public SocketPage_CumulativePowerConsumption(Function function)
        {
            this.function = function;
            bodyView = this;
        }
        /// <summary>
        ///
        /// </summary>
        public void LoadPage()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.CumulativePowerConsumption)).LoadTopView();
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            var contentView = new FrameLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(603),
            };
            bodyView.AddChidren(contentView);
            #region 顶部view
            generalTableView = new FrameLayout()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealWidth(148),//419//148
                Radius = (uint)Application.GetRealWidth(5),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(generalTableView);
            btnTotalValue = new TextButton()
            {
                X = Application.GetRealWidth(18),
                Y = Application.GetRealWidth(24),
                Width = Application.GetRealWidth(18),
                Height = Application.GetRealWidth(52),
                TextColor = CSS_Color.FirstLevelTitleColor,
                IsBold = true,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = 40,
                Text = function.GetAttrState("total_electricity")
            };
            btnTotalValue.Width = btnTotalValue.GetTextWidth();
            generalTableView.AddChidren(btnTotalValue);
            btnTotalValueUint = new Button()
            {
                X = btnTotalValue.Right,
                Y = Application.GetRealWidth(24),
                Width = Application.GetRealWidth(60),
                Height = Application.GetRealWidth(28),
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                IsBold = true,
                Text = "kW‧h",
                TextAlignment = TextAlignment.CenterLeft,
            };
            generalTableView.AddChidren(btnTotalValueUint);
            btnRealTimeData = new Button()
            {
                X = Application.GetRealWidth(18),
                Y = btnTotalValue.Bottom,
                Width = Application.GetRealWidth(209),
                Height = Application.GetRealWidth(28),
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.RealTimePowerConsumption,
            };
            double realTimePower = 0;
            double.TryParse(function.GetAttrState("active_power"), out realTimePower);
            realTimePower /= 1000;
            btnRealTimeData.Text = Language.StringByID(StringId.RealTimePowerConsumption).Replace("{0}", realTimePower.ToString());
            generalTableView.AddChidren(btnRealTimeData);
            generalTableView.Height = Application.GetRealWidth(459);
            #endregion
            initDiagramView();
        }
        /// <summary>
        /// 加载曲线图
        /// </summary>
        /// <param name="contentView"></param>
        void initDiagramView()
        {
            brokenLine = new EchartsOption_BrokenLine();
            diagramView = new FrameLayout()
            {
                Y = Application.GetRealWidth(136),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealWidth(281),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealWidth(12),
                BorderColor = 0x00000000,
                BorderWidth = 0,
            };
            generalTableView.AddChidren(diagramView);
            #region 选择数据日期范围
            var showDataTypeView = new FrameLayout()
            {
                X = Application.GetRealWidth(136),
                Y = Application.GetRealHeight(12),
                Width = Application.GetRealWidth(144+47),
                Height = Application.GetRealHeight(24),
                BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png",
            };
            diagramView.AddChidren(showDataTypeView);
            var btnShowHistroyData_Day = new Button()
            {
                Width = Application.GetRealWidth(48),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.PromptingColor2,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                IsSelected = true,
                TextID = StringId.day,
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Day);
            var btnShowHistroyData_Week = new Button()
            {
                X = Application.GetRealWidth(48),
                Width = Application.GetRealWidth(48),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.PromptingColor2,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextID = StringId.week,
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Week);
            var btnShowHistroyData_Month = new Button()
            {
                X = Application.GetRealWidth(48 * 2),
                Width = Application.GetRealWidth(48),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.PromptingColor2,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = Language.StringByID(StringId.month)
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Month);
            var btnShowHistroyData_Year = new Button()
            {
                X = Application.GetRealWidth(48 * 3),
                Width = Application.GetRealWidth(48),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.PromptingColor2,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = Language.StringByID(StringId.Years),
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Year);
            btnShowHistroyData_Day.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png";
                btnShowHistroyData_Day.IsSelected = true;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Week.IsSelected = false;
                btnShowHistroyData_Year.IsSelected = false;
                curQueryType = "hour";
                brokenLine.YvalueText = "";
                LoadMothed_GetHistoryData();
            };
            btnShowHistroyData_Week.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg2.png";
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Week.IsSelected = true;
                btnShowHistroyData_Year.IsSelected = false;
                curQueryType = "week";
                brokenLine.YvalueText = "";
                LoadMothed_GetHistoryData();
            };
            btnShowHistroyData_Month.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg3.png";
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Month.IsSelected = true;
                btnShowHistroyData_Week.IsSelected = false;
                btnShowHistroyData_Year.IsSelected = false;
                curQueryType = "month";
                brokenLine.YvalueText = "";
                LoadMothed_GetHistoryData();
            };
            btnShowHistroyData_Year.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg4.png";
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Year.IsSelected = true;
                btnShowHistroyData_Week.IsSelected = false;
                curQueryType = "year_month";
                brokenLine.YvalueText = "";
                LoadMothed_GetHistoryData();
            };
            #endregion
            var historyDataView = new FrameLayout()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealWidth(52),
                Height = Application.GetRealWidth(240),
            };
            diagramView.AddChidren(historyDataView);
            myEchartsView_Line = new MyEchartsViewOn()
            {
                Y = Application.GetRealWidth(10),
                Height = Application.GetRealWidth(220),
            };
            historyDataView.AddChidren(myEchartsView_Line);
            LoadMothed_GetHistoryData();
        }
        /// <summary>
        /// 读取历史数据
        /// </summary>
        void LoadMothed_GetHistoryData()
        {
            var loadPage = new Loading()
            {
                LodingBackgroundColor = 0x88888888,
            };
            diagramView.AddChidren(loadPage);
            //var d = new List<string> ();
            //var dd = new List<EnvironmentalSensorHistor>();
            //Random random = new Random() ;
            //for (int ii = 0; ii < 13; ii++)
            //{
            //    var i = random.Next(10000);
            //    d.Add(i.ToString());
            //    dd.Add(new EnvironmentalSensorHistor
            //    {
            //        fieldName = i.ToString(),
            //        fieldValue = i.ToString()
            //    });
            //}
            //brokenLine.InitXdataText(d);
            //brokenLine.InitYdataText(function.name, dd, "#80AEFF");
            //brokenLine.yTitle = "能耗(kW)";
            //brokenLine.xTitle = "小时";
            //var opString = brokenLine.InitOption();
            //myEchartsView_Line.ShowWithOption(opString);
            //return;
            new System.Threading.Thread(() =>
            {
                try
                {
                    Application.RunOnMainThread(() =>
                    {
                        loadPage.Start(Language.StringByID(StringId.PleaseWait));
                    });
                    var sensorType = function.spk.Split(".")[1];
                    var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, function.deviceId, "total_electricity");
                    if (revertObj != null)
                    {
                        if (revertObj.Code == StateCode.SUCCESS)
                        {
                            var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString());
                            List<string> vs = new List<string>();
                            if (brokenLine.YvalueText == "")
                            {
                                foreach (var data in revertData)
                                {
                                    vs.Add(data.fieldName);
                                }
                                brokenLine.InitXdataText(vs);
                            }
                            if (function.GetAttribute("ydata") == null)
                            {
                                function.attributes.Add(new FunctionAttributes() { key = "ydata" });
                            }
                            function.SetAttrState("ydata", brokenLine.InitYdataText(function.name, revertData, "#80AEFF") + ",");
                        }
                    }
                    brokenLine.yTitle = Language.StringByID(StringId.EnergyConsumption) + "(kW)";
                    brokenLine.xTitle = Language.StringByID(StringId.timeMode);
                    if (curQueryType != "hour")
                    {
                        brokenLine.xTitle = Language.StringByID(StringId.Date);
                    }
                    var opString = brokenLine.InitOption();
                    Application.RunOnMainThread(() =>
                    {
                        myEchartsView_Line.ShowWithOption(opString);
                    });
                }
                catch (Exception ex)
                {
                    MainPage.Log($"sensor history error : {ex.Message}");
                }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        loadPage.Hide();
                    });
                }
            })
            { IsBackground = true }.Start();
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_InstantaneousValue.cs
New file
@@ -0,0 +1,196 @@
using System;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI
{
    public class SocketPage_InstantaneousValue : FrameLayout
    {
        static SocketPage_InstantaneousValue bodyView;
        HorizontalScrolViewLayout instantaneousValueView;
        Function function;
        public SocketPage_InstantaneousValue(Function function)
        {
            this.function = function;
            bodyView = this;
        }
        public void LoadPage()
        {
            bodyView.BackgroundColor = CSS.CSS_Color.BackgroundColor;
            FrameLayout contentView = new FrameLayout()
            {
                Y= Application .GetRealHeight(64),
                Height = Application.GetRealHeight(603),
            };
            bodyView.AddChidren(contentView);
            instantaneousValueView = new HorizontalScrolViewLayout()
            {
                Y = Application.GetRealHeight(16),
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(110),
                Gravity = Gravity.CenterHorizontal,
                Radius = (uint)Application.GetRealWidth(12),
                BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
                ScrollEnabled = false,
            };
            contentView.AddChidren(instantaneousValueView);
            var voltageAttr = function.GetAttribute("voltage");//电压
            if (voltageAttr != null)
            {
                var view = new InstantaneousValueView();
                view.Init(voltageAttr.curValue.ToString(), Language.StringByID(StringId.VoltageAndUnit));
                view.Tag = "voltage";
                instantaneousValueView.AddChidren(view);
            }
            var currentAttr = function.GetAttribute("current");//电流
            if (currentAttr != null)
            {
                var view = new InstantaneousValueView();
                view.Init(currentAttr.curValue.ToString(), Language.StringByID(StringId.CurrentAndUnit));
                view.Tag = "current";
                instantaneousValueView.AddChidren(view);
            }
            var active_powerAttr = function.GetAttribute("active_power");//有功功率
            if (active_powerAttr != null)
            {
                var view = new InstantaneousValueView();
                view.Init(active_powerAttr.curValue.ToString(), Language.StringByID(StringId.ActivePowerAndUnit));
                view.Tag = "active_power";
                instantaneousValueView.AddChidren(view);
            }
            var btnRefresh = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(539),
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealWidth(44),
                Radius = (uint)Application.GetRealWidth(22),
                BackgroundColor = CSS_Color.MainColor,
                TextColor = CSS_Color.MainBackgroundColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.Center,
                IsBold = true,
                TextID = StringId.Refresh,
            };
            contentView.AddChidren(btnRefresh);
            btnRefresh.MouseUpEventHandler = (sender, e) => {
                new System.Threading.Thread(() =>
                {
                    DriverLayer.Control.Ins.SendReadCommand(function);
                })
                { IsBackground = true }.Start();
            };
            new TopViewDiv(bodyView, Language.StringByID(StringId.InstantaneousValue)).LoadTopView();
            new System.Threading.Thread(() =>
            {
                DriverLayer.Control.Ins.SendReadCommand(function);
            })
            { IsBackground = true }.Start();
        }
        public static void UpdataView(Function updata)
        {
            if(bodyView!=null)
            {
                for (int i = 0; i < bodyView.instantaneousValueView.ChildrenCount; i++)
                {
                    var view = bodyView.instantaneousValueView.GetChildren(i);
                    if(null != view.Tag )
                    {
                        if (view.GetType() == typeof(InstantaneousValueView))
                        {
                           var view2 = view as InstantaneousValueView;
                            switch (view.Tag.ToString())
                            {
                                case "active_power":
                                    var attr = updata.GetAttribute("active_power");
                                    if (attr != null)
                                    {
                                        view2.btnValue.Text = attr.curValue.ToString();
                                    }
                                    break;
                                case "voltage":
                                    var attr1 = updata.GetAttribute("voltage");
                                    if (attr1 != null)
                                    {
                                        view2.btnValue.Text = attr1.curValue.ToString();
                                    }
                                    break;
                                case "current":
                                    var attr2 = updata.GetAttribute("current");
                                    if (attr2 != null)
                                    {
                                        view2.btnValue.Text = attr2.curValue.ToString();
                                    }
                                    break;
                            }
                        }
                    }
                }
            }
        }
    }
    public class InstantaneousValueView :FrameLayout
    {
        public FrameLayout View;
        public Button btnValue;
        public Button btnLine;
        public Button btnUnit;
        public InstantaneousValueView()
        {
            View = this;
            View.Width = Application.GetRealWidth(115);
            View.Height = Application.GetRealHeight(110);
        }
        public void Init(string value, string unit)
        {
            btnValue = new Button()
            {
                Height = Application.GetRealHeight(59),
                Y = Application.GetRealWidth(12),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS.CSS_Color.FirstLevelTitleColor,
                TextSize = CSS.CSS_FontSize.EmphasisFontSize_FirstLevel,
                Text = value,
            };
            View.AddChidren(btnValue);
            btnLine = new Button()
            {
                Height = Application.GetRealHeight(2),
                Width = Application.GetRealWidth(60),
                Gravity = Gravity.CenterHorizontal,
                BackgroundColor = CSS.CSS_Color.MainColor,
                Y = Application.GetRealHeight(59),
            };
            View.AddChidren(btnLine);
            btnUnit = new Button()
            {
                Y = Application.GetRealHeight(59),
                Height = Application.GetRealHeight(33),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS.CSS_Color.PromptingColor1,
                TextSize = CSS.CSS_FontSize.PromptFontSize_FirstLevel,
                Text = unit
            };
            View.AddChidren(btnUnit);
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
@@ -180,7 +180,14 @@
                double.TryParse(ene.GetAttrState(FunctionAttributeKey.TotalElectricity), out tt);
                tt *= 100;//乘以100,小于1无法加载echart
                tt = Math.Round(tt, 2);
                list.Add(ene.name, tt.ToString());
                if (list.ContainsKey(ene.name))
                {
                    list.Add(ene.name + "1", tt.ToString());
                }
                else
                {
                    list.Add(ene.name, tt.ToString());
                }
            }
            myEchartsView_Pie.ShowWithOption(new EchartsOption_Pie().InitDateJson(list));
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs
@@ -124,23 +124,25 @@
                    ]
            }";
#else
 public string optionString = @"{
        public string optionString = @"{
                 tooltip: {
                    trigger: 'axis'
                    },
                    grid: {
                         top: '10%',
                         top: '15%',
                        left: '13%',
                        right: '10%',
                        bottom: '15%',
                        right: '12%',
                        bottom: '10%',
                    },
                    xAxis: {
                        type: 'category',
                        boundaryGap: false,
                        data: [{0}],
                        name: '{10}'
                    },
                    yAxis: {
                        type: 'value',
                        name: '{20}'
                    },
                    series: [  
                        {1}
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
@@ -73,7 +73,7 @@
            };
            bodyView.AddChidren(contentView);
            contentView.AddChidren(new Button() { Height = Application.GetRealHeight(12) });
            contentView.AddChidren(new Button() { Height = Application.GetRealHeight(16) });
            FrameLayout diagramView = new FrameLayout()
            {
SiriIntents/Info.plist
@@ -11,9 +11,9 @@
    <key>CFBundlePackageType</key>
    <string>XPC!</string>
    <key>CFBundleShortVersionString</key>
    <string>1.3.202112062</string>
    <string>1.3.202112271</string>
    <key>CFBundleVersion</key>
    <string>1.3.12062</string>
    <string>1.3.12271</string>
    <key>MinimumOSVersion</key>
    <string>12.0</string>
    <key>NSExtension</key>
SiriIntentsUI/Info.plist
@@ -15,9 +15,9 @@
    <key>CFBundlePackageType</key>
    <string>XPC!</string>
    <key>CFBundleShortVersionString</key>
    <string>1.3.202112062</string>
    <string>1.3.202112271</string>
    <key>CFBundleVersion</key>
    <string>1.3.12062</string>
    <string>1.3.12271</string>
    <key>MinimumOSVersion</key>
    <string>12.0</string>
    <key>NSExtension</key>
ThirdPartyIntegration/OnproUmengSdk/ApiDefinitions.cs
New file
@@ -0,0 +1,13 @@
using Foundation;
namespace UMSdk.ios
{
    // @interface HDLUMSDK : NSObject
    [BaseType (typeof(NSObject))]
    interface HDLUMSDK
    {
        // -(void)initUMSDKWithAppKey:(NSString *)appKey channel:(NSString *)channel;
        [Export ("initUMSDKWithAppKey:channel:")]
        void InitUMSDKWithAppKey (string appKey, string channel);
    }
}
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/compiler.xml
New file
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="CompilerConfiguration">
    <bytecodeTargetLevel target="1.8" />
  </component>
</project>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/gradle.xml
New file
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="GradleMigrationSettings" migrationVersion="1" />
  <component name="GradleSettings">
    <option name="linkedExternalProjectsSettings">
      <GradleProjectSettings>
        <option name="testRunner" value="GRADLE" />
        <option name="distributionType" value="DEFAULT_WRAPPED" />
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="gradleJvm" value="#JAVA_HOME" />
        <option name="modules">
          <set>
            <option value="$PROJECT_DIR$" />
            <option value="$PROJECT_DIR$/app" />
          </set>
        </option>
        <option name="resolveModulePerSourceSet" value="false" />
      </GradleProjectSettings>
    </option>
  </component>
</project>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/jarRepositories.xml
New file
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="RemoteRepositoriesConfiguration">
    <remote-repository>
      <option name="id" value="central" />
      <option name="name" value="Maven Central repository" />
      <option name="url" value="https://repo1.maven.org/maven2" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="jboss.community" />
      <option name="name" value="JBoss Community repository" />
      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="MavenRepo" />
      <option name="name" value="MavenRepo" />
      <option name="url" value="https://repo.maven.apache.org/maven2/" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="maven9" />
      <option name="name" value="maven9" />
      <option name="url" value="https://jitpack.io" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="maven10" />
      <option name="name" value="maven10" />
      <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="maven8" />
      <option name="name" value="maven8" />
      <option name="url" value="https://maven.aliyun.com/repository/public" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="maven5" />
      <option name="name" value="maven5" />
      <option name="url" value="https://maven.aliyun.com/repository/public/" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="maven6" />
      <option name="name" value="maven6" />
      <option name="url" value="https://maven.aliyun.com/repository/google" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="maven7" />
      <option name="name" value="maven7" />
      <option name="url" value="https://maven.aliyun.com/repository/jcenter" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="maven" />
      <option name="name" value="maven" />
      <option name="url" value="https://maven.aliyun.com/repository/central" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="maven4" />
      <option name="name" value="maven4" />
      <option name="url" value="https://maven.aliyun.com/repository/gradle-plugin" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="maven11" />
      <option name="name" value="maven11" />
      <option name="url" value="https://plugins.gradle.org/m2/" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="Google" />
      <option name="name" value="Google" />
      <option name="url" value="https://dl.google.com/dl/android/maven2/" />
    </remote-repository>
  </component>
</project>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/misc.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ExternalStorageConfigurationManager" enabled="true" />
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/.idea/vcs.xml
New file
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="VcsDirectoryMappings">
    <mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
  </component>
</project>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/build.gradle
New file
@@ -0,0 +1,58 @@
plugins {
    id 'com.android.application'
}
android {
    compileSdkVersion 31
    defaultConfig {
        applicationId "com.hdl.onproumengsdk"
        minSdkVersion 23
        targetSdkVersion 31
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildFeatures {
        viewBinding true
    }
}
dependencies {
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
    implementation 'androidx.navigation:navigation-fragment:2.3.5'
    implementation 'androidx.navigation:navigation-ui:2.3.5'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation fileTree(include:['*.jar'], dir:'libs')
    // 下面各SDK根据宿主App是否使用相关业务按需引入。
    // 友盟统计SDK
    implementation  'com.umeng.umsdk:common:9.4.4'// 必选
    implementation  'com.umeng.umsdk:asms:1.4.1'// 必选
    implementation 'com.umeng.umsdk:apm:1.5.2' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
    implementation  'com.umeng.umsdk:abtest:1.0.0'//使用U-App中ABTest能力,可选
}
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/proguard-rules.pro
New file
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/AndroidManifest.xml
New file
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.hdl.onproumengsdk">
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.OnproUmengSdk">
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:label="@string/app_name"
            android:theme="@style/Theme.OnproUmengSdk.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <data android:scheme="um.61d565d9e0f9bb492bbc3d5a" />
            </intent-filter>
        </activity>
    </application>
</manifest>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/java/com/hdl/onproumengsdk/FirstFragment.java
New file
@@ -0,0 +1,47 @@
package com.hdl.onproumengsdk;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.navigation.fragment.NavHostFragment;
import com.hdl.onproumengsdk.databinding.FragmentFirstBinding;
public class FirstFragment extends Fragment {
    private FragmentFirstBinding binding;
    @Override
    public View onCreateView(
            LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState
    ) {
        binding = FragmentFirstBinding.inflate(inflater, container, false);
        return binding.getRoot();
    }
    public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        binding.buttonFirst.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                NavHostFragment.findNavController(FirstFragment.this)
                        .navigate(R.id.action_FirstFragment_to_SecondFragment);
            }
        });
    }
    @Override
    public void onDestroyView() {
        super.onDestroyView();
        binding = null;
    }
}
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/java/com/hdl/onproumengsdk/MainActivity.java
New file
@@ -0,0 +1,76 @@
package com.hdl.onproumengsdk;
import android.os.Bundle;
import com.google.android.material.snackbar.Snackbar;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;
import com.hdl.onproumengsdk.databinding.ActivityMainBinding;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends AppCompatActivity {
    private AppBarConfiguration appBarConfiguration;
    private ActivityMainBinding binding;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityMainBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        setSupportActionBar(binding.toolbar);
        NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_content_main);
        appBarConfiguration = new AppBarConfiguration.Builder(navController.getGraph()).build();
        NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
        binding.fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });
    }
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
    @Override
    public boolean onSupportNavigateUp() {
        NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_content_main);
        return NavigationUI.navigateUp(navController, appBarConfiguration)
                || super.onSupportNavigateUp();
    }
}
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/java/com/hdl/onproumengsdk/SecondFragment.java
New file
@@ -0,0 +1,47 @@
package com.hdl.onproumengsdk;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.navigation.fragment.NavHostFragment;
import com.hdl.onproumengsdk.databinding.FragmentSecondBinding;
public class SecondFragment extends Fragment {
    private FragmentSecondBinding binding;
    @Override
    public View onCreateView(
            LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState
    ) {
        binding = FragmentSecondBinding.inflate(inflater, container, false);
        return binding.getRoot();
    }
    public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        binding.buttonSecond.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                NavHostFragment.findNavController(SecondFragment.this)
                        .navigate(R.id.action_SecondFragment_to_FirstFragment);
            }
        });
    }
    @Override
    public void onDestroyView() {
        super.onDestroyView();
        binding = null;
    }
}
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
New file
@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt"
    android:width="108dp"
    android:height="108dp"
    android:viewportWidth="108"
    android:viewportHeight="108">
    <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
        <aapt:attr name="android:fillColor">
            <gradient
                android:endX="85.84757"
                android:endY="92.4963"
                android:startX="42.9492"
                android:startY="49.59793"
                android:type="linear">
                <item
                    android:color="#44000000"
                    android:offset="0.0" />
                <item
                    android:color="#00000000"
                    android:offset="1.0" />
            </gradient>
        </aapt:attr>
    </path>
    <path
        android:fillColor="#FFFFFF"
        android:fillType="nonZero"
        android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
        android:strokeWidth="1"
        android:strokeColor="#00000000" />
</vector>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/drawable/ic_launcher_background.xml
New file
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="108dp"
    android:height="108dp"
    android:viewportWidth="108"
    android:viewportHeight="108">
    <path
        android:fillColor="#3DDC84"
        android:pathData="M0,0h108v108h-108z" />
    <path
        android:fillColor="#00000000"
        android:pathData="M9,0L9,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,0L19,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M29,0L29,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M39,0L39,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M49,0L49,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M59,0L59,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M69,0L69,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M79,0L79,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M89,0L89,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M99,0L99,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,9L108,9"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,19L108,19"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,29L108,29"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,39L108,39"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,49L108,49"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,59L108,59"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,69L108,69"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,79L108,79"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,89L108,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,99L108,99"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,29L89,29"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,39L89,39"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,49L89,49"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,59L89,59"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,69L89,69"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,79L89,79"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M29,19L29,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M39,19L39,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M49,19L49,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M59,19L59,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M69,19L69,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M79,19L79,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
</vector>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/layout/activity_main.xml
New file
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">
    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/Theme.OnproUmengSdk.AppBarOverlay">
        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:popupTheme="@style/Theme.OnproUmengSdk.PopupOverlay" />
    </com.google.android.material.appbar.AppBarLayout>
    <include layout="@layout/content_main" />
    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_marginEnd="@dimen/fab_margin"
        android:layout_marginBottom="16dp"
        app:srcCompat="@android:drawable/ic_dialog_email" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/layout/content_main.xml
New file
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior">
    <fragment
        android:id="@+id/nav_host_fragment_content_main"
        android:name="androidx.navigation.fragment.NavHostFragment"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:defaultNavHost="true"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:navGraph="@navigation/nav_graph" />
</androidx.constraintlayout.widget.ConstraintLayout>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/layout/fragment_first.xml
New file
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".FirstFragment">
    <TextView
        android:id="@+id/textview_first"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_first_fragment"
        app:layout_constraintBottom_toTopOf="@id/button_first"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
    <Button
        android:id="@+id/button_first"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/next"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/textview_first" />
</androidx.constraintlayout.widget.ConstraintLayout>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/layout/fragment_second.xml
New file
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".SecondFragment">
    <TextView
        android:id="@+id/textview_second"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toTopOf="@id/button_second"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
    <Button
        android:id="@+id/button_second"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/previous"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/textview_second" />
</androidx.constraintlayout.widget.ConstraintLayout>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/menu/menu_main.xml
New file
@@ -0,0 +1,10 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context="com.hdl.onproumengsdk.MainActivity">
    <item
        android:id="@+id/action_settings"
        android:orderInCategory="100"
        android:title="@string/action_settings"
        app:showAsAction="never" />
</menu>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background" />
    <foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background" />
    <foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-hdpi/ic_launcher.webp
Binary files differ
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary files differ
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary files differ
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary files differ
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary files differ
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary files differ
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary files differ
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Binary files differ
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary files differ
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Binary files differ
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/navigation/nav_graph.xml
New file
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/nav_graph"
    app:startDestination="@id/FirstFragment">
    <fragment
        android:id="@+id/FirstFragment"
        android:name="com.hdl.onproumengsdk.FirstFragment"
        android:label="@string/first_fragment_label"
        tools:layout="@layout/fragment_first">
        <action
            android:id="@+id/action_FirstFragment_to_SecondFragment"
            app:destination="@id/SecondFragment" />
    </fragment>
    <fragment
        android:id="@+id/SecondFragment"
        android:name="com.hdl.onproumengsdk.SecondFragment"
        android:label="@string/second_fragment_label"
        tools:layout="@layout/fragment_second">
        <action
            android:id="@+id/action_SecondFragment_to_FirstFragment"
            app:destination="@id/FirstFragment" />
    </fragment>
</navigation>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values-land/dimens.xml
New file
@@ -0,0 +1,3 @@
<resources>
    <dimen name="fab_margin">48dp</dimen>
</resources>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values-night/themes.xml
New file
@@ -0,0 +1,16 @@
<resources xmlns:tools="http://schemas.android.com/tools">
    <!-- Base application theme. -->
    <style name="Theme.OnproUmengSdk" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
        <!-- Primary brand color. -->
        <item name="colorPrimary">@color/purple_200</item>
        <item name="colorPrimaryVariant">@color/purple_700</item>
        <item name="colorOnPrimary">@color/black</item>
        <!-- Secondary brand color. -->
        <item name="colorSecondary">@color/teal_200</item>
        <item name="colorSecondaryVariant">@color/teal_200</item>
        <item name="colorOnSecondary">@color/black</item>
        <!-- Status bar color. -->
        <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
        <!-- Customize your theme here. -->
    </style>
</resources>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values-w1240dp/dimens.xml
New file
@@ -0,0 +1,3 @@
<resources>
    <dimen name="fab_margin">200dp</dimen>
</resources>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values-w600dp/dimens.xml
New file
@@ -0,0 +1,3 @@
<resources>
    <dimen name="fab_margin">48dp</dimen>
</resources>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values/colors.xml
New file
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="purple_200">#FFBB86FC</color>
    <color name="purple_500">#FF6200EE</color>
    <color name="purple_700">#FF3700B3</color>
    <color name="teal_200">#FF03DAC5</color>
    <color name="teal_700">#FF018786</color>
    <color name="black">#FF000000</color>
    <color name="white">#FFFFFFFF</color>
</resources>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values/dimens.xml
New file
@@ -0,0 +1,3 @@
<resources>
    <dimen name="fab_margin">16dp</dimen>
</resources>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values/strings.xml
New file
@@ -0,0 +1,12 @@
<resources>
    <string name="app_name">OnproUmengSdk</string>
    <string name="action_settings">Settings</string>
    <!-- Strings used for fragments for navigation -->
    <string name="first_fragment_label">First Fragment</string>
    <string name="second_fragment_label">Second Fragment</string>
    <string name="next">Next</string>
    <string name="previous">Previous</string>
    <string name="hello_first_fragment">Hello first fragment</string>
    <string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string>
</resources>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/app/src/main/res/values/themes.xml
New file
@@ -0,0 +1,25 @@
<resources xmlns:tools="http://schemas.android.com/tools">
    <!-- Base application theme. -->
    <style name="Theme.OnproUmengSdk" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
        <!-- Primary brand color. -->
        <item name="colorPrimary">@color/purple_500</item>
        <item name="colorPrimaryVariant">@color/purple_700</item>
        <item name="colorOnPrimary">@color/white</item>
        <!-- Secondary brand color. -->
        <item name="colorSecondary">@color/teal_200</item>
        <item name="colorSecondaryVariant">@color/teal_700</item>
        <item name="colorOnSecondary">@color/black</item>
        <!-- Status bar color. -->
        <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
        <!-- Customize your theme here. -->
    </style>
    <style name="Theme.OnproUmengSdk.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>
    <style name="Theme.OnproUmengSdk.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
    <style name="Theme.OnproUmengSdk.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/build.gradle
New file
@@ -0,0 +1,26 @@
buildscript {
    repositories {
        google()
        mavenCentral()
        maven {
            url "https://jitpack.io"
        }
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.2.2"
    }
}
allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
        maven { url = uri("https://plugins.gradle.org/m2/") }
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/gradle.properties
New file
@@ -0,0 +1,19 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/gradle/wrapper/gradle-wrapper.jar
Binary files differ
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/gradle/wrapper/gradle-wrapper.properties
New file
@@ -0,0 +1,6 @@
#Wed Sep 22 11:14:15 GMT+08:00 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/gradlew
New file
@@ -0,0 +1,185 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
##  Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`"/$link"
    fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
    echo "$*"
}
die () {
    echo
    echo "$*"
    echo
    exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
  CYGWIN* )
    cygwin=true
    ;;
  Darwin* )
    darwin=true
    ;;
  MINGW* )
    msys=true
    ;;
  NONSTOP* )
    nonstop=true
    ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
    else
        JAVACMD="$JAVA_HOME/bin/java"
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD="java"
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
    MAX_FD_LIMIT=`ulimit -H -n`
    if [ $? -eq 0 ] ; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
            MAX_FD="$MAX_FD_LIMIT"
        fi
        ulimit -n $MAX_FD
        if [ $? -ne 0 ] ; then
            warn "Could not set maximum file descriptor limit: $MAX_FD"
        fi
    else
        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
    fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
    JAVACMD=`cygpath --unix "$JAVACMD"`
    # We build the pattern for arguments to be converted via cygpath
    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
    SEP=""
    for dir in $ROOTDIRSRAW ; do
        ROOTDIRS="$ROOTDIRS$SEP$dir"
        SEP="|"
    done
    OURCYGPATTERN="(^($ROOTDIRS))"
    # Add a user-defined pattern to the cygpath arguments
    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
    fi
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    i=0
    for arg in "$@" ; do
        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
        else
            eval `echo args$i`="\"$arg\""
        fi
        i=`expr $i + 1`
    done
    case $i in
        0) set -- ;;
        1) set -- "$args0" ;;
        2) set -- "$args0" "$args1" ;;
        3) set -- "$args0" "$args1" "$args2" ;;
        4) set -- "$args0" "$args1" "$args2" "$args3" ;;
        5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
        6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
        7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
        8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
        9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
    esac
fi
# Escape application args
save () {
    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
    echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/gradlew.bat
New file
@@ -0,0 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem      https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
ThirdPartyIntegration/OnproUmengSdk/OnproUmengSdk/settings.gradle
New file
@@ -0,0 +1,5 @@
rootProject.name = "OnproUmengSdk"
include ':app'
ThirdPartyIntegration/OnproUmengSdk/__MACOSX/OnproUmengSdk/._.DS_Store
Binary files differ
ThirdPartyIntegration/OnproUmengSdk/__MACOSX/OnproUmengSdk/app/._.DS_Store
Binary files differ
ThirdPartyIntegration/OnproUmengSdk/__MACOSX/OnproUmengSdk/umengSdk/._.DS_Store
Binary files differ