HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-08-11 26d1cdf2f5246c1ad7890e6740444c4a6a80e6fb
合并了新代码
65个文件已添加
28个文件已删除
50个文件已修改
22610 ■■■■ 已修改文件
ZigbeeApp/GateWay.Droid/Application.cs 164 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Language.ini 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Phone/BindPic/CorrectTemperatureBackGround.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Phone/BindPic/TemperaTureAdd.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Phone/BindPic/TemperaTureAttention.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Phone/BindPic/TemperaTureReduction.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/FengLinVideo/Forms/MonitorFragment.cs 198 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/FengLinVideo/Forms/ReverseCallFragment.cs 300 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/FengLinVideo/Interface/VideoState.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/FengLinVideo/widget/TipDiaglog.cs 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs 16541 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/color/text_color.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/Icon.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/back.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/call.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/dialog_background.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/floor.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/hangup.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/screenshot.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/screenshot_def.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/screenshot_sel.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/sure_background_def.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/sure_background_sel.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/tip_background.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/unlock.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/unlock_def.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/unlock_disable.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/unlock_sel.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/drawable/video_background.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/layout/activity_video_phone.xml 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/layout/dialog_tip.xml 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/layout/fragment_call.axml 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/layout/fragment_monitor.xml 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/values/Color.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/values/Styles.xml 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/VideoActivity.cs 372 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/AppDelegate.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024*1024-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024*1024.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024_1024-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024_1024-2.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120*120-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120*120-2.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120*120.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120-2.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120-3.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120-4.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/152*152.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/152_152-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/167*167.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/167_167-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180*180-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180*180.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180_180-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180_180-2.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/20*20.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/20_20-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/29*29.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/29_29-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40*40-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40*40-2.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40*40.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40-2-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40-3.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40-4.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58*58-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58*58-2.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58*58.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58-2.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58-3.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58-4.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/60*60.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/60_60-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/76*76.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/76_76-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80*80-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80*80-2.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80*80.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80-2.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80-3.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80-4.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87*87-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87*87.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87_87-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87_87-2.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/Contents.json 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Home.IOS.csproj 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Language.ini 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Phone/BindPic/CorrectTemperatureBackGround.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Phone/BindPic/TemperaTureAdd.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Phone/BindPic/TemperaTureAttention.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Phone/BindPic/TemperaTureReduction.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/SendDataToServer.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/DLL/Android/testLibs.dll 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DevicePmSensorRowControl.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DevicePmSensorCardControl.cs 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceBindLogic.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/PaneTargetsBaseForm.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueEnvironmentDirectionForm.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/DataCorrectionForm.cs 347 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueEnvironmentButtonSettionForm.cs 210 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueEnvironmentLightSettionForm.cs 398 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs 783 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs 544 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSettionWithSourceForm.cs 854 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionAddTargetsForm.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionTargetsForm.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Residence/TransferOfResidenceMainForm.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserView/HomePage.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/VideoPhone/ESVideo.cs 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/ZigBee/Common/Application.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/ZigBee/Device/PMSensor.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs 170 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/R.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Shared.projitems 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Application.cs
@@ -26,13 +26,13 @@
    {
        public void OnReq(BaseReq p0)
        {
        }
        protected override void OnNewIntent(Intent intent)
        {
            base.OnNewIntent(intent);
            Intent = intent;
            com.hdl.home.Application.api.HandleIntent(intent, this);
            com.hdl.home.Application.api?.HandleIntent(intent, this);
            //Finish();
        }
        public static Action<string> RespAction;
@@ -73,32 +73,59 @@
            // 将应用的appId注册到微信
            //api.RegisterApp("wx2ec8f53f6fa36e82");
          com.hdl.home.Application.api.HandleIntent(Intent, this);
          com.hdl.home.Application.api?.HandleIntent(Intent, this);
        }
    }
    /// <summary>
    /// 设定为默认启动的Application
    /// </summary>
    [Android.App.Application]
    public class Application : Android.App.Application
    {
        public Application(IntPtr handle, Android.Runtime.JniHandleOwnership ownerShip) : base(handle, ownerShip) { }

        public override void OnCreate()
        {
            //安卓配网初始
            //var result = Com.Mediatek.Elian.ElianNative.LoadLib();
            //if (!result)
            //{
            //    System.Console.WriteLine("Error,can't load elianjni lib");
            //}
            initAll();
            base.OnCreate();
    /// <summary>
    /// 设定为默认启动的Application
    /// </summary>
    [Android.App.Application()]
    public class Application : Android.App.Application
    {
        public Application(IntPtr handle, Android.Runtime.JniHandleOwnership ownerShip) : base(handle, ownerShip) { }

        public override void OnCreate()
        {
            //如果不是App的主进程,则不需要处理
            if (this.IsCurrentAppProcess == false)
            {
                base.OnCreate();
                return;
            }
            try
            {
                //这个东西好像可能会出异常
                this.initAll();
            }
            catch (Exception ex)
            {
                //调试:记录系统异常
                Shared.Phone.UserCenter.HdlLogLogic.Current.WriteOtherText(Shared.Phone.UserCenter.DirNameResourse.SystemLogFile, ex.Message + "\r\n" + ex.StackTrace, true, false);
            }
            base.OnCreate();
            // 通过WXAPIFactory工厂,获取IWXAPI的实例
            api = WXAPIFactory.CreateWXAPI(this, "wx2ec8f53f6fa36e82", true);
            //api = WXAPIFactory.CreateWXAPI(this, "wx2ec8f53f6fa36e82", true);
            // 将应用的appId注册到微信
            api.RegisterApp("wx2ec8f53f6fa36e82");
            api?.RegisterApp("wx2ec8f53f6fa36e82");
        }
        /// <summary>
        /// 判断当前进程是不是App自己的主进程
        /// </summary>
        private bool IsCurrentAppProcess
        {
            get
            {
                var activityManager = (ActivityManager)GetSystemService(ActivityService);
                var listProcess = activityManager.RunningAppProcesses;
                foreach (var process in listProcess)
                {
                    if (process.ProcessName == "com.evoyo.home" && process.Pid == Android.OS.Process.MyPid())
                    {
                        return true;
                    }
                }
                return false;
            }
        }
       internal static IWXAPI api;
        public static void WXLogin() {
            var req = new SendAuth.Req { Scope = "snsapi_userinfo", State = "ZigbeeApp" };
            api.SendReq(req);
            api?.SendReq(req);
        }
        /// <summary>
        /// 所有初始化全部在这个方法实现
        /// </summary>
        void initAll()
        {
            Shared.Application.IsGpsEnable = false;
        /// <summary>
        /// 所有初始化全部在这个方法实现
        /// </summary>
        void initAll()
        {
            Shared.Application.IsGpsEnable = System.IO.File.Exists(Shared.Phone.UserCenter.DirNameResourse.OpenGbsFile);
            //设置极光调试模式,为false时只打印警告信息
            // System.Console.WriteLine($"AAA : {System.DateTime.Now.ToString()}");
@@ -159,11 +186,17 @@
                Shared.Application.FontSize = 12;
                AppCenter.Start("4802834a-e7e9-4dd8-93f1-c2f88f0bd464", typeof(Analytics), typeof(Crashes));
#if Release
                //保存获取的极光服务器上的注册ID到本地文件
                var registrationId = JPushInterface.GetRegistrationID(activity);
                System.Console.WriteLine("registrationId-极光id=" + registrationId);
                if (!string.IsNullOrEmpty(registrationId))
                {
                    Shared.Common.Config.Instance.RegistrationID = registrationId;
                    Shared.Common.Config.Instance.Save();
                }
                //调试:记录极光ID
                Shared.Phone.UserCenter.HdlLogLogic.Current.WriteOtherText(Shared.Phone.UserCenter.DirNameResourse.JiguangFile, "receive1:" + registrationId, true, true);
#endif
            };

           
            BaseActivity.RefreshUIAction += (activity) => {
                Shared.Language.CurrentLanguage = "Chinese";
                Shared.Common.CommonPage.Instance.Show();
             };

            BaseActivity.NetworkStateChanged += (v) =>
            {
            };
            BaseActivity.OnDestroyAction += (activity) => {
            //socket停止连接
            //ZigBee.Device.ZbGateway.FindGateWaySocket.Stop();
            };

            HDLUtils.SetAuthoritiesName("com.hdl.home.fileProvider");
         }

        public static bool IsShowTip = true;
        JpushNotificationReceiver myReceiver = new JpushNotificationReceiver { };

        /// <summary>
        /// 项目启动时网络查询
        /// </summary>
        void checkSomeInfo()
        {
            var status = isNetworkAvailable(this);
            string internetStatus = "Available";
            if (!status)
            {
                internetStatus = "UnaVailable";
            }
            else
            {
                var isWifi = isWifiConnected(this);
                if (isWifi)
                {
                    internetStatus = "WiFiConnect";
                }
                else
                {
                    internetStatus = "MobileConnect";
                }
            }

            int connectState = 0;
            if (internetStatus == "UnaVailable")
            {
                connectState = 0;
            }
            else if (internetStatus == "WiFiConnect")
            {
                connectState = 2;
            }
            else
            {
                connectState = 1;
            }
            //ZigBee.Device.ZbGateway.CheckConnection(connectState);
         }

        /// <summary>
        /// 网络是否可用
        /// </summary>
        /// <returns><c>true</c>, if network available was ised, <c>false</c> otherwise.</returns>
        /// <param name="context">Context.</param>
        bool isNetworkAvailable(Context context)
        {
            var cm = (ConnectivityManager)context.GetSystemService(ConnectivityService);

            if (cm == null || cm.ActiveNetworkInfo == null)
            {
                //当前网络不可用
                return false;
            }
            else
            {
                return cm.ActiveNetworkInfo.IsAvailable;
            }
        }

        /// <summary>
        /// 网络是否连接
        /// </summary>
        /// <returns><c>true</c>, if wifi connected was ised, <c>false</c> otherwise.</returns>
        /// <param name="context">Context.</param>
        bool isWifiConnected(Context context)
        {
            if (context != null)
            {
                var cm = (ConnectivityManager)context.GetSystemService(ConnectivityService);

                var mWiFiNetworkInfo = cm.GetNetworkInfo(ConnectivityType.Wifi);
                if (Android.Net.NetworkInfo.State.Connected == mWiFiNetworkInfo.GetState())
                {
                    //当前网络是Wi-Fi连接
                    return true;
                }

                var moWiFiNetworkInfo = cm.GetNetworkInfo(ConnectivityType.Mobile);
                if (Android.Net.NetworkInfo.State.Connected == moWiFiNetworkInfo.GetState())
                {
                    //当前网络是Mobile连接
                    return false;
                }
            }
            return false;
        }
                if (!string.IsNullOrEmpty(registrationId))
                {
                    Shared.Common.Config.Instance.RegistrationID = registrationId;
                    Shared.Common.Config.Instance.Save();
                }
                //调试:记录极光ID
                Shared.Phone.UserCenter.HdlLogLogic.Current.WriteOtherText(Shared.Phone.UserCenter.DirNameResourse.JiguangFile, "receive1:" + registrationId, true, true);
#endif
            };

           
            BaseActivity.RefreshUIAction += (activity) => {
                Shared.Language.CurrentLanguage = "Chinese";
                Shared.Common.CommonPage.Instance.Show();
             };

            BaseActivity.NetworkStateChanged += (v) =>
            {
            };
            BaseActivity.OnDestroyAction += (activity) => {
            //socket停止连接
            //ZigBee.Device.ZbGateway.FindGateWaySocket.Stop();
            };

            HDLUtils.SetAuthoritiesName("com.evoyo.home.fileProvider");
         }

        public static bool IsShowTip = true;
        JpushNotificationReceiver myReceiver = new JpushNotificationReceiver { };

        /// <summary>
        /// 项目启动时网络查询
        /// </summary>
        void checkSomeInfo()
        {
            var status = isNetworkAvailable(this);
            string internetStatus = "Available";
            if (!status)
            {
                internetStatus = "UnaVailable";
            }
            else
            {
                var isWifi = isWifiConnected(this);
                if (isWifi)
                {
                    internetStatus = "WiFiConnect";
                }
                else
                {
                    internetStatus = "MobileConnect";
                }
            }

            int connectState = 0;
            if (internetStatus == "UnaVailable")
            {
                connectState = 0;
            }
            else if (internetStatus == "WiFiConnect")
            {
                connectState = 2;
            }
            else
            {
                connectState = 1;
            }
            //ZigBee.Device.ZbGateway.CheckConnection(connectState);
         }

        /// <summary>
        /// 网络是否可用
        /// </summary>
        /// <returns><c>true</c>, if network available was ised, <c>false</c> otherwise.</returns>
        /// <param name="context">Context.</param>
        bool isNetworkAvailable(Context context)
        {
            var cm = (ConnectivityManager)context.GetSystemService(ConnectivityService);

            if (cm == null || cm.ActiveNetworkInfo == null)
            {
                //当前网络不可用
                return false;
            }
            else
            {
                return cm.ActiveNetworkInfo.IsAvailable;
            }
        }

        /// <summary>
        /// 网络是否连接
        /// </summary>
        /// <returns><c>true</c>, if wifi connected was ised, <c>false</c> otherwise.</returns>
        /// <param name="context">Context.</param>
        bool isWifiConnected(Context context)
        {
            if (context != null)
            {
                var cm = (ConnectivityManager)context.GetSystemService(ConnectivityService);

                var mWiFiNetworkInfo = cm.GetNetworkInfo(ConnectivityType.Wifi);
                if (Android.Net.NetworkInfo.State.Connected == mWiFiNetworkInfo.GetState())
                {
                    //当前网络是Wi-Fi连接
                    return true;
                }

                var moWiFiNetworkInfo = cm.GetNetworkInfo(ConnectivityType.Mobile);
                if (Android.Net.NetworkInfo.State.Connected == moWiFiNetworkInfo.GetState())
                {
                    //当前网络是Mobile连接
                    return false;
                }
            }
            return false;
        }
       
    }
    }
    [BroadcastReceiver(Name = "com.evoyo.home.JpushNotificationReceiver", Exported = false, Enabled = true)]
    [IntentFilter(new string[] { "cn.jpush.android.intent.REGISTRATION",
               "cn.jpush.android.intent.MESSAGE_RECEIVED",
                "cn.jpush.android.intent.NOTIFICATION_RECEIVED",
                "cn.jpush.android.intent.NOTIFICATION_OPENED",
                "cn.jpush.android.intent.CONNECTION"  }, Categories = new string[] { "com.evoyo.home" })]
    public class JpushNotificationReceiver : BroadcastReceiver
    {
        private static string TAG = "JpushNotificationReceiver";
@@ -215,8 +248,8 @@
                //接收到推送下来的自定义消息
                else if (JPushInterface.ActionMessageReceived == intent.Action)
                {
                    bundle.GetString(JPushInterface.ExtraMessage);
                 }
                    bundle.GetString(JPushInterface.ExtraMessage);
                }
                else
                {
                }
@@ -251,36 +284,83 @@
        /// <param name="bundle">Bundle.</param>
        private void OpenNotification(Context context, Bundle bundle)
        {
            Intent i = new Intent(context, typeof(BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
            i.PutExtras(bundle);
            i.SetFlags(ActivityFlags.NewTask);
            context.StartActivity(i);
            String extras = bundle.GetString(JPushInterface.ExtraExtra);
            String myValue = "";
            //String myValue = "";
            try
            {
                JSONObject extrasJson = new JSONObject(extras);
                myValue = extrasJson.OptString("myKey");
                VideoMethod(extras);
                //JSONObject extrasJson = new JSONObject(extras);
                //myValue = extrasJson.OptString("myKey");
            }
            catch (Exception e)
            {
                System.Console.WriteLine(TAG, "Unexpected: extras is not a valid json", e);
                return;
            }
            //if (TYPE_THIS.equals(myValue))
            //{
            //Intent mIntent = new Intent(context, ThisActivity.class);
            //mIntent.putExtras(bundle);
            //mIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            //context.startActivity(mIntent);
            //}
            //else if (TYPE_ANOTHER.equals(myValue))
            //{
            //Intent mIntent = new Intent(context, AnotherActivity.class);
            //mIntent.putExtras(bundle);
            //mIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            //context.startActivity(mIntent);
            //}
        }
        /// <summary>
        /// android通知栏点击打开可视对讲的方法
        /// </summary>
        /// <param name="hiddenJson">云端推过来的数据</param>
        private void VideoMethod(string hiddenJson)
        {
            var hiddanJson = Newtonsoft.Json.Linq.JObject.Parse(hiddenJson);
            if (hiddanJson == null)
            {
                return;
            }
            Intent i = new Intent(context, typeof(BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
            i.PutExtras(bundle);
            i.SetFlags(ActivityFlags.NewTask);
            context.StartActivity(i);
            //if (TYPE_THIS.equals(myValue))
            //{
            //Intent mIntent = new Intent(context, ThisActivity.class);
            //mIntent.putExtras(bundle);
            //mIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            //context.startActivity(mIntent);
            //}
            //else if (TYPE_ANOTHER.equals(myValue))
            //{
            //Intent mIntent = new Intent(context, AnotherActivity.class);
            //mIntent.putExtras(bundle);
            //mIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            //context.startActivity(mIntent);
            //}
            var json = Newtonsoft.Json.Linq.JObject.Parse(hiddanJson["HiddanJson"].ToString());
            if (json == null)
            {
                return;
            }
            Shared.Phone.VideoPhone.ESVideoInfo eSVideoInfo = new Shared.Phone.VideoPhone.ESVideoInfo();
            if (json["uuid"].ToString().Contains(","))
            {
                var uuid = json["uuid"].ToString().Split(',');
                eSVideoInfo.ESVideoUUID = uuid[0];
            }
            else
            {
                eSVideoInfo.ESVideoUUID = json["uuid"].ToString();
            }
            eSVideoInfo.DeviceName = Language.StringByID(Shared.R.MyInternationalizationString.theOutdoorUnit);
            eSVideoInfo.ESRoomID = int.Parse(json["roomno"].ToString());
            if (!string.IsNullOrEmpty(json["unitno"].ToString()))
            {
                string str = json["unitno"].ToString();
                string str1 = str.Substring(0, 2).TrimStart('0');
                string str2 = str.Substring(2, 2).TrimStart('0');
                eSVideoInfo.RoomName = str1 + Language.StringByID(Shared.R.MyInternationalizationString.dong) + str2 + Language.StringByID(Shared.R.MyInternationalizationString.unit);
            }
            Shared.Phone.VideoPhone.ESVideo.ShowESvideoVideoIntercom(eSVideoInfo);
        }
    }
}
ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -339,6 +339,10 @@
335=警告!数据出错,必须刷新列表,否则控制现象错乱
336=同步
337=同步失败
338=数据校正
339=矫正温度失败
340=矫正面板内置的温度或湿度传感器读数
341=请输入正确的数值
5097=取消
5098=确定
@@ -1880,10 +1884,12 @@
16141=紧急按钮
16142=门窗传感器
16143=钥匙扣
16144=色值号为6位(由任意数字+字母组合)
16144=色值号为6位(由纯数字/数字+字母组合)
16145=长按此按键
16146=Mini网关最大只能添加16个设备
16147=开关键
16148=过户
16149=住宅过户
;★★★★下面这些是接口的返回信息翻译,从18000开始★★★★
18004=指定网关已经被绑定
@@ -1965,7 +1971,7 @@
;方悦8按键轻触式面板入网操作指示
21020=长按BUTTON1按键5秒,所有指示灯{0}变为绿色并闪烁,进入配网状态
;方悦环境面板入网操作指示
21021=按住面板功能(function)按键,所有按键{0}指示灯亮起,则配网成功
21021=按住面板功能按键5秒,绿色指示灯闪烁{0}进入配网状态;闪烁停止{0}指示灯变白色表示配网成功
;窗帘面板的入网操作指示
21022=长按面板左上角按键,所有按键{0}指示灯亮起,则配网成功
;吸顶燃气传感器的入网操作指示
ZigbeeApp/GateWay.Droid/Assets/Phone/BindPic/CorrectTemperatureBackGround.png
ZigbeeApp/GateWay.Droid/Assets/Phone/BindPic/TemperaTureAdd.png
ZigbeeApp/GateWay.Droid/Assets/Phone/BindPic/TemperaTureAttention.png
ZigbeeApp/GateWay.Droid/Assets/Phone/BindPic/TemperaTureReduction.png
ZigbeeApp/GateWay.Droid/FengLinVideo/Forms/MonitorFragment.cs
New file
@@ -0,0 +1,198 @@

using System;
using Android.App;
using Android.OS;
using Android.Content.Res;
using Android.Graphics;
using Android.Views;
using Android.Widget;
using Com.ETouchSky;
using Org.Json;
using Com.Tool;
using GateWay.Droid.FengLinVideo.Interface;
using Java.Util;
using GateWay.Droid.FengLinVideo.widget;
using Java.Text;
namespace GateWay.Droid.FengLinVideo.Forms
{
    public class MonitorFragment : Fragment, View.IOnClickListener, View.IOnTouchListener,VideoState
    {
        private View mView;
        private VideoPhone mPhone;
        private RelativeLayout rlScreenshot;
        private ImageView imgScreenshot;
        private TextView tvScreenshot;
        private RelativeLayout rlUnlock;
        private ImageView imgUnlock;
        private TextView tvUnlock;
        public MonitorFragment(VideoPhone phone)
        {
            mPhone = phone;
        }
        public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            mView = inflater.Inflate(Resource.Layout.fragment_monitor, container, false);
            iniView();
            return mView;
        }
        private void iniView()
        {
            //
            rlScreenshot = (RelativeLayout)mView.FindViewById(Resource.Id.rl_sceenshot);
            imgScreenshot = (ImageView)mView.FindViewById(Resource.Id.icon_screenshot);
            tvScreenshot = (TextView)mView.FindViewById(Resource.Id.tv_screenshot);
            rlUnlock = (RelativeLayout)mView.FindViewById(Resource.Id.rl_unlock);
            imgUnlock = (ImageView)mView.FindViewById(Resource.Id.icon_unlock);
            tvUnlock = (TextView)mView.FindViewById(Resource.Id.tv_unlock);
            rlScreenshot.SetOnClickListener(this);
            rlUnlock.SetOnClickListener(this);
            rlScreenshot.SetOnTouchListener(this);
            rlUnlock.SetOnTouchListener(this);
        }
        //开锁
        private void unlock()
        {
            //开锁,当收到来电信息时可进行开锁操作
            if (mPhone != null)
            {
                try
                {
                    JSONObject ht = new JSONObject();
                    ht.Put("command", "open");//固定参数
                    ht.Put("room_id", 123); //动态参数 ,传递开门的房间号。这个开门口记录就能记录谁开的门
                    ht.Put("devType", 7); //固定参数
                    mPhone.SendCustomData(ht.ToString());
                }
                catch (Exception e)
                {
                    string erro = e.Message;
                }
            }
        }
        //更新开锁按钮状态
        private void updataUnlockState()
        {
            //开锁成功,15秒内不给再点击按钮
            rlUnlock.Enabled = false;
            imgUnlock.SetImageResource(Resource.Drawable.unlock_disable);
            tvUnlock.SetTextColor(new Color(Activity.GetColor(Resource.Color.color_disable)));
            new System.Threading.Thread(() =>
            {
                System.Threading.Thread.Sleep(15 * 1000);
                Activity.RunOnUiThread(() =>
                {
                    rlUnlock.Enabled = true;
                    imgUnlock.SetImageResource(Resource.Drawable.unlock);
                    tvUnlock.SetTextColor(new Color(Activity.GetColor(Resource.Color.text_color)));
                });
            }).Start();
        }
        public void OnClick(View v)
        {
            //
            if (v.Equals(rlUnlock))
            {
                unlock();
            }
            else if (v.Equals(rlScreenshot))
            {
                //有视频过来可调用此接口进行拍照
                if (mPhone != null)
                {
                    //有视频过来可调用此接口进行拍照
                    if (mPhone != null)
                    {
                        SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
                        string time = format.Format(new Date(SystemClock.CurrentThreadTimeMillis()));
                        string ss = Android.OS.Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryPictures).AbsolutePath;
                        string path = ss + "/" + time +".jpg";
                        mPhone.Snap(path);
                    }
                }
            }
        }
        public bool OnTouch(View v, MotionEvent e)
        {
            if (e.Action == MotionEventActions.Down)
            {
                if (v.Equals(rlScreenshot))
                {
                    imgScreenshot.Selected = true;
                    tvScreenshot.Selected = true;
                }
                else if (v.Equals(rlUnlock))
                {
                    imgUnlock.Selected = true;
                    tvUnlock.Selected = true;
                }
            }
            else if (e.Action == MotionEventActions.Up)
            {
                if (v.Equals(rlScreenshot))
                {
                    imgScreenshot.Selected = false;
                    tvScreenshot.Selected = false;
                }
                else if (v.Equals(rlUnlock))
                {
                    imgUnlock.Selected = false;
                    tvUnlock.Selected = false;
                }
            }
            else
            {
                //
            }
            return false;
        }
        public void onPhoneEvent(string msg)
        {
            try
            {
                //
                TextProtocol tp = new TextProtocol();
                tp.Parse(msg);
                string event1 = tp.GetString("event");
                switch (event1)
                {
                    case "EVT_HangUp":
                        break;
                    case "EVT_RECV_CUSTOM_DATA":
                        updataUnlockState();
                        break;
                    case "EVT_SnapAck":
                        break;
                }
            }
            catch (Exception e)
            {
                string error = e.Message;
            }
        }
    }
}
ZigbeeApp/GateWay.Droid/FengLinVideo/Forms/ReverseCallFragment.cs
New file
@@ -0,0 +1,300 @@

using System;
using System.Threading;
using Android.App;
using Android.OS;
using Android.Views;
using Android.Widget;
using Com.ETouchSky;
using Com.Tool;
using GateWay.Droid.FengLinVideo.Interface;
using Java.Text;
using Org.Json;
using Java.Util;
namespace GateWay.Droid.FengLinVideo.Forms
{
    public class ReverseCallFragment : Fragment, View.IOnClickListener, View.IOnTouchListener, VideoState
    {
        private VideoPhone mPhone;
        private string param = "";
        private View mView;
        private ImageView imgScreenshot;
        private ImageView imgUnlock;
        //private ImageView imgHangup;
        //private ImageView imgCall;
        private RelativeLayout rlHangup;
        private RelativeLayout rlCall;
        private TextView tvHangup;
        private TextView tvCall;
        private TextView tvTip;
        private System.Threading.Timer timer = null;
        private int Time = 0;
        public ReverseCallFragment(VideoPhone _phone, string _param)
        {
            this.mPhone = _phone;
            this.param = _param;
        }
        public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            mView = inflater.Inflate(Resource.Layout.fragment_call, container, false);
            IniView();
            return mView;
        }
        private void IniView()
        {
            imgScreenshot = (ImageView)mView.FindViewById(Resource.Id.icon_screenshot);//
            imgUnlock = (ImageView)mView.FindViewById(Resource.Id.icon_unlock);//
            tvTip = (TextView)mView.FindViewById(Resource.Id.tv_tip);
            rlHangup = (RelativeLayout)mView.FindViewById(Resource.Id.rl_hangup);
            //imgHangup = (ImageView)mView.FindViewById(Resource.Id.img_hangup);
            tvHangup = (TextView)mView.FindViewById(Resource.Id.tv_hangup);
            rlCall = (RelativeLayout)mView.FindViewById(Resource.Id.rl_call);
            //imgCall = (ImageView)mView.FindViewById(Resource.Id.img_call);
            tvCall = (TextView)mView.FindViewById(Resource.Id.tv_call);
            imgScreenshot.SetOnClickListener(this);
            imgUnlock.SetOnClickListener(this);
            rlCall.SetOnClickListener(this);
            rlHangup.SetOnClickListener(this);
            imgUnlock.SetOnTouchListener(this);
            imgScreenshot.SetOnTouchListener(this);
            tvTip.SetText("来电中...", null);
        }
        private void ReverseCall(string param)
        {
            //
            //一般是推送过的来电信息时调用此接口打开视频窗口。然后可调用mPhone.acceptRing(param);接收来电信息
            if (mPhone != null)
            {
                mPhone.ReverseCall(param);
            }
        }
        //开锁
        private void Unlock()
        {
            //开锁,当收到来电信息时可进行开锁操作
            if (mPhone != null)
            {
                try
                {
                    JSONObject ht = new JSONObject();
                    ht.Put("command", "open");//固定参数
                    ht.Put("room_id", 123); //动态参数 ,传递开门的房间号。这个开门口记录就能记录谁开的门
                    ht.Put("devType", 7); //固定参数
                    mPhone.SendCustomData(ht.ToString());
                }
                catch (Exception e)
                {
                    string erro = e.Message;
                }
            }
        }
        //更新开锁按钮状态
        private void UpdataUnlockState()
        {
            //开锁成功,15秒内不给再点击按钮
            imgUnlock.Enabled = false;
            imgUnlock.SetImageResource(Resource.Drawable.unlock_disable);
            new System.Threading.Thread(() =>
            {
                System.Threading.Thread.Sleep(15 * 1000);
                Activity.RunOnUiThread(() =>
                {
                    imgUnlock.Enabled = true;
                    imgUnlock.SetImageResource(Resource.Drawable.unlock);
                });
            }).Start();
        }
        private string getTime(int time)
        {
            int m = time / 60;
            int s = time % 60;
            return unitFormat(m) + ":" + unitFormat(s);
        }
        private static string unitFormat(int i)
        {
            string retStr = null;
            if (i >= 0 && i < 10)
                retStr = "0" + i;
            else
                retStr = "" + i;
            return retStr;
        }
        //
        private void TimeStarts()
        {
            try
            {
                if (timer != null)
                    timer.Dispose();
                TimerCallback timerCallback = new TimerCallback(Tick);
                timer = new System.Threading.Timer(timerCallback,null,0,1000);
            }
            catch (Exception) { }
        }
        private void TimeEnd()
        {
            Time = 0;
            if (timer != null)
            {
                timer.Dispose();
                timer = null;
            }
        }
        public void Tick(Object state)
        {
            Activity.RunOnUiThread(() =>
            {
                Time++;
                tvTip.SetText(getTime(Time), null);
            });
        }
        public void onPhoneEvent(string msg)
        {
            try
            {
                //
                TextProtocol tp = new TextProtocol();
                tp.Parse(msg);
                string event1 = tp.GetString("event");
                switch (event1)
                {
                    case "EVT_RECV_CUSTOM_DATA":
                        UpdataUnlockState();
                        break;
                    case "EVT_SnapAck":
                        break;
                    case "EVT_StartStream":
                        TimeStarts();
                        break;
                }
            }
            catch (Exception e)
            {
                string error = e.Message;
            }
        }
        public bool OnTouch(View v, MotionEvent e)
        {
            if (e.Action == MotionEventActions.Down)
            {
                if (v.Equals(rlCall))
                {
                    tvCall.Selected = true;
                }
                else if (v.Equals(rlHangup))
                {
                    tvHangup.Selected = true;
                }
                else if (v.Equals(imgUnlock))
                {
                    imgUnlock.Selected = true;
                }
                else if(v.Equals(imgScreenshot))
                {
                    imgScreenshot.Selected = true;
                }
            }
            else if (e.Action == MotionEventActions.Up)
            {
                if (v.Equals(rlCall))
                {
                    tvCall.Selected = false;
                }
                else if (v.Equals(rlHangup))
                {
                    tvHangup.Selected = false;
                }
                else if (v.Equals(imgUnlock))
                {
                    imgUnlock.Selected = false;
                }
                else if (v.Equals(imgScreenshot))
                {
                    imgScreenshot.Selected = false;
                }
            }
            return false;
        }
        public void OnClick(View v)
        {
            if (v.Equals(rlCall))
            {
                //TimeStarts();
                ReverseCall(param);
                rlCall.Visibility = ViewStates.Gone;
            }
            else if (v.Equals(rlHangup))
            {
                if (mPhone != null)
                {
                    mPhone.HangUp();
                    TimeEnd();
                }
                Activity.Finish();
            }
            else if (v.Equals(imgScreenshot))
            {
                //有视频过来可调用此接口进行拍照
                if (mPhone != null)
                {
                    //有视频过来可调用此接口进行拍照
                    if (mPhone != null)
                    {
                        SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
                        string time = format.Format(new Date(SystemClock.CurrentThreadTimeMillis()));
                        string ss = Android.OS.Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryPictures).AbsolutePath;
                        string path = ss + "/" + time + ".jpg";
                        mPhone.Snap(path);
                    }
                }
            }
            else if (v.Equals(imgUnlock))
            {
                Unlock();
            }
        }
    }
}
ZigbeeApp/GateWay.Droid/FengLinVideo/Interface/VideoState.cs
New file
@@ -0,0 +1,8 @@
using System;
namespace GateWay.Droid.FengLinVideo.Interface
{
    public interface VideoState
    {
        void onPhoneEvent(string msg);
    }
}
ZigbeeApp/GateWay.Droid/FengLinVideo/widget/TipDiaglog.cs
New file
@@ -0,0 +1,136 @@
using System;
using Android.App;
using Android.Content;
using Android.Graphics;
using Android.Views;
using Android.Widget;
namespace GateWay.Droid.FengLinVideo.widget
{
    public class TipDiaglog : Dialog,View.IOnClickListener,View.IOnTouchListener
    {
        private Context mContext = null;
        private string titleText = "提示";
        private string contentText = "";
        private string confirmText = "确认";
        private TextView contentView = null;
        private TextView titleView = null;
        private TextView okView = null;
        private OnConfirmClickListener onConfirmClickListener;
        public TipDiaglog(Context context) : base(context, Resource.Style.DialogTheme)
        {
            this.mContext = context;
        }
        public void SetTitleText(string _titleText)
        {
            titleText = _titleText;
            if (titleView != null)
            {
                titleView.SetText(titleText, null);
            }
        }
        public void SetContentText(string _contentText)
        {
            contentText = _contentText;
            if (contentView != null)
            {
                contentView.SetText(contentText, null);
            }
        }
        public void SetConfirmText(string text)
        {
            confirmText = text;
            if (okView != null)
            {
                okView.SetText(confirmText, null);
            }
        }
        public override void Create()
        {
            base.Create();
            try
            {
                SetContentView(Resource.Layout.dialog_tip);
                contentView = (TextView)FindViewById(Resource.Id.tv_content);
                titleView = (TextView)FindViewById(Resource.Id.tv_title);
                okView = (TextView)FindViewById(Resource.Id.tv_ok);
                contentView.SetText(contentText, null);
                titleView.SetText(titleText, null);
                okView.SetText(confirmText, null);
                okView.SetOnTouchListener(this);
                okView.SetOnClickListener(this);
            }
            catch (Exception e)
            {
                string error = e.Message;
            }
        }
        public override void OnWindowFocusChanged(bool hasFocus)
        {
            base.OnWindowFocusChanged(hasFocus);
            try
            {
                Display display = ((Activity)mContext).WindowManager.DefaultDisplay;
                WindowManagerLayoutParams p = Window.Attributes;
                Point point = new Point();
                display.GetSize(point);
                p.Width = (int)(point.X * 0.7);
                Window.SetGravity(GravityFlags.Center);
            }
            catch (Exception e)
            {
                string ss = e.Message;
            }
        }
        public void SetConfirmClickListener(OnConfirmClickListener l)
        {
            onConfirmClickListener = l;
        }
        public void OnClick(View v)
        {
            if (v.Equals(okView))
            {
                if (onConfirmClickListener != null)
                    onConfirmClickListener.onSureClick(this, v);
            }
        }
        public bool OnTouch(View v, MotionEvent e)
        {
            if (e.Action == MotionEventActions.Down)
            {
                v.SetBackgroundResource(Resource.Drawable.sure_background_sel);
            }
            else if (e.Action == MotionEventActions.Up)
            {
                v.SetBackgroundResource(Resource.Drawable.sure_background_def);
            }
            return false;
        }
        public interface OnConfirmClickListener
        {
            void onSureClick(TipDiaglog dialoog, View v);
        }
    }
}
ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
old mode 100755 new mode 100644
@@ -40,10 +40,6 @@
    <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
    <AndroidSupportedAbis />
    <AndroidDexTool>d8</AndroidDexTool>
    <AotAssemblies>false</AotAssemblies>
    <EnableLLVM>false</EnableLLVM>
    <AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
    <BundleAssemblies>false</BundleAssemblies>
    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -58,10 +54,6 @@
    <MandroidI18n>cjk</MandroidI18n>
    <DefineConstants>Android,Release</DefineConstants>
    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
    <AotAssemblies>false</AotAssemblies>
    <EnableLLVM>false</EnableLLVM>
    <AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
    <BundleAssemblies>false</BundleAssemblies>
    <AndroidDexTool>d8</AndroidDexTool>
    <AndroidUseAapt2>false</AndroidUseAapt2>
  </PropertyGroup>
@@ -144,6 +136,9 @@
    <Reference Include="Microsoft.AppCenter.Analytics">
      <HintPath>..\packages\Microsoft.AppCenter.Analytics.1.14.0\lib\MonoAndroid403\Microsoft.AppCenter.Analytics.dll</HintPath>
    </Reference>
    <Reference Include="testLibs">
      <HintPath>..\Shared\DLL\Android\testLibs.dll</HintPath>
    </Reference>
    <Reference Include="Xamarin.Android.Arch.Core.Common">
      <HintPath>..\Shared\DLL\Android\Xamarin.Android.Arch.Core.Common.dll</HintPath>
    </Reference>
@@ -201,8 +196,13 @@
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Application.cs" />
    <Compile Include="FengLinVideo\Forms\MonitorFragment.cs" />
    <Compile Include="FengLinVideo\Forms\ReverseCallFragment.cs" />
    <Compile Include="FengLinVideo\Interface\VideoState.cs" />
    <Compile Include="FengLinVideo\widget\TipDiaglog.cs" />
    <Compile Include="Resources\Resource.designer.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="VideoActivity.cs" />
    <Compile Include="ZXing\ZXingCustomScanView.cs" />
    <Compile Include="ZXing\ZXingOverlayView.cs" />
  </ItemGroup>
@@ -219,6 +219,94 @@
    <AndroidResource Include="Resources\layout\Main.axml" />
    <AndroidResource Include="Resources\values\Strings.xml" />
    <AndroidResource Include="Resources\values\Styles.xml" />
    <AndroidResource Include="Resources\layout\activity_video_phone.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\layout\dialog_tip.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\layout\fragment_call.axml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\layout\fragment_monitor.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\back.png">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\call.png">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\dialog_background.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\floor.png">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\hangup.png">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\screenshot_def.png">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\screenshot_sel.png">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\screenshot.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\sure_background_def.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\sure_background_sel.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\tip_background.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\unlock_def.png">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\unlock_disable.png">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\unlock_sel.png">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\unlock.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\drawable\video_background.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\color\text_color.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
    <AndroidResource Include="Resources\values\Color.xml">
      <SubType></SubType>
      <Generator></Generator>
    </AndroidResource>
  </ItemGroup>
  <ItemGroup>
    <AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" />
@@ -2344,6 +2432,18 @@
  <ItemGroup>
    <AndroidAsset Include="Assets\Phone\ZigeeLogic\iconSelectedBackgroundColor1.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidAsset Include="Assets\Phone\BindPic\CorrectTemperatureBackGround.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidAsset Include="Assets\Phone\BindPic\TemperaTureAdd.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidAsset Include="Assets\Phone\BindPic\TemperaTureAttention.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidAsset Include="Assets\Phone\BindPic\TemperaTureReduction.png" />
  </ItemGroup>
  <Import Project="..\Shared\Shared.projitems" Label="Shared" Condition="Exists('..\Shared\Shared.projitems')" />
  <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
  <Import Project="..\packages\Xamarin.Android.Support.Annotations.26.0.2\build\MonoAndroid80\Xamarin.Android.Support.Annotations.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Annotations.26.0.2\build\MonoAndroid80\Xamarin.Android.Support.Annotations.targets')" />
ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml
old mode 100755 new mode 100644
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="0120080401" android:installLocation="auto" android:versionName="1.1.0120080401">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.evoyo.home" android:versionCode="0120080601" android:installLocation="auto" android:versionName="1.1.0120080601">
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="26" />
    <permission android:name="com.hdl.home.permission.JPUSH_MESSAGE" android:protectionLevel="signature" />
    <permission android:name="com.evoyo.home.permission.JPUSH_MESSAGE" android:protectionLevel="signature" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <!--8.0权限-->
    <uses-permission android:name="android.permission.GET_TASKS" />
@@ -72,7 +72,7 @@
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
    <!--极光推送 Required  一些系统要求的权限,如访问网络等-->
    <!-- Required  一些系统要求的权限,如访问网络等-->
    <uses-permission android:name="com.hdl.home.permission.JPUSH_MESSAGE" />
    <uses-permission android:name="com.evoyo.home.permission.JPUSH_MESSAGE" />
    <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
@@ -92,10 +92,11 @@
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.GET_TASKS" />
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
    <!-- 极光推送结束 -->
    <application android:allowBackup="true" android:largeHeap="true" android:persistent="true" android:label="Evoyo Home" android:icon="@drawable/Icon">
        <!-- 自动更新 -->
        <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.hdl.home.fileProvider" android:grantUriPermissions="true" android:exported="false">
        <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.evoyo.home.fileProvider" android:grantUriPermissions="true" android:exported="false">
            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
        </provider>
        <!--自动更新结束-->
@@ -105,7 +106,7 @@
            <intent-filter>
                <action android:name="cn.jpush.android.ui.PushActivity" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="com.hdl.home" />
                <category android:name="com.evoyo.home" />
            </intent-filter>
        </activity>
        <service android:name="cn.jpush.android.service.PushService" android:process=":mult">
@@ -117,19 +118,19 @@
            </intent-filter>
        </service>
        <!-- since 3.0.9 Required SDK 核心功能-->
        <provider android:authorities="com.hdl.home.DataProvider" android:name="cn.jpush.android.service.DataProvider" android:process=":pushcore" android:exported="false" />
        <provider android:authorities="com.evoyo.home.DataProvider" android:name="cn.jpush.android.service.DataProvider" android:process=":pushcore" android:exported="false" />
        <service android:name="cn.jpush.android.service.DaemonService" android:enabled="true" android:exported="true">
            <intent-filter>
                <action android:name="cn.jpush.android.intent.DaemonService" />
                <category android:name="com.hdl.home" />
                <category android:name="com.evoyo.home" />
            </intent-filter>
        </service>
        <!-- since 3.1.0 Required SDK 核心功能-->
        <provider android:authorities="com.hdl.home.DownloadProvider" android:name="cn.jpush.android.service.DownloadProvider" android:exported="true" />
        <provider android:authorities="com.evoyo.home.DownloadProvider" android:name="cn.jpush.android.service.DownloadProvider" android:exported="true" />
        <receiver android:name="cn.jpush.android.service.PushReceiver" android:enabled="true">
            <intent-filter android:priority="1000">
                <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" />
                <category android:name="com.hdl.home" />
                <category android:name="com.evoyo.home" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.USER_PRESENT" />
@@ -144,27 +145,12 @@
        </receiver>
        <receiver android:name="cn.jpush.android.service.AlarmReceiver" android:exported="false" />
        <!-- User defined.  For test only  用户自定义的广播接收器-->
        <receiver android:name="com.hdl.home.JpushNotificationReceiver" android:exported="false" android:enabled="true">
            <intent-filter>
                <action android:name="cn.jpush.android.intent.REGISTRATION" />
                <!--Required  用户注册SDK的intent-->
                <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" />
                <!--Required  用户接收SDK消息的intent-->
                <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" />
                <!--Required  用户接收SDK通知栏信息的intent-->
                <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" />
                <!--Required  用户打开自定义通知栏的intent-->
                <action android:name="cn.jpush.android.intent.CONNECTION" />
                <!-- 接收网络变化 连接/断开 since 1.6.3 -->
                <category android:name="com.hdl.home" />
            </intent-filter>
        </receiver>
        <!-- Required  . Enable it you can get statistics data with channel -->
        <meta-data android:name="JPUSH_CHANNEL" android:value="developer-default" />
        <meta-data android:name="JPUSH_APPKEY" android:value="f4a3322fbc45e58d04c85191" />
        <meta-data android:name="JPUSH_APPKEY" android:value="07cfd3177490173e7c072f49" />
        <!--  </>值来自开发者平台取得的AppKey-->
        <!-- 极光推送结束 -->
        <!-- 设置高德地图key -->
        <meta-data android:name="com.amap.api.v2.apikey" android:value="1f753413955012c9594c5df69eaa0aff" />
        <meta-data android:name="com.amap.api.v2.apikey" android:value="f78f951092602db3962811e736758559" />
    </application>
</manifest>
ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
old mode 100755 new mode 100644
Diff too large
ZigbeeApp/GateWay.Droid/Resources/color/text_color.xml
New file
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_selected="true" android:color="#FB744A"/>
    <item android:state_selected="false" android:color="#FF333333"/>
    <item android:color="#FF333333"/>
</selector>
ZigbeeApp/GateWay.Droid/Resources/drawable/Icon.png

ZigbeeApp/GateWay.Droid/Resources/drawable/back.png
ZigbeeApp/GateWay.Droid/Resources/drawable/call.png
ZigbeeApp/GateWay.Droid/Resources/drawable/dialog_background.xml
New file
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape>
            <corners android:radius="20dp" />
            <solid android:color="#FFFFFF" />
        </shape>
    </item>
</selector>
ZigbeeApp/GateWay.Droid/Resources/drawable/floor.png
ZigbeeApp/GateWay.Droid/Resources/drawable/hangup.png
ZigbeeApp/GateWay.Droid/Resources/drawable/screenshot.xml
New file
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/screenshot_sel" android:state_selected="true"/>
    <item android:drawable="@drawable/screenshot_def" android:state_selected="false"/>
    <item android:drawable="@drawable/screenshot_def"/>
</selector>
ZigbeeApp/GateWay.Droid/Resources/drawable/screenshot_def.png
ZigbeeApp/GateWay.Droid/Resources/drawable/screenshot_sel.png
ZigbeeApp/GateWay.Droid/Resources/drawable/sure_background_def.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
     <item>
        <shape android:shape="rectangle">
            <solid android:color="#ffffff" />
            <corners android:bottomLeftRadius="20dp" android:bottomRightRadius="20dp"/>
        </shape>
    </item>
</layer-list>
ZigbeeApp/GateWay.Droid/Resources/drawable/sure_background_sel.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
     <item>
        <shape android:shape="rectangle">
            <solid android:color="#66000000" />
            <corners android:bottomLeftRadius="20dp" android:bottomRightRadius="20dp"/>
        </shape>
    </item>
</layer-list>
ZigbeeApp/GateWay.Droid/Resources/drawable/tip_background.xml
New file
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
     <item>
        <shape android:shape="rectangle">
            <solid android:color="#66000000" />
            <corners android:radius="20dp"/>
            <padding android:left="20dp" android:right="20dp" android:bottom="8dp" android:top="8dp"/>
        </shape>
    </item>
</layer-list>
ZigbeeApp/GateWay.Droid/Resources/drawable/unlock.xml
New file
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/unlock_sel" android:state_selected="true"/>
    <item android:drawable="@drawable/unlock_def" android:state_selected="false"/>
    <item android:drawable="@drawable/unlock_def"/>
 </selector>
ZigbeeApp/GateWay.Droid/Resources/drawable/unlock_def.png
ZigbeeApp/GateWay.Droid/Resources/drawable/unlock_disable.png
ZigbeeApp/GateWay.Droid/Resources/drawable/unlock_sel.png
ZigbeeApp/GateWay.Droid/Resources/drawable/video_background.xml
New file
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape>
            <corners android:topLeftRadius="20dp" android:topRightRadius="20dp" />
            <solid android:color="#FFFFFF" />
        </shape>
    </item>
</selector>
ZigbeeApp/GateWay.Droid/Resources/layout/activity_video_phone.xml
New file
@@ -0,0 +1,119 @@
<?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="#ffffffff"
    android:fitsSystemWindows="true"
    android:orientation="vertical">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="#f5f6fa">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:background="#FFFFFF"
            android:gravity="center_vertical"
            android:orientation="vertical"
            android:minWidth="25px"
            android:minHeight="25px">
        <ImageView
            android:id="@+id/icon_back"
            android:layout_width="35dp"
            android:layout_height="35dp"
            android:layout_marginStart="15dp"
            android:gravity="center"
            android:scaleType="centerInside"
            android:src="@drawable/back" />
    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="25dp"
        android:background="@drawable/video_background"
        android:orientation="vertical">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <TextView
                android:id="@+id/tv_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dp"
                android:layout_marginBottom="20dp"
                android:gravity="center"
                android:textColor="#FF000000"
                android:text="二次确认机"
                android:textSize="18sp" />
        </LinearLayout>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="211"
            android:orientation="vertical">
            <FrameLayout
                android:id="@+id/localVideo"
                android:layout_width="1px"
                android:layout_height="1px"
                android:visibility="invisible"/>
            <FrameLayout
                android:id="@+id/remoteFrame"
                android:layout_width="match_parent"
                android:background="#FFFFFF"
                android:layout_height="match_parent"/>
        </LinearLayout>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="36"
            android:background="#ff232323"
            android:gravity="center_vertical"
            android:orientation="horizontal">
            <ImageView
                android:layout_width="28dp"
                android:layout_height="28dp"
                android:src="@drawable/floor"
                android:layout_marginLeft="20dp"/>
            <TextView
                android:id="@+id/tv_roomName"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="18sp"
                android:layout_marginLeft="5dp"
                android:textColor="#FFFFFF"
                android:text="1栋203"/>
        </LinearLayout>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="279"
            android:orientation="vertical">
            <LinearLayout
                android:id="@+id/content"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical"/>
        </LinearLayout>
    </LinearLayout>
</LinearLayout>
</LinearLayout>
ZigbeeApp/GateWay.Droid/Resources/layout/dialog_tip.xml
New file
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" ?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/dialog_background">
    <TextView
        android:id="@+id/tv_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textColor="@color/color_default"
        android:textSize="16sp"
        android:gravity="center"
        android:layout_marginTop="24dp"
        android:layout_marginBottom="12dp"
        android:fontFamily="sans-serif-black"
        android:text="提示"/>
    <TextView
        android:id="@+id/tv_content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="13sp"
        android:gravity="center"
        android:textColor="@color/color_default"
        android:text="已挂断"/>
    <View
        android:layout_width="match_parent"
        android:layout_height="1px"
        android:layout_marginTop="24dp"
        android:background="@color/color_disable"/>
    <TextView
        android:id="@+id/tv_ok"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="13dp"
        android:paddingBottom="13dp"
        android:gravity="center"
        android:fontFamily="sans-serif-medium"
        android:textSize="16sp"
        android:textColor="#2175d8"
        android:background="@drawable/sure_background_def"
        android:text="确认"/>
</LinearLayout>
ZigbeeApp/GateWay.Droid/Resources/layout/fragment_call.axml
New file
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
        <LinearLayout
            android:layout_width="0dp"
            android:layout_weight="1"
            android:gravity="center"
            android:layout_height="wrap_content">
             <ImageView
                android:id="@+id/icon_screenshot"
                android:layout_width="36dp"
                android:layout_height="36dp"
                android:layout_marginTop="5dp"
                android:layout_marginBottom="5dp"
                android:contentDescription="截图"
                android:src="@drawable/screenshot"/>
            </LinearLayout>
        <LinearLayout
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:gravity="center">
            <ImageView
                android:id="@+id/icon_unlock"
                android:layout_width="36dp"
                android:layout_height="36dp"
                android:layout_marginBottom="6dp"
                android:layout_marginTop="6dp"
                android:contentDescription="开锁"
                android:src="@drawable/unlock" />
        </LinearLayout>
    </LinearLayout>
    <View
        android:layout_width="match_parent"
        android:layout_height="1px"
        android:background="@color/color_disable"/>
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <TextView
            android:id="@+id/tv_tip"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="30dp"
            android:background="@drawable/tip_background"
            android:textColor="@android:color/white"
            android:textSize="15sp"
            android:text="来电中..."/>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:orientation="horizontal">
            <RelativeLayout
                android:id="@+id/rl_hangup"
                android:layout_width="0dp"
                android:layout_weight="1"
                android:layout_height="wrap_content">
                <ImageView
                    android:id="@+id/img_hangup"
                    android:layout_width="58dp"
                    android:layout_height="58dp"
                    android:layout_centerHorizontal="true"
                    android:src="@drawable/hangup"/>
                <TextView
                    android:id="@+id/tv_hangup"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="拒接"
                    android:textSize="15sp"
                    android:layout_marginTop="10dp"
                    android:layout_centerHorizontal="true"
                    android:textColor="@color/text_color"
                    android:layout_below="@id/img_hangup"/>
            </RelativeLayout>
            <RelativeLayout
                android:id="@+id/rl_call"
                android:layout_width="0dp"
                android:layout_weight="1"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true">
                <ImageView
                    android:id="@+id/img_call"
                    android:layout_width="58dp"
                    android:layout_height="58dp"
                    android:layout_centerHorizontal="true"
                    android:src="@drawable/call"/>
                <TextView
                    android:id="@+id/tv_call"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="接听"
                    android:textSize="15sp"
                    android:layout_marginTop="10dp"
                    android:layout_centerHorizontal="true"
                    android:textColor="@color/text_color"
                    android:layout_below="@id/img_call"/>
            </RelativeLayout>
        </LinearLayout>
    </RelativeLayout>
</LinearLayout>
ZigbeeApp/GateWay.Droid/Resources/layout/fragment_monitor.xml
New file
@@ -0,0 +1,67 @@
<?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:orientation="vertical">
    <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="279"
            android:layout_marginLeft="80dp"
            android:layout_marginRight="80dp"
            android:gravity="center_vertical"
            android:orientation="horizontal">
            <RelativeLayout
                android:id="@+id/rl_sceenshot"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center">
                <ImageView
                    android:id="@+id/icon_screenshot"
                    android:layout_width="58dp"
                    android:layout_height="58dp"
                    android:scaleType="centerInside"
                    android:src="@drawable/screenshot" />
                <TextView
                    android:id="@+id/tv_screenshot"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/icon_screenshot"
                    android:layout_centerHorizontal="true"
                    android:text="截图"
                    android:textColor="@color/text_color"
                    android:textSize="18sp" />
            </RelativeLayout>
            <RelativeLayout
                android:id="@+id/rl_unlock"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:gravity="center">
                <ImageView
                    android:id="@+id/icon_unlock"
                    android:layout_width="58dp"
                    android:layout_height="58dp"
                    android:scaleType="centerInside"
                    android:src="@drawable/unlock" />
                <TextView
                    android:id="@+id/tv_unlock"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/icon_unlock"
                    android:layout_centerHorizontal="true"
                    android:text="开锁"
                    android:textColor="@color/text_color"
                    android:textSize="18sp" />
            </RelativeLayout>
        </RelativeLayout>
</LinearLayout>
ZigbeeApp/GateWay.Droid/Resources/values/Color.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
    <color name="color_white">#FFFFFF</color>
    <color name="color_disable">#CCCCCC</color>
    <color name="color_select">#FB744A</color>
    <color name="color_default">#FF333333</color>
</resources>
ZigbeeApp/GateWay.Droid/Resources/values/Styles.xml
@@ -10,4 +10,28 @@
      <item name="android:windowLightStatusBar">true</item>
    <item name="android:windowTranslucentStatus">true</item>  
    </style>
    <style name="MyTheme1" parent="@android:style/Theme.Light">
        <!-- 隐藏状态栏 -->
        <item name="android:windowFullscreen">false</item>
        <!-- 隐藏标题栏 -->
        <!--
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowLightStatusBar">true</item>
        <item name="android:windowTranslucentStatus">true</item>
        -->
    </style>
    <style name="DialogTheme" parent="@android:style/Theme.Dialog">
        <!-- 背景颜色及和透明程度 -->
        <item name="android:windowBackground">@android:color/transparent</item>
        <!-- 是否去除标题 -->
        <item name="android:windowNoTitle">true</item>
        <!-- 是否去除边框 -->
        <item name="android:windowFrame">@null</item>
        <!-- 是否浮现在activity之上 -->
        <item name="android:windowIsFloating">true</item>
    </style>
</resources>
ZigbeeApp/GateWay.Droid/VideoActivity.cs
New file
@@ -0,0 +1,372 @@
using System;
using Android.App;
using Android.Content.PM;
using Android.Content.Res;
using Android.Graphics;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Com.ETouchSky;
using Com.Tool;
using GateWay.Droid.FengLinVideo.Forms;
using GateWay.Droid.FengLinVideo.widget;
using Java.Text;
using Java.Util;
namespace GateWay.Droid
{
    //注意: com.hdl.evoyohome ====》packcode=44492e5c51dda5e40862a4255396b741 包名是固定的,更改包名会导致可视对讲部分工作不正常
    [Activity(Name = "com.hdl.home.wxapi.VideoActivity", WindowSoftInputMode = SoftInput.AdjustResize, LaunchMode = LaunchMode.SingleInstance, ConfigurationChanges = (ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.LayoutDirection | ConfigChanges.Locale | ConfigChanges.Orientation | ConfigChanges.ScreenSize), Theme = "@style/MyTheme", ScreenOrientation = ScreenOrientation.Portrait)]
    public class VideoActivity : Android.App.Activity, View.IOnClickListener, ISurfaceHolderCallback, VideoPhoneJni.ICallBack,TipDiaglog.OnConfirmClickListener
    {
        private VideoPhone mPhone;
        private ISurfaceHolder mRemoteSurfaceHolder;
        private FrameLayout mRemoteFrameContainer;
        private SurfaceView mSurfaceRemote;
        private ImageView ivBack;
        private TextView tvName;
        private TextView tvRoomName;
        private MonitorFragment monitorFragment = null;
        private ReverseCallFragment reverseCallFragment = null;
        public string ESVideoUUID= "JJY000019VPLLF";//室外机UUID,例:JJY000007FSEYX  f5f6fa
        public int ESRoomID = 0;//当前用户的房间 ID
        public string DeviceName;//室外机的名称,例,室外机
        public string RoomName;//房间命名,例 8栋1单元0801
        public bool IsCollect;//是否收藏
        public int Tpye = 0;//类型,0 监控,1反呼
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            try
            {
                ESVideoUUID = Intent.GetStringExtra("ESVideoUUID");//室外机UUID,例:JJY000007FSEYX
                ESRoomID = Intent.GetIntExtra("ESRoomID", 0);//当前用户的房间 ID   101
                DeviceName = Intent.GetStringExtra("DeviceName");//室外机的名称,例,室外机
                RoomName = Intent.GetStringExtra("RoomName");//房间命名,例 8栋1单元0801   81
                IsCollect = Intent.GetBooleanExtra("IsCollect", false);//是否收藏
                Tpye = Intent.GetIntExtra("Type", 0);//类型,0 监控,1反呼
                SetContentView(Resource.Layout.activity_video_phone);
                IniView();
                IniData();
                if (Tpye == 0)
                {
                    Monitor(ESVideoUUID); //监控
                    monitorFragment = new MonitorFragment(mPhone);
                    FragmentManager.BeginTransaction().Replace(Resource.Id.content, monitorFragment).Commit();
                }
                else
                {
                    reverseCallFragment = new ReverseCallFragment(mPhone, ESVideoUUID);
                    FragmentManager.BeginTransaction().Replace(Resource.Id.content, reverseCallFragment).Commit();
                }
            }
            catch (Exception E)
            {
                var D=E.Message;
            }
        }
        //监控
        private void Monitor(string address)
        {
            //监视功能 从平台拉取监视列表,调用此接口可以一台一台监视
            if (mPhone != null)
            {
                string UserData = ""; //此参数 可以向门口机设备传递数据,
                //注意:RequestAudio 请求对方音频,RequestVideo请求对方视频 SendAudio发送本地音频 SendVideo 发送本地视频 一般门口不接收到视频,所以最好设置0,减少流量消耗
                string param = "SendAudio=0\r\n" + "SendVideo=0\r\n" + "RequestAudio=0\r\n" + "RequestVideo=0\r\n" + "UserData=" + UserData + "\r\n";
                mPhone.Monitor(address, param);
            }
        }
        private void IniView()
        {
            mRemoteFrameContainer = (FrameLayout)FindViewById(Resource.Id.remoteFrame);
            ivBack = (ImageView)FindViewById(Resource.Id.icon_back);
            tvName = (TextView)FindViewById(Resource.Id.tv_name);
            tvRoomName = (TextView)FindViewById(Resource.Id.tv_roomName);
            tvRoomName.SetText(RoomName, null);
            tvName.SetText(DeviceName, null);
            ivBack.SetOnClickListener(this);
        }
        private void IniData()
        {
            try
            {
                if (mPhone == null)
                {
                    string _params = "port=8554\r\n" + "packcode=cd89ae3460c8f396c748bb7d2668dfd0\r\n"; //初始化对讲端口,默认就好,跟门口机设置要匹配,注意新接口需要增加packcode参数,需要把你们的包名发过来
                    mPhone = new VideoPhone(this, this, _params);
                    if (mRemoteSurfaceHolder != null)
                    {
                        mPhone.SetRemoteSurfaceHolder(mRemoteSurfaceHolder, "mRemoteSurfaceHolder!=null"); //设置来电窗口
                    }
                    ViewGroup v = (ViewGroup)FindViewById(Resource.Id.localVideo);
                    mPhone.SetLocalVideoContainer(v);//设置本地视频窗口,一定要调用,不然后会出现没声音
                }
                else
                {
                    mPhone.StopStream();
                    mPhone.Release();
                    mPhone = null;
                }
            }
            catch (Exception e)
            {
                string error = e.Message;
            }
        }
        protected override void OnResume()
        {
            base.OnResume();
            if (mPhone != null)
            {
                mPhone.OnActivityResume();
            }
        }
        protected override void OnPause()
        {
            base.OnPause();
            if (mPhone != null)
            {
                mPhone.OnActivityPause();
            }
        }
        protected override void OnDestroy()
        {
            base.OnDestroy();
            if (mPhone != null)
            {
                mPhone.OnActivityDestroy();
            }
        }
        public void OnClick(View v)
        {
            if (v.Equals(ivBack))
            {
                this.Finish();
            }
        }
        //不能用View.INVISIBLE来完全隐藏,否则MediaCodec.configure会报ava.lang.IllegalArgumentException: The surface has been released
        //[Obsolete]
        private void showRemoteVideo()
        {
            try
            {
                if (mSurfaceRemote != null)
                {
                    return;
                }
                mSurfaceRemote = new SurfaceView(this, null);
                ISurfaceHolder holder = mSurfaceRemote.Holder;
                holder.AddCallback(this);//ISurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS
                holder.SetType(SurfaceType.PushBuffers);
                //发现第一次show时会闪屏一下,后面hide再show时不会闪屏
                FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
                //v.setId(View.generateViewId());
                mSurfaceRemote.LayoutParameters = lp;
                mRemoteFrameContainer.AddView(mSurfaceRemote);
            }
            catch { }
        }
        private void hideRemoteVideo()
        {
            try
            {
                if (mSurfaceRemote != null)
                {
                    mRemoteFrameContainer.RemoveView(mSurfaceRemote);
                    mSurfaceRemote = null;
                }
            }
            catch { }
        }
        /// <summary>
        /// 弹出已挂断提示
        /// </summary>
        private void showTipDialog(string title, string text, string btnText)
        {
            try
            {
                TipDiaglog diaglog = new TipDiaglog(this);
                diaglog.SetTitleText(title);//"提示"
                diaglog.SetContentText(text);//"已挂断"
                diaglog.SetConfirmText(btnText);//"确认"
                diaglog.SetCanceledOnTouchOutside(false);
                diaglog.Show();
                diaglog.Create();
                diaglog.SetConfirmClickListener(this);
            }
            catch (Exception e)
            {
                string ss = e.Message;
            }
        }
        public void SurfaceChanged(ISurfaceHolder holder, [GeneratedEnum] Format format, int width, int height)
        {
            mRemoteSurfaceHolder = holder;
            if (mPhone != null)
            {
                mPhone.SetRemoteSurfaceHolder(holder, "surfaceChanged");
            }
        }
        public void SurfaceCreated(ISurfaceHolder holder)
        {
            mRemoteSurfaceHolder = holder;
            if (mPhone != null)
            {
                mPhone.SetRemoteSurfaceHolder(holder, "surfaceCreated");
            }
        }
        public void SurfaceDestroyed(ISurfaceHolder holder)
        {
            mRemoteSurfaceHolder = null;
            if (mPhone != null)
            {
                mPhone.SetRemoteSurfaceHolder(null, "surfaceDestroyed");
            }
        }
        //由于android框架限制,要满足如下条件才能开流:activity要在前台,并且surfaceview可用
        private void startStream(String reason)
        {
            if (mPhone != null)
            {
                try
                {
                    //开流之前可配置视频尺寸,码率,帧率 针对的是本地
                    //mPhone.SetVideoSize(640, 480);//1920x1080,1280x720,640x480
                    //mPhone.SetBps(1.5 * 1024 * 1024);
                    //mPhone.SetFps(30);
                    mPhone.StartStream();
                }
                catch (Exception e)
                {
                    string ss = e.Message;
                }
            }
        }
        //[Obsolete]
        public void OnPhoneEvent(string msg)
        {
            try
            {
                if (monitorFragment != null)
                {
                    monitorFragment.onPhoneEvent(msg);
                }
                if (reverseCallFragment != null)
                {
                    reverseCallFragment.onPhoneEvent(msg);
                }
                TextProtocol tp = new TextProtocol();
                tp.Parse(msg);
                string event1 = tp.GetString("event");
                switch (event1)
                {
                    case "EVT_Ringing":
                        mPhone.RequestCallerSendVideo();
                        showRemoteVideo();
                        break;
                    case "EVT_Connected":
                        if (!mPhone.IsStreamRunning)
                        {
                            //由于android框架限制,要满足如下条件才能开流: activity要在前台,并且surfaceview可用
                            startStream("EVT_Connected");
                        }
                        showRemoteVideo();
                        break;
                    case "EVT_StartStream":
                        startStream("EVT_StreamStream");
                        break;
                    case "EVT_StopStream":
                        mPhone.StopStream();
                        break;
                    case "EVT_MonitorConnected":
                        if (!mPhone.IsStreamRunning)
                        {
                            startStream("EVT_MonitorConnected");
                        }
                        showRemoteVideo();
                        break;
                    case "EVT_HangUp":
                        hideRemoteVideo();
                        if (mPhone != null)
                        {
                            mPhone.StopStream();
                        }
                        showTipDialog("提示","已挂断","确认");
                        break;
                    case "EVT_RECV_CUSTOM_DATA":
                        string data = tp.GetString("data");
                        //updataUnlockState();
                        break;
                    case "EVT_SnapAck":
                        int error = tp.GetInt("error");
                        string filePath = tp.GetString("filePath");
                        if (error == 0)
                        {
                            showTipDialog("提示", "抓图成功", "确认");
                        }
                        else
                        {
                            showTipDialog("提示", "抓图失败\n\r" + error, "确认");
                        }
                        break;
                }
            }
            catch (Exception e)
            {
                string error = e.Message;
            }
        }
        public void OnRecvAudioFrame(byte[] p0)
        {
            //throw new NotImplementedException();
        }
        public void OnRecvVideoFrame(byte[] p0)
        {
            //throw new NotImplementedException();
        }
        public void onSureClick(TipDiaglog dialoog, View v)
        {
            dialoog.Dismiss();
            this.Finish();
        }
    }
}
ZigbeeApp/Home.Ios/AppDelegate.cs
old mode 100755 new mode 100644
@@ -1,4 +1,4 @@
using System;
using System;
using Foundation;
using Microsoft.AppCenter;
using Microsoft.AppCenter.Analytics;
@@ -57,10 +57,10 @@
                            if (!string.IsNullOrEmpty(hiddenJson))
                            {
                                if (hiddenJson.Contains("cmtID"))
                                {
                                        ///目前根据这个判断是否是可视对讲数据
                                       // VideoMethod(hiddenJson);
                                {
                                    ///目前根据这个判断是否是可视对讲数据
                                    // VideoMethod(hiddenJson);
                                }
                                else
                                {
@@ -87,8 +87,8 @@
                                    }
                                }
                            }
                        }
                    }
@@ -96,6 +96,7 @@
            }
            AppCenter.Start("0ca801a2-742b-42fb-ba10-7ba4391371aa", typeof(Analytics), typeof(Crashes));
            GDMapKit.setGDApiKey("866fae25f336bc8d9a79b1d19267fffb");//高德地图key
            return true;
        }
@@ -275,6 +276,10 @@
        public override void WillEnterForeground(UIApplication application)
        {
            var internetStatus = GateWay.Ios.Reachability.InternetConnectionStatus();
            Shared.Phone.UserCenter.HdlWifiLogic.Current.NetworkStateChanged((int)internetStatus);
            //ZigBee.Common.Application.FindGateWaySocket.Start();
            // Called as part of the transiton from background to active state.
            // Here you can undo many of the changes made on entering the background.
            System.Console.WriteLine("WillEnterForeground");
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024*1024-1.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024*1024.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024_1024-1.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024_1024-2.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120*120-1.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120*120-2.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120*120.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120-2.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120-3.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120-4.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/152*152.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/152_152-1.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/167*167.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/167_167-1.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180*180-1.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180*180.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180_180-1.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180_180-2.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/20*20.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/20_20-1.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/29*29.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/29_29-1.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40*40-1.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40*40-2.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40*40.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40-2-1.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40-3.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40-4.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58*58-1.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58*58-2.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58*58.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58-2.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58-3.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58-4.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/60*60.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/60_60-1.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/76*76.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/76_76-1.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80*80-1.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80*80-2.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80*80.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80-2.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80-3.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80-4.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87*87-1.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87*87.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87_87-1.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87_87-2.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -1,121 +1,121 @@
{
  "images": [
    {
      "filename": "40_40-3.png",
      "filename": "40*40.png",
      "size": "20x20",
      "scale": "2x",
      "idiom": "iphone"
    },
    {
      "filename": "60_60-1.png",
      "filename": "60*60.png",
      "size": "20x20",
      "scale": "3x",
      "idiom": "iphone"
    },
    {
      "filename": "58_58-2.png",
      "filename": "58*58.png",
      "size": "29x29",
      "scale": "2x",
      "idiom": "iphone"
    },
    {
      "filename": "87_87-1.png",
      "filename": "87*87.png",
      "size": "29x29",
      "scale": "3x",
      "idiom": "iphone"
    },
    {
      "filename": "80_80-2.png",
      "filename": "80*80.png",
      "size": "40x40",
      "scale": "2x",
      "idiom": "iphone"
    },
    {
      "filename": "120_120-2.png",
      "filename": "120*120.png",
      "size": "40x40",
      "scale": "3x",
      "idiom": "iphone"
    },
    {
      "filename": "120_120-3.png",
      "filename": "120*120-1.png",
      "size": "60x60",
      "scale": "2x",
      "idiom": "iphone"
    },
    {
      "filename": "180_180-1.png",
      "filename": "180*180.png",
      "size": "60x60",
      "scale": "3x",
      "idiom": "iphone"
    },
    {
      "filename": "20_20-1.png",
      "filename": "20*20.png",
      "size": "20x20",
      "scale": "1x",
      "idiom": "ipad"
    },
    {
      "filename": "40_40-4.png",
      "filename": "40*40-1.png",
      "size": "20x20",
      "scale": "2x",
      "idiom": "ipad"
    },
    {
      "filename": "29_29-1.png",
      "filename": "29*29.png",
      "size": "29x29",
      "scale": "1x",
      "idiom": "ipad"
    },
    {
      "filename": "58_58-3.png",
      "filename": "58*58-1.png",
      "size": "29x29",
      "scale": "2x",
      "idiom": "ipad"
    },
    {
      "filename": "40_40-2-1.png",
      "filename": "40*40-2.png",
      "size": "40x40",
      "scale": "1x",
      "idiom": "ipad"
    },
    {
      "filename": "80_80-3.png",
      "filename": "80*80-1.png",
      "size": "40x40",
      "scale": "2x",
      "idiom": "ipad"
    },
    {
      "filename": "167_167-1.png",
      "filename": "167*167.png",
      "size": "83.5x83.5",
      "scale": "2x",
      "idiom": "ipad"
    },
    {
      "filename": "76_76-1.png",
      "filename": "76*76.png",
      "size": "76x76",
      "scale": "1x",
      "idiom": "ipad"
    },
    {
      "filename": "152_152-1.png",
      "filename": "152*152.png",
      "size": "76x76",
      "scale": "2x",
      "idiom": "ipad"
    },
    {
      "filename": "1024_1024-1.png",
      "filename": "1024*1024.png",
      "size": "1024x1024",
      "scale": "1x",
      "idiom": "ios-marketing"
    },
    {
      "filename": "120_120-4.png",
      "filename": "120*120-2.png",
      "size": "60x60",
      "scale": "2x",
      "idiom": "car"
    },
    {
      "filename": "180_180-2.png",
      "filename": "180*180-1.png",
      "size": "60x60",
      "scale": "3x",
      "idiom": "car"
@@ -136,21 +136,21 @@
    },
    {
      "role": "companionSettings",
      "filename": "58_58-4.png",
      "filename": "58*58-2.png",
      "size": "29x29",
      "scale": "2x",
      "idiom": "watch"
    },
    {
      "role": "companionSettings",
      "filename": "87_87-2.png",
      "filename": "87*87-1.png",
      "size": "29x29",
      "scale": "3x",
      "idiom": "watch"
    },
    {
      "role": "appLauncher",
      "filename": "80_80-4.png",
      "filename": "80*80-2.png",
      "size": "40x40",
      "subtype": "38mm",
      "scale": "2x",
@@ -192,7 +192,7 @@
      "idiom": "watch"
    },
    {
      "filename": "1024_1024-2.png",
      "filename": "1024*1024-1.png",
      "size": "1024x1024",
      "scale": "1x",
      "idiom": "watch-marketing"
ZigbeeApp/Home.Ios/Home.IOS.csproj
@@ -52,6 +52,7 @@
        <MtouchExtraArgs>-gcc_flags -dead_strip</MtouchExtraArgs>
        <MtouchI18n>cjk</MtouchI18n>
<CodesignProvision>Home_Dev</CodesignProvision>
<MtouchHttpClientHandler>CFNetworkHandler</MtouchHttpClientHandler>
    </PropertyGroup>
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
        <DebugType>none</DebugType>
@@ -199,30 +200,6 @@
      <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\2048*1536-1.png" />
      <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\1920_1080-1.png" />
      <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\3840_2160-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\40_40-3.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\60_60-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\58_58-2.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\87_87-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\80_80-2.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\120_120-2.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\120_120-3.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\180_180-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\20_20-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\40_40-4.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\29_29-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\58_58-3.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\40_40-2-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\80_80-3.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\76_76-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\152_152-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\167_167-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\1024_1024-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\120_120-4.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\180_180-2.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\58_58-4.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\87_87-2.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\80_80-4.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\1024_1024-2.png" />
      <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\易欧1242*2688.png" />
      <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\易欧828*1792.png" />
      <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\易欧2688*1242.png" />
@@ -250,6 +227,30 @@
      <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\易欧2048_1496备份.png" />
      <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\易欧1024_768备份.png" />
      <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\易欧2048_1536备份.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\40*40.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\60*60.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\58*58.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\87*87.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\80*80.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\120*120.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\120*120-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\180*180.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\20*20.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\40*40-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\29*29.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\58*58-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\40*40-2.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\80*80-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\76*76.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\152*152.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\167*167.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\1024*1024.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\120*120-2.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\180*180-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\58*58-2.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\87*87-1.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\80*80-2.png" />
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\1024*1024-1.png" />
    </ItemGroup>
    <ItemGroup>
      <BundleResource Include="Resources\Language.ini" />
@@ -465,6 +466,7 @@
      <BundleResource Include="Resources\Phone\BindPic\EmptyTargets.png" />
      <BundleResource Include="Resources\Phone\BindPic\BindEmptyPic.png" />
      <BundleResource Include="Resources\Phone\BindPic\Curtain.png" />
      <BundleResource Include="Resources\Phone\BindPic\TemperaTureReduction.png" />
      <BundleResource Include="Resources\Phone\BindPic\BindLeft.png" />
      <BundleResource Include="Resources\Phone\BindPic\FreshAirIcon.png" />
      <BundleResource Include="Resources\Phone\BindPic\Roller.png" />
@@ -473,7 +475,10 @@
      <BundleResource Include="Resources\Phone\BindPic\EmptyTargetsSelected.png" />
      <BundleResource Include="Resources\Phone\BindPic\BindRoomColor.png" />
      <BundleResource Include="Resources\Phone\BindPic\Switch.png" />
      <BundleResource Include="Resources\Phone\BindPic\TemperaTureAdd.png" />
      <BundleResource Include="Resources\Phone\BindPic\BindRight.png" />
      <BundleResource Include="Resources\Phone\BindPic\CorrectTemperatureBackGround.png" />
      <BundleResource Include="Resources\Phone\BindPic\TemperaTureAttention.png" />
      <BundleResource Include="Resources\Phone\BindPic\BindRoomColorOn.png" />
      <BundleResource Include="Resources\Phone\DoorLock\DistributeUnlockIcon.png" />
      <BundleResource Include="Resources\Phone\DoorLock\TypeIcon.png" />
ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -339,6 +339,10 @@
335=警告!数据出错,必须刷新列表,否则控制现象错乱
336=同步
337=同步失败
338=数据校正
339=矫正温度失败
340=矫正面板内置的温度或湿度传感器读数
341=请输入正确的数值
5097=取消
5098=确定
@@ -1880,10 +1884,12 @@
16141=紧急按钮
16142=门窗传感器
16143=钥匙扣
16144=色值号为6位(由任意数字+字母组合)
16144=色值号为6位(由纯数字/数字+字母组合)
16145=长按此按键
16146=Mini网关最大只能添加16个设备
16147=开关键
16148=过户
16149=住宅过户
;★★★★下面这些是接口的返回信息翻译,从18000开始★★★★
18004=指定网关已经被绑定
@@ -1965,7 +1971,7 @@
;方悦8按键轻触式面板入网操作指示
21020=长按BUTTON1按键5秒,所有指示灯{0}变为绿色并闪烁,进入配网状态
;方悦环境面板入网操作指示
21021=按住面板功能(function)按键,所有按键{0}指示灯亮起,则配网成功
21021=按住面板功能按键5秒,绿色指示灯闪烁{0}进入配网状态;闪烁停止{0}指示灯变白色表示配网成功
;窗帘面板的入网操作指示
21022=长按面板左上角按键,所有按键{0}指示灯亮起,则配网成功
;吸顶燃气传感器的入网操作指示
ZigbeeApp/Home.Ios/Resources/Phone/BindPic/CorrectTemperatureBackGround.png
ZigbeeApp/Home.Ios/Resources/Phone/BindPic/TemperaTureAdd.png
ZigbeeApp/Home.Ios/Resources/Phone/BindPic/TemperaTureAttention.png
ZigbeeApp/Home.Ios/Resources/Phone/BindPic/TemperaTureReduction.png
ZigbeeApp/Shared/Common/SendDataToServer.cs
@@ -576,6 +576,10 @@
            /// 请填入设备的类型,只能为【iphone】和【android】
            /// </summary>
            public string DeviceType;
            /// <summary>
            /// 3:Evoyo Home
            /// </summary>
            public int Software = 3;
        }
        #endregion
ZigbeeApp/Shared/DLL/Android/testLibs.dll
Binary files differ
ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DevicePmSensorRowControl.cs
@@ -50,7 +50,7 @@
            //检测能否发送获取状态命令
            if (this.CheckCanSendStatuComand() == true)
            {
                HdlDeviceAttributeLogic.Current.SendFreshAirStatuComand(this.device);
                HdlDeviceAttributeLogic.Current.SendPmSensorComand(this.device);
            }
        }
ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
@@ -24,8 +24,8 @@
            TopView view = new TopView();
            this.AddChidren(view.TopRowView());
            view.toptitleNameBtn.TextID = MyInternationalizationString.selection;
            view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); };
            view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); };
            var middle = new FrameLayout
            {
                Y = view.topRowLayout.Bottom,
ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs
@@ -105,7 +105,12 @@
                     eSVideoInfo.RoomName = videoInfos.RoomName;
                     GateWay.Ios.ESVideo.ShowESVideoMonitor(eSVideoInfo);
#elif Android
                     Shared.Phone.VideoPhone.ESVideoInfo eSVideoInfo = new Shared.Phone.VideoPhone.ESVideoInfo();
                     eSVideoInfo.DeviceName = videoInfos.DeviceName;
                     eSVideoInfo.ESVideoUUID = videoInfos.ESVideoUUID;
                     eSVideoInfo.ESRoomID = videoInfos.ESRoomID;
                     eSVideoInfo.RoomName = videoInfos.RoomName;
                     Shared.Phone.VideoPhone.ESVideo.ShowESVideoMonitor(eSVideoInfo);
#endif
                 };
ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs
@@ -199,7 +199,6 @@
            {
                btnTiyan.CanClick = false;
                //显示启动页
                HomePage.Instance.ShowLoginLoadView();
                HdlThreadLogic.Current.RunThread(() =>
                {
                    //初始化全部体验数据
@@ -836,23 +835,26 @@
                    var re = isBindAuthAsync(authStr);
                    if (re)
                    {
                        HdlThreadLogic.Current.RunMain(() =>
                        {
                            //直接登录
                            HomePage.Instance.ShowLoginLoadView();
                        });
                        ProgressBar.Show(Language.StringByID(R.MyInternationalizationString.Logining));
                        var resultRegID = Shared.Common.CommonPage.Instance.PushRegID();
                        var homes = HdlResidenceLogic.Current.GetHomeListsFromDb(false);
                        //刷新个人中心的内存及线程
                        UserCenterLogic.InitUserCenterMenmoryAndThread();
                        bool result = UserCenterLogic.InitUserCenterMenmoryAndThread();
                        //启动ZigBee
                        ZigBee.Common.Application.Init();
                        HdlThreadLogic.Current.RunMain(() =>
                        {
                            ProgressBar.Close();
                            this.RemoveFromParent();
                            CommonPage.Instance.RemoveViewByTag("Login");
                            UserPage.Instance.ReFreshControl();
                            if (result == true)
                            {
                                //false:开启了调试功能
                                UserPage.Instance.ReFreshControl();
                            }
                        });
                    }
                    else
@@ -1091,11 +1093,6 @@
            //Error 不能直接从服务器取,只能根据状态码逐一判断
            if (stateCodeStr == "SUCCESS")
            {
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //显示启动页
                    HomePage.Instance.ShowLoginLoadView();
                });
                //存储数据
                var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
                var revertData = responseDataObj;
@@ -1113,7 +1110,8 @@
                var resultRegID = CommonPage.Instance.PushRegID();
                var homes = HdlResidenceLogic.Current.GetHomeListsFromDb(false);
                //刷新个人中心的内存及线程
                UserCenterLogic.InitUserCenterMenmoryAndThread();
                bool result = UserCenterLogic.InitUserCenterMenmoryAndThread();
                //启动ZigBee
                ZigBee.Common.Application.Init();
@@ -1122,7 +1120,11 @@
                    CommonPage.Loading.Hide();
                    this.RemoveFromParent();
                    CommonPage.Instance.RemoveViewByTag("Login");
                    UserPage.Instance.ReFreshControl();
                    if (result == true)
                    {
                        //false:开启了调试功能
                        UserPage.Instance.ReFreshControl();
                    }
                });
                return;
            }
ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs
@@ -98,7 +98,6 @@
            HdlThreadLogic.Current.RunMain(() =>
            {
                //打开启动页
                HomePage.Instance.ShowLoginLoadView();
                CommonPage.Loading.Start(Language.StringByID(R.MyInternationalizationString.Logining));
                
                HdlThreadLogic.Current.RunThread(() =>
@@ -115,7 +114,8 @@
                        var homes = HdlResidenceLogic.Current.GetHomeListsFromDb(false);
                        //刷新个人中心的内存及线程
                        UserCenterLogic.InitUserCenterMenmoryAndThread();
                        bool result = UserCenterLogic.InitUserCenterMenmoryAndThread();
                        //启动ZigBee
                        ZigBee.Common.Application.Init();
@@ -125,7 +125,11 @@
                            this.RemoveFromParent();
                            CommonPage.Instance.RemoveViewByTag("Register");
                            CommonPage.Instance.RemoveViewByTag("Login");
                            UserPage.Instance.ReFreshControl();
                            if (result == true)
                            {
                                //false:开启了调试功能
                                UserPage.Instance.ReFreshControl();
                            }
                        });
                    }
                    else
ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs
@@ -100,7 +100,7 @@
            this.AddChidren(btnBackGroud, ChidrenBindMode.BindEvent);
            //设备名称控件
            this.btnDeviceName = new NormalViewControl(320, 63, true);
            this.btnDeviceName = new NormalViewControl(360, 63, true);
            btnDeviceName.X = HdlControlLogic.Current.GetPictrueRealSize(40);
            btnDeviceName.Y = HdlControlLogic.Current.GetPictrueRealSize(17);
            btnDeviceName.TextSize = 16;
@@ -155,7 +155,7 @@
            this.ChangedChidrenBindMode(fraDeviceRound, ChidrenBindMode.BindEvent);
            //状态文本控件
            this.btnStatu = new NormalViewControl(HdlControlLogic.Current.GetPictrueRealSize(300), HdlControlLogic.Current.GetPictrueRealSize(63), false);
            this.btnStatu = new NormalViewControl(HdlControlLogic.Current.GetPictrueRealSize(400), HdlControlLogic.Current.GetPictrueRealSize(63), false);
            btnStatu.X = HdlControlLogic.Current.GetPictrueRealSize(46);
            btnStatu.Y = HdlControlLogic.Current.GetPictrueRealSize(236);
            btnStatu.TextColor = UserCenterColor.Current.TextColor1;
ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DevicePmSensorCardControl.cs
New file
@@ -0,0 +1,72 @@
using Shared.Phone.UserCenter;
using System;
using System.Collections.Generic;
using System.Text;
using ZigBee.Device;
namespace Shared.Phone.MainPage.Controls
{
    /// <summary>
    /// PM2.5卡片控件
    /// </summary>
    public class DevicePmSensorCardControl : DeviceCardCommon
    {
        #region ■ 初始化_____________________________
        /// <summary>
        /// 初始化控件
        /// </summary>
        /// <param name="i_device"></param>
        public override void InitControl(CommonDevice i_device, Common.Room i_nowSelectRoom)
        {
            base.InitControl(i_device, i_nowSelectRoom);
            //添加跳转深度卡片信息事件
            this.AddDetailInfoEvent(i_device);
        }
        #endregion
        #region ■ 深度卡片信息_______________________
        /// <summary>
        /// 添加跳转深度卡片信息事件
        /// </summary>
        private void AddDetailInfoEvent(CommonDevice i_device)
        {
            //深度卡片信息
            this.ButtonClickEvent += (sender, e) =>
            {
                Common.CommonPage.Instance.IsDrawerLockMode = true;
                //PM2.5传感器类型的深度卡片界面
                var form = new ControlForm.DevicePmSensorDetailCardForm();
                form.RowOrCardControl = this;
                form.AddForm(i_device, this.nowSelectRoom, 965, 1374);
                form.FormCloseEvent += this.CardDetailInfoBackEvent;
            };
        }
        #endregion
        #region ■ 发送获取状态命令___________________
        /// <summary>
        /// 发送获取状态命令
        /// </summary>
        public override void SendStatuComand()
        {
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                //如果住宅为虚拟住宅,则此功能无效
                return;
            }
            //检测能否发送获取状态命令
            if (this.CheckCanSendStatuComand() == true)
            {
                HdlDeviceAttributeLogic.Current.SendPmSensorComand(this.device);
            }
        }
        #endregion
    }
}
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -628,6 +628,11 @@
                    {
                        cardContr = new Controls.DeviceFreshAirCardControl();
                    }
                    // PM2.5
                    else if (device.Type == DeviceType.PMSensor)
                    {
                        cardContr = new Controls.DevicePmSensorCardControl();
                    }
                    //彩灯(调光器)
                    else if (device.Type == DeviceType.DimmableLight)
                    {
@@ -1068,13 +1073,15 @@
                this.ShowProgressBar();
                //切换住宅
                HdlResidenceLogic.Current.SwitchResidence(home.Id);
                var result = HdlResidenceLogic.Current.SwitchResidence(home.Id);
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //刷新界面
                    this.ShowForm();
                    if (result == true)
                    {
                        //刷新界面
                        this.ShowForm();
                    }
                    this.CloseProgressBar();
                });
            });
ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
@@ -338,7 +338,7 @@
            if (Android.OS.BuildVersionCodes.M < Android.OS.Build.VERSION.SdkInt)
            {
                //参数1 上下文, 参数2 Provider主机地址 和配置文件中保持一致   参数3  共享的文件
                var apkUri = Android.Support.V4.Content.FileProvider.GetUriForFile(context, "com.hdl.home.fileProvider", file);
                var apkUri = Android.Support.V4.Content.FileProvider.GetUriForFile(context, "com.evoyo.home.fileProvider", file);
                //添加这一句表示对目标应用临时授权该Uri所代表的文件
                intent.AddFlags(Android.Content.ActivityFlags.GrantReadUriPermission);
                intent.SetDataAndType(apkUri, "application/vnd.android.package-archive");
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
@@ -1312,6 +1312,10 @@
        /// 是否将SocketReceive的数据写入到Log中 1->写入
        /// </summary>
        public int WriteSocketReceiveDataToFile = 0;
        /// <summary>
        /// 是否开启调试App功能 1->开启
        /// </summary>
        public int StartDebugApp = 0;
    }
    #endregion
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
@@ -242,6 +242,7 @@
            List<string> listAllFile = null;
            //文件夹的全路径
            string fullDir = string.Empty;
            string localTemplateName = string.Empty;
            if (upPath == string.Empty)
            {
                //将模板数据保存到到指定的文件夹中
@@ -249,7 +250,8 @@
                var templateFile = TemplateData.TemplateCommonLogic.Current.SaveTemplateDataToFile(templateName, "HomeTemplate");
                //将模板bin文件移动到备份文件夹中
                try { System.IO.File.Move(templateFile, System.IO.Path.Combine(Config.Instance.FullPath, templateName)); }
                localTemplateName = System.IO.Path.Combine(Config.Instance.FullPath, templateName);
                try { System.IO.File.Move(templateFile, localTemplateName); }
                catch (Exception ex) { HdlLogLogic.Current.WriteLog(ex, "移动模板失败"); }
                //获取本地文件
@@ -314,6 +316,11 @@
                    //允许按系统的返回键
                    Shared.Common.CommonPage.BackKeyCanClick = true;
                    UserCenterResourse.AccountOption.AppCanSignout = true;
                    if (localTemplateName != string.Empty)
                    {
                        //删除掉这个模板文件
                        HdlFileLogic.Current.DeleteFile(localTemplateName);
                    }
                    return false;
                }
                //整理数据
@@ -334,6 +341,11 @@
                    //允许按系统的返回键
                    Shared.Common.CommonPage.BackKeyCanClick = true;
                    UserCenterResourse.AccountOption.AppCanSignout = true;
                    if (localTemplateName != string.Empty)
                    {
                        //删除掉这个模板文件
                        HdlFileLogic.Current.DeleteFile(localTemplateName);
                    }
                    return false;
                }
                //设置进度值
@@ -351,6 +363,11 @@
                    //允许按系统的返回键
                    Shared.Common.CommonPage.BackKeyCanClick = true;
                    UserCenterResourse.AccountOption.AppCanSignout = true;
                    if (localTemplateName != string.Empty)
                    {
                        //删除掉这个模板文件
                        HdlFileLogic.Current.DeleteFile(localTemplateName);
                    }
                    return false;
                }
@@ -366,10 +383,21 @@
                    //允许按系统的返回键
                    Shared.Common.CommonPage.BackKeyCanClick = true;
                    UserCenterResourse.AccountOption.AppCanSignout = true;
                    if (localTemplateName != string.Empty)
                    {
                        //删除掉这个模板文件
                        HdlFileLogic.Current.DeleteFile(localTemplateName);
                    }
                    return false;
                }
                //设置进度值
                ProgressFormBar.Current.SetValue(i + 1 + listNormalFile.Count, listFileCount);
            }
            if (localTemplateName != string.Empty)
            {
                //删除掉这个模板文件
                HdlFileLogic.Current.DeleteFile(localTemplateName);
            }
            //进度条关闭
@@ -761,6 +789,12 @@
                //显示设备历史版本(Debug用)
                UserCenterResourse.HideOption.DeviceHistory = 1;
            }
            checkKeys = UserCenterLogic.EncryptPassword(UserCenterResourse.FileEncryptKey, DirNameResourse.StartDebugAppFile + UserCenterResourse.UserInfo.Account);
            if (listFile.Contains(checkKeys) == true)
            {
                //开启后台调试App功能(Debug用)
                UserCenterResourse.HideOption.StartDebugApp = 1;
            }
            //恢复
            IMessageCommon.Current.IgnoreError = false;
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceBindLogic.cs
@@ -192,6 +192,32 @@
            //修改缓存
            TemplateData.TemplateDeviceDataLogic.Current.AddDeviceBindList(addBindData, result.JsonData[0]);
            var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<BindObj.AddedDeviceBindResponseData>(result.ReceiptData);
            return new BindObj.AddedDeviceBindResponseAllData() { addedDeviceBindResponseData = tempData };
        }
        /// <summary>
        ///设备绑定【一对一 绑定,一个按键回路只能绑定一个设备】
        /// </summary>
        public BindObj.AddedDeviceBindResponseAllData AddDeviceSingleBindAsync(BindObj.AddBindData addBindData)
        {
            //如果当前住宅是虚拟住宅
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                return ModelData.DeviceModelDataLogic.Current.AddDeviceBindList(addBindData, "Bind/GetDeviceBind");
            }
            var device = Common.LocalDevice.Current.GetDevice(addBindData.DeviceAddr, addBindData.Epoint);
            //获取发送的命令字符
            var sendData = this.GetAddDeviceListBindCommandText(addBindData);
            //发送
            var result = HdlDeviceCommonLogic.Current.SendJobjectDataToGateway(device, "Bind/SetSingleBind", sendData, "Bind/SetSingleBind_Respon", 20);
            if (result.ErrorMsg != null || result.ErrorMsgDiv == 0)
            {
                return null;
            }
            //修改缓存
            TemplateData.TemplateDeviceDataLogic.Current.AddDeviceBindList(addBindData, result.JsonData[0]);
            var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<BindObj.AddedDeviceBindResponseData>(result.ReceiptData);
            return new BindObj.AddedDeviceBindResponseAllData() { addedDeviceBindResponseData = tempData };
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs
@@ -604,6 +604,48 @@
        }
        #endregion
        #region ■ 校正温度___________________________
        /// <summary>
        /// 校正温度
        /// </summary>
        /// <param name="device">设备对象</param>
        /// <param name="correctValue">校正温度值</param>
        /// <param name="direction">补偿方向0不补偿 1:正向;2:反向</param>
        /// <param name="type">0 温度  ;1 湿度</param>
        /// <returns></returns>
        public async Task<bool> CorrectTemperature(CommonDevice device, double correctValue, int direction = 0, int type = 0)
        {
            //借用它的函t
            var panel = new Panel();
            panel.DeviceAddr = device.DeviceAddr;
            panel.DeviceEpoint = 200;
            panel.CurrentGateWayId = device.CurrentGateWayId;
            var result = await panel.CorrectTemperature(correctValue, direction, type);
            panel = null;
            //共通错误检测
            string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
            if (error != null)
            {
                this.ShowErrorMsg(error);
                return false;
            }
            if (result == null || result.responseData == null)
            {
                //矫正温度失败
                string msg = Language.StringByID(R.MyInternationalizationString.DataCorrectionFailed);
                //拼接上【网关回复超时】的Msg
                msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result);
                this.ShowTipMsg(msg);
                return false;
            }
            return true;
        }
        #endregion
        #region ■ 节能模式___________________________
        /// <summary>
        /// 获取设备节能模式的配置状态(ui叫节能模式)
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -1525,7 +1525,7 @@
                    var tempWay = ZbGateway.GateWayList.Find(obj => (obj != null) && (obj.GwId == gateway.GwId));
                    if (tempWay == null)
                    {
                        ZbGateway.GateWayList.Add(tempWay);
                        ZbGateway.GateWayList.Add(gateway);
                    }
                }
            }
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs
@@ -96,7 +96,7 @@
        /// </summary>
        /// <param name="residenceId"></param>
        /// <returns></returns>
        public void SwitchResidence(string residenceId)
        public bool SwitchResidence(string residenceId)
        {
            //打开进度条
            ProgressBar.Show();
@@ -106,10 +106,12 @@
            Config.Instance.Home = this.GetHouseByHouseId(residenceId);
            Config.Instance.Save();
            //刷新个人中心的内存及线程
            UserCenterLogic.InitUserCenterMenmoryAndThread(false);
            bool result = UserCenterLogic.InitUserCenterMenmoryAndThread(false);
            //关闭进度条
            ProgressBar.Close();
            return result;
        }
        #endregion
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs
@@ -164,8 +164,8 @@
        /// 变更网络时的事件
        /// </summary>
        private string changedNetworkTime = string.Empty;
        /// <summary>
        /// 当前 wifi 的
        /// <summary>
        /// 当前 wifi 的
        /// </summary>
        private string oldSsid = string.Empty;
@@ -379,22 +379,22 @@
        /// <param name="value">0:没有网络 1:4G  2:wifi</param>
        public void NetworkStateChanged(int value)
        {
            if(Common.Config.Instance.HomeId==string.Empty)
            {
                //在登录界面不处理
                return;
            }
            if (Common.Config.Instance.HomeId == string.Empty)
            {
                //在登录界面不处理
                return;
            }
#if iOS
            var nowSsid = this.SSID;
            if (this.oldSsid == nowSsid)
            {
                //如果当前 wifi 的名字一样,则不处理
                return;
            if (this.oldSsid == nowSsid)
            {
                //如果当前 wifi 的名字一样,则不处理
                ZigBee.Common.Application.FindGateWaySocket.Start();
                return;
            }
            this.oldSsid = nowSsid;
            this.oldSsid = nowSsid;
#endif
            //没有网络
            //没有网络
            if (value == 0)
            {
                this.CanAccessHttp = false;
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -814,6 +814,16 @@
                    HdlGatewayLogic.Current.ResetComandToBindBackupGateway();
                    //读取隐匿配置
                    HdlBackupLogic.Current.LoadHideOption();
                    //调试:强制开启后台调试App功能
                    if (UserCenterResourse.HideOption.StartDebugApp == 1)
                    {
                        HdlThreadLogic.Current.RunMain(() =>
                        {
                            var form = new HideOption.HideOptionMainForm();
                            form.AddForm();
                        });
                        return false;
                    }
                }
                //关闭所有接收
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
@@ -242,6 +242,13 @@
            get { return System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, "e509ddd21100cb994f509fb28c2e4dd6"); }
        }
        /// <summary>
        /// 系统出现异常的debugLog【文件】
        /// </summary>
        public static string SystemLogFile
        {
            get { return System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, "31c39877f9e6a6f2950d571a7ad20400"); }
        }
        /// <summary>
        /// 存放生成发送给网关的各种模板数据的【文件夹】
        /// </summary>
        public static string CreatSendToGwTemplateDirectory
@@ -252,6 +259,13 @@
        /// 分享楼层的【文件名】
        /// </summary>
        public const string ShardFloorFile = "5f05f7a6f26c51d1b096dc777f6c02f2";
        /// <summary>
        /// 打开Gbs的判断【文件】(临时)
        /// </summary>
        public static string OpenGbsFile
        {
            get { return System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, "cd8f75492cb65ef0951442460336db62"); }
        }
        //------------------------以下为辅助文件------------------------
        /// <summary>
@@ -267,6 +281,10 @@
        /// </summary>
        public const string DeviceHistoryFile = "DeviceHistoryFile";
        /// <summary>
        /// 开启后台调试App功能的【标识文件】,不加密
        /// </summary>
        public const string StartDebugAppFile = "StartDebugAppFile";
        /// <summary>
        /// 功能备份的名字  这个东西不加密
        /// </summary>
        public const string OptionBackupName = "##Option##";
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
@@ -393,7 +393,7 @@
                    curentOldRoom = btnRoom;
                    curentOldRoomFrameLayout = btnRoomFrameLayout;
                }
                if (index == roomTempList.Count - 1 && index > 3)
                if (index == roomTempList.Count - 1 && index > 2)
                {
                    var btnRoomFrameLayoutEmpty = new FrameLayout
                    {
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
@@ -529,7 +529,7 @@
                    curentOldRoomFrameLayout = btnRoomFrameLayout;
                }
                if (index == roomTempList.Count - 1 && index > 3)
                if (index == roomTempList.Count - 1 && index > 2)
                {
                    var btnRoomFrameLayoutEmpty = new FrameLayout
                    {
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
@@ -37,6 +37,10 @@
            /// 空调目标
            /// </summary>
            AC = 5,
            /// <summary>
            /// 地暖目标
            /// </summary>
            Fh = 6,
        }
        #endregion
@@ -725,12 +729,8 @@
        {
            bool result = true;
            //获取设备类型的
            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
            if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
            {
                result = false;
            }
            if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment)
            var clu = device.OutClusterList.Find((obj) => obj.OutCluster == 514);
            if (clu != null)
            {
                result = false;
            }
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs
@@ -173,6 +173,66 @@
        }
        /// <summary>
        /// 调光灯和继电器特殊处理方法
        /// <param name="curBindType">当前类型 0:场景  1:开关  2:插座  3:灯光  4:遮阳 5:空调 6:新风</param>
        /// </summary>
        /// <returns></returns>
        public static void UpdateLightCount(int curBindType)
        {
            if (curBindType == 1 || curBindType == 2 || curBindType == 3)
            {
                curSwitchCount = 0;
                curSocketCount = 0;
                curLightFromRelayCount = 0;
                curLightCount = 0;
                foreach (var key in bindTargetsFromMutilfunctionPanelList.Keys)
                {
                    var bList = bindTargetsFromMutilfunctionPanelList[key];
                    foreach (var bDev in bList)
                    {
                        var device = LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                        if (device == null)
                        {
                            continue;
                        }
                        if (bDev.KeyEpoint >= 52 && bDev.KeyEpoint <= 61)
                        {
                            if (device != null)
                            {
                                if (device.DfunctionType == DeviceFunctionType.A开关)
                                {
                                    curSwitchCount++;
                                }
                                else if (device.DfunctionType == DeviceFunctionType.A插座)
                                {
                                    curSocketCount++;
                                }
                                else if (device.DfunctionType == DeviceFunctionType.A灯光)
                                {
                                    curLightFromRelayCount++;
                                }
                            }
                        }
                        if (bDev.KeyEpoint >= 22 && bDev.KeyEpoint <= 28)
                        {
                            if (device != null)
                            {
                                if (device.Type == DeviceType.DimmableLight && bDev.BindCluster == 8)
                                {
                                    curLightCount++;
                                }
                            }
                        }
                    }
                }
            }
        }
        /// <summary>
        /// 支持匹配的端点个数
        /// <param name="curBindType">当前类型 0:场景  1:开关  2:插座  3:灯光  4:遮阳 5:空调 6:新风</param>
        /// </summary>
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/PaneTargetsBaseForm.cs
@@ -14,7 +14,7 @@
        /// 构造函数
        /// </summary>
        /// <param name="device"></param>
        /// <param name="deviceBindType">1:新风;2:温度传感器;3:湿度传感器;4:PM2.5传感器;5:空调目标</param>
        /// <param name="deviceBindType">1:新风;2:温度传感器;3:湿度传感器;4:PM2.5传感器;5:空调目标,6:地暖目标【暂时没做,因为没有该设备,后期增加】</param>
        /// <param name="bindDev">绑定目标 </param>
        public PaneTargetsBaseForm(CommonDevice device, CommonDevice bindDev, DeviceBind.BindInfo.BindType deviceBindType)
        {
@@ -68,6 +68,7 @@
        /// 3:湿度传感器
        /// 4:PM2.5传感器
        /// 5:空调目标
        /// 6:地暖目标【暂时没做,因为没有该设备,后期增加】
        /// </summary>
        DeviceBind.BindInfo.BindType curDeviceBindType = 0;
        /// <summary>
@@ -131,6 +132,10 @@
        /// </summary>
        public Action<string> actionAcTarget = null;
        /// <summary>
        /// Fh绑定目标回调
        /// </summary>
        public Action<string> actionFhTarget = null;
        /// <summary>
        /// 是否能刷新
        /// </summary>
        private bool canFresh = false;
@@ -172,6 +177,9 @@
                    break;
                case DeviceBind.BindInfo.BindType.AC:
                    titleText = Language.StringByID(R.MyInternationalizationString.AcTargets);
                    break;
                case DeviceBind.BindInfo.BindType.Fh:
                    titleText = Language.StringByID(R.MyInternationalizationString.uFloorHeatingTarget);
                    break;
            }
            this.TopFrameLayout(this, titleText);
@@ -260,7 +268,7 @@
                TextAlignment = TextAlignment.CenterLeft,
            };
            bottomTipPicFrameLayout.AddChidren(btnTipText);
            bottomTipPicFrameLayout.Width = btnTipPicFrameLayout.Width + Application.GetMinReal(2) + btnTipText.GetTextWidth();
            bottomTipPicFrameLayout.Width = btnTipPicFrameLayout.Width + Application.GetMinReal(12) + btnTipText.GetTextWidth();
            bottomTipPicFrameLayout.Gravity = Gravity.CenterHorizontal;
            EventHandler<MouseEventArgs> eHandlerEmptyTargets = (sender, e) =>
@@ -389,7 +397,7 @@
                    }
                }
                if (index == roomTempList.Count - 1 && index > 3)
                if (index == roomTempList.Count - 1 && index > 2)
                {
                    var btnRoomFrameLayoutEmpty = new FrameLayout
                    {
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
@@ -377,7 +377,8 @@
                    }
                }
                else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir
                       || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
                       || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment
                       || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment)
                {
                    var listTemp = Common.LocalDevice.Current.GetPanelMatchEpointByMac(listDevice);
                    //展开模式时,扩大依据为:它有几个子控件
@@ -518,12 +519,6 @@
                var form = new DeviceAirConditioner.IndoorUnitSettionForm();
                form.AddForm((AC)device);
            }
            //环境面板
            else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment)
            {
                var form = new DeviceFunctionSettionForm();
                form.AddForm(device, true);
            }
            //新风面板
            else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
            {
@@ -531,7 +526,7 @@
                //干接点
                if (device.Type == DeviceType.FreshAir)
                {
                    var form = new DevicePanel.PanelFangyueFreshAirButtonSettionForm();
                    var form = new DevicePanel.PanelSettionWithSourceForm();
                    form.AddForm(device);
                }
                else
@@ -546,7 +541,7 @@
                if (device.Type == DeviceType.FreshAir || device.Type == DeviceType.Thermostat)
                {
                    var form = new DevicePanel.PanelSimpleEnvironmentButtonSettionForm();
                    var form = new DevicePanel.PanelSettionWithSourceForm();
                    form.AddForm(device);
                }
                else
@@ -555,7 +550,7 @@
                    form.AddForm(device, true);
                }
            }
            //简约环境面板的按键配置
            //简约多功能面板的按键配置
            else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
            {
                var form = new DeviceFunctionSettionForm();
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -602,7 +602,7 @@
            btnFunction.ButtonClickEvent += (sender, e) =>
            {
                //简约环境面板的按键配置
                var form = new DevicePanel.PanelSimpleEnvironmentButtonSettionForm();
                var form = new DevicePanel.PanelSettionWithSourceForm();
                form.AddForm(listNewDevice[0]);
            };
        }
@@ -643,16 +643,10 @@
                        var form = new DevicePanel.PanelFangyueButtonSettionForm();
                        form.AddForm(listNewDevice[0]);
                    }
                    else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment)
                    else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                    {
                        //方悦环境面板的按键配置
                        var form = new DevicePanel.PanelFangyueEnvironmentButtonSettionForm();
                        form.AddForm(listNewDevice[0]);
                    }
                    else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                    {
                        //方悦新风面板的按键配置
                        var form = new DevicePanel.PanelFangyueFreshAirButtonSettionForm();
                        //方悦环境面板的按键配置&方悦新风面板的按键配置
                        var form = new DevicePanel.PanelSettionWithSourceForm();
                        form.AddForm(listNewDevice[0]);
                    }
                    else
ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueEnvironmentDirectionForm.cs
@@ -46,7 +46,7 @@
            btnGreanLinght.TextAlignment = TextAlignment.Center;
            btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
            btnGreanLinght.TextSize = 10;
            btnGreanLinght.TextID = R.MyInternationalizationString.uPanelBackLightLighting;
            btnGreanLinght.TextID = R.MyInternationalizationString.uKeyIndicatorLightsUp;
            framePic.AddChidren(btnGreanLinght);
            //按住此按键
@@ -55,12 +55,13 @@
            btnPress.Y = this.GetPictrueRealSize(584);
            btnPress.TextColor = UserCenterColor.Current.TextGrayColor3;
            btnPress.TextSize = 10;
            btnPress.TextID = R.MyInternationalizationString.uKeyIndicatorLightsUp;
            btnPress.TextID = R.MyInternationalizationString.uPressAndHoldThisKey;
            framePic.AddChidren(btnPress);
            //按住面板功能(function)按键,所有按键
            //指示灯亮起,则配网成功
            string[] msgArry = Language.StringByID(R.MyInternationalizationString.uAddFangyueEnvironmentPanelMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
            //按住面板功能按键5秒,绿色指示灯闪烁
            //进入配网状态;闪烁停止
            //指示灯变白色表示配网成功
            string[] msgArry = Language.StringByID(R.MyInternationalizationString.AddFreshAirPanelMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
            var msg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
            msg1.Y = Application.GetRealHeight(1037);
@@ -68,6 +69,7 @@
            msg1.TextColor = UserCenterColor.Current.TextGrayColor3;
            msg1.TextAlignment = TextAlignment.Center;
            bodyFrameLayout.AddChidren(msg1);
            var msg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
            msg2.Y = msg1.Bottom;
            if (msgArry.Length > 1)
@@ -77,6 +79,16 @@
            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
            msg2.TextAlignment = TextAlignment.Center;
            bodyFrameLayout.AddChidren(msg2);
            var msg3 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
            msg3.Y = msg2.Bottom;
            if (msgArry.Length > 2)
            {
                msg3.Text = msgArry[2];
            }
            msg3.TextColor = UserCenterColor.Current.TextGrayColor3;
            msg3.TextAlignment = TextAlignment.Center;
            bodyFrameLayout.AddChidren(msg3);
        }
        #endregion
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/DataCorrectionForm.cs
New file
@@ -0,0 +1,347 @@
using Shared.Common;
using ZigBee.Device;
namespace Shared.Phone.UserCenter.DevicePanel
{
    public class DataCorrectionForm : EditorCommonForm
    {
        #region ■ 变量声明___________________________
        /// <summary>
        /// 面板的回路
        /// </summary>
        private CommonDevice device;
        /// <summary>
        /// 保存完成按钮
        /// </summary>
        Button btnFinifh;
        /// <summary>
        /// 校正温度值
        /// </summary>
        double correctTValue = 0;
        /// <summary>
        /// 校正湿度值
        /// </summary>
        double correctHValue = 0;
        #endregion
        #region ■ 初始化____________________________
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        /// <param name="i_device">设备的某一回路</param>
        public void ShowForm(CommonDevice device)
        {
            this.device = device;
            //设置头部信息
            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.DataCorrection));
            //初始化中部信息
            this.InitMiddleFrame();
        }
        /// <summary>
        /// 初始化中部信息
        /// </summary>
        private async void InitMiddleFrame()
        {
            //清空bodyFrame
            this.ClearBodyFrame();
            TemperatureDataUI();
            TipUI();
        }
        #endregion
        #region ■ 温度设置_______________________
        /// <summary>
        ///  温度设置
        /// </summary>
        private void TemperatureDataUI()
        {
            var listview = new VerticalScrolViewLayout();
            listview.Height = Application.GetRealHeight(320);
            bodyFrameLayout.AddChidren(listview);
            listview.ScrollEnabled = false;
            for (int i = 0; i < 2; i++)
            {
                var rowLayout = new FrameLayout()
                {
                    Height = Application.GetRealHeight(23 + 127),
                    BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                };
                listview.AddChidren(rowLayout);
                var devicePic = new Button()
                {
                    X = Application.GetRealWidth(58),
                    Y = Application.GetRealHeight(46),
                    Width = Application.GetMinRealAverage(81),
                    Height = Application.GetMinRealAverage(81),
                };
                rowLayout.AddChidren(devicePic);
                var btnName = new Button()
                {
                    Width = Application.GetRealWidth(790),
                    X = devicePic.Right + Application.GetRealWidth(20),
                    TextColor = Shared.Common.ZigbeeColor.Current.TextBlack,
                    TextAlignment = TextAlignment.CenterLeft,
                    TextSize = 15,
                };
                rowLayout.AddChidren(btnName);
                var tframeLayout = new FrameLayout()
                {
                    X = Application.GetRealWidth(714 - 29),
                    Y = Application.GetRealHeight(35),
                    Width = Application.GetMinRealAverage(118 + 98 * 2),
                    Height = Application.GetMinRealAverage(81),
                    BackgroundImagePath = "BindPic/CorrectTemperatureBackGround.png",
                };
                rowLayout.AddChidren(tframeLayout);
                var btnReduction = new Button()
                {
                    Width = Application.GetMinRealAverage(98),
                    Height = Application.GetMinRealAverage(81),
                };
                tframeLayout.AddChidren(btnReduction);
                var btnNum = new EditText()
                {
                    Width = Application.GetMinReal(115),
                    Height = Application.GetRealHeight(80),
                    X = Application.GetRealWidth(98),
                    Text = "0",
                    PlaceholderTextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                    TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                    TextSize = 20,
                    TextAlignment = TextAlignment.Center,
                };
                tframeLayout.AddChidren(btnNum);
                var btnAdd = new Button()
                {
                    X = Application.GetRealWidth(98 + 118),
                    Width = Application.GetMinRealAverage(98),
                    Height = Application.GetMinRealAverage(81),
                };
                tframeLayout.AddChidren(btnAdd);
                var line2 = new Button()
                {
                    Y = rowLayout.Height - 1,
                    X = devicePic.Right + Application.GetRealWidth(20),
                    Width = Application.GetRealWidth(965 - 116),
                    Height = 1,
                    BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
                };
                rowLayout.AddChidren(line2);
                int curIndex = i;
                if (curIndex == 0)
                {
                    devicePic.UnSelectedImagePath = "Device/SensorTemperature.png";
                    btnName.Text = Language.StringByID(R.MyInternationalizationString.Temperature) + "  (℃)";
                }
                else
                {
                    line2.Visible = false;
                    devicePic.UnSelectedImagePath = "Device/SensorHumidity.png";
                    btnName.Text = Language.StringByID(R.MyInternationalizationString.Humidity) + "  (%)";
                }
                btnNum.TextChangeEventHandler += (sender, e) =>
                {
                    if (!string.IsNullOrEmpty((sender as EditText).Text))
                    {
                        var curText = (sender as EditText).Text;
                        var textFir = curText.Substring(0, 1);
                        double curV;
                        var res = double.TryParse(curText, out curV);
                        if (!res)
                        {
                            if (textFir != "-")
                            {
                                curV = 0D;
                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NumTip), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                return;
                            }
                        }
                        if (curIndex == 0)
                        {
                            correctTValue = curV;
                        }
                        else
                        {
                            correctHValue = curV;
                        }
                    }
                };
                btnReduction.MouseDownEventHandler += async (sender, e) =>
                {
                    double vTemp = double.Parse(btnNum.Text);
                    vTemp -= 0.1;
                    btnNum.Text = vTemp.ToString();
                    if (curIndex == 0)
                    {
                        correctTValue = double.Parse(btnNum.Text);
                    }
                    else
                    {
                        correctHValue = double.Parse(btnNum.Text);
                    }
                };
                btnAdd.MouseDownEventHandler += async (sender, e) =>
                {
                    double vTemp = double.Parse(btnNum.Text);
                    vTemp += 0.1;
                    btnNum.Text = vTemp.ToString();
                    if (curIndex == 0)
                    {
                        correctTValue = double.Parse(btnNum.Text);
                    }
                    else
                    {
                        correctHValue = double.Parse(btnNum.Text);
                    }
                };
            }
        }
        #endregion
        #region ■ 底部提示_______________________
        /// <summary>
        ///  底部提示
        /// </summary>
        private void TipUI()
        {
            var bottomFrameLayout = new FrameLayout()
            {
                Y = Application.GetRealHeight(1426),
                Height = Application.GetMinRealAverage(58),
            };
            bodyFrameLayout.AddChidren(bottomFrameLayout);
            var temperatureAttentionPic = new Button()
            {
                Width = Application.GetMinRealAverage(58),
                Height = Application.GetMinRealAverage(58),
                UnSelectedImagePath = "BindPic/TemperaTureAttention.png"
            };
            bottomFrameLayout.AddChidren(temperatureAttentionPic);
            var btnText = new Button()
            {
                Width = Application.GetRealWidth(790),
                X = Application.GetRealWidth(56),
                TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = 12,
                Text = Language.StringByID(R.MyInternationalizationString.DataCorrectionTip),
            };
            bottomFrameLayout.AddChidren(btnText);
            btnFinifh = new Button()
            {
                Width = Application.GetRealWidth(907),
                Height = Application.GetRealHeight(127),
                Y = Application.GetRealHeight(1426 + 58 + 12),
                Gravity = Gravity.CenterHorizontal,
                Radius = (uint)Application.GetRealHeight(127) / 2,
                TextID = R.MyInternationalizationString.Save,
                BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                TextColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                IsBold = true,
                TextSize = 16,
            };
            bodyFrameLayout.AddChidren(btnFinifh);
            btnFinifh.MouseUpEventHandler += (sender, e) =>
            {
                SaveTarget();
            };
            bottomFrameLayout.Width = temperatureAttentionPic.Width + Application.GetRealWidth(10) + btnText.GetTextWidth();
            bottomFrameLayout.Gravity = Gravity.CenterHorizontal;
        }
        #endregion
        #region ■ 保存_______________________
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="curControlDev"></param>
        void SaveTarget()
        {
            System.Threading.Tasks.Task.Run(async () =>
            {
                try
                {
                    Application.RunOnMainThread(() =>
                    {
                        CommonPage.Loading.Start();
                    });
                    this.ShowProgressBar();
                    bool result = false;
                    int direction = 0;
                    double sendValue = 0;
                    //温度
                    sendValue = correctTValue;
                    if (correctTValue > 0)
                    {
                        direction = 1;
                    }
                    else if (correctTValue < 0)
                    {
                        direction = 2;
                        sendValue = System.Math.Abs(correctTValue);
                    }
                    result = await HdlDevicePanelLogic.Current.CorrectTemperature(device, sendValue, direction, 0);
                    if (result == false)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            CommonPage.Loading.Hide();
                        });
                        return;
                    }
                    //湿度
                    direction = 0;
                    sendValue = correctHValue;
                    if (correctHValue > 0)
                    {
                        direction = 1;
                    }
                    else if (correctHValue < 0)
                    {
                        direction = 2;
                        sendValue = (-1) * correctHValue;
                    }
                    result = await HdlDevicePanelLogic.Current.CorrectTemperature(device, sendValue, direction, 1);
                    if (result == false)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            CommonPage.Loading.Hide();
                        });
                        return;
                    }
                    Application.RunOnMainThread(() =>
                    {
                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetSuccessXm), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                        CommonPage.Loading.Hide();
                    });
                }
                catch { }
            });
        }
        #endregion
    }
}
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueEnvironmentButtonSettionForm.cs
File was deleted
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueEnvironmentLightSettionForm.cs
File was deleted
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
File was deleted
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
File was deleted
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSettionWithSourceForm.cs
New file
@@ -0,0 +1,854 @@
using System;
using System.Collections.Generic;
using Shared.Common;
using Shared.Phone.UserCenter.Device.Bind;
using Shared.Phone.UserCenter.DeviceBind;
using ZigBee.Common;
using ZigBee.Device;
namespace Shared.Phone.UserCenter.DevicePanel
{
    /// <summary>
    /// 面板的按键配置【带有绑定源】的界面
    /// </summary>
    public class PanelSettionWithSourceForm : EditorCommonForm
    {
        #region ■ 变量声明___________________________
        /// <summary>
        /// 列表控件
        /// </summary>
        private FrameListControl listview = null;
        /// <summary>
        /// 设备的某一回路
        /// </summary>
        private CommonDevice deviceObj = null;
        /// <summary>
        /// Ac目标名字
        /// </summary>
        private string bindAcName = string.Empty;
        /// <summary>
        /// 地暖目标名字
        /// </summary>
        private string bindFhName = string.Empty;
        /// <summary>
        /// 新风目标名字
        /// </summary>
        private string bindFreshAirName = string.Empty;
        /// <summary>
        /// 温度目标名字
        /// </summary>
        private string bindTemperatureName = string.Empty;
        /// <summary>
        /// 湿度目标名字
        /// </summary>
        private string bindHumidityName = string.Empty;
        /// <summary>
        /// PM目标名字
        /// </summary>
        private string bindPmName = string.Empty;
        /// <summary>
        /// 被绑目标是空调
        /// </summary>
        private CommonDevice bindAcDev;
        /// <summary>
        /// 被绑目标是地暖
        /// </summary>
        private CommonDevice bindFhDev;
        /// <summary>
        /// 被绑目标是新风
        /// </summary>
        private CommonDevice bindFreshAirDev;
        /// <summary>
        /// 被绑目标是温度
        /// </summary>
        private CommonDevice bindTemperatureDev;
        /// <summary>
        /// 被绑目标是湿度
        /// </summary>
        private CommonDevice bindHumidityDev;
        /// <summary>
        /// 被绑目标是PM2.5
        /// </summary>
        private CommonDevice bindPMDev;
        // <summary>
        /// 按键中被绑定的目标列表
        /// </summary>
        public List<BindObj.BindListResponseObj> bindList = new List<BindObj.BindListResponseObj>();
        #endregion
        #region ■ 初始化_____________________________
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        /// <param name="i_device">设备的某一回路</param>
        public void ShowForm(CommonDevice i_device)
        {
            this.deviceObj = i_device;
            //获取数据
            InitInfo(deviceObj);
            //设置头部信息
            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uPanelSettion));
            //初始化中部信息
            this.InitMiddleFrame();
            //初始化右上角菜单
            this.InitTopRightMenu();
        }
        /// <summary>
        /// 初始化中部信息
        /// </summary>
        private void InitMiddleFrame()
        {
            //清空bodyFrame
            this.ClearBodyFrame();
            var listBackControl = new VerticalFrameControl();
            listBackControl.Height = bodyFrameLayout.Height;
            bodyFrameLayout.AddChidren(listBackControl);
            //图片
            var btnPic = new PicViewControl(426, 426);
            btnPic.Y = Application.GetRealHeight(150);
            btnPic.Gravity = Gravity.CenterHorizontal;
            listBackControl.frameTable.AddChidren(btnPic);
            //获取设备类型的
            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
            if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment)
            {
                btnPic.UnSelectedImagePath = "DeviceItem/ButtonPanelFangyueEnvironmentBigPic.png";
            }
            else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
            {
                btnPic.UnSelectedImagePath = "RealDevice/ButtonPanelSimpleEnvironment.png";
            }
            else
            {
                btnPic.UnSelectedImagePath = "RealDevice/ButtonPanelFangyueFreshAir.png";
            }
            //初始化桌布
            var tableContr = new InformationEditorControl();
            this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1028);
            //初始化菜单行
            this.InitMenuRow();
            //初始化桌布完成
            tableContr.FinishInitControl();
            tableContr = null;
            //保存
            var btnFinish = new BottomClickButton();
            btnFinish.TextID = R.MyInternationalizationString.uSave;
            bodyFrameLayout.AddChidren(btnFinish);
            btnFinish.ButtonClickEvent += (sender, e) =>
            {
                //关闭自身
                this.CloseForm();
            };
        }
        /// <summary>
        /// 初始化菜单行
        /// </summary>
        private void InitMenuRow()
        {
            this.listview.RemoveAll();
            //添加Ac目标
            this.AddAcRow();
            //添加新风目标
            this.AddFreshAirRow();
            //PM2.5来源
            this.AddPMRow();
            //添加温度来源
            this.AddTemperatureSensorRow();
            //添加湿度来源
            this.AddHumiditySourceRow();
            //亮度调节
            this.DataCorrectionRow();
            //亮度调节
            this.AddLevelRow();
        }
        #endregion
        #region ■ 数据处理_________________________
        /// <summary>
        /// 初始化数据
        /// </summary>
        void InitInfo(CommonDevice curControlDev)
        {
            System.Threading.Tasks.Task.Run(async () =>
            {
                try
                {
                    Application.RunOnMainThread(() =>
                    {
                        CommonPage.Loading.Start("");
                    });
                    //获取设备类型的
                    var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
                    bool result = false;
                    if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                    {
                        result = await GetBindName(curControlDev);
                    }
                    if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueEnvironment
                        || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment)
                    {
                        result = await GetEnvironmentBindName(curControlDev);
                    }
                    if (!result)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5007" + ")", Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                        });
                    }
                }
                catch (Exception ex)
                {
                    var mess = ex.Message;
                }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        this.InitMenuRow();
                        CommonPage.Loading.Hide();
                    });
                }
            });
        }
        /// <summary>
        /// 获取绑定目标
        /// </summary>
        /// <param name="curControlDev"></param>
        /// <returns></returns>
        private async System.Threading.Tasks.Task<bool> GetBindName(CommonDevice curDev)
        {
            bool result = false;
            //获取新风面板中存在的绑定目标
            FreshAir curControlDev = curDev as FreshAir;
            var panelBindListRes = HdlDeviceBindLogic.Current.GetDeviceBindAsync(curControlDev);
            if (panelBindListRes != null && panelBindListRes.getAllBindResponseData != null)
            {
                bindList = panelBindListRes.getAllBindResponseData.BindList;
                foreach (var bDev in bindList)
                {
                    var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                    if (device == null)
                    {
                        continue;
                    }
                    //获取设备类型的
                    var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                    if (device.Type == DeviceType.Thermostat)
                    {
                        //面板的空调设备,则不显示
                        if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                        {
                            continue;
                        }
                        if (string.IsNullOrEmpty(bDev.ESName))
                        {
                            bindAcName = Common.LocalDevice.Current.GetDeviceEpointName(device);
                        }
                        else
                        {
                            bindAcName = bDev.ESName;
                        }
                        bindAcDev = device;
                    }
                    else if (device.Type == DeviceType.FreshAir)
                    {
                        //面板的新风设备,则不显示
                        if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir
                            || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueEnvironment
                            || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment)
                        {
                            continue;
                        }
                        if (string.IsNullOrEmpty(bDev.ESName))
                        {
                            bindFreshAirName = Common.LocalDevice.Current.GetDeviceEpointName(device);
                        }
                        else
                        {
                            bindFreshAirName = bDev.ESName;
                        }
                        bindFreshAirDev = device;
                    }
                    else if (device.Type == DeviceType.TemperatureSensor)
                    {
                        var bD = device as TemperatureSensor;
                        if (bD.SensorDiv == 1)
                        {
                            if (string.IsNullOrEmpty(bDev.ESName))
                            {
                                bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device);
                            }
                            else
                            {
                                bindTemperatureName = bDev.ESName;
                            }
                            bindTemperatureDev = device;
                        }
                        if (bD.SensorDiv == 2)
                        {
                            if (string.IsNullOrEmpty(bDev.ESName))
                            {
                                bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
                            }
                            else
                            {
                                bindHumidityName = bDev.ESName;
                            }
                            bindHumidityDev = device;
                        }
                    }
                    else if (device.Type == DeviceType.FreshAirHumiditySensor)
                    {
                        if (string.IsNullOrEmpty(bDev.ESName))
                        {
                            bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
                        }
                        else
                        {
                            bindHumidityName = bDev.ESName;
                        }
                        bindHumidityDev = device;
                    }
                    else if (device.Type == DeviceType.PMSensor)
                    {
                        if (bDev.BindCluster == 1026)
                        {
                            bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
                            bindTemperatureDev = device;
                        }
                        if (bDev.BindCluster == 1029)
                        {
                            bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor);
                            bindHumidityDev = device;
                        }
                        if (bDev.BindCluster == 1066)
                        {
                            if (string.IsNullOrEmpty(bDev.ESName))
                            {
                                bindPmName = Common.LocalDevice.Current.GetDeviceEpointName(device);
                            }
                            else
                            {
                                bindPmName = bDev.ESName;
                            }
                            bindPMDev = device;
                        }
                    }
                }
                result = true;
            }
            return result;
        }
        /// <summary>
        /// 获取环境面板绑定目标
        /// </summary>
        /// <param name="curControlDev"></param>
        /// <returns></returns>
        private async System.Threading.Tasks.Task<bool> GetEnvironmentBindName(CommonDevice curDev)
        {
            bool result = false;
            //获取面板中存在的绑定目标
            var curControlDev = new CommonDevice();
            curControlDev.DeviceAddr = curDev.DeviceAddr;
            curControlDev.CurrentGateWayId = curDev.CurrentGateWayId;
            curControlDev.Type = curDev.Type;
            int count = 0;
            for (int i = 1; i < 3; i++)
            {
                curControlDev.DeviceEpoint = i;
                var panelBindListRes = HdlDeviceBindLogic.Current.GetDeviceBindAsync(curControlDev);
                if (panelBindListRes != null && panelBindListRes.getAllBindResponseData != null)
                {
                    bindList = panelBindListRes.getAllBindResponseData.BindList;
                    foreach (var bDev in bindList)
                    {
                        var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                        if (device == null)
                        {
                            continue;
                        }
                        //获取设备类型的
                        var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                        if (device.Type == DeviceType.Thermostat)
                        {
                            //面板的空调设备,则不显示
                            if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir
                                || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueEnvironment
                                || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment)
                            {
                                continue;
                            }
                            if (string.IsNullOrEmpty(bDev.ESName))
                            {
                                bindAcName = Common.LocalDevice.Current.GetDeviceEpointName(device);
                            }
                            else
                            {
                                bindAcName = bDev.ESName;
                            }
                            bindAcDev = device;
                        }
                        else if (device.Type == DeviceType.FreshAir)
                        {
                            //面板的新风设备,则不显示
                            if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir
                                || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueEnvironment
                            || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment)
                            {
                                continue;
                            }
                            if (string.IsNullOrEmpty(bDev.ESName))
                            {
                                bindFreshAirName = Common.LocalDevice.Current.GetDeviceEpointName(device);
                            }
                            else
                            {
                                bindFreshAirName = bDev.ESName;
                            }
                            bindFreshAirDev = device;
                        }
                        else if (device.Type == DeviceType.TemperatureSensor)
                        {
                            var bD = device as TemperatureSensor;
                            if (bD.SensorDiv == 1)
                            {
                                if (string.IsNullOrEmpty(bDev.ESName))
                                {
                                    bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device);
                                }
                                else
                                {
                                    bindTemperatureName = bDev.ESName;
                                }
                                bindTemperatureDev = device;
                            }
                            if (bD.SensorDiv == 2)
                            {
                                if (string.IsNullOrEmpty(bDev.ESName))
                                {
                                    bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
                                }
                                else
                                {
                                    bindHumidityName = bDev.ESName;
                                }
                                bindHumidityDev = device;
                            }
                        }
                        else if (device.Type == DeviceType.FreshAirHumiditySensor)
                        {
                            if (string.IsNullOrEmpty(bDev.ESName))
                            {
                                bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
                            }
                            else
                            {
                                bindHumidityName = bDev.ESName;
                            }
                            bindHumidityDev = device;
                        }
                        else if (device.Type == DeviceType.Thermostat)
                        {
                            if (string.IsNullOrEmpty(bDev.ESName))
                            {
                                bindAcName = Common.LocalDevice.Current.GetDeviceEpointName(device);
                            }
                            else
                            {
                                bindAcName = bDev.ESName;
                            }
                            bindAcDev = device;
                        }
                        else if (device.Type == DeviceType.PMSensor)
                        {
                            if (bDev.BindCluster == 1026)
                            {
                                bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
                                bindTemperatureDev = device;
                            }
                            if (bDev.BindCluster == 1029)
                            {
                                bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor);
                                bindHumidityDev = device;
                            }
                        }
                    }
                    count++;
                    if (count == 2)
                    {
                        result = true;
                    }
                }
            }
            return result;
        }
        #endregion
        #region ■ Ac来源_________________________
        /// <summary>
        ///  Ac来源行
        /// </summary>
        private void AddAcRow()
        {
            //获取设备类型的
            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
            if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
            {
                return;
            }
            //Ac
            var rowAc = new FrameRowControl(listview.rowSpace / 2);
            listview.AddChidren(rowAc);
            rowAc.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.AcTargets), 600);
            //底线
            rowAc.AddBottomLine();
            //右箭头
            rowAc.AddRightArrow();
            var msg = Language.StringByID(R.MyInternationalizationString.nothing);
            if (!string.IsNullOrEmpty(bindAcName))
            {
                msg = bindAcName;
            }
            var btnAcStatu = rowAc.AddMostRightView(msg, 700);
            rowAc.ButtonClickEvent += (sender, e) =>
            {
                this.deviceObj.DeviceEpoint = 1;
                var paneTargetsBaseFormp = new PaneTargetsBaseForm(this.deviceObj, bindAcDev, DeviceBind.BindInfo.BindType.AC);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(paneTargetsBaseFormp);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                paneTargetsBaseFormp.Show();
                paneTargetsBaseFormp.actionAcTarget += (bindName) =>
                {
                    Application.RunOnMainThread(() =>
                    {
                        if (string.IsNullOrEmpty(bindName))
                        {
                            btnAcStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
                        }
                        else
                        {
                            btnAcStatu.Text = bindName;
                        }
                    });
                };
            };
        }
        #endregion
        #region ■ 新风目标_________________________
        /// <summary>
        ///  新风目标行
        /// </summary>
        private void AddFreshAirRow()
        {
            //新风目标
            var rowNewWind = new FrameRowControl(listview.rowSpace / 2);
            listview.AddChidren(rowNewWind);
            rowNewWind.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uNewWindTarget), 600);
            //底线
            rowNewWind.AddBottomLine();
            //右箭头
            rowNewWind.AddRightArrow();
            var msg = Language.StringByID(R.MyInternationalizationString.nothing);
            if (!string.IsNullOrEmpty(bindFreshAirName))
            {
                msg = bindFreshAirName;
            }
            var btnNewWindStatu = rowNewWind.AddMostRightView(msg, 700);
            rowNewWind.ButtonClickEvent += (sender, e) =>
            {
                //获取设备类型的
                var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
                if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                {
                    this.deviceObj.DeviceEpoint = 1;
                }
                else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
                {
                    this.deviceObj.DeviceEpoint = 2;
                }
                var paneTargetsBaseFormp = new PaneTargetsBaseForm(this.deviceObj, bindFreshAirDev, BindInfo.BindType.FreshAir);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(paneTargetsBaseFormp);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                paneTargetsBaseFormp.Show();
                paneTargetsBaseFormp.actionFreshAirTarget += (bindName) =>
                {
                    Application.RunOnMainThread(() =>
                    {
                        if (string.IsNullOrEmpty(bindName))
                        {
                            btnNewWindStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
                        }
                        else
                        {
                            btnNewWindStatu.Text = bindName;
                        }
                    });
                };
            };
        }
        #endregion
        #region ■ PM2.5来源_________________________
        /// <summary>
        ///  PM2.5来源行
        /// </summary>
        private void AddPMRow()
        {
            //获取设备类型的
            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
            if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
            {
                return;
            }
            //PM2.5
            var rowPM = new FrameRowControl(listview.rowSpace / 2);
            listview.AddChidren(rowPM);
            rowPM.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.PM25Source), 600);
            //底线
            rowPM.AddBottomLine();
            //右箭头
            rowPM.AddRightArrow();
            var msg = Language.StringByID(R.MyInternationalizationString.nothing);
            if (!string.IsNullOrEmpty(bindPmName))
            {
                msg = bindPmName;
            }
            var btnPMStatu = rowPM.AddMostRightView(msg, 700);
            rowPM.ButtonClickEvent += (sender, e) =>
            {
                this.deviceObj.DeviceEpoint = 1;
                var paneTargetsBaseFormp = new PaneTargetsBaseForm(this.deviceObj, bindPMDev, BindInfo.BindType.PM);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(paneTargetsBaseFormp);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                paneTargetsBaseFormp.Show();
                paneTargetsBaseFormp.actionPMTarget += (bindName) =>
                {
                    Application.RunOnMainThread(() =>
                    {
                        if (string.IsNullOrEmpty(bindName))
                        {
                            btnPMStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
                        }
                        else
                        {
                            btnPMStatu.Text = bindName;
                        }
                    });
                };
            };
        }
        #endregion
        #region ■ 温度来源_________________________
        /// <summary>
        ///  温度来源行
        /// </summary>
        private void AddTemperatureSensorRow()
        {
            //温度来源
            var rowTemPerature = new FrameRowControl(listview.rowSpace / 2);
            listview.AddChidren(rowTemPerature);
            rowTemPerature.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.TemperatureSource), 600);
            //底线
            rowTemPerature.AddBottomLine();
            //右箭头
            rowTemPerature.AddRightArrow();
            var msg = Language.StringByID(R.MyInternationalizationString.nothing);
            if (!string.IsNullOrEmpty(bindTemperatureName))
            {
                msg = bindTemperatureName;
            }
            var btnTemperatureStatu = rowTemPerature.AddMostRightView(msg, 700);
            rowTemPerature.ButtonClickEvent += (sender, e) =>
            {
                this.deviceObj.DeviceEpoint = 1;
                var paneTargetsBaseFormp = new PaneTargetsBaseForm(this.deviceObj, bindTemperatureDev, BindInfo.BindType.Temperature);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(paneTargetsBaseFormp);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                paneTargetsBaseFormp.Show();
                paneTargetsBaseFormp.actionTemperatureTarget += (bindName) =>
                {
                    Application.RunOnMainThread(() =>
                    {
                        if (string.IsNullOrEmpty(bindName))
                        {
                            btnTemperatureStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
                        }
                        else
                        {
                            btnTemperatureStatu.Text = bindName;
                        }
                    });
                };
            };
        }
        #endregion
        #region ■ 湿度来源_________________________
        /// <summary>
        ///  湿度来源行
        /// </summary>
        private void AddHumiditySourceRow()
        {
            //湿度
            var rowHumidity = new FrameRowControl(listview.rowSpace / 2);
            listview.AddChidren(rowHumidity);
            rowHumidity.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.HumiditySource), 600);
            //底线
            rowHumidity.AddBottomLine();
            //右箭头
            rowHumidity.AddRightArrow();
            var msg = Language.StringByID(R.MyInternationalizationString.nothing);
            if (!string.IsNullOrEmpty(bindHumidityName))
            {
                msg = bindHumidityName;
            }
            var btnHumidityStatu = rowHumidity.AddMostRightView(msg, 700);
            rowHumidity.ButtonClickEvent += (sender, e) =>
            {
                this.deviceObj.DeviceEpoint = 1;
                var paneTargetsBaseFormp = new PaneTargetsBaseForm(this.deviceObj, bindHumidityDev, BindInfo.BindType.Humidity);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(paneTargetsBaseFormp);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                paneTargetsBaseFormp.Show();
                paneTargetsBaseFormp.actionHumidityTarget += (bindName) =>
                {
                    Application.RunOnMainThread(() =>
                    {
                        if (string.IsNullOrEmpty(bindName))
                        {
                            btnHumidityStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
                        }
                        else
                        {
                            btnHumidityStatu.Text = bindName;
                        }
                    });
                };
            };
        }
        #endregion
        #region ■ 亮度调节_________________________
        /// <summary>
        ///  亮度调节行
        /// </summary>
        private void AddLevelRow()
        {
            //亮度调节
            var rowLight = new FrameRowControl(listview.rowSpace / 2);
            listview.AddChidren(rowLight);
            rowLight.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uLightRegulation), 600);
            //底线
            rowLight.AddBottomLine();
            //右箭头
            rowLight.AddRightArrow();
            rowLight.ButtonClickEvent += (sender, e) =>
            {
                var form = new PanelBrightnessAdjustForm();
                form.AddForm(this.deviceObj);
            };
        }
        #endregion
        #region ■ 数据矫正_________________________
        /// <summary>
        ///  数据矫正行
        /// </summary>
        private void DataCorrectionRow()
        {
            //数据矫正
            var rowLight = new FrameRowControl(listview.rowSpace / 2);
            listview.AddChidren(rowLight);
            rowLight.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.DataCorrection), 600);
            //底线
            rowLight.AddBottomLine();
            //右箭头
            rowLight.AddRightArrow();
            rowLight.ButtonClickEvent += (sender, e) =>
            {
                var form = new DataCorrectionForm();
                form.AddForm(this.deviceObj);
            };
        }
        #endregion
        #region ■ 右上角菜单_________________________
        /// <summary>
        /// 初始化右上角菜单
        /// </summary>
        private void InitTopRightMenu()
        {
            //检测此回路是否拥有定位功能
            if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(deviceObj) == false)
            {
                return;
            }
            var btnIcon = new MostRightIconControl(69, 69);
            btnIcon.UnSelectedImagePath = "Item/More.png";
            topFrameLayout.AddChidren(btnIcon);
            btnIcon.InitControl();
            btnIcon.ButtonClickEvent += ((sender, e) =>
            {
                //显示右上角菜单界面
                this.ShowTopRightMenu();
            });
        }
        /// <summary>
        /// 显示右上角菜单界面
        /// </summary>
        private void ShowTopRightMenu()
        {
            var frame = new TopRightMenuControl(1, 1);
            //定位
            string deviceMenu = Language.StringByID(R.MyInternationalizationString.uFixedPosition);
            frame.AddRowMenu(deviceMenu, "Item/FixedPosition.png", "Item/FixedPositionSelected.png", () =>
            {
                //发送定位功能
                Common.LocalDevice.Current.SetFixedPositionCommand(deviceObj);
            });
        }
        #endregion
    }
}
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs
@@ -8,7 +8,7 @@
namespace Shared.Phone.UserCenter.DevicePanel
{
    /// <summary>
    /// 方悦新风面板的按键配置界面
    /// 面板的按键配置界面【该类暂时舍弃】
    /// </summary>
    public class PanelSimpleEnvironmentButtonSettionForm : EditorCommonForm
    {
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionAddTargetsForm.cs
@@ -354,7 +354,7 @@
                    }
                }
                if (index == roomTempList.Count - 1 && index > 3)
                if (index == roomTempList.Count - 1 && index > 2)
                {
                    var btnRoomFrameLayoutEmpty = new FrameLayout
                    {
@@ -838,13 +838,14 @@
                EventHandler<MouseEventArgs> hander = (sender, e) =>
                {
                    if (curSupportBindEpointList.Count == 0 || curSupportBindEpointList.Count == targetScList.Count)
                    btnChoose.IsSelected = !btnChoose.IsSelected;
                    if (curSupportBindEpointList.Count == 0)
                    {
                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFull), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                        return;
                    }
                    btnChoose.IsSelected = !btnChoose.IsSelected;
                    if (!btnChoose.IsSelected)
                    {
                        targetScList.Remove(scene);
@@ -901,6 +902,7 @@
                    //获取房间列表
                    supportRoomList = BindInfo.GetSupportRoomList();
                    //获取面板已经绑定的匹配类型的列表
                    curBindTypeList = MutilfunctionPanelMethod.GetMatchBindList(curBindType);
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionTargetsForm.cs
@@ -375,6 +375,24 @@
        {
            midVerticalScrolViewLayout.RemoveAll();
            curBindTypeList = MutilfunctionPanelMethod.GetMatchBindList(curBindType);
            //注意!同个按键端点如果支持绑定多种功能类型,需要注意如下处理
            //当更换设备功能类型后
            // 绑定的开关、插座、灯光所用的按键回路互相关联,所以这里重新获取将这三种类型的其他2种,为了获取正确的开关、插座、灯光绑定的个数
            switch (curBindType)
            {
                case 1:
                    MutilfunctionPanelMethod.GetMatchBindList(2);
                    MutilfunctionPanelMethod.GetMatchBindList(3);
                    break;
                case 2:
                    MutilfunctionPanelMethod.GetMatchBindList(1);
                    MutilfunctionPanelMethod.GetMatchBindList(3);
                    break;
                case 3:
                    MutilfunctionPanelMethod.GetMatchBindList(1);
                    MutilfunctionPanelMethod.GetMatchBindList(2);
                    break;
            }
            int curIndex = 0;
            for (int i = 0; i < curBindTypeList.Count; i++)
            {
ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs
@@ -42,6 +42,15 @@
            //初始化中部信息
            this.InitMiddleFrame();
            if (UserCenterResourse.HideOption.StartDebugApp == 1)
            {
                //开启调试时,不允许关闭这个界面
                this.BackButtonClickEvent += (sender) =>
                {
                    return;
                };
            }
        }
        /// <summary>
@@ -234,6 +243,61 @@
            btnTemp.TextAlignment = TextAlignment.Center;
            rowTemp.AddChidren(btnTemp);
            //开启调试功能
            if (UserCenterResourse.HideOption.StartDebugApp == 1)
            {
                row1 = new FrameRowControl(listView.rowSpace / 2);
                listView.AddChidren(row1);
                row1.AddLeftCaption("成员列表", 500);
                row1.AddRightArrow();
                row1.AddBottomLine();
                row1.ButtonClickEvent += (sender, e) =>
                {
                    var form = new Member.MemberListForm();
                    form.AddForm();
                };
                row1 = new FrameRowControl(listView.rowSpace / 2);
                listView.AddChidren(row1);
                row1.AddLeftCaption("备份列表", 500);
                row1.AddRightArrow();
                row1.AddBottomLine();
                row1.ButtonClickEvent += (sender, e) =>
                {
                    var form = new HdlBackup.HdlBackupListForm();
                    form.AddForm();
                };
            }
#if Android
            row1 = new FrameRowControl(listView.rowSpace / 2);
            row1.UseClickStatu = false;
            listView.AddChidren(row1);
            row1.AddLeftCaption("上报GBS定位功能", 500);
            row1.AddBottomLine();
            var btnGbsSwitch = row1.AddMostRightSwitchIcon();
            if (System.IO.File.Exists(DirNameResourse.OpenGbsFile) == true)
            {
                btnGbsSwitch.IsSelected = true;
            }
            btnGbsSwitch.ButtonClickEvent += (sender, e) =>
            {
                this.ShowMassage(ShowMsgType.Confirm, "注意:开启或者关闭此功能会重启App", () =>
                {
                    btnGbsSwitch.IsSelected = !btnGbsSwitch.IsSelected;
                    if (btnGbsSwitch.IsSelected == true)
                    {
                        HdlFileLogic.Current.SaveTextToFile(DirNameResourse.OpenGbsFile, "nmsl");
                    }
                    else
                    {
                        HdlFileLogic.Current.DeleteFile(DirNameResourse.OpenGbsFile);
                    }
                    HDLUtils.RestartApp();
                });
            };
#endif
            row1 = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(row1);
            row1.AddLeftCaption("重置导入标识", 500);
ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs
@@ -220,13 +220,16 @@
                            //检测本地有没有这个住宅
                            this.CheckIsExsitResidence(info);
                            HdlResidenceLogic.Current.SwitchResidence(info.Id);
                            var result = HdlResidenceLogic.Current.SwitchResidence(info.Id);
                            HdlThreadLogic.Current.RunMain(() =>
                            {
                                //重新刷新列表
                                this.listView.RemoveAll();
                                this.SetResidenceInfo(2);
                                if (result == true)
                                {
                                    //重新刷新列表
                                    this.listView.RemoveAll();
                                    this.SetResidenceInfo(2);
                                }
                                //关闭进度条
                                this.CloseProgressBar();
                            });
@@ -344,13 +347,16 @@
                    {
                        HdlThreadLogic.Current.RunThread(() =>
                        {
                            HdlResidenceLogic.Current.SwitchResidence(i_home.Id);
                            var result = HdlResidenceLogic.Current.SwitchResidence(i_home.Id);
                            HdlThreadLogic.Current.RunMain(() =>
                            {
                                //重新刷新列表
                                this.listView.RemoveAll();
                                this.SetResidenceInfo(3);
                                if (result == true)
                                {
                                    //重新刷新列表
                                    this.listView.RemoveAll();
                                    this.SetResidenceInfo(3);
                                }
                                //关闭进度条
                                this.CloseProgressBar();
                            });
ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
@@ -698,7 +698,12 @@
            Common.Config.Instance.Save();
            //刷新个人中心的内存及线程
            UserCenterLogic.InitUserCenterMenmoryAndThread(false);
            bool result2 = UserCenterLogic.InitUserCenterMenmoryAndThread(false);
            if (result2 == false)
            {
                //开启了调试功能
                return;
            }
            //删除住宅
            HdlResidenceLogic.Current.DeleteHouseMemmory(deleteId);
ZigbeeApp/Shared/Phone/UserCenter/Residence/TransferOfResidenceMainForm.cs
New file
@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shared.Phone.UserCenter.Residence
{
    /// <summary>
    /// 住宅过户的主界面
    /// </summary>
    public class TransferOfResidenceMainForm : EditorCommonForm
    {
        #region ■ 变量声明___________________________
        #endregion
        #region ■ 初始化_____________________________
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        public void ShowForm()
        {
            //设置头部信息
            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uTransferOfResidence));
            //初始化中部信息
            this.InitMiddleFrame();
        }
        /// <summary>
        /// 初始化中部信息
        /// </summary>
        private void InitMiddleFrame()
        {
            //清空bodyFrame
            this.ClearBodyFrame();
        }
        #endregion
        #region ■ 一般方法___________________________
        #endregion
    }
}
ZigbeeApp/Shared/Phone/UserView/HomePage.cs
@@ -53,7 +53,6 @@
            if (Config.Instance.IsLogin)
            {
                //显示启动页
                this.ShowLoginLoadView();
                CommonPage.Loading.Start();
                UserCenter.HdlThreadLogic.Current.RunThread(() =>
@@ -66,15 +65,19 @@
                    {
                        var homes = UserCenter.HdlResidenceLogic.Current.GetHomeListsFromDb(true);
                        //刷新个人中心的内存及线程
                        UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
                        bool result = UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
                        //启动ZigBee
                        ZigBee.Common.Application.Init();
                        UserCenter.HdlThreadLogic.Current.RunMain(() =>
                        {
                            CommonPage.Instance.RemoveViewByTag("Login");
                            UserPage.Instance.ReFreshControl();
                            CommonPage.Loading.Hide();
                            if (result == true)
                            {
                                //false:开启了调试功能
                                UserPage.Instance.ReFreshControl();
                            }
                        });
                    }
                    else
@@ -102,16 +105,6 @@
                Shared.Common.CommonPage.Instance.AddChidren(accountLogin);
                accountLogin.ShowForm();
            }
        }
        /// <summary>
        /// 显示启动页
        /// </summary>
        public void ShowLoginLoadView()
        {
            var loginLoad = new LoginLoading { };
            CommonPage.Instance.AddChidren(loginLoad);
            loginLoad.Show();
        }
        /// <summary>
ZigbeeApp/Shared/Phone/VideoPhone/ESVideo.cs
New file
@@ -0,0 +1,80 @@
using System;
namespace Shared.Phone.VideoPhone
{
    public static class ESVideo
    {
        public static void InitESVideoSDK()
        {
            //ESVideo.InitESVideoSDK();
        }
        /// <summary>
        /// 监控页面
        /// </summary>
        /// <param name="mESVideoInfo"></param>
        public static void ShowESVideoMonitor(ESVideoInfo mESVideoInfo)
        {
#if Android
            Android.Content.Intent intent = new Android.Content.Intent(Application.Activity, typeof(GateWay.Droid.VideoActivity));
            intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);//室外机的名称,例,室外机
            intent.PutExtra("ESRoomID", mESVideoInfo.ESRoomID);//当前用户的房间 ID
            intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);//室外机UUID,例:JJY000007FSEYX
            intent.PutExtra("IsCollect", mESVideoInfo.IsCollect);//是否收藏
            intent.PutExtra("RoomName", mESVideoInfo.RoomName);//房间命名,例 8栋1单元0801
            intent.PutExtra("Type", 0);//类型,0 监控,1反呼
            Application.Activity.StartActivity(intent);
#endif
        }
        /// <summary>
        /// 被呼叫页面
        /// </summary>
        /// <param name="mESVideoInfo"></param>
        public static void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo)
        {
#if Android
            Android.Content.Intent intent = new Android.Content.Intent(Application.Activity, typeof(GateWay.Droid.VideoActivity));
            intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);//室外机的名称,例,室外机
            intent.PutExtra("ESRoomID", mESVideoInfo.ESRoomID);//当前用户的房间 ID
            intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);//室外机UUID,例:JJY000007FSEYX
            intent.PutExtra("IsCollect", mESVideoInfo.IsCollect);//是否收藏
            intent.PutExtra("RoomName", mESVideoInfo.RoomName);//房间命名,例 8栋1单元0801
            intent.PutExtra("Type", 1);//类型,0 监控,1反呼
            Application.Activity.StartActivity(intent);
#endif
        }
    }
    public class ESVideoInfo
    {
        /// <summary>
        /// 室外机的UUID
        /// 例:JJY000007FSEYX
        /// </summary>
        public string ESVideoUUID = string.Empty;
        /// <summary>
        /// 当前用户的房间ID
        /// 例:0801
        /// </summary>
        public int ESRoomID;
        /// <summary>
        /// 室外机的名称
        /// 例:室外机
        /// </summary>
        public string DeviceName = string.Empty;
        /// <summary>
        /// 房间命名
        /// 例:8栋1单元0801
        /// </summary>
        public string RoomName = string.Empty;
        /// <summary>
        /// 是否收藏
        /// </summary>
        public bool IsCollect;
    }
}
ZigbeeApp/Shared/Phone/ZigBee/Common/Application.cs
@@ -206,6 +206,11 @@
                                {
                                    listReceiveIP.Add(ipAddress);
                                }
                                //2020.08.07追加:即使空的住宅id也建立链接,对应手动恢复网关出厂设置时,因为没有解绑,但是住宅id为空的问题
                                else if (Shared.Phone.UserCenter.HdlGatewayLogic.Current.HomeIdIsEmpty(homeID) == true)
                                {
                                    listReceiveIP.Add(ipAddress);
                                }
                            }
                            //网关列表存储处理
                            var gateWay = ZbGateway.GateWayList.Find(obj => obj.GwId == zbGateWay.GwId);
ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs
@@ -140,6 +140,50 @@
            /// </summary>
            public int BindScenesId;
        }
        /// <summary>
        /// 单个设备的数据
        /// </summary>
        [System.Serializable]
        public class AddSingleBindData
        {
            /// <summary>
            /// 控制设备节点的mac地址
            /// </summary>
            public string DeviceAddr;
            /// <summary>
            /// 错误信息
            /// </summary>
            public int Epoint;
            /// <summary>
            ///绑定名称,不修改名称时忽略该选项
            /// </summary>
            public string BindName;
            /// <summary>
            /// 绑定类型
            ///<para>0:绑定设备 </para>
            ///<para>1:绑定场景</para>
            /// </summary>
            public int BindType;
            /// <summary>
            /// 绑定的cluster,需要控制设备的OutCluster列表中存在该cluster。
            ///如绑定某个设备的on/off,为6。
            /// </summary>
            public int BindCluster;
            /// <summary>
            /// 绑定设备Mac地址, 当BindType=0时存在
            /// </summary>
            public string BindMacAddr;
            /// <summary>
            /// 绑定设备的端口号,当BindType=0时存在
            /// </summary>
            public int BindEpoint;
            /// <summary>
            /// 绑定场景,当BindType=1时存在
            /// </summary>
            public int BindScenesId;
        }
        #endregion
        #region 解除绑定
ZigbeeApp/Shared/Phone/ZigBee/Device/PMSensor.cs
@@ -16,11 +16,11 @@
        /// <summary>
        /// 当前温度
        /// </summary>
        public int currentTemperature = 0;
        public decimal currentTemperature = 0;
        /// <summary>
        /// 当前湿度 
        /// </summary>
        public int currentHumidity = 0;
        public decimal currentHumidity = 0;
        /// <summary>
        /// 当前PM2.5值
        /// </summary>
ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
@@ -323,7 +323,7 @@
        /// PIR配置参数回复
        /// </summary>
        [System.Serializable]
        public class PanelPrivateFunctionsResponseAllInfo:ErrorResponCommon
        public class PanelPrivateFunctionsResponseAllInfo : ErrorResponCommon
        {
            /// <summary>
            /// 光感等级个数(Lux能力)
@@ -1105,6 +1105,174 @@
        }
        #endregion
        #region  校正温度
        ///<summary >
        /// 校正温度
        /// </summary>
        public async System.Threading.Tasks.Task<ResponseAllData> CorrectTemperature(double correctValue, int direction = 0, int type = 0)
        {
            ResponseAllData result = null;
            if (Gateway == null)
            {
                result = new ResponseAllData { errorMessageBase = "当前没有网关" };
                return result;
            }
            return await System.Threading.Tasks.Task.Run(async () =>
            {
                Action<string, string> action = (topic, message) =>
                {
                    var gatewayID = topic.Split('/')[0];
                    var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
                    if (topic == gatewayID + "/" + "Error_Respon")
                    {
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
                            result = new ResponseAllData { errorMessageBase = "网关错误回复,且数据是空" };
                        }
                        else
                        {
                            result = new ResponseAllData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
                        }
                    }
                    if (topic == gatewayID + "/" + "ZbDataPassthrough")
                    {
                        var clientDataPassthroughResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<ClientDataPassthroughResponseData>(jobject["Data"].ToString());
                        if (clientDataPassthroughResponseData == null)
                        {
                            result = new ResponseAllData { errorMessageBase = "网关返回的数据为空" };
                        }
                        else
                        {
                            if (clientDataPassthroughResponseData?.PassData != null)
                            {
                                var data = clientDataPassthroughResponseData.PassData;
                                if (data.Length == 16)
                                {
                                    var command = data[4].ToString() + data[5].ToString() + data[2].ToString() + data[3].ToString();
                                    if (command == "0002")
                                    {
                                        var tempD = new ResponseData();
                                        tempD.command = data[12].ToString() + data[13].ToString() + data[10].ToString() + data[11].ToString();
                                        tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16);
                                        if (tempD.command == "0503")
                                        {
                                            result = new ResponseAllData { responseData = tempD };
                                            DebugPrintLog($"UI收到通知后的主题_command:0500_{ topic}");
                                        }
                                    }
                                }
                            }
                        }
                    }
                };
                Gateway.Actions += action;
                System.Console.WriteLine("ClientDataPassthrough_Actions 启动" + System.DateTime.Now.ToString());
                try
                {
                    var passData = CorrectTemperatureData(correctValue,direction, type);
                    var jObject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", 200 }, { "Cluster_ID", 64513 }, { "Command", 0 } };
                    var data = new JObject { { "PassData", passData } };
                    jObject.Add("Data", data);
                    Gateway.Send(("ClientDataPassthrough"), jObject.ToString());
                }
                catch { }
                var dateTime = DateTime.Now;
                while ((DateTime.Now - dateTime).TotalMilliseconds < 9000)// WaitReceiveDataTime)
                {
                    await System.Threading.Tasks.Task.Delay(10);
                    if (result != null)
                    {
                        break;
                    }
                }
                if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
                {
                    result = new ResponseAllData { errorMessageBase = " 回复超时,请重新操作" };
                }
                Gateway.Actions -= action;
                System.Console.WriteLine("ClientDataPassthrough_Actions 退出" + System.DateTime.Now.ToString());
                return result;
            });
        }
        /// <summary>
        /// 校正温度
        /// [该条协议另外2个参数UI和设备都不需要,设备都同事要求传感器距离和传感器触发延迟时间都默认是FFFF]
        /// </summary>
        /// <param name="correctValue">校正温度值</param>
        /// <returns></returns>
        string CorrectTemperatureData(double correctValue,int direction=0, int type = 0)
        {
            string data = "";
            string dataLength = "09";
            string dataComand1 = "03";
            string dataComand2 = "05";
            string dataSerialNum = "01";
            string addDataLength = "05";
            string typeString = "";
            string directString = "";
            string correctValueString = "";
            try
            {
                if (type == 1)
                {
                    typeString = "0100";
                }
                else
                {
                    typeString = "0000";
                }
                if (direction == 1)
                {
                    directString = "01";
                }
                else if (direction == 2)
                {
                    directString = "02";
                }
                else
                {
                    directString = "00";
                }
                int curV = (int)(correctValue * 100);
                var tempBytes = new byte[2];
                for (int i = 0; i < 2; i++)
                {
                    tempBytes[i] = (byte)(curV >> (i * 8) & 0xff);
                }
                var curV1 = Convert.ToString(tempBytes[0], 16);
                var curV2 = Convert.ToString(tempBytes[1], 16);
                if (curV1.Length == 1)
                {
                    curV1 = "0" + curV1;
                }
                if (curV2.Length == 1)
                {
                    curV2 = "0" + curV2;
                }
                correctValueString = (curV1 + curV2).ToUpper();
                data = dataLength + dataComand1 + dataComand2 + dataSerialNum + addDataLength +
                  typeString + directString + correctValueString;
            }
            catch { };
            return data;
        }
        #endregion
        #region 获取按键指示灯开关颜色.
        /// <summary>
ZigbeeApp/Shared/R.cs
@@ -662,6 +662,22 @@
        /// 同步失败
        /// </summary>
        public const int SynchronizationFailed = 337;
        /// <summary>
        /// 数据校正
        /// </summary>
        public const int DataCorrection = 338;
        /// <summary>
        ///  339=矫正温度失败
        /// </summary>
        public const int DataCorrectionFailed = 339;
        /// <summary>
        ///  340=矫正面板内置的温度或湿度传感器读数
        /// </summary>
        public const int DataCorrectionTip = 340;
        /// <summary>
        ///  341=请输入正确的数值
        /// </summary>
        public const int NumTip = 341;
        public readonly static int cancel = 5097;
        public readonly static int confrim = 5098;
@@ -5862,6 +5878,14 @@
        /// 开关键
        /// </summary>
        public const int uSwitchButton = 16147;
        /// <summary>
        /// 过户
        /// </summary>
        public const int uTransfer = 16148;
        /// <summary>
        /// 住宅过户
        /// </summary>
        public const int uTransferOfResidence = 16149;
        //★★★★下面这些是接口的返回信息翻译,从18000开始★★★★
@@ -6086,7 +6110,7 @@
        /// </summary>
        public const int uAddFangyueEightButtonPanelMsg = 21020;
        /// <summary>
        /// 方悦环境面板 -> 按住面板功能(function)按键,所有按键{0}指示灯亮起,则配网成功
        /// 方悦环境面板 ->按住面板功能按键5秒,绿色指示灯闪烁{0}进入配网状态;闪烁停止{0}指示灯变白色表示配网成功
        /// </summary>
        public const int uAddFangyueEnvironmentPanelMsg = 21021;
        /// <summary>
ZigbeeApp/Shared/Shared.projitems
@@ -108,6 +108,7 @@
    <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceRelayDetailCardForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\DeviceColorTemperatureCardControl.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\DeviceFreshAirCardControl.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\DevicePmSensorCardControl.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceFunctionUnallocatedControl.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceSelectUnallocatedControl.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\SelectLocalDeviceImageForm.cs" />
@@ -232,15 +233,13 @@
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorTemperatureHumidityForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorWaterDirectionForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Light\MiniNightLightFunctionSettionForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\DataCorrectionForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelBackLighWithSensorForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelBrightnessAdjustForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueButtonSettionForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueEnvironmentButtonSettionForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueEnvironmentLightSettionForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueEnvironmentTargetForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueFreshAirBackLightSettionForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueFreshAirButtonSettionForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueFunctionSettionForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelSettionWithSourceForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelSimpleEnvironmentButtonSettionForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelSimpleMutilfunctionAddTargetsForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelSimpleMutilfunctionTargetsForm.cs" />
@@ -314,6 +313,7 @@
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Residence\LookRoomDeviceListForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Residence\ResidenceManagementForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Residence\LookRoomSettionForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Residence\TransferOfResidenceMainForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Safety\AlarmTargetStatuSelectAcForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Safety\CoercePswAddNewForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Safety\CoercePswEditorForm.cs" />
@@ -441,6 +441,7 @@
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Suggestion\FeedbackForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\UserMain\SecondAuthenticationForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserView\LoginLoading.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\VideoPhone\ESVideo.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Device\AC.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Device\Buzzer.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Device\ColorDimmerSwitch.cs" />