From 16604a593202f2f87adf71abd57d036fe7da3b52 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 18 十一月 2019 10:39:42 +0800
Subject: [PATCH] 同步了全部的代码

---
 ZigbeeApp/GateWay.Droid/Assets/Language.ini                                                          |   33 
 ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs                                               |  125 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs                                           |   17 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs                                   |  163 +
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs                         |  255 ++
 ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs                                   |   27 
 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MessageManagement.png                                     |    0 
 ZigbeeApp/Shared/Common/DeviceUI.cs                                                                  |    5 
 ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs                                        |    2 
 ZigbeeApp/Shared/Phone/Device/Category/Category.cs                                                   |   39 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs                                  |   20 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs                                        |    2 
 ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionMainView.cs                                         |    8 
 ZigbeeApp/GateWay.Ios/Entitlements.plist                                                             |    2 
 ZigbeeApp/GateWay.Ios/GateWay.Ios.csproj                                                             |    5 
 ZigbeeApp/Shared/Phone/Device/Light/PlugControl.cs                                                   |   10 
 ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs                                                    |   25 
 ZigbeeApp/Shared/DLL/Android/Shared.Droid.HDLWidget.dll                                              |    0 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs                                      |   28 
 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/UnLockSuccess.png                                         |    0 
 ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs                                         |   22 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/UnLockSuccess.png                                          |    0 
 ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs                                                     |    1 
 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MessageManagementSelected.png                             |    0 
 ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs                                                    |    6 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs                                 |    6 
 ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs                                                  |    9 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/SelectDeviceForm.cs                                |    2 
 ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs                                                       |    2 
 ZigbeeApp/Shared/DLL/IOS/Shared.IOS.TBL.dll                                                          |    0 
 ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs                                               |   27 
 ZigbeeApp/Shared/Common/ZigbeeColor.cs                                                               |    5 
 ZigbeeApp/Shared/Phone/Device/Light/AirSwitchControl.cs                                              |   10 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs                                  |   10 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs                                |  200 +
 ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Back.png                                                |    0 
 ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs                                     |    2 
 ZigbeeApp/Shared/DLL/Android/Shared.Droid.dll                                                        |    0 
 ZigbeeApp/GateWay.Droid/GateWay.Droid.sln                                                            |   17 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs                                   |   29 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs                                        |  142 
 ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs                                                       |  257 ++
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs                                       |    7 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/MessageManagementForm.cs                                  |  392 ++++
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs                                         |    6 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberManagement.cs                                       |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/IMessageCommon.cs                                |   59 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs                                       |   43 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs                                     |    7 
 ZigbeeApp/Shared/Shared.projitems                                                                    |    8 
 ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs                                                |   77 
 ZigbeeApp/GateWay.Ios/AppDelegate.cs                                                                 |   52 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs                                        |  112 
 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/UnLockFail.png                                            |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs                                       |   12 
 ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs                                          |    3 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs |   18 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs                             |    6 
 ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs                                                      |   91 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NowAcctionTip.png                                          |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs                             |   23 
 ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs                                     |    4 
 ZigbeeApp/GateWay.Ios/Resources/Language.ini                                                         |   33 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs                                     |    2 
 ZigbeeApp/Shared/DLL/IOS/Shared.IOS.dll                                                              |    0 
 ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj                                                         |   32 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs                                 |   85 
 ZigbeeApp/Shared/Common/CommonPage.cs                                                                |   10 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs  |    7 
 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NowAcctionTip.png                                         |    0 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs                           |   82 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs                                           |   69 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs                                             |    2 
 ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs                                                        |  129 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MessageManagement.png                                      |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressFormBar.cs            |   35 
 ZigbeeApp/Shared/Phone/Device/CommonForm/BackButton.cs                                               |   10 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs    |   22 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayUploadAndDownLoadForm.cs                     |   50 
 ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml                                               |    2 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs                          |  228 +
 ZigbeeApp/Shared/Phone/Device/Logic/TemplateIgnore.cs                                                |  250 ++
 ZigbeeApp/Shared/Phone/UserCenter/OtherParty/OtherPartyAccountMenuForm.cs                            |  308 +++
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Safety.png                                                 |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayBackupLogic.cs                          |  396 ++++
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs                                    |    4 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpSelectNetworkForm.cs                        |    8 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs                                        |   97 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs                            |   95 
 ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs                                          |   81 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberFrozenPage.cs                                       |   66 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSettingSub.cs                                     |    4 
 ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs                                          |   11 
 ZigbeeApp/Shared/R.cs                                                                                |  126 +
 ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs                                       |   33 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApSelectNetworkForm.cs                         |    2 
 ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs                                           |   77 
 ZigbeeApp/GateWay.Ios/Info.plist                                                                     |   16 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs                                   |    7 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MessageManagementSelected.png                              |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs                                |   42 
 ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs                                                  |    2 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TimeSettignPage.cs                                        |   14 
 ZigbeeApp/Shared/Phone/Device/Light/OnOffControl.cs                                                  |   10 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs                                  |   31 
 ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs                                           |    2 
 ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs                                           |    8 
 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs                             |    6 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs         |   32 
 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Safety.png                                                |    0 
 /dev/null                                                                                            |  244 --
 ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs                                   |  103 +
 ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs                                                 |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs     |   41 
 ZigbeeApp/GateWay.Ios/Resources/Phone/Account/Back.png                                               |    0 
 ZigbeeApp/GateWay.Ios/packages.config                                                                |    0 
 ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs                                          |   28 
 ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs                                 |   18 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/UnLockFail.png                                             |    0 
 119 files changed, 4,046 insertions(+), 1,351 deletions(-)

diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
index 20bf98f..443d45e 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini
+++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -1618,7 +1618,7 @@
 15934=涓嬭浇鏁版嵁
 15935=涓嬭浇
 15936=璁剧疆缃戝叧缁忕含搴﹀け璐�
-15937=姝e湪淇濆瓨鍗忚皟鍣ㄧ殑nv鍒嗗尯缁勭綉淇℃伅
+15937=姝e湪淇濆瓨鍗忚皟鍣╪v鍒嗗尯淇℃伅
 15938=淇濆瓨鍗忚皟鍣ㄧ殑nv鍒嗗尯缁勭綉淇℃伅澶辫触
 15939=鎵撳紑鍗忚皟鍣ㄤ覆鍙e彂閫佸姛鑳藉け璐�
 15940=缃戝叧鏁版嵁澶囦唤澶辫触
@@ -1626,6 +1626,37 @@
 15942=鍝嶅簲瓒呮椂,缃戝叧鏁版嵁澶囦唤澶辫触
 15943=鍒涘缓澶囦唤鏂囦欢
 15944=姝e湪鎵撳紑鍗忚皟鍣ㄤ覆鍙e彂閫佸姛鑳�
+15945=鑾峰彇缃戝叧鑷姩澶囦唤璁剧疆澶辫触
+15946=璁剧疆缃戝叧鑷姩澶囦唤澶辫触
+15947=姝e湪鑾峰彇澶囦唤鏂囦欢鍒楄〃
+15948=鑾峰彇澶囦唤鏂囦欢鍒楄〃澶辫触
+15949=鍝嶅簲瓒呮椂,鑾峰彇澶囦唤鏂囦欢鍒楄〃澶辫触
+15950=姝e湪涓嬭浇澶囦唤鏂囦欢
+15951=鍝嶅簲瓒呮椂,涓嬭浇澶囦唤鏂囦欢澶辫触
+15952=涓嬭浇澶囦唤鏂囦欢澶辫触
+15953=姝e湪鎭㈠鍗忚皟鍣╪v鍒嗗尯
+15954=鎭㈠鍗忚皟鍣╪v鍒嗗尯澶辫触
+15955=鍝嶅簲瓒呮椂,鎭㈠鍗忚皟鍣╪v鍒嗗尯澶辫触
+15956=姝e湪閲嶅惎缃戝叧绯荤粺
+15957=閲嶅惎缃戝叧绯荤粺澶辫触
+15958=鍝嶅簲瓒呮椂,閲嶅惎缃戝叧绯荤粺澶辫触
+15959=缃戝叧鏁版嵁鎭㈠鎴愬姛!
+15960=铏氭嫙椹卞姩璁惧
+15961=瀵嗙爜寮�閿佹垚鍔�
+15962=瀵嗙爜寮�閿佸け璐�
+15963=鎸囩汗寮�閿佹垚鍔�
+15964=鎸囩汗寮�閿佸け璐�
+15965=IC鍗″紑閿佹垚鍔�
+15966=IC鍗″紑閿佸け璐�
+15967=寮�濮嬫椂闂村ぇ浜庣粨鏉熸椂闂�
+15968=纭畾瑕佽В闄ょ粦瀹歿0}锛�
+15969=鏇存柊绗笁鏂逛俊鎭け璐�
+15970=缁戝畾{0}鎴愬姛!
+15971=閿欒,绗笁鏂逛俊鎭涪澶�
+15972=鎮ㄥ綋鍓嶇殑IP鍙婄鍙e湪浜戠涓嶅瓨鍦�,璇烽噸鏂扮櫥褰�!
+15973=娑堟伅涓績
+15974=纭鍒犻櫎娑堟伅?
+15975=姝e湪涓婁紶澶囦唤鏂囦欢
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
 18004=鎸囧畾缃戝叧宸茬粡琚粦瀹�
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Back.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Back.png
new file mode 100755
index 0000000..6fea209
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Back.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MessageManagement.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MessageManagement.png
new file mode 100755
index 0000000..69d3700
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MessageManagement.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MessageManagementSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MessageManagementSelected.png
new file mode 100755
index 0000000..a81f5ed
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MessageManagementSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NowAcctionTip.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NowAcctionTip.png
new file mode 100755
index 0000000..759e062
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NowAcctionTip.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Safety.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Safety.png
new file mode 100755
index 0000000..d39c896
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Safety.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/UnLockFail.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/UnLockFail.png
index 21a35a5..ddd27f9 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/UnLockFail.png
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/UnLockFail.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/UnLockSuccess.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/UnLockSuccess.png
index 2c72e12..ef9c6ce 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/UnLockSuccess.png
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/UnLockSuccess.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
index 5279e81..6956896 100644
--- a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
+++ b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
@@ -19,6 +19,11 @@
     <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
     <NuGetPackageImportStamp>
     </NuGetPackageImportStamp>
+    <AndroidKeyStore>true</AndroidKeyStore>
+    <AndroidSigningKeyStore>C:\Users\admin\AppData\Local\Xamarin\Mono for Android\Keystore\HDL Home\HDL Home.keystore</AndroidSigningKeyStore>
+    <AndroidSigningStorePass>85521566</AndroidSigningStorePass>
+    <AndroidSigningKeyAlias>HDL Home</AndroidSigningKeyAlias>
+    <AndroidSigningKeyPass>85521566</AndroidSigningKeyPass>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
@@ -1030,12 +1035,6 @@
     <AndroidAsset Include="Assets\Phone\Gateway\WirelessGatewaySearching.png" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\DroidLib\DroidLib.csproj">
-      <Project>{47eff987-3192-4a56-a463-a940f245ff7d}</Project>
-      <Name>DroidLib</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
     <AndroidAsset Include="Assets\Phone\Light\OFF.png" />
   </ItemGroup>
   <ItemGroup>
@@ -1200,6 +1199,27 @@
   <ItemGroup>
     <AndroidAsset Include="Assets\Phone\AC\SwingBackground.png" />
   </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\NowAcctionTip.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\Safety.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\DroidLib\DroidLib.csproj">
+      <Project>{47eff987-3192-4a56-a463-a940f245ff7d}</Project>
+      <Name>DroidLib</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\MessageManagement.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\MessageManagementSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Account\Back.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')" />
diff --git a/ZigbeeApp/GateWay.Droid/GateWay.Droid.sln b/ZigbeeApp/GateWay.Droid/GateWay.Droid.sln
new file mode 100755
index 0000000..f0f5692
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/GateWay.Droid.sln
@@ -0,0 +1,17 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GateWay.Droid", "GateWay.Droid.csproj", "{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+EndGlobal
diff --git a/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml b/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml
index c4e6f4f..c774253 100644
--- a/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml
+++ b/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="2019111201" android:installLocation="auto" android:versionName="1.0.19111201">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="2019111401" android:installLocation="auto" android:versionName="1.0.19111401">
 	<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" />
 	<permission android:name="com.hdl.home.permission.JPUSH_MESSAGE" android:protectionLevel="signature" />
 	<uses-permission android:name="android.permission.WAKE_LOCK" />
diff --git a/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs b/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
index b331463..e050f4b 100644
--- a/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
+++ b/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
@@ -2195,64 +2195,82 @@
 			public const int ic_launcher = 2130837615;
 			
 			// aapt resource value: 0x7f020070
-			public const int ic_seekbar_open = 2130837616;
+			public const int ic_wd_arc_scale_bg = 2130837616;
 			
 			// aapt resource value: 0x7f020071
-			public const int ic_wd_curtain_bg = 2130837617;
+			public const int ic_wd_curtain_bg_top = 2130837617;
 			
 			// aapt resource value: 0x7f020072
-			public const int ic_wd_seekbar_open = 2130837618;
+			public const int ic_wd_curtain_h_bg = 2130837618;
 			
 			// aapt resource value: 0x7f020073
-			public const int Icon = 2130837619;
+			public const int ic_wd_curtain_h_open = 2130837619;
 			
 			// aapt resource value: 0x7f020074
-			public const int Loading = 2130837620;
+			public const int ic_wd_curtain_h_progress = 2130837620;
 			
 			// aapt resource value: 0x7f020075
-			public const int notification_action_background = 2130837621;
+			public const int ic_wd_curtain_h_top = 2130837621;
 			
 			// aapt resource value: 0x7f020076
-			public const int notification_bg = 2130837622;
+			public const int ic_wd_curtain_open = 2130837622;
 			
 			// aapt resource value: 0x7f020077
-			public const int notification_bg_low = 2130837623;
+			public const int ic_wd_curtain_roll_bg = 2130837623;
 			
 			// aapt resource value: 0x7f020078
-			public const int notification_bg_low_normal = 2130837624;
+			public const int ic_wd_curtain_roll_progress = 2130837624;
 			
 			// aapt resource value: 0x7f020079
-			public const int notification_bg_low_pressed = 2130837625;
+			public const int Icon = 2130837625;
 			
 			// aapt resource value: 0x7f02007a
-			public const int notification_bg_normal = 2130837626;
+			public const int Loading = 2130837626;
 			
 			// aapt resource value: 0x7f02007b
-			public const int notification_bg_normal_pressed = 2130837627;
+			public const int notification_action_background = 2130837627;
 			
 			// aapt resource value: 0x7f02007c
-			public const int notification_icon_background = 2130837628;
-			
-			// aapt resource value: 0x7f020082
-			public const int notification_template_icon_bg = 2130837634;
-			
-			// aapt resource value: 0x7f020083
-			public const int notification_template_icon_low_bg = 2130837635;
+			public const int notification_bg = 2130837628;
 			
 			// aapt resource value: 0x7f02007d
-			public const int notification_tile_bg = 2130837629;
+			public const int notification_bg_low = 2130837629;
 			
 			// aapt resource value: 0x7f02007e
-			public const int notify_panel_notification_icon_bg = 2130837630;
+			public const int notification_bg_low_normal = 2130837630;
 			
 			// aapt resource value: 0x7f02007f
-			public const int selector_pickerview_btn = 2130837631;
+			public const int notification_bg_low_pressed = 2130837631;
 			
 			// aapt resource value: 0x7f020080
-			public const int tooltip_frame_dark = 2130837632;
+			public const int notification_bg_normal = 2130837632;
 			
 			// aapt resource value: 0x7f020081
-			public const int tooltip_frame_light = 2130837633;
+			public const int notification_bg_normal_pressed = 2130837633;
+			
+			// aapt resource value: 0x7f020082
+			public const int notification_icon_background = 2130837634;
+			
+			// aapt resource value: 0x7f020088
+			public const int notification_template_icon_bg = 2130837640;
+			
+			// aapt resource value: 0x7f020089
+			public const int notification_template_icon_low_bg = 2130837641;
+			
+			// aapt resource value: 0x7f020083
+			public const int notification_tile_bg = 2130837635;
+			
+			// aapt resource value: 0x7f020084
+			public const int notify_panel_notification_icon_bg = 2130837636;
+			
+			// aapt resource value: 0x7f020085
+			public const int selector_pickerview_btn = 2130837637;
+			
+			// aapt resource value: 0x7f020086
+			public const int tooltip_frame_dark = 2130837638;
+			
+			// aapt resource value: 0x7f020087
+			public const int tooltip_frame_light = 2130837639;
 			
 			static Drawable()
 			{
@@ -2942,88 +2960,91 @@
 			public const int hdl_widget_activity_geofence_round = 2130968607;
 			
 			// aapt resource value: 0x7f040020
-			public const int hdl_widget_include_pickerview_topbar = 2130968608;
+			public const int hdl_widget_air_button = 2130968608;
 			
 			// aapt resource value: 0x7f040021
-			public const int hdl_widget_layout_basepickerview = 2130968609;
+			public const int hdl_widget_include_pickerview_topbar = 2130968609;
 			
 			// aapt resource value: 0x7f040022
-			public const int hdl_widget_pickerview = 2130968610;
+			public const int hdl_widget_layout_basepickerview = 2130968610;
 			
 			// aapt resource value: 0x7f040023
-			public const int hdl_widget_pickerview_options = 2130968611;
+			public const int hdl_widget_pickerview = 2130968611;
 			
 			// aapt resource value: 0x7f040024
-			public const int hdl_widget_pickerview_time = 2130968612;
+			public const int hdl_widget_pickerview_options = 2130968612;
 			
 			// aapt resource value: 0x7f040025
-			public const int Main = 2130968613;
+			public const int hdl_widget_pickerview_time = 2130968613;
 			
 			// aapt resource value: 0x7f040026
-			public const int notification_action = 2130968614;
+			public const int Main = 2130968614;
 			
 			// aapt resource value: 0x7f040027
-			public const int notification_action_tombstone = 2130968615;
+			public const int notification_action = 2130968615;
 			
 			// aapt resource value: 0x7f040028
-			public const int notification_media_action = 2130968616;
+			public const int notification_action_tombstone = 2130968616;
 			
 			// aapt resource value: 0x7f040029
-			public const int notification_media_cancel_action = 2130968617;
+			public const int notification_media_action = 2130968617;
 			
 			// aapt resource value: 0x7f04002a
-			public const int notification_template_big_media = 2130968618;
+			public const int notification_media_cancel_action = 2130968618;
 			
 			// aapt resource value: 0x7f04002b
-			public const int notification_template_big_media_custom = 2130968619;
+			public const int notification_template_big_media = 2130968619;
 			
 			// aapt resource value: 0x7f04002c
-			public const int notification_template_big_media_narrow = 2130968620;
+			public const int notification_template_big_media_custom = 2130968620;
 			
 			// aapt resource value: 0x7f04002d
-			public const int notification_template_big_media_narrow_custom = 2130968621;
+			public const int notification_template_big_media_narrow = 2130968621;
 			
 			// aapt resource value: 0x7f04002e
-			public const int notification_template_custom_big = 2130968622;
+			public const int notification_template_big_media_narrow_custom = 2130968622;
 			
 			// aapt resource value: 0x7f04002f
-			public const int notification_template_icon_group = 2130968623;
+			public const int notification_template_custom_big = 2130968623;
 			
 			// aapt resource value: 0x7f040030
-			public const int notification_template_lines_media = 2130968624;
+			public const int notification_template_icon_group = 2130968624;
 			
 			// aapt resource value: 0x7f040031
-			public const int notification_template_media = 2130968625;
+			public const int notification_template_lines_media = 2130968625;
 			
 			// aapt resource value: 0x7f040032
-			public const int notification_template_media_custom = 2130968626;
+			public const int notification_template_media = 2130968626;
 			
 			// aapt resource value: 0x7f040033
-			public const int notification_template_part_chronometer = 2130968627;
+			public const int notification_template_media_custom = 2130968627;
 			
 			// aapt resource value: 0x7f040034
-			public const int notification_template_part_time = 2130968628;
+			public const int notification_template_part_chronometer = 2130968628;
 			
 			// aapt resource value: 0x7f040035
-			public const int select_dialog_item_material = 2130968629;
+			public const int notification_template_part_time = 2130968629;
 			
 			// aapt resource value: 0x7f040036
-			public const int select_dialog_multichoice_material = 2130968630;
+			public const int select_dialog_item_material = 2130968630;
 			
 			// aapt resource value: 0x7f040037
-			public const int select_dialog_singlechoice_material = 2130968631;
+			public const int select_dialog_multichoice_material = 2130968631;
 			
 			// aapt resource value: 0x7f040038
-			public const int support_simple_spinner_dropdown_item = 2130968632;
+			public const int select_dialog_singlechoice_material = 2130968632;
 			
 			// aapt resource value: 0x7f040039
-			public const int tooltip = 2130968633;
+			public const int support_simple_spinner_dropdown_item = 2130968633;
 			
 			// aapt resource value: 0x7f04003a
-			public const int zxingscanneractivitylayout = 2130968634;
+			public const int tooltip = 2130968634;
 			
 			// aapt resource value: 0x7f04003b
-			public const int zxingscannerfragmentlayout = 2130968635;
+			public const int zxingscanneractivitylayout = 2130968635;
+			
+			// aapt resource value: 0x7f04003c
+			public const int zxingscannerfragmentlayout = 2130968636;
 			
 			static Layout()
 			{
diff --git a/ZigbeeApp/GateWay.Ios/AppDelegate.cs b/ZigbeeApp/GateWay.Ios/AppDelegate.cs
index 21a52c7..604e0e3 100755
--- a/ZigbeeApp/GateWay.Ios/AppDelegate.cs
+++ b/ZigbeeApp/GateWay.Ios/AppDelegate.cs
@@ -8,6 +8,8 @@
 using Microsoft.AppCenter;
 using Microsoft.AppCenter.Analytics;
 using Microsoft.AppCenter.Crashes;
+using Shared.IOS.TBL;
+
 namespace GateWay.Ios
 {
     // The UIApplicationDelegate for the application. This class is responsible for launching the
@@ -33,6 +35,8 @@
             rootViewController = new UINavigationController(new MainViewController()) { NavigationBarHidden = true };
             Window.RootViewController = rootViewController;
             Window.MakeKeyAndVisible();
+
+            Shared.IOS.TBL.WXApi.RegisterApp("wx2ec8f53f6fa36e82", "https://hdlcontrol.com/ZigbeeApp/");
 
             DeviceTokenAction += (deviceToken) =>
             {
@@ -210,6 +214,54 @@
             // Called when the application is about to terminate. Save data, if needed. See also DidEnterBackground.
             base.WillTerminate(application);
         }
+
+        public static Action<string> RespAction;
+        public static void WXLogin()
+        {
+           
+
+            var req = new SendAuthReq { Scope = "snsapi_userinfo", State = "ZigbeeApp", OpenID = "0c806938e2413ce73eef92cc3" };
+            WXApi.SendAuthReq(req, rootViewController, null, null);
+
+        }
+
+        MyWXApiDelegate myWXApiDelegate = new MyWXApiDelegate { };
+
+        class MyWXApiDelegate : WXApiDelegate
+        {
+            public override void OnReq(BaseReq req)
+            {
+
+            }
+            public override void OnResp(BaseResp resp)
+            {
+                if (resp is SendAuthResp)
+                {
+                    var sendAuthResp = resp as SendAuthResp;
+                    switch (sendAuthResp.ErrCode)
+                    {
+                        case 0:
+                            try
+                            {
+                                var result = new System.Net.WebClient { }.DownloadString($"https://api.weixin.qq.com/sns/oauth2/access_token?appid=wx2ec8f53f6fa36e82&secret=a08585cd6ff2ce64570b9e7e6525dd8e&code={((SendAuthResp)resp).Code}&grant_type=authorization_code");
+                                RespAction?.Invoke(result);
+                            }
+                            catch {
+                                RespAction?.Invoke(null);
+                            }
+                            break;
+                        default:
+                            RespAction?.Invoke(null);
+                            break;
+                    }
+
+                }
+            }
+        }
+        public override bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity, UIApplicationRestorationHandler completionHandler)
+        {
+            return WXApi.HandleOpenUniversalLink(userActivity, myWXApiDelegate);
+        }
     }
 }
 
diff --git a/ZigbeeApp/GateWay.Ios/Entitlements.plist b/ZigbeeApp/GateWay.Ios/Entitlements.plist
index aab2cd8..b4b77f5 100755
--- a/ZigbeeApp/GateWay.Ios/Entitlements.plist
+++ b/ZigbeeApp/GateWay.Ios/Entitlements.plist
@@ -6,7 +6,7 @@
 	<string>development</string>
 	<key>com.apple.developer.associated-domains</key>
 	<array>
-		<string>applinks:https://hdlcontrol.com/</string>
+		<string>applinks:hdlcontrol.com</string>
 	</array>
 </dict>
 </plist>
diff --git a/ZigbeeApp/GateWay.Ios/GateWay.Ios.csproj b/ZigbeeApp/GateWay.Ios/GateWay.Ios.csproj
index 85c0865..9abf719 100644
--- a/ZigbeeApp/GateWay.Ios/GateWay.Ios.csproj
+++ b/ZigbeeApp/GateWay.Ios/GateWay.Ios.csproj
@@ -348,6 +348,7 @@
     <BundleResource Include="Resources\Phone\AC\Swing_Auto.png" />
     <BundleResource Include="Resources\Phone\AC\Swing_AutoSelected.png" />
     <BundleResource Include="Resources\Phone\Account\Account.png" />
+    <BundleResource Include="Resources\Phone\Account\Back.png" />
     <BundleResource Include="Resources\Phone\Account\Cancle.png" />
     <BundleResource Include="Resources\Phone\Account\Cat.png" />
     <BundleResource Include="Resources\Phone\Account\ChangeSuccess.png" />
@@ -594,6 +595,8 @@
     <BundleResource Include="Resources\Phone\Item\ItemUnSelected.png" />
     <BundleResource Include="Resources\Phone\Item\MemberNotEsixtPic.png" />
     <BundleResource Include="Resources\Phone\Item\Message.png" />
+    <BundleResource Include="Resources\Phone\Item\MessageManagement.png" />
+    <BundleResource Include="Resources\Phone\Item\MessageManagementSelected.png" />
     <BundleResource Include="Resources\Phone\Item\MessageSelected.png" />
     <BundleResource Include="Resources\Phone\Item\More.png" />
     <BundleResource Include="Resources\Phone\Item\MyHome.png" />
@@ -604,6 +607,7 @@
     <BundleResource Include="Resources\Phone\Item\NoFunction.png" />
     <BundleResource Include="Resources\Phone\Item\NotAuthority.png" />
     <BundleResource Include="Resources\Phone\Item\NotShardPic.png" />
+    <BundleResource Include="Resources\Phone\Item\NowAcctionTip.png" />
     <BundleResource Include="Resources\Phone\Item\OpenIcon.png" />
     <BundleResource Include="Resources\Phone\Item\PersentIcon.png" />
     <BundleResource Include="Resources\Phone\Item\PhoneBook.png" />
@@ -621,6 +625,7 @@
     <BundleResource Include="Resources\Phone\Item\RoomIconBackground.png" />
     <BundleResource Include="Resources\Phone\Item\RoomIconBackgroundSelected.png" />
     <BundleResource Include="Resources\Phone\Item\RoomIconSelected.png" />
+    <BundleResource Include="Resources\Phone\Item\Safety.png" />
     <BundleResource Include="Resources\Phone\Item\ScanQRcodeIcon.png" />
     <BundleResource Include="Resources\Phone\Item\ScanQRcodeIconSelected.png" />
     <BundleResource Include="Resources\Phone\Item\SceneCard.png" />
diff --git a/ZigbeeApp/GateWay.Ios/Info.plist b/ZigbeeApp/GateWay.Ios/Info.plist
index ee37aaa..d121328 100755
--- a/ZigbeeApp/GateWay.Ios/Info.plist
+++ b/ZigbeeApp/GateWay.Ios/Info.plist
@@ -57,5 +57,21 @@
 	<string>1.0.19080501</string>
 	<key>CFBundleVersion</key>
 	<string>2</string>
+	<key>CFBundleURLTypes</key>
+	<array>
+		<dict>
+			<key>CFBundleURLName</key>
+			<string>weixin</string>
+			<key>CFBundleURLSchemes</key>
+			<array>
+				<string>wx2ec8f53f6fa36e82</string>
+			</array>
+		</dict>
+	</array>
+	<key>LSApplicationQueriesSchemes</key>
+	<array>
+		<string>weixin</string>
+		<string>weixinULAPI</string>
+	</array>
 </dict>
 </plist>
diff --git a/ZigbeeApp/GateWay.Ios/Resources/Language.ini b/ZigbeeApp/GateWay.Ios/Resources/Language.ini
index 20bf98f..443d45e 100755
--- a/ZigbeeApp/GateWay.Ios/Resources/Language.ini
+++ b/ZigbeeApp/GateWay.Ios/Resources/Language.ini
@@ -1618,7 +1618,7 @@
 15934=涓嬭浇鏁版嵁
 15935=涓嬭浇
 15936=璁剧疆缃戝叧缁忕含搴﹀け璐�
-15937=姝e湪淇濆瓨鍗忚皟鍣ㄧ殑nv鍒嗗尯缁勭綉淇℃伅
+15937=姝e湪淇濆瓨鍗忚皟鍣╪v鍒嗗尯淇℃伅
 15938=淇濆瓨鍗忚皟鍣ㄧ殑nv鍒嗗尯缁勭綉淇℃伅澶辫触
 15939=鎵撳紑鍗忚皟鍣ㄤ覆鍙e彂閫佸姛鑳藉け璐�
 15940=缃戝叧鏁版嵁澶囦唤澶辫触
@@ -1626,6 +1626,37 @@
 15942=鍝嶅簲瓒呮椂,缃戝叧鏁版嵁澶囦唤澶辫触
 15943=鍒涘缓澶囦唤鏂囦欢
 15944=姝e湪鎵撳紑鍗忚皟鍣ㄤ覆鍙e彂閫佸姛鑳�
+15945=鑾峰彇缃戝叧鑷姩澶囦唤璁剧疆澶辫触
+15946=璁剧疆缃戝叧鑷姩澶囦唤澶辫触
+15947=姝e湪鑾峰彇澶囦唤鏂囦欢鍒楄〃
+15948=鑾峰彇澶囦唤鏂囦欢鍒楄〃澶辫触
+15949=鍝嶅簲瓒呮椂,鑾峰彇澶囦唤鏂囦欢鍒楄〃澶辫触
+15950=姝e湪涓嬭浇澶囦唤鏂囦欢
+15951=鍝嶅簲瓒呮椂,涓嬭浇澶囦唤鏂囦欢澶辫触
+15952=涓嬭浇澶囦唤鏂囦欢澶辫触
+15953=姝e湪鎭㈠鍗忚皟鍣╪v鍒嗗尯
+15954=鎭㈠鍗忚皟鍣╪v鍒嗗尯澶辫触
+15955=鍝嶅簲瓒呮椂,鎭㈠鍗忚皟鍣╪v鍒嗗尯澶辫触
+15956=姝e湪閲嶅惎缃戝叧绯荤粺
+15957=閲嶅惎缃戝叧绯荤粺澶辫触
+15958=鍝嶅簲瓒呮椂,閲嶅惎缃戝叧绯荤粺澶辫触
+15959=缃戝叧鏁版嵁鎭㈠鎴愬姛!
+15960=铏氭嫙椹卞姩璁惧
+15961=瀵嗙爜寮�閿佹垚鍔�
+15962=瀵嗙爜寮�閿佸け璐�
+15963=鎸囩汗寮�閿佹垚鍔�
+15964=鎸囩汗寮�閿佸け璐�
+15965=IC鍗″紑閿佹垚鍔�
+15966=IC鍗″紑閿佸け璐�
+15967=寮�濮嬫椂闂村ぇ浜庣粨鏉熸椂闂�
+15968=纭畾瑕佽В闄ょ粦瀹歿0}锛�
+15969=鏇存柊绗笁鏂逛俊鎭け璐�
+15970=缁戝畾{0}鎴愬姛!
+15971=閿欒,绗笁鏂逛俊鎭涪澶�
+15972=鎮ㄥ綋鍓嶇殑IP鍙婄鍙e湪浜戠涓嶅瓨鍦�,璇烽噸鏂扮櫥褰�!
+15973=娑堟伅涓績
+15974=纭鍒犻櫎娑堟伅?
+15975=姝e湪涓婁紶澶囦唤鏂囦欢
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
 18004=鎸囧畾缃戝叧宸茬粡琚粦瀹�
diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Account/Back.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Account/Back.png
new file mode 100755
index 0000000..6fea209
--- /dev/null
+++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Account/Back.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MessageManagement.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MessageManagement.png
new file mode 100755
index 0000000..69d3700
--- /dev/null
+++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MessageManagement.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MessageManagementSelected.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MessageManagementSelected.png
new file mode 100755
index 0000000..a81f5ed
--- /dev/null
+++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MessageManagementSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NowAcctionTip.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NowAcctionTip.png
new file mode 100755
index 0000000..759e062
--- /dev/null
+++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NowAcctionTip.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Safety.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Safety.png
new file mode 100755
index 0000000..d39c896
--- /dev/null
+++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Safety.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/UnLockFail.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/UnLockFail.png
index 21a35a5..ddd27f9 100755
--- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/UnLockFail.png
+++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/UnLockFail.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/UnLockSuccess.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/UnLockSuccess.png
index 2c72e12..ef9c6ce 100755
--- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/UnLockSuccess.png
+++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/UnLockSuccess.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Ios/packages.config b/ZigbeeApp/GateWay.Ios/packages.config
old mode 100644
new mode 100755
diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs
index 325dccd..4dee823 100755
--- a/ZigbeeApp/Shared/Common/CommonPage.cs
+++ b/ZigbeeApp/Shared/Common/CommonPage.cs
@@ -57,7 +57,7 @@
         /// <summary>
         /// 鐗堟湰鍙�
         /// </summary>
-        public static string CodeIDString = "1.0.19111201";
+        public static string CodeIDString = "1.0.19111401";
         /// <summary>
         /// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee)
         /// </summary>
@@ -268,7 +268,7 @@
         /// <param name="token">token</param>
         /// <param name="requestMethod">POST 鎴栬�� GET 绛夌瓑</param>
         /// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns>
-        private async System.Threading.Tasks.Task<byte[]> DoRequestZigbeeHttpsInterface(string requestFullUrl, byte[] byteData, string token, string requestMethod = "POST")
+        public async System.Threading.Tasks.Task<byte[]> DoRequestZigbeeHttpsInterface(string requestFullUrl, byte[] byteData, string token, string requestMethod = "POST")
         {
             try
             {
@@ -279,7 +279,11 @@
                 //2锛� 鍒濆鍖朒ttpWebRequest瀵硅薄
                 webRequest.Method = requestMethod;
                 webRequest.Timeout = 10 * 1000;
-                webRequest.Headers.Add(HttpRequestHeader.Authorization, token);
+                if (token != null)
+                {
+                    //瀵瑰簲寰俊缃戝潃
+                    webRequest.Headers.Add(HttpRequestHeader.Authorization, token);
+                }
                 if (requestMethod == "GET")
                 {
                     //webRequest.ContentType = "text/html";
diff --git a/ZigbeeApp/Shared/Common/DeviceUI.cs b/ZigbeeApp/Shared/Common/DeviceUI.cs
index 4b279ac..a796ccb 100755
--- a/ZigbeeApp/Shared/Common/DeviceUI.cs
+++ b/ZigbeeApp/Shared/Common/DeviceUI.cs
@@ -304,6 +304,11 @@
                     //涓户鍣�
                     deviceTypeR = R.MyInternationalizationString.Repeater;
                     break;
+                case DeviceType.DoorLock:
+                    //闂ㄩ攣
+                    deviceTypeR = R.MyInternationalizationString.DoorLock;
+                    break;
+
                 default:
                     deviceTypeR = R.MyInternationalizationString.UnknowDevice;
                     break;
diff --git a/ZigbeeApp/Shared/Common/ZigbeeColor.cs b/ZigbeeApp/Shared/Common/ZigbeeColor.cs
index 3bc8bd6..c3e834f 100755
--- a/ZigbeeApp/Shared/Common/ZigbeeColor.cs
+++ b/ZigbeeApp/Shared/Common/ZigbeeColor.cs
@@ -186,6 +186,11 @@
         /// </summary>
         public uint GXCGrayLineColor2 = 0x66CCCCCC;
         /// <summary>
+        /// 娴呰壊绾挎潯 0xFFB7B8BB
+        /// </summary>
+        public uint GXCGrayLineColor3 = 0xFFB7B8BB;
+
+        /// <summary>
         /// 鎸夐挳鏈�変腑鐘舵�� 0xFF656565;
         /// </summary>
         public uint GXCButtonUnSelectedColor = 0xFF656565;
diff --git a/ZigbeeApp/Shared/DLL/Android/Shared.Droid.HDLWidget.dll b/ZigbeeApp/Shared/DLL/Android/Shared.Droid.HDLWidget.dll
index 5d5933f..2d459cd 100755
--- a/ZigbeeApp/Shared/DLL/Android/Shared.Droid.HDLWidget.dll
+++ b/ZigbeeApp/Shared/DLL/Android/Shared.Droid.HDLWidget.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/Android/Shared.Droid.dll b/ZigbeeApp/Shared/DLL/Android/Shared.Droid.dll
index b5c515c..79a8b80 100755
--- a/ZigbeeApp/Shared/DLL/Android/Shared.Droid.dll
+++ b/ZigbeeApp/Shared/DLL/Android/Shared.Droid.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.TBL.dll b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.TBL.dll
index ef1fa70..956a975 100755
--- a/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.TBL.dll
+++ b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.TBL.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.dll b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.dll
index e131936..9d9363c 100755
--- a/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.dll
+++ b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs b/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs
index 63e9498..394f0c2 100755
--- a/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs
@@ -72,10 +72,6 @@
         /// </summary>
         private Button currentModeBtn;
         /// <summary>
-        /// 褰撳墠娓╁害
-        /// </summary>
-        private Button currentTemperatureBtn;
-        /// <summary>
         /// 娣诲姞娓╁害
         /// </summary>
         private Button addTemperatureBtn;
@@ -112,6 +108,11 @@
         /// 浼犺繃鏉ョ殑ac
         /// </summary>
         private ZigBee.Device.AC ac;
+        /// <summary>
+        /// mArcScaleSeekBar
+        /// </summary>
+        private ArcScaleSeekBar mArcScaleSeekBar = new ArcScaleSeekBar { };
+
         #endregion
 
         #region 鈼� 鎺ュ彛___________________________
@@ -174,7 +175,7 @@
                                     ac.currentCoolingSetpoint = curTemp;
                                     if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8)
                                     {
-                                        currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} 鈩�";
+                                        mArcScaleSeekBar.Progress = ac.currentCoolingSetpoint;
                                     }
 
                                     ac.LastDateTime = DateTime.Now;
@@ -184,7 +185,7 @@
                                     ac.currentHeatingSetpoint = curTemp;
                                     if (ac.currentSystemMode == 4)
                                     {
-                                        currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} 鈩�";
+                                        mArcScaleSeekBar.Progress = ac.currentHeatingSetpoint;
                                     }
                                     ac.LastDateTime = DateTime.Now;
                                     break;
@@ -193,7 +194,7 @@
                                     ac.currentAutoSetpoint = curTemp;
                                     if (ac.currentSystemMode == 1)
                                     {
-                                        currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} 鈩�";
+                                        mArcScaleSeekBar.Progress = ac.currentAutoSetpoint;
                                     }
                                     ac.LastDateTime = DateTime.Now;
                                     break;
@@ -210,7 +211,8 @@
                                         modeBtn.SelectedImagePath = ACControlBase.GetModeSelectedImagePathByModeId(ac.currentSystemMode);
                                         modeBtn.UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByModeId(ac.currentSystemMode);
                                         currentModeBtn.Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode);
-                                        currentTemperatureBtn.Text = $"{ACControlBase.GetCurrentModeTemperature(ac)} 鈩�";
+
+                                        mArcScaleSeekBar.Progress = ACControlBase.GetCurrentModeTemperature(ac);
 
                                         fanModeBtn.IsSelected = false;
                                         FanSwingModeBtn.IsSelected = false;
@@ -222,8 +224,8 @@
                                         modeBtn.SelectedImagePath = ACControlBase.GetModeSelectedImagePathByModeId(ac.currentSystemMode);
                                         modeBtn.UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByModeId(ac.currentSystemMode);
                                         currentModeBtn.Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode);
-                                        currentTemperatureBtn.Text = $"{ACControlBase.GetCurrentModeTemperature(ac)} 鈩�";
 
+                                        mArcScaleSeekBar.Progress = ACControlBase.GetCurrentModeTemperature(ac);
                                         fanModeBtn.IsSelected = true;
                                         FanSwingModeBtn.IsSelected = true;
                                     }
@@ -250,7 +252,7 @@
                                     fanModeBtn.UnSelectedImagePath = ACControlBase.GetFanModeUnSelectedImagePathByFanModeId(ac.currentFanMode);
                                     break;
                                 case 4096:
-                                    //椋庢墖褰撳墠鐨勬壂椋庢ā寮� 
+                                    //椋庢墖褰撳墠鐨勬壂椋庢ā寮�
                                     ac.currentFanSwingMode = attriButeList[0].AttriButeData;
                                     ac.LastDateTime = DateTime.Now;
                                     FanSwingModeBtn.IsSelected = true;
@@ -331,6 +333,7 @@
         {
             BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
             ZigBee.Device.ZbGateway.StatusList.Add(this);
+            HomePage.Instance.ScrollEnabled = false;
         }
 
         #endregion
@@ -346,6 +349,7 @@
             //action();
             //action = null;
             RemoveUpdateControlDeviceStatuAction();
+            HomePage.Instance.ScrollEnabled = true;
             base.RemoveFromParent();
         }
 
@@ -435,15 +439,6 @@
                 RemoveFromParent();
             };
 
-            var sharedBtn = new Button
-            {
-                X = Application.GetRealWidth(850),
-                Width = Application.GetMinReal(69),
-                Height = Application.GetMinReal(69),
-                Gravity = Gravity.CenterVertical,
-                UnSelectedImagePath = "Item/Shared.png"
-            };
-            top.topView.AddChidren(sharedBtn);
 
             var moreBtn = new Button
             {
@@ -516,72 +511,71 @@
             };
             itemView.AddChidren(indoorTemperatureBtn);
 
-
-            var controlBG = new FrameLayout()
+            mArcScaleSeekBar = new ArcScaleSeekBar
             {
                 Y = Application.GetRealHeight(412),
-                Height = Application.GetMinRealAverage(547),
-                Width = Application.GetMinRealAverage(671),
+                Width = Application.GetRealWidth(671),
+                Height = Application.GetRealHeight(671),
                 Gravity = Gravity.CenterHorizontal,
-                BackgroundImagePath = "AC/Group.png"
+                MinValue=ACControlBase.Temperature_Low,
+                MaxValue=ACControlBase.Temperature_High,
+                Progress=ACControlBase.GetCurrentModeTemperature(ac)
             };
-            itemView.AddChidren(controlBG);
-
-            var controlBG2 = new Button()
+            itemView.AddChidren(mArcScaleSeekBar);
+            mArcScaleSeekBar.OnStopTrackingTouchEvent += (sender, e) =>
             {
-                Y = Application.GetRealHeight(873),
-                Height = Application.GetMinRealAverage(121),
-                Width = Application.GetMinRealAverage(351),
-                UnSelectedImagePath = "AC/Path.png",
-                Gravity = Gravity.CenterHorizontal
+                //cool  //dry
+                if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8)
+                {
+                    ac.currentCoolingSetpoint = e;
+                    ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint * 100);
+                }
+                //heat
+                else if (ac.currentSystemMode == 4)
+                {
+                    ac.currentHeatingSetpoint = e;
+                    ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint * 100);
+                }
+                //auto
+                else if (ac.currentSystemMode == 1)
+                {
+                    ac.currentAutoSetpoint = e;
+                    ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint * 100);
+                }
             };
-            itemView.AddChidren(controlBG2);
+
             //褰撳墠妯″紡
             currentModeBtn = new Button()
             {
-                Y = Application.GetRealHeight(187),
+                Y = Application.GetRealHeight(599),
                 Height = Application.GetRealHeight(80),
                 Width = Application.GetRealWidth(200),
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                 Gravity = Gravity.CenterHorizontal,
                 Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode)
             };
-            controlBG.AddChidren(currentModeBtn);
+            itemView.AddChidren(currentModeBtn);
             //闄嶄綆娓╁害
             reduceTemperatureBtn = new Button()
             {
-                X = Application.GetRealWidth(112),
-                Y = Application.GetRealHeight(268),
+                X = Application.GetRealWidth(268),
+                Y = Application.GetRealHeight(680),
                 Width = Application.GetMinRealAverage(80),
                 Height = Application.GetMinRealAverage(80),
                 UnSelectedImagePath = "AC/Reduce.png"
             };
-            controlBG.AddChidren(reduceTemperatureBtn);
-
-            //娓╁害
-            currentTemperatureBtn = new Button()
-            {
-                //X = Application.GetRealWidth(239),
-                Y = Application.GetRealHeight(248),
-                Width = Application.GetRealWidth(180),
-                Height = Application.GetRealHeight(100),
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                TextSize = 15,
-                Text = $"{ACControlBase.GetCurrentModeTemperature(ac)} 掳C",
-                Gravity = Gravity.CenterHorizontal
-            };
-            controlBG.AddChidren(currentTemperatureBtn);
+            itemView.AddChidren(reduceTemperatureBtn);
 
             //娣诲姞娓╁害
             addTemperatureBtn = new Button()
             {
-                X = Application.GetRealWidth(472),
-                Y = Application.GetRealHeight(268),
+                X = Application.GetRealWidth(628),
+                Y = Application.GetRealHeight(680),
                 Width = Application.GetMinRealAverage(80),
                 Height = Application.GetMinRealAverage(80),
                 UnSelectedImagePath = "AC/Add.png"
             };
-            controlBG.AddChidren(addTemperatureBtn);
+            itemView.AddChidren(addTemperatureBtn);
 
             //鎵
             FanSwingModeBtn = new Button()
@@ -595,7 +589,7 @@
                 IsSelected = ACControlBase.IsOpen(ac)
             };
             itemView.AddChidren(FanSwingModeBtn);
-            
+
             //妯″紡
             modeBtn = new Button()
             {
@@ -1075,7 +1069,7 @@
             modeBtn.UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByMode(acMode);
             currentModeBtn.Text = ACControlBase.GetModeNameByMode(acMode);
             ac.currentSystemMode = (int)acMode;
-            currentTemperatureBtn.Text = $"{ACControlBase.GetCurrentModeTemperature(ac)} 掳C";
+            mArcScaleSeekBar.Progress = ACControlBase.GetCurrentModeTemperature(ac);
             ac.SetSystemModeAsync(acMode);
 
 
@@ -1325,7 +1319,8 @@
                 }
                 ac.currentCoolingSetpoint += 1;
                 ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint * 100);
-                currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} 掳C";
+                //currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} 掳C";
+                mArcScaleSeekBar.Progress = ac.currentCoolingSetpoint;
             }
             //heat
             else if (ac.currentSystemMode == 4)
@@ -1336,7 +1331,8 @@
                 }
                 ac.currentHeatingSetpoint += 1;
                 ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint * 100);
-                currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} 掳C";
+                //currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} 掳C";
+                mArcScaleSeekBar.Progress = ac.currentHeatingSetpoint;
             }
             //auto
             else if (ac.currentSystemMode == 1)
@@ -1347,9 +1343,9 @@
                 }
                 ac.currentAutoSetpoint += 1;
                 ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint * 100);
-                currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} 掳C";
+                //currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} 掳C";
+                mArcScaleSeekBar.Progress = ac.currentAutoSetpoint;
             }
-
 
         }
 
@@ -1379,7 +1375,8 @@
                 ac.currentCoolingSetpoint -= 1;
                 ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint * 100);
 
-                currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} 掳C";
+                //currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} 掳C";
+                mArcScaleSeekBar.Progress = ac.currentCoolingSetpoint;
             }
             //heat
             else if (ac.currentSystemMode == 4)
@@ -1391,7 +1388,8 @@
                 ac.currentHeatingSetpoint -= 1;
                 ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint * 100);
 
-                currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} 掳C";
+                //currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} 掳C";
+                mArcScaleSeekBar.Progress = ac.currentHeatingSetpoint;
             }
             //auto
             else if (ac.currentSystemMode == 1)
@@ -1403,14 +1401,15 @@
                 ac.currentAutoSetpoint -= 1;
                 ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint * 100);
 
-                currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} 掳C";
+                //currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} 掳C";
+                mArcScaleSeekBar.Progress = ac.currentAutoSetpoint;
             }
 
         }
 
         #endregion
 
-       
+
 
         #region 鈼� 鎺у埗鍙嶉_________________________
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
index a7280e5..c396c94 100755
--- a/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
@@ -261,7 +261,8 @@
                 Y = Application.GetRealHeight(1737),
                 Width = Application.GetMinRealAverage(115),
                 Height = Application.GetMinRealAverage(115),
-                UnSelectedImagePath = "Account/Wechat.png"
+                UnSelectedImagePath = "Account/Wechat.png",
+                Gravity=Gravity.CenterHorizontal
             };
             midFrameLayout.AddChidren(wechatBtn);
 
@@ -273,7 +274,7 @@
                 Height = Application.GetMinRealAverage(115),
                 UnSelectedImagePath = "Account/QQ.png"
             };
-            midFrameLayout.AddChidren(qqBtn);
+            //midFrameLayout.AddChidren(qqBtn);
 
             #endregion
 
@@ -485,15 +486,15 @@
         private void LoginByWechat(object sender, MouseEventArgs mouseEventArgs)
         {
 #if Android
-            var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP),
-                Language.StringByID(R.MyInternationalizationString.LoginByWechat),
-                Language.StringByID(R.MyInternationalizationString.Cancel),
-                Language.StringByID(R.MyInternationalizationString.Confrim));
-            alert.Show();
-            alert.ResultEventHandler += (send, e) =>
-            {
-                if (e)
-                {
+            //var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP),
+            //    Language.StringByID(R.MyInternationalizationString.LoginByWechat),
+            //    Language.StringByID(R.MyInternationalizationString.Cancel),
+            //    Language.StringByID(R.MyInternationalizationString.Confrim));
+            //alert.Show();
+            //alert.ResultEventHandler += (send, e) =>
+            //{
+                //if (e)
+                //{
                     com.hdl.home.Application.WXLogin();
                     com.hdl.home.WXEntryActivity.RespAction = (authStr) =>
                     {
@@ -505,7 +506,6 @@
                         {
                             new System.Threading.Thread(async () =>
                             {
-
                                 var re = await isBindAuthAsync(authStr);
                                 if (re)
                                 {
@@ -542,10 +542,63 @@
                             { IsBackground = true }.Start();
                         }
                     };
+                //}
+            //};
+#endif
+
+#if iOS
+            GateWay.Ios.AppDelegate.WXLogin();
+            GateWay.Ios.AppDelegate.RespAction = (authStr) =>
+            {
+                if (authStr == null)
+                {
+
+                }
+                else
+                {
+                    new System.Threading.Thread(async () =>
+                    {
+
+                        var re = await isBindAuthAsync(authStr);
+                        if (re)
+                        {
+                            //鐩存帴鐧诲綍
+                            //this.RemoveFromParent();
+
+                            //UserPage.Instance.Fresh();
+                            //鍚姩ZigBee
+                            ZigBee.Common.Application.Init();
+                            var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
+                            var homes = await House.GetHomeLists();
+                            //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
+                            await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
+                            Shared.Common.Room.CanInitAllRoom = true;
+                            Shared.Common.Room.InitAllRoom();
+                            Application.RunOnMainThread(() =>
+                            {
+                                this.RemoveFromParent();
+                                UserPage.Instance.Fresh();
+                            });
+                        }
+                        else
+                        {
+                            var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr);
+                            Application.RunOnMainThread(() =>
+                            {
+                                var registerPage = new AccountRegister();
+                                Shared.Common.CommonPage.Instance.AddChidren(registerPage);
+                                registerPage.OpenID = authRes.openid;
+                                registerPage.Show();
+                            });
+                        }
+                    })
+                    { IsBackground = true }.Start();
                 }
             };
 #endif
 
+
+
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/Device/AirSwitch/AirSwitchControl.cs b/ZigbeeApp/Shared/Phone/Device/AirSwitch/AirSwitchControl.cs
deleted file mode 100755
index 91cab32..0000000
--- a/ZigbeeApp/Shared/Phone/Device/AirSwitch/AirSwitchControl.cs
+++ /dev/null
@@ -1,542 +0,0 @@
-锘縰sing System;
-using Shared.Common;
-using Shared.Phone.UserView;
-using ZigBee.Device;
-namespace Shared.Phone.Device.AirSwitch
-{
-    /// <summary>
-    /// Air switch control.
-    /// </summary>
-    public class AirSwitchControl:FrameLayout, ZigBee.Common.IStatus
-    {
-        #region 鈼� 鍙橀噺__________________________
-        /// <summary>
-        /// 璁惧鏄惁鍦ㄧ嚎鏍囪瘑--Online
-        /// </summary>
-        private readonly string DeviceStatus_Online = "Online";
-        /// <summary>
-        /// 璁惧鐘舵�佸紑鍏虫爣璇�--Switch
-        /// </summary>
-        private readonly string DeviceStatus_OnOffStatus = "Switch";
-        /// <summary>
-        /// 寮�鍏�
-        /// </summary>
-        public Button switchBtn;
-        /// <summary>
-        /// The action.
-        /// </summary>
-        public Action action;
-        /// <summary>
-        /// The light view.
-        /// </summary>
-        public FrameLayout deviceView;
-        /// <summary>
-        /// The light image.
-        /// </summary>
-        public Button deviceIMG;
-        /// <summary>
-        /// 鏀惰棌鎸夐挳
-        /// </summary>
-        public Button collectionBtn;
-        /// <summary>
-        /// 鏇村璁剧疆
-        /// </summary>
-        private Button moreBtn;
-        /// <summary>
-        /// 鎴块棿
-        /// </summary>
-        private Button roomBtn;
-        /// <summary>
-        /// 鎴块棿鍚�
-        /// </summary>
-        private Button roomName;
-        /// <summary>
-        /// 浼犺繃鏉ョ殑璁惧
-        /// </summary>
-        private DeviceUI device;
-        /// <summary>
-        /// 浼犺繃鏉ョ殑鎴块棿
-        /// </summary>
-        private Shared.Common.Room room;
-        /// <summary>
-        /// 缃戝叧
-        /// </summary>
-        private ZbGateway zbGateway = null;
-        /// <summary>
-        /// 鏄惁鍙戦�佹帶鍒跺懡浠ゆ垚鍔熶簡
-        /// </summary>
-        private bool sendedControlCommand = false;
-
-        #endregion
-
-        #region 鈼� 鎺ュ彛__________________________
-        /// <summary>
-        /// 澶勭悊鍙樺寲浜嬩欢 --灏嗗純鐢� 鏀圭敤DeviceInfoChange()
-        /// </summary>
-        /// <returns>The changed.</returns>
-        /// <param name="common">Common.</param>
-        public void Changed(CommonDevice common)
-        {
-
-        }
-        /// <summary>
-        /// Changeds the IL ogic status.
-        /// </summary>
-        /// <param name="logic">Logic.</param>
-        public void ChangedILogicStatus(ZigBee.Device.Logic logic)
-        {
-            //throw new NotImplementedException();
-        }
-        /// <summary>
-        /// Changeds the IS cene status.
-        /// </summary>
-        /// <param name="scene">Scene.</param>
-        public void ChangedISceneStatus(Scene scene)
-        {
-            //throw new NotImplementedException();
-        }
-        /// <summary>
-        /// 璁惧鐘舵�佹洿鏂版帴鍙�
-        /// <para>type锛氬鏋滀负 DeviceInComingRespon:璁惧鏂颁笂鎶�</para>
-        /// <para>type锛氬鏋滀负 IASInfoReport:RemoveDeviceRespon</para>
-        /// <para>type锛氬鏋滀负 DeviceStatusReport:璁惧涓婃姤</para>
-        /// <para>type锛氬鏋滀负 IASInfoReport:IAS瀹夐槻淇℃伅涓婃姤</para>
-        /// <para>type锛氬鏋滀负 OnlineStatusChange: 璁惧鍦ㄧ嚎鐘舵�佹洿鏂�</para>
-        /// </summary>
-        /// <param name="common">Common.</param>
-        /// <param name="typeTag">Type tag.</param>
-        public void DeviceInfoChange(CommonDevice common, string typeTag)
-        {
-            if (typeTag == "DeviceStatusReport")
-            {
-                Application.RunOnMainThread(() =>
-                {
-                    try
-                    {
-                        var deviceUI = deviceView.Tag as DeviceUI;
-                        //璁惧涓虹┖
-                        if (deviceUI.CommonDevice == null)
-                        {
-                            return;
-                        }
-                        //鏄惁涓哄綋鍓嶈澶�
-                        if (deviceUI.CommonDevice.DeviceEpoint != common.DeviceEpoint || deviceUI.CommonDevice.DeviceAddr != common.DeviceAddr)
-                        {
-                            return;
-                        }
-                        if (deviceUI.CommonDevice.Type == DeviceType.AirSwitch)
-                        {
-                            if (common.DeviceStatusReport.CluterID == 6)
-                            {
-                                var airSwitch = deviceUI.CommonDevice as ZigBee.Device.AirSwitch;
-                                airSwitch.DeviceStatusReport = common.DeviceStatusReport;
-                                //璁板綍銆佹洿鏂扮姸鎬�
-                                if (airSwitch.DeviceStatusReport.AttriBute == null || airSwitch.DeviceStatusReport.AttriBute.Count == 0)
-                                {
-                                    return;
-                                }
-                                airSwitch.OnOffStatus = airSwitch.DeviceStatusReport.AttriBute[0].AttriButeData;
-                                switchBtn.IsSelected = airSwitch.OnOffStatus == 1;
-                                airSwitch.LastDateTime = DateTime.Now;
-                            }
-                            //***鏂版敼***璁惧鐘舵�佷笂鎶ヤ腑锛屽綋CluterID=3,璇佹槑璁惧鍦ㄧ嚎锛岀洿鎺ユ爣璁�
-                            else if (common.DeviceStatusReport.CluterID == 3)
-                            {
-                                var airSwitch = deviceUI.CommonDevice as ZigBee.Device.AirSwitch;
-                                airSwitch.IsOnline = 1;
-                                deviceIMG.IsSelected = airSwitch.IsOnline == 1;
-                                airSwitch.LastDateTime = DateTime.Now;
-                            }
-                        }
-                    }
-                    catch (Exception ex)
-                    {
-                        System.Console.WriteLine($"Error:{ex.Message}");
-                    }
-                });
-            }
-            else if (typeTag == "OnlineStatusChange")
-            {
-                Application.RunOnMainThread(() =>
-                {
-                    try
-                    {
-                        var deviceUI = deviceView.Tag as DeviceUI;
-                        //璁惧涓虹┖
-                        if (deviceUI.CommonDevice == null)
-                        {
-                            return;
-                        }
-                        //鏄惁涓哄綋鍓嶈澶�
-                        if (deviceUI.CommonDevice.DeviceEpoint != common.DeviceEpoint || deviceUI.CommonDevice.DeviceAddr != common.DeviceAddr)
-                        {
-                            return;
-                        }
-                        if (deviceUI.CommonDevice.Type == DeviceType.AirSwitch)
-                        {
-                            var airSwitch = deviceUI.CommonDevice as ZigBee.Device.AirSwitch;
-                            airSwitch.IsOnline = common.IsOnline;
-                            deviceIMG.IsSelected = airSwitch.IsOnline == 1;
-                            airSwitch.LastDateTime = DateTime.Now;
-                        }
-                    }
-                    catch (Exception ex)
-                    {
-                        System.Console.WriteLine($"Error:{ex.Message}");
-                    }
-                });
-            }
-        }
-        #endregion
-
-        #region 鈼� 鍒濆鍖朹_________________________
-        /// <summary>
-        /// 鏋勯�犳柟娉�
-        /// </summary>
-        public AirSwitchControl()
-        {
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
-            ZbGateway.StatusList.Add(this);
-        }
-        /// <summary>
-        /// 閲嶅啓绉婚櫎鏂规硶
-        /// </summary>
-        public override void RemoveFromParent()
-        {
-            ZbGateway.StatusList.Remove(this);
-            action?.Invoke();
-            RemoveUpdateControlDeviceStatuAction();
-            base.RemoveFromParent();
-        }
-        /// <summary>
-        /// 鏄剧ず鐣岄潰
-        /// </summary>
-        /// <param name="device">Device.</param>
-        /// <param name="room">Room.</param>
-        public void Show(DeviceUI device, Shared.Common.Room room)
-        {
-            
-            #region topview
-            var topBGView = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(CommonPage.Navigation_Height),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
-            };
-            AddChidren(topBGView);
-            var topView = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
-                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-            };
-            AddChidren(topView);
-
-            moreBtn = new Device.CommonForm.SelectedStatuButton()
-            {
-                X = Application.GetRealWidth(CommonPage.AppRealWidth - 150),
-                Width = Application.GetMinReal(110),
-                Height = Application.GetMinReal(110),
-                Gravity = Gravity.CenterVertical,
-                UnSelectedImagePath = "Item/More.png",
-                SelectedImagePath = "Item/MoreSelected.png",
-            };
-            topView.AddChidren(moreBtn);
-
-            var back = new Device.CommonForm.BackButton() { };
-            topView.AddChidren(back);
-            back.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-            };
-
-            if (device == null || device.CommonDevice == null || room == null)
-            {
-                return;
-            }
-            this.device = device;
-            this.zbGateway = this.device.CommonDevice.Gateway;
-            this.room = room;
-
-            var airSwitch = device.CommonDevice as ZigBee.Device.AirSwitch;
-            //琛ヤ笂闈炶繙绋�
-            if (airSwitch.Gateway == null)
-            {
-                return;
-            }
-            if (airSwitch.Gateway.IsVirtual)
-            {
-                UserHomeView.ReadStatus(airSwitch, () =>
-                {
-                    airSwitch.ReadOnOffStatus();
-                    airSwitch.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                });
-            }
-            else
-            {
-                if ((DateTime.Now - airSwitch.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
-                {
-                    airSwitch.ReadOnOffStatus();
-                    airSwitch.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                }
-            }
-            #endregion
-
-            #region midFL
-            var midFL = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.Navigation_Height),
-                Y = topView.Bottom,
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-            };
-            this.AddChidren(midFL);
-
-            var itemView = new FrameLayout()
-            {
-                X = Application.GetRealWidth(50),
-                Y = Application.GetRealHeight(50),
-                Width = Application.GetRealWidth(CommonPage.AppRealWidth - 100),
-                Height = Application.GetRealHeight(850),
-                Radius = CommonPage.BigFormRadius,
-                Gravity = Gravity.CenterHorizontal,
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
-            };
-            midFL.AddChidren(itemView);
-            deviceView = new FrameLayout()
-            {
-                X = 2,
-                Y = 2,
-                Width = itemView.Width - 4,
-                Height = itemView.Height - Application.GetRealHeight(130),
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                Tag = device
-            };
-            itemView.AddChidren(deviceView);
-
-            collectionBtn = new Button()
-            {
-                X = deviceView.Width - Application.GetRealWidth(130),
-                Y = Application.GetRealHeight(20),
-                Width = Application.GetMinReal(110),
-                Height = Application.GetMinReal(110),
-                UnSelectedImagePath = "Item/Collection.png",
-                SelectedImagePath = "Item/CollectionSelected.png"
-            };
-            deviceView.AddChidren(collectionBtn);
-
-            deviceIMG = new Button()
-            {
-                Y = Application.GetRealHeight(100),
-                Height = Application.GetMinRealAverage(240),
-                Width = Application.GetMinRealAverage(240),
-                Gravity = Gravity.CenterHorizontal,
-                UnSelectedImagePath = device.IconPath,
-                SelectedImagePath = device.OnlineIconPath,
-                IsSelected = airSwitch.IsOnline==1,
-                Tag = DeviceStatus_Online
-            };
-            deviceView.AddChidren(deviceIMG);
-
-            var airSwitchName = new Button()
-            {
-                Y = deviceIMG.Bottom,
-                Height = Application.GetRealHeight(85),
-                Gravity = Gravity.CenterHorizontal,
-                Text = device.CommonDevice.DeviceEpointName,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor
-            };
-            deviceView.AddChidren(airSwitchName);
-
-            switchBtn = new Button()
-            {
-                Y = airSwitchName.Bottom + Application.GetRealHeight(70),
-                Gravity = Gravity.CenterHorizontal,
-                Width = Application.GetRealWidth(180),
-                Height = Application.GetRealHeight(120),
-                UnSelectedImagePath = "Item/Switch.png",
-                SelectedImagePath = "Item/SwitchSelected.png",
-                Tag = DeviceStatus_OnOffStatus,
-                IsSelected = airSwitch.OnOffStatus == 1
-            };
-            deviceView.AddChidren(switchBtn);
-
-            roomBtn = new Button()
-            {
-                X = Application.GetRealWidth(50),
-                Y = Application.GetRealHeight(25) + deviceView.Bottom,
-                Width = Application.GetMinReal(80),
-                Height = Application.GetMinReal(80),
-                UnSelectedImagePath = "Item/Room.png",
-                SelectedImagePath = "Item/RoomSelected.png"
-            };
-            itemView.AddChidren(roomBtn);
-
-            roomName = new Button()
-            {
-                X = roomBtn.Right + Application.GetRealWidth(20),
-                Y = roomBtn.Y,
-                Width = Application.GetRealWidth(400),
-                Height = Application.GetRealHeight(80),
-                Text = room.Name,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor
-            };
-            itemView.AddChidren(roomName);
-
-            //var moreBtn = new Button()
-            //{
-            //    X = itemView.Width - Application.GetRealWidth(130),
-            //    Y = roomBtn.Y,
-            //    Width = Application.GetMinReal(80),
-            //    Height = Application.GetMinReal(80),
-            //    UnSelectedImagePath = "Item/More.png",
-            //    SelectedImagePath = "Item/MoreSelected.png",
-            //};
-            //itemView.AddChidren(moreBtn);
-            var dev = Shared.Common.Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName);
-            if (dev == null)
-            {
-                collectionBtn.IsSelected = false;
-            }
-            else
-            {
-                collectionBtn.IsSelected = true;
-            }
-
-            #endregion
-
-            BindEvent();
-        }
-        #endregion
-
-        #region 鈼� 澶ф潅鐑______________________
-        /// <summary>
-        /// 缁戝畾鎸夐挳鐨勪簨浠�
-        /// </summary>
-        private void BindEvent()
-        {
-            switchBtn.MouseUpEventHandler += Switch;
-            collectionBtn.MouseUpEventHandler += Collection;
-            moreBtn.MouseUpEventHandler += More;
-            roomBtn.MouseUpEventHandler += BackToRoomHandler;
-            roomName.MouseUpEventHandler += BackToRoomHandler;
-        }
-
-        /// <summary>
-        /// 寮�鍏宠缃�
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="eventArgs">Event arguments.</param>
-        private void Switch(object sender, MouseEventArgs eventArgs)
-        {
-            sendedControlCommand = false;
-            zbGateway.ReportAction += UpdateDeviceControllStatu;
-            switchBtn.IsSelected = !switchBtn.IsSelected;
-            if (switchBtn.IsSelected == true)
-            {
-                (device.CommonDevice as ZigBee.Device.AirSwitch).SwitchControl(1);
-            }
-            else
-            {
-                (device.CommonDevice as ZigBee.Device.AirSwitch).SwitchControl(0);
-            }
-            //鎺у埗寤舵椂鍥炶皟
-            DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
-            {
-                if (Parent == null)
-                {
-                    return;
-                }
-                RemoveUpdateControlDeviceStatuAction();
-                if (sendedControlCommand == false)
-                {
-                    DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
-                }
-            });
-        }
-
-        /// <summary>
-        /// 鏇村璁剧疆
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="e">E.</param>
-        private void More(object sender, MouseEventArgs e)
-        {
-            var detailInfo = new Device.CommonForm.DeviceDetailInfo { };
-            UserView.HomePage.Instance.AddChidren(detailInfo);
-            UserView.HomePage.Instance.PageIndex += 1;
-            detailInfo.Show(device, room);
-            detailInfo.action = () =>
-            {
-                Show(device, room);
-            };
-        }
-
-        /// <summary>
-        /// 鏀惰棌鍒颁富椤�
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="e">E.</param>
-        private void Collection(object sender, MouseEventArgs e)
-        {
-            //collection
-            if (collectionBtn.IsSelected)
-            {
-                Shared.Common.Room.Lists[0].DeleteDevice(device.FileName);
-                collectionBtn.IsSelected = false;
-            }
-            else
-            {
-                Shared.Common.Room.Lists[0].AddDevice(device.FileName);
-                collectionBtn.IsSelected = true;
-            }
-        }
-
-        /// <summary>
-        /// 鍥炲埌涓婚〉
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
-        private void BackToRoomHandler(object sender, MouseEventArgs mouseEventArgs)
-        {
-            //backToRoom
-
-        }
-
-        /// <summary>
-        /// 鏄剧ず璁惧鎺у埗鐘舵��
-        /// </summary>
-        /// <param name="command">Command.</param>
-        /// <param name="objValue">Object value.</param>
-        private void UpdateDeviceControllStatu(string command, object objValue)
-        {
-            if (command != "DeviceDefaultAck" || objValue == null)
-            {
-                return;
-            }
-            var tempDevice = (CommonDevice)objValue;
-            if (tempDevice.DeviceEpoint != this.device.CommonDevice.DeviceEpoint || tempDevice.DeviceAddr != this.device.CommonDevice.DeviceAddr)
-            {
-                //涓嶆槸褰撳墠璁惧鐨勬帹閫侊紝鍒欎笉澶勭悊
-                return;
-            }
-            //鏍囪宸茬粡鍙戦�佹帶鍒跺懡浠ゅ埌缃戝叧
-            sendedControlCommand = true;
-            //鎴愬姛涓嶆彁绀�
-            //DeviceUI.ShowStatuTip(R.MyInternationalizationString.Success);
-        }
-
-        /// <summary>
-        /// 绉婚櫎鏇存柊鎺у埗璁惧鐨刟ction
-        /// </summary>
-        private void RemoveUpdateControlDeviceStatuAction()
-        {
-            //绉婚櫎action
-            if (zbGateway != null)
-            {
-                zbGateway.ReportAction -= UpdateDeviceControllStatu;
-            }
-        }
-        #endregion
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
index d725284..9a7da8b 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -6,6 +6,7 @@
 using ZigBee.Device;
 using Shared.Phone.Device.CommonForm;
 using Shared.Phone.Device.AC;
+using Shared.Phone.UserCenter.DoorLock;
 
 namespace Shared.Phone.Device.Category
 {
@@ -1400,7 +1401,44 @@
                         }
                         else
                         {
+                            var deviceTypeRowLayout = new RowLayout()
+                            {
+                                Height = Application.GetRealHeight(129 + 35),
+                                LineColor = ZigbeeColor.Current.GXCBackgroundColor,
+                                Tag = deviceUI
+                            };
+                            deviceListScrolView.AddChidren(deviceTypeRowLayout);
 
+                            var deviceRow = new CategoryFunctionRow(0, 35);
+                            deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
+                            deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
+                            deviceRow.SetOnLineStatu(deviceUI.CommonDevice.IsOnline == 1);
+                            deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
+                            deviceRow.HideSwitchBtn(true);
+                            deviceTypeRowLayout.AddChidren(deviceRow);
+
+
+                            deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
+                            {
+                                var userDoorLockPage = new UserDoorLockPage(room, deviceUI);
+                                HomePage.Instance.AddChidren(userDoorLockPage);
+                                HomePage.Instance.PageIndex += 1;
+                                userDoorLockPage.Show();
+                            };
+
+                            var editBtn = new CommonForm.RowLayoutEditButton()
+                            {
+                                Tag = deviceUI
+                            };
+                            deviceTypeRowLayout.AddRightView(editBtn);
+                            editBtn.MouseUpEventHandler += deviceDetailHandler;
+
+                            var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
+                            {
+                                Tag = deviceUI
+                            };
+                            deviceTypeRowLayout.AddRightView(delBtn);
+                            delBtn.MouseUpEventHandler += delEvent;
                         }
                     }
                 };
@@ -1571,7 +1609,6 @@
                         X = Application.GetRealWidth(179),
                         Width = Application.GetRealWidth(844),
                         Height = Application.GetRealHeight(400),
-                        BackgroundColor = ZigbeeColor.Current.GXCRedColor,
                         UnSelectedImagePath = scene.IconPath,
                         Radius = (uint)Application.GetRealHeight(17)
                     };
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
index 2cbca49..71f5915 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
@@ -57,6 +57,11 @@
         private CommonForm.CompleteButton confirmBtn;
 
         /// <summary>
+        /// backGround
+        /// </summary>
+        private Button backGround;
+
+        /// <summary>
         /// 鏄惁淇敼
         /// </summary>
         public bool isModify;
@@ -327,12 +332,12 @@
             };
             bodyFrameLayout.AddChidren(imgFL);
 
-            var backGround = new Button()
+            backGround = new Button()
             {
-                Width = Application.GetRealWidth(930),
-                Height = Application.GetRealHeight(464),
+                Width = Application.GetMinRealAverage(930),
+                Height = Application.GetMinRealAverage(464),
                 Gravity = Gravity.Center,
-                Radius = (uint)Application.GetRealHeight(CommonFormResouce.BigFormRadius),
+                Radius = (uint)Application.GetMinRealAverage(CommonFormResouce.BigFormRadius),
                 //UnSelectedImagePath = ImagePath
                 UnSelectedImagePath = "SceneIcon/3.png"
             };
@@ -547,23 +552,49 @@
                 selectPhotographBtn.MouseUpEventHandler += (send, ee) =>
                 {
                     selectFL.RemoveFromParent();
-                    IconPathType = 1;
+                    var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo);
+                    var fileName = $"Scene_{tradeTime}";
                     //閫氳繃鐩告満鎷嶇収瑁佸壀
                     CropImage.TakePicture((imagePath) =>
                     {
-                        Console.WriteLine("SelectPicture 瑁佸壀鍥剧墖杩斿洖璺緞: " + imagePath);
-                    }, "HDLPIC");
+                        if (isModify)
+                        {
+                            if (IconPathType != 0)
+                            {
+                                Global.DeleteFilebyHomeId(backGround.UnSelectedImagePath);
+                            }
+                        }
+
+                        IconPathType = 1;
+                        backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath);
+                        backGround.UnSelectedImagePath = imagePath;
+                        System.IO.File.Delete(imagePath);
+                        
+                    }, fileName, 2, 1);
                 };
                
                 selectAblumsBtn.MouseUpEventHandler += (send, ee) =>
                 {
                     selectFL.RemoveFromParent();
-                    IconPathType = 2;
+                    var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo);
+                    var fileName = $"Scene_{tradeTime}";
                     //浠庣浉鍐岄�夋嫨鍥剧墖瑁佸壀
                     CropImage.SelectPicture((imagePath) =>
                     {
-                        Console.WriteLine("SelectPicture 瑁佸壀鍥剧墖杩斿洖璺緞: " + imagePath);
-                    }, "HDLPIC");
+                        if (isModify)
+                        {
+                            if (IconPathType != 0)
+                            {
+                                Global.DeleteFilebyHomeId(backGround.UnSelectedImagePath);
+                            }
+                        }
+
+                        IconPathType = 2;
+                        backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath);
+                        backGround.UnSelectedImagePath = imagePath;
+                        System.IO.File.Delete(imagePath);
+
+                    }, fileName, 2,1);
                 };
 
                 cancelBtn.MouseUpEventHandler += (send, ee) =>
@@ -806,6 +837,8 @@
                     {
                         try
                         {
+                            var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo);
+                            var fileName = $"Scene_{tradeTime}";
                             //鏀瑰悕
                             if (modifySceneUI.Name != nameRow.NameText.Text.Trim())
                             {
@@ -837,9 +870,14 @@
                             //鍥剧墖
                             if(IconPathType==1 || IconPathType ==2)
                             {
-
+                                Shared.IO.FileUtils.WriteFileByBytes(System.IO.Path.Combine(Config.Instance.FullPath, fileName), backGround.ImageBytes);
+                                modifySceneUI.IconPath = System.IO.Path.Combine(Config.Instance.FullPath, fileName);
                             }
-                            modifySceneUI.IconPath = backGround.UnSelectedImagePath;
+                            else
+                            {
+                                modifySceneUI.IconPath = backGround.UnSelectedImagePath;
+                            }
+                            modifySceneUI.IconPathType = IconPathType;
 
                             CommonPage.Loading.Start();
                             var memberDataList = new List<ZigBee.Device.Scene.AddSceneMemberData>();
@@ -985,6 +1023,19 @@
                     {
                         try
                         {
+                            var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo);
+                            var fileName = $"Scene_{tradeTime}";
+                            string imgPath;
+                            //鍥剧墖
+                            if (IconPathType == 1 || IconPathType == 2)
+                            {
+                                Shared.IO.FileUtils.WriteFileByBytes(System.IO.Path.Combine(Config.Instance.FullPath, fileName), backGround.ImageBytes);
+                                imgPath = System.IO.Path.Combine(Config.Instance.FullPath, fileName);
+                            }
+                            else
+                            {
+                                imgPath = backGround.UnSelectedImagePath;
+                            }
                             if (Common.Room.CurrentRoom.GetSameFloorScenes(curRoom.FloorId).Find(s => s.Name == nameRow.NameText.Text.Trim()) != null)
                             {
                                 Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist);
@@ -1039,7 +1090,7 @@
                                 }
                             }
 
-                            var result = await curRoom.AddScene(nameRow.NameText.Text, backGround.UnSelectedImagePath, memberDataList);
+                            var result = await curRoom.AddScene(nameRow.NameText.Text, imgPath, memberDataList);
                             if (result == 1)
                             {
                                 RemoveFromParent();
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/BackButton.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/BackButton.cs
index 5bce277..c74e102 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/BackButton.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/BackButton.cs
@@ -12,11 +12,11 @@
         /// </summary>
         public BackButton()
         {
-            X = Application.GetRealWidth(58);
-            Height = Application.GetMinRealAverage(58);
-            Width = Application.GetMinRealAverage(58);
-            UnSelectedImagePath = "Item/Back.png";
-            SelectedImagePath = "Item/BackSelected.png";
+            X = Application.GetRealWidth(28);
+            Height = Application.GetMinRealAverage(110);
+            Width = Application.GetMinRealAverage(110);
+            UnSelectedImagePath = "Account/Back.png";
+            SelectedImagePath = "Account/BackSelected.png";
             Gravity = Gravity.CenterVertical;
         }
 
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs
index 7aeb0a2..72eb5ed 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs
@@ -223,7 +223,7 @@
                 functionTypeRow.ClickBtn.MouseUpEventHandler += (sender, e) =>
                 {
                     var DfunctionType = device.CommonDevice.DfunctionType;
-                    
+
                     //鍔熻兘绫诲瀷鐨勭炕璇戝悕瀛�
                     int nowSelectNo = 1;
                     string strType = string.Empty;
@@ -272,19 +272,19 @@
                     };
                 };
 
-                sharedRow = new DeviceInfoRow(723);
-                sharedRow.Init();
-                sharedRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.Share)} : ");
-                sharedRow.SetTitle("2浜�");
-                infoFL.AddChidren(sharedRow);
+                //sharedRow = new DeviceInfoRow(723);
+                //sharedRow.Init();
+                //sharedRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.Share)} : ");
+                //sharedRow.SetTitle("2浜�");
+                //infoFL.AddChidren(sharedRow);
             }
             else
             {
-                sharedRow = new DeviceInfoRow(585);
-                sharedRow.Init();
-                sharedRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.Share)} : ");
-                sharedRow.SetTitle("2浜�");
-                infoFL.AddChidren(sharedRow);
+                //sharedRow = new DeviceInfoRow(585);
+                //sharedRow.Init();
+                //sharedRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.Share)} : ");
+                //sharedRow.SetTitle("2浜�");
+                //infoFL.AddChidren(sharedRow);
             }
 
             var confirmBtn = new CommonForm.CompleteButton(962, 907, 127);
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionMainView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionMainView.cs
index 8d6e9e6..ce78534 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionMainView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionMainView.cs
@@ -219,5 +219,13 @@
         {
             CollectButton.IsSelected = collect;
         }
+        /// <summary>
+        /// CanControl
+        /// </summary>
+        /// <param name="cmd"></param>
+        public void CanControl(bool cmd)
+        {
+            SwitchButton.Visible = cmd;
+        }
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs
index a18180f..4227c91 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs
@@ -68,6 +68,14 @@
                 Width = Application.GetRealWidth(CommonPage.AppRealWidth)
             };
             AddChidren(topView);
+
+            var line = new Button
+            {
+                Y=Height-1,
+                Height=1,
+                BackgroundColor=ZigbeeColor.Current.GXCGrayLineColor3
+            };
+            AddChidren(line);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs b/ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs
index 249b723..442628a 100755
--- a/ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs
@@ -65,6 +65,15 @@
         /// StopBtn
         /// </summary>
         public Button StopBtn;
+        /// <summary>
+        /// 寮�鍚堝笜
+        /// </summary>
+        private CurtainSeekBar curtainSeekBar = new CurtainSeekBar { };
+        /// <summary>
+        /// 鍗峰笜
+        /// </summary>
+        private CurtainRollSeekBar curtainRollSeekBar = new CurtainRollSeekBar { };
+
         #endregion
 
         #region 鈼� 鎺ュ彛___________________________
@@ -115,6 +124,14 @@
                                 rollerShade.DeviceStatusReport = common.DeviceStatusReport;
                                 rollerShade.WcdCurrentPositionLiftPercentage = common.DeviceStatusReport.AttriBute[0].AttriButeData;
                                 StatuBtn.Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} { deviceUI.GetDeviceStatu()}";
+                                if(rollerShade.WcdType==0)
+                                {
+                                    curtainRollSeekBar.Progress = rollerShade.WcdCurrentPositionLiftPercentage;
+                                }
+                                else if(rollerShade.WcdType==4)
+                                {
+                                    curtainSeekBar.Progress = rollerShade.WcdCurrentPositionLiftPercentage;
+                                }
                                 //SeekBar.Progress = rollerShade.WcdCurrentPositionLiftPercentage;
                                 //seekBarTitle.Text = $"{SeekBar.Progress} %";
                                 rollerShade.LastDateTime = DateTime.Now;
@@ -294,15 +311,6 @@
                 RemoveFromParent();
             };
 
-            var sharedBtn = new Button
-            {
-                X = Application.GetRealWidth(850),
-                Width = Application.GetMinReal(69),
-                Height = Application.GetMinReal(69),
-                Gravity = Gravity.CenterVertical,
-                UnSelectedImagePath = "Item/Shared.png"
-            };
-            top.topView.AddChidren(sharedBtn);
 
             var moreBtn = new Button
             {
@@ -417,7 +425,6 @@
                 (device.CommonDevice as Rollershade).CurtainUpDownStopControl(1);
             };
 
-            SetRollerShadeIcon((device.CommonDevice as Rollershade).WcdType);
             if ((device.CommonDevice as Rollershade).WcdType == -1)
             {
                 CommonPage.Loading.Start();
@@ -434,6 +441,9 @@
                 })
                 { IsBackground = true }.Start();
             }
+
+            SetCurtainType(itemView, (device.CommonDevice as Rollershade).WcdType);
+            
             var roomBG = new Button
             {
                 Y = Application.GetRealHeight(1178 - 50),
@@ -645,11 +655,22 @@
         }
 
         /// <summary>
+        /// SetCurtainType
+        /// </summary>
+        /// <param name="layout"></param>
+        /// <param name="type"></param>
+        private void SetCurtainType(FrameLayout layout, int type)
+        {
+            SetRollerShadeIcon(type);
+            SetRollerSeekBar(layout, type);
+        }
+
+        /// <summary>
         /// WcdType=4锛氬紑鍚堝笜
         /// WcdType=0锛氬嵎甯�
         /// </summary>
         /// <param name="type"></param>
-        public void SetRollerShadeIcon(int type)
+        private void SetRollerShadeIcon(int type)
         {
             if (type == 0)
             {
@@ -669,6 +690,44 @@
             }
         }
 
+        /// <summary>
+        /// SetRollerSeekBar
+        /// </summary>
+        /// <param name="layout"></param>
+        /// <param name="type"></param>
+        private void SetRollerSeekBar(FrameLayout layout,int type)
+        {
+            if(type == 0)
+            {
+                curtainRollSeekBar.Y = Application.GetRealHeight(300);
+                curtainRollSeekBar.Width = Application.GetRealWidth(438);
+                curtainRollSeekBar.Height = Application.GetRealHeight(576);
+                curtainRollSeekBar.Gravity = Gravity.CenterHorizontal;
+                curtainRollSeekBar.Progress = (device.CommonDevice as Rollershade).WcdCurrentPositionLiftPercentage;
+                layout.AddChidren(curtainRollSeekBar);
+
+                curtainRollSeekBar.OnStopTrackingTouchEvent += (sender, e) =>
+                {
+                    (device.CommonDevice as Rollershade).WcdGoToTiltValue(curtainRollSeekBar.Progress);
+                };
+            }
+            else
+            {
+                curtainSeekBar.Y = Application.GetRealHeight(334);
+                curtainSeekBar.Width = Application.GetRealWidth(570);
+                curtainSeekBar.Height = Application.GetRealHeight(513);
+                curtainSeekBar.Gravity = Gravity.CenterHorizontal;
+                layout.AddChidren(curtainSeekBar);
+
+                curtainSeekBar.OnStopTrackingTouchEvent += (sender, e) =>
+                {
+                    (device.CommonDevice as Rollershade).WcdGoToTiltValue(curtainRollSeekBar.Progress);
+                };
+            }
+        }
+
+
+
         #endregion
 
         #region 鈼� 鏀惰棌鍒颁富椤礯______________________
diff --git a/ZigbeeApp/Shared/Phone/Device/Light/AirSwitchControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/AirSwitchControl.cs
index b23b5bc..a9a1676 100755
--- a/ZigbeeApp/Shared/Phone/Device/Light/AirSwitchControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Light/AirSwitchControl.cs
@@ -243,16 +243,6 @@
                 RemoveFromParent();
             };
 
-            var sharedBtn = new Button
-            {
-                X = Application.GetRealWidth(850),
-                Width = Application.GetMinReal(69),
-                Height = Application.GetMinReal(69),
-                Gravity = Gravity.CenterVertical,
-                UnSelectedImagePath = "Item/Shared.png"
-            };
-            top.topView.AddChidren(sharedBtn);
-
             var moreBtn = new Button
             {
                 X = Application.GetRealWidth(953),
diff --git a/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs
index 4fb4f82..5d57d60 100755
--- a/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs
@@ -204,6 +204,7 @@
         /// </summary>
         public DimmableLightControl()
         {
+            UserView.HomePage.Instance.ScrollEnabled = false;
             BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
             ZbGateway.StatusList.Add(this);
         }
@@ -269,16 +270,6 @@
             {
                 RemoveFromParent();
             };
-
-            var sharedBtn = new Button
-            {
-                X = Application.GetRealWidth(850),
-                Width = Application.GetMinReal(69),
-                Height = Application.GetMinReal(69),
-                Gravity = Gravity.CenterVertical,
-                UnSelectedImagePath = "Item/Shared.png"
-            };
-            top.topView.AddChidren(sharedBtn);
 
             var moreBtn = new Button
             {
diff --git a/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs
index 965a4d8..4c19d06 100755
--- a/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs
@@ -266,15 +266,6 @@
                 RemoveFromParent();
             };
 
-            var sharedBtn = new Button
-            {
-                X = Application.GetRealWidth(850),
-                Width = Application.GetMinReal(69),
-                Height = Application.GetMinReal(69),
-                Gravity = Gravity.CenterVertical,
-                UnSelectedImagePath = "Item/Shared.png"
-            };
-            top.topView.AddChidren(sharedBtn);
 
             var moreBtn = new Button
             {
diff --git a/ZigbeeApp/Shared/Phone/Device/Light/OnOffControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/OnOffControl.cs
index dae9d4c..0049e42 100755
--- a/ZigbeeApp/Shared/Phone/Device/Light/OnOffControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Light/OnOffControl.cs
@@ -274,16 +274,6 @@
                 RemoveFromParent();
             };
 
-            var sharedBtn = new Button
-            {
-                X = Application.GetRealWidth(850),
-                Width = Application.GetMinReal(69),
-                Height = Application.GetMinReal(69),
-                Gravity = Gravity.CenterVertical,
-                UnSelectedImagePath = "Item/Shared.png"
-            };
-            top.topView.AddChidren(sharedBtn);
-
             var moreBtn = new Button
             {
                 X = Application.GetRealWidth(953),
diff --git a/ZigbeeApp/Shared/Phone/Device/Light/PlugControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/PlugControl.cs
index 18c2427..9cb132f 100755
--- a/ZigbeeApp/Shared/Phone/Device/Light/PlugControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Light/PlugControl.cs
@@ -267,16 +267,6 @@
                 RemoveFromParent();
             };
 
-            var sharedBtn = new Button
-            {
-                X = Application.GetRealWidth(850),
-                Width = Application.GetMinReal(69),
-                Height = Application.GetMinReal(69),
-                Gravity = Gravity.CenterVertical,
-                UnSelectedImagePath = "Item/Shared.png"
-            };
-            top.topView.AddChidren(sharedBtn);
-
             var moreBtn = new Button
             {
                 X = Application.GetRealWidth(953),
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
index 299fba0..c24c8fd 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
@@ -941,7 +941,7 @@
                     }
                     LocationConditionsInfo.Add("AtHome", "1");
                 }
-                double a1 = 23.134421, a2 = 113.267189;
+                double a1 = Config.Instance.Home.Latitude, a2 = Config.Instance.Home.Longitude;
                 //璋冪敤鏂规硶锛岃烦杞〉闈�
                 GDMapKit.Show((mLatitude, mLongitude, mRadius, name) =>
                 {
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/CyclicCycle.cs b/ZigbeeApp/Shared/Phone/Device/Logic/CyclicCycle.cs
deleted file mode 100755
index c19809a..0000000
--- a/ZigbeeApp/Shared/Phone/Device/Logic/CyclicCycle.cs
+++ /dev/null
@@ -1,247 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using Shared;
-using Shared.R;
-using Shared.Phone;
-using Shared.Common;
-namespace Shared.Phone.Device.Logic
-{
-    public class CyclicCycle:FrameLayout
-    {
-        Action action;
-        public CyclicCycle(Action action)
-        {
-            this.action = action;
-        }
-        public CyclicCycle()
-        {
-            Tag = "Logic";
-        }
-        public int value = 0;
-        public void Show()
-        {
-            var weeklist = new List<string>();
-            ///璁板綍涔嬪墠鍊�
-            value = Common.Logic.CurrentLogic.TimeAttribute.WeekDay;
-            this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
-            var topFrameLayout = new FrameLayout
-            {
-                Height = Application.GetRealHeight(140),
-                Y = Application.GetRealHeight(80),
-            };
-            AddChidren(topFrameLayout);
-
-            var titleName = new Button
-            {
-                TextID = MyInternationalizationString.cycle,
-                TextSize = 16,
-                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                TextAlignment = TextAlignment.CenterLeft,
-                X = Application.GetRealWidth(150),
-            };
-            topFrameLayout.AddChidren(titleName);
-
-            var back = new Button
-            {
-                Width = Application.GetRealWidth(110),
-                Height = Application.GetRealHeight(110),
-                X = Application.GetRealWidth(20),
-                Gravity = Gravity.CenterVertical,
-                UnSelectedImagePath = "ZigeeLogic/Back.png",
-            };
-            topFrameLayout.AddChidren(back);
-            back.MouseDownEventHandler += (sender, e) =>
-            {
-                RemoveFromParent();
-                //if (action != null)
-                //action();
-            };
-
-            var middle = new VerticalScrolViewLayout();
-            middle.Y = topFrameLayout.Bottom;
-            middle.Height = Application.GetRealHeight(1920 - 220-200);
-            middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
-            this.AddChidren(middle);
-            if (Common.Logic.CurrentLogic.TimeAttribute.Repeat == 5)
-            {
-                string len = "";
-                var maxvalue = Convert.ToString(Common.Logic.CurrentLogic.TimeAttribute.WeekDay, 2);
-                var str = maxvalue.Insert(0, new string('0', 8 - maxvalue.Length));
-                for (int j = 7; j >= 0; j--)
-                {
-                    len += str.Substring(j, 1);
-                }
-
-                for (int j = 0; j < len.Length; j++)
-                {
-                    var strvalue = len.Substring(j, 1);
-                    if (strvalue == "1")
-                    {
-                        if ((j + 1) == 1)
-                        {
-                            weeklist.Add(Language.StringByID(MyInternationalizationString.mon));
-                        }
-                        else if ((j + 1) == 2)
-                        {
-                            weeklist.Add(Language.StringByID(MyInternationalizationString.tue));
-                        }
-                        else if ((j + 1) == 3)
-                        {
-                            weeklist.Add(Language.StringByID(MyInternationalizationString.wed));
-                        }
-                        else if ((j + 1) == 4)
-                        {
-                            weeklist.Add(Language.StringByID(MyInternationalizationString.thu));
-                        }
-                        else if ((j + 1) == 5)
-                        {
-                            weeklist.Add(Language.StringByID(MyInternationalizationString.frl));
-                        }
-                        else if ((j + 1) == 6)
-                        {
-                            weeklist.Add(Language.StringByID(MyInternationalizationString.sat));
-                        }
-                        else if ((j + 1) == 7)
-                        {
-                            weeklist.Add(Language.StringByID(MyInternationalizationString.sun));
-                        }
-
-                    }
-                }
-            }
-            var cyclelist = new List<string>();
-            cyclelist.AddRange(new string[] {
-                        Language.StringByID(MyInternationalizationString.mon),
-                        Language.StringByID(MyInternationalizationString.tue),
-                        Language.StringByID(MyInternationalizationString.wed),
-                        Language.StringByID(MyInternationalizationString.thu),
-                        Language.StringByID(MyInternationalizationString.frl),
-                        Language.StringByID(MyInternationalizationString.sat),
-                        Language.StringByID(MyInternationalizationString.sun),
-            });
-            foreach (var name in cyclelist)
-            {
-                var cyclerwLayout = new RowLayout
-                {
-                    Height = Application.GetRealHeight(180),
-                };
-                middle.AddChidren(cyclerwLayout);
-
-                var btnname = new Button
-                {
-                    X = Application.GetRealWidth(40),
-                    Width = Application.GetRealWidth(600),
-                    Gravity = Gravity.CenterVertical,
-                    TextAlignment = TextAlignment.CenterLeft,
-                    Text = name,
-                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                };
-                cyclerwLayout.AddChidren(btnname);
-
-                var btnCheck = new Button
-                {
-                    Width = Application.GetRealWidth(115),
-                    Height = Application.GetRealHeight(110),
-                    Gravity = Gravity.CenterVertical,
-                    X = Application.GetRealWidth(1080 - 140),
-                    SelectedImagePath = "ZigeeLogic/CheckOn.png",
-                    UnSelectedImagePath = "ZigeeLogic/Check.png",
-                };
-                cyclerwLayout.AddChidren(btnCheck);
-
-                var str = weeklist.Find((o) => { return o == name; });
-                if (str != null)
-                {
-                    btnCheck.IsSelected = true;
-                }
-                ///閫変腑鏃堕棿 
-                EventHandler<MouseEventArgs> weekclick = (sender, e) =>
-                {
-                    btnCheck.IsSelected = !btnCheck.IsSelected;
-                    if (btnCheck.IsSelected)
-                    {
-                        var d = weeklist.Find((o) => { return o == name; });
-                        if (d == null)
-                        {
-                            weeklist.Add(name);
-                        }
-                    }
-                    else
-                    {
-                        weeklist.RemoveAll((o) => {
-                            return o == name;
-                        });
-                    }
-                    int weekvalue = 0;
-                    foreach (var strname in weeklist)
-                    {
-                        if (Language.StringByID(MyInternationalizationString.mon) == strname)
-                        {
-                            weekvalue += 1;
-                        }
-                        else if (Language.StringByID(MyInternationalizationString.tue) == strname)
-                        {
-                            weekvalue += 2;
-                        }
-                        else if (Language.StringByID(MyInternationalizationString.wed) == strname)
-                        {
-                            weekvalue += 4;
-                        }
-                        else if (Language.StringByID(MyInternationalizationString.thu) == strname)
-                        {
-                            weekvalue += 8;
-                        }
-                        else if (Language.StringByID(MyInternationalizationString.frl) == strname)
-                        {
-                            weekvalue += 16;
-                        }
-                        else if (Language.StringByID(MyInternationalizationString.sat) == strname)
-                        {
-                            weekvalue += 32;
-                        }
-                        else if (Language.StringByID(MyInternationalizationString.sun) == strname)
-                        {
-                            weekvalue += 64;
-                        }
-                    }
-                    //Common.Logic.CurrentLogic.TimeAttribute.Repeat = 5;
-                    //Common.Logic.CurrentLogic.TimeAttribute.WeekDay = weekvalue;
-                    value = weekvalue;
-                   
-                };
-                cyclerwLayout.MouseUpEventHandler += weekclick;
-                btnname.MouseUpEventHandler += weekclick;
-                btnCheck.MouseUpEventHandler += weekclick;
-
-            }
-
-            var fra = new FrameLayout
-            {
-                Y = middle.Bottom,
-                Height = Application.GetRealHeight(200),
-                BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
-            };
-            this.AddChidren(fra);
-            var btncomplete = new Button
-            {
-                X = Application.GetRealWidth(290),
-                Height = Application.GetRealHeight(150),//194
-                Width = Application.GetRealWidth(500),
-                Radius = (uint)Application.GetRealHeight(50),
-                BackgroundColor = ZigbeeColor.Current.LogicButtonBlueColor,
-                TextID = MyInternationalizationString.Save,
-            };
-            fra.AddChidren(btncomplete);
-            EventHandler<MouseEventArgs> completeclick = (sender, e) =>
-            {
-                RemoveFromParent();
-                Common.Logic.CurrentLogic.TimeAttribute.Repeat = 5;
-                Common.Logic.CurrentLogic.TimeAttribute.WeekDay =value;
-                if (action != null)
-                    action();
-            };
-            fra.MouseUpEventHandler += completeclick;
-            btncomplete.MouseUpEventHandler += completeclick;
-        }
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
index a8393fd..00be7cf 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
@@ -1437,11 +1437,10 @@
                 case DeviceType.DoorLock:
                     {
 
-
+                        flMain.RemoveFromParent();
                         var memberList = new MemberList();
                         UserView.HomePage.Instance.AddChidren(memberList);
                         UserView.HomePage.Instance.PageIndex += 1;
-                        MemberList.action += () => { flMain.RemoveFromParent(); };
                         MemberList.edit = false;
                         memberList.Show(common);
                     }
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs
index d5df4d1..d78cb43 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs
@@ -19,6 +19,7 @@
         Button roomTextButton = new Button();
         Button devicetypeButton = new Button();
         VerticalScrolViewLayout middle;
+        HorizontalScrolViewLayout devicetypehorizontalScrol1;
         FrameLayout clickframeLayout = new FrameLayout();
         Button clickbutton = new Button();
         Button clicktextcolcrbutton = new Button();
@@ -120,7 +121,7 @@
             this.AddChidren(roomhorizontalScrol);
 
 
-            var devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
+             devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
             {
                 Width = Application.GetRealWidth(1080 - 58 - 200),
                 Height = Application.GetRealHeight(280),
@@ -346,6 +347,18 @@
                         }
                         list.Add(device);
                     }
+                    if (list.Count == 0)
+                    {
+                        devicetypehorizontalScrol.Height = 0;
+                        devicetypehorizontalScrol1.Height = 0;
+                        middle.Height = 0;
+                    }
+                    else
+                    {
+                        devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
+                        devicetypehorizontalScrol1.Height = Application.GetRealHeight(280);
+                        middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
+                    }
                     AllDeviceTypeView(list, devicetypehorizontalScrol);
 
                 }
@@ -373,6 +386,18 @@
                         }
                         list.Add(device);
                     }
+                    if (list.Count == 0)
+                    {
+                        devicetypehorizontalScrol.Height = 0;
+                        devicetypehorizontalScrol1.Height = 0;
+                        middle.Height = 0;
+                    }
+                    else
+                    {
+                        devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
+                        devicetypehorizontalScrol1.Height = Application.GetRealHeight(280);
+                        middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
+                    }
                     AllDeviceTypeView(list, devicetypehorizontalScrol);
 
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs
index 3ca4d22..ce17c11 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs
@@ -20,6 +20,7 @@
         Button roomTextButton = new Button();
         Button devicetypeButton = new Button();
         VerticalScrolViewLayout middle;
+        HorizontalScrolViewLayout devicetypehorizontalScrol1;
         FrameLayout clickframeLayout = new FrameLayout();
         Button clickbutton = new Button();
         Button clicktextcolcrbutton = new Button();
@@ -121,7 +122,7 @@
             this.AddChidren(roomhorizontalScrol);
 
 
-            var devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
+             devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
             {
                 Width = Application.GetRealWidth(1080 - 58-200),
                 Height = Application.GetRealHeight(280),
@@ -347,6 +348,18 @@
                         }
                         list.Add(device);
                     }
+                    if (list.Count == 0)
+                    {
+                        devicetypehorizontalScrol.Height = 0;
+                        devicetypehorizontalScrol1.Height = 0;
+                        middle.Height = 0;
+                    }
+                    else
+                    {
+                        devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
+                        devicetypehorizontalScrol1.Height = Application.GetRealHeight(280);
+                        middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
+                    }
                     AllDeviceTypeView(list, devicetypehorizontalScrol);
 
                 }
@@ -374,6 +387,18 @@
                         }
                         list.Add(device);
                     }
+                    if (list.Count == 0)
+                    {
+                        devicetypehorizontalScrol.Height = 0;
+                        devicetypehorizontalScrol1.Height = 0;
+                        middle.Height = 0;
+                    }
+                    else
+                    {
+                        devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
+                        devicetypehorizontalScrol1.Height = Application.GetRealHeight(280);
+                        middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
+                    }
                     AllDeviceTypeView(list, devicetypehorizontalScrol);
 
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicMain.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicMain.cs
deleted file mode 100755
index d4bc80c..0000000
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicMain.cs
+++ /dev/null
@@ -1,744 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using Shared.Common;
-using Shared.Phone.UserView;
-using Shared.R;
-
-namespace Shared.Phone.Device.Logic
-{
-    public class LogicMain
-    {
-        FrameLayout functionSceneAutoBodyView = null;
-        /// <summary>
-        /// 鑷姩鍖�
-        /// </summary>
-        public async void ShowAutotion(FrameLayout frameLayoutfunctionSceneAutoBodyView)
-        {
-            functionSceneAutoBodyView = frameLayoutfunctionSceneAutoBodyView;
-            functionSceneAutoBodyView.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
-
-            var bjFrameLayout = new FrameLayout
-            {
-                Width = Application.GetRealWidth(1080 - 58),
-                Height = Application.GetRealHeight(170),
-                BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
-                X = Application.GetRealWidth(58),
-                Radius = (uint)Application.GetRealHeight(50),
-                Y = Application.GetRealHeight(30),
-            };
-            functionSceneAutoBodyView.AddChidren(bjFrameLayout);
-
-            var sigBtn = new Button
-            {
-                Width = Application.GetMinRealAverage(84),
-                Height = Application.GetMinRealAverage(84),
-                UnSelectedImagePath = "ZigeeLogic/sign.png",
-                X = Application.GetRealWidth(58),
-                Gravity = Gravity.CenterVertical,
-            };
-            bjFrameLayout.AddChidren(sigBtn);
-
-            var recommendtextBtn = new Button
-            {
-                Width = Application.GetMinRealAverage(300),
-                Height = Application.GetMinRealAverage(84),
-                X = sigBtn.Right + Application.GetRealWidth(35),
-                TextAlignment = TextAlignment.CenterLeft,
-                //Text = "鎺ㄨ崘妯℃澘",
-                TextID = MyInternationalizationString.logictemplate,
-                Gravity = Gravity.CenterVertical,
-                TextColor = ZigbeeColor.Current.LogicBtnSelectedColor,
-            };
-            bjFrameLayout.AddChidren(recommendtextBtn);
-
-            var recommendswitchBtn = new Button
-            {
-                Width = Application.GetMinRealAverage(104),
-                Height = Application.GetMinRealAverage(63),
-                UnSelectedImagePath = "ZigeeLogic/logicclose.png",
-                SelectedImagePath = "ZigeeLogic/logicopen.png",
-                X = bjFrameLayout.Width - Application.GetRealWidth(104 + 58),
-                Gravity = Gravity.CenterVertical,
-            };
-            bjFrameLayout.AddChidren(recommendswitchBtn);
-
-
-            var scenehorizontalScrol = new HorizontalScrolViewLayout
-            {
-                Width = Application.GetRealWidth(1080 - 58),
-                X = Application.GetRealWidth(58),
-                Y = bjFrameLayout.Bottom + Application.GetRealHeight(30),
-                Height = Application.GetRealHeight(0),
-            };
-            functionSceneAutoBodyView.AddChidren(scenehorizontalScrol);
-
-            var logicScrolView = new VerticalScrolViewLayout
-            {
-                Height = functionSceneAutoBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30),
-                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
-                X = Application.GetRealWidth(58),
-                Radius = (uint)Application.GetRealHeight(50),
-                Y = scenehorizontalScrol.Bottom,
-            };
-            functionSceneAutoBodyView.AddChidren(logicScrolView);
-
-
-            recommendswitchBtn.MouseUpEventHandler += (sender, e) =>
-            {
-                int Yheight = 0;
-                recommendswitchBtn.IsSelected = !recommendswitchBtn.IsSelected;
-                scenehorizontalScrol.RemoveAll();
-                if (recommendswitchBtn.IsSelected)
-                {
-                    scenehorizontalScrol.Height = Application.GetRealHeight(246);
-                    Yheight = 20;
-                    for (int i = 1; i < 4; i++)
-                    {
-
-                        var frameLayout = new FrameLayout
-                        {
-                            Width = Application.GetMinRealAverage(369 + 46),
-                            Height = Application.GetMinRealAverage(246),
-                        };
-                        scenehorizontalScrol.AddChidren(frameLayout);
-                        var logiciocnBtn = new Button
-                        {
-                            Width = Application.GetMinRealAverage(369),
-                            Height = Application.GetMinRealAverage(246),
-                            UnSelectedImagePath = "ZigeeLogic/" + i + ".png",
-                            Tag = i,
-                        };
-                        frameLayout.AddChidren(logiciocnBtn);
-
-                        var logicnameBtn = new Button
-                        {
-                            Width = Application.GetMinRealAverage(250),
-                            Height = Application.GetMinRealAverage(80),
-                            X = Application.GetRealWidth(23),
-                            Y = Application.GetRealHeight(246 - 23 - 80),
-                            TextAlignment = TextAlignment.CenterLeft,
-                            TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
-                        };
-                        frameLayout.AddChidren(logicnameBtn);
-
-                        if (i == 1)
-                        {
-                            logicnameBtn.Text = Language.StringByID(MyInternationalizationString.onlight);
-                        }
-                        else if (i == 2)
-                        {
-                            logicnameBtn.Text = Language.StringByID(MyInternationalizationString.offlight);
-                        }
-                        else if (i == 3)
-                        {
-                            logicnameBtn.Text = Language.StringByID(MyInternationalizationString.automation1);
-                        }
-
-
-                        EventHandler<MouseEventArgs> iconclick = (sender1, e1) =>
-                        {
-                            Common.Logic.CurrentLogic = new Common.Logic();
-                            Common.Logic.CurrentLogic.IsEnable = 1;//榛樿涓哄紑
-                            if (logiciocnBtn.Tag.ToString() == "3")
-                            {
-                                Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text;// Language.StringByID(MyInternationalizationString.automation1);
-                                var addLogicPage = new Logic.AddLogicPage();
-                                HomePage.Instance.AddChidren(addLogicPage);
-                                HomePage.Instance.PageIndex += 1;
-                                addLogicPage.Show();
-                            }
-                            else
-                            {
-
-                                Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text;
-                                Logic.TemplatePage templatePage = new Logic.TemplatePage();
-                                Logic.TemplatePage.s = logiciocnBtn.Tag.ToString();
-                                HomePage.Instance.AddChidren(templatePage);
-                                HomePage.Instance.PageIndex += 1;
-                                templatePage.Show();
-                            }
-                        };
-                        logiciocnBtn.MouseUpEventHandler += iconclick;
-                        logicnameBtn.MouseUpEventHandler += iconclick;
-                    }
-                }
-                else
-                {
-                    scenehorizontalScrol.Height = Application.GetRealHeight(0);
-                    Yheight = 0;
-                }
-                logicScrolView.Y = scenehorizontalScrol.Bottom + Yheight;
-                logicScrolView.Height = functionSceneAutoBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30) - Yheight;
-                Automationview(logicScrolView);
-            };
-
-            CommonPage.Loading.Start();
-            if (Common.Logic.LogicList.Count == 0)
-            {
-                var Idlist = await Logic.Send.GetLogicId(0);
-                if (Idlist.Count != 0)
-                {
-                    var listlogic = await Logic.Send.ReadList(Idlist.Count, 0);
-                    //foreach鍙兘闆嗗悎宸茶淇敼,鏋氫妇鎿嶄綔鍙兘涓嶄細鎵ц,鍙兘鍑虹幇宕╂簝(寤鸿for)銆�
-                    for (int j = 0; j < listlogic.Count; j++)
-                    {
-                        var logic = listlogic[j];
-                        if (logic.LogicType != 0)
-                        {
-                            continue;
-                        }
-                        Common.Logic.LogicList.Add(logic);
-                    }
-                }
-            }
-            //鑷姩鍖�
-            Automationview(logicScrolView);
-            CommonPage.Loading.Hide();
-        }
-        /// <summary>
-        /// 鑷姩鍖栧垪琛ㄧ晫闈�
-        /// </summary>
-        /// <param name="refresview">Refresview.</param>
-        public async void Automationview(VerticalScrolViewLayout refresview)
-        {
-            refresview.RemoveAll();
-            foreach (var logic in Common.Logic.LogicList)
-            {
-
-
-                var logicRowlayout = new RowLayout
-                {
-                    Height = Application.GetRealHeight(190 + 30),
-                    Width = Application.GetRealWidth(1080),
-                    LineColor = ZigbeeColor.Current.LogicBackgroundColor,
-                    BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
-                };
-                refresview.AddChidren(logicRowlayout);
-
-
-
-                var logicnameBtn = new Button
-                {
-                    Height = Application.GetRealHeight(58),
-                    Width = Application.GetRealWidth(350),
-                    Text = logic.LogicName,
-                    X = Application.GetRealWidth(12 + 46),
-                    Y = Application.GetRealHeight(30),
-                    TextAlignment = TextAlignment.CenterLeft,
-                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                };
-                logicRowlayout.AddChidren(logicnameBtn);
-
-
-                var logicswitchBtn = new Button
-                {
-                    Width = Application.GetMinRealAverage(104),
-                    Height = Application.GetMinRealAverage(63),
-                    UnSelectedImagePath = "ZigeeLogic/logicclose.png",
-                    SelectedImagePath = "ZigeeLogic/logicopen.png",
-                    X = logicRowlayout.Width - Application.GetRealWidth(104 + 58 + 58),
-                    Y = Application.GetRealHeight(58 + 30 + 9 + 30),
-                };
-                logicRowlayout.AddChidren(logicswitchBtn);
-
-
-
-                logicswitchBtn.MouseUpEventHandler += (sender1, e1) =>
-                {
-                    logicswitchBtn.IsSelected = !logicswitchBtn.IsSelected;
-                    if (logicswitchBtn.IsSelected)
-                    {
-                        //閫昏緫寮�
-                        logic.IsEnable = 1;
-                        StatusColor(logic, logicRowlayout, 1);
-                    }
-                    else
-                    {
-                        //閫昏緫鍏�
-                        logic.IsEnable = 0;
-                        StatusColor(logic, logicRowlayout, 0);
-                    }
-                    Logic.Send.LogicControlSwitch(logic);
-                    //Logic.Send.AddModifyLogic(logic);
-                };
-                if (logic.IsEnable == 1)
-                {
-                    logicswitchBtn.IsSelected = true;
-                    StatusColor(logic, logicRowlayout, 1);
-                }
-                else if (logic.IsEnable == 0)
-                {
-                    logicswitchBtn.IsSelected = false;
-                    StatusColor(logic, logicRowlayout, 0);
-                }
-                ///缂栬緫
-                var edit = new Button
-                {
-                    BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
-                    Text = Language.StringByID(MyInternationalizationString.edit),
-                    TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
-                };
-                logicRowlayout.AddRightView(edit);
-                edit.MouseUpEventHandler += (sender, e) =>
-                {
-                    Common.Logic.CurrentLogic = logic;
-                    var logicCommunalPage = new Logic.LogicCommunalPage();
-                    HomePage.Instance.AddChidren(logicCommunalPage);
-                    HomePage.Instance.PageIndex += 1;
-                    logicCommunalPage.Show(() => { logicnameBtn.Text = logic.LogicName; Automationview(refresview); });
-
-                };
-
-
-                ///鍒犻櫎
-                var del = new Button
-                {
-                    BackgroundColor = ZigbeeColor.Current.LogicDelBlackColor1,
-                    Text = Language.StringByID(MyInternationalizationString.del),
-                    TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
-                };
-                logicRowlayout.AddRightView(del);
-                del.MouseUpEventHandler += (sender, e) =>
-                {
-                    var alert = new Alert(Language.StringByID(MyInternationalizationString.tip), Language.StringByID(MyInternationalizationString.doyouwanttodelete),
-                                             Language.StringByID(MyInternationalizationString.cancel), Language.StringByID(MyInternationalizationString.confrim));
-                    alert.ResultEventHandler += (sender1, e1) =>
-                    {
-                        if (e1)
-                        {
-                            Common.Logic.LogicList.Remove(logic);
-                            Automationview(refresview);
-                            Logic.Send.DelLogic(logic.LogicId);
-                        }
-                    };
-                    alert.Show();
-
-                };
-                var line = new Button
-                {
-                    Y = Application.GetRealHeight(215),
-                    Height = Application.GetRealHeight(5),
-                    Width = Application.GetRealWidth(1080 - 58),
-                    BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
-                    X = Application.GetRealWidth(58),
-                };
-                logicRowlayout.AddChidren(line);
-            }
-
-        }
-        /// <summary>
-        /// 鏄剧ず鍥炬爣鐨勯鑹�
-        /// </summary>
-        /// <param name="logic"></param>
-        /// <param name="logicRowlayout"></param>
-        /// <param name="intvalue"></param>
-        public void StatusColor(Common.Logic logic, RowLayout logicRowlayout, int intvalue)
-        {
-
-            var logictimeBtn = new Button
-            {
-                Height = Application.GetRealHeight(58),
-                Width = logicRowlayout.Width - Application.GetRealWidth(58 + 12 + 350 + 58),
-                Y = Application.GetRealHeight(30),
-                X = Application.GetRealWidth(365),
-                TextAlignment = TextAlignment.CenterRight,
-                TextColor = ZigbeeColor.Current.LogicListWeekTextColor,
-            };
-            logicRowlayout.AddChidren(logictimeBtn);
-
-            ///鏄剧ず鎵ц鍛ㄦ湡
-            switch (logic.TimeAttribute.Repeat)
-            {
-                ///0:鍙墽琛屼竴娆★紝鎵ц鍚嶪sEnable鍊肩疆;1,浠婂勾鍐呮墽琛�;2锛氭瘡澶╂墽琛�;3锛氭瘡鏈堟墽琛�;4锛氭瘡骞存墽琛�;5锛氬懆閲嶅銆�
-                case 0:
-                    {
-                        logictimeBtn.Text = Language.StringByID(MyInternationalizationString.executeonce);
-                    }; break;
-                case 1: { }; break;
-                case 2:
-                    {
-                        logictimeBtn.Text = Language.StringByID(MyInternationalizationString.everyday);
-                    }; break;
-                case 3:
-                    {
-
-                        string len = "", value = "";
-                        var stringvalue = Convert.ToString(logic.TimeAttribute.MonthDate, 2);
-                        var str = stringvalue.Insert(0, new string('0', 32 - stringvalue.Length));
-                        for (int j = 31; j >= 0; j--)
-                        {
-                            len += str.Substring(j, 1);
-                        }
-                        for (int j = 0; j < len.Length; j++)
-                        {
-                            var strvalue = len.Substring(j, 1);
-                            if (strvalue == "1")
-                            {
-                                value += (j + 1).ToString() + ",";
-                            }
-                        }
-                        logictimeBtn.Text = Language.StringByID(MyInternationalizationString.monthly) + value.TrimEnd(',') + Language.StringByID(MyInternationalizationString.day);
-
-                    }; break;
-                case 4:
-                    {
-
-                        Dictionary<int, int> dictionary = new Dictionary<int, int>();
-                        ///鎵惧嚭鎵ц鐨勬湀浠藉拰澶╂暟
-                        if (logic.TimeAttribute.SelectMonDate.Count != 0)
-                        {
-                            for (int i = 0; i < logic.TimeAttribute.SelectMonDate.Count; i++)
-                            {
-                                var dayvalue = logic.TimeAttribute.SelectMonDate[i];
-                                if (dayvalue != 0)
-                                {
-                                    dictionary.Add(i + 1, dayvalue);
-                                }
-                            }
-                        }
-                        if (dictionary.Count != 0 && dictionary.Count == 1)
-                        {
-                            string len = "", leng = "";
-                            int minvalue = 0, Maximum = 0;
-                            foreach (var value in dictionary)
-                            {
-                                ///鍙栧嚭鏈堜唤
-                                var month = value.Key;
-                                ///鍙栧嚭鏃ユ暟
-                                var day = value.Value;
-                                var maxvalue = Convert.ToString(day, 2);
-                                var str = maxvalue.Insert(0, new string('0', 32 - maxvalue.Length));
-                                for (int j = 31; j >= 0; j--)
-                                {
-                                    len += str.Substring(j, 1);
-                                }
-
-                                for (int j = 0; j < len.Length; j++)
-                                {
-                                    var strvalue = len.Substring(j, 1);
-                                    if (strvalue == "1")
-                                    {
-                                        minvalue = j + 1;
-                                        break;
-                                    }
-                                }
-                                for (int j = 0; j < len.Length; j++)
-                                {
-                                    var strvalue = len.Substring(j, 1);
-                                    if (strvalue == "1")
-                                    {
-                                        Maximum = j + 1;
-                                    }
-                                }
-
-                                if (month.ToString().Length < 2)
-                                {
-                                    leng = "0" + month.ToString();
-                                }
-                                else
-                                {
-                                    leng = month.ToString();
-                                }
-                                if (minvalue == Maximum)
-                                {
-                                    logictimeBtn.Text = Language.StringByID(MyInternationalizationString.everyyear) + leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString());
-                                }
-                                else
-                                {
-                                    logictimeBtn.Text = Language.StringByID(MyInternationalizationString.everyyear) + leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString()) + "-" + leng + "/" + (Maximum.ToString().Length < 2 ? "0" + Maximum.ToString() : Maximum.ToString());
-                                }
-                            }
-
-                        }
-                        else
-                        {
-                            int b = 0;
-                            string stringtext = "";
-                            foreach (var value in dictionary)
-                            {
-                                string len = "", leng = "";
-                                int minvalue = 0, Maximum = 0;
-                                ///鍙栧嚭鏈堜唤
-                                var month = value.Key;
-                                ///鍙栧嚭鏃ユ暟
-                                var day = value.Value;
-                                var maxvalue = Convert.ToString(day, 2);
-                                var str = maxvalue.Insert(0, new string('0', 32 - maxvalue.Length));
-                                for (int j = 31; j >= 0; j--)
-                                {
-                                    len += str.Substring(j, 1);
-                                }
-
-
-                                if (month.ToString().Length < 2)
-                                {
-                                    leng = "0" + month.ToString();
-                                }
-                                else
-                                {
-                                    leng = month.ToString();
-                                }
-
-
-
-                                if (b == 0)
-                                {
-                                    for (int j = 0; j < len.Length; j++)
-                                    {
-                                        var strvalue = len.Substring(j, 1);
-                                        if (strvalue == "1")
-                                        {
-                                            minvalue = j + 1;
-                                            break;
-                                        }
-                                    }
-                                    stringtext += leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString()) + "-";
-
-                                }
-
-                                if (b == dictionary.Count - 1)
-                                {
-                                    for (int j = 0; j < len.Length; j++)
-                                    {
-                                        var strvalue = len.Substring(j, 1);
-                                        if (strvalue == "1")
-                                        {
-                                            Maximum = j + 1;
-                                        }
-                                    }
-                                    stringtext += leng + "/" + (Maximum.ToString().Length < 2 ? "0" + Maximum.ToString() : Maximum.ToString());
-
-                                }
-                                b++;
-                            }
-                            logictimeBtn.Text = Language.StringByID(MyInternationalizationString.everyyear) + stringtext;
-                        }
-
-                    }; break;
-                case 5:
-                    {
-                        string len = "", text = "";
-                        List<int> listvalueInt = new List<int>();
-                        listvalueInt.Clear();
-                        var maxvalue = Convert.ToString(logic.TimeAttribute.WeekDay, 2);
-                        var str = maxvalue.Insert(0, new string('0', 8 - maxvalue.Length));
-                        for (int j = 7; j >= 0; j--)
-                        {
-                            len += str.Substring(j, 1);
-                        }
-
-                        for (int j = 0; j < len.Length; j++)
-                        {
-                            var strvalue = len.Substring(j, 1);
-                            if (strvalue == "1")
-                            {
-                                listvalueInt.Add(j + 1);
-
-
-                                if ((j + 1) == 1)
-                                {
-                                    text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.mon1) + ",";
-                                    //text += Language.StringByID(MyInternationalizationString.mon) + ",";
-                                }
-                                else if ((j + 1) == 2)
-                                {
-                                    text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.tue1) + ",";
-                                    //text += Language.StringByID(MyInternationalizationString.tue) + ",";
-                                }
-                                else if ((j + 1) == 3)
-                                {
-                                    text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.wed1) + ",";
-                                    //text += Language.StringByID(MyInternationalizationString.wed) + ",";
-                                }
-                                else if ((j + 1) == 4)
-                                {
-                                    text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.thu1) + ",";
-                                    //text += Language.StringByID(MyInternationalizationString.thu) + ",";
-                                }
-                                else if ((j + 1) == 5)
-                                {
-                                    text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.frl1) + ",";
-                                    //text += Language.StringByID(MyInternationalizationString.frl) + ",";
-                                }
-                                else if ((j + 1) == 6)
-                                {
-                                    text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.sat1) + ",";
-                                    //text += Language.StringByID(MyInternationalizationString.sat) + ",";
-                                }
-                                else if ((j + 1) == 7)
-                                {
-                                    text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.sun1) + ",";
-                                    //text += Language.StringByID(MyInternationalizationString.sun) + ",";
-                                }
-
-
-                            }
-                        }
-                        //鏆傛椂闅愯棌鎺夛紝闇�瑕佹樉绀哄懆鏈拰宸ヤ綔鏃ュ啀鏀惧紑锛�
-                        //if (listvalueInt.Count == 5 && !listvalueInt.Contains(6) && !listvalueInt.Contains(7))
-                        //{
-                        //    btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.workingday);
-                        //}
-                        //else if (listvalueInt.Count == 2 && listvalueInt.Contains(6) && listvalueInt.Contains(7))
-                        //{
-                        //    btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.weekend);
-                        //}
-                        //else if (listvalueInt.Count == 7)
-                        //{
-                        //    btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.everyday);
-                        //}
-                        //else
-                        //{
-                        //    btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.week1) + text.Replace(Language.StringByID(MyInternationalizationString.week1), "").TrimEnd(',');
-                        //}
-                        logictimeBtn.Text = Language.StringByID(MyInternationalizationString.week1) + text.Replace(Language.StringByID(MyInternationalizationString.week1), "").TrimEnd(',');
-                        //btndisplaycycle.Text = text.TrimEnd(',');
-                    }; break;
-            }
-
-            List<string> indexlist = new List<string>();
-            List<string> iconIndexlist = new List<string>();
-            for (int i = 0; i < logic.Actions.Count; i++)
-            {
-                var linkType = logic.Actions[i]["LinkType"].ToString();
-                var d = indexlist.Find((value) => { return value == linkType; });
-                if (d == null)
-                {
-                    indexlist.Add(linkType);
-                }
-            }
-            if (indexlist.Contains("0"))
-            {
-                iconIndexlist.Add("0");
-            }
-            if (indexlist.Contains("2"))
-            {
-                iconIndexlist.Add("2");
-            }
-            if (indexlist.Contains("6"))
-            {
-                iconIndexlist.Add("6");
-            }
-            if (indexlist.Contains("7"))
-            {
-                iconIndexlist.Add("7");
-            }
-            for (int i = 0; i < iconIndexlist.Count; i++)
-            {
-                var iconindex = iconIndexlist[i];
-                var typebjBtn = new FrameLayout
-                {
-                    Width = Application.GetRealWidth(82),
-                    Height = Application.GetRealHeight(82),
-                    X = Application.GetRealWidth(58) + Application.GetRealWidth(12 + (12 + 82 + 45 + 12) * i),
-                    Y = Application.GetRealHeight(58 + 30 + 30),
-                    Radius = (uint)Application.GetRealHeight(41),
-                    BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
-                };
-                logicRowlayout.AddChidren(typebjBtn);
-
-                var typeIconBtn = new Button
-                {
-                    Width = Application.GetRealWidth(58),
-                    Height = Application.GetRealHeight(58),
-                    Gravity = Gravity.Center,
-
-                };
-                typebjBtn.AddChidren(typeIconBtn);
-
-                var connectIconBtn = new Button
-                {
-                    Y = typebjBtn.Y + Application.GetRealHeight(35),
-                    X = Application.GetRealWidth(58) + Application.GetRealWidth((12 + 82 + 12) + (12 + 45 + 82 + 12) * i),
-                    Width = Application.GetRealWidth(48),
-                    Height = Application.GetRealHeight(15),
-                    UnSelectedImagePath = "ZigeeLogic/connect.png",
-                };
-                logicRowlayout.AddChidren(connectIconBtn);
-                if (iconIndexlist.Count - 1 == i)
-                {
-                    connectIconBtn.Visible = false;
-                }
-                switch (iconindex)
-                {
-                    case "0":
-                        {
-                            if (intvalue == 1)
-                            {
-                                typeIconBtn.UnSelectedImagePath = "ZigeeLogic/function1.png";
-                                typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicFunction1Color;
-                            }
-                            else
-                            {
-                                typeIconBtn.UnSelectedImagePath = "ZigeeLogic/nofunction.png";
-                                typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
-                            }
-                        }
-                        break;
-                    case "2":
-                        {
-
-                            if (intvalue == 1)
-                            {
-                                typeIconBtn.UnSelectedImagePath = "ZigeeLogic/scene1.png";
-                                typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicScene1Color;
-                            }
-                            else
-                            {
-                                typeIconBtn.UnSelectedImagePath = "ZigeeLogic/noscene.png";
-                                typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
-                            }
-
-                        }
-                        break;
-                    case "6":
-                        {
-                            if (intvalue == 1)
-                            {
-                                typeIconBtn.UnSelectedImagePath = "ZigeeLogic/security1.png";
-                                typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicSecurity1Color;
-
-                            }
-                            else
-                            {
-                                typeIconBtn.UnSelectedImagePath = "ZigeeLogic/nosecurity.png";
-                                typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
-                            }
-
-                        }
-                        break;
-                    case "7":
-                        {
-                            if (intvalue == 1)
-                            {
-                                typeIconBtn.UnSelectedImagePath = "ZigeeLogic/delay1.png";
-                                typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicDelay1Color;
-                            }
-                            else
-                            {
-                                typeIconBtn.UnSelectedImagePath = "ZigeeLogic/nodelay.png";
-                                typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
-                            }
-
-                        }
-                        break;
-
-                }
-            }
-        }
-
-        public void AddLogic() {
-            //new涓�涓柊閫昏緫瀵硅薄锛�
-            Common.Logic.CurrentLogic = new Common.Logic();
-            Common.Logic.CurrentLogic.IsEnable = 1;//榛樿涓哄紑
-            Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.automation1);
-            var addLogicPage = new AddLogicPage();
-            UserView.HomePage.Instance.AddChidren(addLogicPage);
-            UserView.HomePage.Instance.PageIndex += 1;
-            addLogicPage.Show();
-
-
-        }
-    }
-
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
index c69ca44..d1b1526 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
@@ -14,7 +14,6 @@
             Tag = "Logic";
         }
         Button selectedIcon = new Button();
-        public static Action action;
         public static bool edit=false;
       
 
@@ -56,7 +55,6 @@
             clickBtn.MouseDownEventHandler += (sender, e) =>
             {
                 RemoveFromParent();
-                action();
             };
 
             var back = new Button
@@ -110,11 +108,11 @@
                 {
                     continue;
                 }
-                var userFramelayout = new RowLayout
+                var userFramelayout = new FrameLayout
                 {
                     Height = Application.GetRealHeight(160),
                     BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
-                    LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                   // LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                 };
                 middle.AddChidren(userFramelayout);
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs
index 344aac1..caedace 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs
@@ -18,6 +18,7 @@
         Button roomTextButton = new Button();
         Button devicetypeButton = new Button();
         VerticalScrolViewLayout middle;
+        HorizontalScrolViewLayout devicetypehorizontalScrol1;
         FrameLayout clickframeLayout = new FrameLayout();
         Button clickbutton = new Button();
         Button clicktextcolcrbutton = new Button();
@@ -120,7 +121,7 @@
             this.AddChidren(roomhorizontalScrol);
 
 
-            var devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
+             devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
             {
                 Width = Application.GetRealWidth(1080 - 58 - 200),
                 Height = Application.GetRealHeight(280),
@@ -342,7 +343,18 @@
                         }
                         list.Add(device);
                     }
-                 
+                    if (list.Count == 0)
+                    {
+                        devicetypehorizontalScrol.Height = 0;
+                        devicetypehorizontalScrol1.Height = 0;
+                        middle.Height = 0;
+                    }
+                    else
+                    {
+                        devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
+                        devicetypehorizontalScrol1.Height = Application.GetRealHeight(280);
+                        middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
+                    }
                     AllDeviceTypeView(list, devicetypehorizontalScrol);
 
                 }
@@ -370,6 +382,18 @@
                         }
                         list.Add(device);
                     }
+                    if (list.Count == 0)
+                    {
+                        devicetypehorizontalScrol.Height = 0;
+                        devicetypehorizontalScrol1.Height = 0;
+                        middle.Height = 0;
+                    }
+                    else
+                    {
+                        devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
+                        devicetypehorizontalScrol1.Height = Application.GetRealHeight(280);
+                        middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
+                    }
                     AllDeviceTypeView(list, devicetypehorizontalScrol);
 
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs
index 60c4509..2d83bdd 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs
@@ -19,6 +19,7 @@
         Button roomTextButton = new Button();
         Button devicetypeButton = new Button();
         VerticalScrolViewLayout middle;
+        HorizontalScrolViewLayout devicetypehorizontalScrol1;
         FrameLayout clickframeLayout = new FrameLayout();
         Button clickbutton = new Button();
         Button clicktextcolcrbutton = new Button();
@@ -119,7 +120,7 @@
             };
             this.AddChidren(roomhorizontalScrol);
 
-            var devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
+             devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
             {
                 Width = Application.GetRealWidth(1080 - 58 - 200),
                 Height = Application.GetRealHeight(280),
@@ -342,6 +343,18 @@
                         }
                         list.Add(device);
                     }
+                    if (list.Count == 0)
+                    {
+                        devicetypehorizontalScrol.Height = 0;
+                        devicetypehorizontalScrol1.Height = 0;
+                        middle.Height = 0;
+                    }
+                    else
+                    {
+                        devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
+                        devicetypehorizontalScrol1.Height = Application.GetRealHeight(280);
+                        middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
+                    }
                     AllDeviceTypeView(list, devicetypehorizontalScrol);
 
                 }
@@ -371,6 +384,18 @@
                             continue;
                         }
                         list.Add(device);
+                    }
+                    if (list.Count == 0)
+                    {
+                        devicetypehorizontalScrol.Height = 0;
+                        devicetypehorizontalScrol1.Height = 0;
+                        middle.Height = 0;
+                    }
+                    else
+                    {
+                        devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
+                        devicetypehorizontalScrol1.Height = Application.GetRealHeight(280);
+                        middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
                     }
                     AllDeviceTypeView(list, devicetypehorizontalScrol);
 
@@ -1145,7 +1170,7 @@
                                 btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                                 openBtnSelected.Visible = false;
                                 closeBtnSelected.Visible = true;
-                                var ignoreTime = new IgnoreTime();
+                                var ignoreTime = new TemplateIgnore();
                                 UserView.HomePage.Instance.AddChidren(ignoreTime);
                                 UserView.HomePage.Instance.PageIndex += 1;
                                 ignoreTime.Show(common, btnclose.Text, edit, timevalue);
@@ -1227,7 +1252,7 @@
                                         btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                                         openBtnSelected.Visible = false;
                                         closeBtnSelected.Visible = false;
-                                        var ignoreTime = new IgnoreTime();
+                                        var ignoreTime = new TemplateIgnore();
                                         UserView.HomePage.Instance.AddChidren(ignoreTime);
                                         UserView.HomePage.Instance.PageIndex += 1;
                                         ignoreTime.Show(common, btntimeout.Text, edit, timevalue);
@@ -1396,10 +1421,10 @@
                     break;
                 case DeviceType.DoorLock:
                     {
+                        flMain.RemoveFromParent();
                         var memberList = new MemberList();
                         UserView.HomePage.Instance.AddChidren(memberList);
                         UserView.HomePage.Instance.PageIndex += 1;
-                        MemberList.action += () => { flMain.RemoveFromParent(); };
                         memberList.Show(common);
                     }
                     break;
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplateIgnore.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateIgnore.cs
new file mode 100755
index 0000000..9496be9
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateIgnore.cs
@@ -0,0 +1,250 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared;
+using Shared.Common;
+using Shared.R;
+using ZigBee.Device;
+namespace Shared.Phone.Device.Logic
+{
+    public class TemplateIgnore:FrameLayout
+    {
+        public TemplateIgnore()
+        {
+            Tag = "Logic";
+
+        }
+        Button selectedIcon = new Button();
+        public void Show(CommonDevice common, string name, bool edit, int timevalue)
+        {
+
+            #region  鏈�涓婇潰鐨勫竷灞�浠g爜
+            var topRowLayout = new RowLayout
+            {
+                BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+                Height = Application.GetRealHeight(184),
+                LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
+            };
+            this.AddChidren(topRowLayout);
+
+            var titleName = new Button
+            {
+                TextSize = 16,
+                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                TextAlignment = TextAlignment.CenterLeft,
+                X = Application.GetRealWidth(176),
+                Width = Application.GetRealWidth(600),
+                Height = Application.GetRealHeight(69),
+                Y = Application.GetRealHeight(92),
+                Text = name,
+            };
+            topRowLayout.AddChidren(titleName);
+
+            var clickBtn = new Button
+            {
+                Width = Application.GetRealWidth(81 + 51),
+                Height = Application.GetRealHeight(58 + 40),
+                Y = Application.GetRealHeight(98 - 40),
+            };
+            topRowLayout.AddChidren(clickBtn);
+            clickBtn.MouseDownEventHandler += (sender, e) =>
+            {
+                RemoveFromParent();
+            };
+
+            var back = new Button
+            {
+                Width = Application.GetRealWidth(30),
+                Height = Application.GetRealHeight(51),
+                X = Application.GetRealWidth(81),
+                Y = Application.GetRealHeight(98),
+                //Gravity = Gravity.CenterVertical;
+                UnSelectedImagePath = "ZigeeLogic/back.png",
+            };
+            topRowLayout.AddChidren(back);
+            back.MouseDownEventHandler += (sender, e) =>
+            {
+                RemoveFromParent();
+            };
+            #endregion
+
+            var middle = new VerticalScrolViewLayout
+            {
+                Y = topRowLayout.Bottom,
+                Height = Application.GetRealHeight(1920 - 184 - 260),
+                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+            };
+            this.AddChidren(middle);
+            int selectetimedvalue = 0;
+            var timestrlist = new List<string> { "2", "5", "10", "20", "30", Language.StringByID(MyInternationalizationString.logiccustom) };
+            foreach (var intvalue in timestrlist)
+            {
+
+                var timeframelayout = new FrameLayout
+                {
+                    Height = Application.GetRealHeight(160),
+                    BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                };
+                middle.AddChidren(timeframelayout);
+
+                var timeniconBtn = new Button
+                {
+                    Width = Application.GetRealWidth(81),
+                    Height = Application.GetRealHeight(81),
+                    X = Application.GetRealWidth(58),
+                    Y = Application.GetRealHeight(55),
+                    UnSelectedImagePath = "ZigeeLogic/point.png",
+
+                };
+                timeframelayout.AddChidren(timeniconBtn);
+
+                var timeRow = new RowLayout
+                {
+                    Y = Application.GetRealHeight(30),
+                    Width = Application.GetRealWidth(850),
+                    Height = Application.GetRealHeight(130),
+                    X = Application.GetRealWidth(176),
+                    LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+                };
+                timeframelayout.AddChidren(timeRow);
+
+                var timeBtn = new Button
+                {
+                    Text = intvalue.ToString() + Language.StringByID(MyInternationalizationString.Minute),
+                    TextAlignment = TextAlignment.CenterLeft,
+                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                    Tag = intvalue,
+                };
+                timeRow.AddChidren(timeBtn);
+
+
+                var selected = new SelectedButton(789);
+                timeRow.AddChidren(selected);
+                //鍒ゆ柇涓�涓瓧绗︽槸瀛楃涓茶繕鏄暟瀛�
+                if (intvalue.Length < 3)
+                {
+                    if (timevalue == int.Parse(intvalue) * 60)
+                    {
+                        selectedIcon.Visible = false;
+                        selectedIcon = selected;
+                        selected.Visible = true;
+                    }
+                }
+                else
+                {
+                    timeRow.LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor;
+                }
+                EventHandler<MouseEventArgs> timeclick = (sender, e) =>
+                {
+                    selectedIcon.Visible = false;
+                    selectedIcon = selected;
+                    selected.Visible = true;
+                    if (Language.StringByID(MyInternationalizationString.logiccustom) == timeBtn.Tag.ToString())
+                    {
+                        var secondList = new List<string>();
+                        var minuteList = new List<string>();
+                        for (int i = 0; i < 61; i++)
+                        {
+                            if (i < 10)
+                            {
+                                var a = "0" + i.ToString();
+                                secondList.Add(a + " " + Language.StringByID(MyInternationalizationString.second));
+                                minuteList.Add(a + " " + Language.StringByID(MyInternationalizationString.minute));
+                            }
+                            else
+                            {
+                                secondList.Add(i.ToString() + " " + Language.StringByID(MyInternationalizationString.second));
+                                minuteList.Add(i.ToString() + " " + Language.StringByID(MyInternationalizationString.minute));
+                            }
+
+                        }
+                        int selectIndex1 = timevalue / 60;
+                        int selectIndex2 = timevalue % 60;
+                        PickerView.ShowNormal(minuteList, secondList, new List<string>(), (Index1, Index2, Index3) =>
+                        {
+                            selectetimedvalue = int.Parse(minuteList[Index1].Split(' ')[0]) * 60 + int.Parse(secondList[Index2].Split(' ')[0]);
+                            timemethod(common, selectetimedvalue, timevalue, edit);
+                        }, selectIndex1, selectIndex2, 0, Language.StringByID(MyInternationalizationString.logiccustom));
+                    }
+                    else
+                    {
+                        selectetimedvalue = int.Parse(timeBtn.Tag.ToString()) * 60;
+                    }
+                };
+                timeframelayout.MouseUpEventHandler += timeclick;
+                timeniconBtn.MouseUpEventHandler += timeclick;
+                timeRow.MouseUpEventHandler += timeclick;
+                timeBtn.MouseUpEventHandler += timeclick;
+                selected.MouseUpEventHandler += timeclick;
+            }
+
+            var saveFrameLayout = new FrameLayout
+            {
+                Y = middle.Bottom,
+                Height = Application.GetRealHeight(260),
+                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+            };
+            this.AddChidren(saveFrameLayout);
+
+            var btnsave = new Button
+            {
+                X = Application.GetRealWidth(85),
+                Height = Application.GetRealHeight(130),//194
+                Width = Application.GetRealWidth(910),
+                Radius = (uint)Application.GetRealHeight(60),
+                BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
+                TextID = MyInternationalizationString.Save,
+                TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+            };
+            saveFrameLayout.AddChidren(btnsave);
+            btnsave.MouseUpEventHandler += (sender, e) =>
+            {
+                timemethod(common, selectetimedvalue, timevalue, edit);
+            };
+        }
+
+        public void timemethod(CommonDevice common, int selectetimedvalue, int timevalue, bool edit)
+        {
+
+            var deviceConditionsInfo = new Dictionary<string, string>();
+            deviceConditionsInfo.Add("Type", "1");
+            deviceConditionsInfo.Add("IsValid", "1");
+            deviceConditionsInfo.Add("MacAddr", common.DeviceAddr);
+            deviceConditionsInfo.Add("Epoint", common.DeviceEpoint.ToString());
+            deviceConditionsInfo.Add("Cluster_ID", "1280");
+            deviceConditionsInfo.Add("AttriButeId", "1281");
+            deviceConditionsInfo.Add("AttriButeData1", "0");
+            deviceConditionsInfo.Add("AttriButeData2", "0");
+            deviceConditionsInfo.Add("Range", "1");
+            if (selectetimedvalue != 0)
+            {
+                if (timevalue != selectetimedvalue)
+                {
+                    if (deviceConditionsInfo.ContainsKey("IgnoreTime"))
+                    {
+                        deviceConditionsInfo.Remove("IgnoreTime");
+                    }
+                    deviceConditionsInfo.Add("IgnoreTime", selectetimedvalue.ToString());
+                    LogicIfon.AddDeviceconditions(common, deviceConditionsInfo);
+                }
+
+            }
+            else
+            {
+                if (!edit)
+                {
+                    var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+                                           Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
+                                           Language.StringByID(MyInternationalizationString.complete));
+                    alert.Show();
+                    return;
+                }
+
+            }
+            var templatePage = new TemplatePage();
+            UserView.HomePage.Instance.AddChidren(templatePage);
+            UserView.HomePage.Instance.PageIndex += 1;
+            templatePage.Show();
+
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
index 4ff8617..a9e7def 100755
--- a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
@@ -1,5 +1,6 @@
 锘縰sing System;
 using System.Collections.Generic;
+using System.Globalization;
 using Shared.Common;
 using Shared.Phone.Device.CommonForm;
 using Shared.Phone.UserCenter;
@@ -18,12 +19,21 @@
         /// <summary>
         /// The room.
         /// </summary>
-        public  Shared.Common.Room room;
+        public Shared.Common.Room room;
 
         /// <summary>
         /// The action.
         /// </summary>
         public Action action;
+
+        /// <summary>
+        /// backGround
+        /// </summary>
+        private Button backGround;
+        /// <summary>
+        /// IconPathType
+        /// </summary>
+        public int IconPathType = 0;
 
         #endregion
 
@@ -38,7 +48,7 @@
         public void Show(Shared.Common.Room r)
         {
             room = r;
-
+            IconPathType = r.BackgroundImageType;
             AddTop();
 
             AddBodyView();
@@ -83,17 +93,17 @@
             };
             AddChidren(bodyFrameLayout);
 
-            var imgFL = new FrameLayout
+            var imgFL = new Button
             {
-                Y=Application.GetRealHeight(60),
-                Width=Application.GetMinRealAverage(916),
-                Height = Application.GetMinRealAverage(478),
-                Gravity=Gravity.CenterHorizontal,
-                BackgroundImagePath= "Room/Room_Rectangle.png"
+                Y = Application.GetRealHeight(60),
+                Width = Application.GetMinRealAverage(916),
+                Height = Application.GetMinRealAverage(487),
+                Gravity = Gravity.CenterHorizontal,
+                UnSelectedImagePath = "Room/Room_Rectangle.png"
             };
             bodyFrameLayout.AddChidren(imgFL);
 
-            var backGround = new Button()
+            backGround = new Button()
             {
                 Y = Application.GetRealHeight(60),
                 Width = Application.GetMinRealAverage(887),
@@ -103,6 +113,7 @@
                 UnSelectedImagePath = room.BackgroundImage
             };
             bodyFrameLayout.AddChidren(backGround);
+            backGround.MouseUpEventHandler += backGroundIMGHander;
 
             var infoFL = new FrameLayout
             {
@@ -115,7 +126,7 @@
             var infoEdit = new Button
             {
                 X = Application.GetRealWidth(CommonFormResouce.X_Left),
-                Y=Application.GetRealHeight(80),
+                Y = Application.GetRealHeight(80),
                 Height = Application.GetRealHeight(60),
                 Width = Application.GetRealWidth(700),
                 TextID = R.MyInternationalizationString.EditInfo,
@@ -134,29 +145,31 @@
             var floorRow = new DeviceInfoRow(308);
             floorRow.Init();
             floorRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.BelongFloor)} :");
-            floorRow.SetTitle(room.FloorName);
             infoFL.AddChidren(floorRow);
-            floorRow.ClickBtn.MouseUpEventHandler += (sender, e) =>
+            if (!room.IsLove)
             {
-                if (Config.Instance.Home.FloorDics != null)
+                floorRow.SetTitle(room.FloorName);
+                floorRow.ClickBtn.MouseUpEventHandler += (sender, e) =>
                 {
-                    List<string> floorIds = new List<string> { };
-                    List<string> floorNames = new List<string> { };
-                    foreach (var floor in Config.Instance.Home.FloorDics)
+                    if (Config.Instance.Home.FloorDics != null)
                     {
-                        floorIds.Add(floor.Key);
-                        floorNames.Add(floor.Value);
+                        List<string> floorIds = new List<string> { };
+                        List<string> floorNames = new List<string> { };
+                        foreach (var floor in Config.Instance.Home.FloorDics)
+                        {
+                            floorIds.Add(floor.Key);
+                            floorNames.Add(floor.Value);
+                        }
+
+                        PickerView.Show(floorNames, (index) =>
+                        {
+                            room.FloorId = floorIds[index];
+                            floorRow.SetTitle(room.FloorName);
+                        }, floorIds.IndexOf(room.FloorId), Language.StringByID(R.MyInternationalizationString.BelongFloor), Language.StringByID(R.MyInternationalizationString.Confrim), Language.StringByID(R.MyInternationalizationString.Cancel));
                     }
-
-                    PickerView.Show(floorNames, (index) =>
-                     {
-                         room.FloorId = floorIds[index];
-                         floorRow.SetTitle(room.FloorName);
-                     }, floorIds.IndexOf(room.FloorId), Language.StringByID(R.MyInternationalizationString.BelongFloor), Language.StringByID(R.MyInternationalizationString.Confrim), Language.StringByID(R.MyInternationalizationString.Cancel));
-                }
-            };
-
-
+                };
+            }
+            
             var temperatureRow = new DeviceInfoRow(446);
             temperatureRow.Init();
             temperatureRow.SetTipTitle(R.MyInternationalizationString.Temperature);
@@ -172,12 +185,12 @@
                 tem.Show(room);
                 tem.selectDeviceAction = (selectTemp) =>
                 {
-                    if(selectTemp==null)
+                    if (selectTemp == null)
                     {
                         return;
                     }
-                    room.TemperatrueDevice =$"{selectTemp.DeviceAddr}{selectTemp.DeviceEpoint}";
-                    
+                    room.TemperatrueDevice = $"{selectTemp.DeviceAddr}{selectTemp.DeviceEpoint}";
+
                     HdlDeviceAttributeLogic.Current.RemoveEvent("TemperatrueDevice");
                     HdlDeviceAttributeLogic.Current.AddAttributeEvent("TemperatrueDevice", "DeviceStatusReport", (Action<ZigBee.Device.CommonDevice>)((report) =>
                     {
@@ -361,34 +374,180 @@
                 }
             }
 
-            var shareRow = new DeviceInfoRow(723);
-            shareRow.Init();
-            shareRow.SetTipTitle(R.MyInternationalizationString.Share);
-            shareRow.SetTitle("2 浜�");
-            shareRow.NameText.TextAlignment = TextAlignment.CenterRight;
-            infoFL.AddChidren(shareRow);
-            shareRow.NextBtn.MouseUpEventHandler += (sender, e) =>
-            {
-                var tem = new RoomShareSetting { };
-                HomePage.Instance.AddChidren(tem);
-                HomePage.Instance.PageIndex += 1;
-                tem.Show(room);
-                tem.action = (selectTemp) =>
-                {
-
-                };
-            };
-
 
             var confirm = new Device.CommonForm.CompleteButton(1700, 700, 127);
             confirm.SetTitle(R.MyInternationalizationString.Confrim);
             AddChidren(confirm);
             confirm.MouseUpEventHandler += (sender, e) =>
             {
+                var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo);
+                var fileName = $"Room_{tradeTime}";
                 room.Name = nameRow.NameText.Text.Trim();
+                if (IconPathType == 0)
+                {
+                    room.BackgroundImage = backGround.UnSelectedImagePath;
+                }
+                else
+                {
+                    Shared.IO.FileUtils.WriteFileByBytes(System.IO.Path.Combine(Config.Instance.FullPath, fileName), backGround.ImageBytes);
+                    room.BackgroundImage = System.IO.Path.Combine(Config.Instance.FullPath, fileName);
+                }
+                room.BackgroundImageType = IconPathType;
                 room.Save();
                 RemoveFromParent();
             };
+
+        }
+
+        /// <summary>
+        /// 閫夋嫨鑳屾櫙鍥�
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void backGroundIMGHander(object sender, MouseEventArgs e)
+        {
+            if (room != null && room.IsSharedRoom)
+            {
+                RoomCommon.ShowTipRoomIsShared();
+                return;
+            }
+
+            int selectRow_Height = 150;
+            int selectRow_Width = 1034;
+            var selectFL = new FrameLayout()
+            {
+                BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
+            };
+            AddChidren(selectFL);
+
+            var itemFL = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(1276),
+                Height = Application.GetRealHeight(450),
+                Width = Application.GetRealWidth(selectRow_Width),
+                Gravity = Gravity.CenterHorizontal,
+                Radius = (uint)Application.GetRealHeight(17),
+                BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor
+            };
+            selectFL.AddChidren(itemFL);
+            itemFL.Animate = Animate.DownToUp;
+
+            var selectLocalPicture = new Button()
+            {
+                Height = Application.GetRealHeight(selectRow_Height) - 1,
+                TextID = R.MyInternationalizationString.LocalPicture,
+                TextColor = ZigbeeColor.Current.GXCTextSelectedColor4
+            };
+            itemFL.AddChidren(selectLocalPicture);
+            var selectLocalLine = new Button()
+            {
+                Y = selectLocalPicture.Bottom,
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCLineColor
+            };
+            itemFL.AddChidren(selectLocalLine);
+
+            var selectPhotographBtn = new Button()
+            {
+                Y = selectLocalLine.Bottom,
+                Height = Application.GetRealHeight(selectRow_Height) - 1,
+                TextID = R.MyInternationalizationString.Photograph,
+                TextColor = ZigbeeColor.Current.GXCTextSelectedColor4
+            };
+            itemFL.AddChidren(selectPhotographBtn);
+            var selectPhotographLine = new Button()
+            {
+                Y = selectPhotographBtn.Bottom,
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCLineColor,
+            };
+            itemFL.AddChidren(selectPhotographLine);
+
+            var selectAblumsBtn = new Button()
+            {
+                Y = selectPhotographLine.Bottom,
+                Height = Application.GetRealHeight(selectRow_Height) - 1,
+                TextID = R.MyInternationalizationString.MyAblums,
+                TextColor = ZigbeeColor.Current.GXCTextSelectedColor4
+            };
+            itemFL.AddChidren(selectAblumsBtn);
+
+            var cancelBtn = new Button()
+            {
+                Y = Application.GetRealHeight(1742),
+                Height = Application.GetRealHeight(selectRow_Height),
+                Width = Application.GetRealWidth(selectRow_Width),
+                Gravity = Gravity.CenterHorizontal,
+                TextID = R.MyInternationalizationString.Cancel,
+                TextColor = ZigbeeColor.Current.GXCTextSelectedColor4,
+                BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor,
+                Radius = (uint)Application.GetRealHeight(17)
+            };
+            selectFL.AddChidren(cancelBtn);
+
+            selectLocalPicture.MouseUpEventHandler += (send, ee) =>
+            {
+                selectFL.RemoveFromParent();
+                var localPic = new AddRoomSelectPicByLocal();
+                Shared.Phone.UserView.HomePage.Instance.AddChidren(localPic);
+                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+                localPic.Show();
+                localPic.action = (imgPath) =>
+                {
+                    IconPathType = 0;
+                    backGround.UnSelectedImagePath = imgPath;
+                };
+            };
+            selectPhotographBtn.MouseUpEventHandler += (send, ee) =>
+            {
+                selectFL.RemoveFromParent();
+                var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo);
+                var fileName = $"Room_{tradeTime}";
+                //閫氳繃鐩告満鎷嶇収瑁佸壀
+                CropImage.TakePicture((imagePath) =>
+                {
+                    if (IconPathType != 0)
+                    {
+                        Global.DeleteFilebyHomeId(backGround.UnSelectedImagePath);
+                    }
+
+                    IconPathType = 1;
+                    backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath);
+                    backGround.UnSelectedImagePath = imagePath;
+                    System.IO.File.Delete(imagePath);
+
+                }, fileName, 2, 1);
+            };
+
+            selectAblumsBtn.MouseUpEventHandler += (send, ee) =>
+            {
+                selectFL.RemoveFromParent();
+                var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo);
+                var fileName = $"Room_{tradeTime}";
+                //浠庣浉鍐岄�夋嫨鍥剧墖瑁佸壀
+                CropImage.SelectPicture((imagePath) =>
+                {
+                    if (IconPathType != 0)
+                    {
+                        Global.DeleteFilebyHomeId(backGround.UnSelectedImagePath);
+                    }
+
+                    IconPathType = 2;
+                    backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath);
+                    backGround.UnSelectedImagePath = imagePath;
+                    System.IO.File.Delete(imagePath);
+
+                }, fileName, 2, 1);
+            };
+
+            cancelBtn.MouseUpEventHandler += (send, ee) =>
+            {
+                selectFL.RemoveFromParent();
+            };
+            selectFL.MouseUpEventHandler += (send, ee) =>
+            {
+                selectFL.RemoveFromParent();
+            };
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/IMessageCommon.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/IMessageCommon.cs
index ff34a16..165d370 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/IMessageCommon.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/IMessageCommon.cs
@@ -526,6 +526,48 @@
             dic["ParameterOrEmpty"] = R.MyInternationalizationString.uParameterError;
             //鏃犳晥鐧诲綍Token
             dic["NoLogin"] = R.MyInternationalizationString.uNoLogin;
+
+            //鑾峰彇宸叉巿鏉冪涓夋柟骞冲彴鍒楄〃
+            keys = "ZigbeeUsers/GetUserAuthItem";
+            dicMsg[keys] = new Dictionary<string, int>();
+            dic = dicMsg[keys];
+            //璇锋眰鍙傛暟閿欒
+            dic["ParameterOrEmpty"] = R.MyInternationalizationString.uParameterError;
+            //鏃犳晥鐧诲綍Token
+            dic["NoLogin"] = R.MyInternationalizationString.uNoLogin;
+
+            //瑙i櫎绗笁鏂规巿鏉�
+            keys = "ZigbeeUsers/UnBindUserAuth";
+            dicMsg[keys] = new Dictionary<string, int>();
+            dic = dicMsg[keys];
+            //璇锋眰鍙傛暟閿欒
+            dic["ParameterOrEmpty"] = R.MyInternationalizationString.uParameterError;
+            //鏃犳晥鐧诲綍Token
+            dic["NoLogin"] = R.MyInternationalizationString.uNoLogin;
+
+            //娣诲姞鎴栬�呮洿鏂板井淇℃巿鏉冪櫥褰曚俊鎭�
+            keys = "ZigbeeUsers/InsertOrUpdateAuthUser";
+            dicMsg[keys] = new Dictionary<string, int>();
+            dic = dicMsg[keys];
+            //璇锋眰鍙傛暟閿欒
+            dic["ParameterOrEmpty"] = R.MyInternationalizationString.uParameterError;
+            //鏃犳晥鐧诲綍Token
+            dic["NoLogin"] = R.MyInternationalizationString.uNoLogin;
+            //鎸囧畾璐﹀彿涓嶅瓨鍦�
+            dic["AccountNoExists"] = R.MyInternationalizationString.uAccountNoExists;
+
+            //绗笁鏂圭粦瀹氳处鍙�
+            keys = "ZigbeeUsers/BindAuthUserToAccount";
+            dicMsg[keys] = new Dictionary<string, int>();
+            dic = dicMsg[keys];
+            //璇锋眰鍙傛暟閿欒
+            dic["ParameterOrEmpty"] = R.MyInternationalizationString.uParameterError;
+            //鏃犳晥鐧诲綍Token
+            dic["NoLogin"] = R.MyInternationalizationString.uNoLogin;
+            //閿欒,绗笁鏂逛俊鎭涪澶�
+            dic["NoExist"] = R.MyInternationalizationString.uErrorAndLostOtherPatyInfo;
+            //鎸囧畾璐﹀彿涓嶅瓨鍦�
+            dic["AccountNoExists"] = R.MyInternationalizationString.uAccountNoExists;
         }
 
         /// <summary>
@@ -551,6 +593,23 @@
                 HdlLogLogic.Current.WriteLog(-1, "鍙傛暟锛�" + requestJson);
             }
 
+            //鍏遍�氱爜
+            if (statuCode == "ParameterOrEmpty")
+            {
+                //璇锋眰鍙傛暟閿欒
+                return Language.StringByID(R.MyInternationalizationString.uParameterError);
+            }
+            else if (statuCode == "NoLogin")
+            {
+                //鏃犳晥鐧诲綍Token
+                return Language.StringByID(R.MyInternationalizationString.uNoLogin);
+            }
+            else if (statuCode == "Fail")
+            {
+                //鎿嶄綔澶辫触锛岃閲嶈瘯
+                return Language.StringByID(R.MyInternationalizationString.uOperationFailed);
+            }
+
             if (dicMsg.ContainsKey(requestName) == true && dicMsg[requestName].ContainsKey(statuCode) == true)
             {
                 //鍦ㄥ唽鐨凪sg
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressFormBar.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressFormBar.cs
index 4d6dd4c..19f8af4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressFormBar.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressFormBar.cs
@@ -58,6 +58,10 @@
         /// 鍘熸潵鐨勬粦鍔ㄦ爣璇�
         /// </summary>
         private bool oldScrollEnabled = false;
+        /// <summary>
+        /// 鍘熸潵鐨勯偅涓渾褰㈣繘搴︽潯鏄惁鍙
+        /// </summary>
+        private bool oldPrigressVisible = false;
 
         #endregion
 
@@ -80,6 +84,12 @@
             this.oldScrollEnabled = UserView.HomePage.Instance.ScrollEnabled;
             UserView.HomePage.Instance.ScrollEnabled = false;
             Shared.Common.CommonPage.BackKeyCanClick = false;
+            this.oldPrigressVisible = Common.CommonPage.Loading.Visible;
+            if (oldPrigressVisible == true)
+            {
+                //鍦嗗舰杩涘害鏉′复鏃跺叧闂�
+                Common.CommonPage.Loading.Hide();
+            }
 
             //瀹瑰櫒
             bodyFrameLayout = new FrameLayout();
@@ -172,7 +182,7 @@
         /// </summary>
         /// <param name="value">杩涘害鍊�,鍐呴儴浼氶櫎浠axValue</param>
         /// <param name="maxValue">鏈�澶у��</param>
-        public void SetValue2(decimal value, decimal maxValue)
+        public void SetValue(decimal value, decimal maxValue)
         {
             decimal result = value / maxValue;
             this.SetValueEx(result);
@@ -184,6 +194,10 @@
         /// <param name="value"></param>
         private void SetValueEx(decimal value)
         {
+            if (btnProgressBar == null)
+            {
+                return;
+            }
             HdlThreadLogic.Current.RunMain(() =>
             {
                 int width = (int)(value * ProRowWidth);
@@ -223,15 +237,20 @@
         /// </summary>
         public void Close()
         {
-            if (this.oldScrollEnabled == true)
-            {
-                //濡傛灉瀹冨師鏉ュ氨鏄笉鍙互婊戝姩鐨勮瘽锛屼笉澶勭悊
-                UserView.HomePage.Instance.ScrollEnabled = true;
-            }
-            Shared.Common.CommonPage.BackKeyCanClick = true;
-
             HdlThreadLogic.Current.RunMain(() =>
             {
+                if (this.oldScrollEnabled == true)
+                {
+                    //濡傛灉瀹冨師鏉ュ氨鏄笉鍙互婊戝姩鐨勮瘽锛屼笉澶勭悊
+                    UserView.HomePage.Instance.ScrollEnabled = true;
+                }
+                Shared.Common.CommonPage.BackKeyCanClick = true;
+                if (this.oldPrigressVisible == true)
+                {
+                    //濡傛灉鍘熸潵鐨勮繘搴︽潯鏄彲瑙佺殑璇�,杩樺師鍥炲幓
+                    Common.CommonPage.Loading.Start(Common.CommonPage.Loading.Text);
+                }
+
                 bodyFrameLayout?.RemoveFromParent();
                 bodyFrameLayout = null;
                 btnText = null;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs
index 6b26088..99c76e4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs
@@ -84,6 +84,8 @@
                 txtCode.FoucsChanged += this.TxtCode_FoucsChangedEvent;
                 //鍊兼敼鍙樹簨浠�
                 txtCode.TextChangeEventHandler += this.TxtCode_TextChangeEvent;
+                //閿洏浜嬩欢
+                txtCode.KeyEventAction += this.TxtCode_KeyEvent;
             }
         }
 
@@ -172,6 +174,26 @@
             }
         }
 
+        /// <summary>
+        /// 閿洏浜嬩欢
+        /// </summary>
+        /// <param name="keysCode"></param>
+        private void TxtCode_KeyEvent(object sender, string keysCode)
+        {
+            if (keysCode == "Del")
+            {
+                var txtCode = (TextInputControl)sender;
+                if (txtCode.Text == string.Empty)
+                {
+                    int index = Convert.ToInt32(txtCode.Name);
+                    if (dicCodeControls.ContainsKey(index - 1) == true)
+                    {
+                        dicCodeControls[index - 1].Foucs = true;
+                    }
+                }
+            }
+        }
+
         #endregion
 
         #region 鈻� 涓�鑸柟娉昣__________________________
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
index 101b40e..8f57ed6 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
@@ -268,12 +268,7 @@
             {
                 i_width = Application.GetRealWidth(i_width);
             }
-            var btnContr = new NormalViewControl(i_width, false);
-            btnContr.X = this.Width - ControlCommonResourse.XXLeft - i_width - rightIconSize + RightOffset;
-            btnContr.Height = this.Height;
-            btnContr.TextAlignment = TextAlignment.CenterRight;
-            btnContr.TextColor = UserCenterColor.Current.TextGrayColor1;
-            btnContr.Text = i_text;
+            var btnContr = AddMostRightView(i_text, i_width, ControlCommonResourse.NormalControlHeight, false);
             this.AddChidren(btnContr, ChidrenBindMode.BindEventOnly);
             if (chidrenYaxis != 0)
             {
@@ -283,6 +278,31 @@
             return btnContr;
         }
 
+        /// <summary>
+        /// 娣诲姞鏈�鍙崇殑鏄剧ず鏂囨湰,姝ゆ柟娉曚笉浼氫富鍔ㄦ坊鍔犲埌鐖舵帶浠朵腑(濡傛灉鍙宠竟鏈夊浘鏍囩殑璇�,鍏堟坊鍔犲浘鏍囧悗,鍐嶆坊鍔犺繖涓枃鏈�)
+        /// </summary>
+        /// <param name="i_caption">鍐呭</param>
+        /// <param name="i_width">瀹藉害</param>
+        /// <param name="i_height">楂樺害</param>
+        /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
+        /// <returns></returns>
+        public NormalViewControl AddMostRightView(string i_text, int i_width, int i_height, bool real = true)
+        {
+            if (real == true)
+            {
+                i_width = Application.GetRealWidth(i_width);
+                i_height = Application.GetRealHeight(i_height);
+            }
+            var btnContr = new NormalViewControl(i_width, i_height, false);
+            btnContr.X = this.Width - ControlCommonResourse.XXLeft - i_width - rightIconSize + RightOffset;
+            btnContr.Height = this.Height;
+            btnContr.TextAlignment = TextAlignment.CenterRight;
+            btnContr.TextColor = UserCenterColor.Current.TextGrayColor1;
+            btnContr.Text = i_text;
+
+            return btnContr;
+        }
+
         #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs
index 0c90fa4..f0f6360 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs
@@ -112,6 +112,24 @@
             }
         }
 
+        /// <summary>
+        /// 閽堝搴曢儴鐐瑰嚮鎸夐挳,璋冩暣鎺т欢鐪熷疄楂樺害
+        /// </summary>
+        /// <param name="correctionsValue">Y杞磋ˉ姝e��(鐪熷疄鍊�,鍒楄〃鎺т欢涓嶅湪bodyFramelayout鐨勬椂鍊欎娇鐢�)</param>
+        public void AdjustRealHeightByBottomButton(int correctionsValue = 0)
+        {
+            var btnTemp = new BottomClickButton();
+            if (btnTemp.Yaxis >= this.frameTable.Height + correctionsValue)
+            {
+                //娌℃湁瓒呰繃
+                return;
+            }
+            //娣诲姞涓存椂鎺т欢,鐩磋嚦鍙互婊戝姩瓒呰繃搴曢儴鎸夐挳
+            var frameBackTemp = new FrameLayout();
+            frameBackTemp.Height = ControlCommonResourse.BodyFrameHeight - btnTemp.Yaxis + Application.GetRealHeight(23);
+            this.AddChidrenFrame(frameBackTemp);
+        }
+
         #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs
index 5dc08ac..ed9c5a9 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs
@@ -133,7 +133,8 @@
         /// 閽堝搴曢儴鐐瑰嚮鎸夐挳,璋冩暣鎺т欢鐪熷疄楂樺害
         /// </summary>
         /// <param name="bottomSpace">搴曢儴绌虹櫧闂磋窛(鐪熷疄鍊�,濡傛灉鍒楄〃鎺т欢鐪熷疄楂樺害娌℃湁瓒呰繃鏃�,浣跨敤姝ゅ��)</param>
-        public void AdjustRealHeightByBottomButton(int bottomSpace)
+        /// <param name="correctionsValue">Y杞磋ˉ姝e��(鐪熷疄鍊�,鍒楄〃鎺т欢涓嶅湪bodyFramelayout鐨勬椂鍊欎娇鐢�)</param>
+        public void AdjustRealHeightByBottomButton(int bottomSpace, int correctionsValue = 0)
         {
             if (this.ChildrenCount == 0)
             {
@@ -146,7 +147,7 @@
                 }
                 return;
             }
-            var realHeight = this.ChildrenCount * this.GetChildren(0).Height + this.Y;
+            var realHeight = this.ChildrenCount * this.GetChildren(0).Height + this.Y + correctionsValue;
             var btnTemp = new BottomClickButton();
             if (btnTemp.Yaxis >= realHeight)
             {
@@ -160,7 +161,7 @@
             //娣诲姞涓存椂鎺т欢,鐩磋嚦鍙互婊戝姩瓒呰繃搴曢儴鎸夐挳
             frameBackTemp?.RemoveFromParent();
             frameBackTemp = new FrameLayout();
-            frameBackTemp.Height = ControlCommonResourse.BodyFrameHeight - btnTemp.Y;
+            frameBackTemp.Height = ControlCommonResourse.BodyFrameHeight - btnTemp.Yaxis + bottomSpace;
             this.AddChidren(frameBackTemp);
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs
new file mode 100755
index 0000000..aa41b6f
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs
@@ -0,0 +1,41 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+    /// <summary>
+    /// 娑堟伅涓績鎺т欢
+    /// </summary>
+    public class MessageManagementControl : ButtonBase
+    {
+        /// <summary>
+        /// 娑堟伅涓績鎺т欢
+        /// </summary>
+        public MessageManagementControl()
+        {
+            this.Height = Application.GetMinRealAverage(69);
+            this.Width = Application.GetMinRealAverage(69);
+            this.UnSelectedImagePath = "Item/MessageManagement.png";
+            this.SelectedImagePath = "Item/MessageManagementSelected.png";
+            this.ButtonClickEvent += (sender, e) =>
+            {
+                this.IsSelected = false;
+
+                var form = new UserMain.MessageManagementForm();
+                form.AddForm();
+            };
+            //鍒锋柊鐘舵��
+            this.RefreshStatu();
+        }
+
+        /// <summary>
+        /// 鍒锋柊鐘舵��(涔熷氨鏄鏋滄暟鎹湁鏇存柊鐨勮瘽,浼氭樉绀虹孩鑹茶鏍�)
+        /// </summary>
+        public void RefreshStatu()
+        {
+            //鏆傛椂娴嬭瘯
+            this.IsSelected = true;
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/SelectDeviceForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/SelectDeviceForm.cs
index 9e242ab..f42aa76 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/SelectDeviceForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/SelectDeviceForm.cs
@@ -80,7 +80,7 @@
                     this.AddDeviceRow(i_listShowDevice[i], i_listSelectDevice, SelcetCancel, SelectOnlyOne, i != count);
                 }
                 //璋冩暣鍒楄〃鎺т欢鐨勯珮搴�
-                listView.AdjustRealHeight(Application.GetRealHeight(23));
+                listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(23), Application.GetRealHeight(6));
             });
 
             //瀹屾垚
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs
index 8b16438..516c345 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs
@@ -165,6 +165,12 @@
                 var byteData = System.Text.Encoding.UTF8.GetBytes(saveData);
                 string dir = System.IO.Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.SafeguardAlarmDirectory);
                 Global.WriteFileToDirectoryByBytes(dir, fileName, byteData);
+
+                if (UserCenterResourse.DicActionForm.ContainsKey("SafetyManagementMainForm") == true)
+                {
+                    var form = (Phone.UserCenter.Safety.SafetyManagementMainForm)UserCenterResourse.DicActionForm["SafetyManagementMainForm"];
+                    form?.AddSafeguardLogPushRow(device);
+                }
                 return true;
             }
         }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
index af1fb24..30d17aa 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
@@ -58,15 +58,15 @@
                 return 0;
             }
 
-            //寮�鍚繘搴︽潯
-            ProgressBar.SetMaxValue(listEditor.Count + listDelete.Count);
-            ProgressBar.Show();
+            //寮�鍚繘搴︽潯 姝e湪涓婁紶澶囦唤鏂囦欢
+            ProgressFormBar.Current.Start();
+            ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uBackupFileUploading));
 
             //涓婁紶鏂囦欢鍒颁簯绔�
             bool result = await UpLoadBackupFileToDB(listEditor);
             if (result == false)
             {
-                ProgressBar.Close();
+                ProgressFormBar.Current.Close();
                 return -1;
             }
 
@@ -74,11 +74,11 @@
             result = await DoDeleteFileFromDB(listDelete);
             if (result == false)
             {
-                ProgressBar.Close();
+                ProgressFormBar.Current.Close();
                 return -1;
             }
 
-            ProgressBar.Close();
+            ProgressFormBar.Current.Close();
 
             return 1;
         }
@@ -90,9 +90,11 @@
         /// <returns></returns>
         private async static Task<bool> UpLoadBackupFileToDB(List<string> listFile)
         {
+            int listFileCount = listFile.Count;
             string backUpDir = System.IO.Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupDirectory);
-            foreach (string file in listFile)
+            for (int i = 0; i < listFile.Count; i++)
             {
+                string file = listFile[i];
                 var datainfo = new FileInfoData();
                 datainfo.BackupFileName = file;
                 datainfo.BackupFileContent = ReadDirctoryFileByName(backUpDir, file);
@@ -110,7 +112,7 @@
                     return false;
                 }
                 //璁剧疆杩涘害鍊�
-                ProgressBar.SetValue(list.Count);
+                ProgressFormBar.Current.SetValue(i + 1, listFileCount);
             }
             return true;
         }
@@ -371,8 +373,9 @@
             //鑷姩澶囦唤鍙湁涓�涓�
             string backId = data[0].Id;
 
-            //寮哄埗鎸囧畾鏂囨湰闄勫姞淇℃伅锛氳处鍙锋暟鎹悓姝ヤ腑
-            ProgressBar.SetAppendText(Language.StringByID(R.MyInternationalizationString.uAccountDataIsSynchronizing));
+            //璐﹀彿鏁版嵁鍚屾涓�
+            ProgressFormBar.Current.Start();
+            ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uAccountDataIsSynchronizing));
 
             //浠庝簯绔幏鍙栧浠界殑鏂囦欢锛岀劧鍚庡瓨鍏ユ湰鍦版寚瀹氱殑涓存椂鏂囦欢澶�
             string tempDir = await HdlBackupLogic.Current.GetBackFileFromDBAndSetToLocation(backId);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
index 8fd93bc..cb7d026 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
@@ -89,7 +89,7 @@
         }
 
         /// <summary>
-        /// <para>浠庝簯绔幏鍙栧浠界殑鏂囦欢锛岀劧鍚庡瓨鍏ユ湰鍦版寚瀹氱殑涓存椂鏂囦欢澶�(鍑芥暟鍐呴儴鏈夎繘搴︽潯)</para>
+        /// <para>浠庝簯绔幏鍙栧浠界殑鏂囦欢锛岀劧鍚庡瓨鍏ユ湰鍦版寚瀹氱殑涓存椂鏂囦欢澶�</para>
         /// <para>杩斿洖鏂囦欢澶瑰悕瀛�(閲岄潰瀛樻斁鐫�鍏ㄩ儴鐨勬枃浠�),杩斿洖null鏃讹紝浠h〃澶辫触</para>
         /// </summary>
         /// <param name="BackupClassId">BackupClassId</param>
@@ -106,22 +106,17 @@
             string newDir = System.IO.Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadBackupTempDirectory);
             Global.CreateEmptyDirectory(newDir, true);
 
-            //寮�鍚繘搴︽潯
-            ProgressBar.Show();
-
             //鑾峰彇杩欎釜澶囦唤涓嬮潰鏈夊灏戜釜鏂囦欢
             List<string> listFile = await GetBackFileIDFromDB(BackupClassId, IsGatewayAutoBackup, ZigbeeUniqueId);
             if (listFile == null)
             {
                 //鍏抽棴杩涘害鏉�
-                ProgressBar.Close();
+                ProgressFormBar.Current.Close();
                 //鍏佽鎸夌郴缁熺殑杩斿洖閿�
                 Shared.Common.CommonPage.BackKeyCanClick = true;
                 UserCenterResourse.Option.AppCanSignout = true;
                 return null;
             }
-            //璁剧疆鏈�澶у��
-            ProgressBar.SetMaxValue(listFile.Count);
 
             var pra = new LoadBackInfoPra();
             pra.BackupClassId = BackupClassId;
@@ -131,13 +126,15 @@
             pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
             //涓�涓釜鐨勪笅杞芥枃浠�
-            foreach (string fileName in listFile)
+            int listFileCount = listFile.Count;
+            for (int i = 0; i < listFile.Count; i++)
             {
+                string fileName = listFile[i];
                 //璐﹀彿宸茬粡閫�鍑�
                 if (HdlCheckLogic.Current.IsAccountLoginOut() == true)
                 {
                     //鍏抽棴杩涘害鏉�
-                    ProgressBar.Close(true);
+                    ProgressFormBar.Current.Close();
                     //鍏佽鎸夌郴缁熺殑杩斿洖閿�
                     Shared.Common.CommonPage.BackKeyCanClick = true;
                     UserCenterResourse.Option.AppCanSignout = true;
@@ -150,7 +147,7 @@
                 if (result == null)
                 {
                     //鍏抽棴杩涘害鏉�
-                    ProgressBar.Close();
+                    ProgressFormBar.Current.Close();
                     //鍏佽鎸夌郴缁熺殑杩斿洖閿�
                     Shared.Common.CommonPage.BackKeyCanClick = true;
                     UserCenterResourse.Option.AppCanSignout = true;
@@ -159,10 +156,10 @@
                 //灏嗚緭鍏ュ啓鍏ユ湰鍦扮殑涓存椂鏂囦欢澶�
                 Global.WriteFileToDirectoryByBytes(newDir, fileName, result);
                 //璁剧疆杩涘害鍊�
-                ProgressBar.SetValue(1);
+                ProgressFormBar.Current.SetValue(i + 1, listFileCount);
             }
             //鍏抽棴杩涘害鏉�
-            ProgressBar.Close();
+            ProgressFormBar.Current.Close();
             //鍏佽鎸夌郴缁熺殑杩斿洖閿�
             Shared.Common.CommonPage.BackKeyCanClick = true;
             UserCenterResourse.Option.AppCanSignout = true;
@@ -245,9 +242,9 @@
         /// <param name="BackupClassId">澶囦唤涓婚敭ID</param>
         /// <param name="ManualBackupType">鎵嬪姩澶囦唤绫诲瀷(0:App鎵嬪姩澶囦唤,2锛氱綉鍏虫墜鍔ㄥ浠�)</param>
         /// <param name="upPath">鎸囧畾涓婁紶鐨勬槸鍝釜鏂囦欢澶圭殑鏂囦欢(鍏ㄨ矾寰�),涓嶆寚瀹氭椂锛屼笂浼犵殑鏄湰鍦拌矾寰勪笅鐨勬枃浠�</param>
-        /// <param name="setBarMaxValue">鏄惁璁剧疆杩涘害鏉$殑鏈�澶у��(杩欎釜涓滆タ涓�鑸笉鐢ㄥ姩瀹�)</param>
+        /// <param name="showBar">鏄惁璁剧疆鏄剧ず杩涘害鏉�</param>
         /// <returns></returns>
-        public async Task<bool> UpLoadBackupFileToDB(string BackupClassId, int ManualBackupType = 0, string upPath = "", bool setBarMaxValue = true)
+        public async Task<bool> UpLoadBackupFileToDB(string BackupClassId, int ManualBackupType = 0, string upPath = "", bool showBar = true)
         {
             List<string> listAllFile = null;
             //鏂囦欢澶圭殑鍏ㄨ矾寰�
@@ -285,10 +282,12 @@
             }
 
             //寮�鍚繘搴︽潯
-            if (setBarMaxValue == true)
+            int listFileCount = listAllFile.Count;
+            if (showBar == true)
             {
-                ProgressBar.SetMaxValue(listAllFile.Count);
-                ProgressBar.Show();
+                //寮�鍚繘搴︽潯 姝e湪涓婁紶澶囦唤鏂囦欢
+                ProgressFormBar.Current.Start();
+                ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uBackupFileUploading));
             }
 
             //涓嶅厑璁告寜绯荤粺鐨勮繑鍥為敭
@@ -297,13 +296,14 @@
 
             //浣犺涓轰粈涔堣繖閲屼笉鍒嗕竴涓嚱鏁板嚭鏉ワ紙鐞嗚涓婃槸鍒嗗嚱鏁板嚭鏉ョ殑锛�
             //鏄洜涓哄鏋滃垎鍑芥暟鐨勮瘽锛屼細鍑虹幇鍙岄噸寮傛锛屽鑷翠富绾跨▼鐨勮繘搴︽潯鐨勭櫨鍒嗘瘮姘歌繙瀹氭0%
-            foreach (string file in listNormalFile)
+            for (int i = 0; i < listNormalFile.Count; i++)
             {
+                string file = listNormalFile[i];
                 //璐﹀彿宸茬粡閫�鍑�
                 if (HdlCheckLogic.Current.IsAccountLoginOut() == true)
                 {
                     //鍏抽棴杩涘害鏉�
-                    ProgressBar.Close(true);
+                    ProgressFormBar.Current.Close();
                     //鍏佽鎸夌郴缁熺殑杩斿洖閿�
                     Shared.Common.CommonPage.BackKeyCanClick = true;
                     UserCenterResourse.Option.AppCanSignout = true;
@@ -328,23 +328,24 @@
                 if (falge == false)
                 {
                     //鍏抽棴杩涘害鏉�
-                    ProgressBar.Close();
+                    ProgressFormBar.Current.Close();
                     //鍏佽鎸夌郴缁熺殑杩斿洖閿�
                     Shared.Common.CommonPage.BackKeyCanClick = true;
                     UserCenterResourse.Option.AppCanSignout = true;
                     return false;
                 }
                 //璁剧疆杩涘害鍊�
-                ProgressBar.SetValue(list.Count);
+                ProgressFormBar.Current.SetValue(i + 1, listFileCount);
             }
 
-            foreach (string file in listPicFile)
+            for (int i = 0; i < listPicFile.Count; i++)
             {
+                string file = listPicFile[i];
                 //璐﹀彿宸茬粡閫�鍑�
                 if (HdlCheckLogic.Current.IsAccountLoginOut() == true)
                 {
                     //鍏抽棴杩涘害鏉�
-                    ProgressBar.Close(true);
+                    ProgressFormBar.Current.Close();
                     //鍏佽鎸夌郴缁熺殑杩斿洖閿�
                     Shared.Common.CommonPage.BackKeyCanClick = true;
                     UserCenterResourse.Option.AppCanSignout = true;
@@ -359,14 +360,14 @@
                 if (result == false)
                 {
                     //鍏抽棴杩涘害鏉�
-                    ProgressBar.Close();
+                    ProgressFormBar.Current.Close();
                     //鍏佽鎸夌郴缁熺殑杩斿洖閿�
                     Shared.Common.CommonPage.BackKeyCanClick = true;
                     UserCenterResourse.Option.AppCanSignout = true;
                     return false;
                 }
                 //璁剧疆杩涘害鍊�
-                ProgressBar.SetValue(listPic.Count);
+                ProgressFormBar.Current.SetValue(i + 1 + listNormalFile.Count, listFileCount);
             }
 
             //涓婁紶Log澶囦唤
@@ -377,7 +378,7 @@
             }
 
             //杩涘害鏉″叧闂�
-            ProgressBar.Close();
+            ProgressFormBar.Current.Close();
             //鍏佽鎸夌郴缁熺殑杩斿洖閿�
             Shared.Common.CommonPage.BackKeyCanClick = true;
             UserCenterResourse.Option.AppCanSignout = true;
@@ -612,12 +613,20 @@
         /// <param name="BackupClassId"></param>
         public async Task<bool> LoadAppBackupInfo(string BackupClassId)
         {
+            //鎵撳紑杩涘害鏉� 姝e湪鑾峰彇澶囦唤鏂囦欢鍒楄〃
+            ProgressFormBar.Current.Start();
+            ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uBackupFileListGetting));
+
             //浠庝簯绔幏鍙栧浠界殑鏂囦欢锛岀劧鍚庡瓨鍏ユ湰鍦扮殑涓存椂鏂囦欢澶�
             string tempDirectory = await GetBackFileFromDBAndSetToLocation(BackupClassId);
             if (tempDirectory == null)
             {
+                //鍏抽棴杩涘害鏉�
+                ProgressFormBar.Current.Close();
                 return false;
             }
+            //鍏抽棴杩涘害鏉�
+            ProgressFormBar.Current.Close();
 
             //濡傛灉璇诲彇鍒扮殑鏂囦欢瀹屽叏娌℃湁闂锛屽垯娓呯悊鏈湴鐨勬枃浠�
             UserCenterLogic.DeleteAllLocationFile(false);
@@ -632,30 +641,6 @@
             UserCenterLogic.RefreshAllMemory();
 
             return true;
-        }
-
-        /// <summary>
-        /// 璇诲彇缃戝叧澶囦唤鏂囨。(鍑芥暟鍐呴儴鏈夎繘搴︽潯)
-        /// </summary>
-        /// <param name="BackupClassId"></param>
-        /// <param name="zbGateway">缃戝叧瀵硅薄(璇蜂紶鍏ョ湡瀹炵墿鐞嗙綉鍏冲璞�)</param>
-        /// <param name="listGatewayFile">缃戝叧鐜版湁鐨勬枃浠跺悕</param>
-        public async Task<bool> LoadGatewayBackupInfo(string BackupClassId, ZigBee.Device.ZbGateway zbGateway, List<string> listGatewayFile)
-        {
-            //娣诲姞闄勫姞鎯呮姤:鑾峰彇澶囦唤鏁版嵁
-            ProgressBar.SetAppendText(Language.StringByID(R.MyInternationalizationString.uGetBackupData));
-            //浠庝簯绔幏鍙栧浠界殑鏂囦欢锛岀劧鍚庡瓨鍏ユ湰鍦扮殑涓存椂鏂囦欢澶�
-            string tempDirectory = await GetBackFileFromDBAndSetToLocation(BackupClassId, false, HdlGatewayLogic.Current.GetGatewayId(zbGateway));
-            //娓呯┖闄勫姞鎯呮姤
-            ProgressBar.SetAppendText(string.Empty);
-
-            if (tempDirectory == null)
-            {
-                return false;
-            }
-
-            //鎭㈠缃戝叧閰嶇疆
-            return await HdlGatewayLogic.Current.RecoverGatewaySettion(zbGateway, listGatewayFile, tempDirectory);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayBackupLogic.cs
index b641687..e07d3bc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayBackupLogic.cs
@@ -104,7 +104,7 @@
         /// <returns></returns>
         private bool SaveNVFile(ZbGateway realGateway)
         {
-            //姝e湪淇濆瓨鍗忚皟鍣╪v鍒嗗尯缁勭綉淇℃伅
+            //姝e湪淇濆瓨鍗忚皟鍣╪v鍒嗗尯淇℃伅
             ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uGatewayNVFileSaving));
             ProgressFormBar.Current.SetValue(0);
             System.Threading.Thread.Sleep(1000);
@@ -131,7 +131,7 @@
             {
                 System.Threading.Thread.Sleep(1000);
                 TimeOut++;
-                ProgressFormBar.Current.SetValue2(TimeOut, 60);
+                ProgressFormBar.Current.SetValue(TimeOut, 60);
             }
             realGateway.Actions -= action;
             if (result != 0)
@@ -183,7 +183,7 @@
             int TimeOut = 0;
             while (result == -1 && TimeOut < 30)
             {
-                System.Threading.Thread.Sleep(100);
+                System.Threading.Thread.Sleep(1000);
                 TimeOut++;
             }
             realGateway.Actions -= action;
@@ -267,7 +267,7 @@
                     }
                     //璁剧疆杩涘害鐧惧垎姣�
                     var persent = Convert.ToInt32(jobject["Data"]["BackupPercent"].ToString());
-                    ProgressFormBar.Current.SetValue2(persent, 100);
+                    ProgressFormBar.Current.SetValue(persent, 100);
                 }
             };
             realGateway.Actions += action;
@@ -313,6 +313,394 @@
 
         #endregion
 
+        #region 鈻� 缃戝叧杩樺師___________________________
+
+        /// <summary>
+        /// 鎵ц缃戝叧杩樺師鎿嶄綔
+        /// </summary>
+        /// <param name="realGateway">鐪熷疄鐗╃悊缃戝叧瀵硅薄</param>
+        /// <param name="backupId">澶囦唤涓婚敭</param>
+        public bool RecoverGateway(ZbGateway realGateway, string backupId)
+        {
+            //灞曞紑杩涘害鏉�
+            ProgressFormBar.Current.Start();
+            //浠庝簯绔幏鍙栧浠芥枃浠跺垪琛�
+            var result = this.GetGatewayFileList(realGateway, backupId);
+            if (result == false)
+            {
+                //鍏抽棴杩涘害鏉�
+                ProgressFormBar.Current.Close();
+                return false;
+            }
+
+            //浠庝簯绔笅杞藉浠芥枃浠�
+            result = this.DownloadGatewayFile(realGateway, backupId);
+            if (result == false)
+            {
+                //鍏抽棴杩涘害鏉�
+                ProgressFormBar.Current.Close();
+                return false;
+            }
+
+            //鎭㈠鍗忚皟鍣╪v鍒嗗尯鐨勭粍缃戜俊鎭�
+            result = this.RestoreGatewayNV(realGateway);
+            if (result == false)
+            {
+                //鍏抽棴杩涘害鏉�
+                ProgressFormBar.Current.Close();
+                return false;
+            }
+
+            //鎵撳紑鍗忚皟鍣ㄤ覆鍙e彂閫佸姛鑳�
+            result = this.OpenZbMsComSend(realGateway);
+            if (result == false)
+            {
+                //鍏抽棴杩涘害鏉�
+                ProgressFormBar.Current.Close();
+                return false;
+            }
+
+            //閲嶅惎缃戝叧绯荤粺
+            result = this.GatewayReboot(realGateway);
+            //鍏抽棴杩涘害鏉�
+            ProgressFormBar.Current.Close();
+            return result;
+        }
+
+        #endregion
+
+        #region 鈻� 浠庝簯绔幏鍙栧浠芥枃浠跺垪琛╛____________
+
+        /// <summary>
+        /// 浠庝簯绔幏鍙栧浠芥枃浠跺垪琛�
+        /// </summary>
+        /// <param name="realGateway"></param>
+        /// <param name="backupClassId"></param>
+        /// <returns></returns>
+        private bool GetGatewayFileList(ZbGateway realGateway, string backupClassId)
+        {
+            //姝e湪鑾峰彇澶囦唤鏂囦欢鍒楄〃
+            ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uBackupFileListGetting));
+            ProgressFormBar.Current.SetValue(0);
+            System.Threading.Thread.Sleep(1000);
+
+            int result = -1;
+            Action<string, string> action = (topic, message) =>
+            {
+                var gatewayID = topic.Split('/')[0];
+                if (topic == gatewayID + "/GetDataFileList_Respon")
+                {
+                    var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
+                    result = Convert.ToInt32(jobject["Data"]["Status"].ToString());
+                    if (result != 0)
+                    {
+                        //鑾峰彇澶囦唤鏂囦欢鍒楄〃澶辫触
+                        this.ShowErrorMsg(Language.StringByID(R.MyInternationalizationString.uGetBackupFileListFail));
+                        return;
+                    }
+                }
+            };
+            realGateway.Actions += action;
+
+            //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮�
+            string fullUrl = string.Empty;
+            var connectMode = UserCenterLogic.GetHttpConnectMode(true);
+            if (connectMode == HttpConnectMode.Normal)
+            {
+                //鏅�氳闂�
+                fullUrl = $"{Common.CommonPage.RequestHttpsHost}/{"App/GetHomeDataBackupUploadListPagger"}";
+            }
+            else if (connectMode == HttpConnectMode.Admin)
+            {
+                //浠ョ鐞嗗憳鐨勮韩浠借闂紝鑷韩鏄垚鍛�
+                fullUrl = $"{Common.Config.Instance.AdminRequestBaseUrl}/{"App/GetHomeDataBackupUploadListPagger"}";
+            }
+
+            var jObject = new Newtonsoft.Json.Linq.JObject { { "Cluster_ID", 0 }, { "Command", 6202 } };
+            var data = new Newtonsoft.Json.Linq.JObject {
+                { "url", fullUrl }, { "RequestVersion", Common.CommonPage.RequestVersion },
+                { "LoginAccessToken", UserCenterLogic.GetConnectMainToken() }, { "IsGatewayAutoBackup", 0 },
+                { "BackupClassId", backupClassId },{ "GatewayUniqueId",HdlGatewayLogic.Current.GetGatewayId(realGateway)},
+                { "IsOtherAccountCtrl",connectMode == HttpConnectMode.Admin?1:0}
+            };
+            jObject.Add("Data", data);
+            realGateway.Send("GetDataFileList", jObject.ToString());
+
+            int timeOut = 0;
+            while (result == -1 && timeOut < 30)
+            {
+                System.Threading.Thread.Sleep(1000);
+                timeOut++;
+            }
+            realGateway.Actions -= action;
+            if (result != 0)
+            {
+                string msg = Language.StringByID(R.MyInternationalizationString.uGetBackupFileListFail);
+                if (result == -1)
+                {
+                    //鍝嶅簲瓒呮椂,鑾峰彇澶囦唤鏂囦欢鍒楄〃澶辫触
+                    msg = Language.StringByID(R.MyInternationalizationString.uResponseTimeoutsAndGetBackupFileListFail);
+                }
+                this.ShowErrorMsg(msg);
+                return false;
+            }
+            return true;
+        }
+
+        #endregion
+
+        #region 鈻� 浠庝簯绔笅杞藉浠芥枃浠禵________________
+
+        /// <summary>
+        /// 浠庝簯绔笅杞藉浠芥枃浠�
+        /// </summary>
+        /// <param name="realGateway"></param>
+        /// <param name="backupClassId"></param>
+        /// <returns></returns>
+        private bool DownloadGatewayFile(ZbGateway realGateway, string backupClassId)
+        {
+            //姝e湪涓嬭浇澶囦唤鏂囦欢
+            ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uBackupFileDownloading));
+            ProgressFormBar.Current.SetValue(0);
+            System.Threading.Thread.Sleep(1000);
+
+            bool threadAction = true;
+            bool success = false;
+            int timeOut = 0;
+            Action<string, string> action = (topic, message) =>
+            {
+                var gatewayID = topic.Split('/')[0];
+                if (topic == gatewayID + "/RestoreDataFileProgress_Respon")
+                {
+                    var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
+                    var result = Convert.ToInt32(jobject["Data"]["Status"].ToString());
+                    if (result == 1 || result == 3)
+                    {
+                        //涓嬭浇澶囦唤鏂囦欢澶辫触
+                        this.ShowErrorMsg(Language.StringByID(R.MyInternationalizationString.uDownloadBackupFileFail));
+                        threadAction = false;
+                        return;
+                    }
+                    else if (result == 2)
+                    {
+                        //涓嬭浇鎴愬姛
+                        success = true;
+                        threadAction = false;
+                        return;
+                    }
+                    else if (result == 0)
+                    {
+                        //鍒锋柊绛夊緟鏃堕棿
+                        timeOut = 0;
+                        //璁剧疆杩涘害鐧惧垎姣�
+                        var persent = Convert.ToInt32(jobject["Data"]["RestoreDataPercent"].ToString());
+                        ProgressFormBar.Current.SetValue(persent, 100);
+                    }
+                }
+            };
+            realGateway.Actions += action;
+
+            //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮�
+            string fullUrl = string.Empty;
+            var connectMode = UserCenterLogic.GetHttpConnectMode(true);
+            if (connectMode == HttpConnectMode.Normal)
+            {
+                //鏅�氳闂�
+                fullUrl = $"{Common.CommonPage.RequestHttpsHost}/{"App/DownloadSomeDataBackup"}";
+            }
+            else if (connectMode == HttpConnectMode.Admin)
+            {
+                //浠ョ鐞嗗憳鐨勮韩浠借闂紝鑷韩鏄垚鍛�
+                fullUrl = $"{Common.Config.Instance.AdminRequestBaseUrl}/{"App/DownloadSomeDataBackup"}";
+            }
+
+            var jObject = new Newtonsoft.Json.Linq.JObject { { "Cluster_ID", 0 }, { "Command", 6203 } };
+            var data = new Newtonsoft.Json.Linq.JObject {
+                { "url", fullUrl }, { "RequestVersion", Common.CommonPage.RequestVersion },
+                { "LoginAccessToken", UserCenterLogic.GetConnectMainToken() }, { "IsGatewayAutoBackup", 0 },
+                { "BackupClassId", backupClassId },{ "GatewayUniqueId",HdlGatewayLogic.Current.GetGatewayId(realGateway)},
+                { "IsOtherAccountCtrl",connectMode == HttpConnectMode.Admin?1:0}
+            };
+            jObject.Add("Data", data);
+            realGateway.Send("GetDataFileList", jObject.ToString());
+
+            while (threadAction == true && timeOut < 30)
+            {
+                System.Threading.Thread.Sleep(1000);
+                timeOut++;
+            }
+            realGateway.Actions -= action;
+            if (timeOut >= 30)
+            {
+                //鍝嶅簲瓒呮椂,涓嬭浇澶囦唤鏂囦欢澶辫触
+                string msg = Language.StringByID(R.MyInternationalizationString.uResponseTimeoutsAndDownloadBackupFileFail);
+                this.ShowErrorMsg(msg);
+                return false;
+            }
+            return success;
+        }
+
+        #endregion
+
+        #region 鈻� 鎭㈠鍗忚皟鍣╪v鍒嗗尯鐨勭粍缃戜俊鎭痏________
+
+        /// <summary>
+        /// 鎭㈠鍗忚皟鍣╪v鍒嗗尯鐨勭粍缃戜俊鎭�
+        /// </summary>
+        /// <param name="realGateway"></param>
+        /// <returns></returns>
+        private bool RestoreGatewayNV(ZbGateway realGateway)
+        {
+            //姝e湪鎭㈠鍗忚皟鍣╪v鍒嗗尯
+            ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uGatewayNVRestoring));
+            ProgressFormBar.Current.SetValue(0);
+            System.Threading.Thread.Sleep(1000);
+
+            int result = -1;
+            Action<string, string> action = (topic, message) =>
+            {
+                var gatewayID = topic.Split('/')[0];
+                if (topic == gatewayID + "/" + "ZbGwOperation/RestoreNV_Respon")
+                {
+                    var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
+                    result = Convert.ToInt32(jobject["Data"]["Flag"].ToString());
+                }
+            };
+            realGateway.Actions += action;
+
+            var jObject = new Newtonsoft.Json.Linq.JObject { { "Cluster_ID", 0 }, { "Command", 501 } };
+            var data = new Newtonsoft.Json.Linq.JObject { { "ImageName", "NVImage.bin" }, { "ImagePath", "/etc/hdlDat/" } };
+            jObject.Add("Data", data);
+            realGateway.Send("ZbGwOperation/RestoreNV", jObject.ToString());
+
+            int TimeOut = 0;
+            while (result == -1 && TimeOut < 60)
+            {
+                System.Threading.Thread.Sleep(1000);
+                TimeOut++;
+                ProgressFormBar.Current.SetValue(TimeOut, 60);
+            }
+            realGateway.Actions -= action;
+            if (result != 0)
+            {
+                //鎭㈠鍗忚皟鍣╪v鍒嗗尯澶辫触
+                string msg = Language.StringByID(R.MyInternationalizationString.uRestoreGatewayNVFail);
+                if (result == -1)
+                {
+                    //鍝嶅簲瓒呮椂,鎭㈠鍗忚皟鍣╪v鍒嗗尯澶辫触
+                    msg = Language.StringByID(R.MyInternationalizationString.uResponseTimeoutsAndRestoreGatewayNVFail);
+                }
+                this.ShowErrorMsg(msg);
+                return false;
+            }
+
+            return true;
+        }
+
+        #endregion
+
+        #region 鈻� 閲嶅惎缃戝叧绯荤粺_______________________
+
+        /// <summary>
+        /// 閲嶅惎缃戝叧绯荤粺
+        /// </summary>
+        /// <param name="realGateway"></param>
+        /// <returns></returns>
+        private bool GatewayReboot(ZbGateway realGateway)
+        {
+            //姝e湪閲嶅惎缃戝叧绯荤粺
+            ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uGatewayRerooting));
+            ProgressFormBar.Current.SetValue(0);
+            System.Threading.Thread.Sleep(1000);
+
+            int result = -1;
+            Action<string, string> action = (topic, message) =>
+            {
+                var gatewayID = topic.Split('/')[0];
+                if (topic == gatewayID + "/" + "GwReboot_Respon")
+                {
+                    var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
+                    result = Convert.ToInt32(jobject["Data"]["Result"].ToString());
+                }
+            };
+            realGateway.Actions += action;
+
+            var jObject = new Newtonsoft.Json.Linq.JObject { { "Cluster_ID", 0 }, { "Command", 83 } };
+            realGateway.Send("GwReboot", jObject.ToString());
+
+            int timeOut = 0;
+            while (result == -1 && timeOut < 30)
+            {
+                System.Threading.Thread.Sleep(1000);
+                timeOut++;
+            }
+            realGateway.Actions -= action;
+            if (result != 0)
+            {
+                //閲嶅惎缃戝叧绯荤粺澶辫触
+                string msg = Language.StringByID(R.MyInternationalizationString.uGatewayRerootFail);
+                if (result == -1)
+                {
+                    msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, null, "鍥炲瓒呮椂");
+                }
+                this.ShowErrorMsg(msg);
+                return false;
+            }
+
+            //缃戝叧宸茬粡鎺ユ敹鍒伴噸鍚懡浠�,鎺ヤ笅鏉ュ幓鍒ゆ柇缃戝叧鏄惁閲嶅惎瀹屾垚
+            bool gatewatAction = false;
+            bool threadAction = true;
+            HdlThreadLogic.Current.RunThread(async () =>
+            {
+                timeOut = 0;
+                while (gatewatAction == false)
+                {
+                    //澶ф缃戝叧閲嶅惎瑕�60绉�
+                    if (timeOut >= 65 && timeOut % 5 == 0)
+                    {
+                        //5绉掍竴娆�,鍘昏幏鍙栫増鏈�
+                        var data = await HdlGatewayLogic.Current.GetGatewayNewInfoAsync(realGateway, ShowErrorMode.NO);
+                        if (data != null)
+                        {
+                            gatewatAction = true;
+                            threadAction = false;
+                            break;
+                        }
+                    }
+                    await System.Threading.Tasks.Task.Delay(1000);
+                    timeOut++;
+                    //璁剧疆杩涘害鍊�
+                    ProgressFormBar.Current.SetValue(timeOut, 180);
+                    if (timeOut >= 180)
+                    {
+                        //180绉掕繕绛変笉鍒扮殑璇濓紝缃戝叧搴旇鍑洪棶棰樹簡
+                        threadAction = false;
+                        break;
+                    }
+                }
+            });
+            while (threadAction == true)
+            {
+                System.Threading.Thread.Sleep(4000);
+            }
+            if (gatewatAction == true)
+            {
+                //缃戝叧鏁版嵁鎭㈠鎴愬姛!
+                string msg = Language.StringByID(R.MyInternationalizationString.uRestoreGatewayDataSuccess);
+                this.ShowTipMsg(msg);
+                return true;
+            }
+            else
+            {
+                //鍝嶅簲瓒呮椂,閲嶅惎缃戝叧绯荤粺澶辫触
+                string msg = Language.StringByID(R.MyInternationalizationString.uResponseTimeoutsAndGatewayRerootFail);
+                this.ShowErrorMsg(msg);
+                return false;
+            }
+        }
+
+        #endregion
+
         #region 鈻� 涓�鑸柟娉昣__________________________
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
index 168cc2b..e5d7071 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -1043,14 +1043,14 @@
                 this.ShowTipMsg(Language.StringByID(R.MyInternationalizationString.uErrorGatewayLostMsg));
                 return -1;
             }
-            ChannelIdInfo data = null;
+            int data = -1;
             Action<string, string> action = (topic, message) =>
             {
                 var gatewayID = topic.Split('/')[0];
                 if (topic == gatewayID + "/" + "ZbGw/GetChannel_Respon")
                 {
                     var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
-                    data = Newtonsoft.Json.JsonConvert.DeserializeObject<ChannelIdInfo>(jobject["Data"].ToString());
+                    data = Convert.ToInt32(jobject["Data"]["Channel"].ToString());
                 }
             };
             realWay.Actions += action;
@@ -1059,34 +1059,22 @@
             realWay.Send("ZbGw/GetChannel", jObject.ToString());
 
             int TimeOut = 0;
-            while (data == null && TimeOut < 30)
+            while (data == -1 && TimeOut < 30)
             {
                 System.Threading.Thread.Sleep(100);
                 TimeOut++;
             }
 
             realWay.Actions -= action;
-            if (data == null)
+            if (data == -1)
             {
                 //鑾峰彇鍗忚皟鍣ㄤ俊閬撳け璐�
                 string msg = Language.StringByID(R.MyInternationalizationString.uGetGatewayChannelIdFail);
                 msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, null, "鍥炲瓒呮椂");
                 this.ShowTipMsg(msg);
-                return -1;
             }
 
-            return data.Channel;
-        }
-
-        /// <summary>
-        /// 缃戝叧淇¢亾淇℃伅
-        /// </summary>
-        private class ChannelIdInfo
-        {
-            /// <summary>
-            /// 缃戝叧淇¢亾
-            /// </summary>
-            public int Channel = -1;
+            return data;
         }
 
         #endregion
@@ -1107,14 +1095,14 @@
                 this.ShowTipMsg(Language.StringByID(R.MyInternationalizationString.uErrorGatewayLostMsg));
                 return null;
             }
-            CoordinatorMacInfo data = null;
+            string data = null;
             Action<string, string> action = (topic, message) =>
             {
                 var gatewayID = topic.Split('/')[0];
                 if (topic == gatewayID + "/" + "ZbGw/GetMac_Respon")
                 {
                     var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
-                    data = Newtonsoft.Json.JsonConvert.DeserializeObject<CoordinatorMacInfo>(jobject["Data"].ToString());
+                    data = jobject["Data"]["MacAddr"].ToString();
                 }
             };
             realWay.Actions += action;
@@ -1136,21 +1124,9 @@
                 string msg = Language.StringByID(R.MyInternationalizationString.uGetGatewayCoordinatorMacFail);
                 msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, null, "鍥炲瓒呮椂");
                 this.ShowTipMsg(msg);
-                return null;
             }
 
-            return data.MacAddr;
-        }
-
-        /// <summary>
-        /// 缃戝叧鍗忚皟鍣∕ac淇℃伅
-        /// </summary>
-        private class CoordinatorMacInfo
-        {
-            /// <summary>
-            /// 璋冨櫒Mac
-            /// </summary>
-            public string MacAddr = string.Empty;
+            return data;
         }
 
         #endregion
@@ -1171,14 +1147,14 @@
                 this.ShowTipMsg(Language.StringByID(R.MyInternationalizationString.uErrorGatewayLostMsg));
                 return -1;
             }
-            PanIdInfo data = null;
+            int panId = -1;
             Action<string, string> action = (topic, message) =>
             {
                 var gatewayID = topic.Split('/')[0];
                 if (topic == gatewayID + "/" + "ZbGw/GetPanId_Respon")
                 {
                     var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
-                    data = Newtonsoft.Json.JsonConvert.DeserializeObject<PanIdInfo>(jobject["Data"].ToString());
+                    panId = Convert.ToInt32(jobject["Data"]["PANID"].ToString());
                 }
             };
             realWay.Actions += action;
@@ -1187,34 +1163,128 @@
             realWay.Send("ZbGw/GetPanId", jObject.ToString());
 
             int TimeOut = 0;
-            while (data == null && TimeOut < 30)
+            while (panId == -1 && TimeOut < 30)
             {
                 System.Threading.Thread.Sleep(100);
                 TimeOut++;
             }
 
             realWay.Actions -= action;
-            if (data == null)
+            if (panId == -1)
             {
                 //鑾峰彇鍗忚皟鍣≒anID澶辫触
                 string msg = Language.StringByID(R.MyInternationalizationString.uGetGatewayPanIDFail);
                 msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, null, "鍥炲瓒呮椂");
                 this.ShowTipMsg(msg);
-                return -1;
             }
 
-            return data.PANID;
+            return panId;
+        }
+
+        #endregion
+
+        #region 鈻� 缃戝叧鑷姩澶囦唤璁剧疆___________________
+
+        /// <summary>
+        /// 鑾峰彇缃戝叧鑷姩澶囦唤璁剧疆(-1:寮傚父 0:鍏抽棴 1:鎵撳紑)
+        /// </summary>
+        /// <param name="zbGateway"></param>
+        /// <returns></returns>
+        public int GetGatewayAutoBackupStatu(ZbGateway zbGateway)
+        {
+            ZbGateway realWay = null;
+            if (this.GetRealGateway(ref realWay, zbGateway) == false)
+            {
+                //閿欒:缃戝叧瀵硅薄涓㈠け
+                this.ShowTipMsg(Language.StringByID(R.MyInternationalizationString.uErrorGatewayLostMsg));
+                return -1;
+            }
+            int statu = -1;
+            Action<string, string> action = (topic, message) =>
+            {
+                var gatewayID = topic.Split('/')[0];
+                if (topic == gatewayID + "/GatewayAutoBackup_Respon")
+                {
+                    var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
+                    statu = Convert.ToInt32(jobject["Data"]["AutoBackupStatus"].ToString());
+                }
+            };
+            realWay.Actions += action;
+
+            var jObject = new Newtonsoft.Json.Linq.JObject { { "Cluster_ID", 0 }, { "Command", 6205 } };
+            var data = new Newtonsoft.Json.Linq.JObject { { "AutoBackup", 1 } };
+            jObject.Add("Data", data);
+            realWay.Send("GatewayAutoBackup", jObject.ToString());
+
+            int TimeOut = 0;
+            while (statu == -1 && TimeOut < 60)
+            {
+                System.Threading.Thread.Sleep(100);
+                TimeOut++;
+            }
+
+            realWay.Actions -= action;
+            if (statu == -1)
+            {
+                //鑾峰彇缃戝叧鑷姩澶囦唤璁剧疆澶辫触
+                string msg = Language.StringByID(R.MyInternationalizationString.uGetGatewayAutoBackupStatuFail);
+                msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, null, "鍥炲瓒呮椂");
+                this.ShowTipMsg(msg);
+            }
+
+            return statu;
         }
 
         /// <summary>
-        /// 缃戝叧PanId淇℃伅
+        /// 璁剧疆缃戝叧鑷姩澶囦唤璁剧疆
         /// </summary>
-        private class PanIdInfo
+        /// <param name="zbGateway"></param>
+        /// <param name="statu"></param>
+        /// <returns></returns>
+        public bool SetGatewayAutoBackupStatu(ZbGateway zbGateway, bool statu)
         {
-            /// <summary>
-            /// PanId
-            /// </summary>
-            public int PANID = -1;
+            ZbGateway realWay = null;
+            if (this.GetRealGateway(ref realWay, zbGateway) == false)
+            {
+                //閿欒:缃戝叧瀵硅薄涓㈠け
+                this.ShowTipMsg(Language.StringByID(R.MyInternationalizationString.uErrorGatewayLostMsg));
+                return false;
+            }
+            int result = -1;
+            Action<string, string> action = (topic, message) =>
+            {
+                var gatewayID = topic.Split('/')[0];
+                if (topic == gatewayID + "/GatewayAutoBackup_Respon")
+                {
+                    var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
+                    result = Convert.ToInt32(jobject["Data"]["AutoBackupStatus"].ToString());
+                }
+            };
+            realWay.Actions += action;
+
+            var jObject = new Newtonsoft.Json.Linq.JObject { { "Cluster_ID", 0 }, { "Command", 6205 } };
+            var data = new Newtonsoft.Json.Linq.JObject { { "AutoBackup", statu == true ? 2 : 3 } };
+            jObject.Add("Data", data);
+            realWay.Send("GatewayAutoBackup", jObject.ToString());
+
+            int TimeOut = 0;
+            while (result == -1 && TimeOut < 60)
+            {
+                System.Threading.Thread.Sleep(100);
+                TimeOut++;
+            }
+
+            realWay.Actions -= action;
+            if (result == -1)
+            {
+                //璁剧疆缃戝叧鑷姩澶囦唤澶辫触
+                string msg = Language.StringByID(R.MyInternationalizationString.uSetGatewayAutoBackupStatuFail);
+                msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, null, "鍥炲瓒呮椂");
+                this.ShowTipMsg(msg);
+                return false;
+            }
+
+            return true;
         }
 
         #endregion
@@ -2317,27 +2387,27 @@
         /// <returns></returns>
         public async Task<bool> UpLoadDeviceBackupDataToGateway(CommonDevice device, GatewayBackupEnum backupEnum, object upLaodData)
         {
-            ZbGateway realWay = null;
-            if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, device.CurrentGateWayId) == false)
-            {
-                //娌℃湁鎵惧埌鐪熷疄鐗╃悊缃戝叧
-                return false;
-            }
-            string fileName = device.FilePath + ((int)backupEnum).ToString().PadLeft(5, '0');
-            //鍒涘缓鏂囦欢瀵硅薄
-            var result = await realWay.CreateFileAsync(fileName);
-            if (result == null || result.Result != 0)
-            {
-                return false;
-            }
-            //鍙戦�佹暟鎹祦
-            var data = Newtonsoft.Json.JsonConvert.SerializeObject(upLaodData);
-            var byteData = System.Text.Encoding.UTF8.GetBytes(data);
-            var result2 = await realWay.SendFileAsync(byteData);
-            if (result2 == null || result2.Result != 0)
-            {
-                return false;
-            }
+            //ZbGateway realWay = null;
+            //if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, device.CurrentGateWayId) == false)
+            //{
+            //    //娌℃湁鎵惧埌鐪熷疄鐗╃悊缃戝叧
+            //    return false;
+            //}
+            //string fileName = device.FilePath + ((int)backupEnum).ToString().PadLeft(5, '0');
+            ////鍒涘缓鏂囦欢瀵硅薄
+            //var result = await realWay.CreateFileAsync(fileName);
+            //if (result == null || result.Result != 0)
+            //{
+            //    return false;
+            //}
+            ////鍙戦�佹暟鎹祦
+            //var data = Newtonsoft.Json.JsonConvert.SerializeObject(upLaodData);
+            //var byteData = System.Text.Encoding.UTF8.GetBytes(data);
+            //var result2 = await realWay.SendFileAsync(byteData);
+            //if (result2 == null || result2.Result != 0)
+            //{
+            //    return false;
+            //}
             return true;
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
index 5565855..f1c7924 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Text;
 using Newtonsoft.Json.Linq;
+using ZigBee.Device;
 
 namespace Shared.Phone.UserCenter
 {
@@ -10,15 +11,48 @@
     /// </summary>
     public class HdlGatewayReceiveLogic
     {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫
+        /// </summary>
+        private static HdlGatewayReceiveLogic m_Current = null;
+        /// <summary>
+        /// 鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫
+        /// </summary>
+        public static HdlGatewayReceiveLogic Current
+        {
+            get
+            {
+                if (m_Current == null)
+                {
+                    m_Current = new HdlGatewayReceiveLogic();
+                }
+                return m_Current;
+            }
+        }
+
+        /// <summary>
+        /// 璁惧鎺ㄩ�佷簨浠堕泦鍚�
+        /// </summary>
+        private Dictionary<string, Action<CommonDevice>> dicDeviceEvent = new Dictionary<string, Action<CommonDevice>>();
+        /// <summary>
+        /// 鍛戒护鍖哄垎
+        /// </summary>
+        private Dictionary<string, string> dicCommandDiv = new Dictionary<string, string>();
+
+        #endregion
+
         #region 鈻� 鍏ㄥ眬鎺ユ敹___________________________
 
         /// <summary>
         /// 鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫(涓轰簡鎵ц閫熷害,灏藉彲鑳界殑鍒姞鑰楁椂鐨勬搷浣�)
         /// </summary>
         /// <param name="gatewayId">缃戝叧ID</param>
-        /// <param name="topic">涓婚</param>
+        /// <param name="topic">鏁翠釜涓婚</param>
+        /// <param name="reportTopic">涓婃姤鏁版嵁鐨勪富棰�</param>
         /// <param name="receiveData">鎺ユ敹鐨勬暟鎹�</param>
-        public static void GatewayOverallMsgReceive(string gatewayId, string topic, JObject receiveData)
+        public void GatewayOverallMsgReceive(string gatewayId, string topic, string reportTopic, JObject receiveData)
         {
             if (topic == "AppNoLogin")
             {
@@ -44,7 +78,18 @@
                     UserCenterLogic.ReLoginAgain(UserCenterResourse.UserInfo.Account, false);
                 });
             }
+            else if (topic == "YouIpAndPortNoRecord")
+            {
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    //鎮ㄥ綋鍓嶇殑IP鍙婄鍙e湪浜戠涓嶅瓨鍦�,璇烽噸鏂扮櫥褰�!
+                    string msg = Language.StringByID(R.MyInternationalizationString.uYouIpAndPortNoRecord);
+                    var contr = new ShowMsgControl(ShowMsgType.Tip, msg);
+                    contr.Show();
 
+                    UserCenterLogic.ReLoginAgain(UserCenterResourse.UserInfo.Account, false);
+                });
+            }
             try
             {
                 if (HdlGatewayLogic.Current.IsGatewayExist(gatewayId) == false)
@@ -52,12 +97,22 @@
                     //涓嶆槸鑷繁缁戝畾鐨勭綉鍏筹紝鍒欎笉澶勭悊
                     return;
                 }
-                //闂ㄩ攣涓婃姤
-                if (topic == gatewayId + "/Alarms/SendAlarmInform")
-                {
-                    //淇濆瓨闂ㄩ攣鎶ヨ淇℃伅鍒版湰鍦�
-                    HdlAlarmsLogic.Current.SaveDoorLockAlarmInfo(receiveData);
 
+                //璁惧灞炴�т笂鎶�
+                if (reportTopic == "DeviceStatusReport")
+                {
+                    //璁惧灞炴�т笂鎶�
+                    //this.DeviceAttributeReportPush(receiveData);
+                }
+                //浼犳劅鍣ㄤ笂鎶�
+                else if (reportTopic == "IASInfoReport")
+                {
+                    //this.SensorDeviceReportPush(receiveData);
+                }
+                //闂ㄩ攣涓婃姤
+                else if (topic == gatewayId + "/Alarms/SendAlarmInform")
+                {
+                    this.DoorLockDeviceReportPush(receiveData);
                 }
                 //閫氳繃澶栭儴鏂瑰紡甯冮槻鎾ら槻鎴愬姛鏃舵姤鍛�
                 else if (topic == gatewayId + "/Security/EnOrWithdrawSucceedReport")
@@ -80,7 +135,7 @@
         /// 閫氳繃澶栭儴鏂瑰紡甯冮槻鎾ら槻
         /// </summary>
         /// <param name="receiveData">鎺ユ敹鐨勬暟鎹�</param>
-        private static void SecurityEnOrWithdrawSucceedReport(JObject receiveData)
+        private void SecurityEnOrWithdrawSucceedReport(JObject receiveData)
         {
             var data = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityEnOrWithdrawResult>(receiveData["Data"].ToString());
             if (data.EnOrWithdraw == -1 || data.ModeId == -1 || data.OperationWay == -1)
@@ -130,5 +185,189 @@
         }
 
         #endregion
+
+        #region 鈻� 璁惧灞炴�т笂鎶______________________
+
+        /// <summary>
+        /// 璁惧灞炴�т笂鎶�
+        /// </summary>
+        /// <param name="receiveData"></param>
+        private void DeviceAttributeReportPush(JObject receiveData)
+        {
+            var deviceAddr = receiveData.Value<string>("DeviceAddr");
+            var deviceEpoint = receiveData.Value<int>("Epoint");
+
+            var tempDevice = new CommonDevice { DeviceAddr = deviceAddr, DeviceEpoint = deviceEpoint };
+            tempDevice.DeviceStatusReport = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.DeviceStatusReportData>(receiveData["Data"].ToString());
+
+            this.DeviceReportPush(tempDevice, "DeviceStatusReport");
+        }
+
+        #endregion
+
+        #region 鈻� 浼犳劅鍣ㄤ笂鎶________________________
+
+        /// <summary>
+        /// 浼犳劅鍣ㄨ澶囦笂鎶�
+        /// </summary>
+        /// <param name="receiveData"></param>
+        private void SensorDeviceReportPush(JObject receiveData)
+        {
+            var ias = new IASZone() { DeviceAddr = receiveData.Value<string>("DeviceAddr"), DeviceEpoint = receiveData.Value<int>("Epoint") };
+            ias.iASInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<IASZone.IASInfoData>(receiveData["Data"].ToString());
+
+            //濡傛灉娌℃湁娣诲姞鍏ュ畨闃�
+            if (HdlSafeguardLogic.Current.GetZoneIdByIASZone(ias) == -1)
+            {
+            }
+            else
+            {
+                //淇濆瓨瀹夐槻鎶ヨ淇℃伅鍒版湰鍦�
+                HdlAlarmsLogic.Current.SaveSafeguardAlarmInfo(ias);
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 闂ㄩ攣涓婃姤___________________________
+
+        /// <summary>
+        /// 闂ㄩ攣涓婃姤
+        /// </summary>
+        /// <param name="receiveData"></param>
+        private void DoorLockDeviceReportPush(JObject receiveData)
+        {
+            //淇濆瓨闂ㄩ攣淇℃伅鍒版湰鍦�
+            HdlAlarmsLogic.Current.SaveDoorLockAlarmInfo(receiveData);
+        }
+
+        #endregion
+
+        #region 鈻� 娣诲姞璁惧浜嬩欢_______________________
+
+        /// <summary>
+        /// 娣诲姞鑾峰彇璁惧灞炴�х殑浜嬩欢(鎺ㄩ�佸凡缁忓己鍒舵寚瀹氳繍琛屼簬涓荤嚎绋嬶紝灞炴�т笂鎶ョ殑瀵硅薄锛歞evice.DeviceStatusReport)
+        /// </summary>
+        /// <param name="mainKeys">鏍囪瘑浜嬩欢鐨勪富閿�(鍙互闅忎究濉�,涓昏鏄拡瀵瑰涓晫闈竴璧蜂娇鐢ㄧ殑鎯呭喌)</param>
+        /// <param name="comand">鍛戒护鍖哄垎,姣斿锛欴eviceStatusReport,IASInfoReport绛夌瓑</param>
+        /// <param name="action">褰撴帴鏀跺埌缃戝叧鍥炲涔嬪悗鐨勫洖璋冨嚱鏁�,灞炴�т笂鎶ョ殑瀵硅薄锛歞evice.DeviceStatusReport</param>
+        public void AddAttributeEvent(string mainKeys, string comand, Action<CommonDevice> action)
+        {
+            lock (this.dicDeviceEvent)
+            {
+                this.dicDeviceEvent[mainKeys] = action;
+                this.dicCommandDiv[mainKeys] = comand;
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 绉婚櫎璁惧鐩戝惉_______________________
+
+        /// <summary>
+        /// 绉婚櫎浜嬩欢
+        /// </summary>
+        /// <param name="mainKeys">鏍囪瘑浜嬩欢鐨勪富閿�(鍙互闅忎究濉�,涓昏鏄拡瀵瑰涓晫闈竴璧蜂娇鐢ㄧ殑鎯呭喌)</param>
+        public void RemoveEvent(string mainKeys)
+        {
+            lock (this.dicDeviceEvent)
+            {
+                if (this.dicDeviceEvent.ContainsKey(mainKeys) == true)
+                {
+                    var action = this.dicDeviceEvent[mainKeys];
+                    this.dicDeviceEvent.Remove(mainKeys);
+                    this.dicCommandDiv.Remove(mainKeys);
+
+                    action = null;
+                }
+            }
+        }
+
+        /// <summary>
+        /// 绉婚櫎鍏ㄩ儴鐨勪簨浠�
+        /// </summary>
+        public void RemoveAllEvent()
+        {
+            lock (this.dicDeviceEvent)
+            {
+                var list = new HashSet<string>();
+                foreach (var keys in this.dicDeviceEvent.Keys)
+                {
+                    list.Add(keys);
+                }
+                foreach (var keys in list)
+                {
+                    //闇�瑕佹參鎱竴涓竴涓殑閲婃斁Action,鍚
+                    this.RemoveEvent(keys);
+                }
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 璁惧涓婃姤鎺ㄩ�乢______________________
+
+        /// <summary>
+        /// 璁惧涓婃姤鎺ㄩ��
+        /// </summary>
+        /// <param name="common"></param>
+        /// <param name="typeTag"></param>
+        private void DeviceReportPush(CommonDevice common, string reportTopic)
+        {
+            lock (this.dicDeviceEvent)
+            {
+                if (this.dicDeviceEvent.Count == 0)
+                {
+                    //娌℃湁娣诲姞鐩戝惉
+                    return;
+                }
+
+                var list = new List<Action<CommonDevice>>();
+                foreach (string keys in this.dicDeviceEvent.Keys)
+                {
+                    if (this.dicCommandDiv[keys] != reportTopic)
+                    {
+                        //鍛戒护鍖哄垎涓嶄竴鑷达紝鍒欎笉璋冪敤鍥炶皟鍑芥暟
+                        continue;
+                    }
+                    //鍛戒护鍖哄垎涓�鑷存椂锛屽垯璋冪敤鍥炶皟鍑芥暟
+                    list.Add(this.dicDeviceEvent[keys]);
+                }
+                //鏈夊彲鑳藉湪鍥炶皟鍑芥暟涓Щ闄や簡浜嬩欢锛屽鑷存姤閿欙紝鎵�浠ュ厛鏀堕泦锛屽啀璋冪敤
+                Application.RunOnMainThread(() =>
+                {
+                    foreach (var action in list)
+                    {
+                        try
+                        {
+                            action?.Invoke(common);
+                        }
+                        catch (Exception ex)
+                        {
+                            //Log鍑哄姏
+                            string msg = "褰撳墠婵�娲荤殑鐣岄潰[" + UserCenterResourse.NowActionFormID + "]";
+                            HdlLogLogic.Current.WriteLog(-1, msg);
+                            HdlLogLogic.Current.WriteLog(ex);
+                        }
+                    }
+                });
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        /// <summary>
+        /// 鏄惁瀛樺湪鎸囧畾鐨勪簨浠�
+        /// </summary>
+        /// <param name="mainkeys"></param>
+        /// <returns></returns>
+        public bool IsEsixt(string mainkeys)
+        {
+            return this.dicCommandDiv.ContainsKey(mainkeys);
+        }
+
+        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
index 7ea6cfd..b9e473b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
@@ -53,13 +53,13 @@
         /// </summary>
         /// <param name="listDistributedMark"></param>
         /// <returns></returns>
-        public async Task<List<string>> SetShardFileToLocation(List<string> listDistributedMark)
+        private async Task<List<string>> SetShardFileToLocation(List<string> listDistributedMark)
         {
             if (listDistributedMark.Count == 0)
             {
                 return new List<string>();
             }
-            ProgressBar.SetMaxValue(listDistributedMark.Count);
+            int listMarkCount = listDistributedMark.Count;
 
             List<string> listFile = new List<string>();
             //鏂囦欢澶�
@@ -69,8 +69,9 @@
             Shared.Common.CommonPage.BackKeyCanClick = false;
             UserCenterResourse.Option.AppCanSignout = false;
 
-            foreach (string keys in listDistributedMark)
+            for (int i = 0; i < listDistributedMark.Count; i++)
             {
+                string keys = listDistributedMark[i];
                 var dataPra = new { DistributedMark = keys, HouseDistributedMark = Common.Config.Instance.Home.Id, IsOtherAccountControl = Common.Config.Instance.isAdministrator };
                 var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetOneShareData", false, dataPra);
                 if (result == null)
@@ -86,7 +87,7 @@
                 //淇濆瓨鍒版寚瀹氭枃浠跺す涓�
                 Global.WriteFileToDirectoryByBytes(strDir, dataResult.ShareName, dataResult.ShareDataBytes);
                 //璁剧疆杩涘害鍊�
-                ProgressBar.SetValue(1);
+                ProgressFormBar.Current.SetValue(i + 1, listMarkCount);
             }
 
             //鍏佽鎸夌郴缁熺殑杩斿洖閿�
@@ -284,11 +285,9 @@
             //浠庝簯绔幏鍙栦笅鏉ユ枃浠�
             if (listAddMark.Count > 0)
             {
-                //寮哄埗鎸囧畾鏂囨湰闄勫姞淇℃伅锛氬叡浜暟鎹悓姝ヤ腑
-                string msg = Language.StringByID(R.MyInternationalizationString.uShardDataIsSynchronizing);
-                //寮�鍚繘搴︽潯
-                ProgressBar.Show(msg);
-                ProgressBar.SetAppendText(msg);
+                //寮�鍚繘搴︽潯 鍏变韩鏁版嵁鍚屾涓�
+                ProgressFormBar.Current.Start();
+                ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uShardDataIsSynchronizing));
 
                 //灏嗗垎浜殑鏁版嵁瀛樺叆鏈湴(鑾峰彇鐨勬槸鏈湴娌℃湁鐨�)
                 this.ClearShardDirectory();
@@ -296,7 +295,7 @@
                 if (listDbFile == null)
                 {
                     //鍏抽棴
-                    ProgressBar.Close();
+                    ProgressFormBar.Current.Close();
                     return false;
                 }
 
@@ -334,11 +333,9 @@
                 //鍙湁鎴愬憳鎵嶆湁杩欎釜姒傚康
                 return true;
             }
-            //寮哄埗鎸囧畾鏂囨湰闄勫姞淇℃伅锛氬叡浜暟鎹悓姝ヤ腑
-            string msg = Language.StringByID(R.MyInternationalizationString.uShardDataIsSynchronizing);
-            //寮�鍚繘搴︽潯
-            ProgressBar.Show(msg);
-            ProgressBar.SetAppendText(msg);
+            //寮�鍚繘搴︽潯  鍏变韩鏁版嵁鍚屾涓�
+            ProgressFormBar.Current.Start();
+            ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uShardDataIsSynchronizing));
 
             if (dicUpdateTime == null)
             {
@@ -357,7 +354,7 @@
                 if (string.IsNullOrEmpty(result) == true)
                 {
                     //鍏抽棴
-                    ProgressBar.Close();
+                    ProgressFormBar.Current.Close();
                     return false;
                 }
                 var listShardData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<GetShardInfoResult>>(result);
@@ -435,7 +432,7 @@
             //淇濆瓨鍏ㄩ儴鍒嗕韩鏂囦欢鐨勬洿鏂版棩鏈�
             this.SaveAllShardFileAgoUpdateTime(dicUpdateTime);
             //鍏抽棴
-            ProgressBar.Close();
+            ProgressFormBar.Current.Close();
 
             return true;
         }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs
index b8058f2..2d85f92 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs
@@ -37,24 +37,40 @@
         {
             get
             {
-                string ssiD = Shared.WiimuUPnP.SSID;
+#if iOS
+                return string.Empty;
+#endif
+#if Android
+                string ssiD = null;
+                HdlThreadLogic.Current.RunThread(() =>
+                {
+                    Shared.Net.NetWiFi.GetWIFISSID((strId) =>
+                    {
+                        ssiD = strId;
+                    });
+                });
+                while (ssiD == null)
+                {
+                    System.Threading.Thread.Sleep(50);
+                }
                 if (string.IsNullOrEmpty(ssiD) == false && ssiD.StartsWith("\"") && ssiD.EndsWith("\""))
                 {
                     ssiD = ssiD.Substring(1, ssiD.Length - 2);
                 }
                 return ssiD;
+#endif
             }
         }
 #if Android
         /// <summary>
         /// 瀹氫箟鍏ㄥ眬鍙橀噺
         /// </summary>
-        private Com.Hdl.Hdlelianzigbee.ElianNative hdlWiFi = null;
+        private Com.Mediatek.Elian.ElianNative hdlWiFi = null;
 #endif
 
-        #endregion
+#endregion
 
-        #region 鈻� 涓�鑸柟娉昣__________________________
+#region 鈻� 涓�鑸柟娉昣__________________________
 
 #if Android
         /// <summary>
@@ -68,8 +84,9 @@
         {
             if (hdlWiFi == null)
             {
+                Com.Mediatek.Elian.ElianNative.LoadLib();
                 //鍒濆鍖朩i-Fi閰嶇綉
-                this.hdlWiFi = new Com.Hdl.Hdlelianzigbee.ElianNative();
+                this.hdlWiFi = new Com.Mediatek.Elian.ElianNative();
                 hdlWiFi.InitSmartConnection(null, 1, 1);
             }
             //寮�濮媁i-Fi閰嶇綉
@@ -116,6 +133,6 @@
         }
 #endif
 
-        #endregion
+#endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
index b778f68..ada9751 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -649,27 +649,22 @@
         /// </summary>
         public static void CloseAllOpenForm()
         {
-            var listForm = new List<CommonFormBase>();
-            var listId = new List<string>();
-            foreach (CommonFormBase form in UserCenterResourse.DicActionForm.Values)
+            while (UserView.HomePage.Instance.ChildrenCount > 0)
             {
-                if (form.FormID != "UserMainForm")
+                var view = UserView.HomePage.Instance.GetChildren(UserView.HomePage.Instance.ChildrenCount - 1);
+                if (view is CommonFormBase)
                 {
-                    listForm.Insert(0, form);
-                    listId.Add(form.FormID);
+                    ((CommonFormBase)view).CloseForm();
+                }
+                else if (view is UserView.UserPage)
+                {
+                    break;
+                }
+                else
+                {
+                    view.RemoveFromParent();
                 }
             }
-            foreach (var id in listId)
-            {
-                UserCenterResourse.DicActionForm.Remove(id);
-            }
-
-            //鍏抽棴鎵�鏈夌敾闈�
-            foreach (CommonFormBase form in listForm)
-            {
-                form.CloseForm();
-            }
-            listForm.Clear();
         }
 
         #endregion
@@ -791,9 +786,6 @@
             //APP缂撳瓨鍔犺浇寮�濮�
             UserCenterResourse.Option.AppCanSignout = false;
 
-            //寮哄埗鎸囧畾涓嶅叧闂繘搴︽潯
-            ProgressBar.SetCloseBarFlag(true);
-
             //鍙湁鍦ㄤ綇瀹匢D涓嶄竴鏍风殑鏃跺�欐墠鍋氳繖涓搷浣�
             if (Common.Config.Instance.HomeId != UserCenterResourse.Option.OldHomeStringId
                 || Common.Config.Instance.Account != UserCenterResourse.Option.OldAccountId)
@@ -851,9 +843,6 @@
                 //鍒锋柊APP鍓嶄竴娆¢�夋嫨鐨勭綉鍏矷D(鍙互鍙嶅璋冪敤,闇�瑕佸湪缃戝叧鍒濆鍖栧畬浜嗕箣鍚庢墠鑳借皟鐢�)
                 HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
 
-                //娓呯┖寮哄埗鎸囧畾鏂囨湰鐨勯檮鍔犱俊鎭�
-                ProgressBar.SetAppendText(string.Empty);
-
                 //0:宸茬粡鍚屾杩囷紝涓嶉渶瑕佸悓姝�,杩欎釜鏃跺�欓渶瑕佹彁绀哄浠�
                 //if (result == 0)
                 //{
@@ -861,9 +850,6 @@
                 //    HdlAutoBackupLogic.ShowAutoBackupPromptedForm();
                 //}
             }
-
-            //鎭㈠鍙叧闂繘搴︽潯
-            ProgressBar.SetCloseBarFlag(false);
             //APP缂撳瓨鍔犺浇瀹屾垚
             UserCenterResourse.Option.AppCanSignout = true;
 
@@ -1027,9 +1013,9 @@
             Config.Instance.AdminRequestBaseUrl = string.Empty;
             Config.Instance.AdminRequestToken = string.Empty;
 
-            if (UserCenterResourse.UserInfo.AuthorityNo != 2)
+            if (UserCenterResourse.UserInfo.AuthorityNo != 2 && UserCenterResourse.UserInfo.AuthorityNo != 3)
             {
-                //鎷ユ湁绠$悊鍛樻潈闄愮殑鎴愬憳鎵嶈兘杩欐牱鎼�,  杩欓噷蹇呴』鏄�2
+                //鏃朵唬鍙樹簡,杩欓噷绠$悊鍛樺拰鎴愬憳閮借兘璋冪敤
                 return true;
             }
             var pra = new
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
index 93da3b6..e47fed7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
@@ -15,16 +15,10 @@
         /// </summary>
         /// <param name="common">Common.</param>
         public void Changed(CommonDevice common)
-        {
-            //if (common.Type != ZigBee.Device.DeviceType.OnOffSwitch)
-            //{
-            //    return;
-            //}
-
+        { 
             Shared.Application.RunOnMainThread(() =>
             {
-                //var dev = common as Panel;
-            });
+             });
         }
 
         /// 鏋勯�犲嚱鏁�
@@ -157,7 +151,7 @@
             {
                 Width = Application.GetRealWidth(907),
                 Gravity = Gravity.CenterHorizontal,
-                Radius = (uint)Application.GetRealHeight(120) / 2,
+                Radius = (uint)Application.GetRealHeight(127) / 2,
                 TextID = R.MyInternationalizationString.ChooseKeyMode,
                 BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                 TextColor = Shared.Common.ZigbeeColor.Current.XMWhite,
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
index 3bd0b32..5943cbb 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
@@ -114,13 +114,14 @@
             midVerticalScrolViewLayout = new VerticalScrolViewLayout()
             {
                 Y = btnMidTopLayout.Bottom,
+                Height = Application.GetRealHeight(1145),
             };
             this.midFrameLayout.AddChidren(midVerticalScrolViewLayout);
 
             var bottomFrameLayout = new FrameLayout()
             {
                 Width = LayoutParams.MatchParent,
-                Height = Application.GetRealHeight(1737 - 1472),
+                Height = Application.GetRealHeight(127),
                 Y = Application.GetRealHeight(1472),
             };
             this.midFrameLayout.AddChidren(bottomFrameLayout);
@@ -128,9 +129,8 @@
             btnFinifh = new Button()
             {
                 Width = Application.GetRealWidth(907),
-                Height = Application.GetRealHeight(127),
                 Gravity = Gravity.CenterHorizontal,
-                Radius = (uint)Application.GetRealHeight(120) / 2,
+                Radius = (uint)Application.GetRealHeight(127) / 2,
                 TextID = R.MyInternationalizationString.Save,
                 BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                 TextColor = Shared.Common.ZigbeeColor.Current.XMWhite,
@@ -200,15 +200,14 @@
                         }
                         else
                         {
-                            var btn = new Button()
-                            {
-                                Gravity = Gravity.Center,
-                            };
-                            this.midFrameLayout.AddChidren(btn);
                             Application.RunOnMainThread(() =>
                             {
-                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btn);
-                            });
+                                var myTip = new Tip();
+                                myTip.Direction = AMPopTipDirection.None;
+                                myTip.CloseTime = 2;
+                                myTip.Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime);
+                                myTip.Show(Common.CommonPage.Instance);
+                             });
                         }
                     }
 
@@ -217,7 +216,12 @@
                     {
                         Application.RunOnMainThread(() =>
                         {
-                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.ChangeBindMode), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(btnFinifh);
+                            var myTip = new Tip();
+                            myTip.Direction = AMPopTipDirection.None;
+                            myTip.CloseTime = 2;
+                            myTip.Text = Language.StringByID(R.MyInternationalizationString.ChangeBindMode);
+                            myTip.Show(Common.CommonPage.Instance);
+                            //new Tip() { Text = Language.StringByID(R.MyInternationalizationString.ChangeBindMode), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(btnFinifh);
                             btnFinifh.Enable = true;
                             btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                         });
@@ -364,8 +368,12 @@
             #endregion
         }
 
-        // 鎸夐敭缁戝畾鍦烘櫙琛ㄦ樉绀�
-        void RefreshRoomList(Shared.Common.Room curRoom, Button btnFinish, ref int index2)
+        /// <summary>
+        /// 鎸夐敭缁戝畾鍦烘櫙琛ㄦ樉绀�
+        /// </summary>
+        /// <param name="gateway">Gateway.</param>
+        /// <param name="key">Key.</param>
+        void RefreshRoomList(Shared.Common.Room curRoom, Button btnChooseKeyMode, ref int index2)
         {
             if (roomList.Count == 0)
             {
@@ -386,7 +394,7 @@
                     continue;
                 }
 
-                //濡傛灉鎴块棿涓病鏈夎澶囷紝鍒欎笉鏄剧ず
+                //濡傛灉鎴块棿涓病鏈夊満鏅紝鍒欎笉鏄剧ず
                 if (room.SceneUIList.Count == 0)
                 {
                     continue;
@@ -405,6 +413,7 @@
                     Height = Application.GetRealHeight(78),
                     Width = Application.GetRealWidth(187),
                     Y = Application.GetRealHeight(58),
+                    X = Application.GetRealWidth(58),
                     Radius = (uint)Application.GetMinRealAverage(78 / 2),
                     BorderColor = Shared.Common.ZigbeeColor.Current.XMOrange,
                     BorderWidth = 1,
@@ -421,15 +430,10 @@
                     TextSize = 12,
                     TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                     Gravity = Gravity.Center,
-                    //SelectedImagePath = "BindPic/BindRoomColorOn.png",
-                    //UnSelectedImagePath = "BindPic/BindRoomColor.png",
                 };
                 btnRoomFrameLayout.AddChidren(btnRoom);
 
-
                 btnRoom.IsSelected = false;
-
-                //榛樿閫変腑姣忎釜妤煎眰鐨勭涓�涓埧闂�
                 if (index == 0)
                 {
                     btnRoom.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMOrange;
@@ -439,48 +443,6 @@
                     curentOldRoom = btnRoom;
                     curentOldRoomFrameLayout = btnRoomFrameLayout;
                 }
-
-                //璁板綍涔嬪墠閫変腑鐨勬埧闂�
-                //if (currentKey.RoomId == "")
-                //{
-                //    if (i == index)
-                //    {
-                //        btnRoom.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMOrange;
-                //        btnRoomFrameLayout.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMOrange;
-                //        btnRoomFrameLayout.BorderWidth = 0;
-                //        btnRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMWhite;
-                //        curentOldRoom = btnRoom;
-                //        curentOldRoomFrameLayout = btnRoomFrameLayout;
-                //    }
-                //    else
-                //    {
-                //        btnRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3;
-                //        btnRoom.IsSelected = false;
-                //        btnRoomFrameLayout.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout;
-                //        btnRoomFrameLayout.BorderWidth = 1;
-                //    }
-                //}
-                //else
-                //{
-                //    if (currentKey.RoomId == room.Id)
-                //    {
-                //        btnRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMWhite;
-                //        btnRoom.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMOrange;
-                //        btnRoomFrameLayout.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMOrange;
-                //        btnRoomFrameLayout.BorderWidth = 0;
-                //        curentOldRoom = btnRoom;
-                //        curentOldRoomFrameLayout = btnRoomFrameLayout;
-                //        curRoom = room;
-                //        index2 = i;
-                //    }
-                //    else
-                //    {
-                //        btnRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3;
-                //        btnRoomFrameLayout.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout;
-                //        btnRoomFrameLayout.BorderWidth = 1;
-                //    }
-                //}
-
                 EventHandler<MouseEventArgs> eHandlerRoom = (sender, e) =>
                 {
                     if (!btnRoom.IsSelected)
@@ -495,17 +457,17 @@
                         curentOldRoom.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMOrange;
                         curRoom = room;
                         currentKey.RoomId = room.Id;
+                        RefreshSceneList(curRoom);
                         if (curRoom.SceneUIList.Count == 0)
                         {
-                            btnFinish.Enable = false;
-                            btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
+                            btnChooseKeyMode.Enable = false;
+                            btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
                         }
                         else
                         {
-                            btnFinish.Enable = true;
-                            btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+                            btnChooseKeyMode.Enable = true;
+                            btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                         }
-                        RefreshSceneList(curRoom);
                     }
 
                     if (btnRoomFrameLayout.BorderWidth == 1)
@@ -520,17 +482,17 @@
                         curentOldRoomFrameLayout.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMOrange;
                         curRoom = room;
                         currentKey.RoomId = room.Id;
+                        RefreshSceneList(curRoom);
                         if (curRoom.SceneUIList.Count == 0)
                         {
-                            btnFinish.Enable = false;
-                            btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
+                            btnChooseKeyMode.Enable = false;
+                            btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
                         }
                         else
                         {
-                            btnFinish.Enable = true;
-                            btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+                            btnChooseKeyMode.Enable = true;
+                            btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                         }
-                        RefreshSceneList(curRoom);
                     }
                 };
                 btnRoom.MouseUpEventHandler += eHandlerRoom;
@@ -542,10 +504,10 @@
                     X = btnRoom.Right,
                 };
                 btnHorizontalScrolViewLayout.AddChidren(btnEmpty);
+                index++;
             }
-
-            BindInfo.FinishDisplay(roomTempList, btnFinish);
-            index++;
+            BindInfo.FinishDisplay(roomTempList, btnChooseKeyMode);
+            RefreshSceneList(curRoom);
         }
 
         //鎸夐敭缁戝畾鍦烘櫙琛ㄦ樉绀�
@@ -575,7 +537,7 @@
                     Y = Application.GetMinRealAverage(46),
                     Width = Application.GetMinRealAverage(81),
                     Height = Application.GetMinRealAverage(81),
-                    UnSelectedImagePath = scene.IconPath,
+                    UnSelectedImagePath = "SceneIcon/4.png",// scene.IconPath,
                 };
                 rowLayout.AddChidren(devicePic);
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
index 11acf4a..d48b821 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
@@ -265,6 +265,7 @@
         /// <param name="key">Key.</param>
         async void RefreshList()
         {
+            #region BindEmptyPic UI
             this.midFrameLayout.RemoveAll();
 
             var entryStatusPic = new Button
@@ -301,6 +302,7 @@
             };
             this.midFrameLayout.AddChidren(midVerticalScrolViewLayout);
             midVerticalScrolViewLayout.RemoveAll();
+            #endregion
 
             if (currentKey.bindList.Count == 0)
             {
@@ -371,8 +373,7 @@
                     rowLayout.AddRightView(btnDel);
                     #endregion
 
-                    #region 缁戝畾鏁版嵁澶勭悊
-
+                    #region 缁戝畾鏁版嵁澶勭悊 
                     bool isExistScene = false;
 
                     foreach (var sc in currentKey.bindList)
@@ -385,7 +386,7 @@
 
                     if (isExistScene)
                     {
-                        devicePic.UnSelectedImagePath = "Item/Scene.png";
+                        devicePic.UnSelectedImagePath = "SceneIcon/4.png";
                         devicePic.Width = Application.GetMinRealAverage(110);
 
                         if (bindDevice.ESName == "")
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs
index 13a7e13..d611651 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceGeneralInformationForm.cs
@@ -53,11 +53,12 @@
             rowName.AddBottomLine();
 
             //璁惧鍨嬪彿
+            string strModel = listDevice[0].DriveCode > 0 ? Language.StringByID(R.MyInternationalizationString.uVirtualDriveDevice) : listDevice[0].ModelIdentifier;
             var rowType = new FrameRowControl(listView.rowSpace / 2);
             rowType.UseClickStatu = false;
             listView.AddChidren(rowType);
             rowType.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uModelIdentifier), 300);
-            rowType.AddMostRightView(listDevice[0].ModelIdentifier, 600);
+            rowType.AddMostRightView(strModel, 600);
             rowType.AddBottomLine();
 
             //鍥轰欢鐗堟湰
@@ -89,11 +90,12 @@
             rowMac.AddBottomLine();
 
             //鍒堕�犲晢
+            string strProtuct = listDevice[0].DriveCode > 0 ? "HDL" : listDevice[0].ManufacturerName;
             var rowProtuct = new FrameRowControl(listView.rowSpace / 2);
             rowProtuct.UseClickStatu = false;
             listView.AddChidren(rowProtuct);
             rowProtuct.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uManufacturerName), 300);
-            rowProtuct.AddMostRightView(listDevice[0].ManufacturerName, 600);
+            rowProtuct.AddMostRightView(strProtuct, 600);
 
             listView.AdjustRealHeight(Application.GetRealHeight(23));
         }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
index db02ddd..6f43d97 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
@@ -158,12 +158,8 @@
             //鏍规嵁MAC鍚堝苟璁惧鍒楄〃
             this.MargeAllDeviceByMac(listDevice);
 
-            Application.RunOnMainThread(() =>
+            HdlThreadLogic.Current.RunMain(() =>
             {
-                if (this.Parent == null)
-                {
-                    return;
-                }
                 var listOta = new List<OTADevice>();
                 foreach (var macAddress in this.dicRowInfo.Keys)
                 {
@@ -176,6 +172,7 @@
                     //娣诲姞璁惧鐨勮彍鍗曡
                     this.AddDeviceMenuRow(macAddress);
                 }
+
                 //娣诲姞搴曢儴闂撮殭
                 var frameTemp = new FrameLayout();
                 frameTemp.Height = Application.GetRealHeight(23);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
index 3fb79d1..daa441b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -256,10 +256,22 @@
                  {
                      if (UserCenterResourse.UserInfo.AuthorityNo == 1)
                      {
-                         var userManagement = new Shared.Phone.UserCenter.DoorLock.UserManagement(doorLock);
-                         Shared.Phone.UserView.HomePage.Instance.AddChidren(userManagement);
-                         Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
-                         userManagement.Show();
+                         Action action = null;
+                         if (!UserCenterResourse.Option.DoorUnLockByRemote)
+                         {
+                             Shared.Phone.UserCenter.DoorLock.DoorLockCommonLayout.SecurityRequest(doorLock, action);
+                         }
+                         else
+                         {
+                             action = async () =>
+                             {
+                                 var userManagement = new Shared.Phone.UserCenter.DoorLock.UserManagement(doorLock);
+                                 Shared.Phone.UserView.HomePage.Instance.AddChidren(userManagement);
+                                 Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+                                 userManagement.Show();
+                             };
+                             HdlCheckLogic.Current.CheckSecondarySecurity(action);
+                         }
                      }
                      else
                      {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
index 766d806..98bb400 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
@@ -187,9 +187,14 @@
         /// </summary>
         private async void InitLogListInfo()
         {
+            this.listView.RemoveAll();
+            listView.Height = bodyFrameLayout.Height - Application.GetRealHeight(115 - 3);
+
             //濡傛灉From>To鐨勬椂鍊欙紝涓嶉笩瀹�
             if (Convert.ToInt32(dateFromControl.dateValue) > Convert.ToInt32(dateToControl.dateValue))
             {
+                //寮�濮嬫椂闂村ぇ浜庣粨鏉熸椂闂�
+                this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uFromTimeIsOverToTime));
                 return;
             }
             //鎵撳紑杩涘害鏉�
@@ -213,13 +218,15 @@
             //鍏抽棴杩涘害鏉�
             this.CloseProgressBar();
 
-            this.listView.RemoveAll();
-            listView.Height = bodyFrameLayout.Height - Application.GetRealHeight(115 - 3);
-
+            var dic = new Dictionary<string, string>();
+            for (int i = 0; i < listMenberInfo.Count; i++)
+            {
+                dic.Add(listMenberInfo[i].SubAccountDistributedMark, string.IsNullOrEmpty(listMenberInfo[i].UserName) == false ? listMenberInfo[i].UserName : listMenberInfo[i].Account);
+            }
             for (int i = 0; i < historyLog.Count; i++)
             {
                 //娣诲姞璁板綍琛�
-                this.AddLogInfoRow(historyLog[i], i != historyLog.Count - 1);
+                this.AddLogInfoRow(historyLog[i], dic, i != historyLog.Count - 1);
             }
 
             if (listView.ChildrenCount == 0)
@@ -248,12 +255,6 @@
                 //鍙垵濮嬪寲涓�娆�
                 return true;
             }
-            var pra = new MemberListInfoPra();
-            string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
-            if (result == null)
-            {
-                return false;
-            }
             listMenberInfo = new List<MemberInfoRes>();
             //鎶婅嚜宸变篃鍔犺繘鍘�
             var myInfo = new MemberInfoRes()
@@ -263,7 +264,18 @@
                 SubAccountDistributedMark = Common.Config.Instance.Guid
             };
             listMenberInfo.Add(myInfo);
+            if (UserCenterResourse.UserInfo.AuthorityNo == 3)
+            {
+                //鎴愬憳鍙兘鐪嬭嚜宸辩殑
+                return true;
+            }
 
+            var pra = new MemberListInfoPra();
+            string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
+            if (result == null)
+            {
+                return false;
+            }
             List<MemberInfoRes> listInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<List<MemberInfoRes>>(result);
             var checkList = new List<string>();
             foreach (MemberInfoRes infoRes in listInfo)
@@ -278,37 +290,6 @@
             return true;
         }
 
-        /// <summary>
-        /// 鑾峰彇鍘嗗彶璁板綍
-        /// </summary>
-        /// <returns></returns>
-        private async Task<List<HistoryInfo>> GetHistoryLogInf()
-        {
-            //鑾峰彇璁块棶浜戠鎺ュ彛鐨勫惎鍔ㄥ弬鏁�
-            var pra = this.GetDbInterfacePra();
-
-            int nowPage = 0;
-            var listLog = new List<HistoryInfo>();
-            while (true)
-            {
-                //璁块棶浜戠
-                var result = await UserCenterLogic.GetResponseDataByRequestHttps("App/GetDoorLockHistoryPager", false, pra);
-                if (result == null)
-                {
-                    return null;
-                }
-                var dataInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<GetHistoryDataResult>(result);
-                if (dataInfo.HasNextPage == false)
-                {
-                    break;
-                }
-                //鑾峰彇涓嬩竴椤�
-                nowPage++;
-                pra.PageSetting.Page = nowPage;
-            }
-            return listLog;
-        }
-
         #endregion
 
         #region 鈻� 娣诲姞璁板綍琛宊________________________
@@ -317,25 +298,70 @@
         ///  娣诲姞璁板綍琛�
         /// </summary>
         /// <param name="historyInfo">鍘嗗彶璁板綍</param>
+        /// <param name="dicName">鍚嶅瓧</param>
         /// <param name="addLine">娣诲姞搴曠嚎</param>
-        private void AddLogInfoRow(HistoryInfo historyInfo, bool addLine = true)
+        private void AddLogInfoRow(HistoryInfo historyInfo, Dictionary<string, string> dicName, bool addLine = true)
         {
             var frameTable = new FrameRowControl(listView.rowSpace / 2);
             frameTable.UseClickStatu = false;
             this.listView.AddChidren(frameTable);
             //鍥炬爣
             var btnIcon = frameTable.AddLeftIcon();
-            btnIcon.UnSelectedImagePath = "Item/PswSettionSelected.png";
+            if (historyInfo.UnlockIsSuccess == true)
+            {
+                btnIcon.UnSelectedImagePath = "Item/UnLockSuccess.png";
+            }
+            else
+            {
+                btnIcon.UnSelectedImagePath = "Item/UnLockSuccess.png";
+            }
 
             //淇℃伅
-            var btnMsg = frameTable.AddLeftCaption("淇℃伅娴嬭瘯", 600, 60);
+            var btnMsg = frameTable.AddLeftCaption("", 600, 60);
             btnMsg.TextSize = 15;
             //杩欎釜鍧愭爣鏈夌偣鐗规畩
             btnMsg.Y = Application.GetRealHeight(12) + frameTable.chidrenYaxis;
             frameTable.AddChidren(btnMsg, ChidrenBindMode.NotBind);
+            if (historyInfo.UnlockIsSuccess == true)
+            {
+                if (historyInfo.OpenLockMode == 0)
+                {
+                    //瀵嗙爜寮�閿佹垚鍔�
+                    btnMsg.TextID = R.MyInternationalizationString.uUnlockByPasswordSuccess;
+                }
+                else if (historyInfo.OpenLockMode == 3)
+                {
+                    //IC鍗″紑閿佹垚鍔�
+                    btnMsg.TextID = R.MyInternationalizationString.uUnlockByICcardSuccess;
+                }
+                else if (historyInfo.OpenLockMode == 15)
+                {
+                    //鎸囩汗寮�閿佹垚鍔�
+                    btnMsg.TextID = R.MyInternationalizationString.uUnlockByFingerPrintSuccess;
+                }
+            }
+            else
+            {
+                if (historyInfo.OpenLockMode == 0)
+                {
+                    //瀵嗙爜寮�閿佸け璐�
+                    btnMsg.TextID = R.MyInternationalizationString.uUnlockByPasswordFail;
+                }
+                else if (historyInfo.OpenLockMode == 3)
+                {
+                    //IC鍗″紑閿佸け璐�
+                    btnMsg.TextID = R.MyInternationalizationString.uUnlockByICcardFail;
+                }
+                else if (historyInfo.OpenLockMode == 15)
+                {
+                    //鎸囩汗寮�閿佸け璐�
+                    btnMsg.TextID = R.MyInternationalizationString.uUnlockByFingerPrintFail;
+                }
+            }
 
             //浜虹墿
-            var btnpersion = frameTable.AddLeftCaption("浜虹墿娴嬭瘯", 600, 50, true);
+            string perName = dicName.ContainsKey(historyInfo.CloudAccountId) == true ? dicName[historyInfo.CloudAccountId] : Language.StringByID(R.MyInternationalizationString.uOther);
+            var btnpersion = frameTable.AddLeftCaption(perName, 600, 50, true);
             //杩欎釜鍧愭爣鏈夌偣鐗规畩
             btnpersion.Y = Application.GetRealHeight(72) + frameTable.chidrenYaxis;
             btnpersion.TextSize = 12;
@@ -343,7 +369,7 @@
             frameTable.AddChidren(btnpersion, ChidrenBindMode.NotBind);
 
             //鏃堕棿
-            frameTable.AddMostRightView("13:00:00", 200);
+            frameTable.AddMostRightView(historyInfo.UnlockTime, 400);
             if (addLine == true)
             {
                 //搴曠嚎
@@ -381,6 +407,70 @@
 
         #endregion
 
+        #region 鈻� 鑾峰彇璁板綍___________________________
+
+        /// <summary>
+        /// 鑾峰彇鍘嗗彶璁板綍
+        /// </summary>
+        /// <returns></returns>
+        private async Task<List<HistoryInfo>> GetHistoryLogInf()
+        {
+            //鑾峰彇璁块棶浜戠鎺ュ彛鐨勫惎鍔ㄥ弬鏁�
+            var pra = this.GetDbInterfacePra();
+
+            int nowPage = 0;
+            var listLog = new List<HistoryInfo>();
+            while (true)
+            {
+                //璁块棶浜戠
+                var result = await UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/GetDoorLockHistoryPager", true, pra);
+                if (result == null)
+                {
+                    return null;
+                }
+                var dataInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<GetHistoryDataResult>(result);
+                if (dataInfo.HasNextPage == false)
+                {
+                    break;
+                }
+                //鑾峰彇涓嬩竴椤�
+                nowPage++;
+                pra.PageSetting.Page = nowPage;
+            }
+
+            //鎺掑簭涓�涓�
+            var dic = new Dictionary<string, List<HistoryInfo>>();
+            var listSort = new List<string>();
+            //鏄惁鍖呭惈鍏朵粬
+            bool flage = this.listSearchUserId.Contains("") || this.listSearchUserId.Contains("-1");
+            foreach (var data in listLog)
+            {
+                if (flage == false && string.IsNullOrEmpty(data.CloudAccountId) == true)
+                {
+                    //娌℃湁鎸囧畾鏄剧ず鍏朵粬
+                    continue;
+                }
+                if (dic.ContainsKey(data.UnlockTime) == false)
+                {
+                    dic[data.UnlockTime] = new List<HistoryInfo>();
+                    listSort.Add(data.UnlockTime);
+                }
+                dic[data.UnlockTime].Add(data);
+            }
+
+            //鎵ц鎺掑簭,鏃堕棿澶х殑鍦ㄥ墠闈�
+            listSort.Sort();
+            var listSortLog = new List<HistoryInfo>();
+            for (int i = listSort.Count - 1; i >= 0; i--)
+            {
+                listSortLog.AddRange(dic[listSort[i]]);
+            }
+
+            return listSortLog;
+        }
+
+        #endregion
+
         #region 鈻� 娓呯┖璁板綍___________________________
 
         /// <summary>
@@ -392,7 +482,7 @@
             var pra = this.GetDbInterfacePra();
             //鎵撳紑杩涘害鏉�
             this.ShowProgressBar();
-            var result = await UserCenterLogic.GetResultStatuByRequestHttps("App/ClearDoorLockHistory", false, pra);
+            var result = await UserCenterLogic.GetResultStatuByRequestHttps("DoorLock/ClearDoorLockHistory", true, pra);
             //鍏抽棴杩涘害鏉�
             this.CloseProgressBar();
             if (result == false)
@@ -416,35 +506,27 @@
             DateTime dateFrom = new DateTime(dateFromControl.Year, dateFromControl.Month, dateFromControl.Day, 0, 0, 0);
             DateTime dateTo = new DateTime(dateToControl.Year, dateToControl.Month, dateToControl.Day, 23, 59, 59);
 
-            var listUser = new List<string>();
-            if (listSearchUserId.Contains("-1") == true)
-            {
-                //鎵�鏈夌敤鎴�
-                foreach (MemberInfoRes infoRes in listMenberInfo)
-                {
-                    listUser.Add(infoRes.DistributedMark);
-                }
-            }
-            else
+            //鍏ㄩ�夊垯涓簄ull
+            List<string> listUser = null;
+            if (listSearchUserId.Contains("-1") == false)
             {
                 listUser.AddRange(listSearchUserId);
+                //绉婚櫎鍏朵粬,鍥犱负浜戠鍥哄畾浼氱粰
+                listUser.Remove("");
             }
 
-            var listLock = new List<int>();
-            if (listSearchLockId.Contains(-1) == true)
-            {
-                //鎵�鏈夊紑閿佹柟寮�
-                listLock = new List<int>() { 0, 15, 3 };
-            }
-            else
+            //鍏ㄩ�夊垯涓簄ull
+            List<int> listLock = null;
+            if (listSearchLockId.Contains(-1) == false)
             {
                 listLock.AddRange(listSearchLockId);
             }
 
             var pra = new GetHistoryDataPra();
+            pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
             pra.DoorLockId = this.DeviceMac;
-            pra.CloudAccountId = listUser[0];
-            pra.OpenLockMode = listLock[0];
+            pra.CloudAccountIdArr = listUser;
+            pra.OpenLockModeArr = listLock;
             pra.UnlockTimeBegin = dateFrom;
             pra.UnlockTimeEnd = dateTo;
             return pra;
@@ -457,7 +539,7 @@
         /// <summary>
         /// 鑾峰彇鍘嗗彶璁板綍鏁版嵁
         /// </summary>
-        private class GetHistoryDataPra
+        private class GetHistoryDataPra : IfacePraCommon
         {
             /// <summary>
             /// RequestVersion
@@ -466,7 +548,7 @@
             /// <summary>
             /// Token
             /// </summary>
-            public string LoginAccessToken = Shared.Common.Config.Instance.Token;
+            public string LoginAccessToken = string.Empty;
             /// <summary>
             /// 浣忓畢ID
             /// </summary>
@@ -478,11 +560,11 @@
             /// <summary>
             ///  Config.Instance.Guid 鎴栬�� MemberInfoRes.SubAccountDistributedMark
             /// </summary>
-            public string CloudAccountId = string.Empty;
+            public List<string> CloudAccountIdArr = new List<string>();
             /// <summary>
             ///  寮�閿佹柟寮�(0:瀵嗙爜銆�15:鎸囩汗銆�3:IC鍗�)
             /// </summary>
-            public int OpenLockMode = -1;
+            public List<int> OpenLockModeArr = null;
             /// <summary>
             /// 寮�閿佹槸鍚︽垚鍔�
             /// </summary>
@@ -522,7 +604,7 @@
         private class HistoryInfo
         {
             /// <summary>
-            /// 寮�閿佹柟寮�
+            /// 寮�閿佹柟寮� 0:瀵嗙爜  15:鎸囩汗  3:IC鍗�
             /// </summary>
             public int OpenLockMode = -1;
             /// <summary>
@@ -533,6 +615,10 @@
             /// 寮�閿佹槸鍚︽垚鍔�
             /// </summary>
             public bool UnlockIsSuccess = false;
+            /// <summary>
+            /// 璐﹀彿鐨処D
+            /// </summary>
+            public string CloudAccountId = string.Empty;
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs
index bb7014c..5a82b3d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs
@@ -150,7 +150,7 @@
                 Text = Language.StringByID(R.MyInternationalizationString.NextStepXm),
                 TextColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                 Gravity = Gravity.CenterHorizontal,
-                Radius = 10,
+                Radius = (uint)Application.GetRealHeight(127 / 2),
                 TextSize = 20,
                 Enable = false,
                 BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect,
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
index 62d78a5..6457f60 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
@@ -97,15 +97,7 @@
             Y = Application.GetRealHeight(98),
             UnSelectedImagePath = "DoorLock/Left.png",
         };
-
-        /// <summary>
-        /// 鏍囬杩斿洖鎸夐敭
-        /// </summary>
-        public Button btnTip = new Button
-        {
-            Gravity = Gravity.Center,
-        };
-
+  
         /// <summary>
         /// 鏍囬涓嬬嚎
         /// </summary>
@@ -152,7 +144,7 @@
             };
             titleFrameLayout.AddChidren(title);
             btnBackFrameLayout.AddChidren(btnBack);
-            this.midFrameLayout.AddChidren(this.btnTip);
+            //this.midFrameLayout.AddChidren(this.btnTip);
         }
         /// <summary>
         /// 闂ㄩ攣涓儴甯冨眬
@@ -274,6 +266,7 @@
                         System.Threading.Thread.Sleep(500);
                         doorLock.RemoteUnlockPassword = editInputPassword.Text;
                         ZigBee.Device.DoorLock.minValue = DateTime.MinValue;
+                        ZigBee.Device.DoorLock.failedCount = 3;
                         ZigBee.Device.DoorLock.RemoteUnlockCount = 5;
                         oldTime = DateTime.MaxValue;
                         CommonPage.Loading.Hide();
@@ -350,6 +343,55 @@
                     btnNext.IsSelected = false;
                 }
                 dialog.Close();
+            };
+        }
+
+        /// <summary>
+        /// 瀹夊叏楠岃瘉
+        /// </summary>
+        /// <param name="doorLock">闂ㄩ攣璁惧</param>
+        /// <param name="action">浜屾楠岃瘉鐨勭粨鏋滄垚鍔熷悗鐨勯�氱煡</param> 
+        public static void SecurityRequest(ZigBee.Device.DoorLock doorLock, Action action)
+        {
+            var dialog2 = new Dialog { };
+            var doorDialog2 = new Shared.Phone.UserCenter.DoorLock.DoorlockDialog(dialog2, Language.StringByID(R.MyInternationalizationString.Tip));
+            doorDialog2.Show();
+            doorDialog2.dialogMidFraFrameLayout.Width = Application.GetRealWidth(674);
+            doorDialog2.dialogMidFraFrameLayout.Height = Application.GetRealHeight(115);
+            doorDialog2.dialogMidFraFrameLayout.X = Application.GetRealWidth(60);
+            doorDialog2.dialogMidFraFrameLayout.Y = Application.GetRealHeight(167);
+            doorDialog2.dialogBtnConfirm.Text = Language.StringByID(R.MyInternationalizationString.GoSetting);
+            var midText1 = new Button()
+            {
+                Width = Application.GetRealWidth(674),
+                Height = Application.GetRealHeight(115 / 2),
+                TextSize = 14,
+                TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
+                TextAlignment = TextAlignment.Center,
+                TextID = R.MyInternationalizationString.GoPersonalCenter,
+            };
+            doorDialog2.dialogMidFraFrameLayout.AddChidren(midText1);
+            var midText2 = new Button()
+            {
+                Width = Application.GetRealWidth(674),
+                Height = Application.GetRealHeight(115 / 2),
+                Y = Application.GetRealHeight(115 / 2),
+                TextSize = 14,
+                TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
+                TextAlignment = TextAlignment.Center,
+                TextID = R.MyInternationalizationString.OpenRemoteVerification,
+            };
+            doorDialog2.dialogMidFraFrameLayout.AddChidren(midText2);
+
+            doorDialog2.dialogBtnCancel.MouseUpEventHandler += (sender2, e2) =>
+            {
+                dialog2.Close();
+            };
+            doorDialog2.dialogBtnConfirm.MouseUpEventHandler += async (sender2, e2) =>
+            {
+                var form = new UserCenter.UserMain.SecondAuthenticationForm();
+                form.AddForm();
+                dialog2.Close();
             };
         }
 
@@ -492,6 +534,7 @@
                         {
                             if (remoteControlResult.responseData.status == 0)
                             {
+                                ZigBee.Device.DoorLock.failedCount = 3;
                                 if (progressButton != null)
                                 {
                                     progressButton.Y = Application.GetRealHeight(347);
@@ -500,14 +543,17 @@
                                 {
                                     btnDoorLockPic.IsSelected = false;
                                 }
-                                if (btnStatus != null)
-                                {
-                                    Application.RunOnMainThread(() =>
-                                    {
-                                        btnStatus.Text = Language.StringByID(R.MyInternationalizationString.DoorLockOpen);
-                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnlockSuccess), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1);
-                                    });
-                                }
+
+                                btnStatus.Text = Language.StringByID(R.MyInternationalizationString.DoorLockOpen);
+                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnlockSuccess), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1);
+                                //Application.RunOnMainThread(() =>
+                                //{
+                                //    if (btnStatus != null)
+                                //    {
+                                //        btnStatus.Text = Language.StringByID(R.MyInternationalizationString.DoorLockOpen);
+                                //        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnlockSuccess), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1);
+                                //    }
+                                //});
                                 System.Threading.Thread.Sleep(5000);
                             }
                             else
@@ -526,46 +572,69 @@
                                     {
                                         btnStatus.Text = Language.StringByID(R.MyInternationalizationString.CLose);
                                     }
-                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnlockFailed), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1);
                                 });
+                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnlockFailed), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1);
                             }
                         }
                         else if (remoteControlResult != null && remoteControlResult.IsPawDispear == true)
                         {
-                            if (progressButton != null)
+                            ZigBee.Device.DoorLock.failedCount--;
+                            if (ZigBee.Device.DoorLock.failedCount != 0)
                             {
-                                progressButton.Y = Application.GetRealHeight(347);
-                            }
-                            if (btnDoorLockPic != null)
-                            {
-                                btnDoorLockPic.IsSelected = false;
-                            }
-                            Application.RunOnMainThread(() =>
-                            {
-                                if (btnStatus != null)
+                                if (progressButton != null)
                                 {
-                                    btnStatus.Text = Language.StringByID(R.MyInternationalizationString.CLose);
+                                    progressButton.Y = Application.GetRealHeight(347);
                                 }
-                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.DoorlockPasswordDispear), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1);
-                                CommonPage.Loading.Hide();
-                                doorLock.RemoteUnlockPassword = "";
-                            });
-                            dialog3.Close();
-
-                            if (UserCenterResourse.UserInfo.AuthorityNo == 1)
-                            {
-                                var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock);
-                                Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage);
-                                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
-                                userDoorLockPage.Show();
-
+                                if (btnDoorLockPic != null)
+                                {
+                                    btnDoorLockPic.IsSelected = false;
+                                }
+                                Application.RunOnMainThread(() =>
+                                {
+                                    if (btnStatus != null)
+                                    {
+                                        btnStatus.Text = Language.StringByID(R.MyInternationalizationString.CLose);
+                                    }
+                                });
+                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnlockFailed), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1);
                             }
                             else
                             {
-                                var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSettingSub(doorLock);
-                                Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage);
-                                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
-                                userDoorLockPage.Show();
+                                if (progressButton != null)
+                                {
+                                    progressButton.Y = Application.GetRealHeight(347);
+                                }
+                                if (btnDoorLockPic != null)
+                                {
+                                    btnDoorLockPic.IsSelected = false;
+                                }
+                                Application.RunOnMainThread(() =>
+                                {
+                                    if (btnStatus != null)
+                                    {
+                                        btnStatus.Text = Language.StringByID(R.MyInternationalizationString.CLose);
+                                    }
+                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.DoorlockPasswordDispear), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1);
+                                    CommonPage.Loading.Hide();
+                                    doorLock.RemoteUnlockPassword = "";
+                                });
+                                dialog3.Close();
+
+                                if (UserCenterResourse.UserInfo.AuthorityNo == 1)
+                                {
+                                    var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock);
+                                    Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage);
+                                    Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+                                    userDoorLockPage.Show();
+
+                                }
+                                else
+                                {
+                                    var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSettingSub(doorLock);
+                                    Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage);
+                                    Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+                                    userDoorLockPage.Show();
+                                }
                             }
                         }
                         else
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs
index 053522c..0a1e075 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs
@@ -181,7 +181,7 @@
                 TextColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                 Gravity = Gravity.CenterHorizontal,
                 BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack,
-                Radius = 10,
+                Radius = (uint)Application.GetRealHeight(127 / 2),
                 TextSize = 16,
             };
             bottomFrameLayout.AddChidren(completeBtn);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs
index ecffb1c..cef7875 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs
@@ -36,6 +36,9 @@
         /// 璁惧鐨勬煇涓�鍥炶矾
         /// </summary>
         private CommonDevice deviceObj = null;
+        Action action;
+        string modifyDeviceName = "";
+        bool IsModifyName = true;
         #endregion
 
         /// <summary>
@@ -94,7 +97,7 @@
 
             var bottomFrameLayout2 = new FrameLayout()
             {
-                Height = Application.GetRealHeight(1054),
+                Height = Application.GetRealHeight(1000),
                 Y = Application.GetRealHeight(418),
             };
             this.midFrameLayout.AddChidren(bottomFrameLayout2);
@@ -159,14 +162,55 @@
                 if (i == 0)
                 {
                     bottomRowLayout.Y = Application.GetRealHeight(220);
-                    btnName.Text = Language.StringByID(R.MyInternationalizationString.DeviceRemarkXm) + ":";
+                    btnName.Text = Language.StringByID(R.MyInternationalizationString.DeviceRemarkXm);
                     btnNextFrameLayout.Width = btnNext.Width = Application.GetRealWidth(789 - 58);
                     btnNextFrameLayout.X = Application.GetRealWidth(233);
-                    btnNext.TextAlignment = TextAlignment.CenterLeft;
-                    btnNext.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3;
                     btnNext.Text = doorLock.DeviceName;
+                    var btnDeviceNameEditText = new Button()
+                    {
+                        Width = Application.GetRealWidth(789 - 58),
+                        Height = Application.GetRealHeight(58),
+                        X = Application.GetRealWidth(46),
+                        TextAlignment = TextAlignment.CenterLeft,
+                        TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
+                        Text = doorLock.DeviceName
+                    };
+                    btnNextFrameLayout.AddChidren(btnDeviceNameEditText);
+                    //btnDeviceNameEditText.TextChangeEventHandler += (sender, e) =>
+                    //{
+                    //    modifyDeviceName = btnDeviceNameEditText.Text;
+                    //};
+                    //Action<Shared.View> actionEdit = async (obj) =>
+                    // {
+                    //     try
+                    //     {
+                    //         Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); });
+                    //         var doorLockDeviceList = new List<CommonDevice> { };
+                    //         doorLockDeviceList.Add(doorLock);
+                    //         var result = await Common.LocalDevice.Current.ReMacName(doorLockDeviceList, btnDeviceNameEditText.Text);
+                    //         if (result)
+                    //         {
+                    //             IsModifyName = false;
+                    //         }
+                    //         else
+                    //         {
+                    //             IsModifyName = true;
+                    //         }
+                    //     }
+                    //     catch { }
+                    //     finally
+                    //     {
+                    //         Application.RunOnMainThread(() =>
+                    //         {
+                    //             CommonPage.Loading.Hide();
+                    //         });
+                    //     }
+                    // };
+                    // btnDeviceNameEditText.EditorEnterAction += actionEdit;
+
                     btnLine.Visible = true;
                     btnLine.Y = Application.GetRealHeight(303);
+
                 }
                 else if (i == 1)
                 {
@@ -242,46 +286,26 @@
                     btnLine.Visible = false;
                     btnLine.Y = Application.GetRealHeight(992);
                 }
-                //else if (i == 6)
-                //{
-                //    bottomRowLayout.Y = Application.GetRealHeight(999 + 35);
-                //    btnName.Text = Language.StringByID(R.MyInternationalizationString.DoorLockShare);
-                //    btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png";
-                //    btnLine.Visible = true;
-                //    btnLine.Y = Application.GetRealHeight(1131);
-                //}
                 int currentIndex = i;
                 EventHandler<MouseEventArgs> eHandler = async (sender, e) =>
                  {
-                     if (currentIndex == 1)
+                     if (currentIndex == 3)
                      {
-                         //鑾峰彇璁惧鎵�灞炴埧闂�
-                         var aa = Common.Room.CurrentRoom.GetRoomByDevice(doorLock);
-                         //鑾峰彇璁惧鎵�鍦ㄦゼ灞�
-                         var bb = aa.FloorId;
-                         //鑾峰彇璁惧鎵�鍦ㄦゼ灞�
-                         var cc = aa.FloorId;
-                         //鑾峰彇妤煎眰鐨勫悕瀛�
-                         var dd = Common.Config.Instance.Home.GetFloorNameById(cc);
-                         //if (Common.Config.Instance.Home.FloorDics.Count == 0)//杩欎釜鏄棤妤煎眰妯″紡
-
-                         var listCheck = new List<string>();
-                     }
-                     else if (currentIndex == 3)
-                     {
-                         var result = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockOperateAccess(doorLock, Shared.Common.Config.Instance.Guid);
-                         if (result == false)
+                         if (!UserCenterResourse.Option.DoorUnLockByRemote)
                          {
-                             var temporaryPassword = new Shared.Phone.UserCenter.DoorLock.TemporaryPassword(doorLock);
-                             Shared.Phone.UserView.HomePage.Instance.AddChidren(temporaryPassword);
-                             Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
-                             temporaryPassword.Show();
+                             SecurityRequest(doorLock, action);
                          }
                          else
                          {
-                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                             action = async () =>
+                             {
+                                 var temporaryPassword = new Shared.Phone.UserCenter.DoorLock.TemporaryPassword(doorLock);
+                                 Shared.Phone.UserView.HomePage.Instance.AddChidren(temporaryPassword);
+                                 Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+                                 temporaryPassword.Show();
+                             };
+                             HdlCheckLogic.Current.CheckSecondarySecurity(action);
                          }
-
                      }
                      else if (currentIndex == 4)
                      {
@@ -308,12 +332,12 @@
                                  }
                                  else
                                  {
-                                     new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NoAccess), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                     new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NoAccess), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                  }
                              }
                              else
                              {
-                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                              }
                          }
                          else
@@ -344,7 +368,7 @@
                          }
                          else
                          {
-                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                          }
                      }
                  };
@@ -369,37 +393,29 @@
             //    TextSize = 16,
             //};
             //this.midFrameLayout.AddChidren(btnFinifh);
-            //btnFinish.MouseUpEventHandler += async (sender, e) =>
+            //btnFinish.MouseUpEventHandler += (sender, e) =>
             //{
-            //    //璁板綍璧峰綋鍓嶆鍦ㄦ搷浣滅殑鍥炶矾鍚嶅瓧
-            //    dicDeviceSaveName[nowSelectDevice.DeviceEpoint] = btnDeviceName.Text.Trim();
-            //    //寮�鍚繘搴︽潯
-            //    this.ShowProgressBar();
-            //    foreach (var epoint in dicDeviceSaveName.Keys)
+            //    System.Threading.Tasks.Task.Run(async () =>
             //    {
-            //        var device = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, epoint);
-            //        if (device == null || dicDeviceSaveName[epoint] == string.Empty)
+            //        Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); });
+            //        try
             //        {
-            //            //涓嶈兘鍏佽绌虹櫧鍚嶅瓧
-            //            continue;
-            //        }
-            //        string newName = dicDeviceSaveName[epoint];
-            //        string oldName = Common.LocalDevice.Current.GetDeviceEpointName(device);
-            //        if (oldName != newName)
-            //        {
-            //            //璁惧鍚嶇О淇敼
-            //            var result = await Common.LocalDevice.Current.ReName(device, newName);
-            //            if (result == false)
+            //            if (IsModifyName)
             //            {
-            //                //鍏抽棴
-            //                this.CloseProgressBar();
-            //                return;
+            //                var doorLockDeviceList = new List<CommonDevice> { };
+            //                doorLockDeviceList.Add(doorLock);
+            //                await Common.LocalDevice.Current.ReMacName(doorLockDeviceList, modifyDeviceName);
             //            }
             //        }
-            //    }
-            //    this.CloseProgressBar();
-            //    //鍏抽棴鑷韩
-            //    this.CloseForm();
+            //        catch { }
+            //        finally
+            //        {
+            //            Application.RunOnMainThread(() =>
+            //            {
+            //                CommonPage.Loading.Hide();
+            //            });
+            //        }
+            //    });
             //};
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSettingSub.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSettingSub.cs
index fe70ffa..39efc60 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSettingSub.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSettingSub.cs
@@ -233,12 +233,12 @@
                              }
                              else
                              {
-                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NoAccess), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NoAccess), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                              }
                          }
                          else
                          {
-                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                          }
                      }
                  };
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs
index bb4f462..f896578 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs
@@ -79,7 +79,8 @@
             {
                 var RowView = new FrameLayout()
                 {
-                    Height = Application.GetRealHeight(161),
+                    Height = Application.GetRealHeight(127 + 23),
+                    BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                 };
                 bodyView.AddChidren(RowView);
 
@@ -124,6 +125,7 @@
                 else
                 {
                     btnMemberName.Text = Language.StringByID(R.MyInternationalizationString.LinkageEvent);
+                    line2.Visible = false;
                 }
 
                 EventHandler<MouseEventArgs> eHandler = (sender, e) =>
@@ -164,7 +166,8 @@
                     }
                 };
                 btnRight.MouseUpEventHandler += eHandler;
-                RowView.MouseUpEventHandler += eHandler;
+                RowView.MouseUpEventHandler += eHandler;
+                btnMemberName.MouseUpEventHandler += eHandler;
             }
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberFrozenPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberFrozenPage.cs
index 29ec891..e7881a5 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberFrozenPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberFrozenPage.cs
@@ -47,13 +47,7 @@
             this.btnBack.MouseUpEventHandler += eHandlerBack;
             this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
             this.MidFrameLayout(this);
-            this.titleFrameLayout.MouseUpEventHandler += (sender, e) =>
-            {
-                var userDoorLockPage = new UserDoorLockPage(doorLock, curAccountObj);
-                Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage);
-                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
-                userDoorLockPage.Show();
-            };
+
             bodyView = new VerticalScrolViewLayout()
             {
             };
@@ -62,7 +56,7 @@
             ReadDoorLockUserInfo();
         }
 
-        public void MidRefresh()
+        public async void MidRefresh()
         {
             bodyView.RemoveAll();
 
@@ -70,8 +64,8 @@
             {
                 var RowView = new FrameLayout()
                 {
-                    Height = Application.GetRealHeight(127 + 20),
-                    BackgroundColor = Shared.Common.ZigbeeColor.Current.XMTopFrameLayout,
+                    Height = Application.GetRealHeight(127 + 23),
+                    BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                 };
                 bodyView.AddChidren(RowView);
 
@@ -128,7 +122,8 @@
                     btnRight.UnSelectedImagePath = "DoorLock/Switch.png";
                     btnRight.SelectedImagePath = "DoorLock/SwitchOn.png";
 
-                    if (doorLock.IsFreezeAccount[curAccountObj.SubAccountDistributedMark] == true)
+                    var result = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockOperateAccess(doorLock, curAccountObj.SubAccountDistributedMark);
+                    if (result == true)
                     {
                         btnRight.IsSelected = true;
                     }
@@ -150,7 +145,8 @@
                         btnRight.SelectedImagePath = "DoorLock/SwitchOn.png";
                         line2.Visible = false;
 
-                        if (doorLock.HasRemoteUnlockAccess[curAccountObj.SubAccountDistributedMark] == true)
+                        var result1 = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockUnlockAccess(doorLock, curAccountObj.SubAccountDistributedMark);
+                        if (result1 == true)
                         {
                             btnRight.IsSelected = true;
                         }
@@ -270,11 +266,11 @@
                                                      {
                                                          if (isFreeze)
                                                          {
-                                                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                          }
                                                          else
                                                          {
-                                                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                          }
                                                          return;
                                                      });
@@ -284,7 +280,7 @@
                                              {
                                                  Application.RunOnMainThread(() =>
                                                  {
-                                                     new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                     new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                  });
                                              }
                                          }
@@ -315,7 +311,7 @@
                                                  {
                                                      Application.RunOnMainThread(() =>
                                                      {
-                                                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                      });
                                                  }
                                              }
@@ -323,7 +319,7 @@
                                              {
                                                  Application.RunOnMainThread(() =>
                                                  {
-                                                     new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                     new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                  });
                                              }
                                          }
@@ -376,11 +372,11 @@
                                                          {
                                                              if (isFreeze)
                                                              {
-                                                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                              }
                                                              else
                                                              {
-                                                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                              }
                                                              return;
                                                          });
@@ -390,7 +386,7 @@
                                                  {
                                                      Application.RunOnMainThread(() =>
                                                      {
-                                                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(this.btnTip);
+                                                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(Common.CommonPage.Instance);
                                                      });
                                                  }
                                              }
@@ -424,7 +420,7 @@
                                                      {
                                                          Application.RunOnMainThread(() =>
                                                          {
-                                                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                          });
                                                      }
                                                  }
@@ -432,7 +428,7 @@
                                                  {
                                                      Application.RunOnMainThread(() =>
                                                      {
-                                                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(this.btnTip);
+                                                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(Common.CommonPage.Instance);
                                                      });
                                                  }
                                              }
@@ -442,11 +438,11 @@
                                                  {
                                                      if (isFreeze)
                                                      {
-                                                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed) + ".", Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(this.btnTip);
+                                                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed) + ".", Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(Common.CommonPage.Instance);
                                                      }
                                                      else
                                                      {
-                                                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed) + ".", Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(this.btnTip);
+                                                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed) + ".", Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(Common.CommonPage.Instance);
                                                      }
                                                      return;
                                                  });
@@ -456,7 +452,7 @@
                                          {
                                              Application.RunOnMainThread(() =>
                                              {
-                                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(this.btnTip);
+                                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(Common.CommonPage.Instance);
                                              });
                                          }
                                      }
@@ -500,11 +496,11 @@
                                          {
                                              if (isFreeze)
                                              {
-                                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.FreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                              }
                                              else
                                              {
-                                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnFreezeFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                              }
                                              return;
                                          });
@@ -514,7 +510,7 @@
                                  {
                                      Application.RunOnMainThread(() =>
                                      {
-                                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
 
                                      });
                                  }
@@ -612,7 +608,7 @@
                                             {
                                                 Application.RunOnMainThread(() =>
                                                 {
-                                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GiveAccessToSubaccountFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GiveAccessToSubaccountFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                 });
                                             }
                                         }
@@ -620,7 +616,7 @@
                                         {
                                             Application.RunOnMainThread(() =>
                                             {
-                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                             });
                                         }
                                     }
@@ -651,7 +647,7 @@
                                             {
                                                 Application.RunOnMainThread(() =>
                                                 {
-                                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CancelAccessToSubaccountFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CancelAccessToSubaccountFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                                 });
                                             }
                                         }
@@ -659,7 +655,7 @@
                                         {
                                             Application.RunOnMainThread(() =>
                                             {
-                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                             });
                                         }
                                     }
@@ -702,11 +698,11 @@
                                         {
                                             if (hasAccess)
                                             {
-                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GiveAccessToSubaccountFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GiveAccessToSubaccountFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                             }
                                             else
                                             {
-                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CancelAccessToSubaccountFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CancelAccessToSubaccountFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                             }
                                             return;
                                         });
@@ -716,7 +712,7 @@
                                 {
                                     Application.RunOnMainThread(() =>
                                     {
-                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                     });
                                 }
                             }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberManagement.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberManagement.cs
index 01aec14..f0de9bc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberManagement.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberManagement.cs
@@ -48,7 +48,7 @@
             {
                 var RowView = new FrameLayout()
                 {
-                    Height = Application.GetRealHeight(161),
+                    Height = Application.GetRealHeight(150),
                 };
                 bodyView.AddChidren(RowView);
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs
index b392c11..22e94a7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs
@@ -190,11 +190,9 @@
 
             var randomPassword = new EditText()
             {
-                X = Application.GetRealWidth(233),
                 Y = Application.GetRealHeight(153),
                 Height = Application.GetRealHeight(84),
-                Width = Application.GetRealWidth(251),
-                TextAlignment = TextAlignment.CenterRight,
+                TextAlignment = TextAlignment.Center,
                 TextSize = 24,
                 SecureTextEntry = false,
                 Enable = false,
@@ -215,47 +213,46 @@
             var validTime = new Button()
             {
                 Height = Application.GetRealHeight(55),
-                Width = Application.GetRealWidth(115),
-                X = Application.GetRealWidth(92),
+                Width = Application.GetRealWidth(92 + 115),
                 Y = Application.GetRealHeight(386),
                 TextColor = Shared.Common.ZigbeeColor.Current.XMGray2,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 14,
+                TextAlignment = TextAlignment.CenterRight,
+                TextSize = 16,
             };
             MidTopFrameLayout.AddChidren(validTime);
 
             var validTimeDate = new Button()
             {
                 Height = Application.GetRealHeight(49),
-                Width = Application.GetRealWidth(135),
-                X = Application.GetRealWidth(84),
+                Width = Application.GetRealWidth(84 + 135),
                 Y = Application.GetRealHeight(441),
                 TextColor = Shared.Common.ZigbeeColor.Current.XMGray2,
-                TextSize = 10,
+                TextSize = 12,
+                TextAlignment = TextAlignment.CenterRight,
             };
             MidTopFrameLayout.AddChidren(validTimeDate);
 
             var inValidTime = new Button()
             {
                 Height = Application.GetRealHeight(55),
-                Width = Application.GetRealWidth(118),
+                Width = Application.GetRealWidth(717 - 507),
                 X = Application.GetRealWidth(507),
                 Y = Application.GetRealHeight(389),
                 TextColor = Shared.Common.ZigbeeColor.Current.XMGray2,
                 TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 14,
+                TextSize = 16,
             };
             MidTopFrameLayout.AddChidren(inValidTime);
 
             var inValidTimeDate = new Button()
             {
                 Height = Application.GetRealHeight(49),
-                Width = Application.GetRealWidth(135),
+                Width = Application.GetRealWidth(717 - 508),
                 X = Application.GetRealWidth(508),
                 Y = Application.GetRealHeight(444),
                 TextColor = Shared.Common.ZigbeeColor.Current.XMGray2,
                 TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 10,
+                TextSize = 12,
             };
             MidTopFrameLayout.AddChidren(inValidTimeDate);
 
@@ -281,7 +278,6 @@
             {
                 randomPassword.Text = "- - - - - -";
                 temPasswordVisiable.Visible = false;
-                randomPassword.X = Application.GetRealWidth(215);
                 randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMGray4;
                 Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.IsModify = true;
                 topPic.Visible = true;
@@ -794,7 +790,7 @@
                     }
                     else
                     {
-                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                     }
                 }
                 catch { }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TimeSettignPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TimeSettignPage.cs
index 1ab6e14..496c79a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TimeSettignPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TimeSettignPage.cs
@@ -129,7 +129,6 @@
 
             var MidTopFrameLayout = new FrameLayout()
             {
-                BackgroundColor = ZigbeeColor.Current.XMWhite,
             };
             this.midFrameLayout.AddChidren(MidTopFrameLayout);
 
@@ -138,7 +137,8 @@
             {
                 var rowLayout = new FrameLayout()
                 {
-                    Height = Application.GetRealHeight(58),
+                    Height = Application.GetRealHeight(127 + 23),
+                    BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                 };
                 MidTopFrameLayout.AddChidren(rowLayout);
 
@@ -181,10 +181,9 @@
                 var btnLine = new FrameLayout()
                 {
                     Width = Application.GetRealWidth(965),
-                    Height = Application.GetRealHeight(5),
+                    Height = 1,
                     X = Application.GetRealWidth(58),
                     BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
-
                 };
                 MidTopFrameLayout.AddChidren(btnLine);
 
@@ -195,7 +194,7 @@
 
                 if (i == 0)
                 {
-                    rowLayout.Y = Application.GetRealHeight(50);
+                    btnDateTime.Y = textDisplayDateFrameLayout.Y = btnNextFrameLayout.Y = Application.GetRealHeight(50);
                     btnLine.Y = Application.GetRealHeight(23 + 127);
 
                     textDisplayDate = new Button()
@@ -219,7 +218,8 @@
                 }
                 else if (i == 1)
                 {
-                    rowLayout.Y = Application.GetRealHeight(200);
+                    rowLayout.Y = 1 + Application.GetRealHeight(150);
+                    btnDateTime.Y = textDisplayDateFrameLayout.Y = btnNextFrameLayout.Y = Application.GetRealHeight(50);
                     btnLine.Y = Application.GetRealHeight(40 + 127 + 127);
                     textDisplayTime = new Button()
                     {
@@ -239,6 +239,7 @@
                     {
                         btnDateTime.Text = Language.StringByID(R.MyInternationalizationString.CurrentTime);
                     }
+                    btnLine.Visible = false;
                 }
                 int curIndex = i;
                 EventHandler<MouseEventArgs> hander = (sender, e) =>
@@ -437,6 +438,7 @@
                                 mList2.Add(m.ToString());
                             }
                         }
+                        // mUIPickerView.setNPicker(mList1, mList2, new List<string> { });
                         mUIPickerView.setNPicker(mList1, mList2, null);
                         mUIPickerView.setCurrentItems(dtNow.Hour, dtNow.Minute, 0);
                         if (CurentDoorLockTime != null)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs
index 7580a18..03c5f3e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs
@@ -112,19 +112,19 @@
                 btnAdd.Width = 0;
             }
             btnAdd.MouseDownEventHandler += (sender, e) =>
-        {
-            if (doorLock.IsFreezeAccount[curAccountObj.SubAccountDistributedMark] == true)
             {
-                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
-            }
-            else
-            {
-                var addUnLockMethod = new Shared.Phone.UserCenter.DoorLock.AddUnLockMethod(doorLock, curAccountObj);
-                Shared.Phone.UserView.HomePage.Instance.AddChidren(addUnLockMethod);
-                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
-                addUnLockMethod.Show();
-            }
-        };
+                if (doorLock.IsFreezeAccount[curAccountObj.SubAccountDistributedMark] == true)
+                {
+                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.None , CloseTime = 1 }.Show(Common.CommonPage.Instance);
+                }
+                else
+                {
+                    var addUnLockMethod = new Shared.Phone.UserCenter.DoorLock.AddUnLockMethod(doorLock, curAccountObj);
+                    Shared.Phone.UserView.HomePage.Instance.AddChidren(addUnLockMethod);
+                    Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+                    addUnLockMethod.Show();
+                }
+            };
             if (UserCenterResourse.UserInfo.AuthorityNo == 3)
             {
                 btnAddFrameLayout.Width = 0;
@@ -151,8 +151,8 @@
                 Width = Application.GetRealWidth(141 + 100),
                 Y = Application.GetRealHeight(35),
                 X = Application.GetRealWidth(812 - 100),
-                TextAlignment = TextAlignment.Center,
-                Text = Language.StringByID(R.MyInternationalizationString.LockMethod),
+                TextAlignment = TextAlignment.CenterRight,
+                Text = Language.StringByID(R.MyInternationalizationString.AllMethod),
                 TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText,
                 TextSize = 12,
             };
@@ -214,8 +214,8 @@
 
             bodyView = new VerticalScrolViewLayout()
             {
-                Y = midTopFrameLayout.Bottom,
-                Height = Application.GetRealHeight(1921 - 184 - 115 - 1),
+                Y = btnLine.Bottom,
+                BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
             };
             this.midFrameLayout.AddChidren(bodyView);
 
@@ -242,7 +242,7 @@
         {
             if (doorLock.IsFailedToGetDoorLockInfo[curAccountObj.SubAccountDistributedMark] == true)
             {
-                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                 return;
             }
             bodyView.RemoveAll();
@@ -274,17 +274,23 @@
                 btnPicTip.Visible = false;
                 btnPicTip1.Visible = false;
             }
-
+            if (curAccountDoorLockUserList.Keys.Count == 0)
+            {
+                return;
+            }
+            bodyView.Height = curAccountDoorLockUserList.Keys.Count * Application.GetRealHeight(127 + 23);
+            int i = 0;
             foreach (var curUserId in curAccountDoorLockUserList.Keys)
             {
                 var curDoorLockUser = curAccountDoorLockUserList[curUserId];
                 #region UI
                 var rowFrameLayout = new RowLayout()
                 {
-                    Height = Application.GetRealHeight(173),
+                    Height = Application.GetRealHeight(127 + 23),
                     X = Application.GetRealWidth(58),
                     Width = Application.GetRealWidth(965),
                     LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
+                    BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                 };
                 bodyView.AddChidren(rowFrameLayout);
 
@@ -345,6 +351,12 @@
                 rowFrameLayout.AddRightView(btnDel);
                 #endregion 
                 #region 鏁版嵁澶勭悊
+                int currentIndex = i;
+                if (currentIndex == curAccountDoorLockUserList.Keys.Count - 1)
+                {
+                    rowFrameLayout.LineColor = Shared.Common.ZigbeeColor.Current.XMWhite;
+                }
+
                 switch (curDoorLockUser.UnlockType)
                 {
                     case 0:
@@ -553,7 +565,8 @@
                         }
                     };
                 };
-                #endregion 
+                #endregion
+                i++;
             }
         }
 
@@ -750,7 +763,11 @@
                 btnPicTip.Visible = false;
                 btnPicTip1.Visible = false;
             }
-
+            if (curAccountDoorLockUserList.Keys.Count == 0)
+            {
+                return;
+            }
+            int i = 0;
             foreach (var curUserId in curAccountDoorLockUserList.Keys)
             {
                 var curDoorLockUser = curAccountDoorLockUserList[curUserId];
@@ -761,7 +778,7 @@
                 #region UI
                 var rowFrameLayout = new RowLayout()
                 {
-                    Height = Application.GetRealHeight(173),
+                    Height = Application.GetRealHeight(127 + 23),
                     X = Application.GetRealWidth(58),
                     Width = Application.GetRealWidth(965),
                     LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
@@ -825,6 +842,11 @@
                 rowFrameLayout.AddRightView(btnDel);
                 #endregion 
                 #region 鏁版嵁澶勭悊
+                int currentIndex = i;
+                if (currentIndex == curAccountDoorLockUserList.Keys.Count - 1)
+                {
+                    rowFrameLayout.LineColor = Shared.Common.ZigbeeColor.Current.XMWhite;
+                }
                 switch (curDoorLockUser.UnlockType)
                 {
                     case 0:
@@ -987,7 +1009,10 @@
                     };
                 };
                 #endregion
+                i++;
             }
+
+            bodyView.Height = i * Application.GetRealHeight(127 + 23);
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs
index 4efd8ca..b1c5875 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs
@@ -112,7 +112,7 @@
                             {
                                 Application.RunOnMainThread(() =>
                                 {
-                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                     return;
                                 });
                             }
@@ -122,7 +122,7 @@
                     {
                         Application.RunOnMainThread(() =>
                         {
-                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                         });
                     }
                 }
@@ -148,8 +148,7 @@
             EventHandler<MouseEventArgs> eHandlerBack = (sender, e) =>
             {
                 RemoveFromParent();
-                this.btnTip.Visible = false;
-            };
+             };
             this.btnBack.MouseUpEventHandler += eHandlerBack;
             this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
             this.MidFrameLayout(this);
@@ -172,8 +171,8 @@
                 Width = Application.GetRealWidth(141 + 100),
                 Y = Application.GetRealHeight(35),
                 X = Application.GetRealWidth(812 - 100),
-                TextAlignment = TextAlignment.Center,
-                Text = Language.StringByID(R.MyInternationalizationString.LockMethod),
+                TextAlignment = TextAlignment.CenterRight,
+                Text = Language.StringByID(R.MyInternationalizationString.AllMethod),
                 TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText,
                 TextSize = 12,
             };
@@ -215,6 +214,8 @@
         void RefreshList()
         {
             bodyView.RemoveAll();
+            var curLocalDoorLockUserList = new Dictionary<int, DoorLockCommonInfo.LocaDoorLockObj>();
+
             foreach (var curUserId in doorLock.localDoorLockUserList.Keys)
             {
                 var curDoorLockUser = doorLock.localDoorLockUserList[curUserId];
@@ -226,12 +227,19 @@
                 {
                     continue;
                 }
-                var RowView = new FrameLayout()
+                curLocalDoorLockUserList.Add(curUserId, curDoorLockUser);
+            }
+
+            int i = 0;
+            foreach (var curUserId in curLocalDoorLockUserList.Keys)
+            {
+                var curDoorLockUser = curLocalDoorLockUserList[curUserId];
+                var rowFrameLayout = new FrameLayout()
                 {
-                    Height = Application.GetRealHeight(161),
+                    Height = Application.GetRealHeight(127 + 23),
                     BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                 };
-                bodyView.AddChidren(RowView);
+                bodyView.AddChidren(rowFrameLayout);
 
                 var btnDistributeUnlockIconFrameLayout = new FrameLayout()
                 {
@@ -240,7 +248,7 @@
                     X = Application.GetRealWidth(58),
                     Y = Application.GetRealHeight(43),
                 };
-                RowView.AddChidren(btnDistributeUnlockIconFrameLayout);
+                rowFrameLayout.AddChidren(btnDistributeUnlockIconFrameLayout);
 
                 var btnDistributeUnlockIcon = new Button()
                 {
@@ -259,19 +267,24 @@
                     TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                     Gravity = Gravity.CenterVertical,
                 };
-                RowView.AddChidren(btnText);
+                rowFrameLayout.AddChidren(btnText);
 
                 var line2 = new Button()
                 {
-                    Y = RowView.Height - 1,
+                    Y = rowFrameLayout.Height - 1,
                     X = Application.GetRealWidth(58),
                     Width = Application.GetRealWidth(965),
                     Height = 1,
                     BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
                 };
-                RowView.AddChidren(line2);
+                rowFrameLayout.AddChidren(line2);
 
                 #region 鏁版嵁澶勭悊
+                int currentIndex = i;
+                if (currentIndex == curLocalDoorLockUserList.Keys.Count - 1)
+                {
+                    line2.Visible = false;
+                }
                 switch (curDoorLockUser.UnlockType)
                 {
                     case 0:
@@ -312,9 +325,10 @@
                 };
                 btnDistributeUnlockIcon.MouseUpEventHandler += eHandler;
                 btnDistributeUnlockIconFrameLayout.MouseUpEventHandler += eHandler;
-                RowView.MouseUpEventHandler += eHandler;
+                rowFrameLayout.MouseUpEventHandler += eHandler;
                 btnText.MouseUpEventHandler += eHandler;
                 #endregion
+                i++;
             }
         }
 
@@ -476,7 +490,7 @@
                     if (doorLock.IsFreezeAccount[currentAccount.SubAccountDistributedMark] == true)
                     {
 
-                        new Tip() { MaxWidth = 150, Text = btnUserName.Text + Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                        new Tip() { MaxWidth = 150, Text = btnUserName.Text + Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                         return;
                     }
 
@@ -595,12 +609,12 @@
                             }
                             else
                             {
-                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                             }
                         }
                         else
                         {
-                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinish);
+                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                             flMain.RemoveFromParent();
                             bottomFrameLayout.RemoveAll();
                         }
@@ -778,6 +792,9 @@
         void DisplayByType(int unlockMethod)
         {
             bodyView.RemoveAll();
+
+            var curLocalDoorLockUserList = new Dictionary<int, DoorLockCommonInfo.LocaDoorLockObj>();
+
             foreach (var curUserId in doorLock.localDoorLockUserList.Keys)
             {
                 var curDoorLockUser = doorLock.localDoorLockUserList[curUserId];
@@ -785,12 +802,20 @@
                 {
                     continue;
                 }
-                var RowView = new FrameLayout()
+                curLocalDoorLockUserList.Add(curUserId, curDoorLockUser);
+            }
+
+            int i = 0;
+            foreach (var curUserId in curLocalDoorLockUserList.Keys)
+            {
+                var curDoorLockUser = curLocalDoorLockUserList[curUserId];
+
+                var rowFrameLayout = new FrameLayout()
                 {
-                    Height = Application.GetRealHeight(161),
+                    Height = Application.GetRealHeight(150),
                     BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                 };
-                bodyView.AddChidren(RowView);
+                bodyView.AddChidren(rowFrameLayout);
 
                 var btnDistributeUnlockIconFrameLayout = new FrameLayout()
                 {
@@ -799,7 +824,7 @@
                     X = Application.GetRealWidth(58),
                     Y = Application.GetRealHeight(43),
                 };
-                RowView.AddChidren(btnDistributeUnlockIconFrameLayout);
+                rowFrameLayout.AddChidren(btnDistributeUnlockIconFrameLayout);
 
                 var btnDistributeUnlockIcon = new Button()
                 {
@@ -818,19 +843,25 @@
                     TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                     Gravity = Gravity.CenterVertical,
                 };
-                RowView.AddChidren(btnText);
+                rowFrameLayout.AddChidren(btnText);
 
                 var line2 = new Button()
                 {
-                    Y = RowView.Height - 1,
+                    Y = rowFrameLayout.Height - 1,
                     X = Application.GetRealWidth(58),
                     Width = Application.GetRealWidth(965),
                     Height = 1,
                     BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
                 };
-                RowView.AddChidren(line2);
+                rowFrameLayout.AddChidren(line2);
 
                 #region 鏁版嵁澶勭悊
+                int currentIndex = i;
+                if (currentIndex == curLocalDoorLockUserList.Keys.Count - 1)
+                {
+                    line2.Visible = false;
+                }
+
                 switch (curDoorLockUser.UnlockType)
                 {
                     case 0:
@@ -871,9 +902,10 @@
                 };
                 btnDistributeUnlockIcon.MouseUpEventHandler += eHandler;
                 btnDistributeUnlockIconFrameLayout.MouseUpEventHandler += eHandler;
-                RowView.MouseUpEventHandler += eHandler;
+                rowFrameLayout.MouseUpEventHandler += eHandler;
                 btnText.MouseUpEventHandler += eHandler;
                 #endregion
+                i++;
             }
         }
         #region 鈼� 鎺ュ彛瀹炵幇__________________________
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
index 4044118..891421a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -6,11 +6,13 @@
 {
     public class UserDoorLockPage : DoorLockCommonLayout, ZigBee.Common.IStatus
     {
-        public UserDoorLockPage(ZigBee.Device.DoorLock doorLock, Shared.Phone.UserCenter.MemberInfoRes accountObj)
+
+        public UserDoorLockPage(Shared.Common.Room room ,DeviceUI doorLock)
         {
-            this.doorLock = doorLock;
-            //currentRoom = room;Shared.Common.Room room, 
-            BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCTopViewBackgroundColor;
+            this.doorLock = doorLock.CommonDevice as ZigBee.Device.DoorLock;
+            currentRoom = room;
+            deviceUI = doorLock;
+             BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCTopViewBackgroundColor;
             ZigBee.Device.ZbGateway.StatusList.Add(this);
         }
 
@@ -18,6 +20,7 @@
         ZigBee.Device.DoorLock doorLock;
         FrameLayout bottomFrameLayout;
         Shared.Common.Room currentRoom;
+        DeviceUI deviceUI;
         Action action;
         #endregion
 
@@ -44,14 +47,22 @@
             };
             this.titleFrameLayout.AddChidren(btnShare);
 
+            var btnFuncSetFrameLayout = new FrameLayout
+            {
+                X = Application.GetRealWidth(850 - 116),
+                Height = Application.GetRealHeight(69),
+                Width = Application.GetRealWidth(69 * 2 + 58),
+            };
+            this.titleFrameLayout.AddChidren(btnFuncSetFrameLayout);
+
             var btnFuncSet = new Button
             {
-                X = Application.GetRealWidth(953 - 116),
+                X = Application.GetRealWidth(103),
                 Height = Application.GetRealHeight(69),
                 Width = Application.GetRealWidth(69),
                 UnSelectedImagePath = "DoorLock/SettingIcon.png",
             };
-            this.titleFrameLayout.AddChidren(btnFuncSet);
+            btnFuncSetFrameLayout.AddChidren(btnFuncSet);
             btnFuncSet.MouseDownEventHandler += (sender, e) =>
             {
                 if (UserCenterResourse.UserInfo.AuthorityNo == 1)
@@ -119,11 +130,9 @@
             midTopFrameLayout.AddChidren(btnRecord);
             btnRecord.MouseDownEventHandler += (sender, e) =>
             {
-                var doorLock = new ZigBee.Device.DoorLock();
-                var doorLockRecord = new Shared.Phone.UserCenter.DoorLock.HistoryRecordPage(doorLock);
-                Shared.Phone.UserView.HomePage.Instance.AddChidren(doorLockRecord);
-                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
-                doorLockRecord.Show();
+                //鍘嗗彶璁板綍 ----   stan
+                var form = new DeviceDoorLock.DoorLockHistoryLogForm();
+                form.AddForm(this.doorLock.DeviceAddr);
             };
 
             var btnCollect = new Button()
@@ -141,11 +150,11 @@
                 btnCollect.IsSelected = !btnCollect.IsSelected;
                 if (btnCollect.IsSelected)
                 {
-                    // Shared.Common.Room.CurrentRoom.GetLoveRoom().DeleteDevice(doorLock.FileName); //鍙栨秷鏀惰棌
+                    Shared.Common.Room.CurrentRoom.GetLoveRoom().DeleteDevice(deviceUI.FileName); //鍙栨秷鏀惰棌
                 }
                 else
                 {
-                    //Shared.Common.Room.CurrentRoom.GetLoveRoom().AddDevice(doorLock.FileName);//鏀惰棌
+                    Shared.Common.Room.CurrentRoom.GetLoveRoom().AddDevice(deviceUI.FileName);//鏀惰棌
                 }
             };
 
@@ -188,7 +197,7 @@
 
             var btnFrameLayout = new FrameLayout()
             {
-                Width = Application.GetRealWidth(420 - 46),//639-35
+                Width = Application.GetRealWidth(420 - 46),
                 Height = Application.GetRealHeight(446),
                 X = btnDoorLockPic.Right,
                 Y = Application.GetRealHeight(354),
@@ -279,7 +288,7 @@
                 Height = Application.GetRealHeight(49),
                 X = Application.GetRealWidth(150),
                 Y = Application.GetRealHeight(46),
-                // Text = currentRoom.Name,
+                Text = currentRoom.Name,
                 TextColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                 TextSize = 12,
                 TextAlignment = TextAlignment.CenterLeft,
@@ -301,12 +310,12 @@
                          }
                          else
                          {
-                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NoAccess), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NoAccess), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                          }
                      }
                      else
                      {
-                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                      }
                  }
                  else
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs
index 7727d38..db92327 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs
@@ -68,7 +68,7 @@
                     {
                         Application.RunOnMainThread(() =>
                         {
-                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                         });
                     }
                 }
@@ -152,8 +152,8 @@
                 var currentAccount = doorLock.localAllAccountList[i];
                 var RowView = new FrameLayout()
                 {
-                    Height = Application.GetRealHeight(161),
-                    BackgroundColor = Shared.Common.ZigbeeColor.Current.XMTopFrameLayout,
+                    Height = Application.GetRealHeight(127 + 23),
+                    BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                 };
                 midVerticalScrolViewLayout.AddChidren(RowView);
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApSelectNetworkForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApSelectNetworkForm.cs
index 1c4d446..286daf5 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApSelectNetworkForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApSelectNetworkForm.cs
@@ -45,7 +45,7 @@
             frameBack.AddChidren(btnTitle);
 
             //WIFI
-            var rowWifi = new FrameCaptionInputControl("WiFi", string.Empty);
+            var rowWifi = new FrameCaptionInputControl("WiFi", HdlWifiLogic.Current.SSID);
             rowWifi.Y = Application.GetRealHeight(124);
             frameBack.AddChidren(rowWifi);
             rowWifi.InitControl();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpSelectNetworkForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpSelectNetworkForm.cs
index d7bdf96..3b6c10a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpSelectNetworkForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpSelectNetworkForm.cs
@@ -23,8 +23,11 @@
             //璁剧疆澶撮儴淇℃伅
             base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddWirelessGateway));
 
-            //鍒濆鍖栦腑閮ㄤ俊鎭�
-            this.InitMiddleFrame();
+            HdlThreadLogic.Current.RunMainInThread(() =>
+            {
+                //鍒濆鍖栦腑閮ㄤ俊鎭�
+                this.InitMiddleFrame();
+            });
         }
 
         /// <summary>
@@ -49,7 +52,6 @@
 
             //WIFI
             var rowWifi = new FrameCaptionViewControl("WiFi", HdlWifiLogic.Current.SSID);
-            //var rowWifi = new FrameCaptionViewControl("WiFi", "software");
             rowWifi.UseClickStatu = false;
             rowWifi.Y = Application.GetRealHeight(124);
             frameBack.AddChidren(rowWifi);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs
index 2a2ea96..334034f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs
@@ -87,6 +87,9 @@
         /// </summary>
         private async void SetBackupInfoToForm()
         {
+            this.nowSelectBackId = string.Empty;
+            this.nowbtnSelect = null;
+
             //杩涘害鏉�
             this.ShowProgressBar();
 
@@ -128,7 +131,19 @@
                         string msg = Language.StringByID(R.MyInternationalizationString.uDownLoadAndRecoverMsg);
                         this.ShowMassage(ShowMsgType.Confirm, msg, () =>
                          {
-                             this.LoadBackupInfo(this.nowSelectBackId);
+                             HdlThreadLogic.Current.RunThread(() =>
+                             {
+                                 //璇诲彇澶囦唤鏂囨。
+                                 bool result = HdlGatewayBackupLogic.Current.RecoverGateway(this.realGateway, this.nowSelectBackId);
+                                 if (result == true)
+                                 {
+                                     HdlThreadLogic.Current.RunMain(() =>
+                                     {
+                                         //鍏抽棴杩欎釜鐣岄潰
+                                         this.CloseForm();
+                                     });
+                                 }
+                             });
                          });
                     };
                     //璋冩暣鐪熷疄楂樺害
@@ -220,46 +235,6 @@
 
         #endregion
 
-        #region 鈻� 璇诲彇澶囦唤鏂囨。_______________________
-
-        /// <summary>
-        /// 璇诲彇澶囦唤鏂囨。
-        /// </summary>
-        /// <param name="BackupClassId"></param>
-        private void LoadBackupInfo(string BackupClassId)
-        {
-            HdlThreadLogic.Current.RunThread(async () =>
-            {
-                //鑾峰彇缃戝叧涓婇潰瀛樺湪鐨勫叏閮ㄦ枃浠�
-                var listFile = await this.GetGatewayFileFromGateway();
-                if (listFile == null)
-                {
-                    return;
-                }
-                //浠庝簯绔幏鍙栧浠界殑鏂囦欢
-                bool result = await HdlBackupLogic.Current.LoadGatewayBackupInfo(BackupClassId, realGateway, listFile);
-                if (result == false)
-                {
-                    //缃戝叧鎭㈠澶辫触
-                    string msg2 = Language.StringByID(R.MyInternationalizationString.uGatewayFileRecoverFail);
-                    this.ShowMassage(ShowMsgType.Error, msg2);
-                    return;
-                }
-
-                HdlThreadLogic.Current.RunMain(() =>
-                {
-                    //鍏抽棴鑷韩
-                    this.CloseForm();
-                });
-
-                //缃戝叧鎭㈠鎴愬姛
-                string msg = Language.StringByID(R.MyInternationalizationString.uGatewayFileRecoverSuccess);
-                this.ShowMassage(ShowMsgType.Normal, msg);
-            });
-        }
-
-        #endregion
-
         #region 鈻� 缂栬緫澶囦唤鍚嶇О_______________________
 
         /// <summary>
@@ -341,44 +316,6 @@
                 }
             });
         }
-
-        #endregion
-
-        #region 鈻� 鑾峰彇缃戝叧鏂囦欢_______________________
-
-        /// <summary>
-        /// 浠庣綉鍏宠幏鍙栧畠鐨勬枃浠�
-        /// </summary>
-        /// <returns></returns>
-        private async System.Threading.Tasks.Task<List<string>> GetGatewayFileFromGateway()
-        {
-            var fileData = await realGateway.FileTransferLsDirAsync();
-            //妫�娴嬬綉鍏宠繑鍥炵殑鍏遍�氶敊璇姸鎬佺爜
-            string error = HdlCheckLogic.Current.CheckCommonErrorCode(fileData);
-            if (error != null)
-            {
-                this.ShowMassage(ShowMsgType.Error, error);
-                return null;
-            }
-
-            if (fileData == null || fileData.fileTransferLsDiResponseData == null || fileData.fileTransferLsDiResponseData.Result != 0)
-            {
-                //鑾峰彇缃戝叧鏂囦欢澶辫触
-                string msg = Language.StringByID(R.MyInternationalizationString.uGetGatewayFileFail);
-                this.ShowMassage(ShowMsgType.Error, msg);
-                return null;
-            }
-            var listFile = new List<string>();
-            foreach (var filedata in fileData.fileTransferLsDiResponseData.Dir)
-            {
-                listFile.Add(filedata.File);
-            }
-            return listFile;
-        }
-
-        #endregion
-
-        #region 鈻� 涓�鑸柟娉昣__________________________
 
         #endregion
     }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
index 05a06bb..b16f33a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
@@ -215,6 +215,16 @@
             {
                 HdlGatewayLogic.Current.SaveGatewayIdToLocation(strWayId);
             }
+
+            //褰撳墠缃戝叧鐨勮鏍�
+            if (strWayId == GatewayResourse.AppOldSelectGatewayId)
+            {
+                var btnNow = new IconViewControl(52);
+                btnNow.Y = Application.GetMinReal(23) + gatewayRow.frameTable.chidrenYaxis;
+                btnNow.UnSelectedImagePath = "Item/NowAcctionTip.png";
+                btnNow.X = gatewayRow.btnName.X + gatewayRow.btnName.GetRealWidthByText(15);
+                gatewayRow.frameTable.AddChidren(btnNow, ChidrenBindMode.BindEventOnly);
+            }
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayUploadAndDownLoadForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayUploadAndDownLoadForm.cs
index 3688714..7bb53ef 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayUploadAndDownLoadForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayUploadAndDownLoadForm.cs
@@ -69,7 +69,11 @@
             var btnSwicth = frameAuto.AddMostRightSwitchIcon();
             btnSwicth.ButtonClickEvent += (sender, e) =>
             {
-                btnSwicth.IsSelected = !btnSwicth.IsSelected;
+                //璁剧疆鐘舵��
+                if (HdlGatewayLogic.Current.SetGatewayAutoBackupStatu(this.realGateway, !btnSwicth.IsSelected) == true)
+                {
+                    btnSwicth.IsSelected = !btnSwicth.IsSelected;
+                }
             };
 
             //涓婁紶鏁版嵁鑷充簯绔�
@@ -114,16 +118,58 @@
             frameDown.AddRightArrow();
             frameDown.ButtonClickEvent += (sender, e) =>
             {
+                if (this.realGateway == null)
+                {
+                    //閿欒:缃戝叧瀵硅薄涓㈠け
+                    string msg = Language.StringByID(R.MyInternationalizationString.uErrorGatewayLostMsg);
+                    this.ShowMassage(ShowMsgType.Error, msg);
+                    return;
+                }
                 var form = new GatewayBackUpListForm();
                 form.AddForm(this.realGateway);
             };
             //璋冩暣鐪熷疄楂樺害
             listView.AdjustRealHeight(Application.GetRealHeight(23));
+
+            HdlThreadLogic.Current.RunThread(() =>
+            {
+                //鑾峰彇缃戝叧鏁版嵁
+                this.GetGatewayData(btnSwicth);
+            });
         }
 
         #endregion
 
-        #region 鈻� 涓�鑸柟娉昣__________________________
+        #region 鈻� 鑾峰彇鏁版嵁___________________________
+
+        /// <summary>
+        /// 鑾峰彇缃戝叧鏁版嵁
+        /// </summary>
+        /// <param name="btnSwitch"></param>
+        private void GetGatewayData(MostRightIconControl btnSwitch)
+        {
+            //鎵撳紑杩涘害鏉�
+            this.ShowProgressBar();
+
+            //鑾峰彇缃戝叧鑷姩璁剧疆鐘舵��
+            var statu = HdlGatewayLogic.Current.GetGatewayAutoBackupStatu(realGateway);
+            if (statu == -1)
+            {
+                //鍏抽棴杩涘害鏉�
+                this.CloseProgressBar(ShowReLoadMode.YES);
+                return;
+            }
+            if (statu == 1)
+            {
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    btnSwitch.IsSelected = true;
+                });
+            }
+
+            //鍏抽棴杩涘害鏉�
+            this.CloseProgressBar();
+        }
 
         #endregion
     }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs
index 65888c1..283bfb1 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs
@@ -370,7 +370,7 @@
         /// <summary>
         /// 涓婁紶鑷姩澶囦唤鏁版嵁
         /// </summary>
-        public void UpLoadAutoBackupInfo()
+        private void UpLoadAutoBackupInfo()
         {
             HdlThreadLogic.Current.RunThread(async () =>
             {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayBackUpForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayBackUpForm.cs
deleted file mode 100755
index 2e6c079..0000000
--- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayBackUpForm.cs
+++ /dev/null
@@ -1,602 +0,0 @@
-锘縰sing Shared.Common;
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Threading.Tasks;
-using ZigBee.Device;
-
-namespace Shared.Phone.UserCenter.HdlBackup
-{
-    /// <summary>
-    /// 缃戝叧澶囦唤鐨勭晫闈�
-    /// </summary>
-    public class HdlGatewayBackUpForm : EditorCommonForm
-    {
-        #region 鈻� 鍙橀噺澹版槑___________________________
-
-        /// <summary>
-        /// 鍒楄〃鎺т欢
-        /// </summary>
-        private VerticalScrolViewLayout listView = null;
-        /// <summary>
-        /// 缃戝叧瀵硅薄(杩欎釜鏄湡瀹炵墿鐞嗙綉鍏冲璞�)
-        /// </summary>
-        private ZbGateway zbRealGateway = null;
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖朹____________________________
-
-        /// <summary>
-        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
-        /// </summary>
-        /// <param name="i_zbGateway"></param>
-        public void ShowForm(ZbGateway i_zbGateway)
-        {
-            this.zbRealGateway = i_zbGateway;
-
-            //璁剧疆鏍囬淇℃伅
-            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uBackupAndRecover));
-
-            //鍙充笂娣诲姞鎸夐挳
-            var btnTopIcon = new MostRightIconControl(69, 69);
-            btnTopIcon.UnSelectedImagePath = "Item/Add.png";
-            topFrameLayout.AddChidren(btnTopIcon);
-            btnTopIcon.InitControl();
-            btnTopIcon.ButtonClickEvent += (sender, e) =>
-            {
-                //鏄剧ず娣诲姞澶囪�冨悕鐢婚潰
-                //this.ShowAddBackupForm();
-            };
-
-            //鍒濆鍖栦腑閮ㄦ帶浠�
-            //this.InitMiddleFrame();
-        }
-
-        ///// <summary>
-        ///// 鍒濆鍖栦腑閮ㄦ帶浠�
-        ///// </summary>
-        //private void InitMiddleFrame()
-        //{
-        //    //娓呯┖bodyFrame
-        //    this.ClearBodyFrame();
-
-        //    listView = new VerticalScrolViewLayout();
-        //    listView.Height = bodyFrameLayout.Height;
-        //    bodyFrameLayout.AddChidren(listView);
-
-        //    HdlThreadLogic.Current.Run(() =>
-        //    {
-        //        //浠庝簯绔幏鍙栨暟鎹�
-        //        this.SetBackupInfoToForm();
-        //    });
-        //}
-
-        #endregion
-
-        //#region 鈻� 浠庝簯绔幏鍙栨暟鎹甠____________________
-
-        ///// <summary>
-        ///// 浠庝簯绔幏鍙栨暟鎹�
-        ///// </summary>
-        //private async void SetBackupInfoToForm()
-        //{
-        //    //杩涘害鏉�
-        //    this.ShowProgressBar();
-
-        //    //浠庝簯绔幏鍙栨暟鎹� 
-        //    var pageData = await HdlBackupLogic.Current.GetBackupListNameFromDB(2, Common.LocalGateway.Current.GetGatewayId(zbRealGateway));
-        //    //鍏抽棴
-        //    this.CloseProgressBar();
-
-        //    if (pageData == null)
-        //    {
-        //        return;
-        //    }
-
-        //    Application.RunOnMainThread(() =>
-        //    {
-        //        if (listView != null)
-        //        {
-        //            listView.RemoveAll();
-        //        }
-        //    });
-
-        //    foreach (BackupListNameInfo fileInfo in pageData)
-        //    {
-        //        Application.RunOnMainThread(() =>
-        //        {
-        //            if (this.Parent != null)
-        //            {
-        //                //娣诲姞澶囦唤琛�
-        //                this.AddRowlayout(fileInfo);
-        //            }
-        //        });
-        //    }
-        //}
-
-        //#endregion
-
-        //#region 鈻� 娣诲姞澶囦唤琛宊________________________
-
-        ///// <summary>
-        ///// 娣诲姞澶囦唤琛�
-        ///// </summary>
-        ///// <param name="fileInfo"></param>
-        //private void AddRowlayout(BackupListNameInfo fileInfo)
-        //{
-        //    //琛�
-        //    var rowLayout = new StatuRowLayout(listView);
-        //    //鍥炬爣
-        //    var btnPoint = new RowLeftIconView();
-        //    btnPoint.SelectedImagePath = "Center/BackupSelected.png";
-        //    btnPoint.UnSelectedImagePath = "Center/Backup.png";
-        //    rowLayout.AddChidren(btnPoint);
-
-        //    //澶囦唤鍚嶅瓧
-        //    var txtText = new RowCenterView();
-        //    txtText.Text = fileInfo.BackupName;
-        //    rowLayout.AddChidren(txtText);
-        //    txtText.X -= ControlCommonResourse.PointXXLeft;
-
-        //    //缂栬緫澶囨敞鍚�
-        //    rowLayout.MouseUpEvent += (sender, e) =>
-        //    {
-        //        //鏄剧ず缂栬緫澶囪�冨悕鐢婚潰
-        //        this.ShowEditorBackupForm(fileInfo);
-        //    };
-
-        //    //涓嬭浇鍥炬爣
-        //    var btnLoad = new MostRightEmptyView();
-        //    //鍚敤鐐逛寒鍔熻兘
-        //    btnLoad.UseClickStatu = true;
-        //    btnLoad.UnSelectedImagePath = "Item/DownLoad.png";
-        //    btnLoad.SelectedImagePath = "Item/DownLoadSelected.png";
-        //    rowLayout.AddChidren(btnLoad, ChidrenBindMode.NotBind);
-        //    //涓嬭浇鍥炬爣澶彸杈逛笉濂界湅 
-        //    btnLoad.X -= Application.GetRealWidth(50);
-        //    btnLoad.MouseUpEventHandler += (sender, e) =>
-        //    {
-        //        //鏄惁瑕佷笅杞藉苟鎭㈠鏁版嵁锛�
-        //        string msg = Language.StringByID(R.MyInternationalizationString.uDownLoadAndRecoverMsg);
-        //        this.ShowConfirmMsg(msg, "LoadBackupInfo", fileInfo.Id);
-        //    };
-
-        //    //鍒犻櫎
-        //    var btnDelete = new RowDeleteButton();
-        //    rowLayout.AddRightView(btnDelete);
-        //    btnDelete.MouseUpEventHandler += (sender, e) =>
-        //    {
-        //        //纭畾瑕佸垹闄ゆ枃浠跺悧锛�
-        //        string msg = Language.StringByID(R.MyInternationalizationString.uDoDeleteFileMsg);
-        //        this.ShowConfirmMsg(msg, "DeleteBackInfo", fileInfo.Id, ShowErrorMode.YES);
-        //    };
-        //}
-
-        //#endregion
-
-        //#region 鈻� 璇诲彇澶囦唤鏂囨。_______________________
-
-        ///// <summary>
-        ///// 璇诲彇澶囦唤鏂囨。
-        ///// </summary>
-        ///// <param name="BackupClassId"></param>
-        //public void LoadBackupInfo(string BackupClassId)
-        //{
-        //    HdlThreadLogic.Current.Run(async () =>
-        //    {
-        //        //鑾峰彇缃戝叧涓婇潰瀛樺湪鐨勫叏閮ㄦ枃浠�
-        //        var listFile = await this.GetGatewayFileFromGateway();
-        //        if (listFile == null)
-        //        {
-        //            return;
-        //        }
-        //        //浠庝簯绔幏鍙栧浠界殑鏂囦欢
-        //        bool result = await HdlBackupLogic.Current.LoadGatewayBackupInfo(BackupClassId, zbRealGateway, listFile);
-        //        if (result == false)
-        //        {
-        //            //缃戝叧鎭㈠澶辫触
-        //            string msg2 = Language.StringByID(R.MyInternationalizationString.uGatewayFileRecoverFail);
-        //            this.ShowNormalMsg(msg2);
-        //            return;
-        //        }
-
-        //        Application.RunOnMainThread(() =>
-        //        {
-        //            //鍏抽棴鑷韩
-        //            this.CloseForm();
-        //        });
-
-        //        //缃戝叧鎭㈠鎴愬姛
-        //        string msg = Language.StringByID(R.MyInternationalizationString.uGatewayFileRecoverSuccess);
-        //        this.ShowNormalMsg(msg);
-        //    });
-        //}
-
-        //#endregion
-
-        //#region 鈻� 涓婁紶鏁版嵁___________________________
-
-        ///// <summary>
-        ///// 涓婁紶鏁版嵁
-        ///// </summary>
-        ///// <param name="backName"></param>
-        //private async void UpLoadBackInfo(string backName)
-        //{
-        //    //灞曞紑杩涘害鏉�
-        //    this.ShowProgressBar();
-
-        //    //鍒涘缓涓�涓浠藉悕瀛�
-        //    string backupClassId = await HdlBackupLogic.Current.CreatNewBackupNameToDB(backName, 2, Common.LocalGateway.Current.GetGatewayId(zbRealGateway));
-        //    if (backupClassId == null)
-        //    {
-        //        //鍒涘缓澶囦唤鍚嶅瓧澶辫触
-        //        string msg = Language.StringByID(R.MyInternationalizationString.uCreatBackupNameFail);
-        //        this.ShowErrorMsg(msg);
-
-        //        //鍏抽棴杩涘害鏉�
-        //        this.CloseProgressBar();
-        //        return;
-        //    }
-        //    //娣诲姞闄勫姞鎯呮姤:鑾峰彇缃戝叧鏁版嵁
-        //    string appendText = Language.StringByID(R.MyInternationalizationString.uGetGatewayData);
-        //    ProgressBar.SetAppendText(appendText);
-
-        //    //杩欓噷鏄粠缃戝叧鑾峰彇澶囦唤鏂囦欢:灏嗙綉鍏虫枃浠跺瓨鍏ュ埌鎸囧畾鐨勮矾寰勪笅
-        //    string directory = await this.SetGatewayFileInDirectory();
-        //    //鍏抽棴杩涘害鏉�
-        //    this.CloseProgressBar();
-        //    if (directory == null)
-        //    {
-        //        //濡傛灉涓婁紶澶辫触鐨勮瘽锛屽氨鎶婂畠鍒犻櫎
-        //        this.DeleteBackInfo(backupClassId, ShowErrorMode.NO);
-        //        return;
-        //    }
-
-        //    //娣诲姞闄勫姞鎯呮姤:涓婁紶鏁版嵁
-        //    appendText = Language.StringByID(R.MyInternationalizationString.uDataUpLoad);
-        //    ProgressBar.SetAppendText(appendText);
-
-        //    HdlThreadLogic.Current.Run(async () =>
-        //    {
-        //        //涓婁紶鏁版嵁鍒颁簯绔�
-        //        directory = UserCenterLogic.CombinePath(directory);
-        //        bool result = await HdlBackupLogic.Current.UpLoadBackupFileToDB(backupClassId, 2, directory);
-        //        //娓呯┖闄勫姞鎯呮姤
-        //        ProgressBar.SetAppendText(string.Empty);
-
-        //        if (result == false)
-        //        {
-        //            //鏂囦欢涓婁紶澶辫触
-        //            string msg = Language.StringByID(R.MyInternationalizationString.uFileUpLoadFail);
-        //            this.ShowErrorMsg(msg);
-
-        //            //濡傛灉涓婁紶澶辫触鐨勮瘽锛屽氨鎶婂畠鍒犻櫎
-        //            this.DeleteBackInfo(backupClassId, ShowErrorMode.NO);
-
-        //            return;
-        //        }
-
-        //        //鍒锋柊鐢婚潰
-        //        this.SetBackupInfoToForm();
-        //    });
-        //}
-
-        //#endregion
-
-        //#region 鈻� 缂栬緫澶囦唤鍚嶇О_______________________
-
-        ///// <summary>
-        ///// 缂栬緫澶囦唤鍚嶇О
-        ///// </summary>
-        ///// <param name="BackupClassId"></param>
-        ///// <param name="backName"></param>
-        //private async void EditorBackInfo(string BackupClassId, string backName)
-        //{
-        //    //寮�鍚繘搴︽潯
-        //    this.ShowProgressBar();
-
-        //    var Pra = new EditorBackUpNamePra();
-        //    Pra.BackupClassId = BackupClassId;
-        //    Pra.BackupName = backName;
-        //    //鑾峰彇鎺у埗涓讳汉璐﹀彿鐨凾oken
-        //    Pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
-
-        //    bool result = await UserCenterLogic.GetResultStatuByRequestHttps("App/UpdateHomeAppGatewayName", true, Pra);
-        //    if (result == false)
-        //    {
-        //        //缂栬緫澶囦唤鍚嶇О澶辫触
-        //        string msg = Language.StringByID(R.MyInternationalizationString.uEditorBackupNameFail);
-        //        this.ShowErrorMsg(msg);
-        //        //鍏抽棴杩涘害鏉�
-        //        this.CloseProgressBar();
-        //        return;
-        //    }
-
-        //    this.SetBackupInfoToForm();
-        //}
-
-        //#endregion
-
-        //#region 鈻� 鍒犻櫎澶囦唤鏂囨。_______________________
-
-        ///// <summary>
-        ///// 鍒犻櫎澶囦唤鏂囨。
-        ///// </summary>
-        ///// <param name="BackupClassId"></param>
-        ///// <param name="showMode"></param>
-        //public async void DeleteBackInfo(string BackupClassId, ShowErrorMode showMode = ShowErrorMode.YES)
-        //{
-        //    //杩涘害鏉�
-        //    this.ShowProgressBar();
-
-        //    bool success = await HdlBackupLogic.Current.DeleteDbBackupData(BackupClassId);
-
-        //    //鍏抽棴杩涘害鏉�
-        //    this.CloseProgressBar();
-
-        //    if (success == false)
-        //    {
-        //        if (showMode == ShowErrorMode.YES)
-        //        {
-        //            //鍒犻櫎澶囦唤澶辫触
-        //            string msg = Language.StringByID(R.MyInternationalizationString.uDeleteBackupFail);
-        //            this.ShowErrorMsg(msg);
-        //        }
-        //        return;
-        //    }
-
-        //    this.SetBackupInfoToForm();
-        //}
-
-        //#endregion
-
-        //#region 鈻� 鏄剧ず缂栬緫澶囪�冨悕鐢婚潰_________________
-
-        ///// <summary>
-        ///// 鏄剧ず缂栬緫澶囪�冨悕鐢婚潰
-        ///// </summary>
-        ///// <param name="fileInfo"></param>
-        ///// <returns></returns>
-        //private void ShowEditorBackupForm(BackupListNameInfo fileInfo)
-        //{
-        //    //鐢熸垚涓�涓脊绐楃敾闈�
-        //    var dialogForm = new DialogInputFrameControl(this, DialogFrameMode.OnlyInput);
-
-        //    //缂栬緫澶囦唤
-        //    dialogForm.SetTitleText(Language.StringByID(R.MyInternationalizationString.uEditorBackup));
-        //    //璇疯緭鍏ュ娉ㄥ悕绉�
-        //    dialogForm.SetTipText(Language.StringByID(R.MyInternationalizationString.uPleaseInpuBackup));
-        //    dialogForm.InputText = fileInfo.BackupName;
-
-        //    //鎸変笅纭鎸夐挳
-        //    dialogForm.ComfirmClickEvent += (() =>
-        //    {
-        //        string txtvalue = dialogForm.InputText;
-        //        //妫�娴嬪鑰冨悕绉�
-        //        if (this.CheckBackupName(txtvalue) == false)
-        //        {
-        //            return;
-        //        }
-
-        //        //鐢婚潰鍏抽棴
-        //        dialogForm.CloseDialog();
-
-        //        //鍚嶅瓧涓�鏍锋椂锛屼笉澶勭悊
-        //        if (txtvalue != fileInfo.BackupName)
-        //        {
-        //            //缂栬緫澶囦唤鍚嶇О
-        //            this.EditorBackInfo(fileInfo.Id, txtvalue);
-        //        }
-        //    });
-        //}
-
-        ///// <summary>
-        ///// 鏄剧ず娣诲姞澶囪�冨悕鐢婚潰
-        ///// </summary>
-        ///// <returns></returns>
-        //private void ShowAddBackupForm()
-        //{
-        //    //鐢熸垚涓�涓脊绐楃敾闈�
-        //    var dialogForm = new DialogInputFrameControl(this, DialogFrameMode.OnlyInput);
-
-        //    //娣诲姞澶囦唤
-        //    dialogForm.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddBackup));
-        //    //璇疯緭鍏ュ娉ㄥ悕绉�
-        //    dialogForm.SetTipText(Language.StringByID(R.MyInternationalizationString.uPleaseInpuBackup));
-
-        //    //鎸変笅纭鎸夐挳
-        //    dialogForm.ComfirmClickEvent += (() =>
-        //    {
-        //        string txtvalue = dialogForm.InputText;
-        //        //妫�娴嬪鑰冨悕绉�
-        //        if (this.CheckBackupName(txtvalue) == false)
-        //        {
-        //            return;
-        //        }
-
-        //        //鐢婚潰鍏抽棴
-        //        dialogForm.CloseDialog();
-
-        //        //涓婁紶澶囦唤
-        //        this.UpLoadBackInfo(txtvalue);
-        //    });
-        //}
-
-        //#endregion
-
-        //#region 鈻� 鑾峰彇缃戝叧鏂囦欢_______________________
-
-        ///// <summary>
-        ///// 灏嗙綉鍏虫枃浠跺瓨鍏ュ埌鎸囧畾鐨勮矾寰勪笅
-        ///// </summary>
-        ///// <returns></returns>
-        //private async Task<string> SetGatewayFileInDirectory()
-        //{
-        //    //涓婁紶缃戝叧澶囦唤鏂囦欢鍒颁簯绔殑涓存椂銆愭枃浠跺す銆�
-        //    string dir = System.IO.Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.GatewayBackupDirectory);
-        //    Global.CreateEmptyDirectory(dir, true);
-
-        //    //浠庣綉鍏宠幏鍙栧畠鐨勬枃浠�
-        //    var listFile = await this.GetGatewayFileFromGateway();
-        //    if (listFile == null)
-        //    {
-        //        return null;
-        //    }
-
-        //    int timeOutCount = 0;
-        //    bool receiving = false;
-
-        //    string checkTopic = Common.LocalGateway.Current.GetGatewayId(zbRealGateway) + "/FileTransfer/DownloadFile";
-        //    var listByteSource = new List<byte>();
-        //    //鎺ユ敹鏁版嵁
-        //    Action<string, byte[]> action = (topic, dataContent) =>
-        //    {
-        //        string[] arry = topic.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
-        //        string checkValue = arry[0] + "/" + arry[1] + "/" + arry[2];
-        //        if (arry.Length < 3 || checkValue != checkTopic)
-        //        {
-        //            return;
-        //        }
-        //        //鍒锋柊瓒呮椂鏃堕棿
-        //        timeOutCount = 0;
-        //        byte[] fileBytes = dataContent;
-        //        if (fileBytes[5] != 1)
-        //        {
-        //            if (fileBytes.Length == 2056)
-        //            {
-        //                var tempBytes = new byte[2048];
-        //                System.Array.Copy(fileBytes, 8, tempBytes, 0, 2048);
-        //                listByteSource.AddRange(tempBytes);
-        //            }
-        //            else
-        //            {
-        //                var tempBytes = new byte[fileBytes.Length - 8];
-        //                System.Array.Copy(fileBytes, 8, tempBytes, 0, tempBytes.Length);
-        //                listByteSource.AddRange(tempBytes);
-        //            }
-        //        }
-        //        else
-        //        {
-        //            var tempBytes = new byte[fileBytes.Length - 8];
-        //            System.Array.Copy(fileBytes, 8, tempBytes, 0, tempBytes.Length);
-        //            listByteSource.AddRange(tempBytes);
-
-        //            string [] Arryfile = listFile[0].Split(new string[] { "/" }, StringSplitOptions.None);
-        //            string fileName = Arryfile[Arryfile.Length - 1];
-        //            //灏嗚緭鍏ュ啓鍏ユ湰鍦扮殑涓存椂鏂囦欢澶�
-        //            Global.WriteFileToDirectoryByBytes(dir, fileName, listByteSource.ToArray());
-        //            listByteSource.Clear();
-
-        //            //绉婚櫎姝诲惊鐜唴鐨勬寚瀹氱洰鏍�
-        //            listFile.RemoveAt(0);
-        //            receiving = false;
-        //        }
-        //    };
-        //    zbRealGateway.FileContentAction += action;
-
-        //    //璁剧疆杩涘害鏉$殑鏈�澶у��
-        //    this.SetProgressMax(listFile.Count);
-
-        //    while (listFile.Count > 0)
-        //    {
-        //        timeOutCount++;
-        //        if (timeOutCount == 150)
-        //        {
-        //            //30绉掕秴鏃�:鍝嶅簲瓒呮椂,鑾峰彇缃戝叧鏂囦欢澶辫触
-        //            string msg = Language.StringByID(R.MyInternationalizationString.uResponseTimeoutsAndGetGatewayFileFail);
-        //            this.ShowErrorMsg(msg);
-        //            zbRealGateway.FileContentAction -= action;
-        //            return null;
-        //        }
-
-        //        //鎺ユ敹涓�
-        //        if (receiving == true)
-        //        {
-        //            await Task.Delay(200);
-        //            continue;
-        //        }
-        //        receiving = true;
-
-        //        string[] Arryfile = listFile[0].Split(new string[] { "/" }, StringSplitOptions.None);
-        //        string fileName = Arryfile[Arryfile.Length - 1];
-        //        //涓嬭浇鏂囦欢
-        //        var saveFileName = await zbRealGateway.SetDownloadFileAsync(fileName);
-        //        //妫�娴嬬綉鍏宠繑鍥炵殑鍏遍�氶敊璇姸鎬佺爜
-        //        var error = HdlCheckLogic.Current.CheckCommonErrorCode(saveFileName);
-        //        if (error != null)
-        //        {
-        //            this.ShowMassage(error);
-        //            zbRealGateway.FileContentAction -= action;
-        //            return null;
-        //        }
-        //        if (saveFileName == null || saveFileName.setDownloadFileResponseData == null || saveFileName.setDownloadFileResponseData.Result != 0)
-        //        {
-        //            //鑾峰彇缃戝叧鏂囦欢澶辫触
-        //            string msg = Language.StringByID(R.MyInternationalizationString.uGetGatewayFileFail);
-        //            this.ShowErrorMsg(msg);
-        //            zbRealGateway.FileContentAction -= action;
-        //            return null;
-        //        }
-        //        //璁剧疆杩涘害鍊�
-        //        this.SetProgressValue(1);
-        //    }
-        //    zbRealGateway.FileContentAction -= action;
-        //    action = null;
-
-        //    return dir;
-        //}
-
-        ///// <summary>
-        ///// 浠庣綉鍏宠幏鍙栧畠鐨勬枃浠�
-        ///// </summary>
-        ///// <returns></returns>
-        //private async Task<List<string>> GetGatewayFileFromGateway()
-        //{
-        //    var fileData = await zbRealGateway.FileTransferLsDirAsync();
-        //    //妫�娴嬬綉鍏宠繑鍥炵殑鍏遍�氶敊璇姸鎬佺爜
-        //    string error = HdlCheckLogic.Current.CheckCommonErrorCode(fileData);
-        //    if (error != null)
-        //    {
-        //        this.ShowErrorMsg(error);
-        //        return null;
-        //    }
-
-        //    if (fileData == null || fileData.fileTransferLsDiResponseData == null || fileData.fileTransferLsDiResponseData.Result != 0)
-        //    {
-        //        //鑾峰彇缃戝叧鏂囦欢澶辫触
-        //        string msg = Language.StringByID(R.MyInternationalizationString.uGetGatewayFileFail);
-        //        this.ShowErrorMsg(msg);
-        //        return null;
-        //    }
-        //    var listFile = new List<string>();
-        //    foreach (var filedata in fileData.fileTransferLsDiResponseData.Dir)
-        //    {
-        //        listFile.Add(filedata.File);
-        //    }
-        //    return listFile;
-        //}
-
-        //#endregion
-
-        //#region 鈻� 涓�鑸柟娉昣__________________________
-
-        ///// <summary>
-        ///// 妫�娴嬪鑰冨悕绉�
-        ///// </summary>
-        ///// <param name="backName"></param>
-        ///// <returns></returns>
-        //private bool CheckBackupName(string backName)
-        //{
-        //    if (backName == string.Empty)
-        //    {
-        //        //璇疯緭鍏ュ娉ㄥ悕绉�
-        //        string msg = Language.StringByID(R.MyInternationalizationString.uPleaseInpuBackup);
-        //        this.ShowErrorMsg(msg);
-        //        return false;
-        //    }
-        //    return true;
-        //}
-        //#endregion
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayListBackUpForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayListBackUpForm.cs
deleted file mode 100755
index fa5b511..0000000
--- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayListBackUpForm.cs
+++ /dev/null
@@ -1,244 +0,0 @@
-锘縰sing Shared.Common;
-using System;
-using System.Collections.Generic;
-using System.Text;
-using ZigBee.Device;
-
-namespace Shared.Phone.UserCenter.HdlBackup
-{
-    /// <summary>
-    /// 缃戝叧鍒楄〃鐨勫浠界晫闈�
-    /// </summary>
-    public class HdlGatewayListBackUpForm : EditorCommonForm
-    {
-        #region 鈻� 鍙橀噺澹版槑___________________________
-
-        /// <summary>
-        /// 鍒楄〃鎺т欢
-        /// </summary>
-        private VerticalScrolViewLayout listview = null;
-        /// <summary>
-        /// 鐢熸垚鐨勭綉鍏崇姸鎬佹帶浠舵殏鏃跺瓨鍏ュ唴瀛樹腑
-        /// </summary>
-        private Dictionary<string, GatewayRowControl> dicRowContr = new Dictionary<string, GatewayRowControl>();
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖朹____________________________
-
-        /// <summary>
-        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
-        /// </summary>
-        public void ShowForm()
-        {
-            //璁剧疆鏍囬淇℃伅
-            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uGatewayBackup));
-
-            //鍒濆鍖栦腑閮ㄦ帶浠�
-            this.InitMiddleFrame();
-        }
-
-        /// <summary>
-        /// 鍒濆鍖栦腑閮ㄦ帶浠�
-        /// </summary>
-        private void InitMiddleFrame()
-        {
-            //娓呯┖bodyFrame
-            this.ClearBodyFrame();
-
-            listview = new VerticalScrolViewLayout();
-            listview.Height = bodyFrameLayout.Height;
-            bodyFrameLayout.AddChidren(listview);
-
-            //璁惧畾涓儴淇℃伅
-            this.SetMiddleFrameInfo();
-        }
-
-        /// <summary>
-        /// 璁惧畾涓儴淇℃伅
-        /// </summary>
-        private void SetMiddleFrameInfo()
-        {
-            //璁剧疆鎺ュ彈鍦ㄧ嚎鐘舵�佹帹閫�
-            this.AddGatewayOnlinePush();
-
-            HdlThreadLogic.Current.RunThread(() =>
-            {
-                List<ZbGateway> listway = HdlGatewayLogic.Current.GetAllLocalGateway();
-                if (listway.Count == 0)
-                {
-                    return;
-                }
-                //寮�鍚繘搴︽潯
-                this.ShowProgressBar();
-
-                Application.RunOnMainThread(() =>
-                {
-                    for (int i = 0; i < listway.Count; i++)
-                    {
-                        //娣诲姞琛�
-                        this.AddRowLayout(HdlGatewayLogic.Current.GetGatewayId(listway[i]));
-                    }
-                    this.CloseProgressBar();
-                    //寮�鍚綉鍏冲湪绾跨洃娴嬬殑绾跨▼
-                    this.StartGatewayOnlieCheckThread(listway);
-                });
-            });
-        }
-
-        #endregion
-
-        #region 鈻� 娣诲姞缃戝叧琛宊________________________
-
-        /// <summary>
-        /// 娣诲姞琛�
-        /// </summary>
-        /// <param name="strWayId">String way.</param>
-        public void AddRowLayout(string strWayId)
-        {
-            //缃戝叧鎺т欢
-            var Gateway = HdlGatewayLogic.Current.GetLocalGateway(strWayId);
-            var gatewayRow = new GatewayRowControl(Gateway);
-            listview.AddChidren(gatewayRow);
-            //鍚戝彸鍥炬爣
-            gatewayRow.frameTable.AddRightArrow();
-
-            //鎻愮ず鏈夋柊鐗堟湰
-            var btnNew = new RowNewVersionTipView();
-            btnNew.Visible = false;
-            gatewayRow.frameTable.AddChidren(btnNew, ChidrenBindMode.BindEventOnly);
-            gatewayRow.AddTag("btnNew", btnNew);
-
-            this.dicRowContr[strWayId] = gatewayRow;
-
-            //鍗曞嚮浜嬩欢
-            gatewayRow.frameTable.ButtonClickEvent += (sender, e) =>
-            {
-                //濡傛灉鐐瑰嚮鐨勬槸涓嶅湪绾跨殑缃戝叧锛屽垯褰撲粈涔堜簨閮芥病鏈夊彂鐢�
-                if (gatewayRow.IsOnline == false)
-                {
-                    //鎸囧畾鐨勭綉鍏充笉鍦ㄧ嚎
-                    this.ShowMassage(ShowMsgType.Normal, Language.StringByID(R.MyInternationalizationString.uTheGatewayIsNotOnline));
-                    return;
-                }
-                //濡傛灉瀛樺湪鏂扮増鏈�,骞朵笖鍗曞嚮浠栫殑璇�
-                if (btnNew.Visible == true)
-                {
-                    if (sender is InformationTipView || sender is IconViewControl)
-                    {
-                        //鎵撳紑缂栬緫鐣岄潰
-                        btnNew.Visible = false;
-                        var form = new GatewayManage.GatewayInfoEditorForm();
-                        form.AddForm(Gateway);
-                        return;
-                    }
-                }
-                ZbGateway realWay = null;
-                if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, strWayId) == false)
-                {
-                    //閿欒:缃戝叧瀵硅薄涓㈠け
-                    string msg = Language.StringByID(R.MyInternationalizationString.uErrorGatewayLostMsg);
-                    this.ShowMassage(ShowMsgType.Tip, msg);
-                    return;
-                }
-                var form2 = new HdlGatewayBackUpForm();
-                form2.AddForm(realWay);
-            };
-        }
-
-        #endregion
-
-        #region 鈻� 缃戝叧鍦ㄧ嚎妫�娴媉______________________
-
-        /// <summary>
-        /// 寮�鍚綉鍏冲湪绾跨洃娴嬬殑绾跨▼
-        /// </summary>
-        /// <param name="listway"></param>
-        private void StartGatewayOnlieCheckThread(List<ZbGateway> listway)
-        {
-            HdlThreadLogic.Current.RunThread(() =>
-            {
-                System.Threading.Thread.Sleep(300);
-                //鍒锋柊缃戝叧鍦ㄧ嚎鐘舵��
-                HdlGatewayLogic.Current.RefreshGatewayOnlineStatu(listway);
-                foreach (var way in listway)
-                {
-                    if (this.Parent == null)
-                    {
-                        return;
-                    }
-                    bool online = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(way);
-                    this.GatewayOnlinePush(way, online);
-                }
-                //缃戝叧鏂扮増鏈娴�
-                this.CheckGatewayNewVersion(listway);
-            });
-        }
-
-        /// <summary>
-        /// 缃戝叧鍦ㄧ嚎鐘舵�佸彉鏇�
-        /// </summary>
-        /// <param name="gateWay">缃戝叧瀵硅薄</param>
-        /// <param name="online">鍦ㄧ嚎鐘舵�佸彉鏇村悗鐨勭姸鎬�</param>
-        public override void GatewayOnlinePush(ZbGateway gateWay, bool online)
-        {
-            Application.RunOnMainThread(() =>
-            {
-                if (this.Parent == null)
-                {
-                    return;
-                }
-                string gwid = HdlGatewayLogic.Current.GetGatewayId(gateWay);
-                if (this.dicRowContr.ContainsKey(gwid) == true)
-                {
-                    this.dicRowContr[gwid].RefreshControl(gateWay);
-                }
-            });
-        }
-
-        #endregion
-
-        #region 鈻� 缃戝叧鏂扮増鏈娴媉____________________
-
-        /// <summary>
-        /// 缃戝叧鏂扮増鏈娴�
-        /// </summary>
-        /// <param name="listWays"></param>
-        private async void CheckGatewayNewVersion(List<ZbGateway> listWays)
-        {
-            foreach (var way in listWays)
-            {
-                if (this.Parent == null)
-                {
-                    return;
-                }
-                if (HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(way) == false)
-                {
-                    //涓嶅湪绾跨殑涓嶇敤鐞嗗畠
-                    continue;
-                }
-                //鑾峰彇鏈�鏂扮増鏈�
-                var result = await HdlGatewayLogic.Current.GetGatewayAllNewVersion(way, ShowErrorMode.NO);
-                if (result == null)
-                {
-                    continue;
-                }
-                if (result[0] != null || result[1] != null || result[2] != null)
-                {
-                    //鏈夋柊鐗堟湰
-                    string gwid = HdlGatewayLogic.Current.GetGatewayId(way);
-                    Application.RunOnMainThread(() =>
-                    {
-                        if (this.dicRowContr.ContainsKey(gwid) == true)
-                        {
-                            var btnNew = (RowNewVersionTipView)this.dicRowContr[gwid].GetTagByKey("btnNew");
-                            btnNew.Visible = true;
-                        }
-                    });
-                }
-            }
-        }
-
-        #endregion
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
index a4e7f3b..680f70a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
@@ -52,7 +52,7 @@
             btnUserIcon.Height = Application.GetMinRealAverage(207);
             btnUserIcon.Width = Application.GetMinRealAverage(207);
             btnUserIcon.Radius = (uint)Application.GetMinRealAverage(207) / 2;
-            btnUserIcon.ImagePath = iconPath;
+            btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(iconPath);
             btnUserIcon.Y = Application.GetRealHeight(219);
             btnUserIcon.Gravity = Gravity.CenterHorizontal;
             bodyFrameLayout.AddChidren(btnUserIcon);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
index 6e549ec..df958cf 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
@@ -359,7 +359,7 @@
                         Shared.IO.FileUtils.WriteFileByBytes(iconPath, infoResult.HeadImage);
                         HdlThreadLogic.Current.RunMain(() =>
                         {
-                            dicIconControl[keys].ImagePath = iconPath;
+                            dicIconControl[keys].ImageBytes = Shared.IO.FileUtils.ReadFile(iconPath);
                         });
                     }
                 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
index 0b8607f..73fbfe7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
@@ -121,7 +121,7 @@
             btnUserIcon.Radius = (uint)Application.GetMinRealAverage(207) / 2;
             if (System.IO.File.Exists(iconPath) == true)
             {
-                btnUserIcon.ImagePath = iconPath;
+                btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(iconPath);
             }
             else
             {
@@ -405,7 +405,7 @@
                     Shared.IO.FileUtils.WriteFileByBytes(iconPath, infoResult.HeadImage);
                     HdlThreadLogic.Current.RunMain(() =>
                     {
-                        btnUserIcon.ImagePath = iconPath;
+                        btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(iconPath);
                     });
                 }
             });
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/OtherParty/OtherPartyAccountMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/OtherParty/OtherPartyAccountMenuForm.cs
index e6fc37c..12e1f94 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/OtherParty/OtherPartyAccountMenuForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/OtherParty/OtherPartyAccountMenuForm.cs
@@ -1,6 +1,7 @@
 锘縰sing System;
 using System.Collections.Generic;
 using System.Text;
+using System.Threading.Tasks;
 
 namespace Shared.Phone.UserCenter.OtherParty
 {
@@ -10,6 +11,11 @@
     public class OtherPartyAccountMenuForm : EditorCommonForm
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 缁戝畾鐨勬柟寮�
+        /// </summary>
+        private Dictionary<string, OtherPartyResult> dicBindData = null;
 
         #endregion
 
@@ -23,8 +29,39 @@
             //璁剧疆澶撮儴淇℃伅
             base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uOtherPartyAccount));
 
-            //鍒濆鍖栦腑閮ㄤ俊鎭�
-            this.InitMiddleFrame();
+            //鍒濆鍖栦腑閮ㄦ暟鎹�
+            this.InitMiddleData();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄦ暟鎹�
+        /// </summary>
+        private void InitMiddleData()
+        {
+            //娓呯┖bodyFrame
+            this.ClearBodyFrame();
+
+            HdlThreadLogic.Current.RunThread(async () =>
+            {
+                //鎵撳紑杩涘害鏉�
+                this.ShowProgressBar();
+                //鑾峰彇缁戝畾鏁版嵁
+                var result = await this.GetBingData();
+                if (result == false)
+                {
+                    //鍏抽棴杩涘害鏉�
+                    this.CloseProgressBar(ShowReLoadMode.YES);
+                    return;
+                }
+                //鍏抽棴杩涘害鏉�
+                this.CloseProgressBar();
+
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    //鍒濆鍖栦腑閮ㄤ俊鎭�
+                    this.InitMiddleFrame();
+                });
+            });
         }
 
         /// <summary>
@@ -32,24 +69,31 @@
         /// </summary>
         private void InitMiddleFrame()
         {
-            //娓呯┖bodyFrame
-            this.ClearBodyFrame();
+            var listView = new VerticalListControl(12);
+            listView.Height = Application.GetRealHeight(317);
+            listView.BackgroundColor = UserCenterColor.Current.White;
+            bodyFrameLayout.AddChidren(listView);
 
-            var frameBack = new FrameListControl(12);
-            frameBack.Height = Application.GetRealHeight(317);
-            frameBack.BackgroundColor = UserCenterColor.Current.White;
-            bodyFrameLayout.AddChidren(frameBack);
-
-            var rowChat = new FrameRowControl(frameBack.rowSpace / 2);
+            //鏈巿鏉�
+            string bindNameText = Language.StringByID(R.MyInternationalizationString.uNotAuthentication);
+            //璇风粦瀹�
+            string bindTipText= Language.StringByID(R.MyInternationalizationString.uPleaseBind);
+            if (dicBindData.ContainsKey("Wechat") == true)
+            {
+                //瑙i櫎缁戝畾
+                bindTipText = Language.StringByID(R.MyInternationalizationString.uUnBinded);
+                bindNameText = dicBindData["Wechat"].Nickname;
+            }
+            var rowChat = new FrameRowControl(listView.rowSpace / 2);
             rowChat.Y = Application.GetRealHeight(11);
-            frameBack.AddChidren(rowChat);
+            listView.AddChidren(rowChat);
             //寰俊
             var btnChat = rowChat.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uWebChat), 400, 60);
             btnChat.Y = Application.GetRealHeight(12) + rowChat.chidrenYaxis;
             btnChat.TextSize = 15;
             rowChat.AddChidren(btnChat, ChidrenBindMode.BindEventOnly);
-            //鏈巿鏉�
-            var btnTip1 = rowChat.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uNotAuthentication), 400, 49);
+            //鏈巿鏉�  OR  鍚嶅瓧
+            var btnTip1 = rowChat.AddLeftCaption(bindNameText, 400, 49);
             btnTip1.Y = Application.GetRealHeight(72) + rowChat.chidrenYaxis;
             btnTip1.TextSize = 12;
             btnTip1.TextColor = UserCenterColor.Current.TextGrayColor1;
@@ -57,40 +101,228 @@
             //鍚戝彸鍥炬爣
             rowChat.AddRightArrow();
             //搴曠嚎
-            rowChat.AddBottomLine();
-            //璇风粦瀹�
-            rowChat.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uPleaseBind), 400);
+            //rowChat.AddBottomLine();
+            //璇风粦瀹�  OR  瑙i櫎缁戝畾
+            rowChat.AddMostRightView(bindTipText, 400);
             rowChat.ButtonClickEvent += (sender, e) =>
             {
-
+                if (dicBindData.ContainsKey("Wechat") == true)
+                {
+                    //纭畾瑕佽В闄ょ粦瀹氬井淇★紵
+                    string msg = Language.StringByID(R.MyInternationalizationString.uComfirmUnBindedMsg);
+                    msg = msg.Replace("{0}", Language.StringByID(R.MyInternationalizationString.uWebChat));
+                    this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+                    {
+                        //瑙i櫎缁戝畾
+                        this.UnBindOtherParty(dicBindData["Wechat"]);
+                    });
+                }
+                else
+                {
+                    //婵�娲诲井淇pp
+                    this.ActionWechatApp();
+                }
             };
 
-            var rowQQ = new FrameRowControl(frameBack.rowSpace / 2);
-            frameBack.AddChidren(rowQQ);
-            //寰俊
-            var btnQQ = rowQQ.AddLeftCaption("QQ", 400, 60);
-            btnQQ.Y = Application.GetRealHeight(12) + rowQQ.chidrenYaxis;
-            btnQQ.TextSize = 15;
-            rowQQ.AddChidren(btnQQ, ChidrenBindMode.BindEventOnly);
-            //鏈巿鏉�
-            var btnTip2 = rowQQ.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uNotAuthentication), 400, 49);
-            btnTip2.Y = Application.GetRealHeight(72) + rowQQ.chidrenYaxis;
-            btnTip2.TextSize = 12;
-            btnTip2.TextColor = UserCenterColor.Current.TextGrayColor1;
-            rowQQ.AddChidren(btnTip2, ChidrenBindMode.BindEventOnly);
-            //鍚戝彸鍥炬爣
-            rowQQ.AddRightArrow();
-            //璇风粦瀹�
-            rowQQ.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uPleaseBind), 400);
-            rowQQ.ButtonClickEvent += (sender, e) =>
-            {
 
-            };
+            ////鏈巿鏉�
+            //bindNameText = Language.StringByID(R.MyInternationalizationString.uNotAuthentication);
+            ////璇风粦瀹�
+            //bindTipText = Language.StringByID(R.MyInternationalizationString.uPleaseBind);
+            //if (dicBindData.ContainsKey("QQ") == true)
+            //{
+            //    //瑙i櫎缁戝畾
+            //    bindTipText = Language.StringByID(R.MyInternationalizationString.uUnBinded);
+            //    bindNameText = "QQ";
+            //}
+            //var rowQQ = new FrameRowControl(listView.rowSpace / 2);
+            //listView.AddChidren(rowQQ);
+            ////寰俊
+            //var btnQQ = rowQQ.AddLeftCaption("QQ", 400, 60);
+            //btnQQ.Y = Application.GetRealHeight(12) + rowQQ.chidrenYaxis;
+            //btnQQ.TextSize = 15;
+            //rowQQ.AddChidren(btnQQ, ChidrenBindMode.BindEventOnly);
+            ////鏈巿鏉�  OR  鍚嶅瓧
+            //var btnTip2 = rowQQ.AddLeftCaption(bindNameText, 400, 49);
+            //btnTip2.Y = Application.GetRealHeight(72) + rowQQ.chidrenYaxis;
+            //btnTip2.TextSize = 12;
+            //btnTip2.TextColor = UserCenterColor.Current.TextGrayColor1;
+            //rowQQ.AddChidren(btnTip2, ChidrenBindMode.BindEventOnly);
+            ////鍚戝彸鍥炬爣
+            //rowQQ.AddRightArrow();
+            ////璇风粦瀹�  OR  瑙i櫎缁戝畾
+            //rowQQ.AddMostRightView(bindTipText, 400);
+            //rowQQ.ButtonClickEvent += (sender, e) =>
+            //{
+            //    if (dicBindData.ContainsKey("QQ") == true)
+            //    {
+            //    }
+            //    else
+            //    {
+            //    }
+            //};
+            //璋冩暣鐪熷疄楂樺害
+            listView.AdjustRealHeight(Application.GetRealHeight(23));
         }
 
         #endregion
 
-        #region 鈻� 涓�鑸柟娉昣__________________________
+        #region 鈻� 鑾峰彇缁戝畾鏁版嵁_______________________
+
+        /// <summary>
+        /// 鑾峰彇缁戝畾鏁版嵁
+        /// </summary>
+        /// <returns></returns>
+        private async Task<bool> GetBingData()
+        {
+            this.dicBindData = new Dictionary<string, OtherPartyResult>();
+
+            var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetUserAuthItem", false, "");
+            if (result == null)
+            {
+                return false;
+            }
+            var data = Newtonsoft.Json.JsonConvert.DeserializeObject<List<OtherPartyResult>>(result);
+            foreach (var info in data)
+            {
+                this.dicBindData[info.Platform] = info;
+            }
+
+            //鑾峰彇鐢ㄦ埛鏄电О
+            if (this.dicBindData.ContainsKey("Wechat") == true)
+            {
+                var myData = this.dicBindData["Wechat"];
+                //缁欎釜榛樿鍊�
+                myData.Nickname = "Wechat";
+                var strUrl = "https://api.weixin.qq.com/sns/userinfo?access_token=" + myData.AccessToken;
+                strUrl += "&openid=" + myData.OpenID;
+                var byteData = await Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(strUrl, null, null, "GET");
+                if (byteData != null)
+                {
+                    var receipData = System.Text.Encoding.UTF8.GetString(byteData);
+                    var nickData = Newtonsoft.Json.JsonConvert.DeserializeObject<NicknameInfo>(receipData);
+                    myData.Nickname = nickData.nickname;
+                }
+            }
+
+            return true;
+        }
+
+        #endregion
+
+        #region 鈻� 缁戝畾寰俊___________________________
+
+        /// <summary>
+        /// 婵�娲诲井淇pp
+        /// </summary>
+        private void ActionWechatApp()
+        {
+#if Android
+            com.hdl.home.Application.WXLogin();
+            com.hdl.home.WXEntryActivity.RespAction = (authStr) =>
+            {
+                if (string.IsNullOrEmpty(authStr) == true)
+                {
+                    return;
+                }
+                var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr);
+                //缁戝畾寰俊
+                this.BindWechat(authRes.access_token, authRes.refresh_token, authRes.openid);
+            };
+#endif
+        }
+
+        /// <summary>
+        /// 缁戝畾寰俊
+        /// </summary>
+        /// <param name="infoData"></param>
+        private async void BindWechat(string accessToken, string refreshToken, string openID)
+        {
+            var pra = new { AccessToken = accessToken, RefreshToken = refreshToken, OpenID = openID };
+            var listNotShow = new List<string>() { "UserNoBindAccount" };
+            var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/InsertOrUpdateAuthUser", false, pra, listNotShow);
+            if (result == false)
+            {
+                return;
+            }
+
+            var pra2 = new { AccountGuid = Common.Config.Instance.Guid, OpenID = openID };
+            result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/BindAuthUserToAccount", false, pra2);
+            if (result == true)
+            {
+                //缁戝畾寰俊鎴愬姛!
+                string msg = Language.StringByID(R.MyInternationalizationString.uBindSomethingSuccess);
+                msg = msg.Replace("{0}", Language.StringByID(R.MyInternationalizationString.uWebChat));
+                this.ShowMassage(ShowMsgType.Tip, msg);
+                //閲嶆柊鍒锋柊鐣岄潰
+                this.InitMiddleData();
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 瑙i櫎缁戝畾___________________________
+
+        /// <summary>
+        /// 瑙i櫎缁戝畾
+        /// </summary>
+        /// <param name="infoData"></param>
+        private async void UnBindOtherParty(OtherPartyResult infoData)
+        {
+            var pra = new { DistributedMark = infoData.Id };
+            var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UnBindUserAuth", false, pra);
+            if (result == true)
+            {
+                //閲嶆柊鍒锋柊鐣岄潰
+                this.InitMiddleData();
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 缁撴瀯浣揰____________________________
+
+        /// <summary>
+        /// 鑾峰彇绗笁鏂圭粨鏋滀俊鎭�
+        /// </summary>
+        private class OtherPartyResult
+        {
+            /// <summary>
+            /// 杩欎釜鏄敤鏉ュ垹闄ょ粦瀹氱殑
+            /// </summary>
+            public string Id = string.Empty;
+            /// <summary>
+            /// OpenID
+            /// </summary>
+            public string OpenID = string.Empty;
+            /// <summary>
+            /// AccessToken
+            /// </summary>
+            public string AccessToken = string.Empty;
+            /// <summary>
+            /// RefreshToken
+            /// </summary>
+            public string RefreshToken = string.Empty;
+            /// <summary>
+            /// Wechat  鎴栬�� QQ
+            /// </summary>
+            public string Platform = string.Empty;
+            /// <summary>
+            /// 鏄电О(闇�瑕佽嚜宸卞幓鑾峰彇)
+            /// </summary>
+            public string Nickname = string.Empty;
+        }
+
+        /// <summary>
+        /// 鏄电О淇℃伅
+        /// </summary>
+        private class NicknameInfo
+        {
+            /// <summary>
+            /// 鏄电О
+            /// </summary>
+            public string nickname = string.Empty;
+        }
 
         #endregion
     }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
index 0a8979a..40b3042 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
@@ -54,22 +54,30 @@
             //娓呯┖bodyFrame
             this.ClearBodyFrame();
 
-            var btnPic = new PicViewControl(887, 444);
+            var btnPic = new ImageView();
             btnPic.Y = Application.GetRealHeight(60);
+            btnPic.Width = Application.GetMinRealAverage(887);
+            btnPic.Height = Application.GetMinRealAverage(444);
             btnPic.Gravity = Gravity.CenterHorizontal;
-            btnPic.UnSelectedImagePath = "Room/r0.png";
+            btnPic.Radius = 17;
+            btnPic.ImagePath = "Room/r0.png";
             bodyFrameLayout.AddChidren(btnPic);
+            btnPic.MouseUpEventHandler += (sender, e) =>
+            {
+                //鎴块棿鍥剧墖閫夋嫨
+                this.RoomPictrueSelect(btnPic);
+            };
 
             this.newRoom = new Common.Room();
             newRoom.FloorId = this.floorKeys;
-            newRoom.BackgroundImage = btnPic.UnSelectedImagePath;
+            newRoom.BackgroundImage = btnPic.ImagePath;
 
             //鍒濆鍖栨甯�
             var tableContr = new InformationEditorControl();
             this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 562, 1175);
 
             //娣诲姞鍏ㄩ儴鑿滃崟
-            this.AddAllMenuRow(tableContr);
+            this.AddAllMenuRow(tableContr, btnPic);
         }
 
         #endregion
@@ -79,7 +87,7 @@
         /// <summary>
         /// 娣诲姞鍏ㄩ儴鑿滃崟
         /// </summary>
-        private void AddAllMenuRow(InformationEditorControl tableContr)
+        private void AddAllMenuRow(InformationEditorControl tableContr, ImageView btnPic)
         {
             //銆愭埧闂村悕绉般��
             var txtRoomName = new FrameCaptionInputControl(Language.StringByID(R.MyInternationalizationString.uRoomName), string.Empty, this.listview.rowSpace / 2);
@@ -151,6 +159,16 @@
                 if (this.CheckCanSaveRoom() == false)
                 {
                     return;
+                }
+                if (newRoom.BackgroundImageType == 1 || newRoom.BackgroundImageType == 2)
+                {
+                    //鐢熸垚鍥剧墖
+                    string picName = $"Room_{DateTime.Now.ToString("yyyyMMddHHmmss")}";
+                    string picFullName = System.IO.Path.Combine(Common.Config.Instance.FullPath, picName);
+                    Shared.IO.FileUtils.WriteFileByBytes(picFullName, btnPic.ImageBytes);
+                    newRoom.BackgroundImage = picFullName;
+                    //澶囦唤
+                    Phone.UserCenter.HdlAutoBackupLogic.AddOrEditorFile(picName);
                 }
                 var result = newRoom.AddRoom(newRoom);
                 if (result == false)
@@ -382,6 +400,69 @@
 
         #endregion
 
+        #region 鈻� 鎴块棿鍥剧墖閫夋嫨_______________________
+
+        /// <summary>
+        /// 鎴块棿鍥剧墖閫夋嫨
+        /// </summary>
+        /// <param name="imageContr"></param>
+        private void RoomPictrueSelect(ImageView imageContr)
+        {
+            var menuContr = new BottomMenuSelectForm();
+            menuContr.AddForm(3);
+            //榛樿鍥惧簱
+            menuContr.AddMenu(Language.StringByID(R.MyInternationalizationString.LocalPicture), () =>
+            {
+                var localPic = new Phone.Device.Room.AddRoomSelectPicByLocal();
+                Shared.Phone.UserView.HomePage.Instance.AddChidren(localPic);
+                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+                localPic.Show();
+                localPic.action = (imgPath) =>
+                {
+                    if (string.IsNullOrEmpty(imgPath) == true)
+                    {
+                        return;
+                    }
+                    this.newRoom.BackgroundImageType = 0;
+                    this.newRoom.BackgroundImage = imgPath;
+                    imageContr.ImagePath = imgPath;
+                };
+            });
+            //鎷嶇収
+            menuContr.AddMenu(Language.StringByID(R.MyInternationalizationString.Photograph), () =>
+            {
+                //閫氳繃鐩告満鎷嶇収瑁佸壀
+                CropImage.TakePicture((imagePath) =>
+                {
+                    if (string.IsNullOrEmpty(imagePath) == true)
+                    {
+                        return;
+                    }
+                    this.newRoom.BackgroundImageType = 1;
+                    imageContr.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath);
+                    System.IO.File.Delete(imagePath);
+                }, "HdlPic", 2, 1);
+            });
+            //鎴戠殑鐩稿唽
+            menuContr.AddMenu(Language.StringByID(R.MyInternationalizationString.MyAblums), () =>
+            {
+                //浠庣浉鍐岄�夋嫨鍥剧墖瑁佸壀
+                CropImage.SelectPicture((imagePath) =>
+                {
+                    if (string.IsNullOrEmpty(imagePath) == true)
+                    {
+                        return;
+                    }
+                    this.newRoom.BackgroundImageType = 2;
+                    imageContr.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath);
+                    System.IO.File.Delete(imagePath);
+
+                }, "HdlPic", 2, 1);
+            });
+        }
+
+        #endregion
+
         #region 鈻� 鐣岄潰鍏抽棴___________________________
 
         /// <summary>
@@ -429,12 +510,6 @@
                     this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uRoomNameIsExist));
                     return false;
                 }
-            }
-
-            if (newRoom.BackgroundImageType == 1 || newRoom.BackgroundImageType == 2)
-            {
-                this.newRoom.MoveBackGroundIamageFileToDirectory(newRoom.BackgroundImage, newRoom.BackgroundImage);
-                this.newRoom.BackgroundImage = $"{Common.Config.Instance.Guid}/{Common.Config.Instance.HomeId}/{newRoom.BackgroundImage}";
             }
             newRoom.FloorId = this.floorKeys;
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
index a737171..33a4e14 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
@@ -55,18 +55,26 @@
             //娓呯┖bodyFrame
             this.ClearBodyFrame();
 
-            var btnPic = new PicViewControl(887, 444);
+            var btnPic = new ImageView();
             btnPic.Y = Application.GetRealHeight(60);
+            btnPic.Width = Application.GetMinRealAverage(887);
+            btnPic.Height = Application.GetMinRealAverage(444);
             btnPic.Gravity = Gravity.CenterHorizontal;
-            btnPic.UnSelectedImagePath = this.cloneRoom.BackgroundImage;
+            btnPic.Radius = 17;
+            btnPic.ImagePath = this.editorRoom.BackgroundImage;
             bodyFrameLayout.AddChidren(btnPic);
+            btnPic.MouseUpEventHandler += (sender, e) =>
+            {
+                //鎴块棿鍥剧墖閫夋嫨
+                this.RoomPictrueSelect(btnPic);
+            };
 
             //鍒濆鍖栨甯�
             var tableContr = new InformationEditorControl();
             this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 562, 1175);
 
             //娣诲姞鍏ㄩ儴鑿滃崟
-            this.AddAllMenuRow(tableContr);
+            this.AddAllMenuRow(tableContr, btnPic);
         }
 
         #endregion
@@ -76,7 +84,7 @@
         /// <summary>
         /// 娣诲姞鍏ㄩ儴鑿滃崟
         /// </summary>
-        private void AddAllMenuRow(InformationEditorControl tableContr)
+        private void AddAllMenuRow(InformationEditorControl tableContr, ImageView btnPic)
         {
             //銆愭埧闂村悕绉般��
             var txtRoomName = new FrameCaptionInputControl(Language.StringByID(R.MyInternationalizationString.uRoomName), this.cloneRoom.Name, this.listview.rowSpace / 2);
@@ -158,6 +166,16 @@
                 if (this.CheckCanSaveRoom() == false)
                 {
                     return;
+                }
+                if (editorRoom.BackgroundImageType == 1 || editorRoom.BackgroundImageType == 2)
+                {
+                    //鐢熸垚鍥剧墖
+                    string picName = $"Room_{DateTime.Now.ToString("yyyyMMddHHmmss")}";
+                    string picFullName = System.IO.Path.Combine(Common.Config.Instance.FullPath, picName);
+                    Shared.IO.FileUtils.WriteFileByBytes(picFullName, btnPic.ImageBytes);
+                    editorRoom.BackgroundImage = picFullName;
+                    //澶囦唤
+                    HdlAutoBackupLogic.AddOrEditorFile(picName);
                 }
                 editorRoom.Save();
 
@@ -381,6 +399,69 @@
 
         #endregion
 
+        #region 鈻� 鎴块棿鍥剧墖閫夋嫨_______________________
+
+        /// <summary>
+        /// 鎴块棿鍥剧墖閫夋嫨
+        /// </summary>
+        /// <param name="imageContr"></param>
+        private void RoomPictrueSelect(ImageView imageContr)
+        {
+            var menuContr = new BottomMenuSelectForm();
+            menuContr.AddForm(3);
+            //榛樿鍥惧簱
+            menuContr.AddMenu(Language.StringByID(R.MyInternationalizationString.LocalPicture), () =>
+            {
+                var localPic = new Phone.Device.Room.AddRoomSelectPicByLocal();
+                Shared.Phone.UserView.HomePage.Instance.AddChidren(localPic);
+                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+                localPic.Show();
+                localPic.action = (imgPath) =>
+                {
+                    if (string.IsNullOrEmpty(imgPath) == true)
+                    {
+                        return;
+                    }
+                    this.cloneRoom.BackgroundImageType = 0;
+                    this.cloneRoom.BackgroundImage = imgPath;
+                    imageContr.ImagePath = imgPath;
+                };
+            });
+            //鎷嶇収
+            menuContr.AddMenu(Language.StringByID(R.MyInternationalizationString.Photograph), () =>
+            {
+                //閫氳繃鐩告満鎷嶇収瑁佸壀
+                CropImage.TakePicture((imagePath) =>
+                {
+                    if (string.IsNullOrEmpty(imagePath) == true)
+                    {
+                        return;
+                    }
+                    this.cloneRoom.BackgroundImageType = 1;
+                    imageContr.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath);
+                    System.IO.File.Delete(imagePath);
+                }, "HdlPic", 2, 1);
+            });
+            //鎴戠殑鐩稿唽
+            menuContr.AddMenu(Language.StringByID(R.MyInternationalizationString.MyAblums), () =>
+            {
+                //浠庣浉鍐岄�夋嫨鍥剧墖瑁佸壀
+                CropImage.SelectPicture((imagePath) =>
+                {
+                    if (string.IsNullOrEmpty(imagePath) == true)
+                    {
+                        return;
+                    }
+                    this.cloneRoom.BackgroundImageType = 2;
+                    imageContr.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath);
+                    System.IO.File.Delete(imagePath);
+
+                }, "HdlPic", 2, 1);
+            });
+        }
+
+        #endregion
+
         #region 鈻� 鐣岄潰鍏抽棴___________________________
 
         /// <summary>
@@ -429,13 +510,17 @@
                     return false;
                 }
             }
-
-            if (cloneRoom.BackgroundImageType == 1 || cloneRoom.BackgroundImageType == 2)
+            if (editorRoom.BackgroundImageType == 1 || editorRoom.BackgroundImageType == 2)
             {
-                this.cloneRoom.MoveBackGroundIamageFileToDirectory(cloneRoom.BackgroundImage, cloneRoom.BackgroundImage);
-                this.cloneRoom.BackgroundImage = $"{Common.Config.Instance.Guid}/{Common.Config.Instance.HomeId}/{cloneRoom.BackgroundImage}";
+                //鍒犻櫎鎺夊師鏉ョ殑鑷畾涔夊浘鐗�
+                if (System.IO.File.Exists(editorRoom.BackgroundImage) == true)
+                {
+                    System.IO.File.Delete(editorRoom.BackgroundImage);
+                }
+                //澶囦唤
+                string[] MyArry = editorRoom.BackgroundImage.Split(new string[] { "/", @"\" }, StringSplitOptions.RemoveEmptyEntries);
+                HdlAutoBackupLogic.DeleteFile(MyArry[MyArry.Length - 1]);
             }
-
             editorRoom.FloorId = cloneRoom.FloorId;
             editorRoom.Name = cloneRoom.Name;
             editorRoom.HumidityDevice = cloneRoom.HumidityDevice;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
index 437df5b..75c888f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
@@ -209,8 +209,22 @@
                     string menu2 = Language.StringByID(R.MyInternationalizationString.uPasswordSettion);
                     frameMenu.AddRowMenu(menu2, "Item/PswSettion.png", "Item/PswSettionSelected.png", () =>
                     {
-                        var form = new PasswordMenuForm();
-                        form.AddForm();
+                        HdlCheckLogic.Current.CheckSecondarySecurity(() =>
+                        {
+                            //楠岃瘉鎴愬姛
+                            var form = new PasswordMenuForm();
+                            form.AddForm();
+                        },
+                        () =>
+                        {
+                            //璇峰墠寰�涓汉涓績{0}璁剧疆浜屾瀹夊叏楠岃瘉鏂瑰紡
+                            string msg = Language.StringByID(R.MyInternationalizationString.uGotoCenterAndSetSecondAuthentication).Replace("{0}", "\r\n");
+                            this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+                            {
+                                var form = new UserMain.SecondAuthenticationForm();
+                                form.AddForm();
+                            });
+                        });
                     });
                 };
             }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs
index 82a86d1..b42621a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs
@@ -236,6 +236,8 @@
                         }
                     };
                 }
+                //璋冩暣涓�涓嬮珮搴�
+                listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(185));
             });
         }
 
@@ -317,6 +319,8 @@
         private void AddDeviceRow(List<CommonDevice> listDevice, VerticalListControl listView)
         {
             listView.RemoveAll();
+            //杩樺師楂樺害
+            listView.RecoverHeight();
 
             foreach (var device in listDevice)
             {
@@ -365,6 +369,8 @@
                     }
                 };
             }
+            //鍒楄〃鑷繁鏈変釜23鐨刌杞村潗鏍�
+            listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(23), Application.GetRealHeight(300 - 23));
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/MessageManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/MessageManagementForm.cs
new file mode 100755
index 0000000..7b118ad
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/MessageManagementForm.cs
@@ -0,0 +1,392 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter.UserMain
+{
+    /// <summary>
+    /// 娑堟伅涓績
+    /// </summary>
+    public class MessageManagementForm : EditorCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 鍒楄〃鎺т欢
+        /// </summary>
+        private VerticalFrameControl listView = null;
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        public void ShowForm()
+        {
+            //璁剧疆澶撮儴淇℃伅
+            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uMessageCenter));
+
+            listView = new VerticalFrameControl(35);
+            listView.Height = bodyFrameLayout.Height;
+            bodyFrameLayout.AddChidren(listView);
+
+            //鍒濆鍖栧彸涓婅鑿滃崟
+            this.InitTopRightMenu();
+
+            HdlThreadLogic.Current.RunThread(() =>
+            {
+                //鍒濆鍖栦腑閮ㄤ俊鎭�
+                this.InitMiddleData();
+            });
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+        /// </summary>
+        private async void InitMiddleData()
+        {
+            //鎵撳紑杩涘害鏉�
+            this.ShowProgressBar();
+            var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetPushMessageRecord", false, "");
+            if (result == null)
+            {
+                //鍏抽棴杩涘害鏉�
+                this.CloseProgressBar(ShowReLoadMode.YES);
+                return;
+            }
+            var dataInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<List<MessageRecordInfo>>(result);
+            //鍚堝苟鏁版嵁
+            var dicData = this.MergeMessageRecordData(dataInfo);
+            //鍏抽棴杩涘害鏉�
+            this.CloseProgressBar();
+            
+            HdlThreadLogic.Current.RunMain(() =>
+            {
+                //鍒濆鍖栦腑閮ㄦ帶浠�
+                this.InitMiddleFrame(dicData);
+            });
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄦ帶浠�
+        /// </summary>
+        /// <param name="dicData"></param>
+        private void InitMiddleFrame(Dictionary<string, List<MessageRecordInfo>> dicData)
+        {
+            foreach (var keys in dicData.Keys)
+            {
+                var listData = dicData[keys];
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    //瀹瑰櫒
+                    var framBack = new FrameListControl(23);
+                    framBack.Name = keys;
+                    framBack.Height = Application.GetRealHeight(100);
+                    framBack.BackgroundColor = UserCenterColor.Current.White;
+
+                    //鏃ユ湡
+                    string strMonth = Language.StringByID(R.MyInternationalizationString.Month);
+                    string strDate = Language.StringByID(R.MyInternationalizationString.Day);
+                    var frameDate = new FrameLayout();
+                    frameDate.Height = Application.GetRealHeight(118);
+                    framBack.AddChidren(frameDate);
+                    var btnDate = new NormalViewControl(500, 60, true);
+                    btnDate.TextSize = 15;
+                    btnDate.X = ControlCommonResourse.XXLeft;
+                    btnDate.Y = Application.GetRealHeight(35);
+                    btnDate.Text = Convert.ToDateTime(listData[0].MsgTime).ToString("MM" + strMonth + "dd" + strDate);
+                    frameDate.AddChidren(btnDate);
+
+                    for (int i = 0; i < listData.Count; i++)
+                    {
+                        //娣诲姞淇℃伅琛�
+                        this.AddMsgRowControl(framBack, listData[i], i != listData.Count - 1);
+                    }
+                });
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 鍙充笂瑙掕彍鍗昣________________________
+
+        /// <summary>
+        /// 鍒濆鍖栧彸涓婅鑿滃崟
+        /// </summary>
+        private void InitTopRightMenu()
+        {
+            var btnIcon = new MostRightIconControl(69, 69);
+            btnIcon.UnSelectedImagePath = "Item/More.png";
+            topFrameLayout.AddChidren(btnIcon);
+            btnIcon.InitControl();
+            btnIcon.ButtonClickEvent += ((sender, e) =>
+            {
+                //鏄剧ず搴曢儴鑿滃崟鐣岄潰
+                this.ShowBottomMenu();
+            });
+        }
+
+        /// <summary>
+        /// 鏄剧ず搴曢儴鑿滃崟鐣岄潰
+        /// </summary>
+        private void ShowBottomMenu()
+        {
+            var menuContr = new BottomMenuSelectForm();
+            menuContr.AddForm(2);
+            //鍏ㄩ儴宸茶
+            menuContr.AddMenu(Language.StringByID(R.MyInternationalizationString.uAllRead), () =>
+            {
+            });
+            //鍏ㄩ儴鍒犻櫎
+            menuContr.AddMenu(Language.StringByID(R.MyInternationalizationString.uAllDelete), () =>
+            {
+            });
+        }
+
+        #endregion
+
+        #region 鈻� 娣诲姞淇℃伅琛宊________________________
+
+        /// <summary>
+        /// 娣诲姞淇℃伅琛�
+        /// </summary>
+        /// <param name="frameList"></param>
+        /// <param name="recordInfo"></param>
+        /// <param name="addLine"></param>
+        private void AddMsgRowControl(FrameListControl frameList, MessageRecordInfo recordInfo, bool addLine)
+        {
+            var rowControl = new RowLayoutControl(frameList.rowSpace / 2);
+            frameList.AddChidren(rowControl);
+           
+
+            //鍥炬爣(鐜板湪娴嬭瘯)
+            var btnIcon = rowControl.frameTable.AddLeftIcon(81);
+            btnIcon.UnSelectedImagePath = "Item/Satety.png";
+
+            //娑堟伅绫诲瀷
+            var btnMsgObject = rowControl.frameTable.AddLeftCaption("娴嬭瘯:娑堟伅绫诲瀷", 600);
+            PicViewControl btnNewTip = null;
+            if (recordInfo.IsRead == 0)
+            {
+                btnNewTip = new PicViewControl(78, 55);
+                btnNewTip.UnSelectedImagePath = "Item/NewVersion.png";
+                btnNewTip.Y = Application.GetRealHeight(9) + rowControl.frameTable.chidrenYaxis;
+                btnNewTip.X = btnMsgObject.X + btnMsgObject.GetRealWidthByText(14);
+                rowControl.frameTable.AddChidren(btnNewTip, ChidrenBindMode.BindEventOnly);
+            }
+
+            //娑堟伅
+            var btnMsg = rowControl.frameTable.AddMostRightView(recordInfo.MsgContent, 600, 60);
+            btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnMsg.Y = Application.GetRealHeight(6) + rowControl.frameTable.chidrenYaxis;
+            rowControl.frameTable.AddChidren(btnMsg, ChidrenBindMode.BindEventOnly);
+            //鏃堕棿
+            var btnTime = rowControl.frameTable.AddMostRightView(recordInfo.MsgContent, 200, 50);
+            btnTime.TextColor = UserCenterColor.Current.TextGrayColor1;
+            btnTime.Y = btnMsg.Bottom + Application.GetRealHeight(12);
+            btnTime.Text = Convert.ToDateTime(recordInfo.MsgTime).ToString("HH锛歮m");
+            rowControl.frameTable.AddChidren(btnTime, ChidrenBindMode.BindEventOnly);
+            //搴曠嚎
+            if (addLine == true)
+            {
+                rowControl.frameTable.AddBottomLine();
+            }
+            //宸茶
+            if (recordInfo.IsRead == 1)
+            {
+                rowControl.frameTable.UseClickStatu = false;
+                //娑堟伅绫诲瀷
+                btnMsgObject.TextColor = UserCenterColor.Current.TextGrayColor1;
+                //娑堟伅
+                btnMsg.TextColor = UserCenterColor.Current.TextGrayColor1;
+            }
+            //鍒犻櫎
+            var btnDelete = rowControl.AddDeleteControl();
+            btnDelete.ButtonClickEvent += (sender, e) =>
+            {
+                //纭鍒犻櫎娑堟伅?
+                string msg = Language.StringByID(R.MyInternationalizationString.uDeleteRoomMsg);
+                this.ShowMassage(ShowMsgType.Confirm, msg, async () =>
+                {
+                    await this.DeleteMsg(recordInfo.RegId, frameList, rowControl);
+                });
+            };
+
+            //鐐瑰嚮
+            rowControl.frameTable.ButtonClickEvent += (sender, e) =>
+            {
+                if (recordInfo.IsRead == 1)
+                {
+                    return;
+                }
+                recordInfo.IsRead = 1;
+                rowControl.frameTable.UseClickStatu = false;
+                //娑堟伅绫诲瀷
+                btnMsgObject.TextColor = UserCenterColor.Current.TextGrayColor1;
+                //娑堟伅
+                btnMsg.TextColor = UserCenterColor.Current.TextGrayColor1;
+                btnNewTip.RemoveFromParent();
+                //鏍囪宸茶(涓嶇瀹冩垚鍔熶笉鎴愬姛)
+                this.SetTickIsRead(recordInfo.RegId);
+            };
+        }
+
+        #endregion
+
+        #region 鈻� 鏍囪宸茶___________________________
+
+        /// <summary>
+        /// 鏍囪宸茶
+        /// </summary>
+        /// <param name="strId"></param>
+        private async void SetTickIsRead(string strId)
+        {
+            var pra = new { Id = strId };
+            //await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/TickIsRead", true, pra);
+        }
+
+        #endregion
+
+        #region 鈻� 鍒犻櫎淇℃伅___________________________
+
+        /// <summary>
+        /// 鍒犻櫎淇℃伅
+        /// </summary>
+        /// <param name="strId"></param>
+        /// <param name="frameList"></param>
+        /// <param name="rowContr"></param>
+        private async System.Threading.Tasks.Task<bool> DeleteMsg(string strId, FrameListControl frameList, RowLayoutControl rowContr)
+        {
+            var pra = new { Id = strId };
+            //var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/DeletePushMessage", true, pra);
+            //if (result == true && frameList != null)
+            {
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    rowContr.RemoveFromParent();
+                    //璋冩暣鎺т欢浣嶇疆
+                    this.AdjustControlLocation(frameList);
+                });
+            }
+            //return result;
+            return true;
+        }
+
+        #endregion
+
+        #region 鈻� 璋冩暣鎺т欢浣嶇疆_______________________
+
+        /// <summary>
+        /// 璋冩暣鎺т欢浣嶇疆
+        /// </summary>
+        /// <param name="frameList"></param>
+        private void AdjustControlLocation(FrameListControl frameList)
+        {
+            int nowHeight = frameList.Height;
+            int changedHeight = 0;
+            if (frameList.ChildrenCount <= 1)
+            {
+                //宸茬粡鍒犲畬浜�,鍙墿涓嬫爣棰樻棩鏈熶簡
+                frameList.RemoveFromParent();
+                changedHeight = nowHeight;
+            }
+            else
+            {
+                frameList.Height = frameList.GetChildren(frameList.ChildrenCount - 1).Bottom;
+                changedHeight = nowHeight - frameList.Height;
+            }
+            bool canChangedLoaction = false;
+            for (int i = 0; i < this.listView.ChildrenCount; i++)
+            {
+                var myView = this.listView.GetChildren(i);
+                if (myView.Name == frameList.Name)
+                {
+                    //瀹冧箣鍚庣殑鎺т欢鍏ㄩ儴寰�涓婄Щ鍔�
+                    canChangedLoaction = true;
+                    continue;
+                }
+                if (canChangedLoaction == true)
+                {
+                    myView.Y -= changedHeight;
+                }
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 鍚堝苟鏁版嵁___________________________
+
+        /// <summary>
+        /// 鍚堝苟鏁版嵁
+        /// </summary>
+        /// <param name="dataInfo"></param>
+        /// <returns></returns>
+        private Dictionary<string, List<MessageRecordInfo>> MergeMessageRecordData(List<MessageRecordInfo> dataInfo)
+        {
+            var dicData = new Dictionary<string, List<MessageRecordInfo>>();
+
+            //棣栧厛鍏堟帓搴忎竴涓�,鏃堕棿澶х殑鏀惧湪鍓嶉潰
+            var dicTemp = new Dictionary<string, List<MessageRecordInfo>>();
+            var listSortKeys = new List<string>();
+            foreach (var data in dataInfo)
+            {
+                if (dicTemp.ContainsKey(data.MsgTime) == false)
+                {
+                    dicTemp[data.MsgTime] = new List<MessageRecordInfo>();
+                    listSortKeys.Add(data.MsgTime);
+                }
+                dicTemp[data.MsgTime].Add(data);
+            }
+            listSortKeys.Sort();
+            for (int i = listSortKeys.Count - 1; i >= 0; i--)
+            {
+                var listData = dicTemp[listSortKeys[i]];
+                foreach (var data2 in listData)
+                {
+                    string[] myArry = data2.MsgTime.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
+                    if (dicData.ContainsKey(myArry[1]) == false)
+                    {
+                        dicData[myArry[1]] = new List<MessageRecordInfo>();
+                    }
+                    dicData[myArry[1]].Add(data2);
+                }
+            }
+            return dicData;
+        }
+
+        #endregion
+
+        #region 鈻� 缁撴瀯浣揰____________________________
+
+        /// <summary>
+        /// 淇℃伅缁撴灉
+        /// </summary>
+        private class MessageRecordInfo
+        {
+            /// <summary>
+            /// 涓婚敭
+            /// </summary>
+            public string RegId = string.Empty;
+            /// <summary>
+            /// 娑堟伅鍐呭
+            /// </summary>
+            public string MsgContent = string.Empty;
+            /// <summary>
+            /// MsgType
+            /// </summary>
+            public string MsgType = string.Empty;
+            /// <summary>
+            /// 鏄惁宸茶
+            /// </summary>
+            public int IsRead = 0;
+            /// <summary>
+            /// 鏃堕棿 2019-09-10 13:11:55
+            /// </summary>
+            public string MsgTime = string.Empty;
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs
index 67f8470..543e0e4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs
@@ -69,7 +69,7 @@
             btnIcon.Radius = (uint)Application.GetMinRealAverage(294) / 2;
             btnIcon.Y = Application.GetRealHeight(121);
             btnIcon.Gravity = Gravity.CenterHorizontal;
-            btnIcon.ImagePath = UserCenterResourse.UserInfo.UserIconFile;
+            btnIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
             frameBack.AddChidren(btnIcon);
             //鐢ㄦ埛鍚�
             var btnUser = new NormalViewControl(frameBack.Width, Application.GetRealHeight(46), false);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
index 8b2940a..4ee3637 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
@@ -52,7 +52,7 @@
             btnUserIcon.Radius = (uint)Application.GetMinRealAverage(251) / 2;
             btnUserIcon.Y = Application.GetRealHeight(46);
             btnUserIcon.Gravity = Gravity.CenterHorizontal;
-            btnUserIcon.ImagePath = UserCenterResourse.UserInfo.UserIconFile;
+            btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
             specialTopFrame.AddChidren(btnUserIcon);
             btnUserIcon.MouseUpEventHandler += (sender, e) =>
             {
@@ -363,7 +363,7 @@
             if (result == true)
             {
                 UserCenterResourse.UserInfo.UserIconFileChanged = true;
-                btnUser.ImagePath = imagePath;
+                btnUser.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath);
             }
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
index 5ef06a0..eb9cacf 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
@@ -30,6 +30,10 @@
         /// 鐨囧啝
         /// </summary>
         private IconViewControl btnImperialCrown = null;
+        /// <summary>
+        /// 淇℃伅鎻愮ず鎺т欢
+        /// </summary>
+        private MessageManagementControl msgControl = null;
 
         #endregion
 
@@ -66,6 +70,12 @@
         {
             //娓呯┖bodyFrame
             this.ClearBodyFrame();
+
+            //淇℃伅鎻愮ず鎺т欢
+            this.msgControl = new MessageManagementControl();
+            msgControl.Y = Application.GetRealHeight(127);
+            msgControl.X = Application.GetRealWidth(953);
+            bodyFrameLayout.AddChidren(this.msgControl);
 
             //涓汉涓績
             var btnTitle = new NormalViewControl(350, 100, true);
@@ -112,7 +122,7 @@
             btnUserIcon.Width = Application.GetMinRealAverage(280);
             btnUserIcon.Radius = (uint)Application.GetMinRealAverage(280) / 2;
             btnUserIcon.X = Application.GetRealWidth(121);
-            btnUserIcon.ImagePath = UserCenterResourse.UserInfo.UserIconFile;
+            btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
             bodyFrameLayout.AddChidren(btnUserIcon);
             btnUserIcon.Y = frameWhite.Y - Application.GetRealHeight(109);
             btnUserIcon.MouseUpEventHandler += (sender, e) =>
@@ -418,7 +428,7 @@
             if (UserCenterResourse.UserInfo.UserIconFileChanged == true)
             {
                 UserCenterResourse.UserInfo.UserIconFileChanged = false;
-                btnUserIcon.ImagePath = UserCenterResourse.UserInfo.UserIconFile;
+                btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
             }
             //鐢ㄦ埛鍚嶅瓧
             btnUserName.Text = UserCenterResourse.UserInfo.UserName;
@@ -440,6 +450,9 @@
                 }
             }
 
+            //鍒锋柊淇℃伅鎻愮ず鎺т欢
+            this.msgControl.RefreshStatu();
+
             //鍒濆鍖栦富鑿滃崟鐨勬帶浠�
             this.InitMainMenuInfoControl(frameWhiteBack);
 
diff --git a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
index 804648d..72d7fa7 100755
--- a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
@@ -4,6 +4,7 @@
 using Shared.Phone.Device.AC;
 using ZigBee.Device;
 using Shared.Phone.Device.CommonForm;
+using Shared.Phone.UserCenter.DoorLock;
 
 namespace Shared.Phone.UserView
 {
@@ -639,7 +640,8 @@
                         roomPageView.AddChidren(roomBackView);
                         var roomBG = new Button()
                         {
-                            UnSelectedImagePath = "Room/HomeBG.png",
+                            //UnSelectedImagePath = "Room/HomeBG.png",
+                            UnSelectedImagePath = room.BackgroundImage
                         };
                         roomBackView.AddChidren(roomBG);
                         var roomName = new Button()
@@ -661,24 +663,11 @@
                             Width = Application.GetMinRealAverage(100),
                             Height = Application.GetMinRealAverage(100),
                             UnSelectedImagePath = "Item/List.png",
-                            SelectedImagePath = "Item/ListSelected.png"
                         };
                         roomBackView.AddChidren(roomListBtn);
 
                         roomListBtn.MouseUpEventHandler += (send, e) =>
                         {
-                            //var roomList = new Device.Room.RoomManagement();
-                            //HomePage.Instance.AddChidren(roomList);
-                            //HomePage.Instance.PageIndex += 1;
-                            //roomList.Show();
-                            //roomList.action += () =>
-                            //{
-                            //    Show();
-                            //};
-                            if(room.IsLove)
-                            {
-                                return;
-                            }
                             var editRoom = new Device.Room.EditRoom();
                             HomePage.Instance.AddChidren(editRoom);
                             HomePage.Instance.PageIndex += 1;
@@ -687,7 +676,6 @@
                             {
                                 Show();
                             };
-
                         };
                     }
                 }
@@ -713,7 +701,7 @@
                         Text = Language.StringByID(R.MyInternationalizationString.Favorite),
                         TextAlignment = TextAlignment.CenterLeft,
                         TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                        TextSize = 18,
+                        TextSize = 18
                     };
                     roomBackView.AddChidren(roomName);
                     var roomListBtn = new Button()
@@ -1021,7 +1009,6 @@
                         deviceVerticalScrolViewLayout.AddChidren(itemView);
                     }
 
-                   
                     //鍒犻櫎璁惧
                     EventHandler<MouseEventArgs> delEvent = (sender, e) =>
                     {
@@ -1627,14 +1614,65 @@
                             var dimmableLightControl = new Phone.Device.Light.DimmableLightControl();
                             UserView.HomePage.Instance.AddChidren(dimmableLightControl);
                             UserView.HomePage.Instance.PageIndex += 1;
-                            UserView.HomePage.Instance.ScrollEnabled = false;
                             //dimmableLightControl.action = RefreshBodyView;
                             dimmableLightControl.Show(device, Room.CurrentRoom);
                         };
 
                         lightView.CollectButton.MouseUpEventHandler += collectionEvent;
                     }
-                    else if (device.CommonDevice.Type == DeviceType.OnOffSwitch)
+                    else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.DoorLock)
+                    {
+                        //闂ㄩ攣
+                        var dimmableLight = device.CommonDevice as DoorLock;
+                        //琛ヤ笂闈炶繙绋�
+                        if (dimmableLight.Gateway == null)
+                        {
+                            continue;
+                        }
+                        if (dimmableLight.Gateway.IsVirtual)
+                        {
+                            ReadStatus(dimmableLight, () =>
+                            {
+                                dimmableLight.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                            });
+                        }
+                        else
+                        {
+                            if ((DateTime.Now - dimmableLight.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
+                            {
+                                dimmableLight.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                            }
+                        }
+
+                        var lightView = new FunctionMainView(xx, yy);
+                        itemView.AddChidren(lightView);
+                        lightView.Init();
+                        lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
+                        lightView.SetStatuText(device.GetDeviceStatu());
+                        lightView.SetDeviceName(device.CommonDevice.DeviceEpointName);
+                        lightView.IsSelected = dimmableLight.IsOnline == 1;
+                        lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName));
+                        lightView.CanControl(false);
+                        var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName);
+                        if (dev == null)
+                        {
+                            lightView.CollectButton.IsSelected = false;
+                        }
+                        else
+                        {
+                            lightView.CollectButton.IsSelected = true;
+                        }
+
+                        lightView.CardBG.MouseUpEventHandler += (sender, e) =>
+                        {
+                            var userDoorLockPage = new UserDoorLockPage(Room.CurrentRoom,device);
+                            HomePage.Instance.AddChidren(userDoorLockPage);
+                            HomePage.Instance.PageIndex += 1;
+                            userDoorLockPage.Show();
+                        };
+                        lightView.CollectButton.MouseUpEventHandler += collectionEvent;
+                    }
+                    else
                     {
                         var lightView = new FunctionMainView(xx, yy);
                         itemView.AddChidren(lightView);
@@ -1642,9 +1680,20 @@
                         lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
                         lightView.SetStatuText(device.GetDeviceStatu());
                         lightView.SetDeviceName(device.CommonDevice.DeviceEpointName);
-                        //lightView.SetStatu(true);
-                        lightView.IsSelected = true;
+                        lightView.CanControl(false);
+                        lightView.IsSelected = device.CommonDevice.IsOnline == 1;
                         lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName));
+
+                        var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName);
+                        if (dev == null)
+                        {
+                            lightView.CollectButton.IsSelected = false;
+                        }
+                        else
+                        {
+                            lightView.CollectButton.IsSelected = true;
+                        }
+                        lightView.CollectButton.MouseUpEventHandler += collectionEvent;
                     }
                 }
             }
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs b/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
index 84ce50c..8a041b9 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
@@ -212,7 +212,7 @@
         /// </summary>
         public string Guid = string.Empty;
         /// <summary>
-        /// 鏄惁鏄鐞嗗憳鏉冮檺(涓轰粈涔堜細澹版槑杩欐牱鍙橀噺,鍥犱负鏈変簺鎺ュ彛蹇呴』浣跨敤鍘熸潵鐨凾oken)
+        /// 鏄惁鏄鐞嗗憳鏉冮檺(鍙樻洿浜�,鎴愬憳鐨勬椂鍊�,杩欎釜涔熶负ture銆備负浠�涔堜細澹版槑杩欐牱鍙橀噺,鍥犱负鏈変簺鎺ュ彛蹇呴』浣跨敤鍘熸潵鐨凾oken)
         /// </summary>
         public bool isAdministrator = false;
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
index df4003f..591353e 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
@@ -18,6 +18,7 @@
         /// <param name="flage">If set to <c>true</c> flage.</param>
         public static void DebugPrintLog(string msg, bool flage = true)
         {
+#if DEBUG
             if (flage == true)
             {
                 if (msg.Contains("DeviceStatusReport") == false)
@@ -25,6 +26,7 @@
                     System.Console.WriteLine(msg + "  " + System.DateTime.Now.ToLongTimeString() + " " + System.DateTime.Now.Millisecond);
                 }
             }
+#endif
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
index 052ba53..1d08afe 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
@@ -42,6 +42,7 @@
         public string RemoteUnlockPassword = string.Empty;//杩滅▼寮�閿佸瘑鐮�
 
         public static int RemoteUnlockCount = 5;//杩滅▼寮�閿佹鏁伴檺鍒�
+        public static int failedCount = 3;//杩滅▼寮�閿佸け璐ユ鏁�
         public static DateTime maxValue = DateTime.MaxValue;
         public static DateTime minValue = DateTime.MinValue;
 
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
index a600b98..8856f19 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
@@ -3204,6 +3204,9 @@
             {
                 try
                 {
+                    if (!Shared.Common.Config.Instance.IsLogin) {
+                        return;
+                    }
                     if (remoteMqttIsConnecting || Shared.Common.Config.Instance.HomeId == "")
                     {
                         return;
@@ -3522,7 +3525,7 @@
                     //浜戠涓殑褰撳墠杩炴帴琚尋涓嬬嚎锛岄渶瑕侀�氱煡app
                     //鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫(涓轰簡鎵ц閫熷害,灏藉彲鑳界殑鍒姞鑰楁椂鐨勬搷浣�)
                     message = "BeingSqueezedOffline";
-                    Shared.Phone.UserCenter.HdlGatewayReceiveLogic.GatewayOverallMsgReceive("", topic, null);
+                    Shared.Phone.UserCenter.HdlGatewayReceiveLogic.Current.GatewayOverallMsgReceive("", topic, "", null);
                     DebugPrintLog($"琚尋涓嬬嚎閫氱煡:{ topic}_杩滅▼杩斿洖鐨勬暟鎹甠{message}_{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff")}");//{System.DateTime.Now.ToString()}");// DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff")
                     return;
                 }
@@ -3718,7 +3721,7 @@
                 }
 
                 //鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫(涓轰簡鎵ц閫熷害,灏藉彲鑳界殑鍒姞鑰楁椂鐨勬搷浣�)
-                Shared.Phone.UserCenter.HdlGatewayReceiveLogic.GatewayOverallMsgReceive(gatewayID, topic, jobject);
+                Shared.Phone.UserCenter.HdlGatewayReceiveLogic.Current.GatewayOverallMsgReceive(gatewayID, topic, reportStatus, jobject);
 
                 #region 浜戠閫氱煡
                 var cloudMqttResult = Newtonsoft.Json.JsonConvert.DeserializeObject<ZigBee.Common.CloudMqttResponsePack>(message);
@@ -3733,7 +3736,7 @@
                                 gwa.CloudErrorAction("AppNoLogin", "鐧诲綍杩囨湡锛岃閲嶆柊鐧诲綍");
                             }
                             //鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫(涓轰簡鎵ц閫熷害,灏藉彲鑳界殑鍒姞鑰楁椂鐨勬搷浣�)
-                            Shared.Phone.UserCenter.HdlGatewayReceiveLogic.GatewayOverallMsgReceive(gatewayID, "AppNoLogin", jobject);
+                            Shared.Phone.UserCenter.HdlGatewayReceiveLogic.Current.GatewayOverallMsgReceive(gatewayID, "AppNoLogin", reportStatus, jobject);
                             break;
                         case "AppTimeOut":
                             if (gwa.CloudErrorAction != null)
@@ -3761,17 +3764,15 @@
                         if (gwData != null)
                         {
                             var gwList = GateWayList.FindAll(obj => obj.getGatewayBaseInfo.HomeId == Shared.Common.Config.Instance.HomeId);
-
                             for (int i = 0; i < gwList.Count; i++)
                             {
-                                var gwTemp = gwList[i];
-                                if (gwData.IsDominant == 1)
-                                {
-                                    gwTemp.getGatewayBaseInfo.IsMainGateWay = true;
-                                    for (int j = i + 1; j < gwList.Count; j++)
-                                    {
-                                        gwList[j].getGatewayBaseInfo.IsMainGateWay = false;
-                                    }
+                                if (gwList[i].getGatewayBaseInfo.gwID == gatewayID)
+                                {
+                                    gwList[i].getGatewayBaseInfo.IsMainGateWay = true;
+                                }
+                                else
+                                {
+                                    gwList[i].getGatewayBaseInfo.IsMainGateWay = false;
                                 }
                             }
                         }
diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs
index 017aa13..60ad83f 100755
--- a/ZigbeeApp/Shared/R.cs
+++ b/ZigbeeApp/Shared/R.cs
@@ -4836,7 +4836,7 @@
         /// </summary>
         public const int uSetGatewaySiteFail = 15936;
         /// <summary>
-        /// 姝e湪淇濆瓨鍗忚皟鍣ㄧ殑nv鍒嗗尯缁勭綉淇℃伅
+        /// 姝e湪淇濆瓨鍗忚皟鍣╪v鍒嗗尯淇℃伅
         /// </summary>
         public const int uGatewayNVFileSaving = 15937;
         /// <summary>
@@ -4867,6 +4867,130 @@
         /// 姝e湪鎵撳紑鍗忚皟鍣ㄤ覆鍙e彂閫佸姛鑳�
         /// </summary>
         public const int uZbMsComSendOpening = 15944;
+        /// <summary>
+        /// 鑾峰彇缃戝叧鑷姩澶囦唤璁剧疆澶辫触
+        /// </summary>
+        public const int uGetGatewayAutoBackupStatuFail = 15945;
+        /// <summary>
+        /// 璁剧疆缃戝叧鑷姩澶囦唤澶辫触
+        /// </summary>
+        public const int uSetGatewayAutoBackupStatuFail = 15946;
+        /// <summary>
+        /// 姝e湪鑾峰彇澶囦唤鏂囦欢鍒楄〃
+        /// </summary>
+        public const int uBackupFileListGetting = 15947;
+        /// <summary>
+        /// 鑾峰彇澶囦唤鏂囦欢鍒楄〃澶辫触
+        /// </summary>
+        public const int uGetBackupFileListFail = 15948;
+        /// <summary>
+        /// 鍝嶅簲瓒呮椂,鑾峰彇澶囦唤鏂囦欢鍒楄〃澶辫触
+        /// </summary>
+        public const int uResponseTimeoutsAndGetBackupFileListFail = 15949;
+        /// <summary>
+        /// 姝e湪涓嬭浇澶囦唤鏂囦欢
+        /// </summary>
+        public const int uBackupFileDownloading = 15950;
+        /// <summary>
+        /// 鍝嶅簲瓒呮椂,涓嬭浇澶囦唤鏂囦欢澶辫触
+        /// </summary>
+        public const int uResponseTimeoutsAndDownloadBackupFileFail = 15951;
+        /// <summary>
+        /// 涓嬭浇澶囦唤鏂囦欢澶辫触
+        /// </summary>
+        public const int uDownloadBackupFileFail = 15952;
+        /// <summary>
+        /// 姝e湪鎭㈠鍗忚皟鍣╪v鍒嗗尯
+        /// </summary>
+        public const int uGatewayNVRestoring = 15953;
+        /// <summary>
+        /// 鎭㈠鍗忚皟鍣╪v鍒嗗尯澶辫触
+        /// </summary>
+        public const int uRestoreGatewayNVFail = 15954;
+        /// <summary>
+        /// 鍝嶅簲瓒呮椂,鎭㈠鍗忚皟鍣╪v鍒嗗尯澶辫触
+        /// </summary>
+        public const int uResponseTimeoutsAndRestoreGatewayNVFail = 15955;
+        /// <summary>
+        /// 姝e湪閲嶅惎缃戝叧绯荤粺
+        /// </summary>
+        public const int uGatewayRerooting = 15956;
+        /// <summary>
+        /// 閲嶅惎缃戝叧绯荤粺澶辫触
+        /// </summary>
+        public const int uGatewayRerootFail = 15957;
+        /// <summary>
+        /// 鍝嶅簲瓒呮椂,閲嶅惎缃戝叧绯荤粺澶辫触
+        /// </summary>
+        public const int uResponseTimeoutsAndGatewayRerootFail = 15958;
+        /// <summary>
+        /// 缃戝叧鏁版嵁鎭㈠鎴愬姛!
+        /// </summary>
+        public const int uRestoreGatewayDataSuccess = 15959;
+        /// <summary>
+        /// 铏氭嫙椹卞姩璁惧
+        /// </summary>
+        public const int uVirtualDriveDevice = 15960;
+        /// <summary>
+        /// 瀵嗙爜寮�閿佹垚鍔�
+        /// </summary>
+        public const int uUnlockByPasswordSuccess = 15961;
+        /// <summary>
+        /// 瀵嗙爜寮�閿佸け璐�
+        /// </summary>
+        public const int uUnlockByPasswordFail = 15962;
+        /// <summary>
+        /// 鎸囩汗寮�閿佹垚鍔�
+        /// </summary>
+        public const int uUnlockByFingerPrintSuccess = 15963;
+        /// <summary>
+        /// 鎸囩汗寮�閿佸け璐�
+        /// </summary>
+        public const int uUnlockByFingerPrintFail = 15964;
+        /// <summary>
+        /// IC鍗″紑閿佹垚鍔�
+        /// </summary>
+        public const int uUnlockByICcardSuccess = 15965;
+        /// <summary>
+        /// IC鍗″紑閿佸け璐�
+        /// </summary>
+        public const int uUnlockByICcardFail = 15966;
+        /// <summary>
+        /// 寮�濮嬫椂闂村ぇ浜庣粨鏉熸椂闂�
+        /// </summary>
+        public const int uFromTimeIsOverToTime = 15967;
+        /// <summary>
+        /// 纭畾瑕佽В闄ょ粦瀹歿0}锛�
+        /// </summary>
+        public const int uComfirmUnBindedMsg = 15968;
+        /// <summary>
+        /// 鏇存柊绗笁鏂逛俊鎭け璐�
+        /// </summary>
+        public const int uUpdateOtherPartyInfoFail = 15969;
+        /// <summary>
+        /// 缁戝畾{0}鎴愬姛!
+        /// </summary>
+        public const int uBindSomethingSuccess = 15970;
+        /// <summary>
+        /// 閿欒,绗笁鏂逛俊鎭涪澶�
+        /// </summary>
+        public const int uErrorAndLostOtherPatyInfo = 15971;
+        /// <summary>
+        /// 鎮ㄥ綋鍓嶇殑IP鍙婄鍙e湪浜戠涓嶅瓨鍦�,璇烽噸鏂扮櫥褰�!
+        /// </summary>
+        public const int uYouIpAndPortNoRecord = 15972;
+        /// <summary>
+        /// 娑堟伅涓績
+        /// </summary>
+        public const int uMessageCenter = 15973;
+        /// <summary>
+        /// 纭鍒犻櫎娑堟伅?
+        /// </summary>
+        public const int uDeleteMessageMsg = 15974;
+        /// <summary>
+        /// 姝e湪涓婁紶澶囦唤鏂囦欢
+        /// </summary>
+        public const int uBackupFileUploading = 15975;
 
         //鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
         /// <summary>
diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems
index ba7c823..26c2f05 100755
--- a/ZigbeeApp/Shared/Shared.projitems
+++ b/ZigbeeApp/Shared/Shared.projitems
@@ -28,7 +28,6 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\PhoneZone.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\AC\ACControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\AC\ACControlBase.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\AirSwitch\AirSwitchControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\CategorySceneSelectAirSwitchSetting.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\CategorySceneSelectCurtainSetting.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\CategorySceneSelectDevice.cs" />
@@ -88,7 +87,6 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\AddScenePage.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\CustomText.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\Cycle.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\CyclicCycle.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\DelayTime.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\DeviceStateCondition.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\DeviceTarget.cs" />
@@ -106,7 +104,6 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicIfon.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicListAutomation.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicListPage.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicMain.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\MemberList.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SecurityMode.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SelectedButton.cs" />
@@ -116,6 +113,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\Send.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\TemplateDeviceAction.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\TemplateDeviceCondition.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\TemplateIgnore.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\TemplatePage.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\TimePage.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\TimePoint.cs" />
@@ -137,6 +135,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\SceneFunctionSwitchControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\VerificationCodeControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\NormalControls\LoadingControl.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\NormalControls\MessageManagementControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Form\BottomMenuSelectForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Form\NumberPswInputDialogForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Form\PswGestureSecirityForm.cs" />
@@ -225,6 +224,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Safety\CoercePswAddNewForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Safety\CoercePswEditorForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Safety\PasswordUserEditorForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\UserMain\MessageManagementForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\UserMain\QRCodeForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\ResetAccountPasswordForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Form\AreaCodeSelectForm.cs" />
@@ -293,8 +293,6 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Update\GatewayHistoryFirmwareVersionForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Update\GatewayLinuxInfoForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Manage\GatewayListForm.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\HdlBackup\HdlGatewayBackUpForm.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\HdlBackup\HdlGatewayListBackUpForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Bind\BindInfo.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Common\IMessageCommon.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Common\UserCenterCommon.cs" />

--
Gitblit v1.8.0