黄学彪
2020-07-13 23420922845c9e77019a55c3b3e3271eb1ec261e
新版本
9个文件已添加
62个文件已修改
45 文件已重命名
2613 ■■■■■ 已修改文件
ZigbeeApp/GateWay.Droid/Assets/Language.ini 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SynchronizationSelected.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/videoIntercom.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/videoIntercomNext.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/AppDelegate.cs 180 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024_1024.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/152_152.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/167_167.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180_180.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/20_20.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/29_29.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/58_58-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/60_60.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/76_76.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87_87.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_748.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_768-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_768.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1125_2436.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242_2208-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242_2688_XS Max.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2008.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2048-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2048.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1792_828.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1496.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1536-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1536.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_2732-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2208_1242.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2436_1125.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2688_1242.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/320_480.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_1136-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_1136.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_960-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_960.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/750_1334.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1004.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1024-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1024.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/828_1792_XR.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/ESVideo.cs 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Home.IOS.csproj 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Info.plist 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/MainViewController.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Language.ini 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Phone/Item/SynchronizationSelected.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Phone/Item/videoIntercom.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Phone/Item/videoIntercomNext.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/mono_crash.115869ea88.0.json 152 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/CommonPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/Device.cs 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/House.cs 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/DLL/IOS/Shared.IOS.ESVideoPhoneSDK.dll 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDeviceForm.cs 96 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Category/AdjustTargetAddSceneForm.cs 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Category/SelectFloorForm.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs 275 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/MainPage/LeftListRoomViewFrom.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/TopRightFloorMenuControl.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFileLogic.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/PaneTargetsBaseForm.cs 608 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionAddTargetsForm.cs 201 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionDirectoryListForm.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetAddMenuForm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserView/UserPage.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/R.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Shared.projitems 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Language.ini
old mode 100755 new mode 100644
@@ -337,6 +337,8 @@
333=不绑定任何目标
334= 睡眠时间
335=警告!数据出错,必须刷新列表,否则控制现象错乱
336=同步
337=同步失败
5097=取消
5098=确定
@@ -625,6 +627,10 @@
5411=暗{\r\n} 0lux
5412=亮{\r\n} 100lux
5413=在室内条件下,黑暗照度值约为0.02lux,黄昏照度值{\r\n}约为10lux,阴天照度值约为5~50lux,请根据实际{\r\n}需要进行调节
5414=可视对讲
5415=栋
5416=单元
5417=室外机
@@ -1867,6 +1873,7 @@
16134=设置设备功能类型失败
16135=获取场景列表失败,网关回复超时
16136=需重新绑定
16137=出现意外情况,数据丢失
;★★★★下面这些是接口的返回信息翻译,从18000开始★★★★
18004=指定网关已经被绑定
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SynchronizationSelected.png
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/videoIntercom.png
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/videoIntercomNext.png
ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
@@ -2320,6 +2320,15 @@
  <ItemGroup>
    <AndroidAsset Include="Assets\Phone\Item\BatterySelected.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidAsset Include="Assets\Phone\Item\videoIntercom.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidAsset Include="Assets\Phone\Item\videoIntercomNext.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidAsset Include="Assets\Phone\Item\SynchronizationSelected.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
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="0120070901" android:installLocation="auto" android:versionName="1.1.0120070901">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="0120071301" android:installLocation="auto" android:versionName="1.1.0120071301">
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="26" />
    <permission android:name="com.hdl.home.permission.JPUSH_MESSAGE" android:protectionLevel="signature" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
ZigbeeApp/Home.Ios/AppDelegate.cs
old mode 100644 new mode 100755
@@ -53,26 +53,42 @@
                        NSString key_hiddenJson = new NSString("HiddenJson");
                        if (userInfo.ContainsKey(key_hiddenJson))
                        {
                            NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
                            if (hiddenJsonDic != null)
                            {
                                NSString key_Offline = new NSString("Offline");
                                if (hiddenJsonDic.ContainsKey(key_Offline))
                                {
                                    string signOut = hiddenJsonDic["Offline"].ToString();
                                    if (signOut == "0")
                            var hiddenJson = userInfo["HiddenJson"].ToString();
                            if (!string.IsNullOrEmpty(hiddenJson))
                            {
                                if (hiddenJson.Contains("cmtID"))
                                {
                                        ///目前根据这个判断是否是可视对讲数据
                                       // VideoMethod(hiddenJson);
                                }
                                else
                                {
                                    NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
                                    if (hiddenJsonDic != null)
                                    {
                                        //不下线
                                    }
                                    else
                                    {
                                        //标记下线
                                        haveToSignOut = true;
                                    }
                                }
                                        NSString key_Offline = new NSString("Offline");
                                        if (hiddenJsonDic.ContainsKey(key_Offline))
                                        {
                                            string signOut = hiddenJsonDic["Offline"].ToString();
                                            if (signOut == "0")
                                            {
                                                //不下线
                                            }
                                            else
                                            {
                                                //标记下线
                                                haveToSignOut = true;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
@@ -100,25 +116,41 @@
                NSString key_hiddenJson = new NSString("HiddenJson");
                if (userInfo.ContainsKey(key_hiddenJson))
                {
                    NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
                    if (hiddenJsonDic == null)
                    {
                        return;
                    }
                    NSString key_Offline = new NSString("Offline");
                    if (hiddenJsonDic.ContainsKey(key_Offline))
                    {
                        string signOut = hiddenJsonDic["Offline"].ToString();
                        if (signOut == "0")
                    var hiddenJson = userInfo["HiddenJson"].ToString();
                    if (string.IsNullOrEmpty(hiddenJson))
                    {
                        return;
                    }
                    if (hiddenJson.Contains("cmtID"))
                    {
                        ///目前根据这个判断是否是可视对讲数据
                        VideoMethod(hiddenJson);
                    }
                    else
                    {
                        NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
                        if (hiddenJsonDic == null)
                        {
                            //不下线
                            return;
                        }
                        else
                        NSString key_Offline = new NSString("Offline");
                        if (hiddenJsonDic.ContainsKey(key_Offline))
                        {
                            //强制下线
                            CommonPage.Instance.SingOut();
                            CommonPage.Instance.ShowErrorInfoAlert(Shared.R.MyInternationalizationString.uHadBeenLoginAndOffLine);
                            string signOut = hiddenJsonDic["Offline"].ToString();
                            if (signOut == "0")
                            {
                                //不下线
                            }
                            else
                            {
                                //强制下线
                                CommonPage.Instance.SingOut();
                                CommonPage.Instance.ShowErrorInfoAlert(Shared.R.MyInternationalizationString.uHadBeenLoginAndOffLine);
                            }
                        }
                    }
                }
@@ -128,30 +160,82 @@
                NSString key_hiddenJson = new NSString("HiddenJson");
                if (userInfo.ContainsKey(key_hiddenJson))
                {
                    NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
                    if (hiddenJsonDic == null)
                    {
                        return;
                    }
                    NSString key_Offline = new NSString("Offline");
                    if (hiddenJsonDic.ContainsKey(key_Offline))
                    {
                        string signOut = hiddenJsonDic["Offline"].ToString();
                        if (signOut == "0")
                    var hiddenJson = userInfo["HiddenJson"].ToString();
                    if (string.IsNullOrEmpty(hiddenJson)) {
                        return;
                    }
                    if (hiddenJson.Contains("cmtID"))
                    {
                        ///目前根据这个判断是否是可视对讲数据
                        VideoMethod(hiddenJson);
                    }
                    else
                    {
                        NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
                        if (hiddenJsonDic == null)
                        {
                            //不下线
                            return;
                        }
                        else
                        NSString key_Offline = new NSString("Offline");
                        if (hiddenJsonDic.ContainsKey(key_Offline))
                        {
                            //标记下线
                            haveToSignOut = true;
                            string signOut = hiddenJsonDic["Offline"].ToString();
                            if (signOut == "0")
                            {
                                //不下线
                            }
                            else
                            {
                                //标记下线
                                haveToSignOut = true;
                            }
                        }
                    }
                }
            }
            completionHandler(UIBackgroundFetchResult.NewData);
        }
        /// <summary>
        /// ios通知栏点击打开可视对讲的方法
        /// </summary>
        /// <param name="hiddenJson">云端推过来的数据</param>
        private  void VideoMethod(string hiddenJson)
        {
            var json = Newtonsoft.Json.Linq.JObject.Parse(hiddenJson);
            if (json == null)
            {
                return;
            }
            GateWay.Ios.ESVideoInfo eSVideoInfo = new GateWay.Ios.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);
            }
            GateWay.Ios.ESVideo.ShowESvideoVideoIntercom(eSVideoInfo);
            //var url = "https://global.hdlcontrol.com/HangZhouHdlCloudApi/VideoIntercom/Answer";
            //var dd=await Shared.Phone.Device.Logic.Send.HttpWebRequest(url, json.ToString(), "POST", 3, true);
        }
        public override void ReceivedRemoteNotification(UIApplication application, NSDictionary userInfo)
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024_1024.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120-1.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/152_152.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/167_167.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180_180.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/20_20.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/29_29.png

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/58_58-1.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/60_60.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/76_76.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80-1.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87_87.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_748.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_768-1.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_768.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1125_2436.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242_2208-1.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242_2688_XS Max.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2008.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2048-1.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2048.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1792_828.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1496.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1536-1.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1536.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_2732-1.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2208_1242.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2436_1125.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2688_1242.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/320_480.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_1136-1.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_1136.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_960-1.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_960.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/750_1334.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1004.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1024-1.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1024.png

ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/828_1792_XR.png

ZigbeeApp/Home.Ios/ESVideo.cs
New file
@@ -0,0 +1,84 @@
using System;
using Shared.IOS.ESVideoPhoneSDK;
namespace GateWay.Ios
{
    public static class ESVideo
    {
        //public ESVideo()
        //{
        //}
        public static void InitESVideoSDK()
        {
            ESVideo.InitESVideoSDK();
        }
        /// <summary>
        /// 监控页面
        /// </summary>
        /// <param name="mESVideoInfo"></param>
        public static void ShowESVideoMonitor(ESVideoInfo mESVideoInfo)
        {
            ESVideoMonitorViewController mESVideoMonitorViewController = new ESVideoMonitorViewController();
            mESVideoMonitorViewController.MESVideoID = mESVideoInfo.ESVideoUUID;
            mESVideoMonitorViewController.MESRoomID = mESVideoInfo.ESRoomID;
            mESVideoMonitorViewController.DeviceName = mESVideoInfo.DeviceName;
            mESVideoMonitorViewController.RoomName = mESVideoInfo.RoomName;
            mESVideoMonitorViewController.IsCollect = mESVideoInfo.IsCollect;
            Shared.Application.currentVC.NavigationController.PushViewController(mESVideoMonitorViewController, true);
        }
        /// <summary>
        /// 被呼叫页面
        /// </summary>
        /// <param name="mESVideoInfo"></param>
        public static void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo)
        {
            ESvideoVideoIntercomViewController mESvideoVideoIntercomViewController = new ESvideoVideoIntercomViewController();
            mESvideoVideoIntercomViewController.MESVideoID = mESVideoInfo.ESVideoUUID;
            mESvideoVideoIntercomViewController.MESRoomID = mESVideoInfo.ESRoomID;
            mESvideoVideoIntercomViewController.DeviceName = mESVideoInfo.DeviceName;
            mESvideoVideoIntercomViewController.RoomName = mESVideoInfo.RoomName;
            mESvideoVideoIntercomViewController.IsCollect = mESVideoInfo.IsCollect;
            Shared.Application.currentVC.NavigationController.PushViewController(mESvideoVideoIntercomViewController, true);
        }
    }
    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/Home.Ios/Home.IOS.csproj
@@ -87,6 +87,9 @@
          <HintPath>..\packages\BouncyCastle.Crypto.dll.1.8.1\lib\BouncyCastle.Crypto.dll</HintPath>
        </Reference>
        <Reference Include="System.Net.Http" />
        <Reference Include="Shared.IOS.ESVideoPhoneSDK">
          <HintPath>..\Shared\DLL\IOS\Shared.IOS.ESVideoPhoneSDK.dll</HintPath>
        </Reference>
    </ItemGroup>
    <ItemGroup>
      <PackageReference Include="Xamarin.Essentials" Version="1.2.0" />
@@ -132,6 +135,7 @@
        <Compile Include="ViewControllerBase.cs" />
        <Compile Include="Reachability.cs" />
        <Compile Include="ZXingOverlayView.cs" />
        <Compile Include="ESVideo.cs" />
    </ItemGroup>
    <ItemGroup>
      <ProjectReference Include="..\Elian.iOS\Elian.iOS.csproj">
@@ -562,6 +566,7 @@
      <BundleResource Include="Resources\Phone\Item\ShardMenu.png" />
      <BundleResource Include="Resources\Phone\Item\UnLockFail.png" />
      <BundleResource Include="Resources\Phone\Item\ProgressMsg.png" />
      <BundleResource Include="Resources\Phone\Item\SynchronizationSelected.png" />
      <BundleResource Include="Resources\Phone\Item\BottomButtonGround.png" />
      <BundleResource Include="Resources\Phone\Item\AutoBackup.png" />
      <BundleResource Include="Resources\Phone\Item\BatterySelected.png" />
@@ -581,7 +586,9 @@
      <BundleResource Include="Resources\Phone\Item\GwSwitchIcon.png" />
      <BundleResource Include="Resources\Phone\Item\DeleteIcon1.png" />
      <BundleResource Include="Resources\Phone\Item\HouseSelected.png" />
      <BundleResource Include="Resources\Phone\Item\videoIntercomNext.png" />
      <BundleResource Include="Resources\Phone\Item\Floor.png" />
      <BundleResource Include="Resources\Phone\Item\videoIntercom.png" />
      <BundleResource Include="Resources\Phone\Item\MinusSign2.png" />
      <BundleResource Include="Resources\Phone\Item\NotAuthority.png" />
      <BundleResource Include="Resources\Phone\Item\IndoorUnitGround.png" />
ZigbeeApp/Home.Ios/Info.plist
@@ -85,5 +85,7 @@
        <string>location</string>
        <string>remote-notification</string>
    </array>
    <key>NSMicrophoneUsageDescription</key>
    <string>需要使用麦克风,用于可视对讲</string>
</dict>
</plist>
ZigbeeApp/Home.Ios/MainViewController.cs
@@ -83,15 +83,15 @@
            internetStatus = Reachability.InternetConnectionStatus();
            if (internetStatus == NetworkStatus.NotReachable)//没有网络连接 0
            {
                Shared.Common.CommonPage.nowNetworkMode = 0;
                //Shared.Common.CommonPage.nowNetworkMode = 0;
            }
            else if (internetStatus == NetworkStatus.ReachableViaCarrierDataNetwork)//3,4G的网络连接 1
            {
                Shared.Common.CommonPage.nowNetworkMode = 1;
                //Shared.Common.CommonPage.nowNetworkMode = 1;
            }
            else if (internetStatus == NetworkStatus.ReachableViaWiFiNetwork)
            { //wifi的网络连接 2
                Shared.Common.CommonPage.nowNetworkMode = 2;
                //Shared.Common.CommonPage.nowNetworkMode = 2;
            }
        }
    }
ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -337,6 +337,8 @@
333=不绑定任何目标
334= 睡眠时间
335=警告!数据出错,必须刷新列表,否则控制现象错乱
336=同步
337=同步失败
5097=取消
5098=确定
@@ -625,6 +627,10 @@
5411=暗{\r\n} 0lux
5412=亮{\r\n} 100lux
5413=在室内条件下,黑暗照度值约为0.02lux,黄昏照度值{\r\n}约为10lux,阴天照度值约为5~50lux,请根据实际{\r\n}需要进行调节
5414=可视对讲
5415=栋
5416=单元
5417=室外机
ZigbeeApp/Home.Ios/Resources/Phone/Item/SynchronizationSelected.png
ZigbeeApp/Home.Ios/Resources/Phone/Item/videoIntercom.png
ZigbeeApp/Home.Ios/Resources/Phone/Item/videoIntercomNext.png
ZigbeeApp/Home.Ios/mono_crash.115869ea88.0.json
@@ -15,13 +15,13 @@
    "suspend" : "hybrid"
  },
  "memory" : {
    "Resident Size" : "156639232",
    "Virtual Size" : "4818821120",
    "minor_gc_time" : "3344349",
    "major_gc_time" : "1878887",
    "minor_gc_count" : "4",
    "major_gc_count" : "8",
    "major_gc_time_concurrent" : "0"
    "Resident Size" : "181604352",
    "Virtual Size" : "4929044480",
    "minor_gc_time" : "2036527",
    "major_gc_time" : "156293362",
    "minor_gc_count" : "13",
    "major_gc_count" : "873",
    "major_gc_time_concurrent" : "3505547"
 },
  "threads" : [
 {
@@ -29,72 +29,72 @@
    "offset_free_hash" : "0x0",
    "offset_rich_hash" : "0x0",
    "crashed" : false,
    "native_thread_id" : "0x70000685a000",
    "thread_info_addr" : "0x7fea5c83bc00",
    "native_thread_id" : "0x700003271000",
    "thread_info_addr" : "0x7f98c903a000",
    "thread_name" : "Finalizer",
    "ctx" : {
      "IP" : "0x7fff61571266",
      "SP" : "0x700006859da8",
      "BP" : "0x700006859e50"
      "IP" : "0x7fff77af4266",
      "SP" : "0x700003270da8",
      "BP" : "0x700003270e50"
  },
    "unmanaged_frames" : [
  {
      "is_managed" : "false",
      "native_address" : "0x10ff50156",
      "native_address" : "0x10c9d2156",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x1100f6775",
      "native_address" : "0x10cb78775",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x1100f64a7",
      "native_address" : "0x10cb784a7",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x10ffbaf3c",
      "native_address" : "0x10ca3cf3c",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x7fff61627b5d",
      "native_address" : "0x7fff77baab5d",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x7fea5be0c040",
      "native_address" : "0x30",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x1100f7373",
      "native_address" : "0x10cb79373",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x7fff616302eb",
      "native_address" : "0x7fff77bb32eb",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x7fff61633249",
      "native_address" : "0x7fff77bb6249",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x7fff6162f40d",
      "native_address" : "0x7fff77bb240d",
      "native_offset" : "0x00000"
   }
@@ -105,90 +105,90 @@
    "offset_free_hash" : "0x0",
    "offset_rich_hash" : "0x0",
    "crashed" : false,
    "native_thread_id" : "0x11281b5c0",
    "thread_info_addr" : "0x7fea5c801800",
    "native_thread_id" : "0x110e995c0",
    "thread_info_addr" : "0x7f98c9006000",
    "thread_name" : "tid_307",
    "ctx" : {
      "IP" : "0x7fff6157486a",
      "SP" : "0x7ffedfd62c98",
      "BP" : "0x7ffedfd62d20"
      "IP" : "0x7fff77af786a",
      "SP" : "0x7ffee32e0c98",
      "BP" : "0x7ffee32e0d20"
  },
    "unmanaged_frames" : [
  {
      "is_managed" : "false",
      "native_address" : "0x10ff50156",
      "native_address" : "0x10c9d2156",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x1100f6775",
      "native_address" : "0x10cb78775",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x1100f64a7",
      "native_address" : "0x10cb784a7",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x10ffbaf3c",
      "native_address" : "0x10ca3cf3c",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x7fff61627b5d",
      "native_address" : "0x7fff77baab5d",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x10ff525b6",
      "native_address" : "0x10c9d45b6",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x1101a07c0",
      "native_address" : "0x10cc227c0",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x1101bb2e1",
      "native_address" : "0x10cc3d2e1",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x1100f3774",
      "native_address" : "0x10cb75774",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x1100f358a",
      "native_address" : "0x10cb7558a",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x10ff156c2",
      "native_address" : "0x10c9976c2",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x10fe9f848",
      "native_address" : "0x10c921848",
      "native_offset" : "0x00000"
   }
,
  {
      "is_managed" : "false",
      "native_address" : "0x7fff6143c3d5",
      "native_address" : "0x7fff779bf3d5",
      "native_offset" : "0x00000"
   }
@@ -199,13 +199,13 @@
    "offset_free_hash" : "0x115869ea88",
    "offset_rich_hash" : "0x115869ee42",
    "crashed" : true,
    "native_thread_id" : "0x700006fec000",
    "thread_info_addr" : "0x7fea5c45ac00",
    "native_thread_id" : "0x700003980000",
    "thread_info_addr" : "0x7f98c94d5600",
    "thread_name" : "Thread Pool Worker",
    "ctx" : {
      "IP" : "0x7fff615772c6",
      "SP" : "0x700006fea548",
      "BP" : "0x700006fea580"
      "IP" : "0x7fff77afa2c6",
      "SP" : "0x70000397e548",
      "BP" : "0x70000397e580"
  },
    "managed_frames" : [
  {
@@ -486,115 +486,115 @@
  "unmanaged_frames" : [
 {
    "is_managed" : "false",
    "native_address" : "0x10ff50156",
    "native_address" : "0x10c9d2156",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1100f6775",
    "native_address" : "0x10cb78775",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1100f6dfa",
    "native_address" : "0x10cb78dfa",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x10ffbbf46",
    "native_address" : "0x10ca3df46",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x10ff54c65",
    "native_address" : "0x10c9d6c65",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x10ffbb2db",
    "native_address" : "0x10ca3d2db",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x7fff61627b5d",
    "native_address" : "0x7fff77baab5d",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x110221439",
    "native_address" : "0x10cca3439",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x7fff614e16a6",
    "native_address" : "0x7fff77a646a6",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1101c5cb7",
    "native_address" : "0x10cc47cb7",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1101a6b2f",
    "native_address" : "0x10cc28b2f",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1101c603e",
    "native_address" : "0x10cc4803e",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1101c61bf",
    "native_address" : "0x10cc481bf",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x110060e76",
    "native_address" : "0x10cae2e76",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x110061478",
    "native_address" : "0x10cae3478",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1101b419f",
    "native_address" : "0x10cc3619f",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1101b44b0",
    "native_address" : "0x10cc364b0",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1100637ab",
    "native_address" : "0x10cae57ab",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x110086675",
    "native_address" : "0x10cb08675",
    "native_offset" : "0x00000"
  }
,
@@ -644,25 +644,25 @@
,
 {
    "is_managed" : "false",
    "native_address" : "0x10feb062d",
    "native_address" : "0x10c93262d",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1100cffa4",
    "native_address" : "0x10cb51fa4",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1100d43a6",
    "native_address" : "0x10cb563a6",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x11006b6f4",
    "native_address" : "0x10caed6f4",
    "native_offset" : "0x00000"
  }
,
@@ -723,49 +723,49 @@
,
 {
    "is_managed" : "false",
    "native_address" : "0x10feb062d",
    "native_address" : "0x10c93262d",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1100cffa4",
    "native_address" : "0x10cb51fa4",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1100f9ec0",
    "native_address" : "0x10cb7bec0",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x11002c28c",
    "native_address" : "0x10caae28c",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x1100f7373",
    "native_address" : "0x10cb79373",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x7fff616302eb",
    "native_address" : "0x7fff77bb32eb",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x7fff61633249",
    "native_address" : "0x7fff77bb6249",
    "native_offset" : "0x00000"
  }
,
 {
    "is_managed" : "false",
    "native_address" : "0x7fff6162f40d",
    "native_address" : "0x7fff77bb240d",
    "native_offset" : "0x00000"
  }
ZigbeeApp/Shared/Common/CommonPage.cs
@@ -42,7 +42,7 @@
        /// <summary>
        /// 版本号
        /// </summary>
        public static string CodeIDString = "1.1.0120070901";
        public static string CodeIDString = "1.1.0120071301";
        /// <summary>
        /// 注册来源(0:HDL On 1:Zigbee)
        /// </summary>
ZigbeeApp/Shared/Common/Device.cs
@@ -434,7 +434,7 @@
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                //修改设备名字的话,主页需要重新刷新
                Phone.UserView.UserPage.Instance.RefreshForm = true;
                Phone.UserView.UserPage.Instance.RefreshAllForm = true;
                return true;
            }
@@ -458,7 +458,7 @@
                }
            }
            //修改设备名字的话,主页需要重新刷新
            Phone.UserView.UserPage.Instance.RefreshForm = true;
            Phone.UserView.UserPage.Instance.RefreshAllForm = true;
            return true;
        }
@@ -719,7 +719,7 @@
        public void DeleteMemmoryDevice(CommonDevice device, bool deleteRoom = true)
        {
            //删除缓存设备的话,主页需要重新刷新
            Phone.UserView.UserPage.Instance.RefreshForm = true;
            Phone.UserView.UserPage.Instance.RefreshAllForm = true;
            if (deleteRoom == true)
            {
@@ -796,6 +796,35 @@
        #endregion
        #region ■ 同步设备___________________________
        /// <summary>
        ///  同步设备并且刷新缓存(同步失败时,会显示信息)
        /// </summary>
        /// <param name="litdevice">设备对象(MAC地址必须要相同)</param>
        public async Task<bool> SynchronizationDevice(List<CommonDevice> listdevice)
        {
            //虚拟住宅的话,不需要删除网关的设备
            if (Config.Instance.Home.IsVirtually == false)
            {
                //同步
                var result = await listdevice[0].SyncMsgToBindSource(listdevice[0].DeviceAddr, listdevice[0].DeviceEpoint);
                if (result == null || result.result != 0)
                {
                    //同步删除失败
                    string msg = Language.StringByID(R.MyInternationalizationString.SynchronizationFailed);
                    //拼接上【网关回复超时】的Msg
                    msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result);
                    this.ShowErrorMsg(msg);
                    return false;
                }
            }
            return true;
        }
        #endregion
        #region ■ 测试设备___________________________
        /// <summary>
@@ -831,6 +860,11 @@
                    //传感器除了Pir都没有定位功能
                    return true;
                }
                else if (myTypeInfo.ConcreteType == DeviceConcreteType.Sensor_SphericalMotion)
                {
                    //球型移动传感器虽然是电池设备,但是它有定位功能
                    return true;
                }
                return false;
            }
@@ -841,6 +875,22 @@
                {
                    return true;
                }
            }
            return false;
        }
        /// <summary>
        /// 检测设备是否拥有一键同步功能
        /// </summary>
        /// <param name="device"></param>
        /// <returns></returns>
        public bool DeviceIsCanSynchronization(CommonDevice device)
        {
            //获取设备类型的
            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
            if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
            {
                return true;
            }
            return false;
        }
@@ -1044,8 +1094,9 @@
            if (sort == false)
            {
                return list;
            }
            list.Sort((obj1, obj2) => {
            }
            list.Sort((obj1, obj2) =>
            {
                if (obj1.DeviceEpoint > obj2.DeviceEpoint)
                {
@@ -1110,7 +1161,7 @@
        public List<string> GetAllDeviceFile()
        {
            List<string> listDeviceFile = new List<string>();
            List<string> listAllFile = Global.FileListByHomeId();
            List<string> listAllFile = HdlFileLogic.Current.GetRootPathListFile();
            foreach (string file in listAllFile)
            {
@@ -2461,15 +2512,6 @@
                    return false;
                }
            }
            //如果是新风面板的新风设备,则不显示
            else if (i_device.Type == DeviceType.FreshAir)
            {
                var myInfoType = LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { i_device });
                if (myInfoType.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                {
                    return false;
                }
            }
            //2020.03.30追加式样:如果是面板的温度探头,不显示
            else if (i_device.Type == DeviceType.TemperatureSensor && ((TemperatureSensor)i_device).SensorDiv == 1)
            {
@@ -2484,6 +2526,20 @@
                //新风的湿度传感器不显示
                return false;
            }
            //如果是新风面板或环境面板,则都不显示任何回路
            var myInfoTypeTemp = LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { i_device });
            if (myInfoTypeTemp.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir || myInfoTypeTemp.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
            {
                return false;
            }
            else if (myInfoTypeTemp.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
            {
                if (i_device.Type != DeviceType.OnOffOutput)
                {
                    return false;
                }
            }
            return true;
        }
ZigbeeApp/Shared/Common/House.cs
@@ -65,10 +65,6 @@
        /// value:FloorName
        /// </summary>
        public Dictionary<string,string> FloorDics = new Dictionary<string,string> { };
        /// <summary>
        /// 当前楼层Id
        /// </summary>
        public string CurrentFloorId = string.Empty;
        #endregion
@@ -82,26 +78,15 @@
        public string GetCurrentFloorName
        {
            get
            {
            {
                return HdlResidenceLogic.Current.GetFloorNameById(CurrentFloorId);
            }
        }
        /// <summary>
        /// 设置当前楼层的ID
        }
        /// <summary>
        /// 当前楼层ID
        /// </summary>
        public void SetCurrentFloorId()
        {
            if (Config.Instance.Home.FloorDics.Count > 0 && string.IsNullOrEmpty(CurrentFloorId))
            {
                foreach (var floor in Config.Instance.Home.FloorDics)
                {
                    CurrentFloorId = floor.Key;
                    Save(false);
                    return;
                }
            }
        }
        [Newtonsoft.Json.JsonIgnore]
        public string CurrentFloorId = string.Empty;
        #endregion
ZigbeeApp/Shared/DLL/IOS/Shared.IOS.ESVideoPhoneSDK.dll
Binary files differ
ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
@@ -823,7 +823,7 @@
            this.editorScene.Save();
            //新建场景,主页需要重新刷新
            UserView.UserPage.Instance.RefreshForm = true;
            UserView.UserPage.Instance.RefreshAllForm = true;
            HdlThreadLogic.Current.RunMain(() =>
            {
@@ -902,7 +902,7 @@
            this.editorScene.Save();
            //编辑场景,主页需要重新刷新
            UserView.UserPage.Instance.RefreshForm = true;
            UserView.UserPage.Instance.RefreshAllForm = true;
            HdlThreadLogic.Current.RunMain(() =>
            {
ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDeviceForm.cs
@@ -42,6 +42,10 @@
        /// 设备列表控件
        /// </summary>
        private VerticalListControl listDeviceView = null;
        /// <summary>
        /// 当前选择的楼层
        /// </summary>
        private string nowSelectFloorId = string.Empty;
        #endregion
@@ -57,6 +61,8 @@
            //设置头部信息
            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.AddFunction));
            //初始化右上角的控件
            this.InitTopRightMenuControl();
            //初始化中部信息
            this.InitMiddleFrame();
        }
@@ -66,8 +72,58 @@
        /// </summary>
        private void InitMiddleFrame()
        {
            //清空body
            this.ClearBodyFrame();
            //初始化房间菜单控件
            this.InitRoomMenuControl();
        }
        /// <summary>
        /// 初始化右上角的控件
        /// </summary>
        private void InitTopRightMenuControl()
        {
            //获取楼层
            var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
            if (dicFloor.Count == 0)
            {
                return;
            }
            var btnIconContr = new MostRightIconControl(69, 69);
            btnIconContr.UnSelectedImagePath = "Item/Drop_Down.png";
            topFrameLayout.AddChidren(btnIconContr);
            btnIconContr.InitControl();
            var btnFloor = new NormalViewControl(300, 69, true);
            btnFloor.Gravity = Gravity.CenterVertical;
            btnFloor.X = btnIconContr.X + btnIconContr.btnIcon.X - Application.GetRealWidth(300);
            btnFloor.TextAlignment = TextAlignment.CenterRight;
            topFrameLayout.AddChidren(btnFloor);
            foreach (var floorId in dicFloor.Keys)
            {
                //第一个楼层
                this.nowSelectFloorId = floorId;
                btnFloor.Text = dicFloor[floorId];
                break;
            }
            btnIconContr.ButtonClickEvent += (sender, e) =>
            {
                //楼层菜单
                var contr = new TopRightFloorMenuControl(dicFloor.Count, 2, this.nowSelectFloorId, Language.StringByID(R.MyInternationalizationString.SelectFloor));
                foreach (var floorId in dicFloor.Keys)
                {
                    contr.AddRowMenu(floorId, () =>
                    {
                        //记录起选择的ID
                        this.nowSelectFloorId = floorId;
                        btnFloor.Text = dicFloor[this.nowSelectFloorId];
                        //初始化中部信息
                        this.InitMiddleFrame();
                    });
                }
            };
        }
        #endregion
@@ -98,7 +154,10 @@
            roomSwitchContr.SelectRoomEvent += (selectRoom) =>
            {
                //在外面清空(特效的问题)
                this.deviceFunctionMenuContr?.RemoveAll();
                if (this.deviceFunctionMenuContr != null && this.deviceFunctionMenuContr.Parent != null)
                {
                    this.deviceFunctionMenuContr.RemoveAll();
                }
                this.listDeviceView?.RemoveAll();
                HdlThreadLogic.Current.RunMainInThread(() =>
@@ -116,7 +175,10 @@
            this.btnFinishControl = new BottomClickButton();
            btnFinishControl.TextID = R.MyInternationalizationString.uFinish;
            bodyFrameLayout.AddChidren(btnFinishControl);
            btnFinishControl.Visible = false;
            if (this.dicNewListTask == null || this.dicNewListTask.Count == 0)
            {
                btnFinishControl.Visible = false;
            }
            btnFinishControl.ButtonClickEvent += (sender, e) =>
            {
                //回调函数
@@ -136,20 +198,24 @@
        /// <returns></returns>
        private List<Room> GetCanShowRoomList()
        {
            //先将列表Dictionary化
            this.dicNewListTask = new Dictionary<string, List<Safeguard.TaskListInfo>>();
            this.dicOldListTask = new Dictionary<string, List<Safeguard.TaskListInfo>>();
            foreach (var data in this.listAdjustTarget)
            if (this.dicNewListTask == null)
            {
                if (data.Type == 0)
                //先将列表Dictionary化
                this.dicNewListTask = new Dictionary<string, List<Safeguard.TaskListInfo>>();
                this.dicOldListTask = new Dictionary<string, List<Safeguard.TaskListInfo>>();
                foreach (var data in this.listAdjustTarget)
                {
                    //只要设备
                    string mainkey = LocalDevice.Current.GetDeviceMainKeys(data.DeviceAddr, data.Epoint);
                    dicOldListTask[mainkey] = data.TaskList;
                    if (data.Type == 0)
                    {
                        //只要设备
                        string mainkey = LocalDevice.Current.GetDeviceMainKeys(data.DeviceAddr, data.Epoint);
                        dicOldListTask[mainkey] = data.TaskList;
                    }
                }
            }
            //当前楼层的全部房间
            var lisrRoom = HdlRoomLogic.Current.GetRoomsByCurrentFloorIdAppendLoveRoom();
            var lisrRoom = HdlRoomLogic.Current.GetRoomsByFloorIdAppendLoveRoom(this.nowSelectFloorId);
            var listShowRoom = new List<Room>();
            foreach (var room in lisrRoom)
            {
@@ -181,7 +247,7 @@
            var dicGroupDevice = this.GetAllGroupDevice(room);
            //只初始化一次
            if (this.deviceFunctionMenuContr == null)
            if (this.deviceFunctionMenuContr == null || this.deviceFunctionMenuContr.Parent == null)
            {
                //设备菜单的白色背景
                var functionBack1 = new FrameLayout();
@@ -256,7 +322,7 @@
                        HdlThreadLogic.Current.RunMainInThread(() =>
                        {
                            //初始化设备列表控件
                            this.InitListDeviceControls(listDeviceView, rowInfo, room);
                            this.InitListDeviceControls(listDeviceView, rowInfo);
                        });
                    }
                };
@@ -273,7 +339,7 @@
            if (nowSelectDeviceInfo != null)
            {
                //初始化默认的设备列表控件
                this.InitListDeviceControls(listDeviceView, nowSelectDeviceInfo, room);
                this.InitListDeviceControls(listDeviceView, nowSelectDeviceInfo);
            }
        }
@@ -286,7 +352,7 @@
        /// </summary>
        /// <param name="listView"></param>
        /// <param name="rowInfo"></param>
        private void InitListDeviceControls(VerticalListControl listView, DeviceRowInfo rowInfo, Room i_room)
        private void InitListDeviceControls(VerticalListControl listView, DeviceRowInfo rowInfo)
        {
            //先清空
            listView.RemoveAll();
ZigbeeApp/Shared/Phone/Category/AdjustTargetAddSceneForm.cs
@@ -38,6 +38,10 @@
        /// 场景列表控件
        /// </summary>
        private VerticalListControl listSceneView = null;
        /// <summary>
        /// 当前选择的楼层
        /// </summary>
        private string nowSelectFloorId = string.Empty;
        #endregion
@@ -53,6 +57,9 @@
            //设置头部信息
            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.AddScence));
            //初始化右上角的控件
            this.InitTopRightMenuControl();
            //初始化中部信息
            this.InitMiddleFrame();
        }
@@ -62,6 +69,9 @@
        /// </summary>
        private void InitMiddleFrame()
        {
            //清空body
            this.ClearBodyFrame();
            //获取能够显示的房间列表
            var listRoom = this.GetCanShowRoomList();
            if (listRoom.Count == 0)
@@ -96,7 +106,10 @@
            this.btnFinishControl = new BottomClickButton();
            btnFinishControl.TextID = R.MyInternationalizationString.uFinish;
            bodyFrameLayout.AddChidren(btnFinishControl);
            btnFinishControl.Visible = false;
            if (this.listNewScene == null || this.listNewScene.Count == 0)
            {
                btnFinishControl.Visible = false;
            }
            btnFinishControl.ButtonClickEvent += (sender, e) =>
            {
                //回调函数
@@ -106,6 +119,54 @@
            //执行初始化(会自动触发SelectRoomEvent事件)
            roomSwitchContr.InitControl();
        }
        /// <summary>
        /// 初始化右上角的控件
        /// </summary>
        private void InitTopRightMenuControl()
        {
            //获取楼层
            var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
            if (dicFloor.Count == 0)
            {
                return;
            }
            var btnIconContr = new MostRightIconControl(69, 69);
            btnIconContr.UnSelectedImagePath = "Item/Drop_Down.png";
            topFrameLayout.AddChidren(btnIconContr);
            btnIconContr.InitControl();
            var btnFloor = new NormalViewControl(300, 69, true);
            btnFloor.Gravity = Gravity.CenterVertical;
            btnFloor.X = btnIconContr.X + btnIconContr.btnIcon.X - Application.GetRealWidth(300);
            btnFloor.TextAlignment = TextAlignment.CenterRight;
            topFrameLayout.AddChidren(btnFloor);
            foreach (var floorId in dicFloor.Keys)
            {
                //第一个楼层
                this.nowSelectFloorId = floorId;
                btnFloor.Text = dicFloor[floorId];
                break;
            }
            btnIconContr.ButtonClickEvent += (sender, e) =>
            {
                //楼层菜单
                var contr = new TopRightFloorMenuControl(dicFloor.Count, 2, this.nowSelectFloorId, Language.StringByID(R.MyInternationalizationString.SelectFloor));
                foreach (var floorId in dicFloor.Keys)
                {
                    contr.AddRowMenu(floorId, () =>
                    {
                        //记录起选择的ID
                        this.nowSelectFloorId = floorId;
                        btnFloor.Text = dicFloor[this.nowSelectFloorId];
                        //初始化中部信息
                        this.InitMiddleFrame();
                    });
                }
            };
        }
        #endregion
@@ -209,19 +270,23 @@
        /// <returns></returns>
        private List<Room> GetCanShowRoomList()
        {
            //先列表化
            this.listOldSceneId = new List<int>();
            this.listNewScene = new List<int>();
            foreach (var data in this.listAdjustTarget)
            if (this.listNewScene == null)
            {
                if (data.Type == 1)
                //先列表化
                this.listOldSceneId = new List<int>();
                this.listNewScene = new List<int>();
                foreach (var data in this.listAdjustTarget)
                {
                    //只要场景
                    listOldSceneId.Add(data.ElseScenesId);
                    if (data.Type == 1)
                    {
                        //只要场景
                        listOldSceneId.Add(data.ElseScenesId);
                    }
                }
            }
            //当前楼层的全部房间
            var lisrRoom = HdlRoomLogic.Current.GetRoomsByCurrentFloorIdAppendLoveRoom();
            var lisrRoom = HdlRoomLogic.Current.GetRoomsByFloorIdAppendLoveRoom(this.nowSelectFloorId);
            var listShowRoom = new List<Room>();
            foreach (var room in lisrRoom)
            {
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -152,18 +152,21 @@
                btnFloorName.Y = Application.GetRealHeight(17);
                btnFloorName.TextAlignment = TextAlignment.CenterRight;
                btnFloorName.IsBold = true;
                btnFloorName.Text = HdlResidenceLogic.Current.GetFloorNameById(Config.Instance.Home.CurrentFloorId);
                btnFloorName.Text = Common.Config.Instance.Home.GetCurrentFloorName;
                frameSwitchBack.AddChidren(btnFloorName);
                btnFloorName.ButtonClickEvent += (sender, e) =>
                {
                    var floors = new SelectFloorForm();
                    floors.CurFloorId = Config.Instance.Home.CurrentFloorId;
                    AddChidren(floors);
                    floors.Init(580, 330, Direction.Right);
                    floors.changeFloor = true;
                    floors.FloorAction += (floorId) =>
                    {
                        btnFloorName.Text = HdlResidenceLogic.Current.GetFloorNameById(floorId);
                        Config.Instance.Home.CurrentFloorId = floorId;
                        HdlRoomLogic.Current.NowCategoryRoom = HdlRoomLogic.Current.GetLoveRoom();
                        //这个时候需要刷新主页
                        UserPage.Instance.RefreshMainPageForm = true;
                        //刷新bodyView
                        this.RefreshBodyView();
                    };
@@ -277,7 +280,7 @@
        private void InitRoomMenuControl()
        {
            //当前楼层的全部房间
            var lisrRoom = HdlRoomLogic.Current.GetRoomsByCurrentFloorIdAppendLoveRoom();
            var lisrRoom = HdlRoomLogic.Current.GetRoomsByFloorIdAppendLoveRoom(Config.Instance.Home.CurrentFloorId);
            if (HdlRoomLogic.Current.NowCategoryRoom == null)
            {
                //设置第一个为初始房间
@@ -633,12 +636,13 @@
                        HdlThreadLogic.Current.RunMain(() =>
                        {
                            listview1.EndHeaderRefreshing();
                            if (result == true)
                            //listview1.Parent为null代表它切换房间了
                            if (result == true && listview1.Parent != null)
                            {
                                //在外面清空(特效的问题)
                                this.functionSceneBodyView.RemoveAll();
                                //刷新场景的时候,关闭左划菜单的未分配界面
                                MainPage.LeftListRoomViewFrom.Instance?.CloseUnallocatedRoomForm();
                                //在外面清空(特效的问题)
                                this.functionSceneBodyView.RemoveAll();
                                HdlThreadLogic.Current.RunMainInThread(() =>
                                {
@@ -820,7 +824,11 @@
                        //已经接收到网关的反馈 2020.05.09:删除Ack主题
                        this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu();
                        //刷新控件
                        this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
                        if (locadevice.Type != DeviceType.IASZone)
                        {
                            //传感器不需要属性上报(但是那个球型传感器居然会属性上报)
                            this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
                        }
                    }
                }, ShowErrorMode.NO);
            });
ZigbeeApp/Shared/Phone/Category/SelectFloorForm.cs
@@ -9,10 +9,6 @@
        public Action<string> FloorAction;
        /// <summary>
        /// 是否切换为当前楼层
        /// </summary>
        public bool changeFloor = true;
        /// <summary>
        /// 当前传过来的floorid
        /// </summary>
        public string CurFloorId = string.Empty;
@@ -127,32 +123,11 @@
            frow.Width = this.GetPictrueRealSize(449);
            frow.Height = this.GetPictrueRealSize(150);
            frow.Init("Floor/Floor.png", "Floor/FloorSelected.png", floorName);
            verticalScrolView.AddChidren(frow);
            if (string.IsNullOrEmpty(CurFloorId))
            {
                if (Config.Instance.Home.CurrentFloorId == floorId)
                {
                    frow.IsSelected = true;
                }
            }
            else
            {
                if (CurFloorId == floorId)
                {
                    frow.IsSelected = true;
                }
            }
            verticalScrolView.AddChidren(frow);
            frow.IsSelected = floorId == this.CurFloorId;
            frow.ButtonClickEvent += (sender, e) =>
            {
                frow.IsSelected = true;
                if (changeFloor)
                {
                    Config.Instance.Home.CurrentFloorId = floorId;
                    Config.Instance.Home.Save(false);
                    UserCenter.HdlRoomLogic.Current.RefreshRoomListView();
                }
                RemoveView();
                FloorAction?.Invoke(floorId);
            };
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs
@@ -70,7 +70,9 @@
            //场景点击
            sceneContr.ButtonClickEvent += (sender, e) =>
            {
                this.SceneUpHandler();
                //不能反复点击
                sceneContr.CanClick = false;
                this.SceneUpHandler(sceneContr);
            };
            //收藏
@@ -243,8 +245,13 @@
                {
                    //隐藏右划菜单
                    this.HideMenu();
                    scene.SceneDelayTime = t;
                    btnDelayTime.Text = CommonFormResouce.GetTimeString(t);
                    if (t != 0)
                    {
                        scene.SceneDelayTime = t;
                        btnDelayTime.Text = CommonFormResouce.GetTimeString(t);
                        //编辑延时时,需要刷新主页
                        UserView.UserPage.Instance.RefreshAllForm = true;
                    }
                };
            };
        }
@@ -254,9 +261,8 @@
        /// <summary>
        /// 
        /// </summary>
        /// <param name="btnScenePic"></param>
        /// <param name="btnSceneName"></param>
        private async void SceneUpHandler()
        /// <param name="sceneContr"></param>
        private async void SceneUpHandler(ScenePictrueControl sceneContr)
        {
            if (scene.SceneDelayTime <= 0 && scene.RemainTime <= 0)
            {
@@ -267,6 +273,7 @@
            var result = await HdlSceneLogic.Current.ControlScene(scene);
            if (result == false)
            {
                sceneContr.CanClick = true;
                return;
            }
            
@@ -274,8 +281,12 @@
            scene.SceneDelayTime = 0;
            if (scene.RemainTime <= 0)
            {
                sceneContr.CanClick = true;
                return;
            }
            //调用有延时的场景,需要刷新主页
            UserView.UserPage.Instance.RefreshAllForm = true;
            int myRemainTime = scene.RemainTime;
            //开启内部延时时间线程(旨在全部地方的同一场景时间同步)
            HdlSceneLogic.Current.StartDelayTimeThread(scene);
@@ -298,6 +309,7 @@
                        SetTimeImage();
                        //直接开启Loading特效
                        this.StartLoadingApreal();
                        sceneContr.CanClick = true;
                    }
                });
            })
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -1236,12 +1236,16 @@
        /// <param name="method">请求方式为POST/GET</param>
        /// <param name="second">超时时间</param>
        /// <returns></returns>
        public static async System.Threading.Tasks.Task<string> HttpWebRequest(string getUrl, string str, string method, int second = 3)
        public static async System.Threading.Tasks.Task<string> HttpWebRequest(string getUrl, string str, string method, int second = 3, bool _bool = false)
        {
            HttpWebRequest request = WebRequest.Create(getUrl) as HttpWebRequest; //创建请求
            request.Method = method; //请求方式为POST/GET
            request.ContentType = "application/json";
            request.ContentType = "application/json";
            request.Timeout = second * 1000;//超时时间
            if (_bool) {
                //用于高胜可视对讲接口
                request.Headers.Add("Authorization", Config.Instance.Token);
            }
            if (method == "POST")
            {
                byte[] jsonbyte = System.Text.Encoding.UTF8.GetBytes(str);
ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
@@ -64,8 +64,7 @@
        }
        #region ◆ 自动化__________________________
       static bool If_once = true;
        public static bool If_once = true;//进来只读一次标识;
        /// <summary>
        /// 自动化功能代码入口
        /// </summary>
@@ -276,9 +275,9 @@
                {
                    if (If_once)
                    {
                        If_once = false;
                        if (Common.Logic.LogicList.Count == 0)
                        {
                            If_once = false;
                            var Idlist1 = await Send.GetLogicId(0);//
                            var Idlist2 = await Send.GetLogicId(2);//门锁常开模式
                            if (Idlist1.Count != 0)
ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs
New file
@@ -0,0 +1,275 @@
using System;
using Newtonsoft.Json.Linq;
using Shared.Common;
using System.Collections.Generic;
using Shared.Phone.Device.Logic;
namespace Shared.Phone.Device.VideoIntercom
{
    public class VideoMachine : FrameLayout
    {
        public VideoMachine()
        {
        }
        public void Show(List<VideoCalss> videoInfosLists)
        {
            TopView view = new TopView();
            this.AddChidren(view.TopRowView());
            view.toptitleNameBtn.TextID = R.MyInternationalizationString.videoIntercom;
            view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); };
            var middle = new VerticalRefreshLayout
            {
                Y = view.topRowLayout.Bottom,
                Height = Application.GetRealHeight(Method.H - 184),
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
            };
            this.AddChidren(middle);
            for (int i = 0; i < videoInfosLists.Count; i++)
            {
                var videoInfos = videoInfosLists[i];
                var fLayout = new FrameLayout
                {
                    Height = Application.GetRealHeight(160),
                    BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                };
                middle.AddChidren(fLayout);
                var iconBtn = new Button
                {
                    Width = Application.GetMinRealAverage(81),
                    Height = Application.GetMinRealAverage(81),
                    X = Application.GetRealWidth(58),
                    Y = Application.GetRealHeight(55),
                    UnSelectedImagePath = "Item/videoIntercom.png",
                };
                fLayout.AddChidren(iconBtn);
                var nameBtn = new Button
                {
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                    TextSize = 15,
                    Y = Application.GetRealHeight(30),
                    X = Application.GetRealWidth(176),
                    Height = Application.GetRealHeight(60),
                    Width = Application.GetRealWidth(400),
                    Text = videoInfos.DeviceName,
                };
                fLayout.AddChidren(nameBtn);
                var name1Btn = new Button
                {
                    Text = videoInfos.RoomName,
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                    TextSize = 12,
                    Y = nameBtn.Bottom + Application.GetRealHeight(3),
                    X = Application.GetRealWidth(176),
                    Height = Application.GetRealHeight(60),
                    Width = Application.GetRealWidth(400),
                };
                fLayout.AddChidren(name1Btn);
                var nextBtn = new Button
                {
                    Width = Application.GetMinRealAverage(104),
                    Height = Application.GetMinRealAverage(104),
                    UnSelectedImagePath = "Item/videoIntercomNext.png",
                    X = Application.GetRealWidth(743 + 176),
                    Y = Application.GetRealHeight(30),
                };
                fLayout.AddChidren(nextBtn);
                var lineBtn = new Button
                {
                    Width = Application.GetRealWidth(845),
                    Height = 1,
                    Y = fLayout.Height - 1,
                    X = Application.GetRealWidth(176),
                    BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
                };
                fLayout.AddChidren(lineBtn);
                var clickBtn = new Button
                {
                    Height = Application.GetRealHeight(160),
                };
                fLayout.AddChidren(clickBtn);
                clickBtn.MouseUpEventHandler += (sen, e) =>
                 {
#if iOS
                     GateWay.Ios.ESVideoInfo eSVideoInfo = new GateWay.Ios.ESVideoInfo();
                     eSVideoInfo.DeviceName = videoInfos.DeviceName;
                     eSVideoInfo.ESVideoUUID = videoInfos.ESVideoUUID;
                     eSVideoInfo.ESRoomID = videoInfos.ESRoomID;
                     eSVideoInfo.RoomName = videoInfos.RoomName;
                     GateWay.Ios.ESVideo.ShowESVideoMonitor(eSVideoInfo);
#elif Android
#endif
                 };
            }
        }
        /// <summary>
        /// 判断账号是否支持可视对讲
        /// </summary>
        /// <param name="topFrameLayout"></param>
        public async static void AccountSupportVideo(FrameLayout topFrameLayout)
        {
            var jobject = new JObject();
            jobject.Add("RequestVersion", CommonPage.RequestVersion);
            jobject.Add("RequestSource", "0");
            jobject.Add("HomeID", Config.Instance.HomeId);
            var url = "https://developer.hdlcontrol.com/ProposedProductionApi/VideoIntercom/CheckBindRecord";
            var str = await Send.HttpWebRequest(url, jobject.ToString(), "POST", 3, true);
            if (!string.IsNullOrEmpty(str))
            {
                try
                {
                    var json = JObject.Parse(str);
                    if (json != null)
                    {
                        var stateCode = json["StateCode"].ToString();
                        //可视对讲快捷方式
                        var videoIntercomBtn = new Button();
                        videoIntercomBtn.Gravity = Gravity.CenterVertical;
                        videoIntercomBtn.UnSelectedImagePath = "Item/videoIntercom.png";
                        videoIntercomBtn.Width = Application.GetMinRealAverage(69);
                        videoIntercomBtn.Height = Application.GetMinRealAverage(69);
                        List<VideoCalss> videoList= new List<VideoCalss>();
                        if (stateCode == "Success")
                        {//判断这个账号是否绑定;
                            topFrameLayout.AddChidren(videoIntercomBtn);
                            CloudsVideo cloudsVideo = Newtonsoft.Json.JsonConvert.DeserializeObject<CloudsVideo>(json["ResponseData"].ToString());
                            videoList = await GetVideoInfoList(cloudsVideo);
                        }
                        if (UserCenter.UserCenterResourse.ResidenceOption.SafetyShortcut)
                        {
                            videoIntercomBtn.X = Application.GetRealWidth(746 + 10);
                        }
                        else
                        {
                            videoIntercomBtn.X = Application.GetRealWidth(850 + 10);
                        }
                        videoIntercomBtn.MouseUpEventHandler += (sender, e) =>
                        {
                            var videoMachine = new Device.VideoIntercom.VideoMachine();
                            UserView.HomePage.Instance.AddChidren(videoMachine);
                            UserView.HomePage.Instance.PageIndex += 1;
                            videoMachine.Show(videoList);
                        };
                    }
                }
                catch { }
            }
        }
        /// <summary>
        /// 获取可视对讲列表
        /// </summary>
        static async System.Threading.Tasks.Task<List<VideoCalss>> GetVideoInfoList(CloudsVideo clouds)
        {
            List<VideoCalss> eSVideoInfosList = new List<VideoCalss>();
            var jobject = new JObject();
            jobject.Add("cmtID", clouds.FLCommunityID);
            jobject.Add("unitno", clouds.FLBuildingID);
            jobject.Add("method", "getUUIDList");
            var url = " http://112.74.164.111:180/api.php/Device/getmonitorUUID";
            var str = await Send.HttpWebRequest(url, jobject.ToString(), "POST");
            if (string.IsNullOrEmpty(str))
            {
                return eSVideoInfosList;
            }
            var json = JObject.Parse(str);
            if (json == null)
            {
                return eSVideoInfosList;
            }
            if (json["resCode"].ToString() != "0")
            {
                return eSVideoInfosList;
            }
            var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(json["list"].ToString());
            if (list.Count == 0)
            {
                return eSVideoInfosList;
            }
            foreach (var videoInfo in list)
            {
                VideoCalss eSVideoInfo = new VideoCalss();
                eSVideoInfo.ESRoomID = int.Parse(clouds.FLRoomID);
                string str1 = clouds.FLBuildingID.Substring(0, 2).TrimStart('0');
                string str2 = clouds.FLBuildingID.Substring(2, 2).TrimStart('0');
                eSVideoInfo.RoomName = str1 +Language.StringByID( R.MyInternationalizationString.dong) + str2 + Language.StringByID(R.MyInternationalizationString.unit);
                eSVideoInfo.DeviceName = videoInfo["aliasName"];
                if (videoInfo["uuid"].Contains(","))
                {
                    var uuid = videoInfo["uuid"].Split(',');
                    eSVideoInfo.ESVideoUUID = uuid[0];
                }
                else
                {
                    eSVideoInfo.ESVideoUUID = videoInfo["uuid"];
                }
                eSVideoInfosList.Add(eSVideoInfo);
            }
            return eSVideoInfosList;
        }
    }
    public class VideoCalss
    {
        /// <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;
    }
    public class CloudsVideo
    {
        /// <summary>
        /// 栋楼单元号
        /// </summary>
        public string FLBuildingID = string.Empty;
        /// <summary>
        /// 那栋楼的名称
        /// </summary>
        public string FLBuildingName = string.Empty;
        /// <summary>
        /// 小区ID
        /// </summary>
        public string FLCommunityID = string.Empty;
        /// <summary>
        /// 房间ID
        /// </summary>
        public string FLRoomID = string.Empty;
        /// <summary>
        /// 住宅ID
        /// </summary>
        public string HomeID = string.Empty;
        public string FLSecretKey = string.Empty;
    }
}
ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs
@@ -60,6 +60,7 @@
            this.ButtonClickEvent += (sender, e) =>
            {
                //调用场景
                this.CanClick = false;
                this.SetSceneAction();
            };
        }
@@ -125,12 +126,17 @@
                timeSelect.Init();
                timeSelect.TimeAction = (time) =>
                {
                    //选择的是不开启
                    if (time == 0) { return; }
                    i_scene.SceneDelayTime = time;
                   //时间图标不显示
                   this.btnTimeIcon.Visible = false;
                   //显示剩余的时间
                   this.btnTimeView.Text = this.GetTimeString(time, hourText, minuText, secondText);
                    //选择延时时,需要刷新主页
                    UserView.UserPage.Instance.RefreshAllForm = true;
                };
            };
@@ -195,7 +201,13 @@
            var result = await HdlSceneLogic.Current.ControlScene(scene);
            if (result == false)
            {
                this.CanClick = true;
                return;
            }
            if (scene.SceneDelayTime > 0)
            {
                //调用有延时的场景,需要刷新主页
                UserView.UserPage.Instance.RefreshAllForm = true;
            }
            //修改时间
            scene.RemainTime = scene.SceneDelayTime;
@@ -236,6 +248,7 @@
            }
            //开启延时倒计时特效
            this.CanClick = false;
            this.StartRemainTimeApreal(i_scene);
        }
@@ -251,6 +264,7 @@
        {
            if (i_scene.RemainTime <= 0)
            {
                this.CanClick = true;
                return;
            }
            int remainTine = i_scene.RemainTime;
@@ -284,6 +298,7 @@
                    this.btnTimeView.Text = string.Empty;
                    //直接开启Loading特效
                    this.StartLoadingApreal();
                    this.CanClick = true;
                });
            })
            { IsBackground = true }.Start();
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -74,6 +74,9 @@
                listBodyContr.RecoverTableHeight();
            }
            //初始化默认楼层ID
            this.InitDefultFloorId();
            //初始化头部控件
            this.InitTopFrameLayoutControl();
            //初始化中间控件
@@ -129,6 +132,9 @@
                    this.ShowSelectFloorForm(btnFloorName);
                };
            }
            //可视对讲快捷方式
            Shared.Phone.Device.VideoIntercom.VideoMachine.AccountSupportVideo(topFrameLayout);
            //安防快捷方式
            if (UserCenterResourse.ResidenceOption.SafetyShortcut)
            {
@@ -403,10 +409,9 @@
            roomPageView.SetLeftAndRightImageView(mLeftImageView, mRightImageView);
            //当前房间
            var listRoom = HdlRoomLogic.Current.GetRoomsByCurrentFloorIdAppendLoveRoom();
            var listRoom = HdlRoomLogic.Current.GetRoomsByFloorIdAppendLoveRoom(Config.Instance.Home.CurrentFloorId);
            if (HdlRoomLogic.Current.NowMainPageRoom == null)
            {
                //设置第一个为初始房间
                HdlRoomLogic.Current.NowMainPageRoom = listRoom[0];
            }
            var curIndex = 0;
@@ -506,7 +511,7 @@
                //当没有绑定有网关,左滑时,点击房间列表,则不鸟它
                return;
            }
            var listRoom = HdlRoomLogic.Current.GetRoomsByCurrentFloorIdAppendLoveRoom();
            var listRoom = HdlRoomLogic.Current.GetRoomsByFloorIdAppendLoveRoom(Config.Instance.Home.CurrentFloorId);
            for (int i = 0; i < listRoom.Count; i++)
            {
                if (room.Id == listRoom[i].Id)
@@ -522,7 +527,7 @@
            //重置一下楼层名字
            if (this.btnFloorName != null)
            {
                btnFloorName.Text = HdlResidenceLogic.Current.GetFloorNameById(Config.Instance.Home.CurrentFloorId);
                btnFloorName.Text = Config.Instance.Home.GetCurrentFloorName;
            }
        }
@@ -1096,7 +1101,11 @@
                        //已经接收到网关的反馈 2020.05.09:删除Ack主题
                        this.dicDeviceCardControl[mainKeys].SetHadGetResponeResultStatu();
                        //刷新控件
                        this.dicDeviceCardControl[mainKeys].RefreshControlInfo(locadevice);
                        if (locadevice.Type != DeviceType.IASZone)
                        {
                            //传感器不需要属性上报(但是那个球型传感器居然会属性上报)
                            this.dicDeviceCardControl[mainKeys].RefreshControlInfo(locadevice);
                        }
                    }
                }, ShowErrorMode.NO);
            });
@@ -1155,13 +1164,16 @@
        private void ShowSelectFloorForm(NormalViewControl btnFloor)
        {
            var floorFL = new Category.SelectFloorForm();
            floorFL.CurFloorId = Config.Instance.Home.CurrentFloorId;
            this.AddChidren(floorFL);
            floorFL.Init(35, 153);
            floorFL.changeFloor = true;
            floorFL.FloorAction = (floorId) =>
            {
                btnFloor.Text = HdlResidenceLogic.Current.GetFloorNameById(floorId);
                Config.Instance.Home.CurrentFloorId = floorId;
                HdlRoomLogic.Current.NowMainPageRoom = HdlRoomLogic.Current.GetLoveRoom();
                //分类界面需要刷新
                UserView.UserPage.Instance.RefreshCategoryForm = true;
                this.ShowForm();
            };
        }
@@ -1203,6 +1215,23 @@
            return true;
        }
        /// <summary>
        /// 初始化默认楼层ID
        /// </summary>
        private void InitDefultFloorId()
        {
            if (Config.Instance.Home.CurrentFloorId != string.Empty)
            {
                return;
            }
            var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
            foreach (var floorId in dicFloor.Keys)
            {
                Config.Instance.Home.CurrentFloorId = floorId;
                break;
            }
        }
        #endregion
        #region ■ 界面重新激活事件___________________
ZigbeeApp/Shared/Phone/MainPage/LeftListRoomViewFrom.cs
@@ -96,13 +96,18 @@
            };
            //获取楼层
            this.curFloorId = Config.Instance.Home.CurrentFloorId;
            var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
            if (dicFloor.Count == 0)
            {
                return;
            }
            //楼层初始ID
            foreach (var floorId in dicFloor.Keys)
            {
                this.curFloorId = floorId;
                break;
            }
            //楼层图标
            var btnIconContr = new MostRightIconControl(69, 69);
            btnIconContr.UnSelectedImagePath = "Item/Drop_Down.png";
@@ -120,9 +125,9 @@
            {
                //楼层菜单
                var floors = new Category.SelectFloorForm();
                floors.CurFloorId = this.curFloorId;
                AddChidren(floors);
                floors.changeFloor = false;
                floors.CurFloorId = curFloorId;
                floors.CurFloorId = this.curFloorId;
                floors.Init(599, 161, Direction.Right);
                floors.FloorAction += (floorId) =>
                {
@@ -219,7 +224,6 @@
                    {
                        return;
                    }
                    string oldFloorId = Config.Instance.Home.CurrentFloorId;
                    CommonPage.Instance.CloseLeftMenu();
                    HdlThreadLogic.Current.RunThread(() =>
@@ -231,10 +235,11 @@
                            //点击的是收藏房间的话,不变更当前楼层id
                            if (room.FloorId != string.Empty)
                            {
                                Config.Instance.Home.CurrentFloorId = room.FloorId;
                                if (oldFloorId != room.FloorId)
                                if (Config.Instance.Home.CurrentFloorId != room.FloorId)
                                {
                                    //楼层都切换的话,刷新整个主页
                                    Config.Instance.Home.CurrentFloorId = room.FloorId;
                                    HdlRoomLogic.Current.NowMainPageRoom = room;
                                    UserPage.Instance.ReFreshControl();
                                    return;
                                }
ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
@@ -536,6 +536,11 @@
            {
                HdlControlLogic.Current.ShowBottomListRoomView(string.Empty, Language.StringByID(R.MyInternationalizationString.AddTo), (selectId, selectName) =>
                {
                    if (selectId == string.Empty)
                    {
                        //选择的是未分配
                        return;
                    }
                    //变更了当前房间的东西,主页需要刷新
                    if (HdlRoomLogic.Current.NowMainPageRoom.Id == selectId)
                    {
@@ -543,7 +548,9 @@
                    }
                    //保存选择的设备和场景
                    var room = HdlRoomLogic.Current.GetRoomById(selectId);
                    this.SaveSelectDeviceAndScene(room);
                    this.SaveSelectDeviceAndScene(room);
                    //分类界面需要刷新
                    UserPage.Instance.RefreshCategoryForm = true;
                });
            };
        }
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/TopRightFloorMenuControl.cs
@@ -35,6 +35,10 @@
        /// 行数
        /// </summary>
        private int RowCount = 0;
        /// <summary>
        /// 当前楼层id
        /// </summary>
        private string nowFloorId = string.Empty;
        #endregion
@@ -48,9 +52,11 @@
        /// <para>1: 395宽度</para>
        /// <para>2: 449宽度</para>
        /// </param>
        /// <param name="i_floorId">当前选择的楼层ID</param>
        /// <param name="titleText">标题文本(如果不为空,菜单模式变更为拥有标题的模式)</param>
        public TopRightFloorMenuControl(int i_RowCount, int i_widthType, string titleText = null)
        public TopRightFloorMenuControl(int i_RowCount, int i_widthType,string i_floorId, string titleText = null)
        {
            this.nowFloorId = i_floorId;
            this.RowCount = i_RowCount;
            if (i_widthType == 1)
            {
@@ -162,7 +168,7 @@
                btnLine.X = Application.GetRealWidth(81);
            }
            if (floorId == Common.Config.Instance.Home.CurrentFloorId)
            if (this.nowFloorId == floorId)
            {
                //当前楼层默认设置为选择状态
                this.SetRowSelectStatu(rowFrame, true);
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
@@ -137,7 +137,7 @@
                            this.RefreshDfunctionType();
                            //设备改变功能类型的话,主页需要重新刷新
                            UserView.UserPage.Instance.RefreshForm = true;
                            UserView.UserPage.Instance.RefreshAllForm = true;
                            //调用回调函数
                            this.FinishSelectEvent?.Invoke(nowSelectNo);
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs
@@ -79,7 +79,7 @@
            var room = HdlRoomLogic.Current.GetRoomBySceneId(this.SceneId);
            if (room != null)
            {
                btnRoom.Text = room.Name;
                btnRoom.Text = HdlRoomLogic.Current.GetRoomName(room);
            }
            else
            {
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
@@ -38,7 +38,7 @@
                //如果没有自动备份数据,则把本地全部东西上传
                var pathTemp = DirNameResourse.AutoBackupDirectory;
                //复制本地所有文件过去
                List<string> listAllFile = Global.FileListByHomeId();
                List<string> listAllFile = HdlFileLogic.Current.GetRootPathListFile();
                foreach (string fileName in listAllFile)
                {
                    string oldFile = System.IO.Path.Combine(Config.Instance.FullPath, fileName);
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
@@ -245,7 +245,7 @@
            if (upPath == string.Empty)
            {
                //获取本地文件
                listAllFile = Global.FileListByHomeId();
                listAllFile = HdlFileLogic.Current.GetRootPathListFile();
                fullDir = Common.Config.Instance.FullPath;
            }
            else
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
@@ -168,8 +168,6 @@
            var listFloorKey = this.GetAllFloorKeys();
            var dicRoomName = this.GetRoomSampleList();
            //设置初始楼层
            Config.Instance.Home.CurrentFloorId = listFloorKey[0];
            foreach (string floorKey in listFloorKey)
            {
                foreach (string roomId in dicRoomName.Keys)
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFileLogic.cs
@@ -212,21 +212,37 @@
                return new List<string>();
            }
            List<string> list = new List<string>();
            var files = System.IO.Directory.GetFiles(directory);
            foreach (var file in files)
            var list = new List<string>();
            try
            {
                string fileName = file;
                if (onlyFileName == true)
                //2020.07.10的时候,出现过获取失败异常 提示:write fault on path
                var files = System.IO.Directory.GetFiles(directory);
                foreach (var file in files)
                {
                    fileName = fileName.Substring(directory.Length + 1);
                    string fileName = file;
                    if (onlyFileName == true)
                    {
                        fileName = fileName.Substring(directory.Length + 1);
                    }
                    list.Add(fileName);
                }
                list.Add(fileName);
            }
            catch (Exception ex)
            { HdlLogLogic.Current.WriteLog(ex); }
            return list;
        }
        /// <summary>
        /// 获取根目录的全部文件列表
        /// </summary>
        /// <returns></returns>
        public List<string> GetRootPathListFile()
        {
            return this.GetFileFromDirectory(Common.Config.Instance.FullPath);
        }
        /// <summary>
        /// 将指定文件夹里面的全部文件移动到当前住宅的文件夹内
        /// </summary>
        /// <param name="fulldirectory">文件夹全路径</param>
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -226,7 +226,7 @@
                return false;
            }
            //添加网关的话,强制主页刷新
            UserView.UserPage.Instance.RefreshForm = true;
            UserView.UserPage.Instance.RefreshAllForm = true;
            return true;
        }
@@ -546,7 +546,7 @@
            }
            //添加网关的话,强制主页刷新
            UserView.UserPage.Instance.RefreshForm = true;
            UserView.UserPage.Instance.RefreshAllForm = true;
            return 1;
        }
@@ -621,7 +621,7 @@
            //切换网关,保存缓存
            this.SaveGatewayIdToLocation(gatewayId);
            //切换网关的话,主页需要重新刷新
            UserView.UserPage.Instance.RefreshForm = true;
            UserView.UserPage.Instance.RefreshAllForm = true;
            return true;
        }
@@ -983,7 +983,7 @@
        public List<string> GetAllGatewayFile()
        {
            List<string> list = new List<string>();
            List<string> listFile = Global.FileListByHomeId();
            List<string> listFile = HdlFileLogic.Current.GetRootPathListFile();
            foreach (string file in listFile)
            {
                //只获取网关设备
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs
@@ -160,7 +160,7 @@
            home.Name = residenceName;
            home.Save();
            //住宅修改名称的话,主页需要重新刷新
            UserView.UserPage.Instance.RefreshForm = true;
            UserView.UserPage.Instance.RefreshAllForm = true;
        }
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs
@@ -62,7 +62,7 @@
            //检测我的喜爱这个房间对象
            this.CheckLoveRoom();
            var listFile = Global.FileListByHomeId();
            var listFile = HdlFileLogic.Current.GetRootPathListFile();
            foreach (var fileName in listFile)
            {
                if (fileName.StartsWith("Room_") == true)
@@ -75,8 +75,6 @@
                    }
                }
            }
            //设置当前楼层的ID
            Config.Instance.Home.SetCurrentFloorId();
            //顺便刷新场景
            HdlSceneLogic.Current.ReFreshByLocal();
            //刷新房间视图列表
@@ -88,7 +86,7 @@
        /// </summary>
        public void RefreshAllRoomByLocation()
        {
            var listFile = Global.FileListByHomeId();
            var listFile = HdlFileLogic.Current.GetRootPathListFile();
            //我的喜爱的房间必须要在第0位才行
            string fRoom = "Room_Favorite.json";
@@ -242,6 +240,17 @@
        /// <returns></returns>
        public void RemoveRoom(string roomId, bool refreshLeftView = true)
        {
            if (this.NowMainPageRoom != null && this.NowMainPageRoom.Id == roomId)
            {
                //当删除的是主页的房间的时候
                this.NowMainPageRoom = this.GetLoveRoom();
            }
            if (this.NowCategoryRoom != null && this.NowCategoryRoom.Id == roomId)
            {
                //当删除的是分类的房间的时候
                this.NowCategoryRoom = this.GetLoveRoom();
            }
            //根据房间Id,获取房间对象
            var room = this.GetRoomById(roomId);
            if (room == null)
@@ -482,7 +491,7 @@
                    }
                }
            }
            return listRoom;
            return this.SortRoom(listRoom);
        }
        /// <summary>
@@ -497,35 +506,6 @@
                listRoom.Add(room);
            }
            return this.SortRoom(listRoom);
        }
        /// <summary>
        /// 获取当前楼层的房间名称
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public List<string> GetRoomNamesByFloorId(string id)
        {
            var listName = new List<string>();
            if (Config.Instance.Home.FloorDics.Count == 0)
            {
                //没有楼层
                foreach (var room in this.dicRooms.Values)
                {
                    listName.Add(room.Name);
                }
            }
            else
            {
                foreach (var room in this.dicRooms.Values)
                {
                    if (room.FloorId == id)
                    {
                        listName.Add(room.Name);
                    }
                }
            }
            return listName;
        }
        /// <summary>
@@ -557,17 +537,10 @@
                    }
                }
            }
            listRoom = this.SortRoom(listRoom);
            listRoom.Insert(0, GetLoveRoom());
            return listRoom;
        }
        /// <summary>
        /// 获取当前楼层的房间(拼接了【常用】在第一位)
        /// </summary>
        /// <returns></returns>
        public List<Room> GetRoomsByCurrentFloorIdAppendLoveRoom()
        {
            return this.GetRoomsByFloorIdAppendLoveRoom(Config.Instance.Home.CurrentFloorId);
        }
        #endregion
@@ -590,7 +563,7 @@
                //移除我的喜爱
                this.DeleteLoveDevice(device);
                //设备改变房间的话,主页需要重新刷新
                UserView.UserPage.Instance.RefreshForm = true;
                UserView.UserPage.Instance.RefreshAllForm = true;
                return;
            }
            //房间是否修改
@@ -608,7 +581,7 @@
                this.AddDevice(room, device, saveRealRoom);
            }
            //设备改变房间的话,主页需要重新刷新
            UserView.UserPage.Instance.RefreshForm = true;
            UserView.UserPage.Instance.RefreshAllForm = true;
        }
        /// <summary>
@@ -681,6 +654,8 @@
                    //保存到本地
                    loveRoom.ListDevice.Add(mainkeys);
                    loveRoom.Save();
                    //添加收藏设备时,需要刷新主页
                    UserView.UserPage.Instance.RefreshAllForm = true;
                }
            }
        }
@@ -744,6 +719,8 @@
                loveRoom.Save();
                //更改自动备份
                HdlAutoBackupLogic.AddOrEditorFile(loveRoom.FileName);
                //添加收藏设备时,需要刷新主页
                UserView.UserPage.Instance.RefreshAllForm = true;
            }
        }
@@ -1021,6 +998,11 @@
        /// <returns></returns>
        public Dictionary<string, string> GetFloorSortList()
        {
            //没有楼层
            if (Config.Instance.Home.FloorDics.Count == 0)
            {
                return new Dictionary<string, string>();
            }
            //从一堆文字中,获取这一堆文字里面数字字符串的最长长度
            var listName = new List<string>();
            foreach (var floorName in Config.Instance.Home.FloorDics.Values)
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs
@@ -403,6 +403,8 @@
            {
                nowRoom.ListSceneId.Add(scene.Id);
                nowRoom.Save();
                //添加收藏场景时,需要刷新主页
                UserView.UserPage.Instance.RefreshAllForm = true;
            }
        }
@@ -616,6 +618,8 @@
                    HdlAutoBackupLogic.DeleteFile(sceneUI.IconPath);
                }
            }
            //删除场景时,需要刷新主页
            UserView.UserPage.Instance.RefreshAllForm = true;
        }
        /// <summary>
@@ -660,6 +664,8 @@
            {
                nowRoom.ListSceneId.Remove(scene.Id);
                nowRoom.Save();
                //取消收藏场景时,需要刷新主页
                UserView.UserPage.Instance.RefreshAllForm = true;
            }
        }
@@ -960,7 +966,7 @@
        public List<string> GetAllSceneFile()
        {
            List<string> listSceneFile = new List<string>();
            List<string> listAllFile = Global.FileListByHomeId();
            List<string> listAllFile = HdlFileLogic.Current.GetRootPathListFile();
            foreach (string file in listAllFile)
            {
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
@@ -343,7 +343,7 @@
            //清空楼层数据
            Common.Config.Instance.Home.FloorDics.Clear();
            //然后检测本地的文件
            var listLocalFile = Global.FileListByHomeId();
            var listLocalFile = HdlFileLogic.Current.GetRootPathListFile();
            foreach (string fileName in listLocalFile)
            {
                if (fileName == DirNameResourse.ShardFloorFile)
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -770,7 +770,7 @@
        public static bool InitUserCenterMenmoryAndThread(bool ShowPrompted = true)
        {
            //调用这个方法,都需要重新刷新主页
            UserView.UserPage.Instance.RefreshForm = true;
            UserView.UserPage.Instance.RefreshAllForm = true;
            //添加网络状态监听
            HdlWifiLogic.Current.StartListenNetWork();
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
@@ -17,9 +17,13 @@
        /// </summary>
        public Action FloorAction = null;
        /// <summary>
        /// 选中的楼层回调[
        /// 选中的楼层回调
        /// </summary>
        public Action<string, Button> ChooseFloorAction = null;
        /// <summary>
        ///  重新加载
        /// </summary>
        public Action ReLoadAction = null;
        public FrameLayout topFrameLayout = new FrameLayout { Height = Application.GetRealHeight(184), BackgroundColor = ZigbeeColor.Current.XMTopFrameLayout };
        public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1925 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout };
@@ -95,7 +99,7 @@
            btnTitle.Text = titleText;
        }
        /// <summary>
        /// 门锁中部布局
        /// 中部布局
        /// </summary>
        /// <param name="frameLayout"></param>
        public void MidFrameLayout(FrameLayout frameLayout)
@@ -106,7 +110,7 @@
        }
        /// <summary>
        /// 门锁底部布局
        /// 底部布局
        /// </summary>
        /// <param name="frameLayout"></param>
        public void BottomFrameLayout(FrameLayout frameLayout)
@@ -118,6 +122,28 @@
                BackgroundColor = ZigbeeColor.Current.XMWhite,
            };
            this.midFrameLayout.AddChidren(bottomFrameLayout1);
        }
        /// <summary>
        /// 显示重新加载的界面(主要是用在界面加载错误时,再次加载)
        /// </summary>
        public void ShowReLoadView()
        {
            var frame = new FrameLayout();
            frame.BackgroundColor = UserCenterColor.Current.White;
            frame.Tag = "ReLoadView";
            this.midFrameLayout.AddChidren(frame);
            //重新加载
            var btnReLoad = new BottomClickButton();
            btnReLoad.Gravity = Gravity.Center;
            btnReLoad.TextID = R.MyInternationalizationString.uDoReload;
            frame.AddChidren(btnReLoad);
            btnReLoad.ButtonClickEvent += (sender, e) =>
            {
                ReLoadAction?.Invoke();
                ReLoadAction = null;
            };
        }
        /// <summary>
@@ -134,7 +160,6 @@
            btnFloorText = new Button
            {
                Width = Application.GetRealWidth(300 - 69 - 58),
                Text = Language.StringByID(R.MyInternationalizationString.FirstFloor),
                TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                TextSize = 14,
                IsBold = true,
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
@@ -274,10 +274,10 @@
        }
        /// <summary>
        /// 获取楼层对应的房间列表
        /// 获取支持的房间列表
        /// </summary>
        /// <returns></returns>
        public static List<Room> GetFloorRoomList()
        public static List<Room> GetSupportRoomList()
        {
            var supportRoomListTemp = new List<Room>();
            var listAllRoom = HdlRoomLogic.Current.GetAllListRooms();
@@ -347,10 +347,7 @@
                                var device = LocalDevice.Current.GetDevice(de);
                                if (device != null)
                                {
                                    //获取设备类型的
                                    var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                                    //新风面板的新风设备,则不显示
                                    if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                                    if (BindInfo.checkRealFreshAirDevice(device) == false)
                                    {
                                        continue;
                                    }
@@ -711,7 +708,7 @@
        {
            bool result = true;
            //获取设备类型的
            var clu = device.OutClusterList.Find((obj) => obj.OutCluster == 513);
            var clu = device.OutClusterList.Find((obj) => obj.OutCluster == 513 || obj.OutCluster == 514);
            if (clu != null)
            {
                result = false;
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
@@ -525,6 +525,10 @@
                                        }
                                    }
                                }
                                else
                                {
                                    btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed);
                                }
                                devicePic.UnSelectedImagePath = tempDev.IconPath;
                                devicePic.Text = "";
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs
@@ -54,6 +54,10 @@
                foreach (var bDev in bList)
                {
                    var device = LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                    if (device == null)
                    {
                        continue;
                    }
                    switch (curBindType)
                    {
                        case 0:
@@ -128,7 +132,6 @@
                                    //空调绑定类型
                                    if (device.Type == DeviceType.Thermostat && bDev.BindCluster == 513)
                                    {
                                        //Thermostat是空调
                                        tempList.Add(bDev);
                                    }
                                }
@@ -223,6 +226,10 @@
                foreach (var bDev in bList)
                {
                    var device = LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                    if (device == null)
                    {
                        continue;
                    }
                    switch (curBindType)
                    {
                        case 0:
@@ -296,7 +303,6 @@
                                    //空调绑定类型
                                    if (device.Type == DeviceType.Thermostat && bDev.BindCluster == 513)
                                    {
                                        //Thermostat是空调
                                        tempList.Remove(bDev.KeyEpoint);
                                    }
                                }
@@ -393,10 +399,10 @@
                                                roomIncludeMatchDevice.Add(device);
                                            }
                                        }
                                        if (device.Type == DeviceType.DimmableLight)
                                        {
                                            roomIncludeMatchDevice.Add(device);
                                        }
                                        //if (device.Type == DeviceType.DimmableLight)
                                        //{
                                        //    roomIncludeMatchDevice.Add(device);
                                        //}
                                        break;
                                    case 4:
                                        if (device.Type == DeviceType.WindowCoveringDevice)
@@ -407,7 +413,10 @@
                                    case 5:
                                        if (device.Type == DeviceType.Thermostat)
                                        {
                                            //Thermostat是空调
                                            if (BindInfo.checkRealAcDevice(device) == false)
                                            {
                                                continue;
                                            }
                                            roomIncludeMatchDevice.Add(device);
                                        }
                                        break;
@@ -579,10 +588,10 @@
                                {
                                    currentPanelBindSupportDeviceListTemp.Add(device);
                                }
                                if (device.Type == DeviceType.DimmableLight)
                                {
                                    currentPanelBindSupportDeviceListTemp.Add(device);
                                }
                                //if (device.Type == DeviceType.DimmableLight)
                                //{
                                //    currentPanelBindSupportDeviceListTemp.Add(device);
                                //}
                                break;
                            case 4:
                                if (device.Type == DeviceType.WindowCoveringDevice)
@@ -593,7 +602,10 @@
                            case 5:
                                if (device.Type == DeviceType.Thermostat)
                                {
                                    //Thermostat是空调
                                    if (BindInfo.checkRealAcDevice(device) == false)
                                    {
                                        continue;
                                    }
                                    currentPanelBindSupportDeviceListTemp.Add(device);
                                }
                                break;
@@ -715,10 +727,6 @@
                                    undistruibuteDevList.Add(device);
                                }
                            }
                            if (device.Type == DeviceType.DimmableLight)
                            {
                                undistruibuteDevList.Add(device);
                            }
                            break;
                        case 4:
                            if (device.Type == DeviceType.WindowCoveringDevice)
@@ -729,7 +737,10 @@
                        case 5:
                            if (device.Type == DeviceType.Thermostat)
                            {
                                //Thermostat是空调
                                if (BindInfo.checkRealAcDevice(device) == false)
                                {
                                    continue;
                                }
                                undistruibuteDevList.Add(device);
                            }
                            break;
@@ -826,21 +837,12 @@
                                    curRoomDeviceListTemp.Add(device);
                                }
                            }
                            if (device.Type == DeviceType.DimmableLight)
                            {
                                if (deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.ButtonPanel_SimpleMultifunction)
                                {
                                    //Thermostat是空调
                                    curRoomDeviceListTemp.Add(device);
                                }
                            }
                            break;
                        case 4:
                            if (device.Type == DeviceType.WindowCoveringDevice)
                            {
                                if (deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.ButtonPanel_SimpleMultifunction)
                                {
                                    //Thermostat是空调
                                    curRoomDeviceListTemp.Add(device);
                                }
                            }
@@ -848,11 +850,11 @@
                        case 5:
                            if (device.Type == DeviceType.Thermostat)
                            {
                                if (deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.ButtonPanel_SimpleMultifunction)
                                if (BindInfo.checkRealAcDevice(device) == false)
                                {
                                    //Thermostat是空调
                                    curRoomDeviceListTemp.Add(device);
                                    continue;
                                }
                                curRoomDeviceListTemp.Add(device);
                            }
                            break;
                        case 6:
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/PaneTargetsBaseForm.cs
@@ -93,7 +93,7 @@
        /// <summary>
        /// 楼层列表
        /// </summary>
        Dictionary<string, string> dicFloorList;
        Dictionary<string, string> dicFloorList = new Dictionary<string, string> { };
        /// <summary>
        /// 所有房间中支持被绑定的设备列表
        /// </summary>
@@ -130,7 +130,10 @@
        /// Ac绑定目标回调
        /// </summary>
        public Action<string> actionAcTarget = null;
        /// <summary>
        /// 是否能刷新
        /// </summary>
        private bool canFresh = false;
        #endregion
        #region UI设计
@@ -143,6 +146,7 @@
            //标题栏下的UI
            MidFrameLayoutContent();
            //初始化设备数据
            CommonPage.Loading.Start("");
            InitData();
        }
@@ -184,7 +188,7 @@
        /// <summary>
        /// 中部UI【标题栏下的UI】
        /// </summary>
        async void MidFrameLayoutContent()
        void MidFrameLayoutContent()
        {
            var btnMidTopLayout = new FrameLayout
            {
@@ -208,6 +212,7 @@
            this.midFrameLayout.AddChidren(midVerticalScrolViewLayout);
            midVerticalScrolViewLayout.BeginHeaderRefreshingAction += () =>
            {
                canFresh = true;
                midVerticalScrolViewLayout.BeginHeaderRefreshing();
                InitData();
            };
@@ -221,20 +226,24 @@
            };
            this.midFrameLayout.AddChidren(bottomFrameLayout);
            var bottomTipPicFrameLayout = new FrameLayout()
            {
                Height = Application.GetMinReal(40 + 44 - 10),
            };
            bottomFrameLayout.AddChidren(bottomTipPicFrameLayout);
            var btnTipPicFrameLayout = new FrameLayout()
            {
                Width = Application.GetMinReal(40 + 23 + 37),
                Width = Application.GetMinReal(23 + 37),
                Height = Application.GetMinReal(40 + 44 - 10),
                X = Application.GetMinReal(383 - 37),
            };
            bottomFrameLayout.AddChidren(btnTipPicFrameLayout);
            bottomTipPicFrameLayout.AddChidren(btnTipPicFrameLayout);
            btnTipPic = new Button()
            {
                Width = Application.GetMinReal(40),
                Height = Application.GetMinReal(40),
                X = Application.GetMinReal(40),
                Y = Application.GetRealHeight(22),
                Y = Application.GetRealHeight(19),
                UnSelectedImagePath = "BindPic/EmptyTargets.png",
                SelectedImagePath = "BindPic/EmptyTargetsSelected.png",
            };
@@ -243,14 +252,16 @@
            btnTipText = new Button()
            {
                Height = Application.GetRealHeight(84 - 10),
                X = Application.GetMinReal(444),
                X = Application.GetMinReal(58),
                Width = Application.GetMinReal(1080 - 446),
                TextID = R.MyInternationalizationString.BindEmptyTargets,
                TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,//XMTopTitleText
                TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                TextSize = 12,
                TextAlignment = TextAlignment.CenterLeft,
            };
            bottomFrameLayout.AddChidren(btnTipText);
            bottomTipPicFrameLayout.AddChidren(btnTipText);
            bottomTipPicFrameLayout.Width = btnTipPicFrameLayout.Width + Application.GetMinReal(2) + btnTipText.GetTextWidth();
            bottomTipPicFrameLayout.Gravity = Gravity.CenterHorizontal;
            EventHandler<MouseEventArgs> eHandlerEmptyTargets = (sender, e) =>
            {
@@ -306,20 +317,19 @@
        void RefreshRoomList()
        {
            Room curRoom = null;
            if (supportRoomList.Count == 0)
            {
                return;
            }
            btnHorizontalScrolViewLayout.RemoveAll();
            Button curentOldRoom = null;
            FrameLayout curentOldRoomFrameLayout = null;
            int index = 0;
            var roomTempList = BindInfo.GetSupportRoomList(curControlDev, supportRoomList, curDeviceBindType);
            Room slectedRoom = null;
            var roomUn = new Room();
            roomUn.Name = Language.StringByID(R.MyInternationalizationString.Undistributed);
            roomUn.Id = "UndistributedId";
            List<Room> roomTempList = new List<Room> { };
            if (supportRoomList.Count != 0)
            {
                roomTempList = BindInfo.GetSupportRoomList(curControlDev, supportRoomList, curDeviceBindType);
            }
            if (undistruibuteDevList.Count != 0)
            {
                roomTempList.Add(roomUn);
@@ -445,6 +455,8 @@
                    var btn = (Button)frame.GetChildren(0);
                    frame.BackgroundImagePath = "Item/RoomIconBackgroundSelected.png";
                    btn.TextColor = Shared.Common.ZigbeeColor.Current.XMWhite;
                    curentOldRoom = btn;
                    curentOldRoomFrameLayout = frame;
                }
                else
                {
@@ -464,7 +476,6 @@
            midVerticalScrolViewLayout.RemoveAll();
            Button oldDevice = null;
            int curIndex = 0;
            if (curRoom.Id == "UndistributedId")
            {
                currentRoomSupportBindDeviceList = BindInfo.GetUndistributeDeviceList(undistruibuteDevList, curDeviceBindType);
@@ -640,6 +651,26 @@
                btnChoose.MouseUpEventHandler += hander;
                curIndex++;
            }
            //首次是否能点击保存
            if (targetList.Count == 0)
            {
                if (targetListTemp.Count == 0)
                {
                    btnFinifh.Enable = false;
                    btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
                }
                else
                {
                    btnFinifh.Enable = true;
                    btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                }
            }
            else
            {
                btnFinifh.Enable = true;
                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
            }
        }
        #endregion
@@ -648,23 +679,19 @@
        /// <summary>
        /// 初始化设备数据
        /// </summary>
        void InitData()
        void InitData(bool canUpdateBindName = false)
        {
            System.Threading.Tasks.Task.Run(async () =>
            {
                try
                {
                    Application.RunOnMainThread(() =>
                    {
                        CommonPage.Loading.Start("");
                    });
                    //获取被绑目标等信息
                    BindDevInfo(curBindDevice);
                    //获取楼层
                    //获取楼层
                    dicFloorList = HdlRoomLogic.Current.GetFloorSortList();
                    //获取楼层中房间列表
                    supportRoomList = BindInfo.GetFloorRoomList();
                    //获取房间列表
                    supportRoomList = BindInfo.GetSupportRoomList();
                    //获取所有房间中匹配的能绑的目标
                    currentPanelSupportBindDeviceList = BindInfo.GetAllRoomSupportDeviceList(currentPanelSupportBindDeviceList, supportRoomList, curDeviceBindType);
@@ -685,13 +712,27 @@
                    {
                        Application.RunOnMainThread(() =>
                        {
                            CommonPage.Loading.Hide();
                            canFresh = false;
                            midVerticalScrolViewLayout.EndHeaderRefreshing();
                            CommonPage.Loading.Hide();
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                            this.midFrameLayout.RemoveAll();
                            ShowReLoadView();
                            ReLoadAction += () =>
                            {
                                this.midFrameLayout.RemoveAll();
                                //初始化设备数据
                                CommonPage.Loading.Start("");
                                MidFrameLayoutContent();
                                InitData(true);
                            };
                        });
                    }
                    targetList.Clear();
                    oldTargetList.Clear();
                    //选中目标列表 targetList
                    if (curControlDev.bindList.Count != 0)
                    {
@@ -700,7 +741,7 @@
                            var mainKey = bindDev.BindMacAddr + bindDev.BindEpoint;
                            //分配的目标列表
                            if (currentPanelSupportBindDeviceList.Count != 0)
                            if (Shared.Common.LocalDevice.Current.listAllDevice.Count != 0)
                            {
                                var dev = currentPanelSupportBindDeviceList.Find(obj => (obj != null) && (obj.DeviceAddr + obj.DeviceEpoint == mainKey));
                                if (dev != null)
@@ -738,31 +779,44 @@
                {
                    Application.RunOnMainThread(() =>
                    {
                        BindDownFrameLayout(this.midFrameLayout, curControlDev, dicFloorList, ref btnFloorText);
                        //楼层侧边栏绑定
                        if (!canFresh)
                        {
                            BindDownFrameLayout(this.midFrameLayout, curControlDev, dicFloorList, ref btnFloorText);
                        }
                        ChooseFloorAction += (floorId, btnMethodText) =>
                        {
                            btnFloorText.Text = string.Empty;
                            btnFloorText.Text = dicFloorList[floorId];
                            //获取楼层中房间列表
                            supportRoomList = BindInfo.GetFloorRoomList();
                            //获取房间列表
                            supportRoomList = BindInfo.GetSupportRoomList();
                            //获取本地未分配的支持当前类型的绑定设备列表
                            undistruibuteDevList = BindInfo.GetUndistributeDeviceList(undistruibuteDevList, curDeviceBindType);
                            RefreshRoomList();
                        };
                        //默认楼层显示
                        if (BindInfo.GetCurrentSelectFloorIdName() != null)
                        {
                            Application.RunOnMainThread(() =>
                            {
                                btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
                            });
                        }
                        //首次是否能点击保存
                        if (targetList.Count == 0)
                        {
                            curControlDev.currentSelectFloorId = BindInfo.GetCurrentSelectFloorId();
                            curControlDev.currentSelectRoomId = null;
                            if (BindInfo.GetCurrentSelectFloorIdName() != null)
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
                                });
                            }
                            btnFinifh.Enable = false;
                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
                            //更新外面目标名字:无
                            if (canUpdateBindName)
                            {
                                TargesBindName();
                            }
                        }
                        else
                        {
@@ -785,6 +839,28 @@
                                        curControlDev.currentSelectRoomId = "UndistributedId";
                                    }
                                }
                                if (canUpdateBindName)
                                {
                                    //更新外面目标名字:具体名字【刷新本地界面会导致外部目标变化】
                                    string bindName = Common.LocalDevice.Current.GetDeviceEpointName(dev);
                                    switch (curDeviceBindType)
                                    {
                                        case BindInfo.BindType.Temperature:
                                            if (dev.Type == DeviceType.PMSensor)
                                            {
                                                bindName += "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
                                            }
                                            break;
                                        case BindInfo.BindType.Humidity:
                                            if (dev.Type == DeviceType.PMSensor)
                                            {
                                                bindName += "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor);
                                            }
                                            break;
                                    }
                                    TargesBindName(bindName);
                                }
                            }
                            if (!string.IsNullOrEmpty(curControlDev.currentSelectFloorId))
                            {
@@ -798,15 +874,11 @@
                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                        }
                        //获取楼层中房间列表
                        if (supportRoomList.Count != 0)
                        {
                            RefreshRoomList();
                        }
                        CommonPage.Loading.Hide();
                        RefreshRoomList();
                        canFresh = false;
                        midVerticalScrolViewLayout.EndHeaderRefreshing();
                        CommonPage.Loading.Hide();
                    });
                }
            });
@@ -827,75 +899,94 @@
                    try
                    {
                        Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
                        if (oldTargetList.Count != 0)
                        if (btnTipPic.IsSelected)
                        {
                            //删除取消的目标
                            foreach (var bd in oldTargetList)
                            //删除情况1:绑定空目标必须取消按键中已经存在的目标
                            if (oldTargetList.Count != 0)
                            {
                                var delDevice = new DelDeviceBindData();
                                delDevice.DeviceAddr = curControlDev.DeviceAddr;
                                delDevice.Epoint = curControlDev.DeviceEpoint;
                                //删除按键中已经绑定的目标个数【删除成功个数】
                                int sOldTargetListCount = 0;
                                var removeDevice = new RemoveBindListObj();
                                removeDevice.BindType = 0;
                                switch (curDeviceBindType)
                                foreach (var bd in oldTargetList)
                                {
                                    case BindInfo.BindType.FreshAir:
                                        removeDevice.BindCluster = 514;
                                        break;
                                    case BindInfo.BindType.Temperature:
                                        removeDevice.BindCluster = 1026;
                                        break;
                                    case BindInfo.BindType.Humidity:
                                        removeDevice.BindCluster = 1029;
                                        break;
                                    case BindInfo.BindType.PM:
                                        removeDevice.BindCluster = 1066;
                                        break;
                                    case BindInfo.BindType.AC:
                                        removeDevice.BindCluster = 513;//Ac需要绑定2个簇513和514
                                        break;
                                }
                                removeDevice.BindMacAddr = bd.DeviceAddr;
                                removeDevice.BindEpoint = bd.DeviceEpoint;
                                delDevice.RemoveBindList.Add(removeDevice);
                                    var delDevice = DelBindDevice(bd);
                                if (curDeviceBindType == BindInfo.BindType.AC)
                                {
                                    //要移除空调:需要移除513,514
                                    var removeDevice3 = new RemoveBindListObj();
                                    removeDevice3.BindCluster = 514;
                                    removeDevice3.BindType = 0;
                                    removeDevice3.BindMacAddr = bd.DeviceAddr;
                                    removeDevice3.BindEpoint = bd.DeviceEpoint;
                                    delDevice.RemoveBindList.Add(removeDevice3);
                                }
                                    //此次按键中需要移除的目标个数【同一个目标携带的多个功能删除成功的个数】
                                    int sRemoveBindListCount = 0;
                                var delResult = new DelDeviceBindResponseAllData();
                                delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice);
                                if (delResult == null)
                                {
                                    Application.RunOnMainThread(() =>
                                    var delResult = new DelDeviceBindResponseAllData();
                                    delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice);
                                    if (delResult == null)
                                    {
                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                        btnFinifh.Enable = true;
                                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                        CommonPage.Loading.Hide();
                                    });
                                    return;
                                }
                                else
                                {
                                    if (delResult.removeBindResultResponseData == null)
                                    {
                                        if (delResult.delDeviceBindResponseData != null)
                                        Application.RunOnMainThread(() =>
                                        {
                                            foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList)
                                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                            CommonPage.Loading.Hide();
                                            ShowReLoadView();
                                            ReLoadAction += () =>
                                            {
                                                if (d.Result == 0 || d.Result == 1)
                                                this.midFrameLayout.RemoveAll();
                                                //初始化设备数据
                                                CommonPage.Loading.Start("");
                                                MidFrameLayoutContent();
                                                InitData(true);
                                            };
                                        });
                                        return;
                                    }
                                    else
                                    {
                                        if (delResult.removeBindResultResponseData == null)
                                        {
                                            if (delResult.delDeviceBindResponseData != null)
                                            {
                                                foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList)
                                                {
                                                    EmptyTargesMess();
                                                    if (d.Result == 0 || d.Result == 1)
                                                    {
                                                        sRemoveBindListCount++;
                                                        if (sRemoveBindListCount == delDevice.RemoveBindList.Count)
                                                        {
                                                            sOldTargetListCount++;
                                                        }
                                                        //按键目标中的该类型个数都删除成功
                                                        if (sOldTargetListCount == oldTargetList.Count)
                                                        {
                                                            TargesBindName();
                                                            Application.RunOnMainThread(() =>
                                                            {
                                                                CommonPage.Loading.Hide();
                                                                btnFinifh.Enable = true;
                                                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                                                this.RemoveFromParent();
                                                            });
                                                        }
                                                    }
                                                    else
                                                    {
                                                        Application.RunOnMainThread(() =>
                                                        {
                                                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                                            btnFinifh.Enable = true;
                                                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                                            CommonPage.Loading.Hide();
                                                        });
                                                        return;
                                                    }
                                                }
                                            }
                                        }
                                        else
                                        {
                                            if (delResult.removeBindResultResponseData.Result == 0)
                                            {
                                                sOldTargetListCount++;
                                                //按键目标中的该类型个数都删除成功
                                                if (sOldTargetListCount == oldTargetList.Count)
                                                {
                                                    TargesBindName();
                                                    Application.RunOnMainThread(() =>
                                                    {
                                                        CommonPage.Loading.Hide();
@@ -904,54 +995,26 @@
                                                        this.RemoveFromParent();
                                                    });
                                                }
                                                else
                                                {
                                                    Application.RunOnMainThread(() =>
                                                    {
                                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                                        btnFinifh.Enable = true;
                                                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                                        CommonPage.Loading.Hide();
                                                    });
                                                    return;
                                                }
                                            }
                                        }
                                    }
                                    else
                                    {
                                        if (delResult.removeBindResultResponseData.Result == 0)
                                        {
                                            EmptyTargesMess();
                                            Application.RunOnMainThread(() =>
                                            else
                                            {
                                                CommonPage.Loading.Hide();
                                                btnFinifh.Enable = true;
                                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                                this.RemoveFromParent();
                                            });
                                        }
                                        else
                                        {
                                            Application.RunOnMainThread(() =>
                                            {
                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                                btnFinifh.Enable = true;
                                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                                CommonPage.Loading.Hide();
                                            });
                                            return;
                                                Application.RunOnMainThread(() =>
                                                {
                                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                                    btnFinifh.Enable = true;
                                                    btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                                    CommonPage.Loading.Hide();
                                                });
                                                return;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            if (btnTipPic.IsSelected)
                            else
                            {
                                EmptyTargesMess();
                                //按键中没有目标直接绑定空目标
                                TargesBindName();
                                Application.RunOnMainThread(() =>
                                {
                                    CommonPage.Loading.Hide();
@@ -959,22 +1022,6 @@
                                    btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                    this.RemoveFromParent();
                                });
                            }
                            else
                            {
                                //没有目标提示
                                Application.RunOnMainThread(() =>
                                {
                                    var myTip = new Tip();
                                    myTip.Direction = AMPopTipDirection.None;
                                    myTip.CloseTime = 2;
                                    myTip.Text = Language.StringByID(R.MyInternationalizationString.BindDeviceTargetIsEmpty);
                                    myTip.Show(Common.CommonPage.Instance);
                                    btnFinifh.Enable = true;
                                    btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                    CommonPage.Loading.Hide();
                                });
                                return;
                            }
                        }
                    }
@@ -986,6 +1033,8 @@
                            CommonPage.Loading.Hide();
                        });
                        btnFinifh.Enable = true;
                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                    }
                });
            }
@@ -1014,11 +1063,17 @@
                    {
                        Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
                        //删除已经存在的目标
                        //删除情况2:按键之前已经存在的目标
                        if (oldTargetList.Count != 0)
                        {
                            //删除按键中已经绑定的目标个数【删除成功个数】
                            int sOldTargetListCount = 0;
                            foreach (var bd in oldTargetList)
                            {
                                //此次按键中需要移除的目标个数【同一个目标携带的多个功能删除成功的个数】
                                int sRemoveBindListCount = 0;
                                var delDevice = DelBindDevice(bd);
                                var delResult = new DelDeviceBindResponseAllData();
                                delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice);
@@ -1028,9 +1083,17 @@
                                    Application.RunOnMainThread(() =>
                                    {
                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                        btnFinifh.Enable = true;
                                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                        CommonPage.Loading.Hide();
                                        ShowReLoadView();
                                        ReLoadAction += () =>
                                        {
                                            this.midFrameLayout.RemoveAll();
                                            //初始化设备数据
                                            CommonPage.Loading.Start("");
                                            MidFrameLayoutContent();
                                            InitData(true);
                                        };
                                    });
                                    return;
                                }
@@ -1053,84 +1116,43 @@
                                                    });
                                                    return;
                                                }
                                                sRemoveBindListCount++;
                                                if (sRemoveBindListCount == delDevice.RemoveBindList.Count)
                                                {
                                                    sOldTargetListCount++;
                                                }
                                            }
                                        }
                                    }
                                }
                                if (delResult != null && delResult.removeBindResultResponseData != null)
                                {
                                    if (delResult.removeBindResultResponseData.Result != 0)
                                    else
                                    {
                                        Application.RunOnMainThread(() =>
                                        if (delResult.removeBindResultResponseData.Result != 0)
                                        {
                                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                            btnFinifh.Enable = true;
                                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                            CommonPage.Loading.Hide();
                                        });
                                        return;
                                            Application.RunOnMainThread(() =>
                                            {
                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                                btnFinifh.Enable = true;
                                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                                CommonPage.Loading.Hide();
                                            });
                                            return;
                                        }
                                        sOldTargetListCount++;
                                    }
                                }
                            }
                        }
                        else
                        {
                            //检测已经绑定的目标是否不在本地或者没有分配到任何房间中
                            //此时需要删除已经被绑定到目标,才能继续绑定新目标
                            if (curBindDevice != null)
                            {
                                var delDevice = DelBindDevice(curBindDevice);
                                var delResult = new DelDeviceBindResponseAllData();
                                delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice);
                                if (delResult == null)
                            if (sOldTargetListCount != oldTargetList.Count)
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                        btnFinifh.Enable = true;
                                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                        CommonPage.Loading.Hide();
                                    });
                                    return;
                                }
                                else
                                {
                                    if (delResult.removeBindResultResponseData == null)
                                    {
                                        if (delResult.delDeviceBindResponseData != null)
                                        {
                                            foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList)
                                            {
                                                if (d.Result != 0 && d.Result != 1)
                                                {
                                                    Application.RunOnMainThread(() =>
                                                    {
                                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                                        btnFinifh.Enable = true;
                                                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                                        CommonPage.Loading.Hide();
                                                    });
                                                    return;
                                                }
                                            }
                                        }
                                    }
                                }
                                if (delResult != null && delResult.removeBindResultResponseData != null)
                                {
                                    if (delResult.removeBindResultResponseData.Result != 0)
                                    {
                                        Application.RunOnMainThread(() =>
                                        {
                                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                            btnFinifh.Enable = true;
                                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                            CommonPage.Loading.Hide();
                                        });
                                        return;
                                    }
                                }
                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                    btnFinifh.Enable = true;
                                    btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                    CommonPage.Loading.Hide();
                                });
                                return;
                            }
                        }
@@ -1204,9 +1226,16 @@
                            {
                                CommonPage.Loading.Hide();
                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                btnFinifh.Enable = true;
                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                return;
                                ShowReLoadView();
                                ReLoadAction += () =>
                                {
                                    this.midFrameLayout.RemoveAll();
                                    //初始化设备数据
                                    CommonPage.Loading.Start("");
                                    MidFrameLayoutContent();
                                    InitData(true);
                                };
                            });
                        }
                        else
@@ -1215,39 +1244,8 @@
                            {
                                targetList.Clear();
                                targetListTemp.Clear();
                                switch (curDeviceBindType)
                                {
                                    case BindInfo.BindType.FreshAir:
                                        if (actionFreshAirTarget != null)
                                        {
                                            actionFreshAirTarget(addBindeDev.BindName);
                                        }
                                        break;
                                    case BindInfo.BindType.Temperature:
                                        if (actionTemperatureTarget != null)
                                        {
                                            actionTemperatureTarget(addBindeDev.BindName);
                                        }
                                        break;
                                    case BindInfo.BindType.Humidity:
                                        if (actionHumidityTarget != null)
                                        {
                                            actionHumidityTarget(addBindeDev.BindName);
                                        }
                                        break;
                                    case BindInfo.BindType.PM:
                                        if (actionPMTarget != null)
                                        {
                                            actionPMTarget(addBindeDev.BindName);
                                        }
                                        break;
                                    case BindInfo.BindType.AC:
                                        if (actionAcTarget != null)
                                        {
                                            actionAcTarget(addBindeDev.BindName);
                                        }
                                        break;
                                }
                                TargesBindName(addBindeDev.BindName);
                                Application.RunOnMainThread(() =>
                                {
@@ -1308,9 +1306,9 @@
        }
        /// <summary>
        /// 目标为空时的文本显示
        /// 目标为文本显示
        /// </summary>
        void EmptyTargesMess()
        void EmptyTargesMess1()
        {
            switch (curDeviceBindType)
            {
@@ -1346,6 +1344,45 @@
                    break;
            }
        }
        /// <summary>
        /// 目标为文本显示
        /// </summary>
        void TargesBindName(string name = "")
        {
            switch (curDeviceBindType)
            {
                case BindInfo.BindType.FreshAir:
                    if (actionFreshAirTarget != null)
                    {
                        actionFreshAirTarget(name);
                    }
                    break;
                case BindInfo.BindType.Temperature:
                    if (actionTemperatureTarget != null)
                    {
                        actionTemperatureTarget(name);
                    }
                    break;
                case BindInfo.BindType.Humidity:
                    if (actionHumidityTarget != null)
                    {
                        actionHumidityTarget(name);
                    }
                    break;
                case BindInfo.BindType.PM:
                    if (actionPMTarget != null)
                    {
                        actionPMTarget(name);
                    }
                    break;
                case BindInfo.BindType.AC:
                    if (actionAcTarget != null)
                    {
                        actionAcTarget(name);
                    }
                    break;
            }
        }
        /// <summary>
        /// 绑定目标列表
@@ -1364,7 +1401,6 @@
                    {
                        if (device.Type == DeviceType.FreshAir)
                        {
                            targetList.Add(device);
                            oldTargetList.Add(device);
                        }
                    }
@@ -1375,7 +1411,6 @@
                        var bDev = device as TemperatureSensor;
                        if (bDev.SensorDiv == 1)
                        {
                            targetList.Add(device);
                            oldTargetList.Add(device);
                        }
                    }
@@ -1383,7 +1418,6 @@
                    {
                        if (bindDev.BindCluster == 1026)
                        {
                            targetList.Add(device);
                            oldTargetList.Add(device);
                        }
                    }
@@ -1394,20 +1428,17 @@
                        var bDev = device as TemperatureSensor;
                        if (bDev.SensorDiv == 2)
                        {
                            targetList.Add(device);
                            oldTargetList.Add(device);
                        }
                    }
                    if (device.Type == DeviceType.FreshAirHumiditySensor)
                    {
                        targetList.Add(device);
                        oldTargetList.Add(device);
                    }
                    if (device.Type == DeviceType.PMSensor)
                    {
                        if (bindDev.BindCluster == 1029)
                        {
                            targetList.Add(device);
                            oldTargetList.Add(device);
                        }
                    }
@@ -1417,7 +1448,6 @@
                    {
                        if (bindDev.BindCluster == 1066)
                        {
                            targetList.Add(device);
                            oldTargetList.Add(device);
                        }
                    }
@@ -1427,12 +1457,18 @@
                    {
                        if (bindDev.BindCluster == 513)
                        {
                            targetList.Add(device);
                            oldTargetList.Add(device);
                        }
                    }
                    break;
            }
            targetList.Clear();
            if (oldTargetList.Count != 0)
            {
                targetList.Add(oldTargetList[0]);
            }
            targetListTemp.Clear();
            foreach (var d in targetList)
            {
@@ -1492,14 +1528,26 @@
                    removeDevice.BindCluster = 1066;
                    break;
                case BindInfo.BindType.AC:
                    removeDevice.BindCluster = 513;
                    removeDevice.BindCluster = 513;//Ac需要绑定2个簇513和514
                    break;
            }
            removeDevice.BindMacAddr = bd.DeviceAddr;
            removeDevice.BindEpoint = bd.DeviceEpoint;
            delDevice.RemoveBindList.Add(removeDevice);
            if (curDeviceBindType == BindInfo.BindType.AC)
            {
                //要移除空调:需要移除513,514
                var removeDevice3 = new RemoveBindListObj();
                removeDevice3.BindCluster = 514;
                removeDevice3.BindType = 0;
                removeDevice3.BindMacAddr = bd.DeviceAddr;
                removeDevice3.BindEpoint = bd.DeviceEpoint;
                delDevice.RemoveBindList.Add(removeDevice3);
            }
            return delDevice;
        }
        #endregion
        #region 移除方法
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
@@ -46,7 +46,7 @@
            }
            //添加新设备的话,主页需要重新刷新
            UserView.UserPage.Instance.RefreshForm = true;
            UserView.UserPage.Instance.RefreshAllForm = true;
            //设置标题信息
            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice));
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
@@ -151,7 +151,7 @@
            listView.BeginHeaderRefreshingAction += () =>
            {
                //刷新设备的话,主页需要重新刷新
                UserView.UserPage.Instance.RefreshForm = true;
                UserView.UserPage.Instance.RefreshAllForm = true;
                HdlThreadLogic.Current.RunThread(() =>
                {
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -102,10 +102,13 @@
            {
                //简约面板随便一个回路来获取设备信息
                var dev = Common.LocalDevice.Current.GetDevice(deviceMac, 62);
                var key = new ZigBee.Device.Panel();
                key.DeviceAddr = deviceMac;
                key.CurrentGateWayId = dev.CurrentGateWayId;
                InitBindInfo(key);
                if (dev != null)
                {
                    var key = new ZigBee.Device.Panel();
                    key.DeviceAddr = deviceMac;
                    key.CurrentGateWayId = dev.CurrentGateWayId;
                    InitBindInfo(key);
                }
            }
        }
@@ -710,7 +713,8 @@
        private void AddPirSensorWorkModeRow()
        {
            if (this.deviceEnumInfo.ConcreteType != DeviceConcreteType.Sensor_Pir
                || deviceEnumInfo.IsHdlDevice == false)
                || deviceEnumInfo.IsHdlDevice == false
                || this.listNewDevice.Count != 2)
            {
                return;
            }
@@ -739,7 +743,8 @@
        /// </summary>
        private void AddPirSensorBindRow()
        {
            if (this.deviceEnumInfo.ConcreteType != DeviceConcreteType.Sensor_Pir)
            if (this.deviceEnumInfo.ConcreteType != DeviceConcreteType.Sensor_Pir
                || this.listNewDevice.Count != 2)
            {
                return;
            }
@@ -1207,6 +1212,10 @@
                foreach (var bDev in bindList)
                {
                    var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                    if (device == null)
                    {
                        continue;
                    }
                    if (device.Type == DeviceType.TemperatureSensor)
                    {
                        var bD = device as TemperatureSensor;
@@ -1499,7 +1508,17 @@
            //检测此回路是否拥有定位功能(拿端点最小的那个回路去定位)
            bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]);
            var frame = new TopRightMenuControl(canTest == true ? 2 : 1, 1);
            TopRightMenuControl frame = null;
            if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
            {
                frame = new TopRightMenuControl(3, 1);
            }
            else
            {
                frame = new TopRightMenuControl(canTest == true ? 2 : 1, 1);
            }
            string deviceMenu = string.Empty;
            if (canTest == true)
            {
@@ -1530,6 +1549,23 @@
                });
            });
            //同步
            deviceMenu = Language.StringByID(R.MyInternationalizationString.Synchronization);
            if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]))
            {
                frame.AddRowMenu(deviceMenu, "", "Item/SynchronizationSelected.png", () =>
                {
                    //如果当前住宅是虚拟住宅,此功能无效
                    if (Common.Config.Instance.Home.IsVirtually == true)
                    {
                        return;
                    }
                    //同步指定设备
                    this.SynchronizationDevice();
                });
            }
        }
        /// <summary>
@@ -1557,6 +1593,27 @@
                });
            });
        }
        /// <summary>
        /// 同步指定设备
        /// </summary>
        private void SynchronizationDevice()
        {
            HdlThreadLogic.Current.RunThread(async () =>
            {
                //打开进度条
                this.ShowProgressBar();
                //同步设备
                bool result = await Common.LocalDevice.Current.SynchronizationDevice(listNewDevice);
                //关闭进度条
                this.CloseProgressBar();
                if (result == false)
                {
                    return;
                }
            });
        }
        #endregion
        #region ■ 关闭界面___________________________
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
@@ -202,7 +202,10 @@
                foreach (var bDev in bindList)
                {
                    var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                    if (device == null)
                    {
                        continue;
                    }
                    if (device.Type == DeviceType.FreshAir)
                    {
                        //获取设备类型的
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs
@@ -208,7 +208,10 @@
                    foreach (var bDev in bindList)
                    {
                        var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                        if (device == null)
                        {
                            continue;
                        }
                        if (device.Type == DeviceType.FreshAir)
                        {
                            //获取设备类型的
@@ -283,6 +286,19 @@
                            }
                            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++;
@@ -458,7 +474,7 @@
            var btnHumidityStatu = rowHumidity.AddMostRightView(msg, 700);
            rowHumidity.ButtonClickEvent += (sender, e) =>
            {
                this.deviceObj.DeviceEpoint = 2;
                this.deviceObj.DeviceEpoint = 1;
                var paneTargetsBaseFormp = new PaneTargetsBaseForm(this.deviceObj, bindAcDev, DeviceBind.BindInfo.BindType.Humidity);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(paneTargetsBaseFormp);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionAddTargetsForm.cs
@@ -129,6 +129,10 @@
        ///  刷新绑定表页面  
        /// </summary>
        public Action actionRefreshBindList;
        /// <summary>
        /// 是否能刷新
        /// </summary>
        private bool canFresh = false;
        #endregion
        #region UI设计
@@ -139,6 +143,8 @@
        {
            TitleUI();
            MidFrameLayouUI();
            //首次初始化数据
            CommonPage.Loading.Start("");
            InitData();
        }
@@ -211,6 +217,7 @@
            midVerticalScrolViewLayout.BeginHeaderRefreshingAction += () =>
            {
                midVerticalScrolViewLayout.BeginHeaderRefreshing();
                canFresh = true;
                InitData();
            };
@@ -255,169 +262,28 @@
        }
        /// <summary>
        /// 楼层选择的侧边栏
        /// </summary>
        void SideslipFramelayout()
        {
            var dialog = new Dialog
            {
            };
            dialog.Show();
            var flMain = new FrameLayout { BackgroundColor = 0x00000000 };
            dialog.AddChidren(flMain);
            flMain.MouseUpEventHandler += (sender11, e11) =>
            {
                dialog.Close();
            };
            var sidelipFrameLayout = new FrameLayout()
            {
                Width = Application.GetMinReal(449),
                Y = Application.GetRealHeight(161),
                X = Application.GetRealWidth(596),
                BackgroundImagePath = "DoorLock/SideslipPic.png",
            };
            flMain.AddChidren(sidelipFrameLayout);
            var btnSelectFloor = new Button()
            {
                Width = Application.GetRealWidth(200),
                Height = Application.GetRealHeight(58),
                X = Application.GetRealWidth(81),
                Y = Application.GetRealHeight(81),
                TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                TextSize = 14,
                IsBold = true,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = R.MyInternationalizationString.SelectFloor,
            };
            sidelipFrameLayout.AddChidren(btnSelectFloor);
            var sidelipVerticalScrolViewLayout = new VerticalScrolViewLayout()
            {
                Y = btnSelectFloor.Bottom + Application.GetRealHeight(45),
                Height = Application.GetRealHeight(600),
            };
            sidelipFrameLayout.AddChidren(sidelipVerticalScrolViewLayout);
            Button oldbutton = null;
            Button oldbuttonText = null;
            int count = 0;
            foreach (var floorId in dicFloorList.Keys)
            {
                var rowFrameLayout = new RowLayout()
                {
                    Height = Application.GetRealHeight(152),
                    LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
                    X = Application.GetRealWidth(81),
                };
                sidelipVerticalScrolViewLayout.AddChidren(rowFrameLayout);
                var btnAllMethod = new Button()
                {
                    Width = Application.GetMinReal(81),
                    Height = Application.GetMinReal(81),
                    UnSelectedImagePath = "Floor/Floor.png",
                    SelectedImagePath = "Floor/FloorSelected.png",
                    Gravity = Gravity.CenterVertical,
                };
                rowFrameLayout.AddChidren(btnAllMethod);
                var btnMethodText = new Button()
                {
                    Width = Application.GetRealWidth(311),
                    Height = Application.GetRealHeight(58),
                    X = Application.GetRealWidth(92),
                    Gravity = Gravity.CenterVertical,
                    TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                    TextSize = 14,
                    TextAlignment = TextAlignment.CenterLeft,
                    Text = dicFloorList[floorId],
                };
                rowFrameLayout.AddChidren(btnMethodText);
                if (curControlDev.currentSelectFloorId == floorId)
                {
                    btnAllMethod.IsSelected = true;
                    btnAllMethod.IsBold = true;
                    btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                }
                string curFloorId = floorId;
                EventHandler<MouseEventArgs> hander = (sender, e) =>
                {
                    if (curControlDev.currentSelectFloorId == curFloorId)
                    {
                        return;
                    }
                    curControlDev.currentSelectFloorId = curFloorId;
                    if (!btnMethodText.IsSelected)
                    {
                        if (oldbutton != null)
                        {
                            oldbutton.IsSelected = false;
                        }
                        if (oldbuttonText != null)
                        {
                            oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3;
                        }
                        oldbutton = btnMethodText;
                        oldbuttonText = btnMethodText;
                        btnMethodText.IsSelected = true;
                        oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                        oldbuttonText.IsBold = true;
                    }
                    int index = 0;
                    RefreshRoomList();
                    dialog.Close();
                };
                btnAllMethod.MouseUpEventHandler += hander;
                rowFrameLayout.MouseUpEventHandler += hander;
                btnMethodText.MouseUpEventHandler += hander;
                count++;
            }
            if (count == 0)
            {
                sidelipFrameLayout.Height = 0;
            }
            else if (count <= 4 && count > 0)
            {
                sidelipFrameLayout.Height = Application.GetRealHeight(180) + count * Application.GetRealHeight(150);
            }
            else
            {
                sidelipFrameLayout.Height = Application.GetMinReal(780);
            }
        }
        /// <summary>
        /// 面板绑定目标表显示
        /// </summary>
        /// <param name="gateway">Gateway.</param>
        /// <param name="key">Key.</param>
        void RefreshRoomList()
        {
            Room curRoom = null;
            if (supportRoomList.Count == 0)
            {
                return;
            }
            btnHorizontalScrolViewLayout.RemoveAll();
            Room curRoom = null;
            Button curentOldRoom = null;
            FrameLayout curentOldRoomFrameLayout = null;
            int index = 0;
            curBindTypeList = MutilfunctionPanelMethod.GetMatchBindList(curBindType);
            var roomTempList = MutilfunctionPanelMethod.GetSupportRoomList(curControlDev, supportRoomList, curBindTypeList, curBindType);
            List<Room> roomTempList = new List<Room> { };
            Room slectedRoom = null;
            var roomUn = new Room();
            roomUn.Name = Language.StringByID(R.MyInternationalizationString.Undistributed);
            roomUn.Id = "UndistributedId";
            if (supportRoomList.Count != 0)
            {
                roomTempList = MutilfunctionPanelMethod.GetSupportRoomList(curControlDev, supportRoomList, curBindTypeList, curBindType);
            }
            if (curBindType == 0)
            {
                if (undistributeScList != null && undistributeScList.Count != 0)
@@ -560,6 +426,8 @@
                    var btn = (Button)frame.GetChildren(0);
                    frame.BackgroundImagePath = "Item/RoomIconBackgroundSelected.png";
                    btn.TextColor = Shared.Common.ZigbeeColor.Current.XMWhite;
                    curentOldRoom = btn;
                    curentOldRoomFrameLayout = frame;
                }
                else
                {
@@ -1027,17 +895,14 @@
            {
                try
                {
                    Application.RunOnMainThread(() =>
                    {
                        CommonPage.Loading.Start("");
                    });
                    //获取楼层
                    dicFloorList = HdlRoomLogic.Current.GetFloorSortList();
                    curControlDev.currentSelectFloorId = BindInfo.GetCurrentSelectFloorId();
                    //获取楼层中房间列表
                    supportRoomList = BindInfo.GetFloorRoomList();
                    //获取房间列表
                    supportRoomList = BindInfo.GetSupportRoomList();
                    //获取面板已经绑定的匹配类型的列表
                    curBindTypeList = MutilfunctionPanelMethod.GetMatchBindList(curBindType);
                    if (curBindType == 0)
                    {
@@ -1077,14 +942,17 @@
                {
                    Application.RunOnMainThread(() =>
                    {
                        BindDownFrameLayout(this.midFrameLayout, curControlDev, dicFloorList, ref btnFloorText);
                        if (!canFresh)
                        {
                            BindDownFrameLayout(this.midFrameLayout, curControlDev, dicFloorList, ref btnFloorText);
                        }
                        ChooseFloorAction += (floorId, btnMethodText) =>
                        {
                            btnFloorText.Text = dicFloorList[floorId];
                            //获取楼层中房间列表
                            //获取房间列表
                            supportRoomList.Clear();
                            supportRoomList = BindInfo.GetFloorRoomList();
                            supportRoomList = BindInfo.GetSupportRoomList();
                            if (curBindType == 0)
                            {
                                // 获取本地未分配的支持当前类型的绑定场景列表
@@ -1097,15 +965,18 @@
                            }
                            RefreshRoomList();
                        };
                        btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
                        //获取楼层中房间列表
                        if (supportRoomList.Count != 0)
                        //默认楼层显示
                        if (BindInfo.GetCurrentSelectFloorIdName() != null)
                        {
                            RefreshRoomList();
                            Application.RunOnMainThread(() =>
                            {
                                btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
                            });
                        }
                        //获取楼层中房间列表
                        RefreshRoomList();
                        CommonPage.Loading.Hide();
                        canFresh = false;
                        midVerticalScrolViewLayout.EndHeaderRefreshing();
                    });
                }
ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionDirectoryListForm.cs
@@ -39,9 +39,9 @@
            Type type = typeof(DirNameResourse);
            var PropertyList = type.GetFields();
            var PropertyList = type.GetProperties();
            var listFile = new List<System.Reflection.FieldInfo>();
            var listFile = new List<System.Reflection.PropertyInfo>();
            foreach (var item in PropertyList)
            {
                if (item.Name.EndsWith("Directory") == true)
@@ -84,13 +84,7 @@
        private void AddRowControl(VerticalListControl listView, string directory, string directoryValue, bool addLine)
        {
            string localDir = DirNameResourse.LocalMemoryDirectory;
            string myPath = System.IO.Path.Combine(localDir, directoryValue);
            if (localDir.EndsWith(directoryValue) == true)
            {
                myPath = localDir;
            }
            if (System.IO.Directory.Exists(myPath) == false)
            if (System.IO.Directory.Exists(directoryValue) == false)
            {
                return;
            }
@@ -106,7 +100,7 @@
            row1.ButtonClickEvent += (sender, e) =>
            {
                var form = new HideOptionFileListForm();
                form.AddForm(myPath);
                form.AddForm(directoryValue);
            };
        }
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
@@ -102,9 +102,13 @@
            var revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResponsePack>(System.Text.Encoding.UTF8.GetString(byteData));
            if (revertObj.StateCode == "AccountNoExists")
            {
                //成员不存在
                var form = new MemberNotEsixtForm();
                form.AddForm();
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //成员不存在
                    var form = new MemberNotEsixtForm();
                    form.AddForm();
                });
                return;
            }
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
old mode 100755 new mode 100644
@@ -144,9 +144,6 @@
            if (string.IsNullOrEmpty(resultValue) == true)
            {
                //出现未知错误,数据丢失
                string msg = Language.StringByID(R.MyInternationalizationString.uUnKnownError);
                this.ShowMassage(ShowMsgType.Tip, msg);
                return;
            }
            List<MemberInfoRes> listInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<List<MemberInfoRes>>(resultValue);
@@ -159,12 +156,12 @@
                    break;
                }
            }
            if (memberInfoRes == null)
            {
                //出现未知错误,数据丢失
                string msg = Language.StringByID(R.MyInternationalizationString.uUnKnownError);
                this.ShowMassage(ShowMsgType.Tip, msg);
                return;
            if (memberInfoRes == null)
            {
                //出现意外情况,数据丢失
                string msg = Language.StringByID(R.MyInternationalizationString.uUnKnownErrorAndLostData);
                this.ShowMassage(ShowMsgType.Tip, msg);
                return;
            }
            string iconPath = System.IO.Path.Combine(UserCenterResourse.AccountOption.UserPictruePath, memberInfoRes.DistributedMark + ".png");
ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
@@ -433,9 +433,12 @@
            var revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResponsePack>(System.Text.Encoding.UTF8.GetString(byteData));
            if (revertObj.StateCode == "AccountNoExists")
            {
                //成员不存在
                var form = new MemberNotEsixtForm();
                form.AddForm();
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //成员不存在
                    var form = new MemberNotEsixtForm();
                    form.AddForm();
                });
                return;
            }
ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
@@ -215,7 +215,7 @@
                }
                //添加房间,主页需要重新刷新
                UserView.UserPage.Instance.RefreshForm = true;
                UserView.UserPage.Instance.RefreshAllForm = true;
                HdlRoomLogic.Current.AddRoom(newRoom);
                this.FinishEditorEvent?.Invoke();
@@ -275,6 +275,11 @@
            {
                //获取温度传感器
                if (device is ZigBee.Device.TemperatureSensor && ((ZigBee.Device.TemperatureSensor)device).SensorDiv == 1)
                {
                    listDevice.Add(device);
                }
                //PM2.5是温度和湿度合在同一个端点
                else if (device.Type == ZigBee.Device.DeviceType.PMSensor)
                {
                    listDevice.Add(device);
                }
@@ -385,10 +390,16 @@
                {
                    listDevice.Add(device);
                }
                //新风
                else if (device.Type == ZigBee.Device.DeviceType.FreshAirHumiditySensor)
                {
                    listDevice.Add(device);
                }
                //PM2.5是温度和湿度合在同一个端点
                else if (device.Type == ZigBee.Device.DeviceType.PMSensor)
                {
                    listDevice.Add(device);
                }
            }
            var listSelect = new List<string>() { newRoom.HumidityDevice };
            var form = new SelectDeviceForm();
ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
@@ -315,7 +315,7 @@
                }
                //算了,这里如果按下保存,则主页需要重新刷新
                UserView.UserPage.Instance.RefreshForm = true;
                UserView.UserPage.Instance.RefreshAllForm = true;
                this.CloseForm();
            };
@@ -372,6 +372,11 @@
            {
                //获取温度传感器
                if (device is ZigBee.Device.TemperatureSensor && ((ZigBee.Device.TemperatureSensor)device).SensorDiv == 1)
                {
                    listDevice.Add(device);
                }
                //PM2.5是温度和湿度合在同一个端点
                else if (device.Type == ZigBee.Device.DeviceType.PMSensor)
                {
                    listDevice.Add(device);
                }
@@ -463,10 +468,16 @@
                {
                    listDevice.Add(device);
                }
                //新风
                else if (device.Type == ZigBee.Device.DeviceType.FreshAirHumiditySensor)
                {
                    listDevice.Add(device);
                }
                //PM2.5是温度和湿度合在同一个端点
                else if (device.Type == ZigBee.Device.DeviceType.PMSensor)
                {
                    listDevice.Add(device);
                }
            }
            var listSelect = new List<string>() { cloneRoom.HumidityDevice };
            var form = new SelectDeviceForm();
ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
@@ -352,11 +352,11 @@
                        Common.Config.Instance.Home.FloorDics.Remove(keys);
                        if (Common.Config.Instance.Home.CurrentFloorId == keys)
                        {
                            //如果删除的是当前楼层的话
                            Common.Config.Instance.Home.CurrentFloorId = string.Empty;
                            foreach (string floorId in Common.Config.Instance.Home.FloorDics.Keys)
                            var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
                            foreach (var floorId in dicFloor.Keys)
                            {
                                //把第一个楼层ID给它
                                //把第一个楼层赋值给当前楼层
                                Common.Config.Instance.Home.CurrentFloorId = floorId;
                                break;
                            }
@@ -406,7 +406,7 @@
                            this.AdjustContrlTableHeight();
                        }
                        //删除楼层的话,主页需要重新刷新
                        UserView.UserPage.Instance.RefreshForm = true;
                        UserView.UserPage.Instance.RefreshAllForm = true;
                    });
                };
            }
@@ -464,7 +464,6 @@
                    Common.Config.Instance.Home.Save();
                    if (Common.Config.Instance.Home.CurrentFloorId == string.Empty)
                    {
                        Common.Config.Instance.Home.CurrentFloorId = keys;
                        //创建第一个新的楼层的话,需要去刷新主页左边的房间列表
                        HdlRoomLogic.Current.RefreshRoomListView();
                    }
@@ -478,7 +477,7 @@
                        this.InitFrameTableByMode();
                    }
                    //创建或者修改楼层的话,主页需要重新刷新
                    UserView.UserPage.Instance.RefreshForm = true;
                    UserView.UserPage.Instance.RefreshAllForm = true;
                }
            });
        }
@@ -619,7 +618,7 @@
                        this.AdjustContrlTableHeight();
                    }
                    //删除房间的话,主页需要重新刷新
                    UserView.UserPage.Instance.RefreshForm = true;
                    UserView.UserPage.Instance.RefreshAllForm = true;
                });
            };
        }
ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetAddMenuForm.cs
@@ -157,7 +157,7 @@
            btnIconContr.ButtonClickEvent += (sender, e) =>
            {
                //楼层菜单
                var contr = new TopRightFloorMenuControl(dicFloor.Count, 2, Language.StringByID(R.MyInternationalizationString.SelectFloor));
                var contr = new TopRightFloorMenuControl(dicFloor.Count, 2, this.nowSelectFloorId, Language.StringByID(R.MyInternationalizationString.SelectFloor));
                foreach (var floorId in dicFloor.Keys)
                {
                    contr.AddRowMenu(floorId, () =>
ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
@@ -254,7 +254,7 @@
                        UserCenterResourse.ResidenceOption.Save();
                        btnShortCut.IsSelected = false;
                        //取消主页的「安防」捷径的话,主页需要重新刷新
                        UserView.UserPage.Instance.RefreshForm = true;
                        UserView.UserPage.Instance.RefreshAllForm = true;
                    });
                }
                else
@@ -266,7 +266,7 @@
                        UserCenterResourse.ResidenceOption.Save();
                        btnShortCut.IsSelected = true;
                        //创建主页的「安防」捷径的话,主页需要重新刷新
                        UserView.UserPage.Instance.RefreshForm = true;
                        UserView.UserPage.Instance.RefreshAllForm = true;
                    });
                }
            };
ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs
@@ -144,7 +144,7 @@
            btnIconContr.ButtonClickEvent += (sender, e) =>
            {
                //楼层菜单
                var contr = new TopRightFloorMenuControl(dicFloor.Count, 2, Language.StringByID(R.MyInternationalizationString.SelectFloor));
                var contr = new TopRightFloorMenuControl(dicFloor.Count, 2, this.nowSelectFloorId, Language.StringByID(R.MyInternationalizationString.SelectFloor));
                foreach (var floorId in dicFloor.Keys)
                {
                    contr.AddRowMenu(floorId, () =>
ZigbeeApp/Shared/Phone/UserView/UserPage.cs
@@ -52,7 +52,15 @@
        /// <summary>
        /// 如果设置此变量为true,则在单击底部菜单时,强制无条件全部刷新
        /// </summary>
        public bool RefreshForm = false;
        public bool RefreshAllForm = false;
        /// <summary>
        /// 刷新主页
        /// </summary>
        public bool RefreshMainPageForm = false;
        /// <summary>
        /// 刷新分类
        /// </summary>
        public bool RefreshCategoryForm = false;
        #endregion
@@ -230,20 +238,20 @@
        /// <param name="handClick">是否是手动点击</param>
        private void BottomMenuClickEvent(MenuSelectEnum selectEnum, bool handClick)
        {
            if (this.RefreshForm == false && selectEnum == this.nowSelectMenu && handClick == true)
            if (this.RefreshAllForm == false && selectEnum == this.nowSelectMenu && handClick == true)
            {
                //手动点击同一个菜单,则不做处理
                return;
            }
            //如果强制指定刷新界面的话
            if (this.RefreshForm == true)
            if (this.RefreshAllForm == true)
            {
                //全部刷新
                this.listForm = new List<EditorCommonForm>() { null, null, null };
                this.bodyFrameView.RemoveAll();
                this.RefreshForm = false;
                this.RefreshAllForm = false;
            }
            this.nowSelectMenu = selectEnum;
@@ -253,6 +261,13 @@
            {
                //左滑菜单可
                CommonPage.Instance.IsDrawerLockMode = false;
                if (this.RefreshMainPageForm == true)
                {
                    //刷新主页
                    listForm[0]?.CloseForm();
                    listForm[0] = null;
                    this.RefreshMainPageForm = false;
                }
                if (listForm[0] == null)
                {
                    var form = new MainPage.HomeMainPageForm();
@@ -266,6 +281,13 @@
            {
                //左滑菜单不可
                CommonPage.Instance.IsDrawerLockMode = true;
                if (this.RefreshCategoryForm == true)
                {
                    //刷新分类
                    listForm[1]?.CloseForm();
                    listForm[1] = null;
                    this.RefreshCategoryForm = false;
                }
                if (listForm[1] == null)
                {
                    var form = new Category.CategoryMainForm();
ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
@@ -850,6 +850,109 @@
        }
        #endregion
        #region 一键更新四寸屏按键属性
        /// <summary>
        /// 同步设备功能
        /// </summary>
        /// <returns></returns>
        public async System.Threading.Tasks.Task<SynchronizationDeviceResponseAllData> SyncMsgToBindSource(string deviceAddr, int deviceEpoint)
        {
            if (Gateway == null)
            {
                return null;
            }
            return await System.Threading.Tasks.Task.Run(async () =>
            {
                SynchronizationDeviceResponseAllData resContent = null;
                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)
                        {
                            resContent = new SynchronizationDeviceResponseAllData { errorMessageBase = "网关错误回复,且数据是空" };
                        }
                        else
                        {
                            resContent = new SynchronizationDeviceResponseAllData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
                        }
                    }
                    if (topic == gatewayID + "/" + "Bind/SyncMsgToBindSourceRespon")
                    {
                        var res = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        if (res == null)
                        {
                            resContent = new SynchronizationDeviceResponseAllData { errorMessageBase = "网关返回的数据为空" };
                        }
                        else
                        {
                            resContent = new SynchronizationDeviceResponseAllData { result = res };
                            System.Console.WriteLine($"UI收到通知后的主题_{ topic}");
                        }
                    }
                };
                Gateway.Actions = action;
                DebugPrintLog("Bind/SyncMsgToBindSourceRespon_Actions 启动" + "_" + System.DateTime.Now.ToString());
                try
                {
                    var jObject = new JObject { { "DeviceAddr", deviceAddr }, { "Epoint", deviceEpoint }, { "Cluster_ID", 0 }, { "Command", 5010 } };
                    Gateway.Send("Bind/SyncMsgToBindSource", jObject.ToString());
                }
                catch { }
                var dateTime = DateTime.Now;
                while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
                {
                    await System.Threading.Tasks.Task.Delay(10);
                    if (resContent != null)
                    {
                        break;
                    }
                }
                if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
                {
                    resContent = new SynchronizationDeviceResponseAllData { errorMessageBase = " 回复超时,请重新操作" };
                }
                Gateway.Actions -= action;
                DebugPrintLog("Bind/SyncMsgToBindSource_Actions 退出" + System.DateTime.Now.ToString());
                return resContent;
            });
        }
        /// <summary>
        /// 同步设备,网关反馈具体信息
        /// </summary>
        [System.Serializable]
        public class SynchronizationDeviceResponseAllData
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 同步结果
            /// 0:成功:网关内部自动写入设备目标名字、设备目标功能类型、场景目标名字、utc时间写入4寸屏
            /// 1:失败
            /// </summary>
            public int result;
        }
        #endregion
        #region 删除设备(使设备离网)
        /// <summary>
        /// 删除设备(使设备离网)
@@ -900,7 +1003,7 @@
                    }
                };
                Gateway.Actions += action;
                System.Console.WriteLine("RemoveDevice_Actions 启动" + "_" + System.DateTime.Now.ToString());
                DebugPrintLog("RemoveDevice_Actions 启动" + "_" + System.DateTime.Now.ToString());
                try
                {
@@ -938,7 +1041,7 @@
                    d = new RemoveDeviceResponseAllData { errorMessageBase = " 回复超时,请重新操作" };
                }
                Gateway.Actions -= action;
                System.Console.WriteLine("RemoveDevice_Actions 退出" + System.DateTime.Now.ToString());
                DebugPrintLog("RemoveDevice_Actions 退出" + System.DateTime.Now.ToString());
                return d;
            });
ZigbeeApp/Shared/R.cs
old mode 100755 new mode 100644
@@ -654,6 +654,14 @@
        /// 警告!数据出错,必须刷新列表,否则控制现象错乱
        /// </summary>
        public const int UpdateBindList = 335;
        /// <summary>
        /// 同步
        /// </summary>
        public const int Synchronization = 336;
        /// <summary>
        /// 同步失败
        /// </summary>
        public const int SynchronizationFailed = 337;
        public readonly static int cancel = 5097;
        public readonly static int confrim = 5098;
@@ -942,6 +950,11 @@
        public readonly static int dark = 5411;
        public readonly static int bright = 5412;
        public readonly static int tipIlluminanceValue = 5413;
        public readonly static int videoIntercom = 5414;
        public readonly static int dong = 5415;
        public readonly static int unit = 5416;
        public readonly static int theOutdoorUnit = 5417;
        /// <summary>
@@ -5804,7 +5817,11 @@
        /// <summary>
        /// 需重新绑定
        /// </summary>
        public const int uNeedToRebind = 16136;
        public const int uNeedToRebind = 16136;
        /// <summary>
        /// 出现意外情况,数据丢失
        /// </summary>
        public const int uUnKnownErrorAndLostData = 16137;
ZigbeeApp/Shared/Shared.projitems
@@ -57,6 +57,7 @@
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\RoomAndDeviceView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SkipView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SoneLogicList.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\VideoIntercom\VideoMachine.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountForgetPWD.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\Logic\AccountLogic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountRegister.cs" />