From f23ad1b3f9f6193f35f72104d690b21dc67d5c1f Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 06 七月 2020 12:35:25 +0800
Subject: [PATCH] 去掉了访问外网的异步

---
 ZigbeeApp/GateWay.Droid/Assets/Language.ini                                                      |   17 
 ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs                                           |   20 
 ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs                                                 |   26 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs                       |   98 
 ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs                                    |   37 
 ZigbeeApp/Home.Ios/Resources/Phone/RealDevice/SensorSphericalMotion.png                          |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs                              |    6 
 ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/lesLuminositys.png                                 |    0 
 ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs                        |    4 
 ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/addLuminosity.png                                  |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs                                  |    8 
 ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs                                              |    6 
 ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs                                                |   45 
 ZigbeeApp/Home.Ios/Resources/Phone/Item/Battery.png                                              |    0 
 ZigbeeApp/Shared/Phone/Login/AccountForgetPWD.cs                                                 |   10 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Instruct/SensorSphericalMotion.png                          |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs                                  |   12 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs               |   11 
 ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorSphericalMotion.png                              |    0 
 ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs                                                 |    6 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs                             |    8 
 ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs                       |   19 
 ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs                                    |   19 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/BatterySelected.png                                    |    0 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs                           |    4 
 ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor541.png                            |    0 
 ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs                                                   |   42 
 ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/tipIcon.png                                        |    0 
 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs                       |    4 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorSphericalMotionSelected.png                    |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs                           |   12 
 ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs                                                |   10 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs                        |    4 
 ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs                                           |   14 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs                              |    8 
 ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs                                        |  163 +
 ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs                                              |    9 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs                            |  154 
 ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs                                         | 1264 -----------
 ZigbeeApp/Shared/Phone/Device/Logic/LogicDveiceStatus.cs                                         | 1262 ++++++++++++
 ZigbeeApp/Shared/Phone/UserCenter/Password/ResetAccountPasswordForm.cs                           |    4 
 ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs                                 |   37 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/AreaCodeSelectForm.cs                          |    6 
 ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs                                           |    8 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs                               |  106 +
 ZigbeeApp/Shared/Phone/UserCenter/Password/EditorAccountPasswordForm.cs                          |    4 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs                     |   24 
 ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs                        |    8 
 ZigbeeApp/Home.Ios/Info.plist                                                                    |    4 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs                                   |   48 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/MessageManagementForm.cs                              |   46 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Update/GatewayFirmwareUpdateForm.cs                    |    4 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorSphericalMotionDirectionForm.cs         |   87 
 ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorSphericalMotionSelected2.png                     |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs                     |   28 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs                      |    5 
 ZigbeeApp/Shared/Shared.projitems                                                                |    5 
 ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorSphericalMotionSelected.png                      |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor541.png                                    |    0 
 ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/sensor541.png                                      |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorSphericalMotion.png                            |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs                          |    4 
 ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs                                                 |   66 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs                         |   34 
 ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs                                 |  104 
 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs                                  |   12 
 ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj                                                     |   36 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs                             |   54 
 ZigbeeApp/Shared/Phone/Category/SelectHouseForm.cs                                               |   19 
 ZigbeeApp/Shared/Common/CommonPage.cs                                                            |   70 
 ZigbeeApp/Shared/Phone/Device/Logic/Send.cs                                                      |    2 
 ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs                               |   65 
 ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/addLuminosity.png                                |    0 
 ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs                                              |   44 
 ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs                                     |    4 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs      |   67 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs                             |    6 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs                          |   41 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Battery.png                                            |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs                          |    8 
 ZigbeeApp/Shared/Phone/ZigBee/Device/IASZone.cs                                                  |   33 
 ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml                                           |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFileLogic.cs                               |  377 +++
 ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs                      |   45 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs                        |    9 
 ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/SensorSphericalMotion.png                        |    0 
 ZigbeeApp/Shared/Phone/UserCenter/OtherParty/OtherPartyAccountMenuForm.cs                        |   22 
 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs                                  |    8 
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs                     |  107 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayBackupLogic.cs                      |   14 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs                                |    8 
 ZigbeeApp/Shared/Phone/UserView/HomePage.cs                                                      |   18 
 ZigbeeApp/Shared/Phone/Login/AccountRegister.cs                                                  |    8 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs                        |   26 
 ZigbeeApp/Home.Ios/Resources/Language.ini                                                        |   17 
 ZigbeeApp/Home.Ios/Home.IOS.csproj                                                               |   12 
 ZigbeeApp/Shared/Phone/UserCenter/Password/EditorGesturePasswordForm.cs                          |    4 
 ZigbeeApp/Shared/R.cs                                                                            |   23 
 ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/lesLuminositys.png                               |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Abount/SLAForm.cs                                              |    4 
 ZigbeeApp/Home.Ios/Resources/Phone/Item/BatterySelected.png                                      |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs                                |   18 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressBar.cs            |   20 
 ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs                                         |    3 
 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs                        |    8 
 ZigbeeApp/Shared/Common/Device.cs                                                                |   75 
 ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupForm.cs                                 |    4 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs                            |  226 +-
 ZigbeeApp/Shared/Phone/Login/Logic/AccountLogic.cs                                               |    8 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs                              |   67 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorSphericalMotionSelected2.png                   |    0 
 ZigbeeApp/Shared/Phone/Device/CommonForm/CommonFormResouce.cs                                    |   24 
 ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs                                       |   44 
 ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/tipIcon.png                                      |    0 
 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs                         |    4 
 ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/selectedsensor541.png                              |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs                                 |   61 
 /dev/null                                                                                        |  281 --
 ZigbeeApp/Shared/Phone/UserCenter/Password/EditorSecondaryPasswordForm.cs                        |    4 
 ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs                                             |    1 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs |    4 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/UserCenterResourse.cs                      |    6 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlACZbGatewayUpdateLogic.cs                  |    2 
 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs                      |    6 
 ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs                             |   76 
 ZigbeeApp/Home.Ios/Resources/Phone/Instruct/SensorSphericalMotion.png                            |    0 
 ZigbeeApp/Shared/Phone/Device/Logic/Illumination.cs                                              |  202 +
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs                      |    8 
 128 files changed, 3,592 insertions(+), 2,659 deletions(-)

diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
index ee5fcfd..71eef6b 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini
+++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -206,8 +206,8 @@
 200= 淇敼涓存椂瀵嗙爜淇℃伅鍓�
 201=璇风偣鍑诲彸涓婅鈥滄竻闄ゅ瘑鐮佲��
 202=涓�妤�
-203=缃戝叧鍥炲澶辫触锛岃妫�鏌ョ綉缁滃拰璁惧鏄惁鍦ㄧ嚎
-204=浜戞湇鍔″櫒鍥炲澶辫触锛岃妫�鏌ョ綉缁滄槸鍚﹂摼鎺�
+203=缃戝叧鍥炲瓒呮椂
+204=浜戞湇鍔″櫒鍥炲鏃�
 205=纭畾瑕佸皢璇ヨ处鎴峰喕缁擄紵
 206=鍐荤粨澶辫触
 207=瑙e喕澶辫触
@@ -620,6 +620,12 @@
 5406=澶滅伅寮�鍏�
 5407=鑹叉俯
 5408=铚傞福鍣�
+5409=鐜鍏夌収搴�
+5410=鐓у害鍊�<
+5411=鏆梴\r\n} 0lux
+5412=浜畕\r\n} 100lux
+5413=鍦ㄥ鍐呮潯浠朵笅,榛戞殫鐓у害鍊肩害涓�0.02lux,榛勬槒鐓у害鍊納\r\n}绾︿负10lux,闃村ぉ鐓у害鍊肩害涓�5~50lux,璇锋牴鎹疄闄厈\r\n}闇�瑕佽繘琛岃皟鑺�
+
 
 
 10000=HDL Home
@@ -1945,6 +1951,8 @@
 21022=闀挎寜闈㈡澘宸︿笂瑙掓寜閿紝鎵�鏈夋寜閿畕0}鎸囩ず鐏寒璧凤紝鍒欓厤缃戞垚鍔�
 ;鍚搁《鐕冩皵浼犳劅鍣ㄧ殑鍏ョ綉鎿嶄綔鎸囩ず
 21023=闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝缁胯壊蹇棯{0}杩涘叆閰嶇綉鐘舵�侊紝缁跨伅甯镐寒鍒欏叆缃戞垚鍔�
+;鐞冨瀷绉诲姩浼犳劅鍣ㄧ殑鍏ョ綉鎿嶄綔鎸囩ず
+21024=闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝鎸囩ず鐏彉缁裤�侀棯鐑亄0}杩涘叆閰嶇綉鐘舵�侊紝缁跨伅鐔勭伃鍒欓厤缃戞垚鍔�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勫畼鏂瑰悕瀛�,浠�30000寮�濮嬧槄鈽呪槄鈽�
 30000=绱ф�ユ寜閽�
@@ -1992,6 +2000,7 @@
 30042=绠�绾︾幆澧冮潰鏉�
 30043=Mini缃戝叧
 30044=鑹叉俯鐏�
+30045=ZigBee鐞冨瀷绉诲姩浼犳劅鍣�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄澶囨墍灞炵绫荤殑缈昏瘧鍚嶅瓧,浠�40000寮�濮嬧槄鈽呪槄鈽�
 40000=閬槼
@@ -2061,6 +2070,7 @@
 50042=绠�绾︾幆澧冮潰鏉�
 50043=Mini缃戝叧
 50044=鑹叉俯鐏�
+50045=鐞冨瀷绉诲姩浼犳劅鍣�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勮澶囩被鍨嬪悕瀛�,浠�60000寮�濮�.娉�:瀹冨苟涓嶉渶瑕佸啀R.cs鏂囦欢涓畾涔夆槄鈽呪槄鈽�
 60000=浼犳劅鍣�
@@ -2105,4 +2115,5 @@
 70025=鍚搁《鐕冩皵浼犳劅鍣�
 70026=PM2.5绌烘皵璐ㄩ噺浼犳劅鍣�
 70027=绠�绾﹀鍔熻兘闈㈡澘
-70028=绠�绾︾幆澧冮潰鏉�
\ No newline at end of file
+70028=绠�绾︾幆澧冮潰鏉�
+70029=鐞冨瀷绉诲姩浼犳劅鍣�
\ No newline at end of file
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorSphericalMotion.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorSphericalMotion.png
new file mode 100755
index 0000000..b62423c
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorSphericalMotion.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorSphericalMotionSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorSphericalMotionSelected.png
new file mode 100755
index 0000000..65d2ef8
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorSphericalMotionSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorSphericalMotionSelected2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorSphericalMotionSelected2.png
new file mode 100755
index 0000000..57765bb
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorSphericalMotionSelected2.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Instruct/SensorSphericalMotion.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Instruct/SensorSphericalMotion.png
new file mode 100755
index 0000000..3fb3998
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Instruct/SensorSphericalMotion.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Battery.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Battery.png
new file mode 100755
index 0000000..33d07e8
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Battery.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/BatterySelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/BatterySelected.png
new file mode 100755
index 0000000..d03b0af
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/BatterySelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/SensorSphericalMotion.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/SensorSphericalMotion.png
new file mode 100755
index 0000000..e2a9827
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/SensorSphericalMotion.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/addLuminosity.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/addLuminosity.png
new file mode 100755
index 0000000..2c013d1
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/addLuminosity.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/lesLuminositys.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/lesLuminositys.png
new file mode 100755
index 0000000..ee4c220
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/lesLuminositys.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor541.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor541.png
new file mode 100755
index 0000000..d979f13
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor541.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor541.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor541.png
new file mode 100755
index 0000000..1ee843a
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor541.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/tipIcon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/tipIcon.png
new file mode 100755
index 0000000..57307cd
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/tipIcon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
index 301a96c..1899ef6 100644
--- a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
+++ b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
@@ -2284,6 +2284,42 @@
   <ItemGroup>
     <AndroidAsset Include="Assets\Phone\BindPic\Switch.png" />
   </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\ZigeeLogic\addLuminosity.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\ZigeeLogic\lesLuminositys.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedsensor541.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\ZigeeLogic\sensor541.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\ZigeeLogic\tipIcon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Device\SensorSphericalMotion.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Device\SensorSphericalMotionSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Device\SensorSphericalMotionSelected2.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Instruct\SensorSphericalMotion.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\RealDevice\SensorSphericalMotion.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\Battery.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\BatterySelected.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/Properties/AndroidManifest.xml b/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml
index 00871f6..fcfd53e 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="0120062401" android:installLocation="auto" android:versionName="1.1.0120062401">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="0120070302" android:installLocation="auto" android:versionName="1.1.0120070302">
 	<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="26" />
 	<permission android:name="com.hdl.home.permission.JPUSH_MESSAGE" android:protectionLevel="signature" />
 	<uses-permission android:name="android.permission.WAKE_LOCK" />
diff --git a/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs b/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
index f118970..46c911e 100644
--- a/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
+++ b/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
@@ -26,9 +26,6 @@
 		
 		public static void UpdateIdValues()
 		{
-			global::ZXing.Mobile.Resource.Id.contentFrame = global::GateWay.Droid.Resource.Id.contentFrame;
-			global::ZXing.Mobile.Resource.Layout.zxingscanneractivitylayout = global::GateWay.Droid.Resource.Layout.zxingscanneractivitylayout;
-			global::ZXing.Mobile.Resource.Layout.zxingscannerfragmentlayout = global::GateWay.Droid.Resource.Layout.zxingscannerfragmentlayout;
 		}
 		
 		public partial class Animation
@@ -3201,9 +3198,6 @@
 			// aapt resource value: 0x7f09008e
 			public const int container = 2131296398;
 			
-			// aapt resource value: 0x7f0900d9
-			public const int contentFrame = 2131296473;
-			
 			// aapt resource value: 0x7f090063
 			public const int contentPanel = 2131296355;
 			
@@ -3390,8 +3384,8 @@
 			// aapt resource value: 0x7f09005e
 			public const int list_item = 2131296350;
 			
-			// aapt resource value: 0x7f0900db
-			public const int masked = 2131296475;
+			// aapt resource value: 0x7f0900da
+			public const int masked = 2131296474;
 			
 			// aapt resource value: 0x7f0900c3
 			public const int media_actions = 2131296451;
@@ -3681,8 +3675,8 @@
 			// aapt resource value: 0x7f09000c
 			public const int view_offset_helper = 2131296268;
 			
-			// aapt resource value: 0x7f0900da
-			public const int visible = 2131296474;
+			// aapt resource value: 0x7f0900d9
+			public const int visible = 2131296473;
 			
 			// aapt resource value: 0x7f090031
 			public const int withText = 2131296305;
@@ -3976,12 +3970,6 @@
 			
 			// aapt resource value: 0x7f04004a
 			public const int zxing_layout = 2130968650;
-			
-			// aapt resource value: 0x7f04004b
-			public const int zxingscanneractivitylayout = 2130968651;
-			
-			// aapt resource value: 0x7f04004c
-			public const int zxingscannerfragmentlayout = 2130968652;
 			
 			static Layout()
 			{
diff --git a/ZigbeeApp/Home.Ios/Home.IOS.csproj b/ZigbeeApp/Home.Ios/Home.IOS.csproj
index f91c085..0a54106 100644
--- a/ZigbeeApp/Home.Ios/Home.IOS.csproj
+++ b/ZigbeeApp/Home.Ios/Home.IOS.csproj
@@ -230,6 +230,7 @@
       <BundleResource Include="Resources\Phone\Instruct\ButtonPanelSimpleEnvironment.png" />
       <BundleResource Include="Resources\Phone\Instruct\PanelCurtain.png" />
       <BundleResource Include="Resources\Phone\Instruct\PanelFangyueFourButton.png" />
+      <BundleResource Include="Resources\Phone\Instruct\SensorSphericalMotion.png" />
       <BundleResource Include="Resources\Phone\Instruct\PanelFourButton.png" />
       <BundleResource Include="Resources\Phone\Instruct\AirConditionerZbGateway.png" />
       <BundleResource Include="Resources\Phone\Instruct\SensorCeilingGas.png" />
@@ -493,6 +494,7 @@
       <BundleResource Include="Resources\Phone\Item\Check.png" />
       <BundleResource Include="Resources\Phone\Item\MessageManagement.png" />
       <BundleResource Include="Resources\Phone\Item\Add_GW.png" />
+      <BundleResource Include="Resources\Phone\Item\Battery.png" />
       <BundleResource Include="Resources\Phone\Item\Switch2.png" />
       <BundleResource Include="Resources\Phone\Item\MessageSelected.png" />
       <BundleResource Include="Resources\Phone\Item\PhoneBook.png" />
@@ -562,6 +564,7 @@
       <BundleResource Include="Resources\Phone\Item\ProgressMsg.png" />
       <BundleResource Include="Resources\Phone\Item\BottomButtonGround.png" />
       <BundleResource Include="Resources\Phone\Item\AutoBackup.png" />
+      <BundleResource Include="Resources\Phone\Item\BatterySelected.png" />
       <BundleResource Include="Resources\Phone\Item\Category_FunctionBGSelected.png" />
       <BundleResource Include="Resources\Phone\Item\NoFunction.png" />
       <BundleResource Include="Resources\Phone\Item\DeleteIcon2.png" />
@@ -614,6 +617,7 @@
       <BundleResource Include="Resources\Phone\PM2.5Sensor\TemperaturePic.png" />
       <BundleResource Include="Resources\Phone\PM2.5Sensor\HumidityPic.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\deviceselectedbackgroundcolor.png" />
+      <BundleResource Include="Resources\Phone\ZigeeLogic\sensor541.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\add.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\sensor0.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\selectedsensor13.png" />
@@ -624,6 +628,7 @@
       <BundleResource Include="Resources\Phone\ZigeeLogic\function1.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\selecteddoorlock.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\logicbj2.png" />
+      <BundleResource Include="Resources\Phone\ZigeeLogic\lesLuminositys.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\nosecurity.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\time.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\selectedsenor.png" />
@@ -636,6 +641,7 @@
       <BundleResource Include="Resources\Phone\ZigeeLogic\doorlock.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\progressbtn2.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\nodelay.png" />
+      <BundleResource Include="Resources\Phone\ZigeeLogic\addLuminosity.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\withdrawal.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\logicaddcolor.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\sensor13.png" />
@@ -662,6 +668,7 @@
       <BundleResource Include="Resources\Phone\ZigeeLogic\timeparagraph.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\light.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\selectedsensor44.png" />
+      <BundleResource Include="Resources\Phone\ZigeeLogic\selectedsensor541.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\back1.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\selectedpanel.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\nofunction.png" />
@@ -689,6 +696,7 @@
       <BundleResource Include="Resources\Phone\ZigeeLogic\timepoint.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\sensor40.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\humidity.png" />
+      <BundleResource Include="Resources\Phone\ZigeeLogic\tipIcon.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\2.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\selectedac.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\openMode.png" />
@@ -719,6 +727,7 @@
       <BundleResource Include="Resources\Phone\Device\ButtonPanelCurtainSelected2.png" />
       <BundleResource Include="Resources\Phone\Device\DimmableLightSelected2.png" />
       <BundleResource Include="Resources\Phone\Device\SensorPir.png" />
+      <BundleResource Include="Resources\Phone\Device\SensorSphericalMotionSelected2.png" />
       <BundleResource Include="Resources\Phone\Device\SensorFireSelected2.png" />
       <BundleResource Include="Resources\Phone\Device\ButtonPanelFangyueEnvironmentSelected.png" />
       <BundleResource Include="Resources\Phone\Device\LightSelected.png" />
@@ -790,6 +799,7 @@
       <BundleResource Include="Resources\Phone\Device\ThirdPartyDevice.png" />
       <BundleResource Include="Resources\Phone\Device\AirConditionerZbGatewaySelected2.png" />
       <BundleResource Include="Resources\Phone\Device\ButtonPanelFangyueEightSelected.png" />
+      <BundleResource Include="Resources\Phone\Device\SensorSphericalMotion.png" />
       <BundleResource Include="Resources\Phone\Device\ButtonPanelFangyueEnvironment.png" />
       <BundleResource Include="Resources\Phone\Device\ButtonPanelOneSelected2.png" />
       <BundleResource Include="Resources\Phone\Device\ButtonPanelSimpleMultifunctionSelected.png" />
@@ -850,6 +860,7 @@
       <BundleResource Include="Resources\Phone\Device\RepeaterZigbeeSelected.png" />
       <BundleResource Include="Resources\Phone\Device\SensorCarbonMonoxide.png" />
       <BundleResource Include="Resources\Phone\Device\ButtonPanelFourSelected2.png" />
+      <BundleResource Include="Resources\Phone\Device\SensorSphericalMotionSelected.png" />
       <BundleResource Include="Resources\Phone\Device\DimmableLightOneLoad.png" />
       <BundleResource Include="Resources\Phone\Device\SensorHumiditySelected2.png" />
       <BundleResource Include="Resources\Phone\Device\SensorPirSelected2.png" />
@@ -1038,6 +1049,7 @@
       <BundleResource Include="Resources\Phone\RealDevice\ButtonPanelFangyueFour.png" />
       <BundleResource Include="Resources\Phone\RealDevice\ButtonPanelSimpleEnvironment.png" />
       <BundleResource Include="Resources\Phone\RealDevice\CommonDevice.png" />
+      <BundleResource Include="Resources\Phone\RealDevice\SensorSphericalMotion.png" />
       <BundleResource Include="Resources\Phone\RealDevice\ButtonPanelFangyueEnvironment.png" />
       <BundleResource Include="Resources\Phone\RealDevice\AirConditionerZbGateway.png" />
       <BundleResource Include="Resources\Phone\RealDevice\SensorCeilingGas.png" />
diff --git a/ZigbeeApp/Home.Ios/Info.plist b/ZigbeeApp/Home.Ios/Info.plist
index f0aa3e9..ed1176d 100755
--- a/ZigbeeApp/Home.Ios/Info.plist
+++ b/ZigbeeApp/Home.Ios/Info.plist
@@ -54,9 +54,9 @@
 	<key>aps-environment</key>
 	<string>development</string>
 	<key>CFBundleShortVersionString</key>
-	<string>1.1.012006042</string>
+	<string>1.1.012007061</string>
 	<key>CFBundleVersion</key>
-	<string>202006042</string>
+	<string>202007061</string>
 	<key>CFBundleURLTypes</key>
 	<array>
 		<dict>
diff --git a/ZigbeeApp/Home.Ios/Resources/Language.ini b/ZigbeeApp/Home.Ios/Resources/Language.ini
index ee5fcfd..71eef6b 100755
--- a/ZigbeeApp/Home.Ios/Resources/Language.ini
+++ b/ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -206,8 +206,8 @@
 200= 淇敼涓存椂瀵嗙爜淇℃伅鍓�
 201=璇风偣鍑诲彸涓婅鈥滄竻闄ゅ瘑鐮佲��
 202=涓�妤�
-203=缃戝叧鍥炲澶辫触锛岃妫�鏌ョ綉缁滃拰璁惧鏄惁鍦ㄧ嚎
-204=浜戞湇鍔″櫒鍥炲澶辫触锛岃妫�鏌ョ綉缁滄槸鍚﹂摼鎺�
+203=缃戝叧鍥炲瓒呮椂
+204=浜戞湇鍔″櫒鍥炲鏃�
 205=纭畾瑕佸皢璇ヨ处鎴峰喕缁擄紵
 206=鍐荤粨澶辫触
 207=瑙e喕澶辫触
@@ -620,6 +620,12 @@
 5406=澶滅伅寮�鍏�
 5407=鑹叉俯
 5408=铚傞福鍣�
+5409=鐜鍏夌収搴�
+5410=鐓у害鍊�<
+5411=鏆梴\r\n} 0lux
+5412=浜畕\r\n} 100lux
+5413=鍦ㄥ鍐呮潯浠朵笅,榛戞殫鐓у害鍊肩害涓�0.02lux,榛勬槒鐓у害鍊納\r\n}绾︿负10lux,闃村ぉ鐓у害鍊肩害涓�5~50lux,璇锋牴鎹疄闄厈\r\n}闇�瑕佽繘琛岃皟鑺�
+
 
 
 10000=HDL Home
@@ -1945,6 +1951,8 @@
 21022=闀挎寜闈㈡澘宸︿笂瑙掓寜閿紝鎵�鏈夋寜閿畕0}鎸囩ず鐏寒璧凤紝鍒欓厤缃戞垚鍔�
 ;鍚搁《鐕冩皵浼犳劅鍣ㄧ殑鍏ョ綉鎿嶄綔鎸囩ず
 21023=闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝缁胯壊蹇棯{0}杩涘叆閰嶇綉鐘舵�侊紝缁跨伅甯镐寒鍒欏叆缃戞垚鍔�
+;鐞冨瀷绉诲姩浼犳劅鍣ㄧ殑鍏ョ綉鎿嶄綔鎸囩ず
+21024=闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝鎸囩ず鐏彉缁裤�侀棯鐑亄0}杩涘叆閰嶇綉鐘舵�侊紝缁跨伅鐔勭伃鍒欓厤缃戞垚鍔�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勫畼鏂瑰悕瀛�,浠�30000寮�濮嬧槄鈽呪槄鈽�
 30000=绱ф�ユ寜閽�
@@ -1992,6 +2000,7 @@
 30042=绠�绾︾幆澧冮潰鏉�
 30043=Mini缃戝叧
 30044=鑹叉俯鐏�
+30045=ZigBee鐞冨瀷绉诲姩浼犳劅鍣�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄澶囨墍灞炵绫荤殑缈昏瘧鍚嶅瓧,浠�40000寮�濮嬧槄鈽呪槄鈽�
 40000=閬槼
@@ -2061,6 +2070,7 @@
 50042=绠�绾︾幆澧冮潰鏉�
 50043=Mini缃戝叧
 50044=鑹叉俯鐏�
+50045=鐞冨瀷绉诲姩浼犳劅鍣�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勮澶囩被鍨嬪悕瀛�,浠�60000寮�濮�.娉�:瀹冨苟涓嶉渶瑕佸啀R.cs鏂囦欢涓畾涔夆槄鈽呪槄鈽�
 60000=浼犳劅鍣�
@@ -2105,4 +2115,5 @@
 70025=鍚搁《鐕冩皵浼犳劅鍣�
 70026=PM2.5绌烘皵璐ㄩ噺浼犳劅鍣�
 70027=绠�绾﹀鍔熻兘闈㈡澘
-70028=绠�绾︾幆澧冮潰鏉�
\ No newline at end of file
+70028=绠�绾︾幆澧冮潰鏉�
+70029=鐞冨瀷绉诲姩浼犳劅鍣�
\ No newline at end of file
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorSphericalMotion.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorSphericalMotion.png
new file mode 100755
index 0000000..b62423c
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorSphericalMotion.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorSphericalMotionSelected.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorSphericalMotionSelected.png
new file mode 100755
index 0000000..65d2ef8
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorSphericalMotionSelected.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorSphericalMotionSelected2.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorSphericalMotionSelected2.png
new file mode 100755
index 0000000..57765bb
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorSphericalMotionSelected2.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Instruct/SensorSphericalMotion.png b/ZigbeeApp/Home.Ios/Resources/Phone/Instruct/SensorSphericalMotion.png
new file mode 100755
index 0000000..3fb3998
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Instruct/SensorSphericalMotion.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Item/Battery.png b/ZigbeeApp/Home.Ios/Resources/Phone/Item/Battery.png
new file mode 100755
index 0000000..33d07e8
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Item/Battery.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Item/BatterySelected.png b/ZigbeeApp/Home.Ios/Resources/Phone/Item/BatterySelected.png
new file mode 100755
index 0000000..d03b0af
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Item/BatterySelected.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/RealDevice/SensorSphericalMotion.png b/ZigbeeApp/Home.Ios/Resources/Phone/RealDevice/SensorSphericalMotion.png
new file mode 100755
index 0000000..e2a9827
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/RealDevice/SensorSphericalMotion.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/addLuminosity.png b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/addLuminosity.png
new file mode 100755
index 0000000..2c013d1
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/addLuminosity.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/lesLuminositys.png b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/lesLuminositys.png
new file mode 100755
index 0000000..ee4c220
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/lesLuminositys.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/selectedsensor541.png b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/selectedsensor541.png
new file mode 100755
index 0000000..d979f13
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/selectedsensor541.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/sensor541.png b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/sensor541.png
new file mode 100755
index 0000000..1ee843a
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/sensor541.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/tipIcon.png b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/tipIcon.png
new file mode 100755
index 0000000..57307cd
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/tipIcon.png
Binary files differ
diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs
index b1c65d1..9a8e327 100755
--- a/ZigbeeApp/Shared/Common/CommonPage.cs
+++ b/ZigbeeApp/Shared/Common/CommonPage.cs
@@ -4,7 +4,7 @@
 using System.Linq;
 using System.Net;
 using System.Text;
-using Shared.Phone.UserCenter.Abount;
+
 namespace Shared.Common
 {
     public class CommonPage : UIDrawerLayout
@@ -28,20 +28,12 @@
         public static Loading Loading = new Loading();
         public void Show()
         {
-            //if (Application.IsPad)
-            //{
-            //    Application.DesignWidth = 2048;
-            //    Application.DesignHeight = 1536;
-            //    Pad.MainPage.Instance .Show();
-            // }
-            //else
-            //{
             Application.DesignWidth = 1080;
             Application.DesignHeight = 1920;
             Application.MainPage.AddChidren(this);
             AddChidren(Phone.UserView.HomePage.Instance);
             Application.MainPage.AddChidren(Loading);
-            //}
+
             Phone.UserView.HomePage.Instance.InitPage();
         }
 
@@ -50,7 +42,7 @@
         /// <summary>
         /// 鐗堟湰鍙�
         /// </summary>
-        public static string CodeIDString = "1.1.0120062401";
+        public static string CodeIDString = "1.1.0120070302";
         /// <summary>
         /// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee)
         /// </summary>
@@ -87,17 +79,9 @@
         /// </summary>
         public static string PhoneZoneStr = "86";
         /// <summary>
-        /// 鎵嬫満鍖哄悕绉�
-        /// </summary>
-        public static string ZoneNameStr = "涓浗澶ч檰";
-        /// <summary>
         /// APP瀹藉害 -- 1080
         /// </summary>
         public static int AppRealWidth = 1080;
-        /// <summary>
-        /// 璇诲彇澶氬皯椤�--999
-        /// </summary>
-        public static int PageSize = 999;
 
         /// <summary>
         /// 鐢ㄤ簬涓浗澶ч檰楠岃瘉鎵嬫満鍙锋鍒欒〃杈惧紡
@@ -126,10 +110,11 @@
         /// </summary>
         /// <param name="requestUrl">璇锋眰Url</param>
         /// <param name="byteData">璇锋眰鐨勭殑鏁版嵁</param>
+        /// <param name="timeout">瓒呮椂,榛樿10绉�</param>
         /// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns>
-        public async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> RequestHttpsZigbeeAsync(string requestUrl, byte[] byteData)
+        public ResponseEntity.ResponsePack RequestHttpsZigbeeAsync(string requestUrl, byte[] byteData, int timeout = 10)
         {
-            string result = await this.RequestHttpsZigbeeResultAsync(requestUrl, byteData);
+            string result = this.RequestHttpsZigbeeResultAsync(requestUrl, byteData, timeout);
             if (result != null)
             {
                 try
@@ -151,10 +136,11 @@
         /// </summary>
         /// <param name="requestUrl">璇锋眰Url</param>
         /// <param name="byteData">璇锋眰鐨勭殑鏁版嵁</param>
+        /// <param name="timeout">瓒呮椂,榛樿10绉�</param>
         /// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns>
-        public async System.Threading.Tasks.Task<string> RequestHttpsZigbeeResultAsync(string requestUrl, byte[] byteData)
+        public string RequestHttpsZigbeeResultAsync(string requestUrl, byte[] byteData, int timeout = 10)
         {
-            var result = await RequestHttpsZigbeeBytesResultAsync(requestUrl, byteData);
+            var result = RequestHttpsZigbeeBytesResultAsync(requestUrl, byteData, "POST", timeout);
             if (result != null)
             {
                 return Encoding.UTF8.GetString(result);
@@ -169,12 +155,13 @@
         /// <param name="requestUrl">璇锋眰Url</param>
         /// <param name="byteData">璇锋眰鐨勭殑鏁版嵁</param>
         /// <param name="requestMethod">POST 鎴栬�� GET 绛夌瓑</param>
+        /// <param name="timeout">瓒呮椂,榛樿10绉�</param>
         /// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns>
-        public async System.Threading.Tasks.Task<byte[]> RequestHttpsZigbeeBytesResultAsync(string requestUrl, byte[] byteData, string requestMethod = "POST")
+        public byte[] RequestHttpsZigbeeBytesResultAsync(string requestUrl, byte[] byteData, string requestMethod = "POST", int timeout = 10)
         {
             //璇锋眰Url鐨勫畬鎴愯矾寰�
             var fullUrl = $"{RequestHttpsHost}/{requestUrl}";
-            return await this.DoRequestZigbeeHttpsInterface(fullUrl, byteData, Config.Instance.Token, requestMethod);
+            return this.DoRequestZigbeeHttpsInterface(fullUrl, byteData, Config.Instance.Token, requestMethod, timeout);
         }
 
         /// <summary>
@@ -184,13 +171,14 @@
         /// <param name="requestUrl">璇锋眰Url</param>
         /// <param name="byteData">璇锋眰鐨勭殑鏁版嵁</param>
         /// <param name="requestMethod">POST 鎴栬�� GET 绛夌瓑</param>
+        /// <param name="timeout">瓒呮椂,榛樿10绉�</param>
         /// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns>
-        public async System.Threading.Tasks.Task<byte[]> RequestZigbeeHttpsByAdmin(string requestUrl, byte[] byteData, string requestMethod = "POST")
+        public byte[] RequestZigbeeHttpsByAdmin(string requestUrl, byte[] byteData, string requestMethod = "POST", int timeout = 10)
         {
             //璇锋眰Url鐨勫畬鎴愯矾寰�
             var fullUrl = $"{Config.Instance.AdminRequestBaseUrl}/{requestUrl}";
-            return await this.DoRequestZigbeeHttpsInterface(fullUrl, byteData, Config.Instance.AdminRequestToken, requestMethod);
-        }
+            return this.DoRequestZigbeeHttpsInterface(fullUrl, byteData, Config.Instance.AdminRequestToken, requestMethod, timeout);
+        }
 
         /// <summary>
         /// 璇锋眰鏈嶅姟鍣ㄦ柟娉�
@@ -200,8 +188,9 @@
         /// <param name="byteData">璇锋眰鐨勭殑鏁版嵁</param>
         /// <param name="token">token</param>
         /// <param name="requestMethod">POST 鎴栬�� GET 绛夌瓑</param>
+        /// <param name="timeout">瓒呮椂,榛樿10绉�</param>
         /// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns>
-        public async System.Threading.Tasks.Task<byte[]> DoRequestZigbeeHttpsInterface(string requestFullUrl, byte[] byteData, string token, string requestMethod = "POST")
+        public byte[] DoRequestZigbeeHttpsInterface(string requestFullUrl, byte[] byteData, string token, string requestMethod = "POST", int timeout = 10)
         {
             try
             {
@@ -211,7 +200,9 @@
 
                 //2锛� 鍒濆鍖朒ttpWebRequest瀵硅薄
                 webRequest.Method = requestMethod;
-                webRequest.Timeout = 10 * 1000;
+                webRequest.Timeout = timeout * 1000;
+                //鍙栨秷浣跨敤浠g悊璁块棶
+                webRequest.Proxy = null;
                 if (token != null)
                 {
                     //瀵瑰簲寰俊缃戝潃
@@ -253,11 +244,18 @@
                     return ms.ToArray();
                 }
             }
-            catch (Exception e)
+            catch (WebException e)
             {
-#if DEBUG
-                System.Console.WriteLine(e.Message);
-#endif
+                if (e.Status == WebExceptionStatus.ConnectFailure//鐢辨湁缃戠粶鍒囨崲鍒版棤缃戠粶鏃惰Е鍙�
+                    || e.Status == WebExceptionStatus.Timeout//瓒呮椂
+                    || e.Status == WebExceptionStatus.NameResolutionFailure)//鏈韩灏辨槸鏃犵綉缁滄椂鍚姩鏃惰Е鍙�
+                {
+                    Phone.UserCenter.HdlWifiLogic.Current.CanAccessHttp = false;
+                }
+                return null;
+            }
+            catch (Exception e)
+            {
                 return null;
             }
         }
@@ -359,7 +357,7 @@
         /// 鐧诲綍鎴愬姛鍚庝笂鎶ヨ澶噄d绛夌浉鍏充俊鎭粰鍚庣
         /// </summary>
         /// <returns>杩斿洖鐘舵�佺爜</returns>
-        public async System.Threading.Tasks.Task<string> PushRegID()
+        public string PushRegID()
         {
             try
             {
@@ -379,7 +377,7 @@
                     DeviceType = deviceType
                 };
                 var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(RegIDObj);
-                var reverObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/SignZigbeeNeedPushRegID", System.Text.Encoding.UTF8.GetBytes(requestJson));
+                var reverObj = CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/SignZigbeeNeedPushRegID", System.Text.Encoding.UTF8.GetBytes(requestJson));
                 if (reverObj == null)
                 {
                     return null;
diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
index cd8dc6a..a436fb3 100755
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -551,7 +551,7 @@
 
             //鑾峰彇缂栬緫璁惧Mac鍚嶅瓧鐨勫懡浠ゅ瓧绗�
             var sendData = this.GetReDeviceMacNameCommandText(device.DeviceAddr, device.DeviceEpoint, macName);
-            var result = HdlDeviceCommonLogic.Current.SendJobjectDataToGateway(device, "MacRename", sendData, "MacRename_Respon");
+            var result = HdlDeviceCommonLogic.Current.SendJobjectDataToGateway(device, "MacRename", sendData, "MacRename_Respon", 8);
             if (result.ErrorMsg != null || result.ErrorMsgDiv == 0)
             {
                 return null;
@@ -578,7 +578,7 @@
             }
             //鑾峰彇缂栬緫璁惧绔偣鍚嶅瓧鐨勫懡浠ゅ瓧绗�
             var sendData = this.GetReDeviceEpointNameCommandText(device.DeviceAddr, device.DeviceEpoint, deviceName);
-            var result = HdlDeviceCommonLogic.Current.SendJobjectDataToGateway(device, "DeviceRename", sendData, "DeviceRenameRespon");
+            var result = HdlDeviceCommonLogic.Current.SendJobjectDataToGateway(device, "DeviceRename", sendData, "DeviceRenameRespon", 8);
             if (result.ErrorMsg != null || result.ErrorMsgDiv == 0)
             {
                 return null;
@@ -2161,6 +2161,12 @@
                 info.ConcreteType = DeviceConcreteType.Sensor_DoorWindow;
                 info.ConcreteTextId = R.MyInternationalizationString.uDeviceModelId1301;
             }
+            else if (iasZone.IasDeviceType == 541)
+            {
+                //鐞冨瀷绉诲姩浼犳劅鍣�
+                info.ConcreteType = DeviceConcreteType.Sensor_SphericalMotion;
+                info.ConcreteTextId = R.MyInternationalizationString.uDeviceModelId1205;
+            }
         }
 
         #endregion
@@ -2400,39 +2406,6 @@
             list.Add(DeviceBeloneType.A鏈煡璁惧);
             
             return list;
-        }
-
-        #endregion
-
-        #region 鈻� 鑾峰彇璁惧鍦ㄧ嚎鐘舵�佸垪琛╛______________
-
-        /// <summary>
-        /// 鑾峰彇璁惧鍦ㄧ嚎鐘舵�佸垪琛�(娉ㄦ剰,涓�涓澶囧彧杩斿洖涓�涓洖璺�)
-        /// </summary>
-        /// <param name="gwId">缃戝叧id</param>
-        /// <returns></returns>
-        public List<CommonDevice> GetDeviceOnlineList(string gwId)
-        {
-            var zbway = HdlGatewayLogic.Current.GetLocalGateway(gwId);
-            int statu = 0;
-            var listDevice = this.GetDeviceListFromGateway(zbway, ref statu, false, ShowErrorMode.NO);
-            if (statu == -1)
-            {
-                //褰撳嚭鐜板紓甯告椂,浣跨敤鍚庡鎿嶄綔,鐩存帴鑾峰彇鏈湴鐨勮澶囧垪琛�
-                listDevice = this.GetDeviceByGatewayID(gwId);
-            }
-
-            var listCheck = new HashSet<string>();
-            var listReturn = new List<CommonDevice>();
-            foreach (var device in listDevice)
-            {
-                if (listCheck.Contains(device.DeviceAddr) == false)
-                {
-                    listCheck.Add(device.DeviceAddr);
-                    listReturn.Add(device);
-                }
-            }
-            return listReturn;
         }
 
         #endregion
@@ -2862,6 +2835,8 @@
             mainDevice.ModelIdentifier = device.DeviceInfo.ModelIdentifier;
             //搴忓垪鍙�
             mainDevice.SerialNumber = device.DeviceInfo.ProductCode;
+            //璁惧鍔熻兘绫诲瀷
+            mainDevice.DfunctionType = (DeviceFunctionType)device.DeviceInfo.FunctionType;
 
             mainDevice.InClusterList.Clear();
             mainDevice.InClusterList.AddRange(device.DeviceInfo.InClusterList);
@@ -2888,6 +2863,11 @@
             else if (mainDevice.Type == DeviceType.DimmableLight)
             {
                 mainDevice.DfunctionType = DeviceFunctionType.A鐏厜;
+                if (device.DeviceInfo.FunctionType != (int)DeviceFunctionType.A鐏厜)
+                {
+                    //璋冨厜鍣ㄥ浐瀹氱伅鍏�
+                    this.SendDeviceFunctionTypeToGateway(mainDevice, DeviceFunctionType.A鐏厜);
+                }
                 if (mainDevice.IsCustomizeImage == false)
                 {
                     mainDevice.IconPath = "Device/Light.png";
@@ -2897,6 +2877,11 @@
             else if (mainDevice.Type == DeviceType.ColorTemperatureLight)
             {
                 mainDevice.DfunctionType = DeviceFunctionType.A鐏厜;
+                if (device.DeviceInfo.FunctionType != (int)DeviceFunctionType.A鐏厜)
+                {
+                    //鑹叉俯鐏浐瀹氱伅鍏�
+                    this.SendDeviceFunctionTypeToGateway(mainDevice, DeviceFunctionType.A鐏厜);
+                }
                 if (mainDevice.IsCustomizeImage == false)
                 {
                     mainDevice.IconPath = "Device/ColorLightTemperature.png";
@@ -2912,6 +2897,11 @@
                     if (mainDevice.DfunctionType == DeviceFunctionType.A鏈畾涔�)
                     {
                         mainDevice.DfunctionType = DeviceFunctionType.A鐏厜;
+                        if (device.DeviceInfo.FunctionType != (int)DeviceFunctionType.A鐏厜)
+                        {
+                            //缁х數鍣ㄩ粯璁や负鐏厜
+                            this.SendDeviceFunctionTypeToGateway(mainDevice, DeviceFunctionType.A鐏厜);
+                        }
                     }
                     if (mainDevice.IsCustomizeImage == false)
                     {
@@ -2926,6 +2916,11 @@
                 if (mainDevice.DfunctionType == DeviceFunctionType.A鏈畾涔�)
                 {
                     mainDevice.DfunctionType = DeviceFunctionType.A寮�鍏�;
+                    if (device.DeviceInfo.FunctionType != (int)DeviceFunctionType.A寮�鍏�)
+                    {
+                        //绌烘皵寮�鍏抽粯璁や负寮�鍏�
+                        this.SendDeviceFunctionTypeToGateway(mainDevice, DeviceFunctionType.A寮�鍏�);
+                    }
                 }
                 if (mainDevice.IsCustomizeImage == false)
                 {
@@ -2936,6 +2931,11 @@
             else if (mainDevice.Type == DeviceType.ColorDimmableLight)
             {
                 mainDevice.DfunctionType = DeviceFunctionType.A鐏厜;
+                if (device.DeviceInfo.FunctionType != (int)DeviceFunctionType.A鐏厜)
+                {
+                    //褰╃伅榛樿涓哄紑鍏�
+                    this.SendDeviceFunctionTypeToGateway(mainDevice, DeviceFunctionType.A鐏厜);
+                }
                 if (mainDevice.IsCustomizeImage == false)
                 {
                     mainDevice.IconPath = "Device/ColorLight.png";
@@ -3060,6 +3060,7 @@
 
             //=========鈽呪槄PIR浼犳劅鍣ㄧ被(1200-1299)鈽呪槄=========
             this.dicDeviceModelIdEnum["MSPIR01-ZB.10"] = "1200-1200-60000";//pir浼犳劅鍣�220
+            this.dicDeviceModelIdEnum["MSPIRB-ZB.10"] = "1205-1200-60000";//鐞冨瀷绉诲姩浼犳劅鍣�
 
             //=========鈽呪槄瀹夐槻绫讳紶鎰熷櫒绫�(1300-2299)鈽呪槄=========
             //杩欓噷鏄害涔愬厠鐨�
@@ -3249,6 +3250,10 @@
         /// pir浼犳劅鍣�220 闀滃儚id锛�1200
         /// </summary>
         Sensor_Pir = 1200,
+        /// <summary>
+        /// 鐞冨舰绉诲姩浼犳劅鍣� 闀滃儚id锛�1205
+        /// </summary>
+        Sensor_SphericalMotion = 1205,
 
         //=========鈽呪槄瀹夐槻绫讳紶鎰熷櫒绫�(1300-2299)鈽呪槄=========
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
index bf17018..d4ab25f 100755
--- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -857,10 +857,8 @@
                     string mainKeys = LocalDevice.Current.GetDeviceMainKeys(report);
                     if (this.dicDeviceRowControl.ContainsKey(mainKeys) == true)
                     {
-                        //鏈湴璁惧瀵硅薄
-                        var locadevice = LocalDevice.Current.GetDevice(mainKeys);
-                        //鍒锋柊鍗$墖淇℃伅
-                        this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
+                        //寮�鍚闂儊鐗规晥
+                        this.dicDeviceRowControl[mainKeys].StartRowLightAppeal();
                     }
 
                 }, ShowErrorMode.NO);
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
index 8a72cc1..38c1f5b 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
@@ -263,31 +263,13 @@
             {
                 this.btnStatu.Text = HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device);
             }
-
-            if (this.btnDeviceName.IsSelected == isOpen)
-            {
-                //鐘舵�佷竴鏍�,鍒欎笉闇�瑕佸鐞�
-                return;
-            }
-            //璁惧鍚嶇О鎺т欢
-            this.btnDeviceName.IsSelected = isOpen;
-            this.btnDeviceName.IsBold = isOpen;
-            //璁惧鐨勮儗鏅渾鍦堝浘
-            if (isOpen == true)
-            {
-                this.frameIconBackGroud.BackgroundColor = Common.ZigbeeColor.Current.GXCSelectedBackgroundColor;
-            }
-            else
-            {
-                this.frameIconBackGroud.BackgroundColor = Common.ZigbeeColor.Current.GXCGrayBackgroundColor;
-            }
-            //璁惧鍥炬爣鎺т欢
-            this.btnDeviceIcon.IsSelected = isOpen;
             //寮�鍏虫帶浠�
-            if (this.btnSwitch != null)
+            if (this.btnSwitch != null && this.btnSwitch.IsSelected != isOpen)
             {
                 this.btnSwitch.IsSelected = isOpen;
             }
+            //鍒囨崲鍗$墖鐘舵�佺壒鏁�
+            this.SwitchRowStatuAppeal(isOpen);
         }
 
         /// <summary>
@@ -464,6 +446,80 @@
 
         #endregion
 
+        #region 鈻� 琛岄棯鐑佺壒鏁坃________________________
+
+        /// <summary>
+        /// 鏄惁澶勪簬鐗规晥涓�
+        /// </summary>
+        private bool isAppeal = false;
+        /// <summary>
+        /// 寮�鍚闂儊鐗规晥
+        /// </summary>
+        public void StartRowLightAppeal()
+        {
+            //璁惧鐘舵�佸繀椤诲埛鏂�
+            this.btnStatu.Text = HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device);
+
+            if (this.isAppeal == true) { return; }
+            this.isAppeal = true;
+
+            HdlThreadLogic.Current.RunThread(() =>
+            {
+                //闂儊5绉�,闂撮殧400姣
+                int count = 5000 / 400;
+                bool isOpen = false;
+                while (this.Parent != null && count >= 0)
+                {
+                    //闂儊鐗规晥
+                    HdlThreadLogic.Current.RunMain(() =>
+                    {
+                        isOpen = !isOpen;
+                        this.SwitchRowStatuAppeal(isOpen);
+                    });
+                    System.Threading.Thread.Sleep(400);
+                    count--;
+                }
+                if (this.Parent != null && isOpen == false)
+                {
+                    HdlThreadLogic.Current.RunMain(() =>
+                    {
+                        //缁撴潫鏃�,榛樿涓烘墦寮�鐗规晥
+                        this.SwitchRowStatuAppeal(true);
+                    }, ShowErrorMode.NO);
+                }
+                this.isAppeal = false;
+
+            }, ShowErrorMode.NO);
+        }
+
+        /// <summary>
+        /// 鍒囨崲鍗$墖鐘舵�佺壒鏁�
+        /// </summary>
+        private void SwitchRowStatuAppeal(bool isOpen)
+        {
+            if (this.btnDeviceName.IsSelected == isOpen)
+            {
+                //鐘舵�佷竴鏍�,鍒欎笉闇�瑕佸鐞�
+                return;
+            }
+            //璁惧鍚嶇О鎺т欢
+            this.btnDeviceName.IsSelected = isOpen;
+            this.btnDeviceName.IsBold = isOpen;
+            //璁惧鐨勮儗鏅渾鍦堝浘
+            if (isOpen == true)
+            {
+                this.frameIconBackGroud.BackgroundColor = Common.ZigbeeColor.Current.GXCSelectedBackgroundColor;
+            }
+            else
+            {
+                this.frameIconBackGroud.BackgroundColor = Common.ZigbeeColor.Current.GXCGrayBackgroundColor;
+            }
+            //璁惧鍥炬爣鎺т欢
+            this.btnDeviceIcon.IsSelected = isOpen;
+        }
+
+        #endregion
+
         #region 鈻� 鎺т欢鎽ф瘉___________________________
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/Category/SelectHouseForm.cs b/ZigbeeApp/Shared/Phone/Category/SelectHouseForm.cs
index 7c70c74..5d2d1bc 100755
--- a/ZigbeeApp/Shared/Phone/Category/SelectHouseForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/SelectHouseForm.cs
@@ -117,20 +117,11 @@
                 frow.IsSelected = true;
             }
 
-            frow.ButtonClickEvent += SelectFloor_MouseUpEvent;
-        }
-
-        /// <summary>
-        /// SelectFloor_MouseUpEvent
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="mouseEventArgs"></param>
-        private void SelectFloor_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
-        {
-            (sender as Device.CommonForm.LeftIconButtonRow).IsSelected = true;
-            var home = UserCenter.HdlResidenceLogic.Current.GetHouseByFilePath((sender as Device.CommonForm.LeftIconButtonRow).Tag.ToString());
-            RemoveView();
-            HouseAction?.Invoke(home.Id);
+            frow.ButtonClickEvent += (sender, e) =>
+            {
+                RemoveView();
+                HouseAction?.Invoke(house.Id);
+            };
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/CommonFormResouce.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/CommonFormResouce.cs
index 2addb77..8dc456c 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/CommonFormResouce.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/CommonFormResouce.cs
@@ -76,11 +76,11 @@
         /// </summary>
         /// <param name="loginSendVerCodeObj"></param>
         /// <returns></returns>
-        public static async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> LoginSendVerCode(SendDataToServer.LoginSendVerCodeObj loginSendVerCodeObj)
+        public static Shared.Common.ResponseEntity.ResponsePack LoginSendVerCode(SendDataToServer.LoginSendVerCodeObj loginSendVerCodeObj)
         {
             try
             {
-                var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/LoginSendVerCode", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(loginSendVerCodeObj)));
+                var requestRevertObj = CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/LoginSendVerCode", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(loginSendVerCodeObj)));
                 return requestRevertObj;
             }
             catch
@@ -94,11 +94,11 @@
         /// </summary>
         /// <param name="loginValidCodeOBJ"></param>
         /// <returns></returns>
-        public static async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> LoginByCode(SendDataToServer.LoginValidCodeOBJ loginValidCodeOBJ)
+        public static Shared.Common.ResponseEntity.ResponsePack LoginByCode(SendDataToServer.LoginValidCodeOBJ loginValidCodeOBJ)
         {
             try
             {
-                var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/LoginValidCode", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(loginValidCodeOBJ)));
+                var requestRevertObj = CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/LoginValidCode", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(loginValidCodeOBJ)));
                 return requestRevertObj;
             }
             catch
@@ -112,11 +112,11 @@
         /// </summary>
         /// <param name="registerAccountObj"></param>
         /// <returns></returns>
-        public static async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> RegisterSendVerCode(SendDataToServer.RegisterSendVerCodeObj registerAccountObj)
+        public static Shared.Common.ResponseEntity.ResponsePack RegisterSendVerCode(SendDataToServer.RegisterSendVerCodeObj registerAccountObj)
         {
             try
             {
-                var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/RegisterSendVerCode", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(registerAccountObj)));
+                var requestRevertObj = CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/RegisterSendVerCode", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(registerAccountObj)));
                 return requestRevertObj;
             }
             catch
@@ -130,11 +130,11 @@
         /// </summary>
         /// <param name="registerAccountObj"></param>
         /// <returns></returns>
-        public static async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> Register(SendDataToServer.RegisterAccountObj registerAccountObj)
+        public static Shared.Common.ResponseEntity.ResponsePack Register(SendDataToServer.RegisterAccountObj registerAccountObj)
         {
             try
             {
-                var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ValidataCodeAndRegisterAccount", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(registerAccountObj)));
+                var requestRevertObj = CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ValidataCodeAndRegisterAccount", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(registerAccountObj)));
                 return requestRevertObj;
             }
             catch
@@ -148,11 +148,11 @@
         /// </summary>
         /// <param name="resetPasswordObj"></param>
         /// <returns></returns>
-        public static async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> ResetPassword(SendDataToServer.ResetPasswordObj resetPasswordObj)
+        public static Shared.Common.ResponseEntity.ResponsePack ResetPassword(SendDataToServer.ResetPasswordObj resetPasswordObj)
         {
             try
             {
-                var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ResetPassword", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(resetPasswordObj)));
+                var requestRevertObj = CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ResetPassword", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(resetPasswordObj)));
                 return requestRevertObj;
             }
             catch
@@ -166,11 +166,11 @@
         /// </summary>
         /// <param name="validatorCodeObj"></param>
         /// <returns></returns>
-        public static async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> ValidatorCode(SendDataToServer.ValidatorCodeObj validatorCodeObj)
+        public static Shared.Common.ResponseEntity.ResponsePack ValidatorCode(SendDataToServer.ValidatorCodeObj validatorCodeObj)
         {
             try
             {
-                var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ValidatorCode", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(validatorCodeObj)));
+                var requestRevertObj = CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ValidatorCode", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(validatorCodeObj)));
                 return requestRevertObj;
             }
             catch
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs b/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs
index 6f80b9b..cb02f21 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs
@@ -12,7 +12,7 @@
         /// 閫変腑璇ヨ澶囧姛鑳戒綔涓烘潯浠舵垨鑰呯洰鏍囩殑瑙嗗浘鏂规硶
         /// </summary>
         /// <param name="common">Common.</param>
-        public static void CurrentDeviceView(FrameLayout flMain, CommonDevice common, bool edit, string str)
+        public static void CurrentDeviceView(FrameLayout flMain, CommonDevice common, bool edit, string str,int intValue)
         {
             #region  -------鐣岄潰甯冨眬閮ㄥ垎
             //涓嶈褰撳墠鐣岄潰婊戝姩
@@ -59,10 +59,10 @@
             };
             var horizontalSeekBarVol = new DiyImageSeekBar
             {
-                //Y = openView.frameLayout.Bottom,
-                X = Application.GetRealWidth(80),
-                Width = Application.GetRealWidth(915),
-                Height = Application.GetRealHeight(160),//婊戝姩鏉$埗鎺т欢楂樺害
+                //Y = openView.frameLayout.Bottom,//杩涘害鏉$埗鎺т欢Y鍧愭爣
+                X = Application.GetRealWidth(80),//杩涘害鏉鍧愭爣
+                Width = Application.GetRealWidth(915),//杩涘害鏉$殑闀垮害
+                Height = Application.GetRealHeight(160),//杩涘害鏉$埗鎺т欢楂樺害
                 IsProgressTextShow = true,//鏄剧ず鐧惧垎姣�
                 IsClickable = false,//杩涘害鏉℃槸鍚︽粦鍔�
                 ProgressBarColor = ZigbeeColor.Current.LogicProgressColorSelected,//閫変腑杩涘害鏉¢鑹�
@@ -99,33 +99,49 @@
             {
                 if (_if[0]== "condition")
                 {
-                    foreach (var deviceinfo in Common.Logic.CurrentLogic.Conditions)
+                    var deviceinfo = Common.Logic.CurrentLogic.Conditions[intValue];
+                    if (deviceinfo["Type"] == "1")
                     {
-                        if (deviceinfo["Type"] == "1")
+                        if (common.DeviceAddr == deviceinfo["MacAddr"] && common.DeviceEpoint.ToString() == deviceinfo["Epoint"])
                         {
-                            if (common.DeviceAddr == deviceinfo["MacAddr"] && common.DeviceEpoint.ToString() == deviceinfo["Epoint"])
-                            {
-                                devices = deviceinfo;
-                                break;
+                            devices = deviceinfo;
 
-                            }
                         }
                     }
+                    //foreach (var deviceinfo in Common.Logic.CurrentLogic.Conditions)
+                    //{
+                    //    if (deviceinfo["Type"] == "1")
+                    //    {
+                    //        if (common.DeviceAddr == deviceinfo["MacAddr"] && common.DeviceEpoint.ToString() == deviceinfo["Epoint"])
+                    //        {
+                    //            devices = deviceinfo;
+                    //            break;
+                    //        }
+                    //    }
+                    //}
                 }
                 else
                 {
-                    foreach (var deviceinfo in Common.Logic.CurrentLogic.Actions)
+                    var deviceinfo = Common.Logic.CurrentLogic.Actions[intValue];
+                    if (deviceinfo["LinkType"].ToString() == "0")
                     {
-                        if (deviceinfo["LinkType"].ToString() == "0")
-                        {
 
-                            if (deviceinfo["DeviceAddr"].ToString() == common.DeviceAddr && deviceinfo["Epoint"].ToString() == common.DeviceEpoint.ToString())
-                            {
-                                TaskList = deviceinfo["TaskList"] as List<Dictionary<string, string>>;
-                                break;
-                            }
+                        if (deviceinfo["DeviceAddr"].ToString() == common.DeviceAddr && deviceinfo["Epoint"].ToString() == common.DeviceEpoint.ToString())
+                        {
+                            TaskList = deviceinfo["TaskList"] as List<Dictionary<string, string>>;
                         }
                     }
+                    //foreach (var deviceinfo in Common.Logic.CurrentLogic.Actions)
+                    //{
+                    //    if (deviceinfo["LinkType"].ToString() == "0")
+                    //    {
+                    //        if (deviceinfo["DeviceAddr"].ToString() == common.DeviceAddr && deviceinfo["Epoint"].ToString() == common.DeviceEpoint.ToString())
+                    //        {
+                    //            TaskList = deviceinfo["TaskList"] as List<Dictionary<string, string>>;
+                    //            break;
+                    //        }
+                    //    }
+                    //}
                 }
             }
             #endregion
@@ -298,7 +314,7 @@
                         Send.dictionary(deviceConditionsInfo, "AttriButeId", "1281");
                         Send.dictionary(deviceConditionsInfo, "AttriButeData2", "0");
 
-                        int timevalue = 0;
+                        int timeValue = 0;
                         ///鐐瑰嚮纭浜嬩欢
                         openView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
                         {
@@ -307,7 +323,7 @@
                             closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                             openView.selectedIconBtn.Visible = true;
                             closeView.selectedIconBtn.Visible = false;
-                            if (iASZonedevice.IasDeviceType == 13)
+                            if (iASZonedevice.IasDeviceType == 13||iASZonedevice.IasDeviceType == 541)
                             {
                                 closeView.selectedIconBtn.Visible = true;
                             }
@@ -324,20 +340,15 @@
                             closeView.selectedIconBtn.Visible = true;
                             Send.dictionary(deviceConditionsInfo, "Range", "1");
                             Send.dictionary(deviceConditionsInfo, "AttriButeData1", "0");
-                            if (iASZonedevice.IasDeviceType == 13)
+                            if (iASZonedevice.IasDeviceType == 13|| iASZonedevice.IasDeviceType == 541)
                             {
                                 SelectedDeviceStatus = "";
-                                openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                                 closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
-                                openView.selectedIconBtn.Visible = false;
-                                closeView.selectedIconBtn.Visible = true;
                                 var ignoreTime = new IgnoreTime();
                                 UserView.HomePage.Instance.AddChidren(ignoreTime);
                                 UserView.HomePage.Instance.PageIndex += 1;
-                                ignoreTime.Show(common, closeView.titleBtn.Text, edit, timevalue, _if[1]);
+                                ignoreTime.Show(common, closeView.titleBtn.Text, edit, timeValue, _if[1]);
                             }
-
-
                         };
 
                         switch (iASZonedevice.IasDeviceType)
@@ -357,18 +368,18 @@
                             case 22:
                                 {
                                     #region
+                                    var view = completeView.Show(3);
                                     openView.titleBtn.TextID = MyInternationalizationString.logicopen;
                                     closeView.titleBtn.TextID = MyInternationalizationString.logicclose;
-                                    completeView.Show(3).AddChidren(openView.Show());
-                                    completeView.Show(3).AddChidren(closeView.Show());
+                                    view.AddChidren(openView.Show());
+                                    view.AddChidren(closeView.Show());
 
-                                    mFunView timeoutView = new mFunView();
-                                    timeoutView.frameLayout.Y = closeView.frameLayout.Bottom;
-                                    timeoutView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
-                                    completeView.Show(3).AddChidren(timeoutView.Show());
-                                    timeoutView.titleBtn.TextID = MyInternationalizationString.closetimeout;
-                                    timeoutView.selectedIconBtn.UnSelectedImagePath = "ZigeeLogic/next.png";
-                                    timeoutView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
+                                    takebackView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+                                    takebackView.selectedIconBtn.Visible = true;
+                                    takebackView.titleBtn.TextID = MyInternationalizationString.closetimeout;
+                                    takebackView.selectedIconBtn.UnSelectedImagePath = "ZigeeLogic/next.png";
+                                    view.AddChidren(takebackView.Show());
+                                    takebackView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
                                     {
                                         SelectedDeviceStatus = "";
                                         openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
@@ -378,7 +389,7 @@
                                         var ignoreTime = new IgnoreTime();
                                         UserView.HomePage.Instance.AddChidren(ignoreTime);
                                         UserView.HomePage.Instance.PageIndex += 1;
-                                        ignoreTime.Show(common, timeoutView.titleBtn.Text, edit, timevalue, _if[1]);
+                                        ignoreTime.Show(common, takebackView.titleBtn.Text, edit, timeValue, _if[1]);
 
                                     };
 
@@ -424,6 +435,61 @@
                                     completeView.Show(1).AddChidren(openView.Show());
                                 }
                                 break;
+                            case 541:
+                                {
+                                    int _height = 3;
+                                    if (edit)
+                                    {
+                                        _height = 2;
+                                    }
+                                    var view = completeView.Show(_height);
+                                    openView.titleBtn.TextID = MyInternationalizationString.someone;
+                                    closeView.titleBtn.TextID = MyInternationalizationString.unattendedtime1;
+                                    closeView.selectedIconBtn.UnSelectedImagePath = "ZigeeLogic/next.png";
+                                    closeView.selectedIconBtn.Visible = true;
+                                    view.AddChidren(openView.Show());
+                                    view.AddChidren(closeView.Show());
+
+                                    takebackView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+                                    takebackView.selectedIconBtn.Visible = true;
+                                    takebackView.titleBtn.TextID = MyInternationalizationString.ambientLight;
+                                    takebackView.selectedIconBtn.UnSelectedImagePath = "ZigeeLogic/next.png";
+                                    if (edit)
+                                    {
+
+                                        if (devices["Cluster_ID"] == "1024")
+                                        {
+                                            flMain.RemoveFromParent();
+                                            var illumination = new Illumination();
+                                            UserView.HomePage.Instance.AddChidren(illumination);
+                                            UserView.HomePage.Instance.PageIndex += 1;
+                                            illumination.Show(common, takebackView.titleBtn.Text, int.Parse(devices["AttriButeData1"]), true);
+                                        }
+                                        else
+                                        {
+                                            closeView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+                                        }
+                                    }
+                                    else
+                                    {
+                                        view.AddChidren(takebackView.Show());
+
+                                    }
+
+
+                                    takebackView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
+                                    {
+                                        SelectedDeviceStatus = "";
+                                        openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+                                        openView.selectedIconBtn.Visible = false;
+                                        var illumination = new Illumination();
+                                        UserView.HomePage.Instance.AddChidren(illumination);
+                                        UserView.HomePage.Instance.PageIndex += 1;
+                                        illumination.Show(common,takebackView.titleBtn.Text, 0, false);
+
+                                    };
+                                }
+                                break;
                             default:
                                 {
                                     openView.titleBtn.TextID = MyInternationalizationString.callthepolice;
@@ -439,7 +505,7 @@
                             {
                                 if (devices.ContainsKey("IgnoreTime"))
                                 {
-                                    timevalue = int.Parse(devices["IgnoreTime"]);
+                                    timeValue = int.Parse(devices["IgnoreTime"]);
                                 }
                                 else
                                 {
@@ -462,8 +528,7 @@
 
 
                             }
-
-
+                            
                         }
 
                     }
@@ -1206,15 +1271,19 @@
                     }
                     break;
                 case DeviceType.ColorTemperatureLight: {
-
-                        
-
-
                         flMain.RemoveFromParent();
                         var nightlight = new Nightlight();
                         UserView.HomePage.Instance.AddChidren(nightlight);
                         UserView.HomePage.Instance.PageIndex += 1;
-                        nightlight.Show(common, false, _if[1]);
+                        if (edit)
+                        {
+                            nightlight.Show(common, edit, _if[1], Common.Logic.CurrentLogic.Actions[intValue]);
+                        }
+                        else
+                        {
+                            nightlight.Show(common, edit, _if[1]);
+                        }
+                        
                     }
                     break;
             }
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs
index 7778c60..5efe52a 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs
@@ -638,6 +638,7 @@
                     actiondevice.selecetddevicestateBtn.Text = state;
 
                     ///缂栬緫
+                    actiondevice.edit.Tag = i.ToString();
                     actiondevice.edit.MouseUpEventHandler += (sender, e) =>
                     {
                         switch (linkType)
@@ -646,21 +647,9 @@
                             case 8:
                                 {
                                     var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
-                                    if (deviceinof.Type != DeviceType.ColorTemperatureLight)
-                                    {
-                                        var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
-                                        this.AddChidren(flMain);
-                                        CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_lockaction");
-                                    }
-                                    else
-                                    {
-                                        var nightlight = new Nightlight();
-                                        UserView.HomePage.Instance.AddChidren(nightlight);
-                                        UserView.HomePage.Instance.PageIndex += 1;
-                                        nightlight.Show(deviceinof, true, "lockaction",actions);
-                                    }
-
-
+                                    var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+                                    this.AddChidren(flMain);
+                                    CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_lockaction", int.Parse(actiondevice.edit.Tag.ToString()));
                                 }
                                 break;
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Illumination.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Illumination.cs
new file mode 100755
index 0000000..77a0925
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Illumination.cs
@@ -0,0 +1,202 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared.Common;
+using Shared.R;
+
+namespace Shared.Phone.Device.Logic
+{
+    public class Illumination : FrameLayout
+    {
+        public Illumination()
+        {
+            Tag = "Logic";
+        }
+
+        public void Show(ZigBee.Device.CommonDevice common,string name,int progresValue,bool _bool)
+        {
+            this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+            TopView view = new TopView();
+            this.AddChidren(view.TopRowView());
+            view.toptitleNameBtn.Text = name;
+            view.clickBtn.MouseDownEventHandler += (sender, e) =>
+            {
+                RemoveFromParent();
+            };
+            FrameLayout middle = new FrameLayout
+            {
+                Y = view.topRowLayout.Bottom,
+                Height = Application.GetRealHeight(Method.H - 184),
+                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+            };
+            this.AddChidren(middle);
+            //鐧借壊蹇埗鎺т欢
+            FrameLayout blankFraLayout = new FrameLayout
+            {
+                Height = Application.GetRealHeight(616),
+                BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+            };
+            middle.AddChidren(blankFraLayout);
+            //鐓у害鍊兼帶浠�
+            Button illuminationBtn = new Button
+            {
+                X = Application.GetRealWidth(58),
+                Y = Application.GetRealHeight(259 - 184),
+                Height = Application.GetRealHeight(50),
+                Width = Application.GetRealWidth(300),
+                Text =Language.StringByID(MyInternationalizationString.illuminanceValue)+ progresValue+"lux",
+                //TextID = MyInternationalizationString.Save,
+                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                TextSize = 12,
+            };
+            middle.AddChidren(illuminationBtn);
+            //-鍥炬爣鎺т欢
+            Button lessBtn = new Button
+            {
+                X = Application.GetRealWidth(847),
+                Y = Application.GetRealHeight(46),
+                Height = Application.GetMinRealAverage(104),
+                Width = Application.GetMinRealAverage(104),
+                UnSelectedImagePath = "ZigeeLogic/lesLuminositys.png",
+            };
+            middle.AddChidren(lessBtn);
+            //+鍥炬爣鎺т欢
+            Button addBtn = new Button
+            {
+                X = lessBtn.Right,
+                Y = Application.GetRealHeight(46),
+                Height = Application.GetMinRealAverage(104),
+                Width = Application.GetMinRealAverage(104),
+                UnSelectedImagePath = "ZigeeLogic/addLuminosity.png",
+            };
+            middle.AddChidren(addBtn);
+            //杩涘害鏉℃帶浠�
+            var horizontalSeekBarVol = new DiyImageSeekBar
+            {
+                Y = Application.GetRealHeight(173),//杩涘害鏉$埗鎺т欢Y鍧愭爣
+                X = Application.GetRealWidth(104),//杩涘害鏉鍧愭爣
+                Width = Application.GetRealWidth(873),//杩涘害鏉$殑闀垮害
+                Height = Application.GetRealHeight(56),//杩涘害鏉$埗鎺т欢楂樺害
+                IsProgressTextShow = false,//鏄剧ず鐧惧垎姣�
+                IsClickable = true,//杩涘害鏉℃槸鍚︽粦鍔�
+                ProgressBarColor = ZigbeeColor.Current.LogicProgressColorSelected,//閫変腑杩涘害鏉¢鑹�
+                SeekBarBackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,//杩涘害鏉¢鑹�
+                ThumbImagePath = "ZigeeLogic/progressbtn2.png",//杩涘害鏉℃寜閽浘鏍�
+                ThumbImageHeight = Application.GetRealHeight(56),//杩涘害鏉℃寜閽浘鏍囩殑楂樺害锛堥粯璁ゆ鏂瑰舰锛氬鍜岄珮涓�鏍凤級
+                ProgressTextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                //ProgressTextSize = 9,//鏄剧ず鐧惧垎姣斿瓧浣撳ぇ灏�12
+                SeekBarViewHeight = Application.GetRealHeight(7),//杩涘害鏉$殑楂樺害10
+                MaxValue = 100,
+                MinValue = 0,
+                Progress = progresValue,
+            };
+            middle.AddChidren(horizontalSeekBarVol);
+            lessBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                horizontalSeekBarVol.Progress = horizontalSeekBarVol.Progress - 1;
+                illuminationBtn.Text = Language.StringByID(MyInternationalizationString.illuminanceValue) + horizontalSeekBarVol.Progress.ToString() + "lux";
+            };
+            addBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                horizontalSeekBarVol.Progress = horizontalSeekBarVol.Progress + 1;
+                illuminationBtn.Text = Language.StringByID(MyInternationalizationString.illuminanceValue) + horizontalSeekBarVol.Progress.ToString() + "lux";
+            };
+            EventHandler<int> progressclick = (sender, e) =>
+            {
+                illuminationBtn.Text = Language.StringByID(MyInternationalizationString.illuminanceValue) + horizontalSeekBarVol.Progress.ToString() + "lux";
+            };
+            horizontalSeekBarVol.OnProgressChangedEvent += progressclick;
+            horizontalSeekBarVol.OnStopTrackingTouchEvent += progressclick;
+
+            Button text1Btn = new Button()
+            {
+                X = Application.GetRealWidth(81),
+                Y = Application.GetRealHeight(426 - 184),
+                Height = Application.GetRealHeight(100),
+                Width = Application.GetRealWidth(63+15),
+                Text = Language.StringByID(MyInternationalizationString.dark).Replace("{\\r\\n}", "\r\n"),
+                TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+                TextSize = 12,
+                TextAlignment = TextAlignment.Center,
+                IsMoreLines = true,
+            };
+            middle.AddChidren(text1Btn);
+
+            Button text2Btn = new Button()
+            {
+                X = Application.GetRealWidth(913-20),
+                Y = Application.GetRealHeight(426 - 184),
+                Height = Application.GetRealHeight(100),
+                Width = Application.GetRealWidth(109+20),
+                Text = Language.StringByID(MyInternationalizationString.bright).Replace("{\\r\\n}", "\r\n"),
+                TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+                TextSize = 12,
+                TextAlignment = TextAlignment.Center,
+                IsMoreLines = true,
+
+            };
+            middle.AddChidren(text2Btn);
+            //鎻愮ず鍥炬爣
+            Button tipIconBtn = new Button
+            {
+                X = Application.GetRealWidth(109),
+                Y = Application.GetRealHeight(616 - 184),
+                Height = Application.GetMinRealAverage(58),
+                Width = Application.GetMinRealAverage(58),
+                UnSelectedImagePath = "ZigeeLogic/tipIcon.png",
+            };
+            middle.AddChidren(tipIconBtn);
+
+            //鎻愮ず鏂囧瓧
+            Button tipTextBtn = new Button()
+            {
+                X = Application.GetRealWidth(173),
+                Y = Application.GetRealHeight(616 - 184),
+                Height = Application.GetRealHeight(138),
+                Width = Application.GetRealWidth(818),
+                Text = Language.StringByID(MyInternationalizationString.tipIlluminanceValue).Replace("{\\r\\n}", "\r\n"),
+                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                TextSize = 12,
+                TextAlignment = TextAlignment.Center,
+                IsMoreLines = true,
+
+            };
+            middle.AddChidren(tipTextBtn);
+
+            //淇濆瓨鎺т欢
+            LogicView.SaveView saveView = new LogicView.SaveView();
+            saveView.frameLayout.Y = middle.Height - Application.GetRealHeight(260);
+            middle.AddChidren(saveView.Show());
+            saveView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                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", "1024");
+                deviceConditionsInfo.Add("AttriButeId", "0");
+                deviceConditionsInfo.Add("AttriButeData1", horizontalSeekBarVol.Progress.ToString());
+                deviceConditionsInfo.Add("AttriButeData2", "0");
+                deviceConditionsInfo.Add("Range", "7");
+                if (_bool && progresValue != horizontalSeekBarVol.Progress)
+                {
+                   
+                    LogicIfon.AddDeviceconditions(common, deviceConditionsInfo);
+                }
+                if (!_bool)
+                {
+                    //涓嶆槸缂栬緫杩涙潵鐨�;
+                    LogicIfon.AddDeviceconditions(common, deviceConditionsInfo);
+                }
+                var logicCommunalPage = new LogicCommunalPage();
+                UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+                UserView.HomePage.Instance.PageIndex += 1;
+                logicCommunalPage.Show(() => { });
+            };
+           
+            
+        }
+
+
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
index 57045c8..008ae98 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
@@ -18,7 +18,7 @@
             UserView.HomePage.Instance.RemoveViewByTag("Logic");
             Tag = "Logic";
         }
-        EditText logicTextBox;
+
         public async void Show(Action action)
         {
 
@@ -36,14 +36,14 @@
             }
             view.clickBtn.MouseDownEventHandler += (sender, e) =>
             {
-               // UserView.HomePage.Instance.ScrollEnabled = true;//鎭㈠宸︽粦
+                // UserView.HomePage.Instance.ScrollEnabled = true;//鎭㈠宸︽粦
                 action();
                 RemoveFromParent();
             };
             var middle = new VerticalScrolViewLayout
             {
                 Y = view.topRowLayout.Bottom,
-                Height = Application.GetRealHeight(Method.H - 184-180),
+                Height = Application.GetRealHeight(Method.H - 184 - 180),
                 BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
             };
             this.AddChidren(middle);
@@ -75,10 +75,10 @@
             };
             logicnamefl.AddChidren(text);
 
-            logicTextBox = new EditText
+            EditText logicTextBox = new EditText
             {
                 Y = Application.GetRealHeight(35),
-                Width = Application.GetRealWidth(1080-58-300),
+                Width = Application.GetRealWidth(1080 - 58 - 300),
                 Height = Application.GetRealHeight(60),
                 X = text.Right,
                 TextAlignment = TextAlignment.CenterLeft,
@@ -103,20 +103,21 @@
             middle.AddChidren(addconditionview.AddDeviceView());
 
             ///娣诲姞鏉′欢鐨勭偣鍑讳簨浠�
-            addconditionview.clickBtn.MouseUpEventHandler+= (sender, e) =>
-            {
-                if (Common.Logic.CurrentLogic.Conditions.Count == 1)
-                {
-                    ConditionView(false);
-                }
-                else
-                {
-                    var addLogicPage = new AddLogicPage();
-                    UserView.HomePage.Instance.AddChidren(addLogicPage);
-                    UserView.HomePage.Instance.PageIndex += 1;
-                    addLogicPage.Show();
-                }
-            };
+            addconditionview.clickBtn.MouseUpEventHandler += (sender, e) =>
+             {
+                 Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
+                 if (Common.Logic.CurrentLogic.Conditions.Count == 1)
+                 {
+                     new LogicDveiceStatus { }.ConditionView(false, this);
+                 }
+                 else
+                 {
+                     var addLogicPage = new AddLogicPage();
+                     UserView.HomePage.Instance.AddChidren(addLogicPage);
+                     UserView.HomePage.Instance.PageIndex += 1;
+                     addLogicPage.Show();
+                 }
+             };
             List<Dictionary<string, string>> ListConditions = new List<Dictionary<string, string>>();
             ListConditions.Clear();
             ListConditions.AddRange(Common.Logic.CurrentLogic.Conditions);
@@ -148,535 +149,14 @@
                 }
                 EventHandler<MouseEventArgs> editclick = (sender, e) =>
                 {
-
-                    ConditionView(true);
+                    Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
+                    new LogicDveiceStatus { }.ConditionView(true, this);
                 };
                 row.MouseUpEventHandler += editclick;
                 relationship.MouseUpEventHandler += editclick;
 
             }
-            for (int i = 0; i < ListConditions.Count; i++)
-            {
-                if (i == (ListConditions.Count - 1))
-                {
-                    LogicView.AddDeviceView addflview = new LogicView.AddDeviceView();
-                    addflview.titleBtn.TextID = MyInternationalizationString.addconditions;
-                    middle.AddChidren(addflview.AddFl());
-                    addflview.clickBtn.MouseUpEventHandler += (sender, e) =>
-                    {
-                        if (Common.Logic.CurrentLogic.Conditions.Count == 1)
-                        {
-                            ConditionView(false);
-                        }
-                        else
-                        {
-                            var addLogicPage = new AddLogicPage();
-                            UserView.HomePage.Instance.AddChidren(addLogicPage);
-                            UserView.HomePage.Instance.PageIndex += 1;
-                            addLogicPage.Show();
-                        }
-                    };
-                }
-                else
-                {
-                    SelectedDeviceView selecteddevice = new SelectedDeviceView();
-                    selecteddevice.Show(middle);
-                    selecteddevice.stateRow.AddRightView(selecteddevice.edit);
-                    selecteddevice.stateRow.AddRightView(selecteddevice.del);
-
-                    var Type = int.Parse(ListConditions[i]["Type"]);
-                    var conditions = ListConditions[i];
-                    string name = "";
-                    string icon = "";
-                    string state = "";
-                    switch (Type)
-                    {
-                        /// (0:鏃堕棿鐐规潯浠�;1:璁惧鐘舵�佸彉鍖栨潯浠�;2:鍏朵粬閫昏緫鏉′欢;3:璁℃暟鍣ㄦ潯浠�;4:鍊掕鏃�;5:鏃堕棿娈垫潯浠�;6:瀹夐槻鏉′欢;7:鍦扮悊浣嶇疆)
-                        case 0:
-                            {
-
-                                //"0姝e父鏃堕棿鐐�","1鏃ュ嚭鏃堕棿","2鏃ヨ惤鏃堕棿","3姝e崍鏃堕棿"
-                                switch (int.Parse(conditions["DateType"]))
-                                {
-                                    case 0:
-                                        {
-                                            name = Language.StringByID(MyInternationalizationString.immediateexecution);
-                                            icon = "ZigeeLogic/timepoint.png";
-                                            string s = "";
-                                            s = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"];
-                                            state = conditions["StartHour"] + ":" + s;
-                                            
-                                        }
-                                        break;
-                                    case 1:
-                                        {
-                                            name = Language.StringByID(MyInternationalizationString.sunrise);
-                                            icon = "ZigeeLogic/sunrise.png";
-                                            if (int.Parse(conditions["AdjustTime"]) > 0)
-                                            {
-                                                state = Language.StringByID(MyInternationalizationString.delayed) + conditions["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
-                                            }
-                                            else if (int.Parse(conditions["AdjustTime"]) < 0)
-                                            {
-                                                state = Language.StringByID(MyInternationalizationString.advance) + Math.Abs(int.Parse(conditions["AdjustTime"])).ToString() + Language.StringByID(MyInternationalizationString.logicminute);
-                                            }
-                                            else
-                                            {
-                                                //timeTxet.Text = Language.StringByID(MyInternationalizationString.sunrise);
-                                            }
-                                        }
-                                        break;
-                                    case 2:
-                                        {
-                                            name = Language.StringByID(MyInternationalizationString.sunset);
-                                            icon = "ZigeeLogic/sunset.png";
-                                            if (int.Parse(conditions["AdjustTime"]) > 0)
-                                            {
-                                                state = Language.StringByID(MyInternationalizationString.delayed) + conditions["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
-                                            }
-                                            else if (int.Parse(conditions["AdjustTime"]) < 0)
-                                            {
-                                                state = Language.StringByID(MyInternationalizationString.advance) + Math.Abs(int.Parse(conditions["AdjustTime"])).ToString() + Language.StringByID(MyInternationalizationString.logicminute);
-                                            }
-                                            else
-                                            {
-                                                // timevalue.Text = Language.StringByID(MyInternationalizationString.sunset);
-                                            }
-                                        }
-                                        break;
-                                    case 3:
-                                        {
-                                            name = Language.StringByID(MyInternationalizationString.noon);
-                                            icon = "ZigeeLogic/noon.png";
-                                            if (int.Parse(conditions["AdjustTime"]) > 0)
-                                            {
-                                                state = Language.StringByID(MyInternationalizationString.delayed) + conditions["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
-                                            }
-                                            else if (int.Parse(conditions["AdjustTime"]) < 0)
-                                            {
-                                                state = Language.StringByID(MyInternationalizationString.advance) + Math.Abs(int.Parse(conditions["AdjustTime"])).ToString() + Language.StringByID(MyInternationalizationString.logicminute);
-                                            }
-                                            else
-                                            {
-                                                // timeTxet.Text = Language.StringByID(MyInternationalizationString.noon);
-                                            }
-                                        }
-                                        break;
-                                }
-                          
-                            }
-                            break;
-                        case 5:
-                            {
-                                icon = "ZigeeLogic/timeparagraph.png";
-                                string s1 = "", s2 = "";
-                                s1 = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"];
-                                s2 = conditions["StopMin"].Length < 2 ? "0" + conditions["StopMin"] : conditions["StopMin"];
-                                ///鏄剧ず鏃堕棿
-                                name = conditions["StartHour"] + ":" + s1 + "-" + conditions["StopHour"] + ":" + s2;
-                                state =Language.StringByID(MyInternationalizationString.timeframe);
-                            }
-                            break;
-                        case 1:
-                            {
-                                var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]);
-                                name = LocalDevice.Current.GetDeviceEpointName(deviceinof);
-                                selecteddevice.regionNameBtn.Visible = true;
-                                Method.RoomNmae(selecteddevice.regionNameBtn, deviceinof);
-
-                                switch (deviceinof.Type)
-                                {
-                                    case DeviceType.OnOffOutput:
-                                        {
-                                            icon = "ZigeeLogic/light.png";
-                                            if (conditions["AttriButeId"] == "0")
-                                            {
-                                                if (conditions["AttriButeData1"] == "1")
-                                                {
-                                                    state = Language.StringByID(MyInternationalizationString.open);
-                                                }
-                                                else
-                                                {
-                                                    state = Language.StringByID(MyInternationalizationString.close);
-                                                }
-
-                                            }
-                                        }
-                                        break;
-                                    case DeviceType.IASZone:
-                                        {
-                                            var iASZonedevice = deviceinof as IASZone;
-                                            var intvalue = conditions["AttriButeData1"];
-                                            icon = $"ZigeeLogic/sensor{iASZonedevice.IasDeviceType}.png";
-                                            switch (iASZonedevice.IasDeviceType)
-                                            {
-                                                case 13:
-                                                    {
-                                                        if (conditions.ContainsKey("IgnoreTime"))
-                                                        {
-                                                            int minute = int.Parse(conditions["IgnoreTime"]) / 60;
-                                                            int second = int.Parse(conditions["IgnoreTime"]) % 60;
-                                                            if (minute != 0 && second != 0)
-                                                            {
-                                                                state = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.unattendedtime1);
-
-                                                            }
-                                                            else
-                                                            {
-                                                                if (minute == 0 && second != 0)
-                                                                {
-                                                                    state = second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.unattendedtime1);
-
-                                                                }
-                                                                if (minute != 0 && second == 0)
-                                                                {
-                                                                    state = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.unattendedtime1);
-
-                                                                }
-
-                                                            }
-                                                        }
-                                                        else
-                                                        {
-                                                            state = Language.StringByID(MyInternationalizationString.someone);
-                                                        }
-
-                                                    }
-                                                    break;
-                                                case 21:
-                                                case 22:
-                                                    {
-                                                        if (conditions.ContainsKey("IgnoreTime"))
-                                                        {
-
-                                                            int minute = int.Parse(conditions["IgnoreTime"]) / 60;
-                                                            int second = int.Parse(conditions["IgnoreTime"]) % 60;
-                                                            if (minute != 0 && second != 0)
-                                                            {
-                                                                state = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime);
-
-                                                            }
-                                                            else
-                                                            {
-                                                                if (minute == 0 && second != 0)
-                                                                {
-                                                                    state = second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime);
-
-                                                                }
-                                                                if (minute != 0 && second == 0)
-                                                                {
-                                                                    state = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.closetime);
-
-                                                                }
-
-                                                            }
-
-                                                        }
-                                                        else
-                                                        {
-                                                            if (intvalue == "1")
-                                                            {
-                                                                state = Language.StringByID(MyInternationalizationString.logicopen);
-                                                            }
-                                                            else
-                                                            {
-                                                                state = Language.StringByID(MyInternationalizationString.logicclose);
-                                                            }
-
-                                                        }
-
-                                                    }
-                                                    break;
-                                                case 40:
-                                                    {
-                                                        if (intvalue == "1")
-                                                        {
-                                                            state =Language.StringByID(MyInternationalizationString.smokescreen);
-                                                        }
-
-                                                    }
-                                                    break;
-                                                case 42:
-                                                    {
-                                                        if (intvalue == "1")
-                                                        {
-                                                            state =Language.StringByID( MyInternationalizationString.waterleakage);
-                                                        }
-                                                        else
-                                                        {
-                                                            state =Language.StringByID( MyInternationalizationString.noleakage);
-                                                        }
-                                                    }
-                                                    break;
-                                                case 43:
-                                                    {
-                                                        if (intvalue == "1")
-                                                        {
-                                                            state =Language.StringByID( MyInternationalizationString.gas);
-                                                        }
-
-                                                    }
-                                                    break;
-                                                case 277:
-                                                    {
-                                                        if (intvalue == "1")
-                                                        {
-                                                            state =Language.StringByID( MyInternationalizationString.callthepolice);
-                                                        }
-
-                                                    }
-                                                    break;
-                                                default:
-                                                    {
-                                                        if (intvalue == "1")
-                                                        {
-                                                            state =Language.StringByID(MyInternationalizationString.callthepolice);
-                                                        }
-                                                    }
-                                                    break;
-
-                                            }
-                                        }
-                                        break;
-                                    case DeviceType.OnOffSwitch:
-                                        {
-                                            icon = "ZigeeLogic/panel.png";
-                                            state = Language.StringByID(MyInternationalizationString.OnOffSwitch) + conditions["Epoint"];
-                                        }
-                                        break;
-                                    case DeviceType.DoorLock:
-                                        {
-                                            icon = "ZigeeLogic/doorlock.png";
-                                            for (int a = 0; a < Common.Logic.CurrentLogic.Accounts.Count; a++)
-                                            {
-                                                if (Common.Logic.CurrentLogic.Accounts[a]["Type"] == "1")
-                                                {
-                                                    if (Common.Logic.CurrentLogic.Accounts[a]["UserId"] == conditions["AttriButeData2"])
-                                                    {
-                                                        state = Common.Logic.CurrentLogic.Accounts[a]["AccountName"];
-                                                        break;
-
-                                                    }
-                                                }
-
-                                            }
-                                        }
-                                        break;
-                                    case DeviceType.TemperatureSensor:
-                                        {
-                                            // conditionIcon.UnSelectedImagePath = "ZigeeLogic/temperature.png";
-                                            var dev = deviceinof as TemperatureSensor;
-                                            if (conditions["Cluster_ID"] == "1026")
-                                            {
-                                                dev.SensorDiv = 1;
-                                            }
-                                            else
-                                            {
-                                                dev.SensorDiv = 2;
-                                            }
-                                            string s = "";
-                                            switch (conditions["Range"])
-                                            {
-                                                case "0":
-                                                    {
-                                                        s = ">";
-                                                    }
-                                                    break;
-                                                case "1":
-                                                    {
-                                                        s = "=";
-                                                    }
-                                                    break;
-                                                case "2":
-                                                    {
-                                                        s = "<";
-                                                    }
-                                                    break;
-                                                case "6":
-                                                    {
-                                                        s = "鈮�";
-                                                    }
-                                                    break;
-                                                case "7":
-                                                    {
-                                                        s = "鈮�";
-                                                    }
-                                                    break;
-                                            }
-                                            ///杞崲娓╁害鍊�/100
-                                            string srtValue = (int.Parse(conditions["AttriButeData1"]) / 100).ToString();
-                                            if (conditions["Cluster_ID"] == "1026")
-                                            {
-                                                icon = "ZigeeLogic/temperature.png";
-                                                state = s + srtValue + "鈩�";
-                                            }
-                                            else
-                                            {
-                                                icon = "ZigeeLogic/humidity.png";
-                                                state = s + srtValue + "%";
-                                            }
-                                            break;
-
-                                        }
-
-                                }
-                            }
-                            break;
-                        case 6:
-                            {
-                                switch (conditions["EnOrWithdrawMode"])
-                                {
-                                    case "0":
-                                        {
-                                            if (conditions["ModeId"] == "1")
-                                            {
-                                                icon = "ZigeeLogic/athome.png";
-                                                name = Language.StringByID(MyInternationalizationString.logicathomegarrison);
-
-                                            }
-                                            else
-                                            {
-                                                icon = "ZigeeLogic/leavehome.png";
-                                                name = Language.StringByID(MyInternationalizationString.logicremovehomegarrison);
-                                            }
-                                        }
-                                        break;
-                                    case "1":
-                                        {
-                                            icon = "ZigeeLogic/withdrawal.png";
-                                            name = Language.StringByID(MyInternationalizationString.withdrawal);
-                                        }
-                                        break;
-                                    case "2":
-                                        {
-                                            icon = "ZigeeLogic/withdrawal.png";
-                                            name = Language.StringByID(MyInternationalizationString.urgentwithdrawal);
-                                        }
-                                        break;
-                                }
-                            }
-                            break;
-                        case 7:
-                            {
-                                icon = "ZigeeLogic/position.png";
-                                name = Language.StringByID(MyInternationalizationString.geographicalposition);
-                                foreach (var radius in Common.Logic.CurrentLogic.Accounts)
-                                {
-                                    if (radius["Type"] == "7")
-                                    {
-                                        if (conditions["AtHome"] == "1")
-                                        {
-                                            state = Language.StringByID(MyInternationalizationString.athome) + radius["Radius"] + Language.StringByID(MyInternationalizationString.mi);
-                                        }
-                                        else
-                                        {
-                                            state = Language.StringByID(MyInternationalizationString.leavehome) + radius["Radius"] + Language.StringByID(MyInternationalizationString.mi);
-                                        }
-                                    }
-                                }
-                            }
-                            break;
-                    }
-                    if (Type != 1)
-                    {
-                        selecteddevice.ordinaryBtn.Visible = true;
-                        selecteddevice.iconBtn.UnSelectedImagePath = icon;
-                        selecteddevice.ordinaryBtn.Text = name;
-                        selecteddevice.selecetddevicestateBtn.Text = state;
-                    }
-                    else
-                    {
-                        //璁惧鐘舵��
-                        selecteddevice.deviceNameBtn.Visible = true;
-                        selecteddevice.iconBtn.UnSelectedImagePath = icon;
-                        selecteddevice.deviceNameBtn.Text = name;
-                        selecteddevice.selecetddevicestateBtn.Text = state;
-                    }
-                    ///缂栬緫
-                    selecteddevice.edit.MouseUpEventHandler += (sender, e) =>
-                    {
-                        switch (Type)
-                        {
-
-                            /// (0:鏃堕棿鐐规潯浠�;1:璁惧鐘舵�佸彉鍖栨潯浠�;2:鍏朵粬閫昏緫鏉′欢;3:璁℃暟鍣ㄦ潯浠�;4:鍊掕鏃�;5:鏃堕棿娈垫潯浠�;6:瀹夐槻鏉′欢;7:鍦扮悊浣嶇疆)
-                            case 0:
-                                {
-                                    var timePoint = new TimePoint();
-                                    UserView.HomePage.Instance.AddChidren(timePoint);
-                                    UserView.HomePage.Instance.PageIndex += 1;
-                                    timePoint.IsEditor = true;
-                                    timePoint.Show(conditions);
-                                }
-                                break;
-                            case 5:
-                                {
-                                    var timePage = new TimePage();
-                                    UserView.HomePage.Instance.AddChidren(timePage);
-                                    UserView.HomePage.Instance.PageIndex += 1;
-                                    timePage.str1 = conditions["StartHour"] + ":" + conditions["StartMin"] + "-" + conditions["StopHour"] + ":" + conditions["StopMin"];
-                                    timePage.IsEditor = true;
-                                    timePage.Show();
-                                }
-                                break;
-                            case 1:
-                                {
-                                    var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]);
-                                    if (deviceinof.Type != DeviceType.DoorLock)
-                                    {
-                                        var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
-                                        this.AddChidren(flMain);
-                                        CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "condition_logic");
-                                    }
-                                    else
-                                    {
-                                        var memberList = new MemberList();
-                                        UserView.HomePage.Instance.AddChidren(memberList);
-                                        UserView.HomePage.Instance.PageIndex += 1;
-                                        MemberList.edit = true;
-                                        memberList.Show(deviceinof, conditions);
-                                    }
-                                }
-                                break;
-                            case 6:
-                                {
-                                    var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
-                                    this.AddChidren(flMain);
-                                    AddLogicPage.SecurityView(flMain, true);
-                                }
-                                break;
-                            case 7:
-                                {
-                                    var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
-                                    this.AddChidren(flMain);
-                                    AddLogicPage.LocationView(flMain, true);
-                                }
-                                break;
-                        }
-                    };
-                    ///鍒犻櫎鎺т欢
-                    selecteddevice.del.MouseUpEventHandler += (sender, e) =>
-                    {
-
-                        var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm,
-                        Language.StringByID(MyInternationalizationString.doyouwanttodelete),
-                        Language.StringByID(MyInternationalizationString.confrim));
-                        alert.Show();
-
-                        alert.ConfirmClickEvent += () =>
-                        {
-                            Common.Logic.CurrentLogic.Conditions.Remove(conditions);
-                            selecteddevice.selecetdFrameLayout.RemoveFromParent();
-                            //var logicCommunalPage = new LogicCommunalPage();
-                            //UserView.HomePage.Instance.AddChidren(logicCommunalPage);
-                            //UserView.HomePage.Instance.PageIndex += 1;
-                            //logicCommunalPage.Show(() => { });
-                        };
-
-                    };
-
-                }
-            }
-
+            new LogicDveiceStatus { }.Conditions(this, middle, ListConditions, logicTextBox.Text.Trim());
 
             #endregion
 
@@ -686,578 +166,17 @@
             addactionview.iconBtn.Visible = true;
             addactionview.titleBtn.TextID = MyInternationalizationString.execute;
             middle.AddChidren(addactionview.AddDeviceView());
-
-            addactionview.clickBtn.MouseUpEventHandler+= (sender, e) =>
-            {
-                Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
-                Method.View(IfString.Action_Logic,IfString.Action_LogicScene);
-            };
+            addactionview.clickBtn.MouseUpEventHandler += (sender, e) =>
+             {
+                 Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
+                 Method.View(IfString.Action_Logic, IfString.Action_LogicScene);
+             };
 
             List<Dictionary<string, object>> ListActions = new List<Dictionary<string, object>>();
             ListActions.Clear();
             ListActions.AddRange(Common.Logic.CurrentLogic.Actions);
             ListActions.Add(new Dictionary<string, object>());
-
-            for (int i = 0; i < ListActions.Count; i++)
-            {
-                if (i == (ListActions.Count - 1))
-                {
-
-                    LogicView.AddDeviceView addflview = new LogicView.AddDeviceView();
-                    addflview.titleBtn.TextID = MyInternationalizationString.addfunction;
-                    middle.AddChidren(addflview.AddFl());
-                    addflview.clickBtn.MouseUpEventHandler += (sender, e) =>
-                    {
-                        Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
-                        Method.View(IfString.Action_Logic, IfString.Action_LogicScene);
-                    };
-                }
-                else
-                {
-
-                    SelectedDeviceView actiondevice = new SelectedDeviceView();
-                    actiondevice.Show(middle);
-                    var linkType = int.Parse(ListActions[i]["LinkType"].ToString());
-                    var actions = ListActions[i];
-                    string name = "";
-                    string icon = "";
-                    string state = "";
-
-                    switch (linkType)
-                    {
-                        case 0:
-                        case 8:
-                            {
-
-                                var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
-                                name = LocalDevice.Current.GetDeviceEpointName(deviceinof);
-                                actiondevice.regionNameBtn.Visible = true;
-                                Method.RoomNmae(actiondevice.regionNameBtn, deviceinof);
-                                switch (deviceinof.Type)
-                                {
-                                    case DeviceType.OnOffOutput:
-                                        {
-                                            icon = "ZigeeLogic/light.png";
-
-                                            var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
-                                            if (TaskList == null)
-                                            {
-                                                continue;
-                                            }
-                                            foreach (var status in TaskList)
-                                            {
-                                                if (status["TaskType"].ToString() == "1")
-                                                {
-                                                    if (status["Data1"].ToString() == "0")
-                                                    {
-                                                        state = Language.StringByID(MyInternationalizationString.close);
-
-                                                    }
-                                                    else if (status["Data1"].ToString() == "1")
-                                                    {
-                                                        state = Language.StringByID(MyInternationalizationString.open);
-
-                                                    }
-                                                    else if (status["Data1"].ToString() == "2")
-                                                    {
-
-                                                        state = Language.StringByID(MyInternationalizationString.onoff);
-                                                    }
-                                                }
-
-                                            }
-
-                                        }
-                                        break;
-                                    case DeviceType.DimmableLight:
-                                        {
-                                            icon = "ZigeeLogic/dimmableLight.png";
-                                            var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
-                                            if (TaskList == null)
-                                            {
-                                                continue;
-                                            }
-                                            foreach (var status in TaskList)
-                                            {
-                                                if (status["TaskType"].ToString() == "3")
-                                                {
-                                                    var intvalue = int.Parse(status["Data1"]);
-                                                    var lightbrightnessvalue = (intvalue * 100) / 254;
-                                                    state = lightbrightnessvalue.ToString() + "%";
-                                                }
-                                                else if (status["TaskType"].ToString() == "1")
-                                                {
-
-                                                    if (status["Data1"].ToString() == "0")
-                                                    {
-                                                        state = Language.StringByID(MyInternationalizationString.close);
-                                                    }
-                                                    else if (status["Data1"].ToString() == "2")
-                                                    {
-                                                        state = Language.StringByID(MyInternationalizationString.onoff);
-                                                    }
-                                                }
-
-
-                                            }
-
-                                        }
-                                        break;
-                                    case DeviceType.WindowCoveringDevice:
-                                        {
-                                            icon = "ZigeeLogic/curtain.png";
-                                            var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
-                                            if (TaskList == null)
-                                            {
-                                                continue;
-                                            }
-                                            foreach (var status in TaskList)
-                                            {
-                                                if (status["TaskType"] == "6")
-                                                {
-                                                    if (status["Data1"] == "0")
-                                                    {
-                                                        state = Language.StringByID(MyInternationalizationString.open);
-                                                    }
-                                                    else if (status["Data1"] == "1")
-                                                    {
-                                                        state = Language.StringByID(MyInternationalizationString.close);
-                                                    }
-                                                    else if (status["Data1"] == "5")
-                                                    {
-                                                        state = status["Data2"] + "%";
-                                                    }
-                                                }
-
-                                            }
-                                        }
-                                        break;
-                                    case DeviceType.AirSwitch:
-                                        {
-                                            icon = "ZigeeLogic/airswitch.png";
-
-                                            var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
-                                            if (TaskList == null)
-                                            {
-                                                continue;
-                                            }
-                                            foreach (var status in TaskList)
-                                            {
-                                                if (status["TaskType"].ToString() == "1")
-                                                {
-                                                    if (status["Data1"].ToString() == "0")
-                                                    {
-                                                        state = Language.StringByID(MyInternationalizationString.close);
-
-                                                    }
-                                                    else if (status["Data1"].ToString() == "1")
-                                                    {
-                                                        state = Language.StringByID(MyInternationalizationString.open);
-
-                                                    }
-                                                    else if (status["Data1"].ToString() == "2")
-                                                    {
-
-                                                        state = Language.StringByID(MyInternationalizationString.onoff);
-                                                    }
-                                                }
-
-                                            }
-
-                                        }
-                                        break;
-                                    case DeviceType.Thermostat:
-                                        {
-                                            icon = "ZigeeLogic/ac.png";
-
-                                            var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
-                                            if (TaskList == null)
-                                            {
-                                                continue;
-                                            }
-                                            string modetext = "", temperaturetext = "", speedtext = "";
-                                            bool ifclose = false;
-                                            foreach (var status in TaskList)
-                                            {
-
-                                                if (TaskList.Count == 1)
-                                                {
-                                                    //鏁扮粍鍙湁涓�涓厓绱犺鏄庡綋鍓嶇┖璋冪姸鎬佷负鍏筹紱
-                                                    ifclose = false;
-                                                    //濡傛灉绌鸿皟鐘舵�佹槸鍏筹紱鐩存帴璺冲嚭for寰潖锛�
-                                                    break;
-                                                }
-                                                else
-                                                {
-                                                    ifclose = true;
-                                                }
-                                                if (status["TaskType"].ToString() == "5")
-                                                {
-                                                    if (status["Data1"] == "3")
-                                                    {//3---璁剧疆宸ヤ綔妯″紡(1:鑷姩;3:鍒跺喎;4:鍒剁儹;7:閫侀;8:闄ゆ箍)
-                                                        switch (status["Data2"])
-                                                        {
-                                                            case "3":
-                                                                {
-                                                                    modetext = Language.StringByID(MyInternationalizationString.logiccool);
-                                                                }
-                                                                break;
-                                                            case "4":
-                                                                {
-                                                                    modetext = Language.StringByID(MyInternationalizationString.logicheat);
-                                                                }
-                                                                break;
-                                                            case "1":
-                                                                {
-                                                                    modetext = Language.StringByID(MyInternationalizationString.logicauto);
-                                                                }
-                                                                break;
-                                                            case "8":
-                                                                {
-                                                                    modetext = Language.StringByID(MyInternationalizationString.logicdry);
-                                                                }
-                                                                break;
-                                                            case "7":
-                                                                {
-                                                                    modetext = Language.StringByID(MyInternationalizationString.logicfanonly);
-                                                                }
-                                                                break;
-                                                        }
-                                                    }
-                                                    else if (status["Data1"] == "6")
-                                                    {//6---璁剧疆椋庢墖妯″紡(1:浣庨;2:涓;3:楂橀;)
-                                                        switch (status["Data2"])
-                                                        {
-                                                            case "1":
-                                                                {
-                                                                    speedtext = Language.StringByID(MyInternationalizationString.logiclow);
-                                                                }
-                                                                break;
-
-                                                            case "2":
-                                                                {
-                                                                    speedtext = Language.StringByID(MyInternationalizationString.logicmedium);
-                                                                }
-                                                                break;
-                                                            case "3":
-                                                                {
-                                                                    speedtext = Language.StringByID(MyInternationalizationString.logichigh);
-                                                                }
-                                                                break;
-
-                                                        }
-                                                    }
-                                                    //4---璁剧疆鍔犵儹搴︽暟;5---璁剧疆鍒跺喎銆侀櫎婀垮害鏁�;7---璁剧疆鑷姩搴︽暟
-                                                    else if (status["Data1"] == "4" || status["Data1"] == "5" || status["Data1"] == "7")
-                                                    {
-                                                        var s = int.Parse(status["Data2"]) / 100;
-                                                        temperaturetext = s.ToString();
-                                                    }
-                                                    else if (status["Data1"] == "20")
-                                                    {
-                                                        temperaturetext = "鏃�";
-                                                    }
-
-
-                                                }
-
-                                            }
-                                            if (ifclose)
-                                            {
-                                                state = modetext + ";" + temperaturetext + "鈩�;" + speedtext;
-                                            }
-                                            else
-                                            {
-                                                state = Language.StringByID(MyInternationalizationString.close);
-
-                                            }
-                                        }
-                                        break;
-                                    case DeviceType.DoorLock:
-                                        {
-                                            //闂ㄩ攣鐗规畩
-                                            icon = "ZigeeLogic/doorlock.png";
-                                            if (actions["PassData"].ToString() == "055704010112")
-                                            {
-                                                state = Language.StringByID(MyInternationalizationString.logicopen);
-                                            }
-                                            else
-                                            {
-                                                state = Language.StringByID(MyInternationalizationString.logicclose);
-                                            }
-                                        }
-                                        break;
-                                    case DeviceType.ColorTemperatureLight:
-                                        {
-                                            icon = "ZigeeLogic/nightLight.png";
-                                            var taskList = actions["TaskList"] as List<Dictionary<string, string>>;
-                                            if (taskList == null)
-                                            {
-                                                continue;
-                                            }
-                                            foreach (var tasks in taskList)
-                                            {
-                                                switch (tasks["TaskType"])
-                                                {
-                                                    case "1":
-                                                        {
-                                                            if (tasks["Data1"] == "0")
-                                                            {
-                                                                state += Language.StringByID(MyInternationalizationString.close) + ";";
-                                                            }
-                                                            else
-                                                            {
-                                                                state += Language.StringByID(MyInternationalizationString.open) + ";";
-                                                            }
-                                                        }
-                                                        break;
-
-                                                }
-                                            }
-                                            foreach (var tasks in taskList)
-                                            {
-                                                switch (tasks["TaskType"])
-                                                {
-                                                   
-                                                    case "3":
-                                                        {
-                                                            var intvalue = int.Parse(tasks["Data1"]);
-                                                            var lightbrightnessvalue = (intvalue * 100) / 254;
-                                                            state += Language.StringByID(MyInternationalizationString.brightness) + lightbrightnessvalue.ToString() + "%;";
-                                                        }
-                                                        break;
-                                                
-                                                }
-                                            }
-                                            foreach (var tasks in taskList)
-                                            {
-                                                switch (tasks["TaskType"])
-                                                {
-                                                  
-                                                    case "7":
-                                                        {
-                                                            if (tasks["Data1"] == "0")
-                                                            {
-                                                                state += Language.StringByID(MyInternationalizationString.buzzer) + Language.StringByID(MyInternationalizationString.close) + ";";
-                                                            }
-                                                            else
-                                                            {
-                                                                state += Language.StringByID(MyInternationalizationString.buzzer) + Language.StringByID(MyInternationalizationString.open) + ";";
-                                                            }
-                                                        }
-                                                        break;
-                                                    
-                                                }
-                                            }
-                                            foreach (var tasks in taskList)
-                                            {
-                                                switch (tasks["TaskType"])
-                                                {
-                                                  
-                                                    case "8":
-                                                        {
-                                                            var intvalue = int.Parse(tasks["Data1"]);
-                                                            var colorTemperatureValue = 1000000/(intvalue *100);
-                                                            state += Language.StringByID(MyInternationalizationString.colorTemperature) + colorTemperatureValue.ToString() + "K";
-                                                        }
-                                                        break;
-                                                }
-                                            }
-
-                                            state=state.TrimEnd(';');//鍘绘帀鏈�鍚庨偅涓�";"
-                                        }
-                                        break;
-                                }
-
-                            }
-                            break;
-                        case 2:
-                            {
-                               //鍦ㄦ湰鍦版煡鎵捐鍦烘櫙;
-                               var sceneinof = UserCenter.HdlSceneLogic.Current.GetSceneUIBySceneId(Convert.ToInt32(actions["DeviceAddr"].ToString()));
-                                //鏈湴娌℃湁瀛樺湪;
-                                if (sceneinof == null)
-                                {
-                                    //瀹炵幇鐩殑:鏄剧ず鍑烘潵璁╁彲浠ヨ嚜宸辨槸鍚﹀垹闄�
-                                    sceneinof = new SceneUI();
-                                    #region --------
-                                    ////鍦ㄧ綉鍏虫煡鎵捐鍦烘櫙;
-                                    ////鏍囪闂:缃戠粶璇锋眰锛屽瓨鍦ㄨ鍥惧姞杞藉揩鎱㈢殑闂锛�
-                                    //sceneinof = await Send.GetScene(int.Parse(actions["DeviceAddr"].ToString()));
-                                    ////缃戝叧娌℃湁瀛樺湪;
-                                    //if (sceneinof == null)
-                                    //{
-                                    //    //娉ㄨВ:鏈湴鍜岀綉鍏抽兘涓嶅瓨鍦ㄨ鍦烘櫙,鐣岄潰灏嗕笉浼氭樉绀鸿鍦烘櫙;
-                                    //    //sceneinof = new SceneUI();
-                                    //    //绉婚櫎璇ュ満鏅暟鎹�;
-                                    //    Common.Logic.CurrentLogic.Actions.Remove(actions);
-                                    //    //绉婚櫎璇ュ満鏅鍥�;
-                                    //    devicesFrameLayout.RemoveFromParent();
-                                    //    continue;
-                                    //}
-                                    #endregion
-                                }
-
-                                icon = "ZigeeLogic/scene.png";
-                                name = sceneinof.Name;
-                                actiondevice.regionNameBtn.Visible = true;
-                                /////閫氳繃璁惧鎵惧埌鍖哄煙(鎴块棿)鍚嶇О
-                                Common.Room room = new Common.Room();
-                                actiondevice.regionNameBtn.Text = UserCenter.HdlRoomLogic.Current.GetRoomNameBySceneId(sceneinof.Id);
-
-                            }
-                            break;
-                        case 6:
-                            {
-
-
-
-                                if (actions["SecuritySetting"].ToString() == "0")
-                                {
-                                    if (actions["Password"].ToString() == "888888")
-                                    {
-                                        icon = "ZigeeLogic/withdrawal.png";
-                                        state = Language.StringByID(MyInternationalizationString.urgentwithdrawal);
-                                    }
-                                    else
-                                    {
-                                        icon = "ZigeeLogic/withdrawal.png";
-                                        state = Language.StringByID(MyInternationalizationString.withdrawal);
-
-                                    }
-                                }
-                                else if (actions["SecuritySetting"].ToString() == "1")
-                                {
-                                    if (actions["SecurityModeId"].ToString() == "1")
-                                    {
-                                        icon = "ZigeeLogic/athome.png";
-                                        state = Language.StringByID(MyInternationalizationString.logicathomegarrison);
-                                    }
-                                    else if (actions["SecurityModeId"].ToString() == "2")
-                                    {
-                                        icon = "ZigeeLogic/leavehome.png";
-                                        state = Language.StringByID(MyInternationalizationString.logicremovehomegarrison);
-                                    }
-                                }
-
-                            }
-                            break;
-                        case 7:
-                            {
-                                var delaytimevalue = int.Parse(actions["DelayTime"].ToString());
-                                var Minutes = delaytimevalue / 60;
-                                var seconds = delaytimevalue % 60;
-
-                                icon = "ZigeeLogic/delay.png";
-
-                                if (Minutes != 0)
-                                {
-                                    if (seconds == 0)
-                                    {
-                                        state = Minutes.ToString() + Language.StringByID(MyInternationalizationString.minute);
-                                    }
-                                    else
-                                    {
-                                        state = Minutes.ToString() + Language.StringByID(MyInternationalizationString.minute) + seconds.ToString() + Language.StringByID(MyInternationalizationString.second);
-                                    }
-                                }
-                                else
-                                {
-                                    state = seconds.ToString() + Language.StringByID(MyInternationalizationString.second);
-                                }
-                                //璁板綍寤舵椂锛�
-                                actiondevice.edit.Tag = i;
-                            };
-                            break;
-                    }
-
-                    if (linkType != 2)
-                    {
-                        actiondevice.stateRow.AddRightView(actiondevice.edit);
-                    }
-                    actiondevice.stateRow.AddRightView(actiondevice.del);
-
-                    if (linkType == 6 || linkType == 7)
-                    {
-                        actiondevice.ordinaryBtn.Visible = true;
-                        actiondevice.iconBtn.UnSelectedImagePath = icon;
-                        actiondevice.ordinaryBtn.Text = name;
-                        actiondevice.selecetddevicestateBtn.Text = state;
-                    }
-                    else
-                    {
-                        //璁惧鐘舵��
-                        actiondevice.deviceNameBtn.Visible = true;
-                        actiondevice.iconBtn.UnSelectedImagePath = icon;
-                        actiondevice.deviceNameBtn.Text = name;
-                        actiondevice.selecetddevicestateBtn.Text = state;
-                    }
-                    ///缂栬緫
-                    actiondevice.edit.MouseUpEventHandler += (sender, e) =>
-                    {
-                        switch (linkType)
-                        {
-                            case 8:
-                            case 0:
-                                {
-                                    var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
-                                    if (deviceinof.Type != DeviceType.ColorTemperatureLight)
-                                    {
-                                        var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
-                                        this.AddChidren(flMain);
-                                        CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_logic");
-                                    }
-                                    else
-                                    {
-                                        var nightlight = new Nightlight();
-                                        UserView.HomePage.Instance.AddChidren(nightlight);
-                                        UserView.HomePage.Instance.PageIndex += 1;
-                                        nightlight.Show(deviceinof, true, "logic", actions);
-                                    }
-                                }
-                                break;
-                            case 6:
-                                {
-                                    var securityMode = new SecurityMode();
-                                    UserView.HomePage.Instance.AddChidren(securityMode);
-                                    UserView.HomePage.Instance.PageIndex += 1;
-                                    securityMode.IsDeviceEditor = true;
-                                    securityMode.Show();
-                                }
-                                break;
-                            case 7:
-                                {
-                                    var delayTime = new DelayTime();
-                                    UserView.HomePage.Instance.AddChidren(delayTime);
-                                    UserView.HomePage.Instance.PageIndex += 1;
-                                    delayTime.Show(int.Parse(actiondevice.edit.Tag.ToString()), true);
-                                }
-                                break;
-                               
-                        }
-                    };
-                    ///鍒犻櫎鎺т欢
-                    actiondevice.del.MouseUpEventHandler += (sender, e) =>
-                    {
-
-                        var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm,
-                        Language.StringByID(MyInternationalizationString.doyouwanttodelete),
-                        Language.StringByID(MyInternationalizationString.confrim));
-                        alert.Show();
-                        alert.ConfirmClickEvent += () =>
-                        {
-                            Common.Logic.CurrentLogic.Actions.Remove(actions);
-                            actiondevice.selecetdFrameLayout.RemoveFromParent();
-                            // devicesFrameLayout.RemoveFromParent();
-                            //var logicCommunalPage = new LogicCommunalPage();
-                            //UserView.HomePage.Instance.AddChidren(logicCommunalPage);
-                            //UserView.HomePage.Instance.PageIndex += 1;
-                            //logicCommunalPage.Show(() => { });
-                        };
-
-                    };
-                }
-            }
+            new LogicDveiceStatus { }.Actions(this, middle, ListActions, logicTextBox.Text.Trim());
 
             #endregion
 
@@ -1282,16 +201,16 @@
                 //Text = "姣忓ぉ",
                 TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                 TextID = MyInternationalizationString.everyday,
-                Y = Application.GetRealHeight(35+30),
+                Y = Application.GetRealHeight(35 + 30),
                 X = weekview.titleBtn.Right,
                 TextSize = 14,
             };
             weekview.frameLayout.AddChidren(weekBtn);
-            Method.UpdateWeek(weekBtn,Common.Logic.CurrentLogic);
+            Method.UpdateWeek(weekBtn, Common.Logic.CurrentLogic);
             EventHandler<MouseEventArgs> cycleclick = (sender, e) =>
             {
                 /*------淇濈暀姣忔湀,姣忓勾绫诲瀷*/
-                var cycle = new Cycle(() => { Method.UpdateWeek(weekBtn, Common.Logic.CurrentLogic);});
+                var cycle = new Cycle(() => { Method.UpdateWeek(weekBtn, Common.Logic.CurrentLogic); });
                 UserView.HomePage.Instance.AddChidren(cycle);
                 UserView.HomePage.Instance.PageIndex += 1;
                 cycle.Show();
@@ -1307,121 +226,14 @@
 
             #region  ----鎺ㄩ�佽缃�----
             Method.Push(middle);
-        
+
             #endregion
 
-            saveBtn.clickviewBtn.MouseUpEventHandler +=(sender, e) =>
-            {
-                var name = logicTextBox.Text.Trim();
-                Method.SaveLogic(IfString._Logic,name, IfString.Tag, Common.Logic.CurrentLogic);
-            };
+            saveBtn.clickviewBtn.MouseUpEventHandler += (sender, e) =>
+             {
+                 var name = logicTextBox.Text.Trim();
+                 Method.SaveLogic(IfString._Logic, name, IfString.Tag, Common.Logic.CurrentLogic);
+             };
         }
-
-        void ConditionView(bool edit)
-        {
-            Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
-            #region  ------缁勫悎鏉′欢鐣岄潰甯冨眬閮ㄥ垎   
-            var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
-            this.AddChidren(flMain);
-            CompleteView completeView = new CompleteView();
-            flMain.AddChidren(completeView.Show(2));
-            completeView.Btntitle.TextID = MyInternationalizationString.condition;
-            EventHandler<MouseEventArgs> clickcancel = (sender, e) =>
-            {
-                UserView.HomePage.Instance.ScrollEnabled = true;
-                flMain.RemoveFromParent();
-            };
-            flMain.MouseUpEventHandler += clickcancel;
-            completeView.Btncancel.MouseUpEventHandler += clickcancel;
-
-            //婊¤冻鎵�鏈夋潯浠�
-            mFunView allFunView = new mFunView();
-            allFunView.frameLayout.Y = Application.GetRealHeight(140 + 20);
-            completeView.Show(2).AddChidren(allFunView.Show());
-            allFunView.titleBtn.TextID = MyInternationalizationString.Allconditions;
-            //婊¤冻鍏朵腑涓�涓潯浠�
-            mFunView ormFunview = new mFunView();
-            ormFunview.frameLayout.Y = allFunView.frameLayout.Bottom;
-            completeView.Show(2).AddChidren(ormFunview.Show());
-            ormFunview.titleBtn.TextID = MyInternationalizationString.anycondition;
-            ormFunview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
-            #endregion
-
-            ///婊¤冻鎵�鏈夋潯浠剁偣鍑讳簨浠�
-            allFunView.clickviewBtn.MouseUpEventHandler += (sedner, e) =>
-            {
-                allFunView.selectedIconBtn.Visible = true;
-                ormFunview.selectedIconBtn.Visible = false;
-                allFunView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
-                ormFunview.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
-            };
-            ///婊¤冻鍏朵腑涓�涓潯浠剁偣鍑讳簨浠�
-            ormFunview.clickviewBtn.MouseUpEventHandler += (sedner, e) =>
-            {
-                allFunView.selectedIconBtn.Visible = false;
-                ormFunview.selectedIconBtn.Visible = true;
-                allFunView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
-                ormFunview.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
-            };
-
-            if (edit)
-            {
-                if (Common.Logic.CurrentLogic.Relationship == 0)
-                {
-                    allFunView.selectedIconBtn.Visible = true;
-                    ormFunview.selectedIconBtn.Visible = false;
-                    allFunView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
-                    ormFunview.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
-                }
-                else
-                {
-                    allFunView.selectedIconBtn.Visible = false;
-                    ormFunview.selectedIconBtn.Visible = true;
-                    allFunView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
-                    ormFunview.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
-                }
-            }
-            completeView.Btncomplete.MouseUpEventHandler += (sender, e) =>
-            {
-                if (!allFunView.selectedIconBtn.Visible && !ormFunview.selectedIconBtn.Visible)
-                {
-                    ///鍙互鎻愮ず鏈�変腑鐘舵�侊紱
-                    return;
-                }
-                flMain.RemoveFromParent();
-
-                if (allFunView.selectedIconBtn.Visible)
-                {
-                    Common.Logic.CurrentLogic.Relationship = 0;
-                   
-                }
-                if (ormFunview.selectedIconBtn.Visible)
-                {
-                    Common.Logic.CurrentLogic.Relationship = 1;
-                   
-                }
-                if (edit)
-                {
-                    if (Common.Logic.CurrentLogic.LogicId != 0)
-                    {
-                        Send.LogicControlSwitch(Common.Logic.CurrentLogic);
-                    }
-                    var logicCommunalPage = new LogicCommunalPage();
-                    UserView.HomePage.Instance.AddChidren(logicCommunalPage);
-                    UserView.HomePage.Instance.PageIndex += 1;
-                    logicCommunalPage.Show(() => { });
-                }
-                else
-                {
-                    var addLogicPage = new AddLogicPage();
-                    UserView.HomePage.Instance.AddChidren(addLogicPage);
-                    UserView.HomePage.Instance.PageIndex += 1;
-                    addLogicPage.Show();
-                }
-            };
-
-        }
-    
-
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDveiceStatus.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDveiceStatus.cs
new file mode 100755
index 0000000..ebc0789
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDveiceStatus.cs
@@ -0,0 +1,1262 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared.Common;
+using Shared.R;
+using ZigBee.Device;
+
+namespace Shared.Phone.Device.Logic
+{
+    public class LogicDveiceStatus
+    {
+     
+        /// <summary>
+        /// 鏄剧ず閫昏緫鏉′欢鐘舵�佺殑鏂规硶
+        /// </summary>
+        /// <param name="frameLayout">鐖舵帶浠�</param>
+        /// <param name="middle"></param>
+        /// <param name="ListConditions">閫昏緫鏉′欢鍒楄〃</param>
+        /// <param name="logicName">閫昏緫鍚嶇О</param>
+        public void Conditions(FrameLayout frameLayout,VerticalScrolViewLayout middle,List<Dictionary<string, string>> ListConditions,string logicName)
+        {
+            for (int i = 0; i < ListConditions.Count; i++)
+            {
+                if (i == (ListConditions.Count - 1))
+                {
+                    LogicView.AddDeviceView addflview = new LogicView.AddDeviceView();
+                    addflview.titleBtn.TextID = MyInternationalizationString.addconditions;
+                    middle.AddChidren(addflview.AddFl());
+                    addflview.clickBtn.MouseUpEventHandler += (sender, e) =>
+                    {
+                        Common.Logic.CurrentLogic.LogicName = logicName;
+                        if (Common.Logic.CurrentLogic.Conditions.Count == 1)
+                        {
+                            ConditionView(false, frameLayout);
+                        }
+                        else
+                        {
+                            var addLogicPage = new AddLogicPage();
+                            UserView.HomePage.Instance.AddChidren(addLogicPage);
+                            UserView.HomePage.Instance.PageIndex += 1;
+                            addLogicPage.Show();
+                        }
+                    };
+                }
+                else
+                {
+                    
+                    SelectedDeviceView selecteddevice = new SelectedDeviceView();
+                    selecteddevice.Show(middle);
+                    selecteddevice.stateRow.AddRightView(selecteddevice.edit);
+                    selecteddevice.stateRow.AddRightView(selecteddevice.del);
+
+                    var Type = int.Parse(ListConditions[i]["Type"]);
+                    var conditions = ListConditions[i];
+                    string name = "";
+                    string icon = "";
+                    string state = "";
+                    switch (Type)
+                    {
+                        /// (0:鏃堕棿鐐规潯浠�;1:璁惧鐘舵�佸彉鍖栨潯浠�;2:鍏朵粬閫昏緫鏉′欢;3:璁℃暟鍣ㄦ潯浠�;4:鍊掕鏃�;5:鏃堕棿娈垫潯浠�;6:瀹夐槻鏉′欢;7:鍦扮悊浣嶇疆)
+                        case 0:
+                            {
+
+                                //"0姝e父鏃堕棿鐐�","1鏃ュ嚭鏃堕棿","2鏃ヨ惤鏃堕棿","3姝e崍鏃堕棿"
+                                switch (int.Parse(conditions["DateType"]))
+                                {
+                                    case 0:
+                                        {
+                                            name = Language.StringByID(MyInternationalizationString.immediateexecution);
+                                            icon = "ZigeeLogic/timepoint.png";
+                                            string s = "";
+                                            s = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"];
+                                            state = conditions["StartHour"] + ":" + s;
+                                            
+                                        }
+                                        break;
+                                    case 1:
+                                        {
+                                            name = Language.StringByID(MyInternationalizationString.sunrise);
+                                            icon = "ZigeeLogic/sunrise.png";
+                                            if (int.Parse(conditions["AdjustTime"]) > 0)
+                                            {
+                                                state = Language.StringByID(MyInternationalizationString.delayed) + conditions["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
+                                            }
+                                            else if (int.Parse(conditions["AdjustTime"]) < 0)
+                                            {
+                                                state = Language.StringByID(MyInternationalizationString.advance) + Math.Abs(int.Parse(conditions["AdjustTime"])).ToString() + Language.StringByID(MyInternationalizationString.logicminute);
+                                            }
+                                            else
+                                            {
+                                                //timeTxet.Text = Language.StringByID(MyInternationalizationString.sunrise);
+                                            }
+                                        }
+                                        break;
+                                    case 2:
+                                        {
+                                            name = Language.StringByID(MyInternationalizationString.sunset);
+                                            icon = "ZigeeLogic/sunset.png";
+                                            if (int.Parse(conditions["AdjustTime"]) > 0)
+                                            {
+                                                state = Language.StringByID(MyInternationalizationString.delayed) + conditions["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
+                                            }
+                                            else if (int.Parse(conditions["AdjustTime"]) < 0)
+                                            {
+                                                state = Language.StringByID(MyInternationalizationString.advance) + Math.Abs(int.Parse(conditions["AdjustTime"])).ToString() + Language.StringByID(MyInternationalizationString.logicminute);
+                                            }
+                                            else
+                                            {
+                                                // timevalue.Text = Language.StringByID(MyInternationalizationString.sunset);
+                                            }
+                                        }
+                                        break;
+                                    case 3:
+                                        {
+                                            name = Language.StringByID(MyInternationalizationString.noon);
+                                            icon = "ZigeeLogic/noon.png";
+                                            if (int.Parse(conditions["AdjustTime"]) > 0)
+                                            {
+                                                state = Language.StringByID(MyInternationalizationString.delayed) + conditions["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
+                                            }
+                                            else if (int.Parse(conditions["AdjustTime"]) < 0)
+                                            {
+                                                state = Language.StringByID(MyInternationalizationString.advance) + Math.Abs(int.Parse(conditions["AdjustTime"])).ToString() + Language.StringByID(MyInternationalizationString.logicminute);
+                                            }
+                                            else
+                                            {
+                                                // timeTxet.Text = Language.StringByID(MyInternationalizationString.noon);
+                                            }
+                                        }
+                                        break;
+                                }
+                          
+                            }
+                            break;
+                        case 5:
+                            {
+                                icon = "ZigeeLogic/timeparagraph.png";
+                                string s1 = "", s2 = "";
+                                s1 = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"];
+                                s2 = conditions["StopMin"].Length < 2 ? "0" + conditions["StopMin"] : conditions["StopMin"];
+                                ///鏄剧ず鏃堕棿
+                                name = conditions["StartHour"] + ":" + s1 + "-" + conditions["StopHour"] + ":" + s2;
+                                state =Language.StringByID(MyInternationalizationString.timeframe);
+                            }
+                            break;
+                        case 1:
+                            {
+                                var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]);
+                                name = LocalDevice.Current.GetDeviceEpointName(deviceinof);
+                                selecteddevice.regionNameBtn.Visible = true;
+                                Method.RoomNmae(selecteddevice.regionNameBtn, deviceinof);
+
+                                switch (deviceinof.Type)
+                                {
+                                    case DeviceType.OnOffOutput:
+                                        {
+                                            icon = "ZigeeLogic/light.png";
+                                            if (conditions["AttriButeId"] == "0")
+                                            {
+                                                if (conditions["AttriButeData1"] == "1")
+                                                {
+                                                    state = Language.StringByID(MyInternationalizationString.open);
+                                                }
+                                                else
+                                                {
+                                                    state = Language.StringByID(MyInternationalizationString.close);
+                                                }
+
+                                            }
+                                        }
+                                        break;
+                                    case DeviceType.IASZone:
+                                        {
+                                            var iASZonedevice = deviceinof as IASZone;
+                                            var intvalue = conditions["AttriButeData1"];
+                                            icon = $"ZigeeLogic/sensor{iASZonedevice.IasDeviceType}.png";
+                                            switch (iASZonedevice.IasDeviceType)
+                                            {
+                                                case 13:
+                                                    {
+                                                        if (conditions.ContainsKey("IgnoreTime"))
+                                                        {
+                                                            int minute = int.Parse(conditions["IgnoreTime"]) / 60;
+                                                            int second = int.Parse(conditions["IgnoreTime"]) % 60;
+                                                            if (minute != 0 && second != 0)
+                                                            {
+                                                                state = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+
+                                                            }
+                                                            else
+                                                            {
+                                                                if (minute == 0 && second != 0)
+                                                                {
+                                                                    state = second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+
+                                                                }
+                                                                if (minute != 0 && second == 0)
+                                                                {
+                                                                    state = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+
+                                                                }
+
+                                                            }
+                                                        }
+                                                        else
+                                                        {
+                                                            state = Language.StringByID(MyInternationalizationString.someone);
+                                                        }
+
+                                                    }
+                                                    break;
+                                                case 21:
+                                                case 22:
+                                                    {
+                                                        if (conditions.ContainsKey("IgnoreTime"))
+                                                        {
+
+                                                            int minute = int.Parse(conditions["IgnoreTime"]) / 60;
+                                                            int second = int.Parse(conditions["IgnoreTime"]) % 60;
+                                                            if (minute != 0 && second != 0)
+                                                            {
+                                                                state = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime);
+
+                                                            }
+                                                            else
+                                                            {
+                                                                if (minute == 0 && second != 0)
+                                                                {
+                                                                    state = second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime);
+
+                                                                }
+                                                                if (minute != 0 && second == 0)
+                                                                {
+                                                                    state = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.closetime);
+
+                                                                }
+
+                                                            }
+
+                                                        }
+                                                        else
+                                                        {
+                                                            if (intvalue == "1")
+                                                            {
+                                                                state = Language.StringByID(MyInternationalizationString.logicopen);
+                                                            }
+                                                            else
+                                                            {
+                                                                state = Language.StringByID(MyInternationalizationString.logicclose);
+                                                            }
+
+                                                        }
+
+                                                    }
+                                                    break;
+                                                case 40:
+                                                    {
+                                                        if (intvalue == "1")
+                                                        {
+                                                            state =Language.StringByID(MyInternationalizationString.smokescreen);
+                                                        }
+
+                                                    }
+                                                    break;
+                                                case 42:
+                                                    {
+                                                        if (intvalue == "1")
+                                                        {
+                                                            state =Language.StringByID( MyInternationalizationString.waterleakage);
+                                                        }
+                                                        else
+                                                        {
+                                                            state =Language.StringByID( MyInternationalizationString.noleakage);
+                                                        }
+                                                    }
+                                                    break;
+                                                case 43:
+                                                    {
+                                                        if (intvalue == "1")
+                                                        {
+                                                            state =Language.StringByID( MyInternationalizationString.gas);
+                                                        }
+
+                                                    }
+                                                    break;
+                                                case 277:
+                                                    {
+                                                        if (intvalue == "1")
+                                                        {
+                                                            state =Language.StringByID( MyInternationalizationString.callthepolice);
+                                                        }
+
+                                                    }
+                                                    break;
+                                                case 541:
+                                                    {
+                                                        if (conditions["Cluster_ID"] == "1024") {
+                                                            state = Language.StringByID(MyInternationalizationString.ambientLight)+"<"+conditions["AttriButeData1"]+"lux"+ Language.StringByID(MyInternationalizationString.hour1);
+                                                        }
+                                                        else
+                                                        {
+                                                            if (conditions.ContainsKey("IgnoreTime"))
+                                                            {
+                                                                int minute = int.Parse(conditions["IgnoreTime"]) / 60;
+                                                                int second = int.Parse(conditions["IgnoreTime"]) % 60;
+                                                                if (minute != 0 && second != 0)
+                                                                {
+                                                                    state = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+
+                                                                }
+                                                                else
+                                                                {
+                                                                    if (minute == 0 && second != 0)
+                                                                    {
+                                                                        state = second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+
+                                                                    }
+                                                                    if (minute != 0 && second == 0)
+                                                                    {
+                                                                        state = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+
+                                                                    }
+
+                                                                }
+                                                            }
+                                                            else
+                                                            {
+                                                                state = Language.StringByID(MyInternationalizationString.someone);
+                                                            }
+                                                        }
+                                                    }
+                                                    break;
+                                                default:
+                                                    {
+                                                        if (intvalue == "1")
+                                                        {
+                                                            state =Language.StringByID(MyInternationalizationString.callthepolice);
+                                                        }
+                                                    }
+                                                    break;
+
+                                            }
+                                        }
+                                        break;
+                                    case DeviceType.OnOffSwitch:
+                                        {
+                                            icon = "ZigeeLogic/panel.png";
+                                            state = Language.StringByID(MyInternationalizationString.OnOffSwitch) + conditions["Epoint"];
+                                        }
+                                        break;
+                                    case DeviceType.DoorLock:
+                                        {
+                                            icon = "ZigeeLogic/doorlock.png";
+                                            for (int a = 0; a < Common.Logic.CurrentLogic.Accounts.Count; a++)
+                                            {
+                                                if (Common.Logic.CurrentLogic.Accounts[a]["Type"] == "1")
+                                                {
+                                                    if (Common.Logic.CurrentLogic.Accounts[a]["UserId"] == conditions["AttriButeData2"])
+                                                    {
+                                                        state = Common.Logic.CurrentLogic.Accounts[a]["AccountName"];
+                                                        break;
+
+                                                    }
+                                                }
+
+                                            }
+                                        }
+                                        break;
+                                    case DeviceType.TemperatureSensor:
+                                        {
+                                            // conditionIcon.UnSelectedImagePath = "ZigeeLogic/temperature.png";
+                                            var dev = deviceinof as TemperatureSensor;
+                                            if (conditions["Cluster_ID"] == "1026")
+                                            {
+                                                dev.SensorDiv = 1;
+                                            }
+                                            else
+                                            {
+                                                dev.SensorDiv = 2;
+                                            }
+                                            string s = "";
+                                            switch (conditions["Range"])
+                                            {
+                                                case "0":
+                                                    {
+                                                        s = ">";
+                                                    }
+                                                    break;
+                                                case "1":
+                                                    {
+                                                        s = "=";
+                                                    }
+                                                    break;
+                                                case "2":
+                                                    {
+                                                        s = "<";
+                                                    }
+                                                    break;
+                                                case "6":
+                                                    {
+                                                        s = "鈮�";
+                                                    }
+                                                    break;
+                                                case "7":
+                                                    {
+                                                        s = "鈮�";
+                                                    }
+                                                    break;
+                                            }
+                                            ///杞崲娓╁害鍊�/100
+                                            string srtValue = (int.Parse(conditions["AttriButeData1"]) / 100).ToString();
+                                            if (conditions["Cluster_ID"] == "1026")
+                                            {
+                                                icon = "ZigeeLogic/temperature.png";
+                                                state = s + srtValue + "鈩�";
+                                            }
+                                            else
+                                            {
+                                                icon = "ZigeeLogic/humidity.png";
+                                                state = s + srtValue + "%";
+                                            }
+                                            break;
+
+                                        }
+
+                                }
+                            }
+                            break;
+                        case 6:
+                            {
+                                switch (conditions["EnOrWithdrawMode"])
+                                {
+                                    case "0":
+                                        {
+                                            if (conditions["ModeId"] == "1")
+                                            {
+                                                icon = "ZigeeLogic/athome.png";
+                                                name = Language.StringByID(MyInternationalizationString.logicathomegarrison);
+
+                                            }
+                                            else
+                                            {
+                                                icon = "ZigeeLogic/leavehome.png";
+                                                name = Language.StringByID(MyInternationalizationString.logicremovehomegarrison);
+                                            }
+                                        }
+                                        break;
+                                    case "1":
+                                        {
+                                            icon = "ZigeeLogic/withdrawal.png";
+                                            name = Language.StringByID(MyInternationalizationString.withdrawal);
+                                        }
+                                        break;
+                                    case "2":
+                                        {
+                                            icon = "ZigeeLogic/withdrawal.png";
+                                            name = Language.StringByID(MyInternationalizationString.urgentwithdrawal);
+                                        }
+                                        break;
+                                }
+                            }
+                            break;
+                        case 7:
+                            {
+                                icon = "ZigeeLogic/position.png";
+                                name = Language.StringByID(MyInternationalizationString.geographicalposition);
+                                foreach (var radius in Common.Logic.CurrentLogic.Accounts)
+                                {
+                                    if (radius["Type"] == "7")
+                                    {
+                                        if (conditions["AtHome"] == "1")
+                                        {
+                                            state = Language.StringByID(MyInternationalizationString.athome) + radius["Radius"] + Language.StringByID(MyInternationalizationString.mi);
+                                        }
+                                        else
+                                        {
+                                            state = Language.StringByID(MyInternationalizationString.leavehome) + radius["Radius"] + Language.StringByID(MyInternationalizationString.mi);
+                                        }
+                                    }
+                                }
+                            }
+                            break;
+                    }
+                    if (Type != 1)
+                    {
+                        selecteddevice.ordinaryBtn.Visible = true;
+                        selecteddevice.iconBtn.UnSelectedImagePath = icon;
+                        selecteddevice.ordinaryBtn.Text = name;
+                        selecteddevice.selecetddevicestateBtn.Text = state;
+                    }
+                    else
+                    {
+                        //璁惧鐘舵��
+                        selecteddevice.deviceNameBtn.Visible = true;
+                        selecteddevice.iconBtn.UnSelectedImagePath = icon;
+                        selecteddevice.deviceNameBtn.Text = name;
+                        selecteddevice.selecetddevicestateBtn.Text = state;
+                    }
+                    ///缂栬緫
+                    selecteddevice.edit.Tag = i.ToString();
+                    selecteddevice.edit.MouseUpEventHandler += (sender, e) =>
+                    {
+                        switch (Type)
+                        {
+
+                            /// (0:鏃堕棿鐐规潯浠�;1:璁惧鐘舵�佸彉鍖栨潯浠�;2:鍏朵粬閫昏緫鏉′欢;3:璁℃暟鍣ㄦ潯浠�;4:鍊掕鏃�;5:鏃堕棿娈垫潯浠�;6:瀹夐槻鏉′欢;7:鍦扮悊浣嶇疆)
+                            case 0:
+                                {
+                                    var timePoint = new TimePoint();
+                                    UserView.HomePage.Instance.AddChidren(timePoint);
+                                    UserView.HomePage.Instance.PageIndex += 1;
+                                    timePoint.IsEditor = true;
+                                    timePoint.Show(conditions);
+                                }
+                                break;
+                            case 5:
+                                {
+                                    var timePage = new TimePage();
+                                    UserView.HomePage.Instance.AddChidren(timePage);
+                                    UserView.HomePage.Instance.PageIndex += 1;
+                                    timePage.str1 = conditions["StartHour"] + ":" + conditions["StartMin"] + "-" + conditions["StopHour"] + ":" + conditions["StopMin"];
+                                    timePage.IsEditor = true;
+                                    timePage.Show();
+                                }
+                                break;
+                            case 1:
+                                {
+                                    var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]);
+                                    if (deviceinof.Type != DeviceType.DoorLock)
+                                    {
+                                        var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+                                        frameLayout.AddChidren(flMain);
+                                        CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "condition_logic",int.Parse(selecteddevice.edit.Tag.ToString()));
+                                    }
+                                    else
+                                    {
+                                        var memberList = new MemberList();
+                                        UserView.HomePage.Instance.AddChidren(memberList);
+                                        UserView.HomePage.Instance.PageIndex += 1;
+                                        MemberList.edit = true;
+                                        memberList.Show(deviceinof, conditions);
+                                    }
+                                }
+                                break;
+                            case 6:
+                                {
+                                    var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+                                    frameLayout.AddChidren(flMain);
+                                    AddLogicPage.SecurityView(flMain, true);
+                                }
+                                break;
+                            case 7:
+                                {
+                                    var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+                                    frameLayout.AddChidren(flMain);
+                                    AddLogicPage.LocationView(flMain, true);
+                                }
+                                break;
+                        }
+                    };
+                    ///鍒犻櫎鎺т欢
+                    selecteddevice.del.MouseUpEventHandler += (sender, e) =>
+                    {
+
+                        var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm,
+                        Language.StringByID(MyInternationalizationString.doyouwanttodelete),
+                        Language.StringByID(MyInternationalizationString.confrim));
+                        alert.Show();
+
+                        alert.ConfirmClickEvent += () =>
+                        {
+                            Common.Logic.CurrentLogic.Conditions.Remove(conditions);
+                            selecteddevice.selecetdFrameLayout.RemoveFromParent();
+                            //var logicCommunalPage = new LogicCommunalPage();
+                            //UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+                            //UserView.HomePage.Instance.PageIndex += 1;
+                            //logicCommunalPage.Show(() => { });
+                        };
+
+                    };
+                    
+                }
+            }
+
+
+        }
+        /// <summary>
+        ///鏄剧ず閫昏緫鐩爣鐘舵�佺殑鏂规硶
+        /// </summary>
+        /// <param name="frameLayout">鐖舵帶浠�</param>
+        /// <param name="middle"></param>
+        /// <param name="ListActions">閫昏緫鐩爣鍒楄〃</param>
+        /// <param name="logicName">閫昏緫鍚嶇О</param>
+        public void Actions(FrameLayout frameLayout,VerticalScrolViewLayout middle, List<Dictionary<string, object>> ListActions, string logicName)
+        {
+
+            for (int i = 0; i < ListActions.Count; i++)
+            {
+                if (i == (ListActions.Count - 1))
+                {
+
+                    LogicView.AddDeviceView addflview = new LogicView.AddDeviceView();
+                    addflview.titleBtn.TextID = MyInternationalizationString.addfunction;
+                    middle.AddChidren(addflview.AddFl());
+                    addflview.clickBtn.MouseUpEventHandler += (sender, e) =>
+                    {
+                        Common.Logic.CurrentLogic.LogicName = logicName;
+                        Method.View(LogicView.IfString.Action_Logic, LogicView.IfString.Action_LogicScene);
+                    };
+                }
+                else
+                {
+
+                    SelectedDeviceView actiondevice = new SelectedDeviceView();
+                    actiondevice.Show(middle);
+                    var linkType = int.Parse(ListActions[i]["LinkType"].ToString());
+                    var actions = ListActions[i];
+                    string name = "";
+                    string icon = "";
+                    string state = "";
+
+                    switch (linkType)
+                    {
+                        case 0:
+                        case 8:
+                            {
+
+                                var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
+                                name = LocalDevice.Current.GetDeviceEpointName(deviceinof);
+                                actiondevice.regionNameBtn.Visible = true;
+                                Method.RoomNmae(actiondevice.regionNameBtn, deviceinof);
+                                switch (deviceinof.Type)
+                                {
+                                    case DeviceType.OnOffOutput:
+                                        {
+                                            icon = "ZigeeLogic/light.png";
+
+                                            var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
+                                            if (TaskList == null)
+                                            {
+                                                continue;
+                                            }
+                                            foreach (var status in TaskList)
+                                            {
+                                                if (status["TaskType"].ToString() == "1")
+                                                {
+                                                    if (status["Data1"].ToString() == "0")
+                                                    {
+                                                        state = Language.StringByID(MyInternationalizationString.close);
+
+                                                    }
+                                                    else if (status["Data1"].ToString() == "1")
+                                                    {
+                                                        state = Language.StringByID(MyInternationalizationString.open);
+
+                                                    }
+                                                    else if (status["Data1"].ToString() == "2")
+                                                    {
+
+                                                        state = Language.StringByID(MyInternationalizationString.onoff);
+                                                    }
+                                                }
+
+                                            }
+
+                                        }
+                                        break;
+                                    case DeviceType.DimmableLight:
+                                        {
+                                            icon = "ZigeeLogic/dimmableLight.png";
+                                            var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
+                                            if (TaskList == null)
+                                            {
+                                                continue;
+                                            }
+                                            foreach (var status in TaskList)
+                                            {
+                                                if (status["TaskType"].ToString() == "3")
+                                                {
+                                                    var intvalue = int.Parse(status["Data1"]);
+                                                    var lightbrightnessvalue = (intvalue * 100) / 254;
+                                                    state = lightbrightnessvalue.ToString() + "%";
+                                                }
+                                                else if (status["TaskType"].ToString() == "1")
+                                                {
+
+                                                    if (status["Data1"].ToString() == "0")
+                                                    {
+                                                        state = Language.StringByID(MyInternationalizationString.close);
+                                                    }
+                                                    else if (status["Data1"].ToString() == "2")
+                                                    {
+                                                        state = Language.StringByID(MyInternationalizationString.onoff);
+                                                    }
+                                                }
+
+
+                                            }
+
+                                        }
+                                        break;
+                                    case DeviceType.WindowCoveringDevice:
+                                        {
+                                            icon = "ZigeeLogic/curtain.png";
+                                            var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
+                                            if (TaskList == null)
+                                            {
+                                                continue;
+                                            }
+                                            foreach (var status in TaskList)
+                                            {
+                                                if (status["TaskType"] == "6")
+                                                {
+                                                    if (status["Data1"] == "0")
+                                                    {
+                                                        state = Language.StringByID(MyInternationalizationString.open);
+                                                    }
+                                                    else if (status["Data1"] == "1")
+                                                    {
+                                                        state = Language.StringByID(MyInternationalizationString.close);
+                                                    }
+                                                    else if (status["Data1"] == "5")
+                                                    {
+                                                        state = status["Data2"] + "%";
+                                                    }
+                                                }
+
+                                            }
+                                        }
+                                        break;
+                                    case DeviceType.AirSwitch:
+                                        {
+                                            icon = "ZigeeLogic/airswitch.png";
+
+                                            var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
+                                            if (TaskList == null)
+                                            {
+                                                continue;
+                                            }
+                                            foreach (var status in TaskList)
+                                            {
+                                                if (status["TaskType"].ToString() == "1")
+                                                {
+                                                    if (status["Data1"].ToString() == "0")
+                                                    {
+                                                        state = Language.StringByID(MyInternationalizationString.close);
+
+                                                    }
+                                                    else if (status["Data1"].ToString() == "1")
+                                                    {
+                                                        state = Language.StringByID(MyInternationalizationString.open);
+
+                                                    }
+                                                    else if (status["Data1"].ToString() == "2")
+                                                    {
+
+                                                        state = Language.StringByID(MyInternationalizationString.onoff);
+                                                    }
+                                                }
+
+                                            }
+
+                                        }
+                                        break;
+                                    case DeviceType.Thermostat:
+                                        {
+                                            icon = "ZigeeLogic/ac.png";
+
+                                            var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
+                                            if (TaskList == null)
+                                            {
+                                                continue;
+                                            }
+                                            string modetext = "", temperaturetext = "", speedtext = "";
+                                            bool ifclose = false;
+                                            foreach (var status in TaskList)
+                                            {
+
+                                                if (TaskList.Count == 1)
+                                                {
+                                                    //鏁扮粍鍙湁涓�涓厓绱犺鏄庡綋鍓嶇┖璋冪姸鎬佷负鍏筹紱
+                                                    ifclose = false;
+                                                    //濡傛灉绌鸿皟鐘舵�佹槸鍏筹紱鐩存帴璺冲嚭for寰潖锛�
+                                                    break;
+                                                }
+                                                else
+                                                {
+                                                    ifclose = true;
+                                                }
+                                                if (status["TaskType"].ToString() == "5")
+                                                {
+                                                    if (status["Data1"] == "3")
+                                                    {//3---璁剧疆宸ヤ綔妯″紡(1:鑷姩;3:鍒跺喎;4:鍒剁儹;7:閫侀;8:闄ゆ箍)
+                                                        switch (status["Data2"])
+                                                        {
+                                                            case "3":
+                                                                {
+                                                                    modetext = Language.StringByID(MyInternationalizationString.logiccool);
+                                                                }
+                                                                break;
+                                                            case "4":
+                                                                {
+                                                                    modetext = Language.StringByID(MyInternationalizationString.logicheat);
+                                                                }
+                                                                break;
+                                                            case "1":
+                                                                {
+                                                                    modetext = Language.StringByID(MyInternationalizationString.logicauto);
+                                                                }
+                                                                break;
+                                                            case "8":
+                                                                {
+                                                                    modetext = Language.StringByID(MyInternationalizationString.logicdry);
+                                                                }
+                                                                break;
+                                                            case "7":
+                                                                {
+                                                                    modetext = Language.StringByID(MyInternationalizationString.logicfanonly);
+                                                                }
+                                                                break;
+                                                        }
+                                                    }
+                                                    else if (status["Data1"] == "6")
+                                                    {//6---璁剧疆椋庢墖妯″紡(1:浣庨;2:涓;3:楂橀;)
+                                                        switch (status["Data2"])
+                                                        {
+                                                            case "1":
+                                                                {
+                                                                    speedtext = Language.StringByID(MyInternationalizationString.logiclow);
+                                                                }
+                                                                break;
+
+                                                            case "2":
+                                                                {
+                                                                    speedtext = Language.StringByID(MyInternationalizationString.logicmedium);
+                                                                }
+                                                                break;
+                                                            case "3":
+                                                                {
+                                                                    speedtext = Language.StringByID(MyInternationalizationString.logichigh);
+                                                                }
+                                                                break;
+
+                                                        }
+                                                    }
+                                                    //4---璁剧疆鍔犵儹搴︽暟;5---璁剧疆鍒跺喎銆侀櫎婀垮害鏁�;7---璁剧疆鑷姩搴︽暟
+                                                    else if (status["Data1"] == "4" || status["Data1"] == "5" || status["Data1"] == "7")
+                                                    {
+                                                        var s = int.Parse(status["Data2"]) / 100;
+                                                        temperaturetext = s.ToString();
+                                                    }
+                                                    else if (status["Data1"] == "20")
+                                                    {
+                                                        temperaturetext = "鏃�";
+                                                    }
+
+
+                                                }
+
+                                            }
+                                            if (ifclose)
+                                            {
+                                                state = modetext + ";" + temperaturetext + "鈩�;" + speedtext;
+                                            }
+                                            else
+                                            {
+                                                state = Language.StringByID(MyInternationalizationString.close);
+
+                                            }
+                                        }
+                                        break;
+                                    case DeviceType.DoorLock:
+                                        {
+                                            //闂ㄩ攣鐗规畩
+                                            icon = "ZigeeLogic/doorlock.png";
+                                            if (actions["PassData"].ToString() == "055704010112")
+                                            {
+                                                state = Language.StringByID(MyInternationalizationString.logicopen);
+                                            }
+                                            else
+                                            {
+                                                state = Language.StringByID(MyInternationalizationString.logicclose);
+                                            }
+                                        }
+                                        break;
+                                    case DeviceType.ColorTemperatureLight:
+                                        {
+                                            icon = "ZigeeLogic/nightLight.png";
+                                            var taskList = actions["TaskList"] as List<Dictionary<string, string>>;
+                                            if (taskList == null)
+                                            {
+                                                continue;
+                                            }
+                                            foreach (var tasks in taskList)
+                                            {
+                                                switch (tasks["TaskType"])
+                                                {
+                                                    case "1":
+                                                        {
+                                                            if (tasks["Data1"] == "0")
+                                                            {
+                                                                state += Language.StringByID(MyInternationalizationString.close) + ";";
+                                                            }
+                                                            else
+                                                            {
+                                                                state += Language.StringByID(MyInternationalizationString.open) + ";";
+                                                            }
+                                                        }
+                                                        break;
+
+                                                }
+                                            }
+                                            foreach (var tasks in taskList)
+                                            {
+                                                switch (tasks["TaskType"])
+                                                {
+
+                                                    case "3":
+                                                        {
+                                                            var intvalue = int.Parse(tasks["Data1"]);
+                                                            var lightbrightnessvalue = (intvalue * 100) / 254;
+                                                            state += Language.StringByID(MyInternationalizationString.brightness) + lightbrightnessvalue.ToString() + "%;";
+                                                        }
+                                                        break;
+
+                                                }
+                                            }
+                                            foreach (var tasks in taskList)
+                                            {
+                                                switch (tasks["TaskType"])
+                                                {
+
+                                                    case "7":
+                                                        {
+                                                            if (tasks["Data1"] == "0")
+                                                            {
+                                                                state += Language.StringByID(MyInternationalizationString.buzzer) + Language.StringByID(MyInternationalizationString.close) + ";";
+                                                            }
+                                                            else
+                                                            {
+                                                                state += Language.StringByID(MyInternationalizationString.buzzer) + Language.StringByID(MyInternationalizationString.open) + ";";
+                                                            }
+                                                        }
+                                                        break;
+
+                                                }
+                                            }
+                                            foreach (var tasks in taskList)
+                                            {
+                                                switch (tasks["TaskType"])
+                                                {
+
+                                                    case "8":
+                                                        {
+                                                            var intvalue = int.Parse(tasks["Data1"]);
+                                                            var colorTemperatureValue = 1000000 / (intvalue * 100);
+                                                            state += Language.StringByID(MyInternationalizationString.colorTemperature) + colorTemperatureValue.ToString() + "K";
+                                                        }
+                                                        break;
+                                                }
+                                            }
+
+                                            state = state.TrimEnd(';');//鍘绘帀鏈�鍚庨偅涓�";"
+                                        }
+                                        break;
+                                }
+
+                            }
+                            break;
+                        case 2:
+                            {
+                                //鍦ㄦ湰鍦版煡鎵捐鍦烘櫙;
+                                var sceneinof = UserCenter.HdlSceneLogic.Current.GetSceneUIBySceneId(Convert.ToInt32(actions["DeviceAddr"].ToString()));
+                                //鏈湴娌℃湁瀛樺湪;
+                                if (sceneinof == null)
+                                {
+                                    //瀹炵幇鐩殑:鏄剧ず鍑烘潵璁╁彲浠ヨ嚜宸辨槸鍚﹀垹闄�
+                                    sceneinof = new SceneUI();
+                                    #region --------
+                                    ////鍦ㄧ綉鍏虫煡鎵捐鍦烘櫙;
+                                    ////鏍囪闂:缃戠粶璇锋眰锛屽瓨鍦ㄨ鍥惧姞杞藉揩鎱㈢殑闂锛�
+                                    //sceneinof = await Send.GetScene(int.Parse(actions["DeviceAddr"].ToString()));
+                                    ////缃戝叧娌℃湁瀛樺湪;
+                                    //if (sceneinof == null)
+                                    //{
+                                    //    //娉ㄨВ:鏈湴鍜岀綉鍏抽兘涓嶅瓨鍦ㄨ鍦烘櫙,鐣岄潰灏嗕笉浼氭樉绀鸿鍦烘櫙;
+                                    //    //sceneinof = new SceneUI();
+                                    //    //绉婚櫎璇ュ満鏅暟鎹�;
+                                    //    Common.Logic.CurrentLogic.Actions.Remove(actions);
+                                    //    //绉婚櫎璇ュ満鏅鍥�;
+                                    //    devicesFrameLayout.RemoveFromParent();
+                                    //    continue;
+                                    //}
+                                    #endregion
+                                }
+
+                                icon = "ZigeeLogic/scene.png";
+                                name = sceneinof.Name;
+                                actiondevice.regionNameBtn.Visible = true;
+                                /////閫氳繃璁惧鎵惧埌鍖哄煙(鎴块棿)鍚嶇О
+                                Common.Room room = new Common.Room();
+                                actiondevice.regionNameBtn.Text = UserCenter.HdlRoomLogic.Current.GetRoomNameBySceneId(sceneinof.Id);
+
+                            }
+                            break;
+                        case 6:
+                            {
+
+
+
+                                if (actions["SecuritySetting"].ToString() == "0")
+                                {
+                                    if (actions["Password"].ToString() == "888888")
+                                    {
+                                        icon = "ZigeeLogic/withdrawal.png";
+                                        state = Language.StringByID(MyInternationalizationString.urgentwithdrawal);
+                                    }
+                                    else
+                                    {
+                                        icon = "ZigeeLogic/withdrawal.png";
+                                        state = Language.StringByID(MyInternationalizationString.withdrawal);
+
+                                    }
+                                }
+                                else if (actions["SecuritySetting"].ToString() == "1")
+                                {
+                                    if (actions["SecurityModeId"].ToString() == "1")
+                                    {
+                                        icon = "ZigeeLogic/athome.png";
+                                        state = Language.StringByID(MyInternationalizationString.logicathomegarrison);
+                                    }
+                                    else if (actions["SecurityModeId"].ToString() == "2")
+                                    {
+                                        icon = "ZigeeLogic/leavehome.png";
+                                        state = Language.StringByID(MyInternationalizationString.logicremovehomegarrison);
+                                    }
+                                }
+
+                            }
+                            break;
+                        case 7:
+                            {
+                                var delaytimevalue = int.Parse(actions["DelayTime"].ToString());
+                                var Minutes = delaytimevalue / 60;
+                                var seconds = delaytimevalue % 60;
+
+                                icon = "ZigeeLogic/delay.png";
+
+                                if (Minutes != 0)
+                                {
+                                    if (seconds == 0)
+                                    {
+                                        state = Minutes.ToString() + Language.StringByID(MyInternationalizationString.minute);
+                                    }
+                                    else
+                                    {
+                                        state = Minutes.ToString() + Language.StringByID(MyInternationalizationString.minute) + seconds.ToString() + Language.StringByID(MyInternationalizationString.second);
+                                    }
+                                }
+                                else
+                                {
+                                    state = seconds.ToString() + Language.StringByID(MyInternationalizationString.second);
+                                }
+                                //璁板綍寤舵椂锛�
+                                actiondevice.edit.Tag = i;
+                            };
+                            break;
+                    }
+
+                    if (linkType != 2)
+                    {
+                        actiondevice.stateRow.AddRightView(actiondevice.edit);
+                    }
+                    actiondevice.stateRow.AddRightView(actiondevice.del);
+
+                    if (linkType == 6 || linkType == 7)
+                    {
+                        actiondevice.ordinaryBtn.Visible = true;
+                        actiondevice.iconBtn.UnSelectedImagePath = icon;
+                        actiondevice.ordinaryBtn.Text = name;
+                        actiondevice.selecetddevicestateBtn.Text = state;
+                    }
+                    else
+                    {
+                        //璁惧鐘舵��
+                        actiondevice.deviceNameBtn.Visible = true;
+                        actiondevice.iconBtn.UnSelectedImagePath = icon;
+                        actiondevice.deviceNameBtn.Text = name;
+                        actiondevice.selecetddevicestateBtn.Text = state;
+                    }
+                    ///缂栬緫
+                    actiondevice.edit.Tag = i.ToString();
+                    actiondevice.edit.MouseUpEventHandler += (sender, e) =>
+                    {
+                        switch (linkType)
+                        {
+                            case 8:
+                            case 0:
+                                {
+                                    var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
+                                    var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+                                    frameLayout.AddChidren(flMain);
+                                    CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_logic", int.Parse(actiondevice.edit.Tag.ToString()));
+                                }
+                                break;
+                            case 6:
+                                {
+                                    var securityMode = new SecurityMode();
+                                    UserView.HomePage.Instance.AddChidren(securityMode);
+                                    UserView.HomePage.Instance.PageIndex += 1;
+                                    securityMode.IsDeviceEditor = true;
+                                    securityMode.Show();
+                                }
+                                break;
+                            case 7:
+                                {
+                                    var delayTime = new DelayTime();
+                                    UserView.HomePage.Instance.AddChidren(delayTime);
+                                    UserView.HomePage.Instance.PageIndex += 1;
+                                    delayTime.Show(int.Parse(actiondevice.edit.Tag.ToString()), true);
+                                }
+                                break;
+
+                        }
+                    };
+                    ///鍒犻櫎鎺т欢
+                    actiondevice.del.MouseUpEventHandler += (sender, e) =>
+                    {
+
+                        var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm,
+                        Language.StringByID(MyInternationalizationString.doyouwanttodelete),
+                        Language.StringByID(MyInternationalizationString.confrim));
+                        alert.Show();
+                        alert.ConfirmClickEvent += () =>
+                        {
+                            Common.Logic.CurrentLogic.Actions.Remove(actions);
+                            actiondevice.selecetdFrameLayout.RemoveFromParent();
+                            // devicesFrameLayout.RemoveFromParent();
+                            //var logicCommunalPage = new LogicCommunalPage();
+                            //UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+                            //UserView.HomePage.Instance.PageIndex += 1;
+                            //logicCommunalPage.Show(() => { });
+                        };
+
+                    };
+
+
+                }
+            }
+
+
+        }
+        /// <summary>
+        /// 涓庢垨鏉′欢甯冨眬鐣岄潰鐨勬柟娉� 
+        /// </summary>
+        /// <param name="edit"></param>
+        /// <param name="frameLayout"></param>
+        public void ConditionView(bool edit, FrameLayout frameLayout)
+        {
+
+            #region  ------缁勫悎鏉′欢鐣岄潰甯冨眬閮ㄥ垎   
+            var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
+            frameLayout.AddChidren(flMain);
+            CompleteView completeView = new CompleteView();
+            flMain.AddChidren(completeView.Show(2));
+            completeView.Btntitle.TextID = MyInternationalizationString.condition;
+            EventHandler<MouseEventArgs> clickcancel = (sender, e) =>
+            {
+                UserView.HomePage.Instance.ScrollEnabled = true;
+                flMain.RemoveFromParent();
+            };
+            flMain.MouseUpEventHandler += clickcancel;
+            completeView.Btncancel.MouseUpEventHandler += clickcancel;
+
+            //婊¤冻鎵�鏈夋潯浠�
+            mFunView allFunView = new mFunView();
+            allFunView.frameLayout.Y = Application.GetRealHeight(140 + 20);
+            completeView.Show(2).AddChidren(allFunView.Show());
+            allFunView.titleBtn.TextID = MyInternationalizationString.Allconditions;
+            //婊¤冻鍏朵腑涓�涓潯浠�
+            mFunView ormFunview = new mFunView();
+            ormFunview.frameLayout.Y = allFunView.frameLayout.Bottom;
+            completeView.Show(2).AddChidren(ormFunview.Show());
+            ormFunview.titleBtn.TextID = MyInternationalizationString.anycondition;
+            ormFunview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+            #endregion
+
+            ///婊¤冻鎵�鏈夋潯浠剁偣鍑讳簨浠�
+            allFunView.clickviewBtn.MouseUpEventHandler += (sedner, e) =>
+            {
+                allFunView.selectedIconBtn.Visible = true;
+                ormFunview.selectedIconBtn.Visible = false;
+                allFunView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+                ormFunview.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+            };
+            ///婊¤冻鍏朵腑涓�涓潯浠剁偣鍑讳簨浠�
+            ormFunview.clickviewBtn.MouseUpEventHandler += (sedner, e) =>
+            {
+                allFunView.selectedIconBtn.Visible = false;
+                ormFunview.selectedIconBtn.Visible = true;
+                allFunView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+                ormFunview.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+            };
+
+            if (edit)
+            {
+                if (Common.Logic.CurrentLogic.Relationship == 0)
+                {
+                    allFunView.selectedIconBtn.Visible = true;
+                    ormFunview.selectedIconBtn.Visible = false;
+                    allFunView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+                    ormFunview.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+                }
+                else
+                {
+                    allFunView.selectedIconBtn.Visible = false;
+                    ormFunview.selectedIconBtn.Visible = true;
+                    allFunView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+                    ormFunview.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+                }
+            }
+            completeView.Btncomplete.MouseUpEventHandler += (sender, e) =>
+            {
+                if (!allFunView.selectedIconBtn.Visible && !ormFunview.selectedIconBtn.Visible)
+                {
+                    ///鍙互鎻愮ず鏈�変腑鐘舵�侊紱
+                    return;
+                }
+                flMain.RemoveFromParent();
+
+                if (allFunView.selectedIconBtn.Visible)
+                {
+                    Common.Logic.CurrentLogic.Relationship = 0;
+
+                }
+                if (ormFunview.selectedIconBtn.Visible)
+                {
+                    Common.Logic.CurrentLogic.Relationship = 1;
+
+                }
+                if (edit)
+                {
+                    if (Common.Logic.CurrentLogic.LogicId != 0)
+                    {
+                        Send.LogicControlSwitch(Common.Logic.CurrentLogic);
+                    }
+                    var logicCommunalPage = new LogicCommunalPage();
+                    UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+                    UserView.HomePage.Instance.PageIndex += 1;
+                    logicCommunalPage.Show(() => { });
+                }
+                else
+                {
+                    var addLogicPage = new AddLogicPage();
+                    UserView.HomePage.Instance.AddChidren(addLogicPage);
+                    UserView.HomePage.Instance.PageIndex += 1;
+                    addLogicPage.Show();
+                }
+            };
+
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs
index a893a4a..fd74126 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs
@@ -41,6 +41,25 @@
                             }
 
                         }
+                        else if (common.Type == DeviceType.IASZone)
+                        {
+                            var iASZonedevice = common as IASZone;
+                            if (iASZonedevice.IasDeviceType == 541)
+                            {//鐞冨舰绉诲姩浼犳劅鍣�
+                                if (Common.Logic.CurrentLogic.Conditions[i]["Cluster_ID"] == objecttype["Cluster_ID"])
+                                {
+                                    Common.Logic.CurrentLogic.Conditions.RemoveAt(i);
+                                    Common.Logic.CurrentLogic.Conditions.Insert(i, objecttype);
+                                    return;
+                                }
+                                continue;
+                            }
+
+                            Common.Logic.CurrentLogic.Conditions.RemoveAt(i);
+                            Common.Logic.CurrentLogic.Conditions.Insert(i, objecttype);
+                            return;
+
+                        }
                         else
                         {
                             Common.Logic.CurrentLogic.Conditions.RemoveAt(i);
@@ -187,8 +206,7 @@
         /// <summary>
         /// 娣诲姞瀹夐槻杈撳嚭鐨勬柟娉�
         /// </summary>
-        /// <param name="objecttype">Objecttype.</param>
-        /// <param name="o">O.</param>
+        /// <param name="actionsInfo">actionsInfo.</param>
         public static void AddSecurityactions(Dictionary<string, object> actionsInfo)
         {
             for (int i = 0; i < Common.Logic.CurrentLogic.Actions.Count; i++)
@@ -206,8 +224,8 @@
         /// <summary>
         /// 娣诲姞鑷姩鍖栬緭鍑虹殑鏂规硶
         /// </summary>
-        /// <param name="objecttype">Objecttype.</param>
-        /// <param name="o">O.</param>
+        /// <param name="actionsInfo">Objecttype.</param>
+        /// <param name="logic">logic</param>
         public static void AddLogicactions(Common.Logic logic, Dictionary<string, object> actionsInfo)
         {
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs
index 8383026..5ce1f29 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs
@@ -22,7 +22,7 @@
             this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
             TopView view = new TopView();
             this.AddChidren(view.TopRowView());
-            view.toptitleNameBtn.Text = Name;
+            view.toptitleNameBtn.Text = LocalDevice.Current.GetDeviceEpointName(common);
             view.clickBtn.MouseDownEventHandler += (sender, e) =>
             {
                 RemoveFromParent();
@@ -270,10 +270,10 @@
                         Send.dictionary(brightnessDictionary, "Data2", "0");
                         var horizontalSeekBarVol = new DiyImageSeekBar
                         {
-                            Y = Application.GetRealHeight(140),
-                            X = Application.GetRealWidth(78),
-                            Width = Application.GetRealWidth(918),
-                            Height = Application.GetRealHeight(320),//婊戝姩鏉$埗鎺т欢楂樺害
+                            Y = Application.GetRealHeight(140),//杩涘害鏉$埗鎺т欢Y鍧愭爣
+                            X = Application.GetRealWidth(78),//杩涘害鏉鍧愭爣
+                            Width = Application.GetRealWidth(918),//杩涘害鏉$殑闀垮害
+                            Height = Application.GetRealHeight(320),//杩涘害鏉$埗鎺ф帶浠堕珮搴�
                             IsProgressTextShow = true,//鏄剧ず鐧惧垎姣�
                             IsClickable = true,//杩涘害鏉℃槸鍚︽粦鍔�
                             ProgressBarColor = ZigbeeColor.Current.LogicProgressColorSelected,//閫変腑杩涘害鏉¢鑹�
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
index feab18b..45f0f72 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
@@ -380,6 +380,7 @@
         /// <param name="devicelist">璁惧鍒楄〃</param>
         void ConditionDeviceView(List<DeviceType> deviceTypelist, List<CommonDevice> devicelist)
         {
+
             middle.RemoveAll();
             foreach (var common in devicelist)
             {
@@ -459,7 +460,7 @@
                     devicename.IsSelected = true;
                     var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                     this.AddChidren(flMain);
-                    CurrentDeviceState.CurrentDeviceView(flMain, common, false, IfType);
+                    CurrentDeviceState.CurrentDeviceView(flMain, common, false, IfType,0);
                 };
                 deviceFramelayout.MouseUpEventHandler += devicclick;
                 bjFramelayout.MouseUpEventHandler += devicclick;
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
index da81d33..ad7886d 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -872,7 +872,7 @@
                 {
                     //鏈嶅姟杩斿洖鏉ユ病鏈夐棬閿佹垚鍛樹俊鎭紝娌℃湁蹇呰鍐嶅幓璇锋眰鎴愬憳鍒楄〃锛�
                     //鍘熷洜锛氳妭绾︽椂闂达紝浣撻獙鏁堟灉濂斤紱
-                    result = await UserCenter.UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
+                    result = UserCenter.UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
                 }
                 if (string.IsNullOrEmpty(result))
                 {
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
index 2d5b82d..b3aa415 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
@@ -270,14 +270,15 @@
                             }
                             break;
                     }
-                 
+
                     ///缂栬緫
+                    selecteddevice.edit.Tag = i.ToString();
                     selecteddevice.edit.MouseUpEventHandler += (sender, e) =>
                     {
                         var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]);
                         var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                         this.AddChidren(flMain);
-                        CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "condition_mould");
+                        CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "condition_mould", int.Parse(selecteddevice.edit.Tag.ToString()));
 
                     };
                     ///鍒犻櫎鎺т欢
@@ -403,11 +404,13 @@
                             break;
                     }
                     ///缂栬緫
+
+                    actiondevice.edit.Tag = i;
                     actiondevice.edit.MouseUpEventHandler += (sender, e) => {
                         var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                         this.AddChidren(flMain);
                         var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
-                        CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_mould");
+                        CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_mould",int.Parse(actiondevice.edit.Tag.ToString()));
                     };
                     ///鍒犻櫎鎺т欢
                     actiondevice.del.MouseUpEventHandler += (sender, e) =>
diff --git a/ZigbeeApp/Shared/Phone/Login/AccountForgetPWD.cs b/ZigbeeApp/Shared/Phone/Login/AccountForgetPWD.cs
index cab0428..60b0ace 100755
--- a/ZigbeeApp/Shared/Phone/Login/AccountForgetPWD.cs
+++ b/ZigbeeApp/Shared/Phone/Login/AccountForgetPWD.cs
@@ -286,7 +286,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="mouseEventArgs"></param>
-        private async void SendCode_MouseUpEventAsync(object sender, MouseEventArgs mouseEventArgs)
+        private void SendCode_MouseUpEventAsync(object sender, MouseEventArgs mouseEventArgs)
         {
             if (CheckAccount(account) == false)
             {
@@ -313,7 +313,7 @@
                     AreaCode = int.Parse(CommonPage.PhoneZoneStr),
                     Language = CommonPage.ZigBeeLanguage
                 };
-                var requestRevertObj = await CommonFormResouce.LoginSendVerCode(reqDto);
+                var requestRevertObj = CommonFormResouce.LoginSendVerCode(reqDto);
                 if (requestRevertObj == null)
                 {
                     errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
@@ -396,7 +396,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="mouseEventArgs"></param>
-        private async void Reset(object sender,MouseEventArgs mouseEventArgs)
+        private void Reset(object sender,MouseEventArgs mouseEventArgs)
         {
 
             if (CheckAccount(account) == false)
@@ -426,7 +426,7 @@
                     Language = CommonPage.ZigBeeLanguage
                 };
                 //楠岃瘉楠岃瘉鐮�
-                var requestRevertObj = await CommonFormResouce.ValidatorCode(reqDto);
+                var requestRevertObj = CommonFormResouce.ValidatorCode(reqDto);
                 if (requestRevertObj == null)
                 {
                     CommonPage.Instance.FailureToServer();
@@ -443,7 +443,7 @@
                         AreaCode = int.Parse(CommonPage.PhoneZoneStr),
                         AgainPassword = pwdComfireRow.PasswrodET.Text.Trim()
                     };
-                    var revertObj = await CommonFormResouce.ResetPassword(reqREPWD);
+                    var revertObj = CommonFormResouce.ResetPassword(reqREPWD);
                     if (revertObj == null)
                     {
                         CommonPage.Instance.FailureToServer();
diff --git a/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs b/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs
index e0fe24b..a70a48b 100755
--- a/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs
+++ b/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs
@@ -557,7 +557,7 @@
             btnSendCode.TextAlignment = TextAlignment.Center;
             btnSendCode.IsBold = true;
             rowVerCode.AddChidren(btnSendCode);
-            btnSendCode.ButtonClickEvent += async (sender, e) =>
+            btnSendCode.ButtonClickEvent += (sender, e) =>
             {
                 //妫�娴嬭緭鍏ョ殑璐﹀彿
                 nowInputAccount = txtAccount.Text.Trim();
@@ -566,7 +566,7 @@
                     return;
                 }
                 //鍙戦�侀獙璇佺爜
-                hadSendCode = await this.SendVerCode(btnSendCode, nowInputAccount, i_div);
+                hadSendCode = this.SendVerCode(btnSendCode, nowInputAccount, i_div);
             };
 
             //搴曠嚎
@@ -753,7 +753,7 @@
             //鐧婚檰涓�....
             CommonPage.Loading.Start(Language.StringByID(R.MyInternationalizationString.Logining));
 
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鐧婚檰鍙傛暟
                 var pra = new SendDataToServer.LoginObj();
@@ -764,7 +764,7 @@
 
                 //璁块棶鎺ュ彛
                 var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(pra);
-                var result = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/Login", System.Text.Encoding.UTF8.GetBytes(requestJson));
+                var result = CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/Login", System.Text.Encoding.UTF8.GetBytes(requestJson));
 
                 //澶勭悊鐧婚檰鎴愬姛鐨勬暟鎹�
                 this.AdjustLoginSuccessData(result, pra, i_account, i_psw, i_div);
@@ -830,10 +830,10 @@
                 {
                     return;
                 }
-                HdlThreadLogic.Current.RunThread(async () =>
+                HdlThreadLogic.Current.RunThread(() =>
                 {
                     //鏄惁宸茬粡缁戝畾
-                    var re = await isBindAuthAsync(authStr);
+                    var re = isBindAuthAsync(authStr);
                     if (re)
                     {
                         Application.RunOnMainThread(() =>
@@ -841,14 +841,14 @@
                             //鐩存帴鐧诲綍
                             HomePage.Instance.ShowLoginLoadView();
                         });
-                        var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
-                        var homes = await HdlResidenceLogic.Current.GetHomeListsFromDb();
+                        var resultRegID = Shared.Common.CommonPage.Instance.PushRegID();
+                        var homes = HdlResidenceLogic.Current.GetHomeListsFromDb();
                         //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                        await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
+                        UserCenterLogic.InitUserCenterMenmoryAndThread();
                         //鍚姩ZigBee
                         ZigBee.Common.Application.Init();
 
-                        Application.RunOnMainThread(() =>
+                        HdlThreadLogic.Current.RunMain(() =>
                         {
                             this.RemoveFromParent();
                             CommonPage.Instance.RemoveViewByTag("Login");
@@ -858,7 +858,7 @@
                     else
                     {
                         var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr);
-                        Application.RunOnMainThread(() =>
+                        HdlThreadLogic.Current.RunMain(() =>
                         {
                             var registerPage = new AccountRegister();
                             CommonPage.Instance.AddChidren(registerPage);
@@ -875,7 +875,7 @@
         /// </summary>
         /// <param name="authStr"></param>
         /// <returns></returns>
-        private async System.Threading.Tasks.Task<bool> isBindAuthAsync(string authStr)
+        private bool isBindAuthAsync(string authStr)
         {
             var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr);
             var auth = new SendDataToServer.AuthUser()
@@ -887,7 +887,7 @@
             //鑾峰彇寰俊鏄电О
             var strUrl = "https://api.weixin.qq.com/sns/userinfo?access_token=" + authRes.access_token;
             strUrl += "&openid=" + authRes.openid;
-            var byteData = await Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(strUrl, null, null, "GET");
+            var byteData = Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(strUrl, null, null, "GET");
             if (byteData == null)
             {
                 return false;
@@ -897,7 +897,7 @@
             auth.UserName = nickData.nickname;
 
             var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(auth);
-            var revertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/InsertOrUpdateAuthUser", System.Text.Encoding.UTF8.GetBytes(requestJson));
+            var revertObj = CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/InsertOrUpdateAuthUser", System.Text.Encoding.UTF8.GetBytes(requestJson));
             if (revertObj == null)
             {
                 return false;
@@ -932,18 +932,24 @@
         /// <param name="i_account">璐﹀彿</param>
         /// <param name="i_verCode">楠岃瘉鐮�</param>
         /// <param name="i_div">1:鎵嬫満鍙� 2:閭</param>
-        private async void LoginByVerCode(string i_account, string i_verCode, int i_div)
+        private void LoginByVerCode(string i_account, string i_verCode, int i_div)
         {
-            var pra = new SendDataToServer.LoginValidCodeOBJ()
+            //鐧婚檰涓�....
+            CommonPage.Loading.Start(Language.StringByID(R.MyInternationalizationString.Logining));
+
+            HdlThreadLogic.Current.RunThread(() =>
             {
-                Account = i_account,
-                Code = i_verCode,
-                Language = CommonPage.ZigBeeLanguage,
-                AreaCode = int.Parse(CommonPage.PhoneZoneStr)
-            };
-            var result = await CommonFormResouce.LoginByCode(pra);
-            //澶勭悊鐧婚檰鎴愬姛鐨勬暟鎹�
-            this.AdjustLoginSuccessData(result, pra, i_account, string.Empty, i_div);
+                var pra = new SendDataToServer.LoginValidCodeOBJ()
+                {
+                    Account = i_account,
+                    Code = i_verCode,
+                    Language = CommonPage.ZigBeeLanguage,
+                    AreaCode = int.Parse(CommonPage.PhoneZoneStr)
+                };
+                var result = CommonFormResouce.LoginByCode(pra);
+                //澶勭悊鐧婚檰鎴愬姛鐨勬暟鎹�
+                this.AdjustLoginSuccessData(result, pra, i_account, string.Empty, i_div);
+            });
         }
 
         /// <summary>
@@ -953,7 +959,7 @@
         /// <param name="account">璐﹀彿</param>
         /// <param name="i_div">1:鎵嬫満鍙� 2:閭</param>
         /// <returns></returns>
-        private async System.Threading.Tasks.Task<bool> SendVerCode(NormalViewControl btnSendCode, string account, int i_div)
+        private bool SendVerCode(NormalViewControl btnSendCode, string account, int i_div)
         {
             //涓嶈兘鍐嶇偣鍑�
             btnSendCode.CanClick = false;
@@ -974,7 +980,7 @@
                 AreaCode = int.Parse(CommonPage.PhoneZoneStr),
                 Language = CommonPage.ZigBeeLanguage
             };
-            var requestRevertObj = await CommonFormResouce.LoginSendVerCode(reqDtoSignPhone);
+            var requestRevertObj = CommonFormResouce.LoginSendVerCode(reqDtoSignPhone);
             if (requestRevertObj == null)
             {
                 //璇锋眰鏈嶅姟鍣ㄥけ璐�
@@ -1068,7 +1074,7 @@
         /// <param name="i_account">璐﹀彿</param>
         /// <param name="i_psw">瀵嗙爜锛岄獙璇佺爜鐧婚檰鏃�,璁剧疆涓� string.Empty</param>
         /// <param name="i_div">1:鎵嬫満鍙� 2:閭</param>
-        private async void AdjustLoginSuccessData(Common.ResponseEntity.ResponsePack revertObj, object pra,
+        private void AdjustLoginSuccessData(Common.ResponseEntity.ResponsePack revertObj, object pra,
             string i_account, string i_psw, int i_div)
         {
             if (revertObj == null)
@@ -1104,10 +1110,10 @@
                 Config.Instance.LoginToken = revertData.Token;
                 Config.Instance.Save();
 
-                var resultRegID = await CommonPage.Instance.PushRegID();
-                var homes = await HdlResidenceLogic.Current.GetHomeListsFromDb();
+                var resultRegID = CommonPage.Instance.PushRegID();
+                var homes = HdlResidenceLogic.Current.GetHomeListsFromDb();
                 //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                await UserCenterLogic.InitUserCenterMenmoryAndThread();
+                UserCenterLogic.InitUserCenterMenmoryAndThread();
                 //鍚姩ZigBee
                 ZigBee.Common.Application.Init();
 
diff --git a/ZigbeeApp/Shared/Phone/Login/AccountRegister.cs b/ZigbeeApp/Shared/Phone/Login/AccountRegister.cs
index 13b39cb..31ad343 100755
--- a/ZigbeeApp/Shared/Phone/Login/AccountRegister.cs
+++ b/ZigbeeApp/Shared/Phone/Login/AccountRegister.cs
@@ -265,7 +265,7 @@
         ///  </summary>
         /// <param name="sender">Sender.</param>
         /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
-        private async void Register(object sender, MouseEventArgs mouseEventArgs)
+        private void Register(object sender, MouseEventArgs mouseEventArgs)
         {
             if (CheckAccount(account) == false)
             {
@@ -297,7 +297,7 @@
                     AreaCode = int.Parse(CommonPage.PhoneZoneStr)
                 };
                 //楠岃瘉楠岃瘉鐮�
-                var requestRevertObj = await CommonFormResouce.Register(reqDto);
+                var requestRevertObj = CommonFormResouce.Register(reqDto);
                 if (requestRevertObj == null)
                 {
                     CommonPage.Instance.FailureToServer();
@@ -415,7 +415,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="mouseEventArgs"></param>
-        private async void SendCode_MouseUpEventAsync(object sender, MouseEventArgs mouseEventArgs)
+        private void SendCode_MouseUpEventAsync(object sender, MouseEventArgs mouseEventArgs)
         {
             if (CheckAccount(account) == false)
             {
@@ -454,7 +454,7 @@
                     AreaCode = int.Parse(CommonPage.PhoneZoneStr),
                     Language = CommonPage.ZigBeeLanguage
                 };
-                var requestRevertObj = await CommonFormResouce.RegisterSendVerCode(reqDto);
+                var requestRevertObj = CommonFormResouce.RegisterSendVerCode(reqDto);
                 if (requestRevertObj == null)
                 {
                     CommonPage.Instance.FailureToServer();
diff --git a/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs b/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs
index d23f24b..38323c9 100755
--- a/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs
+++ b/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs
@@ -101,21 +101,21 @@
                 HomePage.Instance.ShowLoginLoadView();
                 CommonPage.Loading.Start(Language.StringByID(R.MyInternationalizationString.Logining));
                 
-                HdlThreadLogic.Current.RunThread(async () =>
+                HdlThreadLogic.Current.RunThread(() =>
                 {
                     //璐﹀彿瀵嗙爜鐧婚檰
-                    var loginSuccess = await HomePage.Instance.LoginByPWDAsync(account, password);
+                    var loginSuccess = HomePage.Instance.LoginByPWDAsync(account, password);
                     if (loginSuccess == 1)
                     {
                         if (string.IsNullOrEmpty(OpenID) == false)
                         {
                             //缁戝畾绗笁鏂�
-                            await BindAuthUser(Config.Instance.Guid, OpenID);
+                            BindAuthUser(Config.Instance.Guid, OpenID);
                         }
-                        var homes = await HdlResidenceLogic.Current.GetHomeListsFromDb();
+                        var homes = HdlResidenceLogic.Current.GetHomeListsFromDb();
 
                         //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                        await UserCenterLogic.InitUserCenterMenmoryAndThread();
+                        UserCenterLogic.InitUserCenterMenmoryAndThread();
                         //鍚姩ZigBee
                         ZigBee.Common.Application.Init();
 
@@ -153,14 +153,14 @@
         /// </summary>
         /// <param name="guid"></param>
         /// <param name="openId"></param>
-        private async System.Threading.Tasks.Task BindAuthUser(string guid, string openId)
+        private void BindAuthUser(string guid, string openId)
         {
             var auth = new SendDataToServer.BindAuthUser();
             auth.AccountGuid = guid;
             auth.OpenID = openId;
 
             var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(auth);
-            await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/BindAuthUserToAccount", Encoding.UTF8.GetBytes(requestJson));
+            CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/BindAuthUserToAccount", Encoding.UTF8.GetBytes(requestJson));
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/Login/Logic/AccountLogic.cs b/ZigbeeApp/Shared/Phone/Login/Logic/AccountLogic.cs
index c3889ad..639c0a4 100755
--- a/ZigbeeApp/Shared/Phone/Login/Logic/AccountLogic.cs
+++ b/ZigbeeApp/Shared/Phone/Login/Logic/AccountLogic.cs
@@ -127,7 +127,7 @@
         /// <param name="requestUrl">璇锋眰Url</param>
         /// <param name="byteData">璇锋眰鐨勭殑鏁版嵁</param>
         /// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns>
-        public async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> RequestHttpsZigbeeAsync(string requestUrl, byte[] byteData)
+        private async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> RequestHttpsZigbeeAsync(string requestUrl, byte[] byteData)
         {
             string result = await RequestHttpsZigbeeResultAsync(requestUrl, byteData);
             if (result != null)
@@ -152,7 +152,7 @@
         /// <param name="requestUrl">璇锋眰Url</param>
         /// <param name="byteData">璇锋眰鐨勭殑鏁版嵁</param>
         /// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns>
-        public async System.Threading.Tasks.Task<string> RequestHttpsZigbeeResultAsync(string requestUrl, byte[] byteData)
+        private async System.Threading.Tasks.Task<string> RequestHttpsZigbeeResultAsync(string requestUrl, byte[] byteData)
         {
             var result = await RequestHttpsZigbeeBytesResultAsync(requestUrl, byteData);
             if (result != null)
@@ -170,12 +170,12 @@
         /// <param name="byteData">璇锋眰鐨勭殑鏁版嵁</param>
         /// <param name="requestMethod">POST 鎴栬�� GET 绛夌瓑</param>
         /// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns>
-        public async System.Threading.Tasks.Task<byte[]> RequestHttpsZigbeeBytesResultAsync(string requestUrl, byte[] byteData, string requestMethod = "POST")
+        private async System.Threading.Tasks.Task<byte[]> RequestHttpsZigbeeBytesResultAsync(string requestUrl, byte[] byteData, string requestMethod = "POST")
         {
             //璇锋眰Url鐨勫畬鎴愯矾寰�
             var requestHost = "https://global.hdlcontrol.com/GeofenceService";
             var fullUrl = $"{requestHost}/{requestUrl}";
-            return await CommonPage.Instance.DoRequestZigbeeHttpsInterface(fullUrl, byteData, Config.Instance.Token, requestMethod);
+            return CommonPage.Instance.DoRequestZigbeeHttpsInterface(fullUrl, byteData, Config.Instance.Token, requestMethod);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/Login/PhoneZone.cs b/ZigbeeApp/Shared/Phone/Login/PhoneZone.cs
deleted file mode 100755
index 13a0844..0000000
--- a/ZigbeeApp/Shared/Phone/Login/PhoneZone.cs
+++ /dev/null
@@ -1,281 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using Shared.Common;
-
-namespace Shared.Phone.Device.Login
-{
-    public class PhoneZone : UserCenter.FrameLayoutBase
-    {
-        #region 鈼� 鍙橀噺____________________________
-        /// <summary>
-        /// 閫夋嫨鐨勫尯鍙�
-        /// </summary>
-        public Action<string> ActionSelectedZone;
-        /// <summary>
-        /// *****鍗囩骇鍒嗗竷寮忓悗锛孉ccount 浠呭寘鍚墜鏈哄彿锛屼笉鍐嶅寘鍚�00鍖哄彿銆傚瘑鐮佷笉鍐嶉渶瑕丮D5鍔犲瘑銆俵anguage涓篈PP璇�
-        /// 涓嬫潵閫夋嫨鎵嬫満鍖哄彿 榛樿涓浗澶ч檰涓�86
-        ///鍙戦�佸浗闄� / 娓境鍙版秷鎭椂锛屾帴鏀跺彿鐮佹牸寮忎负00 + 鍥介檯鍖哄彿 + 鍙风爜锛屽鈥�008615899998888鈥�   璋冪敤API鏃讹紝Company瀛楁璇蜂紶鍏ユ暣鍨嬪�硷細4銆� 銆�
-        ///鍥藉唴  璋冪敤API鏃讹紝Company瀛楁璇蜂紶鍏ユ暣鍨嬪�硷細0銆�
-        /// </summary>
-        public List<Common.ResponseEntity.AreaCodeOBJ> areaCodeList = new List<Common.ResponseEntity.AreaCodeOBJ>();
-        /// <summary>
-        /// 閫夋嫨鍖哄彿瑙嗗浘
-        /// </summary>
-        private FrameLayout phoneZoneSelectedShowView;
-        /// <summary>
-        /// 鍖哄彿瑙嗗浘
-        /// </summary>
-        private VerticalScrolViewLayout phoneZoneListView;
-		/// <summary>
-		/// tempClickZoneCodeBtn
-		/// </summary>
-		Button tempClickZoneCodeBtn = new Button();
-		/// <summary>
-		/// tempClickZoneNameBtn
-		/// </summary>
-		Button tempClickZoneNameBtn = new Button();
-		/// <summary>
-		/// tempClickZoneItemFL
-		/// </summary>
-		FrameLayout tempClickZoneItemFL = new FrameLayout();
-        #endregion
-        /// <summary>
-        /// PhoneZone
-        /// </summary>
-        public PhoneZone()
-        {
-
-        }
-		/// <summary>
-		/// Show
-		/// </summary>
-		public void Show()
-        {
-            Init();
-        }
-		/// <summary>
-		/// Init
-		/// </summary>
-		private void Init()
-        {
-            CommonPage.Loading.Start();
-            ShowZoneList();
-			new System.Threading.Thread(async () =>
-			{
-				var zoneList = await GetZoneListAsync();
-				if (zoneList == null)
-				{
-					Application.RunOnMainThread(() =>
-					{
-						CommonPage.Loading.Hide();
-
-					});
-				}
-				else
-				{
-					Application.RunOnMainThread(() =>
-					{
-						foreach (var areaCode in zoneList)
-						{
-							AddZone(areaCode, phoneZoneListView);
-						}
-						CommonPage.Loading.Hide();
-					});
-				}
-			})
-			{ IsBackground = true }.Start();
-        }
-        /// <summary>
-        /// GetZoneListAsync
-        /// </summary>
-        /// <returns></returns>
-        private async System.Threading.Tasks.Task<List<Common.ResponseEntity.AreaCodeOBJ>> GetZoneListAsync()
-        {
-            try
-            {
-                var requestOBJ = new SendDataToServer.GetAreaCodeOBJ()
-                {
-                    RequestVersion = CommonPage.RequestVersion
-                };
-                var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestOBJ);
-                var revertOBJ = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/GetAreaCode", System.Text.Encoding.UTF8.GetBytes(requestJson));
-                if (revertOBJ == null)
-                {
-                    return null;
-                }
-                if (revertOBJ.StateCode.ToUpper() == "SUCCESS")
-                {
-
-                    var responseData = revertOBJ.ResponseData;
-                    return Newtonsoft.Json.JsonConvert.DeserializeObject<List<Common.ResponseEntity.AreaCodeOBJ>>(responseData.ToString());
-                }
-                else
-                {
-                    return null;
-                }
-            }
-            catch
-            {
-                return null;
-            }
-        }
-		/// <summary>
-		/// ShowZoneList
-		/// </summary>
-		private void ShowZoneList()
-        {
-            //ZoneListView
-            var phoneZoneDialog = new FrameLayout()
-            {
-                BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
-            };
-            AddChidren(phoneZoneDialog);
-
-            phoneZoneSelectedShowView = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(1342),
-                Width = Application.GetRealWidth(850),
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                Radius = (uint)Application.GetRealHeight(30),
-                Gravity = Gravity.Center
-            };
-            phoneZoneDialog.AddChidren(phoneZoneSelectedShowView);
-
-            var phoneZoneTitle = new Button()
-            {
-                X = Application.GetRealWidth(CommonPage.XLeft),
-                Y = Application.GetRealHeight(69),
-                Height = Application.GetRealHeight(60),
-                Width = Application.GetRealWidth(250),
-                TextID = R.MyInternationalizationString.PleaseSelectAreaCode,
-                TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor,
-                TextAlignment = TextAlignment.CenterLeft
-            };
-            phoneZoneSelectedShowView.AddChidren(phoneZoneTitle);
-
-            var searchBorder = new FrameLayout()
-            {
-                X = phoneZoneTitle.Right + Application.GetRealWidth(CommonPage.XLeft),
-                Y = Application.GetRealHeight(46),
-                Height = Application.GetRealHeight(104),
-                Width = Application.GetRealWidth(400),
-                BorderWidth = 1,
-                BorderColor = ZigbeeColor.Current.GXCBorderColor,
-                Radius = (uint)Application.GetRealHeight(46 / 2)
-            };
-            phoneZoneSelectedShowView.AddChidren(searchBorder);
-
-            var phoneZoneSearch = new EditText()
-            {
-                X = phoneZoneTitle.Right + Application.GetRealWidth(CommonPage.XLeft + 10),
-                Y = Application.GetRealHeight(46),
-                Height = Application.GetRealHeight(104),
-                Width = Application.GetRealWidth(400),
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.Search),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor
-            };
-            phoneZoneSelectedShowView.AddChidren(phoneZoneSearch);
-
-            phoneZoneListView = new VerticalScrolViewLayout()
-            {
-                Y = phoneZoneSearch.Bottom + Application.GetRealHeight(10),
-                Height = Application.GetRealHeight(986),
-            };
-            phoneZoneSelectedShowView.AddChidren(phoneZoneListView);
-
-            var btnOk = new UserCenter.BottomClickButton(668);
-            btnOk.Y = Application.GetRealHeight(1166);
-            btnOk.TextID = R.MyInternationalizationString.Complete;
-            phoneZoneSelectedShowView.AddChidren(btnOk);
-            btnOk.ButtonClickEvent += (sender, e) =>
-            {
-                ActionSelectedZone?.Invoke(CommonPage.PhoneZoneStr);
-                ActionSelectedZone = null;
-                RemoveFromParent();
-            };
-            var cancleBtn = new Button()
-            {
-                Y = Application.GetRealHeight(1719),
-                Height = this.GetPictrueRealSize(86),
-                Width = this.GetPictrueRealSize(86),
-                UnSelectedImagePath = "Account/Cancle.png",
-                Gravity = Gravity.CenterHorizontal
-            };
-            phoneZoneDialog.AddChidren(cancleBtn);
-
-            cancleBtn.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-            };
-        }
-		/// <summary>
-		/// AddZone
-		/// </summary>
-		/// <param name="areaCode"></param>
-		/// <param name="phoneZoneSelectedListView"></param>
-		private void AddZone(Common.ResponseEntity.AreaCodeOBJ areaCode, VerticalScrolViewLayout phoneZoneSelectedListView)
-        {
-            var zoneItemLName = areaCode.Name;
-            var zoneItemLCode = areaCode.Code;
-            var zoneItemFL = new FrameLayout()
-            {
-                Width = phoneZoneSelectedListView.Width,
-                Height = Application.GetRealHeight(110),
-            };
-            phoneZoneSelectedListView.AddChidren(zoneItemFL);
-
-            var zoneItemNameBtn = new Button()
-            {
-                X = Application.GetRealWidth(58),
-                Width = zoneItemFL.Width - Application.GetRealWidth(300),
-                Height = Application.GetRealHeight(110) - 1,
-                Text = zoneItemLName,
-                TextColor = ZigbeeColor.Current.GXCTextColor,
-                SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                TextAlignment = TextAlignment.CenterLeft,
-            };
-            zoneItemFL.AddChidren(zoneItemNameBtn);
-
-            var zoneCode = new Button()
-            {
-                X = Application.GetRealWidth(58) + zoneItemNameBtn.Right,
-                Width = Application.GetRealWidth(150),
-                Height = Application.GetRealHeight(80),
-                Gravity = Gravity.CenterVertical,
-                Text = $"+{zoneItemLCode}",
-                TextAlignment = TextAlignment.CenterRight,
-                TextColor = ZigbeeColor.Current.GXCTextColor,
-                SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor,
-            };
-            zoneItemFL.AddChidren(zoneCode);
-
-            EventHandler<MouseEventArgs> selectedZone = (sender, e) =>
-            {
-                tempClickZoneCodeBtn.IsSelected = false;
-                tempClickZoneNameBtn.IsSelected = false;
-                tempClickZoneItemFL.BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
-                zoneItemNameBtn.IsSelected = true;
-                zoneCode.IsSelected = true;
-                tempClickZoneCodeBtn = zoneCode;
-                tempClickZoneNameBtn = zoneItemNameBtn;
-                tempClickZoneItemFL = zoneItemFL;
-                zoneItemFL.BackgroundColor = ZigbeeColor.Current.GXCRowSelectedColor;
-                CommonPage.PhoneZoneStr = zoneItemLCode;
-            };
-
-            zoneCode.MouseUpEventHandler += selectedZone;
-            zoneItemNameBtn.MouseUpEventHandler += selectedZone;
-            //榛樿
-            if (zoneItemLCode == CommonPage.PhoneZoneStr)
-            {
-                zoneItemNameBtn.IsSelected = true;
-                zoneCode.IsSelected = true;
-                zoneItemFL.BackgroundColor = ZigbeeColor.Current.GXCRowSelectedColor;
-                tempClickZoneCodeBtn = zoneCode;
-                tempClickZoneNameBtn = zoneItemNameBtn;
-                tempClickZoneItemFL = zoneItemFL;
-            }
-        }
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs
index d3cc6fc..921cc7c 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs
@@ -222,35 +222,14 @@
         {
             //璁惧鐘舵�佸繀椤诲埛鏂�
             this.btnStatu.Text = HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device);
-
-            if (this.btnBackGroud.IsSelected == isOpen)
-            {
-                //鐘舵�佷竴鏍�,鍒欎笉闇�瑕佸鐞�
-                return;
-            }
-            //鑳屾櫙鍥剧墖
-            this.btnBackGroud.IsSelected = isOpen;
-            //璁惧鍚嶇О鎺т欢
-            this.btnDeviceName.IsSelected = isOpen;
-            this.btnDeviceName.IsBold = isOpen;
-            //璁惧鐨勮儗鏅渾鍦堝浘
-            if (isOpen == true)
-            {
-                fraDeviceRound.BackgroundColor = Common.ZigbeeColor.Current.GXCForFunctionBackgroundColor;
-            }
-            else
-            {
-                fraDeviceRound.BackgroundColor = Common.ZigbeeColor.Current.GXCForFunctionUnSelectedBackgroundColor;
-            }
-            //璁惧鍥炬爣鎺т欢
-            this.btnDeviceIcon.IsSelected = isOpen;
-            //鐘舵�佹枃鏈帶浠�
-            this.btnStatu.IsSelected = isOpen;
             //寮�鍏虫帶浠�
-            if (btnSwitch != null)
+            if (btnSwitch != null && this.btnSwitch.IsSelected != isOpen)
             {
                 this.btnSwitch.IsSelected = isOpen;
             }
+
+            //鍒囨崲鍗$墖鐘舵�佺壒鏁�
+            this.SwitchCardStatuAppeal(isOpen);
         }
 
         /// <summary>
@@ -428,6 +407,84 @@
 
         #endregion
 
+        #region 鈻� 鍗$墖闂儊鐗规晥_______________________
+
+        /// <summary>
+        /// 鏄惁澶勪簬鐗规晥涓�
+        /// </summary>
+        private bool isAppeal = false;
+        /// <summary>
+        /// 寮�鍚崱鐗囬棯鐑佺壒鏁�
+        /// </summary>
+        public void StartCardLightAppeal()
+        {
+            //璁惧鐘舵�佸繀椤诲埛鏂�
+            this.btnStatu.Text = HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device);
+
+            if (this.isAppeal == true) { return; }
+            this.isAppeal = true;
+
+            HdlThreadLogic.Current.RunThread(() =>
+            {
+                //闂儊5绉�,闂撮殧400姣
+                int count = 5000 / 400;
+                bool isOpen = false;
+                while (this.Parent != null && count >= 0)
+                {
+                    //闂儊鐗规晥
+                    HdlThreadLogic.Current.RunMain(() =>
+                    {
+                        isOpen = !isOpen;
+                        this.SwitchCardStatuAppeal(isOpen);
+                    });
+                    System.Threading.Thread.Sleep(400);
+                    count--;
+                }
+                if (this.Parent != null && isOpen == false)
+                {
+                    HdlThreadLogic.Current.RunMain(() =>
+                    {
+                        //缁撴潫鏃�,榛樿涓烘墦寮�鐗规晥
+                        this.SwitchCardStatuAppeal(true);
+                    }, ShowErrorMode.NO);
+                }
+                this.isAppeal = false;
+
+            }, ShowErrorMode.NO);
+        }
+
+        /// <summary>
+        /// 鍒囨崲鍗$墖鐘舵�佺壒鏁�
+        /// </summary>
+        private void SwitchCardStatuAppeal(bool isOpen)
+        {
+            if (this.btnBackGroud.IsSelected == isOpen)
+            {
+                //鐘舵�佷竴鏍�,鍒欎笉闇�瑕佸鐞�
+                return;
+            }
+            //鑳屾櫙鍥剧墖
+            this.btnBackGroud.IsSelected = isOpen;
+            //璁惧鍚嶇О鎺т欢
+            this.btnDeviceName.IsSelected = isOpen;
+            this.btnDeviceName.IsBold = isOpen;
+            //璁惧鐨勮儗鏅渾鍦堝浘
+            if (isOpen == true)
+            {
+                fraDeviceRound.BackgroundColor = Common.ZigbeeColor.Current.GXCForFunctionBackgroundColor;
+            }
+            else
+            {
+                fraDeviceRound.BackgroundColor = Common.ZigbeeColor.Current.GXCForFunctionUnSelectedBackgroundColor;
+            }
+            //璁惧鍥炬爣鎺т欢
+            this.btnDeviceIcon.IsSelected = isOpen;
+            //鐘舵�佹枃鏈帶浠�
+            this.btnStatu.IsSelected = isOpen;
+        }
+
+        #endregion
+
         #region 鈻� 鎺т欢鎽ф瘉___________________________
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
index ca2af89..c461c90 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -170,7 +170,8 @@
                     selectHouse.Init();
                     selectHouse.HouseAction = (houseId) =>
                     {
-                        ChangeResidence(HdlResidenceLogic.Current.GetHouseByHouseId(houseId));
+                        //鍒囨崲浣忓畢
+                        this.ChangeResidence(HdlResidenceLogic.Current.GetHouseByHouseId(houseId));
                     };
                 }
             };
@@ -1055,36 +1056,21 @@
         /// <param name="home">Home.</param>
         private void ChangeResidence(House home)
         {
-            try
+            HdlThreadLogic.Current.RunThread(() =>
             {
-                CommonPage.Loading.Start();
-                new System.Threading.Thread(async () =>
-                {
-                    Config.Instance.HomeId = home.Id;
-                    Config.Instance.Home = HdlResidenceLogic.Current.GetHouseByHouseId(home.Id);
-                    Global.CreateHomeDirectory(home.Id);
-                    Config.Instance.Save();
-                    //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                    await UserCenterLogic.InitUserCenterMenmoryAndThread();
+                this.ShowProgressBar();
 
-                    Application.RunOnMainThread(() =>
-                    {
-                        //鍒锋柊鐣岄潰
-                        this.ShowForm();
+                //鍒囨崲浣忓畢
+                HdlResidenceLogic.Current.SwitchResidence(home.Id);
 
-                        CommonPage.Loading.Hide();
-                    });
-                })
-                { IsBackground = true }.Start();
-            }
-            catch (Exception ex)
-            {
-                Application.RunOnMainThread(() =>
+                HdlThreadLogic.Current.RunMain(() =>
                 {
-                    CommonPage.Loading.Hide();
-                    Console.WriteLine(ex.Message);
+                    //鍒锋柊鐣岄潰
+                    this.ShowForm();
+
+                    this.CloseProgressBar();
                 });
-            }
+            });
         }
 
         #endregion
@@ -1151,10 +1137,8 @@
                     string mainKeys = LocalDevice.Current.GetDeviceMainKeys(report);
                     if (this.dicDeviceCardControl.ContainsKey(mainKeys) == true)
                     {
-                        //鏈湴璁惧瀵硅薄
-                        var locadevice = LocalDevice.Current.GetDevice(mainKeys);
-                        //鍒锋柊鍗$墖淇℃伅
-                        this.dicDeviceCardControl[mainKeys].RefreshControlInfo(locadevice);
+                        //寮�鍚崱鐗囬棯鐑佺壒鏁�
+                        this.dicDeviceCardControl[mainKeys].StartCardLightAppeal();
                     }
 
                 }, ShowErrorMode.NO);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
index aa44917..6d9e61b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
@@ -219,7 +219,7 @@
 #elif Android
             try
             {
-                var versionResult = await RequestHttpsAndroidAppVersionAsync();
+                var versionResult = RequestHttpsAndroidAppVersionAsync();
                 if (versionResult == null)
                 {
                     return false;
@@ -255,7 +255,7 @@
                 };
                 var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj);
 
-                var bytesTotalLengthResult = await CommonPage.Instance.RequestHttpsZigbeeAsync("FirmwareMana/DownloadPlatformUploadFirmwarePreLength", Encoding.UTF8.GetBytes(requestJson));
+                var bytesTotalLengthResult = CommonPage.Instance.RequestHttpsZigbeeAsync("FirmwareMana/DownloadPlatformUploadFirmwarePreLength", Encoding.UTF8.GetBytes(requestJson));
                 if (bytesTotalLengthResult == null || bytesTotalLengthResult.ResponseData == null)
                 {
                     CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.UpdateAppFail);
@@ -354,7 +354,7 @@
         /// 鑾峰彇 Android-APP 鐗堟湰淇℃伅
         /// </summary>
         /// <returns>The https app version async.</returns>
-        private async System.Threading.Tasks.Task<Common.ResponseEntity.ApkInfoOBJ> RequestHttpsAndroidAppVersionAsync()
+        private Common.ResponseEntity.ApkInfoOBJ RequestHttpsAndroidAppVersionAsync()
         {
             try
             {
@@ -364,7 +364,7 @@
                     RequestVersion = CommonPage.CodeIDString
                 };
                 var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestOBJ);
-                var result = await CommonPage.Instance.RequestHttpsZigbeeAsync("FirmwareMana/DetectionPlatformUploadFirmware", System.Text.Encoding.UTF8.GetBytes(requestJson));
+                var result = CommonPage.Instance.RequestHttpsZigbeeAsync("FirmwareMana/DetectionPlatformUploadFirmware", System.Text.Encoding.UTF8.GetBytes(requestJson));
                 if (result == null)
                 {
                     return null;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Abount/SLAForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Abount/SLAForm.cs
index 8853572..1c2e460 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Abount/SLAForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Abount/SLAForm.cs
@@ -23,10 +23,10 @@
         {
             //鎵撳紑杩涘害鏉�
             this.ShowProgressBar();
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 var strUrl = "https://hdlcontrol.com/%E6%B2%B3%E4%B8%9C%E9%9A%90%E7%A7%81%E6%9D%83%E6%94%BF%E7%AD%9620200331.txt";
-                var byteData = await Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(strUrl, null, null, "GET");
+                var byteData = Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(strUrl, null, null, "GET");
                 if (byteData == null)
                 {
                     this.CloseProgressBar(ShowReLoadMode.YES);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
index c69f370..936bcae 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
@@ -1304,6 +1304,10 @@
         /// 鑷姩鍖栧父寮�鏃堕棿鍙樻洿涓哄垎閽�,鑰屼笉鏄皬鏃� 1->寮哄埗鍙樻洿涓哄垎閽�
         /// </summary>
         public int DoorLockNomallyOpenTimeMode = 0;
+        /// <summary>
+        /// 鏄惁灏嗗彂閫佸強鎺ユ敹鍒扮殑鏁版嵁鍐欏叆鍒癓og涓� 1->鍐欏叆
+        /// </summary>
+        public int WriteSendAndReceveDataToFile = 0;
     }
     #endregion
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressBar.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressBar.cs
index a652601..7edeaa4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressBar.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressBar.cs
@@ -38,13 +38,13 @@
         public static void Show(string text = "")
         {
             m_value = 0;
-            Application.RunOnMainThread(() =>
+            HdlThreadLogic.Current.RunMain(() =>
             {
                 if (Common.CommonPage.Loading.Visible == false && notShow == false)
                 {
                     Common.CommonPage.Loading.Start(text);
                 }
-            });
+            }, ShowErrorMode.NO);
         }
 
         /// <summary>
@@ -58,8 +58,8 @@
             if (coerce == true)
             {
                 notClose = false;
-            }
-            Application.RunOnMainThread(() =>
+            }
+            HdlThreadLogic.Current.RunMain(() =>
             {
                 if (Common.CommonPage.Loading.Visible == true && notClose == false)
                 {
@@ -67,8 +67,8 @@
                     notShow = false;
                     notClose = false;
                     notSetValue = false;
-                }
-            });
+                }
+            }, ShowErrorMode.NO);
         }
 
         /// <summary>
@@ -113,12 +113,12 @@
             if (notSetValue == true)
             {
                 return;
-            }
-            Application.RunOnMainThread(() =>
+            }
+            HdlThreadLogic.Current.RunMain(() =>
             {
                 //loading.Text = text;
-                Common.CommonPage.Loading.Text = text + appendText;
-            });
+                Common.CommonPage.Loading.Text = text + appendText;
+            }, ShowErrorMode.NO);
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs
index 5609b22..cc6932b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs
@@ -160,27 +160,60 @@
                 return;
             }
             this.sensorPushing = true;
-            //璁惧
-            uint oldTextColor1 = btnDeviceName.TextColor;
-            btnDeviceName.TextColor = UserCenterColor.Current.TextOrangeColor;
-            //璁惧鎴块棿
-            uint oldTextColor2 = btnDeviceRoom.TextColor;
-            btnDeviceRoom.TextColor = UserCenterColor.Current.TextOrangeColor;
+
             HdlThreadLogic.Current.RunThread(() =>
             {
-                System.Threading.Thread.Sleep(5000);
-                HdlThreadLogic.Current.RunMain(() =>
+                //闂儊5绉�,闂撮殧400姣
+                int count = 5000 / 400;
+                bool isOpen = false;
+                while (this.Parent != null && count >= 0)
                 {
-                    if (btnDeviceName.Parent != null)
+                    //闂儊鐗规晥
+                    HdlThreadLogic.Current.RunMain(() =>
                     {
-                        //璁惧
-                        btnDeviceName.TextColor = oldTextColor1;
-                        //璁惧鎴块棿
-                        btnDeviceRoom.TextColor = oldTextColor2;
-                    }
-                    this.sensorPushing = false;
-                }, ShowErrorMode.NO);
-            });
+                        isOpen = !isOpen;
+                        this.SwitchRowStatuAppeal(isOpen);
+                    }, ShowErrorMode.NO);
+                    System.Threading.Thread.Sleep(400);
+                    count--;
+                }
+                if (this.Parent != null && isOpen == true)
+                {
+                    HdlThreadLogic.Current.RunMain(() =>
+                    {
+                        //缁撴潫鏃�,榛樿涓烘棤鐗规晥
+                        this.SwitchRowStatuAppeal(false);
+                    }, ShowErrorMode.NO);
+                }
+                this.sensorPushing = false;
+
+            }, ShowErrorMode.NO);
+        }
+
+        /// <summary>
+        /// 鍒囨崲琛岄棯鐑佺壒鏁�
+        /// </summary>
+        /// <param name="isOpen"></param>
+        private void SwitchRowStatuAppeal(bool isOpen)
+        {
+            if (isOpen == true)
+            {
+                //鍥炬爣
+                btnIcon.IsSelected = true;
+                //璁惧
+                btnDeviceName.TextColor = UserCenterColor.Current.TextOrangeColor;
+                //璁惧鎴块棿
+                btnDeviceRoom.TextColor = UserCenterColor.Current.TextOrangeColor;
+            }
+            else
+            {
+                //鍥炬爣
+                btnIcon.IsSelected = false;
+                //璁惧
+                btnDeviceName.TextColor = UserCenterColor.Current.TextColor1;
+                //璁惧鎴块棿
+                btnDeviceRoom.TextColor = UserCenterColor.Current.TextGrayColor1;
+            }
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs
index 77406ae..d3beaca 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs
@@ -63,13 +63,13 @@
             }
             ControlCommonResourse.ReadMessageAgain = false;
 
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 string nowHomeId = Common.Config.Instance.Home.Id;
                 var pra = new MessageInfoPra();
                 pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-                var result = await UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", false, pra, new List<string>() { "NotSetAgain", "NotCheck" });
+                var result = UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", false, pra, new List<string>() { "NotCheck" });
                 if (string.IsNullOrEmpty(result) == true)
                 {
                     //鍑洪敊锛岄渶瑕侀噸鏂拌鍙�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/AreaCodeSelectForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/AreaCodeSelectForm.cs
index cb8e6e2..2b6a909 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/AreaCodeSelectForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/AreaCodeSelectForm.cs
@@ -111,7 +111,7 @@
         /// <summary>
         /// 鍒濆鍖栧湴鍖哄垪琛�
         /// </summary>
-        private async void InitAreaList()
+        private void InitAreaList()
         {
             if (listAreaCode == null)
             {
@@ -121,10 +121,10 @@
 
                 //鑾峰彇鍏ㄩ儴鐨勫湴鍖轰唬鐮佸垪琛�
                 var Pra = new { Common.CommonPage.RequestVersion };
-                string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetAreaCode", false, Pra);
+                string result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetAreaCode", false, Pra);
                 //鍏抽棴杩涘害鏉�
                 ProgressBar.Close();
-                if (result == null)
+                if (string.IsNullOrEmpty(result) == true)
                 {
                     return;
                 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlACZbGatewayUpdateLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlACZbGatewayUpdateLogic.cs
index 4db67ff..4d96275 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlACZbGatewayUpdateLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlACZbGatewayUpdateLogic.cs
@@ -173,7 +173,7 @@
 
             //涓嬭浇鍥轰欢璧勬簮
             var pra = new { RequestVersion = Common.CommonPage.RequestVersion, DistributedMark = this.deviceFirmware.DistributedMark };
-            this.deviceFirmwareByte = await Common.CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync("FirmwareMana/DownloadPlatformUploadFirmware", Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(pra)));
+            this.deviceFirmwareByte = Common.CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync("FirmwareMana/DownloadPlatformUploadFirmware", Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(pra)));
             if (this.deviceFirmwareByte == null)
             {
                 //璁惧鍥轰欢璧勬簮涓嬭浇澶辫触
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs
index 88b24d8..b892c60 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs
@@ -309,6 +309,10 @@
                 return null;
             }
             IASZone iASZone = (IASZone)i_device;
+            if (iASZone.iASInfo == null)
+            {
+                return null;
+            }
 
             var alarmInfo = new IASZoneReportInfo();
             if (iASZone.iASInfo.Battery == 1)
@@ -323,11 +327,11 @@
             }
 
             //杩愬姩浼犳劅鍣�
-            if (device.IasDeviceType == 13)
+            if (device.IasDeviceType == 13 || device.IasDeviceType == 541)
             {
                 if (iASZone.iASInfo.Alarm1 == 1)
                 {
-                    //鏈変笉鏄庣墿浣撶粡杩�
+                    //鏈変汉缁忚繃
                     alarmInfo.AlarmMsg = Language.StringByID(R.MyInternationalizationString.uHadUnKnowObjectPassed);
                 }
             }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
index e855dda..9215637 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
@@ -22,10 +22,10 @@
         /// 鎵ц涓婁紶鑷姩澶囦唤鏁版嵁(0:娌℃湁鍙笂浼犵殑鑷姩澶囦唤鏁版嵁 1:鎴愬姛 -1锛氬け璐�)
         /// </summary>
         /// <returns></returns>
-        public async static Task<int> DoUpLoadAutoBackupData()
+        public static int DoUpLoadAutoBackupData()
         {
             //鑾峰彇app鐨勮嚜鍔ㄥ浠�
-            var data = await HdlBackupLogic.Current.GetBackupListNameFromDB(1);
+            var data = HdlBackupLogic.Current.GetBackupListNameFromDB(1);
             if (data == null)
             {
                 return -1;
@@ -63,7 +63,7 @@
             ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uBackupFileUploading));
 
             //涓婁紶鏂囦欢鍒颁簯绔�
-            bool result = await UpLoadBackupFileToDB(listEditor);
+            bool result = UpLoadBackupFileToDB(listEditor);
             if (result == false)
             {
                 ProgressFormBar.Current.Close();
@@ -71,7 +71,7 @@
             }
 
             //鍒犻櫎鏂囦欢
-            result = await DoDeleteFileFromDB(listDelete);
+            result = DoDeleteFileFromDB(listDelete);
             if (result == false)
             {
                 ProgressFormBar.Current.Close();
@@ -88,7 +88,7 @@
         /// </summary>
         /// <param name="listFile"></param>
         /// <returns></returns>
-        private async static Task<bool> UpLoadBackupFileToDB(List<string> listFile)
+        private static bool UpLoadBackupFileToDB(List<string> listFile)
         {
             int listFileCount = listFile.Count;
             string backUpDir = System.IO.Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupDirectory);
@@ -106,7 +106,7 @@
                 list.Add(datainfo);
 
                 //鎵ц鏄笂浼�
-                bool falge = await DoUpLoadInfoToDB(list);
+                bool falge = DoUpLoadInfoToDB(list);
                 if (falge == false)
                 {
                     return false;
@@ -122,7 +122,7 @@
         /// </summary>
         /// <param name="listData">鍒犻櫎鐨勬枃浠�</param>
         /// <returns></returns>
-        private async static Task<bool> DoDeleteFileFromDB(List<string> listData)
+        private static bool DoDeleteFileFromDB(List<string> listData)
         {
             if (listData.Count == 0)
             {
@@ -130,7 +130,7 @@
             }
 
             //鑾峰彇app鐨勮嚜鍔ㄥ浠�
-            var data = await HdlBackupLogic.Current.GetBackupListNameFromDB(1);
+            var data = HdlBackupLogic.Current.GetBackupListNameFromDB(1);
             if (data == null || data.Count == 0)
             {
                 return true;
@@ -146,7 +146,7 @@
             //鑾峰彇鎺у埗涓讳汉璐﹀彿鐨凾oken
             upData.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-            bool falge = await UserCenterLogic.GetResultStatuByRequestHttps("App/DeleteAppBackupFile", true, upData);
+            bool falge = UserCenterLogic.GetResultStatuByRequestHttps("App/DeleteAppBackupFile", true, upData);
             if (falge == false)
             {
                 return false;
@@ -168,7 +168,7 @@
         /// </summary>
         /// <param name="listData">涓婁紶鐨勬暟鎹�</param>
         /// <returns></returns>
-        private async static Task<bool> DoUpLoadInfoToDB(List<FileInfoData> listData)
+        private static bool DoUpLoadInfoToDB(List<FileInfoData> listData)
         {
             var nowZigbeeNumHomeId = Shared.Common.Config.Instance.Home.Id;
 
@@ -178,7 +178,7 @@
             //鑾峰彇鎺у埗涓讳汉璐﹀彿鐨凾oken
             upData.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-            bool falge = await UserCenterLogic.GetResultStatuByRequestHttps("App/HomeAppAutoDataBackup", true, upData);
+            bool falge = UserCenterLogic.GetResultStatuByRequestHttps("App/HomeAppAutoDataBackup", true, upData, null, true);
             if (falge == false)
             {
                 return false;
@@ -341,7 +341,7 @@
         /// 鍚屾浜戠鏁版嵁(浠呴檺APP鍚姩涔嬪悗) -1锛氬紓甯�   0:宸茬粡鍚屾杩囷紝涓嶉渶瑕佸悓姝�  1锛氭甯稿悓姝�  2:娌℃湁鑷姩澶囦唤鏁版嵁
         /// </summary>
         /// <returns></returns>
-        public static async Task<int> SynchronizeDbAutoBackupData()
+        public static int SynchronizeDbAutoBackupData()
         {
             //鍒ゆ柇鏄惁鑳藉鍚屾鏁版嵁
             string checkFile = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoDownLoadBackupCheckFile);
@@ -349,7 +349,7 @@
             if (System.IO.File.Exists(checkFile) == true)
             {
                 //鍚屾鏈嶅姟鍣ㄧ殑鍒嗕韩鍐呭
-                await HdlShardLogic.Current.SynchronizeDbSharedContent();
+                HdlShardLogic.Current.SynchronizeDbSharedContent();
                 return 0;
             }
 
@@ -357,7 +357,7 @@
             if (UserCenterResourse.UserInfo.AuthorityNo == 3)
             {
                 //鍚屾鏈嶅姟鍣ㄧ殑鍒嗕韩鍐呭
-                await HdlShardLogic.Current.SynchronizeDbSharedContent();
+                HdlShardLogic.Current.SynchronizeDbSharedContent();
                 //鍒涘缓涓�涓┖鏂囦欢(鏍囪瘑宸茬粡瀹屾垚鍚屾)
                 var file = System.IO.File.Create(checkFile);
                 file.Close();
@@ -365,7 +365,7 @@
             }
 
             //鑾峰彇app鐨勮嚜鍔ㄥ浠�
-            var data = await HdlBackupLogic.Current.GetBackupListNameFromDB(1);
+            var data = HdlBackupLogic.Current.GetBackupListNameFromDB(1);
             if (data == null)
             {
                 return -1;
@@ -373,7 +373,7 @@
             if (data.Count == 0)
             {
                 //鍚屾鏈嶅姟鍣ㄧ殑鍒嗕韩鍐呭
-                await HdlShardLogic.Current.SynchronizeDbSharedContent();
+                HdlShardLogic.Current.SynchronizeDbSharedContent();
                 //鍒涘缓涓�涓┖鏂囦欢(鏍囪瘑宸茬粡瀹屾垚鍚屾)
                 var file = System.IO.File.Create(checkFile);
                 file.Close();
@@ -387,7 +387,7 @@
             ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uAccountDataIsSynchronizing));
 
             //浠庝簯绔幏鍙栧浠界殑鏂囦欢锛岀劧鍚庡瓨鍏ユ湰鍦版寚瀹氱殑涓存椂鏂囦欢澶�
-            string tempDir = await HdlBackupLogic.Current.GetBackFileFromDBAndSetToLocation(backId);
+            string tempDir = HdlBackupLogic.Current.GetBackFileFromDBAndSetToLocation(backId);
             if (tempDir == null)
             {
                 //鍒犻櫎妫�娴嬫枃浠�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
index 7a1f143..b966e9a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
@@ -5,7 +5,6 @@
 using System.IO;
 using System.Net;
 using System.Text;
-using System.Threading.Tasks;
 
 namespace Shared.Phone.UserCenter
 {
@@ -46,7 +45,7 @@
         /// <param name="ZigbeeUniqueId">缃戝叧鐨勫敮涓�Id,鑾峰彇缃戝叧澶囦唤闇�瑕�</param>
         /// <param name="getOptionBackup">鏄惁鑾峰彇鍔熻兘澶囦唤</param>
         /// <returns></returns>
-        public async Task<List<BackupListNameInfo>> GetBackupListNameFromDB(int ZigbeeBackupType = 0, string ZigbeeUniqueId = null, bool getOptionBackup = false)
+        public List<BackupListNameInfo> GetBackupListNameFromDB(int ZigbeeBackupType = 0, string ZigbeeUniqueId = null, bool getOptionBackup = false)
         {
             //澶囦唤鍚嶅瓧寰堝皯鐨勫唴瀛橈紝鍙互鐩存帴涓�娆℃�у叏閮ㄥ彇瀹�
             var pra = new GetBackupListPra();
@@ -58,8 +57,7 @@
             pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
             //璁块棶鎺ュ彛
-            var listNotShow = new List<string>() { "NotSetAgain" };
-            string result = await UserCenterLogic.GetResponseDataByRequestHttps("App/GetHomeDataBackupPagger", true, pra, listNotShow);
+            string result = UserCenterLogic.GetResponseDataByRequestHttps("App/GetHomeDataBackupPagger", true, pra);
             if (string.IsNullOrEmpty(result) == true)
             {
                 return null;
@@ -91,7 +89,7 @@
         /// <param name="IsGatewayAutoBackup">褰撳墠鑾峰彇鏄惁涓虹綉鍏宠嚜鍔ㄥ浠�</param>
         /// <param name="ZigbeeUniqueId">ZigbeeUniqueId 缃戝叧鐨勫敮涓�Id(褰揑sGatewayBackup=true鏃讹紝姝ゅ弬鏁板繀椤绘彁渚�</param>
         /// <returns></returns>
-        public async Task<string> GetBackFileFromDBAndSetToLocation(string BackupClassId, bool IsGatewayAutoBackup = false, string ZigbeeUniqueId = null)
+        public string GetBackFileFromDBAndSetToLocation(string BackupClassId, bool IsGatewayAutoBackup = false, string ZigbeeUniqueId = null)
         {
             //涓嶅厑璁告寜绯荤粺鐨勮繑鍥為敭
             Shared.Common.CommonPage.BackKeyCanClick = false;
@@ -102,7 +100,7 @@
             Global.CreateEmptyDirectory(newDir, true);
 
             //鑾峰彇杩欎釜澶囦唤涓嬮潰鏈夊灏戜釜鏂囦欢
-            List<string> listFile = await GetBackFileIDFromDB(BackupClassId, IsGatewayAutoBackup, ZigbeeUniqueId);
+            List<string> listFile = GetBackFileIDFromDB(BackupClassId, IsGatewayAutoBackup, ZigbeeUniqueId);
             if (listFile == null)
             {
                 //鍏抽棴杩涘害鏉�
@@ -138,7 +136,7 @@
 
                 //鈽呰缃渶瑕佽幏鍙栫殑鏂囦欢鍚嶅瓧鈽�
                 pra.BackupFileName = fileName;
-                var result = await UserCenterLogic.GetByteResponseDataByRequestHttps("App/DownloadSomeDataBackup", true, pra);
+                var result = UserCenterLogic.GetByteResponseDataByRequestHttps("App/DownloadSomeDataBackup", true, pra, null, true);
                 if (result == null)
                 {
                     //鍏抽棴杩涘害鏉�
@@ -169,7 +167,7 @@
         /// <param name="IsGatewayAutoBackup">褰撳墠鑾峰彇鏄惁涓虹綉鍏宠嚜鍔ㄥ浠�</param>
         /// <param name="ZigbeeUniqueId">ZigbeeUniqueId 缃戝叧鐨勫敮涓�Id(褰揑sGatewayBackup=true鏃讹紝姝ゅ弬鏁板繀椤绘彁渚�</param>
         /// <returns></returns>
-        private async Task<List<string>> GetBackFileIDFromDB(string BackupClassId, bool IsGatewayAutoBackup, string ZigbeeUniqueId)
+        private List<string> GetBackFileIDFromDB(string BackupClassId, bool IsGatewayAutoBackup, string ZigbeeUniqueId)
         {
             var pra = new LoadBackInfoPra();
             pra.BackupClassId = BackupClassId;
@@ -181,8 +179,8 @@
             pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
             //棣栧厛鍏堣幏鍙栦簯绔湁浠�涔堟枃浠�
-            string result = await UserCenterLogic.GetResponseDataByRequestHttps("App/GetHomeDataBackupUploadListPagger", true, pra);
-            if (result == null)
+            string result = UserCenterLogic.GetResponseDataByRequestHttps("App/GetHomeDataBackupUploadListPagger", true, pra);
+            if (string.IsNullOrEmpty(result) == true)
             {
                 return null;
             }
@@ -208,7 +206,7 @@
         /// <param name="ManualBackupType">鎵嬪姩澶囦唤绫诲瀷(0:App鎵嬪姩澶囦唤,2锛氱綉鍏虫墜鍔ㄥ浠�)</param>
         /// <param name="ZigbeeUniqueId">缃戝叧鐨勫敮涓�Id,褰揗anualBackupType=2鏃�,姝ゅ�间笉鑳戒负绌�!</param>
         /// <returns></returns>
-        public async Task<string> CreatNewBackupNameToDB(string backupName, int ManualBackupType = 0, string ZigbeeUniqueId = null)
+        public string CreatNewBackupNameToDB(string backupName, int ManualBackupType = 0, string ZigbeeUniqueId = null)
         {
             var pra = new AddBackUpNamePra();
             pra.BackupName = backupName;
@@ -217,8 +215,8 @@
             //鑾峰彇鎺у埗涓讳汉璐﹀彿鐨凾oken
             pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-            var result = await UserCenterLogic.GetResponseDataByRequestHttps("App/AddHomeAppGatewayName", true, pra);
-            if (result == null)
+            var result = UserCenterLogic.GetResponseDataByRequestHttps("App/AddHomeAppGatewayName", true, pra);
+            if (string.IsNullOrEmpty(result) == true)
             {
                 return null;
             }
@@ -239,7 +237,7 @@
         /// <param name="upPath">鎸囧畾涓婁紶鐨勬槸鍝釜鏂囦欢澶圭殑鏂囦欢(鍏ㄨ矾寰�),涓嶆寚瀹氭椂锛屼笂浼犵殑鏄湰鍦拌矾寰勪笅鐨勬枃浠�</param>
         /// <param name="showBar">鏄惁璁剧疆鏄剧ず杩涘害鏉�</param>
         /// <returns></returns>
-        public async Task<bool> UpLoadBackupFileToDB(string BackupClassId, int ManualBackupType = 0, string upPath = "", bool showBar = true)
+        public bool UpLoadBackupFileToDB(string BackupClassId, int ManualBackupType = 0, string upPath = "", bool showBar = true)
         {
             List<string> listAllFile = null;
             //鏂囦欢澶圭殑鍏ㄨ矾寰�
@@ -319,7 +317,7 @@
                 list.Add(datainfo);
 
                 //鎵ц涓婁紶
-                bool falge = await DoUpLoadInfoToDB(BackupClassId, list, ManualBackupType);
+                bool falge = DoUpLoadInfoToDB(BackupClassId, list, ManualBackupType);
                 if (falge == false)
                 {
                     //鍏抽棴杩涘害鏉�
@@ -381,7 +379,7 @@
         /// <param name="listData">涓婁紶鐨勬暟鎹�</param>
         /// <param name="ManualBackupType">鎵嬪姩澶囦唤绫诲瀷(0:App鎵嬪姩澶囦唤,2锛氱綉鍏虫墜鍔ㄥ浠�)</param>
         /// <returns></returns>
-        private async Task<bool> DoUpLoadInfoToDB(string BackupClassId, List<FileInfoData> listData, int ManualBackupType = 0)
+        private bool DoUpLoadInfoToDB(string BackupClassId, List<FileInfoData> listData, int ManualBackupType = 0)
         {
             var upData = new UpLoadDataPra();
             upData.ManualBackupType = ManualBackupType;
@@ -390,7 +388,7 @@
             //鑾峰彇鎺у埗涓讳汉璐﹀彿鐨凾oken
             upData.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-            bool falge = await UserCenterLogic.GetResultStatuByRequestHttps("App/UploadHomeAppGatewaySubFiles", true, upData);
+            bool falge = UserCenterLogic.GetResultStatuByRequestHttps("App/UploadHomeAppGatewaySubFiles", true, upData, null, true);
             if (falge == false)
             {
                 return false;
@@ -529,7 +527,7 @@
         /// 涓婁紶Log澶囦唤(闅愬尶鍔熻兘)
         /// </summary>
         /// <returns></returns>
-        public async Task<bool> UpLoadLogBackup()
+        public bool UpLoadLogBackup()
         {
             string upPath = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.LogDirectory);
             if (HdlAutoBackupLogic.GetFileFromDirectory(upPath).Count == 0)
@@ -542,7 +540,7 @@
             ProgressFormBar.Current.SetMsg("姝e湪涓婁紶Log鏂囦欢");
 
             //浠庝簯绔幏鍙栨暟鎹�
-            var pageData = await HdlBackupLogic.Current.GetBackupListNameFromDB(0, null, true);
+            var pageData = HdlBackupLogic.Current.GetBackupListNameFromDB(0, null, true);
             if (pageData == null)
             {
                 ProgressFormBar.Current.Close();
@@ -561,7 +559,7 @@
             if (backId == string.Empty)
             {
                 //鍒涘缓鏂扮殑澶囦唤
-                backId = await HdlBackupLogic.Current.CreatNewBackupNameToDB(DirNameResourse.OptionBackupName);
+                backId = HdlBackupLogic.Current.CreatNewBackupNameToDB(DirNameResourse.OptionBackupName);
                 if (backId == null)
                 {
                     ProgressFormBar.Current.Close();
@@ -569,7 +567,7 @@
                 }
             }
             //涓婁紶Log鏂囦欢
-            bool result = await this.UpLoadBackupFileToDB(backId, 0, upPath, false);
+            bool result = this.UpLoadBackupFileToDB(backId, 0, upPath, false);
             if (result == true)
             {
                 try
@@ -606,7 +604,7 @@
         /// 璇诲彇闅愬尶鍔熻兘閰嶇疆(涓嶈鍦ㄦ剰杩斿洖鍊�)
         /// </summary>
         /// <returns></returns>
-        public async Task<bool> LoadHideOption()
+        public bool LoadHideOption()
         {
             //鍏堝垵濮嬪寲
             UserCenterResourse.HideOption = new HideOptionInfo();
@@ -618,7 +616,7 @@
             //鏃犺閿欒
             IMessageCommon.Current.IgnoreError = true;
             //浠庝簯绔幏鍙栨暟鎹�
-            var pageData = await this.GetBackupListNameFromDB(0, null, true);
+            var pageData = this.GetBackupListNameFromDB(0, null, true);
             if (pageData == null)
             {
                 //鎭㈠
@@ -642,7 +640,7 @@
                 return true;
             }
             //鑾峰彇杩欎釜澶囦唤涓嬮潰鏈夊灏戜釜鏂囦欢
-            List<string> listFile = await GetBackFileIDFromDB(backId, false, null);
+            List<string> listFile = GetBackFileIDFromDB(backId, false, null);
             if (listFile == null)
             {
                 //鎭㈠
@@ -689,14 +687,14 @@
         /// 璇诲彇APP澶囦唤鏂囨。(鍑芥暟鍐呴儴鏈夎繘搴︽潯)
         /// </summary>
         /// <param name="BackupClassId"></param>
-        public async Task<bool> LoadAppBackupInfo(string BackupClassId)
+        public bool LoadAppBackupInfo(string BackupClassId)
         {
             //鎵撳紑杩涘害鏉� 姝e湪鑾峰彇澶囦唤鏂囦欢鍒楄〃
             ProgressFormBar.Current.Start();
             ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uBackupFileListGetting));
 
             //浠庝簯绔幏鍙栧浠界殑鏂囦欢锛岀劧鍚庡瓨鍏ユ湰鍦扮殑涓存椂鏂囦欢澶�
-            string tempDirectory = await GetBackFileFromDBAndSetToLocation(BackupClassId);
+            string tempDirectory = GetBackFileFromDBAndSetToLocation(BackupClassId);
             if (tempDirectory == null)
             {
                 //鍏抽棴杩涘害鏉�
@@ -730,14 +728,14 @@
         /// </summary>
         /// <param name="BackupClassId">澶囦唤鐨勪富閿�</param>
         /// <returns></returns>
-        public async Task<bool> DeleteDbBackupData(string BackupClassId)
+        public bool DeleteDbBackupData(string BackupClassId)
         {
             var Pra = new LoadBackInfoPra();
             Pra.BackupClassId = BackupClassId;
             //鑾峰彇鎺у埗涓讳汉璐﹀彿鐨凾oken
             Pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-            bool success = await UserCenterLogic.GetResultStatuByRequestHttps("App/DelHomeAppGatewayName", true, Pra);
+            bool success = UserCenterLogic.GetResultStatuByRequestHttps("App/DelHomeAppGatewayName", true, Pra);
 
             return success;
         }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs
index 9f21fd5..b3ade01 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs
@@ -42,11 +42,11 @@
         /// <param name="NormallyOpenContinuedTime">甯稿紑鎸佺画鏃堕棿(1~72灏忔椂 OtherOpenLockMode=9003鐨勬椂鍊欐湁鏁�)</param>
         public void AddDoorHistoryLog(ZigBee.Device.DoorLock i_doorLock, int OtherOpenLockMode, string NormallyOpenContinuedTime)
         {
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鑾峰彇闂ㄩ攣鐨勪富閿甀D
-                var DoorLockId = await this.GetDoorHistoryDoorLockId(i_doorLock);
-                if (DoorLockId == null)
+                var DoorLockId = this.GetDoorHistoryDoorLockId(i_doorLock);
+                if (string.IsNullOrEmpty(DoorLockId) == true)
                 {
                     //缃戠粶涓嶉��
                     return;
@@ -58,9 +58,9 @@
                 pra.OtherOpenLockMode = OtherOpenLockMode;
                 pra.NormallyOpenContinuedTime = NormallyOpenContinuedTime;
 
-                //涓嶄簩娆″彂閫�,涓嶆娴嬮敊璇爜
-                var listCheck = new List<string>() { "NotSetAgain", "NotCheck" };
-                var result = await UserCenterLogic.GetResultStatuByRequestHttps("DoorLock/AddDoorLockHistory", true, pra, listCheck);
+                //涓嶆娴嬮敊璇爜
+                var listCheck = new List<string>() { "NotCheck" };
+                var result = UserCenterLogic.GetResultStatuByRequestHttps("DoorLock/AddDoorLockHistory", true, pra, listCheck);
                 if (result == false)
                 {
                 }
@@ -72,15 +72,15 @@
         /// </summary>
         /// <param name="i_doorLock">闂ㄩ攣瀵硅薄</param>
         /// <returns></returns>
-        private async System.Threading.Tasks.Task<string> GetDoorHistoryDoorLockId(ZigBee.Device.DoorLock i_doorLock)
+        private string GetDoorHistoryDoorLockId(ZigBee.Device.DoorLock i_doorLock)
         {
             var pra = new GetDoorIdPra();
             pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
             pra.DoorLockId = i_doorLock.DeviceAddr + "_" + i_doorLock.DeviceEpoint;
-            //涓嶄簩娆″彂閫�,涓嶆娴嬮敊璇爜
-            var listCheck = new List<string>() { "NotSetAgain", "NotCheck" };
-            var result = await UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/GetDoorLockPager", true, pra, listCheck);
-            if (result == null) { return null; }
+            //涓嶆娴嬮敊璇爜
+            var listCheck = new List<string>() { "NotCheck" };
+            var result = UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/GetDoorLockPager", true, pra, listCheck);
+            if (string.IsNullOrEmpty(result) == true) { return null; }
 
             //濡傛灉宸茬粡鍒涘缓浜�,鍒欎笉鍐嶅垱寤�
             var myData = Newtonsoft.Json.JsonConvert.DeserializeObject<GetListIdResult>(result);
@@ -93,7 +93,7 @@
             var pra2 = new AddDoorPra();
             pra2.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
             pra2.DoorLockId = i_doorLock.DeviceAddr + "_" + i_doorLock.DeviceEpoint;
-            var result2 = await UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/AddDoorLock", true, pra2, listCheck);
+            var result2 = UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/AddDoorLock", true, pra2, listCheck);
             //浜戠鏄洿鎺ヨ繑鍥炲垱寤虹殑涓婚敭瀛楃涓�
             return result2;
         }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs
index c2b0eba..ff85b85 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs
@@ -353,6 +353,15 @@
                     }
                     return Language.StringByID(R.MyInternationalizationString.IASZone_Statu_Normal);
                 }
+                else if (info.ConcreteType == DeviceConcreteType.Sensor_SphericalMotion)
+                {
+                    //鐞冨瀷绉诲姩浼犳劅鍣�
+                    if (ias.iASInfo?.Alarm1 == 1)
+                    {
+                        return Language.StringByID(R.MyInternationalizationString.IASZone_Statu_HavePerson);
+                    }
+                    return Language.StringByID(R.MyInternationalizationString.IASZone_Statu_NoPerson);
+                }
                 else
                 {
                     //鍏朵粬浼犳劅鍣�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFileLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFileLogic.cs
new file mode 100755
index 0000000..d79b5e2
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFileLogic.cs
@@ -0,0 +1,377 @@
+锘縰sing Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+    /// <summary>
+    /// 鏂囦欢鎿嶄綔鐨勯�昏緫
+    /// </summary>
+    public class HdlFileLogic
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 鏂囦欢鎿嶄綔鐨勯�昏緫
+        /// </summary>
+        private static HdlFileLogic m_Current = null;
+        /// <summary>
+        /// 鏂囦欢鎿嶄綔鐨勯�昏緫
+        /// </summary>
+        public static HdlFileLogic Current
+        {
+            get
+            {
+                if (m_Current == null)
+                {
+                    m_Current = new HdlFileLogic();
+                }
+                return m_Current;
+            }
+        }
+        #endregion
+
+        #region 鈻� 鏂囦欢淇濆瓨鍜岃鍙朹____________________
+
+        /// <summary>
+        /// 鏂囦欢淇濆瓨(鏁村ぉ蹇樿,鎵�浠ュ缓涓�涓嚱鏁版潵鐜╃帺)
+        /// </summary>
+        /// <param name="fullName">鍏ㄨ矾寰�</param>
+        /// <param name="obj">闇�瑕佸簭鍒楀寲鐨勪笢瑗�</param>
+        public void SaveFileContent(string fullName, object obj)
+        {
+            var data = JsonConvert.SerializeObject(obj);
+            this.SaveTextToFile(fullName, data);
+        }
+
+        /// <summary>
+        /// 鏂囦欢淇濆瓨(鏁村ぉ蹇樿,鎵�浠ュ缓涓�涓嚱鏁版潵鐜╃帺)
+        /// </summary>
+        /// <param name="fullName">鍏ㄨ矾寰�</param>
+        /// <param name="obj">闇�瑕佸簭鍒楀寲鐨勪笢瑗�</param>
+        public void SaveTextToFile(string fullName, string textValue)
+        {
+            var byteData = Encoding.UTF8.GetBytes(textValue);
+            //鍐欏叆鍐呭
+            System.IO.FileStream fileStream = null;
+            try
+            {
+                fileStream = new System.IO.FileStream(fullName, System.IO.FileMode.Create, System.IO.FileAccess.Write);
+                fileStream.Write(byteData, 0, byteData.Length);
+                fileStream.Flush();
+            }
+            catch { }
+            finally
+            {
+                fileStream?.Close();
+            }
+        }
+
+        /// <summary>
+        /// 璇诲彇鏂囦欢,涓嶉檺鍒朵綇瀹�(鏂囦欢涓嶅瓨鍦ㄨ繑鍥瀗ull,鏁村ぉ蹇樿,鎵�浠ュ缓涓�涓嚱鏁版潵鐜╃帺)
+        /// </summary>
+        /// <param name="fullName">鍏ㄨ矾寰�</param>
+        /// <returns></returns>
+        public string ReadFileTextContent(string fullName)
+        {
+            //璇诲彇鏂囦欢
+            var varByte = this.ReadFileByteContent(fullName);
+            if (varByte == null)
+            {
+                return null;
+            }
+            return Encoding.UTF8.GetString(varByte);
+        }
+
+        /// <summary>
+        /// 璇诲彇鏂囦欢,涓嶉檺鍒朵綇瀹�,鏂囦欢涓嶅瓨鍦ㄨ繑鍥瀗ull
+        /// </summary>
+        /// <param name="fullName">鍏ㄨ矾寰�</param>
+        /// <returns></returns>
+        public byte[] ReadFileByteContent(string fullName)
+        {
+            if (System.IO.File.Exists(fullName) == false)
+            {
+                return null;
+            }
+            System.IO.FileStream fileStream = null;
+            try
+            {
+                fileStream = new System.IO.FileStream(fullName, System.IO.FileMode.Open, System.IO.FileAccess.Read);
+                byte[] array = new byte[fileStream.Length];
+                fileStream.Read(array, 0, array.Length);
+                return array;
+            }
+            catch
+            {
+                return null;
+            }
+            finally
+            {
+                fileStream?.Close();
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 鏂囦欢澶规搷浣滃嚱鏁癬____________________
+
+        /// <summary>
+        /// 鍒涘缓涓�涓枃浠跺す
+        /// </summary>
+        /// <param name="fullDirectory">闇�瑕佸垱寤虹殑鏂囦欢澶瑰叏璺緞</param>
+        /// <param name="clear">濡傛灉鏂囦欢澶瑰瓨鍦紝鏄惁闇�瑕佹竻绌烘枃浠跺す</param>
+        public void CreateDirectory(string fullDirectory, bool clear = false)
+        {
+            if (System.IO.Directory.Exists(fullDirectory) == false)
+            {
+                try
+                {
+                    System.IO.Directory.CreateDirectory(fullDirectory);
+                }
+                catch (Exception ex)
+                {
+                    HdlLogLogic.Current.WriteLog(ex, "鍒涘缓鏂囦欢澶瑰け璐�:" + fullDirectory);
+                }
+            }
+            else if (clear == true)
+            {
+                //濡傛灉瀛樺湪锛屽垯娓呯┖鍏ㄩ儴鏂囦欢
+                var files = System.IO.Directory.GetFiles(fullDirectory);
+                foreach (var file in files)
+                {
+                    this.DeleteFile(file);
+                }
+            }
+        }
+
+        /// <summary>
+        /// 鍒犻櫎鏂囦欢澶�
+        /// </summary>
+        /// <param name="fullDirectory">鏂囦欢澶瑰叏璺緞</param>
+        public void DeleteDirectory(string fullDirectory)
+        {
+            if (System.IO.Directory.Exists(fullDirectory) == true)
+            {
+                try { System.IO.Directory.Delete(fullDirectory, true); }
+                catch (Exception ex)
+                {
+                    HdlLogLogic.Current.WriteLog(ex, "鍒犻櫎鏂囦欢澶瑰け璐�:" + fullDirectory);
+                }
+            }
+        }
+
+        /// <summary>
+        /// 鑾峰彇鎸囧畾鏂囦欢澶归噷闈㈢殑鍏ㄩ儴鏂囦欢 
+        /// </summary>
+        /// <param name="directory">鏂囦欢璺緞锛堝叏鍚嶏級</param>
+        /// <param name="onlyFileName">鍗曠函鍙槸鑾峰彇鏂囦欢鍚嶅瓧,濡傛灉涓篺alse鏃�,灏嗚繑鍥炴枃浠剁殑鍏ㄨ矾寰�</param>
+        /// <returns></returns>
+        public List<string> GetFileFromDirectory(string directory, bool onlyFileName = true)
+        {
+            if (System.IO.Directory.Exists(directory) == false)
+            {
+                return new List<string>();
+            }
+
+            List<string> list = new List<string>();
+            var files = System.IO.Directory.GetFiles(directory);
+            foreach (var file in files)
+            {
+                string fileName = file;
+                if (onlyFileName == true)
+                {
+                    fileName = fileName.Substring(directory.Length + 1);
+                }
+                list.Add(fileName);
+            }
+            return list;
+        }
+
+        /// <summary>
+        /// 灏嗘寚瀹氭枃浠跺す閲岄潰鐨勫叏閮ㄦ枃浠剁Щ鍔ㄥ埌褰撳墠浣忓畢鐨勬枃浠跺す鍐�
+        /// </summary>
+        /// <param name="fulldirectory">鏂囦欢澶瑰叏璺緞</param>
+        /// <param name="deleteDirectory">澶勭悊瀹屼箣鍚庯紝鏄惁鎶婃枃浠跺す鍒犻櫎</param>
+        public void MoveDirectoryFileToHomeDirectory(string fulldirectory, bool deleteDirectory = false)
+        {
+            if (System.IO.Directory.Exists(fulldirectory) == false)
+            {
+                return;
+            }
+
+            var files = System.IO.Directory.GetFiles(fulldirectory);
+            var listFile = new List<string>();
+            foreach (var file in files)
+            {
+                var f = file.Substring(fulldirectory.Length + 1);
+                listFile.Add(f);
+            }
+
+            var rootPath = Common.Config.Instance.FullPath;
+            foreach (var file in listFile)
+            {
+                string oldFile = System.IO.Path.Combine(fulldirectory, file);
+                string newFile = System.IO.Path.Combine(rootPath, file);
+                //绉诲姩鏂囦欢
+                this.MoveFileToDirectory(oldFile, newFile);
+            }
+            if (deleteDirectory == true)
+            {
+                //鍒犻櫎鏂囦欢澶�
+                this.DeleteDirectory(fulldirectory);
+            }
+        }
+
+        /// <summary>
+        /// 灏嗘寚瀹氭枃浠跺す閲岄潰鐨勫叏閮ㄦ枃浠跺鍒跺埌鎸囧畾鐨勬枃浠跺す鍐�
+        /// </summary>
+        /// <param name="fullDirectory">澶嶅埗鍘熸枃浠跺す鍏ㄨ矾寰�</param>
+        /// <param name="targetDirectory">鐩爣鏂囦欢澶瑰叏璺緞</param>
+        public void CopyDirectoryFileToDirectory(string fullDirectory, string targetDirectory)
+        {
+            if (System.IO.Directory.Exists(targetDirectory) == false)
+            {
+                //鍒涘缓鐩爣鏂囦欢澶�
+                this.CreateDirectory(targetDirectory, false);
+            }
+
+            var listFile = this.GetFileFromDirectory(fullDirectory);
+            foreach (var file in listFile)
+            {
+                string oldFile = System.IO.Path.Combine(fullDirectory, file);
+                string newFile = System.IO.Path.Combine(targetDirectory, file);
+                //澶嶅埗鏂囦欢
+                this.CopyFile(oldFile, newFile);
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 鏂囦欢鎿嶄綔鍑芥暟_______________________
+
+        /// <summary>
+        /// 鍒犻櫎鏂囦欢
+        /// </summary>
+        /// <param name="fullName">鏂囦欢鍏ㄥ悕</param>
+        /// <returns></returns>
+        public bool DeleteFile(string fullName)
+        {
+            if (System.IO.File.Exists(fullName) == true)
+            {
+                try
+                {
+                    System.IO.File.Delete(fullName);
+                    return true;
+                }
+                catch { return false; }
+            }
+            return true;
+        }
+
+        /// <summary>
+        /// 绉诲姩鏂囦欢
+        /// </summary>
+        /// <param name="oldFile">鍘熸枃浠�</param>
+        /// <param name="newFile">鐩爣鏂囦欢</param>
+        public void MoveFileToDirectory(string oldFile, string newFile)
+        {
+            if (System.IO.File.Exists(oldFile) == true)
+            {
+                //濡傛灉鐩爣鏂囦欢瀛樺湪,鍒欏垏鎹负澶嶅埗鏂囦欢
+                if (System.IO.File.Exists(newFile) == true)
+                {
+                    this.CopyFile(oldFile, newFile);
+                }
+                try
+                {
+                    System.IO.File.Move(oldFile, newFile);
+                }
+                catch (Exception ex)
+                {
+                    HdlLogLogic.Current.WriteLog(ex, "绉诲姩澶辫触,鍘熸枃浠�:" + oldFile + "\r\n鐩爣鏂囦欢:" + newFile);
+                }
+            }
+        }
+
+        /// <summary>
+        /// 绉诲姩鏂囦欢
+        /// </summary>
+        /// <param name="oldFile">鍘熸枃浠�</param>
+        /// <param name="newFile">鐩爣鏂囦欢</param>
+        public void CopyFile(string oldFile, string newFile)
+        {
+            if (System.IO.File.Exists(oldFile) == true)
+            {
+                try
+                {
+                    System.IO.File.Copy(oldFile, newFile, true);
+                }
+                catch (Exception ex)
+                {
+                    HdlLogLogic.Current.WriteLog(ex, "澶嶅埗澶辫触,鍘熸枃浠�:" + oldFile + "\r\n鐩爣鏂囦欢:" + newFile);
+                }
+            }
+        }
+
+
+        #endregion
+
+        #region 鈻� 鍒犻櫎鏈湴鏂囦欢_______________________
+
+        /// <summary>
+        /// 鍒犻櫎鏈湴鎵�鏈夋枃浠�
+        /// </summary>
+        /// <param name="all">true:鍏ㄩ儴鍒犻櫎(鐢ㄤ簬浣忓畢鍒犻櫎) false:閲嶈鐨勬枃浠朵笉鍒犻櫎</param>
+        public void DeleteAllLocationFile(bool all = true)
+        {
+            string dPath = Common.Config.Instance.FullPath;
+            if (System.IO.Directory.Exists(dPath) == false)
+            {
+                return;
+            }
+
+            //鐒跺悗鑾峰彇鍏ㄩ儴鐨勬枃浠�
+            List<string> listFile = this.GetFileFromDirectory(dPath);
+            foreach (string file in listFile)
+            {
+                if (all == false && IsNotDeleteFile(file) == true)
+                {
+                    //杩欐槸涓嶈兘鍒犻櫎鐨勬枃浠�
+                    continue;
+                }
+                //鍒犻櫎鏂囦欢
+                this.DeleteFile(System.IO.Path.Combine(dPath, file));
+            }
+            //濡傛灉鏄妸鏂囦欢鍏ㄩ儴鍒犻櫎鐨勮瘽锛岄偅涔堟枃浠跺す涔熶竴璧峰垹闄ゆ帀
+            if (all == true)
+            {
+                //鍒犻櫎鏂囦欢澶�
+                System.IO.Directory.Delete(dPath, true);
+            }
+        }
+
+        /// <summary>
+        /// 鍒ゆ柇鏄笉鏄笉搴旇鍒犻櫎鐨勬枃浠�
+        /// </summary>
+        /// <param name="fileName"></param>
+        /// <returns></returns>
+        private bool IsNotDeleteFile(string fileName)
+        {
+            if (fileName == "Config.json")
+            {
+                //涓嶈兘鍒犻櫎Config鏂囦欢
+                return true;
+            }
+            else if (fileName.StartsWith("House_") == true)
+            {
+                //涓嶈兘鍒犻櫎浣忓畢鏂囦欢
+                return true;
+            }
+            return false;
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs
index d98fca7..0bade2f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs
@@ -1,7 +1,6 @@
 锘縰sing System;
 using System.Collections.Generic;
 using System.Text;
-using System.Threading.Tasks;
 
 namespace Shared.Phone.UserCenter
 {
@@ -66,18 +65,18 @@
         #region 鈻� 娣诲姞鍗囩骇鍥轰欢淇℃伅___________________
 
         /// <summary>
-        /// 娣诲姞鍗囩骇鍥轰欢淇℃伅
+        /// 娣诲姞鍗囩骇鍥轰欢淇℃伅 1:姝e父  -1:娌$綉,鑾峰彇涓嶅埌涓滆タ
         /// </summary>
         /// <param name="levelType">鍥轰欢闃剁骇鍒嗙被</param>
         /// <param name="HardwareVersion">纭欢鐗堟湰</param>
         /// <param name="imgType">闀滃儚绫诲瀷</param>
         /// <returns></returns>
-        public async static Task<bool> AddFirmwareVersionInfo(FirmwareLevelType levelType, string HardwareVersion, string imgType)
+        public static int AddFirmwareVersionInfo(FirmwareLevelType levelType, string HardwareVersion, string imgType)
         {
             //妫�娴嬫湰鍦版槸鍚﹀凡缁忔湁杩欎釜缂撳瓨浜�
             if (IsEsixtFirmwareVersionInfo(levelType, HardwareVersion, imgType) == true)
             {
-                return true;
+                return 1;
             }
             var Pra = new GetFirmwareVersionPra();
             Pra.PageSetting.Page = 1;
@@ -90,7 +89,7 @@
                 Pra.FirmwareManaSecondType = 0;
                 Pra.HardwareVersion = HardwareVersion;
                 Pra.DeviceType = imgType;
-                var result = await GetFirmwareVersionAndSetToMemmory(FirmwareLevelType.Linux, Pra);
+                var result = GetFirmwareVersionAndSetToMemmory(FirmwareLevelType.Linux, Pra);
                 return result;
             }
             else if (levelType == FirmwareLevelType.Coordinator)
@@ -100,7 +99,7 @@
                 Pra.FirmwareManaSecondType = 1;
                 Pra.HardwareVersion = HardwareVersion;
                 Pra.DeviceType = imgType;
-                var result = await GetFirmwareVersionAndSetToMemmory(FirmwareLevelType.Coordinator, Pra);
+                var result = GetFirmwareVersionAndSetToMemmory(FirmwareLevelType.Coordinator, Pra);
                 return result;
             }
             else if (levelType == FirmwareLevelType.VirtualDevice)
@@ -110,7 +109,7 @@
                 Pra.FirmwareManaSecondType = 2;
                 Pra.HardwareVersion = HardwareVersion;
                 Pra.DeviceType = imgType;
-                var result = await GetFirmwareVersionAndSetToMemmory(FirmwareLevelType.VirtualDevice, Pra);
+                var result = GetFirmwareVersionAndSetToMemmory(FirmwareLevelType.VirtualDevice, Pra);
                 return result;
             }
             else
@@ -120,29 +119,28 @@
                 Pra.FirmwareManaSecondType = null;
                 Pra.HardwareVersion = HardwareVersion;
                 Pra.DeviceType = imgType;
-                var result = await GetFirmwareVersionAndSetToMemmory(FirmwareLevelType.ZigbeeDevice, Pra);
+                var result = GetFirmwareVersionAndSetToMemmory(FirmwareLevelType.ZigbeeDevice, Pra);
                 return result;
             }
         }
 
         /// <summary>
-        /// 鑾峰彇浜戠鐨勫浐浠讹紝鐒跺悗瀛樺叆缂撳瓨涓�
+        /// 鑾峰彇浜戠鐨勫浐浠讹紝鐒跺悗瀛樺叆缂撳瓨涓� 1:姝e父  -1:娌$綉,鑾峰彇涓嶅埌涓滆タ
         /// </summary>
         /// <param name="levelType"></param>
         /// <param name="pra"></param>
         /// <returns></returns>
-        private async static Task<bool> GetFirmwareVersionAndSetToMemmory(FirmwareLevelType levelType, GetFirmwareVersionPra pra)
+        private static int GetFirmwareVersionAndSetToMemmory(FirmwareLevelType levelType, GetFirmwareVersionPra pra)
         {
-            var listNotShow = new List<string>() { "NotSetAgain" };
-            string resultValue = await UserCenterLogic.GetResponseDataByRequestHttps("FirmwareMana/DetectionPlatformUploadFirmware", false, pra, listNotShow);
+            string resultValue = UserCenterLogic.GetResponseDataByRequestHttps("FirmwareMana/DetectionPlatformUploadFirmware", false, pra);
             if (string.IsNullOrEmpty(resultValue) == true)
             {
-                return false;
+                return -1;
             }
             var verResult = Newtonsoft.Json.JsonConvert.DeserializeObject<FirmwareVersionResult>(resultValue);
             if (verResult.PageData.Count == 0)
             {
-                return true;
+                return 1;
             }
 
             //纭欢鐗堟湰
@@ -199,7 +197,7 @@
                 catch { continue; }
             }
 
-            return true;
+            return 1;
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayBackupLogic.cs
index c7706df..c39db25 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayBackupLogic.cs
@@ -40,16 +40,16 @@
         /// </summary>
         /// <param name="realGateway">鐪熷疄鐗╃悊缃戝叧瀵硅薄</param>
         /// <param name="backupName">闇�瑕佸垱寤虹殑澶囦唤鐨勫悕瀛�</param>
-        public async void DoBackupGateway(ZbGateway realGateway, string backupName)
+        public void DoBackupGateway(ZbGateway realGateway, string backupName)
         {
             //灞曞紑杩涘害鏉�
             ProgressFormBar.Current.Start();
             //鍒涘缓澶囦唤鏂囦欢
             ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uCreatBackupFile));
-            await System.Threading.Tasks.Task.Delay(1000);
+            System.Threading.Thread.Sleep(1000);
 
             //鍒涘缓涓�涓浠藉悕瀛�
-            string backupClassId = await HdlBackupLogic.Current.CreatNewBackupNameToDB(backupName, 2, realGateway.GwId);
+            string backupClassId = HdlBackupLogic.Current.CreatNewBackupNameToDB(backupName, 2, realGateway.GwId);
             if (backupClassId == null)
             {
                 //鍏抽棴杩涘害鏉�
@@ -84,7 +84,7 @@
             if (result == false)
             {
                 //濡傛灉涓婁紶澶辫触鐨勮瘽锛屽氨鎶婂畠鍒犻櫎
-                await HdlBackupLogic.Current.DeleteDbBackupData(backupClassId);
+                HdlBackupLogic.Current.DeleteDbBackupData(backupClassId);
                 //鍏抽棴杩涘害鏉�
                 ProgressFormBar.Current.Close();
                 return;
@@ -653,7 +653,7 @@
             //缃戝叧宸茬粡鎺ユ敹鍒伴噸鍚懡浠�,鎺ヤ笅鏉ュ幓鍒ゆ柇缃戝叧鏄惁閲嶅惎瀹屾垚
             bool gatewatAction = false;
             bool threadAction = true;
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 timeOut = 0;
                 while (gatewatAction == false)
@@ -662,7 +662,7 @@
                     if (timeOut >= 65 && timeOut % 5 == 0)
                     {
                         //5绉掍竴娆�,鍘昏幏鍙栫増鏈�
-                        var data = await HdlGatewayLogic.Current.GetGatewayNewInfoAsync(realGateway, ShowErrorMode.NO);
+                        var data = HdlGatewayLogic.Current.GetGatewayInfo(realGateway, ShowErrorMode.NO);
                         if (data != null)
                         {
                             gatewatAction = true;
@@ -670,7 +670,7 @@
                             break;
                         }
                     }
-                    await System.Threading.Tasks.Task.Delay(1000);
+                    System.Threading.Thread.Sleep(1000);
                     timeOut++;
                     //璁剧疆杩涘害鍊�
                     ProgressFormBar.Current.SetValue(timeOut, 180);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
index 26ed638..e9a6550 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -241,6 +241,9 @@
             {
                 return false;
             }
+            //娣诲姞缃戝叧鐨勮瘽,寮哄埗涓婚〉鍒锋柊
+            UserView.UserPage.Instance.RefreshForm = true;
+
             return true;
         }
 
@@ -324,7 +327,7 @@
             }
 
             //鏇存柊浜戠鏁版嵁搴�
-            int flage1 = await this.SetGatewayIdToDataBase(zbGateway);
+            int flage1 = this.SetGatewayIdToDataBase(zbGateway);
             //寮傚父涔熶笉楦熷畠,0鏄壒娈婂惈涔�
             if (flage1 == 0)
             {
@@ -396,7 +399,7 @@
         /// </summary>
         /// <param name="zbGateway">缃戝叧瀵硅薄</param>
         /// <returns></returns>
-        private async Task<int> SetGatewayIdToDataBase(ZbGateway zbGateway)
+        private int SetGatewayIdToDataBase(ZbGateway zbGateway)
         {
             //璋冪敤鎺ュ彛锛岀粦瀹氱綉鍏�(鍗充娇澶辫触锛屼篃杩斿洖true寰�涓嬭蛋)
             var bindGateway = new BindGatewayPra();
@@ -404,10 +407,8 @@
             //鑾峰彇鎺у埗涓讳汉璐﹀彿鐨凾oken
             bindGateway.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-            //涓嶆樉绀哄凡缁忚缁戝畾杩囩殑淇℃伅,NotSetAgain:鍋囧鏂綉鏃�,涓嶄簩娆″彂閫�
-            List<string> listNotShow = new List<string>() { "NotSetAgain" };
-            var result = await UserCenterLogic.GetResultCodeByRequestHttps("App/BindGatewayToHome", true, bindGateway, listNotShow);
-            if (result == "Error" || result == "ErrorEx")
+            var result = UserCenterLogic.GetResultCodeByRequestHttps("App/BindGatewayToHome", true, bindGateway);
+            if (result == "Error")
             {
                 return -1;
             }
@@ -479,7 +480,7 @@
             }
 
             //鏇存柊浜戠鏁版嵁搴�
-            int flage1 = await this.SetGatewayIdToDataBase(zbGateway);
+            int flage1 = this.SetGatewayIdToDataBase(zbGateway);
             //寮傚父涔熶笉楦熷畠,0鏄壒娈婂惈涔�
             if (flage1 == 0)
             {
@@ -507,7 +508,19 @@
             await Task.Delay(8000);
 
             //鑾峰彇缃戝叧鐨勪俊鎭�
-            var result = await zbGateway.GetZbGwInfoAsync();
+            ZbGatewayData.GetGwAllData result = null;
+            int count = 5;
+            while (count >= 0)
+            {
+                result = await zbGateway.GetZbGwInfoAsync();
+                if (result != null && result.getGwData != null)
+                {
+                    break;
+                }
+                count--;
+                //鏈�澶氬啀绛�20绉�
+                await Task.Delay(4000);
+            }
             //妫�娴嬬綉鍏宠繑鍥炵殑鍏遍�氶敊璇姸鎬佺爜
             string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
             if (error != null)
@@ -547,6 +560,10 @@
                 //娣诲姞澶囦唤
                 HdlAutoBackupLogic.AddOrEditorFile(this.dicGateway[gwID].FilePath);
             }
+
+            //娣诲姞缃戝叧鐨勮瘽,寮哄埗涓婚〉鍒锋柊
+            UserView.UserPage.Instance.RefreshForm = true;
+
             return 1;
         }
 
@@ -677,7 +694,7 @@
             if (getGatewayInfo == true)
             {
                 //鑾峰彇缃戝叧淇℃伅
-                var info = await this.GetGatewayNewInfoAsync(realWay);
+                var info = this.GetGatewayInfo(realWay);
                 if (info == null)
                 {
                     //鍏抽棴杩涘害鏉�
@@ -746,7 +763,7 @@
             }
 
             //鍒犻櫎浜戠鐨勭綉鍏�
-            await this.DeleteDataBaseGateway(zbGatewayID);
+            this.DeleteDataBaseGateway(zbGatewayID);
 
             //鍒犻櫎缃戝叧鏂囦欢
             this.DeleteGatewayFile(zbGatewayID);
@@ -1388,9 +1405,9 @@
                 else
                 {
                     //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷
-                    HdlThreadLogic.Current.RunThread(async () =>
+                    HdlThreadLogic.Current.RunThread(() =>
                     {
-                        var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
+                        var result = this.GetGatewayInfo(zbGateway, ShowErrorMode.NO);
                         if (result != null)
                         {
                             //灏嗙綉鍏崇殑鏁版嵁璁剧疆鍒版湰鍦扮紦瀛樹腑
@@ -1430,32 +1447,13 @@
         /// <param name="zbGateway"></param>
         /// <param name="mode"></param>
         /// <returns></returns>
-        public async Task<ZbGatewayData.GetGwData> GetGatewayNewInfoAsync(ZbGateway zbGateway, ShowErrorMode mode = ShowErrorMode.YES)
+        public ZbGatewayData.GetGwData GetGatewayInfo(ZbGateway zbGateway, ShowErrorMode mode = ShowErrorMode.YES)
         {
-            ZbGateway realWay = null;
-            if (this.GetRealGateway(ref realWay, zbGateway) == false)
-            {
-                if (mode == ShowErrorMode.YES)
-                {
-                    string msg = Language.StringByID(R.MyInternationalizationString.uErrorGatewayLostMsg);
-                    this.ShowTipMsg(msg);
-                }
-                return null;
-            }
             //鑾峰彇缃戝叧鐗堟湰淇℃伅
-            var imageTypeResult = await realWay.GetZbGwInfoAsync();
-            //妫�娴嬬綉鍏宠繑鍥炵殑鍏遍�氶敊璇姸鎬佺爜
-            string error = HdlCheckLogic.Current.CheckCommonErrorCode(imageTypeResult);
-            if (error != null)
-            {
-                if (mode == ShowErrorMode.YES)
-                {
-                    this.ShowTipMsg(error);
-                }
-                return null;
-            }
+            var jObject = new Newtonsoft.Json.Linq.JObject { { "Cluster_ID", 0 }, { "Command", 95 } };
+            var result = this.SendJobjectDataToGateway(zbGateway, "GetZbGwInfo", jObject.ToString(), "GetZbGwInfo_Respon");
 
-            if (imageTypeResult == null || imageTypeResult.getGwData == null)
+            if (result.ErrorMsgDiv != 1)
             {
                 if (mode == ShowErrorMode.YES)
                 {
@@ -1467,42 +1465,19 @@
                 }
                 return null;
             }
-
+            var getGwInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGatewayData.GetGwData>(result.ReceiptData);
             string gwID = zbGateway.GwId;
             if (this.dicGateway.ContainsKey(gwID) == true)
             {
                 //鍒锋柊缂撳瓨
                 ZbGateway localWay = this.dicGateway[gwID];
                 //灏嗙綉鍏崇殑鏁版嵁璁剧疆鍒版湰鍦扮紦瀛樹腑
-                this.SetGatewayDataToLocalMemmory(localWay, imageTypeResult.getGwData);
+                this.SetGatewayDataToLocalMemmory(localWay, getGwInfo);
             }
             //椤轰究杩欎釜鍙橀噺涔熻缃竴涓�
-            this.SetGatewayDataToLocalMemmory(zbGateway, imageTypeResult.getGwData, false);
+            this.SetGatewayDataToLocalMemmory(zbGateway, getGwInfo, false);
 
-            return imageTypeResult.getGwData;
-        }
-
-        /// <summary>
-        /// 鑾峰彇缃戝叧淇℃伅,闈炲紓姝�,浼氱瓑寰�(鐗堟湰淇℃伅,闀滃儚绫诲瀷,鍩烘湰淇℃伅绛夈�傚彧鍒锋柊鏈湴缃戝叧鐨勭紦瀛�)
-        /// </summary>
-        /// <param name="zbGateway"></param>
-        /// <param name="mode"></param>
-        /// <returns></returns>
-        public ZbGatewayData.GetGwData GetGatewayNewInfo(ZbGateway zbGateway, ShowErrorMode mode = ShowErrorMode.YES)
-        {
-            bool bolBreak = false;
-            ZbGatewayData.GetGwData result = null;
-            HdlThreadLogic.Current.RunThread(async () =>
-            {
-                result = await this.GetGatewayNewInfoAsync(zbGateway, mode);
-                bolBreak = true;
-            });
-
-            while (bolBreak == false)
-            {
-                System.Threading.Thread.Sleep(500);
-            }
-            return result;
+            return getGwInfo;
         }
 
         /// <summary>
@@ -1609,10 +1584,10 @@
         /// <param name="zbGateway">缃戝叧瀵硅薄</param>
         /// <param name="mode">閿欒鏃讹紝鏄惁鏄剧ず閿欒</param>
         /// <returns></returns>
-        public async Task<List<FirmwareVersionInfo>> GetGatewayAllNewVersion(ZbGateway zbGateway, ShowErrorMode mode = ShowErrorMode.YES)
+        public List<FirmwareVersionInfo> GetGatewayAllNewVersion(ZbGateway zbGateway, ShowErrorMode mode = ShowErrorMode.YES)
         {
             //鑾峰彇缃戝叧鐗堟湰淇℃伅
-            var result = await HdlGatewayLogic.Current.GetGatewayNewInfoAsync(zbGateway, mode);
+            var result = this.GetGatewayInfo(zbGateway, mode);
             if (result == null)
             {
                 return null;
@@ -1629,10 +1604,14 @@
                 localWay.LinuxHardVersion.ToString(),
                 localWay.LinuxImageType.ToString());
 
-            //娣诲姞鍗忚皟鍣ㄧ殑鍗囩骇鍥轰欢(鎴愪笉鎴愬姛閮芥棤鎵�璋�)
-            flage = HdlFirmwareUpdateLogic.AddFirmwareVersionInfo(FirmwareLevelType.Coordinator,
-                localWay.CoordinatorHardVersion.ToString(),
-                localWay.CoordinatorImageId.ToString());
+            //娣诲姞鍗忚皟鍣ㄧ殑鍗囩骇鍥轰欢(鎴愪笉鎴愬姛閮芥棤鎵�璋�) 蹇呴』鑳藉鑱旂綉鎵嶈
+            if (flage == 1)
+            {
+                //娌$綉鐨勬椂鍊欎笉鍐嶅鐞�
+                HdlFirmwareUpdateLogic.AddFirmwareVersionInfo(FirmwareLevelType.Coordinator,
+                    localWay.CoordinatorHardVersion.ToString(),
+                    localWay.CoordinatorImageId.ToString());
+            }
 
             //缃戝叧鐨勭増鏈�
             var gatewayFirmware = HdlFirmwareUpdateLogic.GetFirmwareMostVersionInfo(FirmwareLevelType.Linux,
@@ -1656,10 +1635,13 @@
                 //铏氭嫙椹卞姩鍙�
                 foreach (var data in localWay.DriveCodeList)
                 {
-                    //娣诲姞铏氭嫙椹卞姩鐨勫崌绾у浐浠�(鎴愪笉鎴愬姛閮芥棤鎵�璋�)
-                    flage = HdlFirmwareUpdateLogic.AddFirmwareVersionInfo(FirmwareLevelType.VirtualDevice,
-                        data.DriveHwVersion.ToString(),
-                        data.DriveImageType.ToString());
+                    //娣诲姞铏氭嫙椹卞姩鐨勫崌绾у浐浠�(鎴愪笉鎴愬姛閮芥棤鎵�璋�) 蹇呴』鑳藉鑱旂綉鎵嶈
+                    if (flage == 1)
+                    {
+                        HdlFirmwareUpdateLogic.AddFirmwareVersionInfo(FirmwareLevelType.VirtualDevice,
+                           data.DriveHwVersion.ToString(),
+                           data.DriveImageType.ToString());
+                    }
 
                     //铏氭嫙椹卞姩
                     var virtualFirmware = HdlFirmwareUpdateLogic.GetFirmwareMostVersionInfo(FirmwareLevelType.VirtualDevice,
@@ -1753,9 +1735,9 @@
                 else
                 {
                     //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷
-                    HdlThreadLogic.Current.RunThread(async () =>
+                    HdlThreadLogic.Current.RunThread(() =>
                     {
-                        var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
+                        var result = this.GetGatewayInfo(zbGateway, ShowErrorMode.NO);
                         if (result != null)
                         {
                             //灏嗙綉鍏崇殑鏁版嵁璁剧疆鍒版湰鍦扮紦瀛樹腑
@@ -1791,9 +1773,9 @@
                 else
                 {
                     //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷
-                    HdlThreadLogic.Current.RunThread(async () =>
+                    HdlThreadLogic.Current.RunThread(() =>
                     {
-                        var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
+                        var result = this.GetGatewayInfo(zbGateway, ShowErrorMode.NO);
                         if (result != null)
                         {
                             //灏嗙綉鍏崇殑鏁版嵁璁剧疆鍒版湰鍦扮紦瀛樹腑
@@ -1885,9 +1867,9 @@
             }
 
             bool canBreak = false;
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
-                List<string> list = new List<string>() { "NotSetAgain", "NotCheck" };
+                List<string> list = new List<string>() { "NotCheck" };
 
                 //璁剧疆璁块棶鎺ュ彛鐨勫弬鏁�
                 var pra = new GetGatewayPra();
@@ -1896,7 +1878,7 @@
                 //鑾峰彇鎺у埗涓讳汉璐﹀彿鐨凾oken
                 pra.ReqDto.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-                var result = await UserCenterLogic.GetResponseDataByRequestHttps("App/GetSingleHomeGatewayPagger", true, pra, list);
+                var result = UserCenterLogic.GetResponseDataByRequestHttps("App/GetSingleHomeGatewayPagger", true, pra, list);
                 if (string.IsNullOrEmpty(result) == true)
                 {
                     canBreak = true;
@@ -2019,16 +2001,16 @@
         /// 瑙g粦浜戠缁戝畾鐨勭綉鍏�
         /// </summary>
         /// <param name="strWayId"></param>
-        public async Task<bool> DeleteDataBaseGateway(string strWayId)
+        public bool DeleteDataBaseGateway(string strWayId)
         {
             var Pra = new DeleteGatewayPra();
             Pra.BindGateways.Add(strWayId);
             //鑾峰彇鎺у埗涓讳汉璐﹀彿鐨凾oken
             Pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-            List<string> listNotShowError = new List<string>() { "NoExist", "NoBind", "NoRecord", "NotSetAgain" };
+            List<string> listNotShowError = new List<string>() { "NoExist", "NoBind", "NoRecord" };
 
-            bool result = await UserCenterLogic.GetResultStatuByRequestHttps("App/ReleaseGatewayToHome", true, Pra, listNotShowError);
+            bool result = UserCenterLogic.GetResultStatuByRequestHttps("App/ReleaseGatewayToHome", true, Pra, listNotShowError);
             if (result == false)
             {
                 return false;
@@ -2063,7 +2045,7 @@
         /// </summary>
         public void ResetComandToBindBackupGateway()
         {
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 var fileData = Global.ReadFileByDirectory(DirNameResourse.LocalMemoryDirectory, DirNameResourse.BackupGatewayIdFile);
                 if (fileData == null)
@@ -2074,8 +2056,6 @@
                 var listTempId = new List<string>();
                 listTempId.AddRange(this.listBackupGwId);
 
-                //涓嶆樉绀哄凡缁忚缁戝畾杩囩殑淇℃伅,NotSetAgain:鍋囧鏂綉鏃�,涓嶄簩娆″彂閫�
-                List<string> listNotShow = new List<string>() { "NotSetAgain" };
                 //璋冪敤鎺ュ彛锛岀粦瀹氱綉鍏�
                 var bindGateway = new BindGatewayPra();
                 //鑾峰彇鎺у埗涓讳汉璐﹀彿鐨凾oken
@@ -2085,12 +2065,12 @@
                 {
                     bindGateway.BindGateways.Clear();
                     bindGateway.BindGateways.Add(gwId);
-                    var result = await UserCenterLogic.GetResultCodeByRequestHttps("App/BindGatewayToHome", true, bindGateway, listNotShow);
+                    var result = UserCenterLogic.GetResultCodeByRequestHttps("App/BindGatewayToHome", true, bindGateway);
                     if (result == "Success")
                     {
                         this.listBackupGwId.Remove(gwId);
                     }
-                    if (result == "Error" || result == "ErrorEx")
+                    if (result == "Error")
                     {
                         break;
                     }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs
index 36fc2e9..9b65233 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs
@@ -977,7 +977,7 @@
         /// <returns></returns>
         private void StartGetGatewayVersionThread()
         {
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鍏堢瓑涓�120绉掑惂锛岀綉鍏冲崌绾у拰缃戝叧瀹屽叏閲嶅惎闇�瑕佸緢闀挎椂闂�
                 int count = 12;
@@ -991,12 +991,12 @@
                     //杩欎釜鏃跺�欙紝涓嶅簲璇ユ彁绀鸿秴鏃�
                     this.UpdateTimeOutRefresh();
 
-                    await Task.Delay(10000);
+                    System.Threading.Thread.Sleep(10000);
                 }
                 while (this.IsFinishUpdate == false)
                 {
                     //鑾峰彇鐗堟湰
-                    var result = await HdlGatewayLogic.Current.GetGatewayNewInfoAsync(this.upDatezbGateway, ShowErrorMode.NO);
+                    var result = HdlGatewayLogic.Current.GetGatewayInfo(this.upDatezbGateway, ShowErrorMode.NO);
                     if (result != null)
                     {
                         break;
@@ -1004,7 +1004,7 @@
                     //杩欎釜鏃跺�欙紝涓嶅簲璇ユ彁绀鸿秴鏃�
                     this.UpdateTimeOutRefresh();
 
-                    await Task.Delay(5000);
+                    System.Threading.Thread.Sleep(5000);
                 }
                 //宸茬粡鑳藉鑾峰彇鏁版嵁
                 this.ShowFinishMsg();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs
index 5ad7ed1..3c3e6b6 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs
@@ -56,13 +56,13 @@
         /// <summary>
         /// Log鍑哄姏
         /// </summary>
-        /// <param name="div">1:鏅�歀og,-1:鑷村懡閿欒Log</param>
+        /// <param name="div">1:鏅�歀og,-1:鑷村懡閿欒Log,2:鐗规畩Log</param>
         /// <param name="strLog">Log鍐呭</param>
         public void WriteLog(int div, string strLog)
         {
             lock (objLock)
             {
-                if (div != -1 && UserCenterResourse.HideOption.DetailedLog == 0)
+                if (div != -1 && div != 2 && UserCenterResourse.HideOption.DetailedLog == 0)
                 {
                     //鏆傛椂鍙褰曞紓甯镐俊鎭�
                     return;
@@ -71,9 +71,17 @@
                 System.IO.StreamWriter sw = null;
                 try
                 {
-                    string fileName = this.GetLogFile(div);
-                    string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.LogDirectory, fileName);
-                    strLog = "[" + DateTime.Now.ToString("yyyyMMdd HH:mm:ss") + "] " + strLog + "\r\n";
+                    string fullName = string.Empty;
+                    if (div != 2)
+                    {
+                        string fileName = this.GetLogFile(div);
+                        fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.LogDirectory, fileName);
+                    }
+                    else
+                    {
+                        fullName = DirNameResourse.SendAndReceveDataLog;
+                    }
+                    strLog = "\r\n[" + DateTime.Now.ToString("yyyyMMdd HH:mm:ss") + "] " + strLog + "\r\n";
                     sw = new System.IO.StreamWriter(fullName, true, Encoding.UTF8);
                     sw.WriteLine(strLog);
                 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs
index c60d868..cc3c9ca 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs
@@ -39,13 +39,13 @@
         /// 鍒涘缓鏂扮殑浣忓畢(杩斿洖浣忓畢id,null浠h〃澶辫触)
         /// </summary>
         /// <param name="residenceName">浣忓畢鍚嶇О</param>
-        public async System.Threading.Tasks.Task<string> CreatNewResidence(string residenceName)
+        public string CreatNewResidence(string residenceName)
         {
             var Pra = new AddResidencePra();
             Pra.Name = residenceName;
             //娣诲姞浣忓畢
-            string resultData = await UserCenterLogic.GetResponseDataByRequestHttps("App/AddHome", false, Pra);
-            if (resultData == null)
+            string resultData = UserCenterLogic.GetResponseDataByRequestHttps("App/AddHome", false, Pra);
+            if (string.IsNullOrEmpty(resultData) == true)
             {
                 return null;
             }
@@ -96,7 +96,7 @@
         /// </summary>
         /// <param name="residenceId"></param>
         /// <returns></returns>
-        public async System.Threading.Tasks.Task SwitchResidence(string residenceId)
+        public void SwitchResidence(string residenceId)
         {
             //鎵撳紑杩涘害鏉�
             ProgressBar.Show();
@@ -106,7 +106,7 @@
             Config.Instance.Home = this.GetHouseByHouseId(residenceId);
             Config.Instance.Save();
             //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-            await UserCenterLogic.InitUserCenterMenmoryAndThread(false);
+            UserCenterLogic.InitUserCenterMenmoryAndThread(false);
 
             //鍏抽棴杩涘害鏉�
             ProgressBar.Close();
@@ -122,7 +122,7 @@
         /// <param name="residenceId">浣忓畢id</param>
         /// <param name="residenceName">浣忓畢鍚嶇О</param>
         /// <returns></returns>
-        public async System.Threading.Tasks.Task<bool> EditorResidenceName(string residenceId, string residenceName)
+        public bool EditorResidenceName(string residenceId, string residenceName)
         {
             var Pra = new EditorResidencePra();
             Pra.HomeId = residenceId;
@@ -131,7 +131,7 @@
             Pra.LoginAccessToken = Config.Instance.Token;
 
             //缂栬緫浣忓畢
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", false, Pra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", false, Pra);
             if (flage == true)
             {
                 //鍒锋柊鍐呭瓨鐨勪綇瀹呭悕
@@ -206,27 +206,26 @@
         /// <summary>
         /// 鑾峰彇浜戠浣忓畢鍒楄〃
         /// </summary>
-        public async System.Threading.Tasks.Task<List<string>> GetHomeListsFromDb()
+        public List<string> GetHomeListsFromDb()
         {
-            var pageSetting = new SendDataToServer.ResidenceListPageSettingObj()
+            if (HdlWifiLogic.Current.CanAccessHttp == false)
             {
-                PageSize = CommonPage.PageSize
-            };
-
-            var reqDto = new SendDataToServer.ResidenceListObj()
-            {
-                LoginAccessToken = Config.Instance.Token,
-                PageSetting = pageSetting
-            };
+                //褰撳墠鏃犳硶鑱旂綉
+                return Config.Instance.HomeFilePathList;
+            }
             var requestObj = new SendDataToServer.ResidenceListReqDto()
             {
-                ReqDto = reqDto,
                 RequestVersion = CommonPage.RequestVersion,
+                ReqDto = new SendDataToServer.ResidenceListObj()
+                {
+                    LoginAccessToken = Config.Instance.Token,
+                    PageSetting = new SendDataToServer.ResidenceListPageSettingObj { PageSize = 999 }
+                }
             };
             try
             {
                 var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj);
-                var revertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("App/GetHomePager", System.Text.Encoding.UTF8.GetBytes(requestJson));
+                var revertObj = CommonPage.Instance.RequestHttpsZigbeeAsync("App/GetHomePager", System.Text.Encoding.UTF8.GetBytes(requestJson));
                 if (revertObj == null)
                 {
                     return null;
@@ -234,7 +233,7 @@
                 if (revertObj.StateCode.ToUpper() == "SUCCESS")
                 {
                     var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.ResidenceRes>(revertObj.ResponseData.ToString());
-                    if(responseDataObj.TotalCount>0)
+                    if (responseDataObj.TotalCount > 0)
                     {
                         //娓呯┖褰撳墠浣忓畢鍒楄〃
                         Config.Instance.HomeFilePathList.Clear();
@@ -317,7 +316,7 @@
             var listHome = new List<Common.House>();
             foreach (var housePath in Common.Config.Instance.HomeFilePathList)
             {
-                var home =this.GetHouseByFilePath(housePath);
+                var home = this.GetHouseByFilePath(housePath);
                 if (home == null)
                 {
                     continue;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
index 4244dad..4b0826e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
@@ -5,7 +5,6 @@
 using System.IO;
 using System.Net;
 using System.Text;
-using System.Threading.Tasks;
 using ZigBee.Device;
 
 namespace Shared.Phone.UserCenter
@@ -53,7 +52,7 @@
         /// </summary>
         /// <param name="listDistributedMark"></param>
         /// <returns></returns>
-        private async Task<List<string>> SetShardFileToLocation(List<string> listDistributedMark)
+        private List<string> SetShardFileToLocation(List<string> listDistributedMark)
         {
             if (listDistributedMark.Count == 0)
             {
@@ -73,8 +72,8 @@
             {
                 string keys = listDistributedMark[i];
                 var dataPra = new { DistributedMark = keys, HouseDistributedMark = Common.Config.Instance.Home.Id, IsOtherAccountControl = Common.Config.Instance.Home.IsOthreShare };
-                var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetOneShareData", false, dataPra);
-                if (result == null)
+                var result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetOneShareData", false, dataPra, null, true);
+                if (string.IsNullOrEmpty(result) == true)
                 {
                     //鍏佽鎸夌郴缁熺殑杩斿洖閿�
                     Shared.Common.CommonPage.BackKeyCanClick = true;
@@ -239,7 +238,7 @@
         /// <summary>
         /// 鍚屾鏈嶅姟鍣ㄧ殑鍒嗕韩鍐呭(閲岄潰鍙礋璐f妸涓滆タ瀛樺叆鏈湴)
         /// </summary>
-        public async Task<bool> SynchronizeDbSharedContent()
+        public bool SynchronizeDbSharedContent()
         {
             if (UserCenterResourse.UserInfo.AuthorityNo != 3)
             {
@@ -249,8 +248,7 @@
 
             //鑾峰彇涓讳汉鍒嗕韩缁欐垚鍛樼殑鏂囦欢鍒楄〃
             var infoPra = new { DistributedMark = Config.Instance.Guid, HouseDistributedMark = Common.Config.Instance.Home.Id, IsOtherAccountControl = Common.Config.Instance.Home.IsOthreShare };
-            var listNotShow = new List<string>() { "NotSetAgain" };
-            var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra, listNotShow);
+            var result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra);
             if (string.IsNullOrEmpty(result) == true)
             {
                 return false;
@@ -291,7 +289,7 @@
 
                 //灏嗗垎浜殑鏁版嵁瀛樺叆鏈湴(鑾峰彇鐨勬槸鏈湴娌℃湁鐨�)
                 this.ClearShardDirectory();
-                var listDbFile = await this.SetShardFileToLocation(listAddMark);
+                var listDbFile = this.SetShardFileToLocation(listAddMark);
                 if (listDbFile == null)
                 {
                     //鍏抽棴
@@ -317,7 +315,7 @@
             }
 
             //鍚屾鏈嶅姟鍣ㄧ殑鍙栨秷浜嗙殑鍒嗕韩鍐呭
-            return await this.SynchronizeDeleteSharedContent(listShardFile, dicUpdateTime);
+            return this.SynchronizeDeleteSharedContent(listShardFile, dicUpdateTime);
         }
 
         /// <summary>
@@ -326,7 +324,7 @@
         /// <param name="listShardFile">浜戠涓婇潰鍒嗕韩鐨勬枃浠�,涓篘ull鏃朵粠鏂拌幏鍙�</param>
         /// <param name="dicUpdateTime">鍒嗕韩鏂囦欢鐨勬洿鏂版椂闂�,涓篘ull鏃朵粠鏂拌幏鍙�</param>
         /// <returns></returns>
-        public async Task<bool> SynchronizeDeleteSharedContent(HashSet<string> listShardFile = null, Dictionary<string, string> dicUpdateTime = null)
+        public bool SynchronizeDeleteSharedContent(HashSet<string> listShardFile = null, Dictionary<string, string> dicUpdateTime = null)
         {
             if (UserCenterResourse.UserInfo.AuthorityNo != 3)
             {
@@ -349,8 +347,7 @@
                 listShardFile = new HashSet<string>();
                 //鑾峰彇涓讳汉鍒嗕韩缁欐垚鍛樼殑鏂囦欢鍒楄〃
                 var infoPra = new { DistributedMark = Config.Instance.Guid, HouseDistributedMark = Common.Config.Instance.Home.Id, IsOtherAccountControl = Common.Config.Instance.Home.IsOthreShare };
-                var listNotShow = new List<string>() { "NotSetAgain" };
-                var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra, listNotShow);
+                var result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra);
                 if (string.IsNullOrEmpty(result) == true)
                 {
                     //鍏抽棴
@@ -487,7 +484,7 @@
         /// <para>New鐨勬椂鍊欒寰楀SubAccountDistributedMark璧嬪��,瀹冩槸鎴愬憳鍒楄〃鎺ュ彛杩斿洖鐨凷ubAccountDistributedMark</para>
         /// </param>
         /// <returns></returns>
-        public async Task<bool> GetMemberShardContentListAndSetToLocation(MemberShardInfoData memberShardInfo)
+        public bool GetMemberShardContentListAndSetToLocation(MemberShardInfoData memberShardInfo)
         {
             if (memberShardInfo.Refresh == false)
             {
@@ -507,8 +504,8 @@
                 HouseDistributedMark = Shared.Common.Config.Instance.HomeId,
                 IsOtherAccountControl = Common.Config.Instance.Home.IsOthreShare
             };
-            var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra);
-            if (result == null)
+            var result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra);
+            if (string.IsNullOrEmpty(result) == true)
             {
                 //鍏抽棴杩涘害鏉�
                 ProgressFormBar.Current.Close();
@@ -542,7 +539,7 @@
             }
 
             //灏嗗垎浜殑鏁版嵁瀛樺叆鏈湴,杩斿洖鐨勬槸鏂囦欢鍚嶅瓧(寮傚父鏃惰繑鍥瀗ull)
-            var listFile = await this.SetShardFileToLocation(listMark);
+            var listFile = this.SetShardFileToLocation(listMark);
             if (listFile == null)
             {
                 //鍏抽棴杩涘害鏉�
@@ -736,7 +733,7 @@
         /// <param name="listScene">閫夋嫨涓婁紶鐨勫満鏅�(涓嶈鑾峰彇瀹冮噷闈㈢殑缁戝畾鍒楄〃)</param>
         /// <param name="BarMaxValue">杩涘害鏉$殑鏈�澶у��,濡傛灉涓嶄负-1,鍒欏唴閮ㄤ笉浼氳嚜鍔ㄥ脊鍑鸿繘搴︽潯</param>
         /// <param name="listCheckFile">鏂囦欢閲嶅涓婁紶妫�娴�</param>
-        public async Task<bool> DoUploadSharedContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom,
+        public bool DoUploadSharedContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom,
             List<CommonDevice> listDevice, List<Common.SceneUI> listScene, int BarMaxValue = -1, HashSet<string> listCheckFile = null)
         {
             if (listDevice.Count == 0 && listScene.Count == 0)
@@ -790,11 +787,11 @@
             }
 
             //涓婁紶鍒嗕韩
-            var result = await this.DoUploadShardContent(memberShardInfo, listFile, listCheckFile);
+            var result = this.DoUploadShardContent(memberShardInfo, listFile, listCheckFile);
             if (result == true)
             {
                 //鍒犻櫎鎸囧畾鑷畾涔夊浘鐗�
-                result = await this.DoDeleteSharedContent(memberShardInfo, listDelPic);
+                result = this.DoDeleteSharedContent(memberShardInfo, listDelPic);
             }
             if (BarMaxValue == -1)
             {
@@ -1008,7 +1005,7 @@
         /// <param name="listFile">涓婁紶鐨勬枃浠跺悕</param>
         /// <param name="listCheckFile">閲嶅鏂囦欢涓婁紶妫�娴�</param>
         /// <returns></returns>
-        private async Task<bool> DoUploadShardContent(MemberShardInfoData memberShardInfo, List<string> listFile, HashSet<string> listCheckFile)
+        private bool DoUploadShardContent(MemberShardInfoData memberShardInfo, List<string> listFile, HashSet<string> listCheckFile)
         {
             var dicKeys = new Dictionary<string, string>();
             for (int i = 0; i < listFile.Count; i++)
@@ -1043,8 +1040,8 @@
                     //杩藉姞鍏变韩
                     if (memberShardInfo.dicAllShardKeys.ContainsKey(fileName) == false)
                     {
-                        var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/AddShareData", false, info);
-                        if (result == null)
+                        var result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/AddShareData", false, info, null, true);
+                        if (string.IsNullOrEmpty(result) == true)
                         {
                             return false;
                         }
@@ -1054,7 +1051,7 @@
                     else
                     {
                         info.DistributedMark = memberShardInfo.dicAllShardKeys[fileName];
-                        var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info);
+                        var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info, null, true);
                         if (result == false)
                         {
                             return false;
@@ -1275,7 +1272,7 @@
         /// <param name="listDevice">瑕佸彇娑堢殑璁惧</param>
         /// <param name="listSceneUI">瑕佸彇娑堢殑鍦烘櫙</param>
         /// <returns></returns>
-        public async Task<bool> DoDeleteSharedContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom,
+        public bool DoDeleteSharedContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom,
             List<CommonDevice> listDevice, List<SceneUI> listSceneUI)
         {
             var roomTemp = memberShardInfo.dicShardRoom[nowRoom.FileName];
@@ -1404,12 +1401,12 @@
             }
 
             //鎵ц绉婚櫎鍒嗕韩鏁版嵁
-            var result = await this.DoDeleteSharedContent(memberShardInfo, nowRoom, listMark, listDeleteFile);
+            var result = this.DoDeleteSharedContent(memberShardInfo, nowRoom, listMark, listDeleteFile);
             //鍚屾鎴块棿鏂囦欢
             if (result == true && listDeleteFile.Contains(roomTemp.FileName) == false)
             {
                 //鎵ц涓婁紶鎴块棿瀵硅薄
-                result = await this.DoUploadRoomObject(memberShardInfo, roomTemp);
+                result = this.DoUploadRoomObject(memberShardInfo, roomTemp);
             }
             //鍚屾妤煎眰鏁版嵁
             if (result == true && listDeleteFile.Contains(roomTemp.FileName) == true)
@@ -1428,7 +1425,7 @@
                     //濡傛灉璇ユゼ灞傚凡缁忓垹瀹屾埧闂翠簡,鍒欐洿鏂版ゼ灞�
                     memberShardInfo.dicShardFloor.Remove(roomTemp.FloorId);
                     //鎵ц涓婁紶瀵硅薄
-                    result = await this.DoUploadFloorObject(memberShardInfo);
+                    result = this.DoUploadFloorObject(memberShardInfo);
                 }
             }
 
@@ -1456,7 +1453,7 @@
         /// <param name="listMark">瑕佺Щ闄ょ殑涓婚敭</param>
         /// <param name="listDeleteFile">瑕佸垹闄ょ殑鏂囦欢(鎴块棿鏂囦欢闇�瑕佸垹闄ょ殑璇�,蹇呴』鏀惧湪鏈�鍚�)</param>
         /// <returns></returns>
-        private async Task<bool> DoDeleteSharedContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom,
+        private bool DoDeleteSharedContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom,
             List<string> listMark, List<string> listDeleteFile)
         {
             if (listMark.Count == 0)
@@ -1477,7 +1474,7 @@
 
                 info.DistributedMark = markKeys;
                 //鎵ц鍒犻櫎
-                var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/DeleteShareData", false, info);
+                var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/DeleteShareData", false, info, null, true);
                 if (result == false)
                 {
                     //鍏抽棴杩涘害鏉�
@@ -1508,7 +1505,7 @@
         /// <param name="memberShardInfo">鎴愬憳鐨勫垎浜唴瀹�</param>
         /// <param name="listDelFile">鍒犻櫎鐨勬枃浠�</param>
         /// <returns></returns>
-        private async Task<bool> DoDeleteSharedContent(MemberShardInfoData memberShardInfo, List<string> listDelFile)
+        private bool DoDeleteSharedContent(MemberShardInfoData memberShardInfo, List<string> listDelFile)
         {
             if (listDelFile.Count == 0)
             {
@@ -1526,7 +1523,7 @@
 
                 info.DistributedMark = memberShardInfo.dicAllShardKeys[fileName];
                 //鎵ц鍒犻櫎
-                var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/DeleteShareData", false, info);
+                var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/DeleteShareData", false, info, null, true);
                 if (result == false)
                 {
                     return false;
@@ -1552,7 +1549,7 @@
         /// <param name="memberShardInfo">鎴愬憳鐨勫叡浜唴瀹�</param>
         /// <param name="upDateRoom">闇�瑕佷笂浼犲埌浜戠鐨勬埧闂村璞�</param>
         /// <returns></returns>
-        private async Task<bool> DoUploadRoomObject(MemberShardInfoData memberShardInfo, Common.Room upDateRoom)
+        private bool DoUploadRoomObject(MemberShardInfoData memberShardInfo, Common.Room upDateRoom)
         {
             if (upDateRoom.Id == "Other")
             {
@@ -1566,7 +1563,7 @@
             var data = Newtonsoft.Json.JsonConvert.SerializeObject(upDateRoom);
             var byteData = System.Text.Encoding.UTF8.GetBytes(data);
             info.ShareDataBytes = byteData;
-            var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info);
+            var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info, null, true);
             if (result == false)
             {
                 return false;
@@ -1586,7 +1583,7 @@
         /// </summary>
         /// <param name="memberShardInfo">鎴愬憳鐨勫叡浜唴瀹�</param>
         /// <returns></returns>
-        private async Task<bool> DoUploadFloorObject(MemberShardInfoData memberShardInfo)
+        private bool DoUploadFloorObject(MemberShardInfoData memberShardInfo)
         {
             var info = new EditorShardContent();
             info.DistributedMark = memberShardInfo.dicAllShardKeys[DirNameResourse.ShardFloorFile];
@@ -1596,7 +1593,7 @@
             var data = Newtonsoft.Json.JsonConvert.SerializeObject(memberShardInfo.dicShardFloor);
             var byteData = System.Text.Encoding.UTF8.GetBytes(data);
             info.ShareDataBytes = byteData;
-            var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info);
+            var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info, null, true);
             if (result == false)
             {
                 return false;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs
index 5b405df..417d083 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs
@@ -56,6 +56,8 @@
                             //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
                             var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError));
                             alert.Show();
+                            //鍑虹幇寮傚父,鍒欏叧闂繘搴︽潯
+                            ProgressBar.Close();
                         });
                     }
                     //Log鍑哄姏
@@ -93,6 +95,8 @@
                         //Log鍑哄姏
                         string msg = "褰撳墠婵�娲荤殑鐣岄潰[" + nowFormId + "]";
                         HdlLogLogic.Current.WriteLog(ex, msg);
+                        //鍑虹幇寮傚父,鍒欏叧闂繘搴︽潯
+                        ProgressBar.Close();
                     }
                 });
                 
@@ -126,6 +130,8 @@
                     //Log鍑哄姏
                     string msg = "褰撳墠婵�娲荤殑鐣岄潰[" + nowFormId + "]";
                     HdlLogLogic.Current.WriteLog(ex, msg);
+                    //鍑虹幇寮傚父,鍒欏叧闂繘搴︽潯
+                    ProgressBar.Close();
                 }
             });
         }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs
index 0f40b6d..7bf85cc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs
@@ -114,7 +114,6 @@
         /// </summary>
         private Com.Mediatek.Elian.ElianNative hdlWiFi = null;
 #endif
-
         /// <summary>
         /// TCP鍗忚
         /// </summary>
@@ -127,6 +126,40 @@
         /// Ap妯″紡缃戝叧杩斿洖鐨勭閽�
         /// </summary>
         private string randDesKey = null;
+        /// <summary>
+        /// 鏄惁宸茬粡娣诲姞缃戠粶鍙樺寲鐩戝惉
+        /// </summary>
+        private bool hadAddListenNetWork = false;
+
+        /// <summary>
+        /// 鑳藉惁璁块棶http
+        /// </summary>
+        private bool m_CanAccessHttp = true;
+        /// <summary>
+        /// 涓婁竴娆¤闂甴ttp鐨勬椂闂�
+        /// </summary>
+        private DateTime oldAccessHttpTime = DateTime.Now;
+        /// <summary>
+        /// 鑳藉惁璁块棶http
+        /// </summary>
+        public bool CanAccessHttp
+        {
+            set
+            {
+                m_CanAccessHttp = value;
+                oldAccessHttpTime = DateTime.Now;
+            }
+            get
+            {
+                //10绉掑悗鍏佽鍐嶆璁块棶
+                if (m_CanAccessHttp == true || (DateTime.Now - oldAccessHttpTime).TotalMilliseconds > 10 * 1000)
+                {
+                    oldAccessHttpTime = DateTime.Now;
+                    return true;
+                }
+                return false;
+            }
+        }
 
         #endregion
 
@@ -286,6 +319,77 @@
 
         #endregion
 
+        #region 鈻� 鐩戝惉缃戠粶鍙樺寲_______________________
+
+        /// <summary>
+        /// 寮�鍚洃鍚綉缁�
+        /// </summary>
+        public void StartListenNetWork()
+        {
+            if (hadAddListenNetWork == true)
+            {
+                return;
+            }
+            hadAddListenNetWork = true;
+
+#if Android
+            //寮�鍚洃鍚畨鍗撶綉缁滃彉鍖�
+            BaseActivity.NetworkStateChanged += (value) =>
+            {
+                //缃戠粶鍙樺寲
+                this.NetworkStateChanged(value);
+            };
+#endif
+
+#if iOS
+            //寮�鍚洃鍚琁OS缃戠粶鍙樺寲
+            GateWay.Ios.Reachability.ReachabilityChanged += (sender, e) =>
+            {
+                var internetStatus = GateWay.Ios.Reachability.InternetConnectionStatus();
+                if (internetStatus == GateWay.Ios.NetworkStatus.NotReachable)//娌℃湁缃戠粶杩炴帴 0
+                {
+                    //缃戠粶鍙樺寲
+                    this.NetworkStateChanged(0);
+                }
+                else if (internetStatus == GateWay.Ios.NetworkStatus.ReachableViaCarrierDataNetwork)//3,4G鐨勭綉缁滆繛鎺� 1
+                {
+                    //缃戠粶鍙樺寲
+                    this.NetworkStateChanged(1);
+                }
+                else if (internetStatus == GateWay.Ios.NetworkStatus.ReachableViaWiFiNetwork) //wifi鐨勭綉缁滆繛鎺� 2
+                {
+                    //缃戠粶鍙樺寲
+                    this.NetworkStateChanged(2);
+                }
+            };
+#endif
+        }
+
+        /// <summary>
+        /// 鐩戝惉瀹夊崜缃戠粶鍙樺寲
+        /// </summary>
+        /// <param name="value"></param>
+        private void NetworkStateChanged(int value)
+        {
+            //娌℃湁缃戠粶
+            if (value == 0)
+            {
+                this.CanAccessHttp = false;
+            }
+            //鍙互鍙�4G
+            else if (value == 1)
+            {
+                this.CanAccessHttp = true;
+            }
+            //WIFI
+            else if (value == 2)
+            {
+                this.CanAccessHttp = true;
+            }
+        }
+
+        #endregion
+
         #region 鈻� 涓�鑸柟娉昣__________________________
 
 #if Android
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
index 3542581..daed4fb 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -2,8 +2,6 @@
 using Shared.Common;
 using Newtonsoft.Json;
 using Shared.Common.ResponseEntity;
-using System.Threading.Tasks;
-using System.Text.RegularExpressions;
 using System.Collections.Generic;
 using System.Text;
 
@@ -23,30 +21,35 @@
         /// <param name="RequestName">璁块棶鍦板潃</param>
         /// <param name="checkAuthority">鏄惁妫�娴嬫潈闄愶紝璇ュ弬鏁颁笉鑳界渷鐣�</param>
         /// <param name="obj">涓�涓被</param>
-        /// <param name="listNotShowError">
-        /// <pra>涓嶉渶瑕佹樉绀洪敊璇殑閿欒绫诲埆(鎺ュ彛杩斿洖鐨勯敊璇被鍒�),濡傛灉鍖呭惈锛屽垯浼氳繑鍥炪�恡rue銆�</pra>
-        /// <pra>濡傛灉鎸囧畾鏈塏otSetAgain,鍒欎笉浜屾鍙戦��(姣斿鏂綉),鐒跺悗杩斿洖銆恌alse銆�</pra>
-        /// </param>
-        public static async Task<bool> GetResultStatuByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null)
+        /// <param name="listNotShowError">涓嶉渶瑕佹樉绀洪敊璇殑閿欒绫诲埆(鎺ュ彛杩斿洖鐨勯敊璇被鍒�),濡傛灉鍖呭惈锛屽垯浼氳繑鍥炪�恡rue銆�</param>
+        /// <param name="setAgain">褰撳彂閫佸け璐ユ椂,鏄惁閲嶅彂,榛樿涓嶉噸鍙�</param>
+        public static bool GetResultStatuByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null, bool setAgain = false)
         {
+            if (HdlWifiLogic.Current.CanAccessHttp == false && setAgain == false)
+            {
+                //褰撳墠鏃犳硶璁块棶缃戠粶(褰撻渶瑕侀噸鏂板彂閫佹椂,璺宠繃杩欎釜鍒ゆ柇)
+                ShowNotNetMsg(listNotShowError);
+                return false;
+            }
             //妫�娴嬫槸鍚﹀凡缁忓畬鎴愯处鍙蜂俊鎭垵濮嬪寲
             if (UserCenterResourse.UserInfo.InitUserInfoSuccess == false)
             {
                 //涓嶇缁撴灉鎬庝箞鏍�,濡傛灉璋冪敤浜嗚繖涓嚱鏁�,闇�瑕侀噸澶磋幏鍙朤oken,鎵�浠ュ繀椤昏繑鍥炲け璐�
-                await ReInitUserAccoutInfo(listNotShowError);
+                ReInitUserAccoutInfo(listNotShowError);
                 return false;
             }
             //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮�
             var connectMode = GetHttpConnectMode(checkAuthority);
             //鑾峰彇浠庢帴鍙i偅閲屽彇鍒扮殑姣旂壒鏁版嵁
-            var byteData = await GettByteResponsePack(RequestName, connectMode, obj);
-            if (byteData == null)
+            var byteData = GettByteResponsePack(RequestName, connectMode, obj);
+            if (byteData == null && setAgain == true)
             {
-                if (listNotShowError != null && listNotShowError.Contains("NotSetAgain") == true)
+                if (setAgain == false)
                 {
+                    //涓嶆寚瀹氶噸鍙�
                     return false;
                 }
-                byteData = await ResetByteRequestHttps(RequestName, checkAuthority, obj);
+                byteData = ResetByteRequestHttps(RequestName, checkAuthority, obj);
                 if (byteData == null)
                 {
                     return false;
@@ -64,31 +67,37 @@
         /// <param name="RequestName">璁块棶鍦板潃</param>
         /// <param name="checkAuthority">鏄惁妫�娴嬫潈闄愶紝璇ュ弬鏁颁笉鑳界渷鐣�</param>
         /// <param name="obj">涓�涓被</param>
-        /// <param name="listNotShowError">
-        /// <pra>涓嶉渶瑕佹樉绀洪敊璇殑閿欒绫诲埆(鎺ュ彛杩斿洖鐨勯敊璇被鍒�),濡傛灉鍖呭惈锛屽垯浼氳繑鍥炪�怱uccess銆�</pra>
-        /// <pra>濡傛灉鎸囧畾鏈塏otSetAgain,鍒欎笉浜屾鍙戦��(姣斿鏂綉),鐒跺悗杩斿洖銆怑rrorEx銆�</pra>
+        /// <param name="listNotShowError">涓嶉渶瑕佹樉绀洪敊璇殑閿欒绫诲埆(鎺ュ彛杩斿洖鐨勯敊璇被鍒�),濡傛灉鍖呭惈锛屽垯浼氳繑鍥炪�恡rue銆�</param>
+        /// <param name="setAgain">褰撳彂閫佸け璐ユ椂,鏄惁閲嶅彂,榛樿涓嶉噸鍙�</param>
         /// </param>
-        public static async Task<string> GetResultCodeByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null)
+        public static string GetResultCodeByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null, bool setAgain = false)
         {
+            if (HdlWifiLogic.Current.CanAccessHttp == false && setAgain == false)
+            {
+                //褰撳墠鏃犳硶璁块棶缃戠粶(褰撻渶瑕侀噸鏂板彂閫佹椂,璺宠繃杩欎釜鍒ゆ柇)
+                ShowNotNetMsg(listNotShowError);
+                return "Error";
+            }
             //妫�娴嬫槸鍚﹀凡缁忓畬鎴愯处鍙蜂俊鎭垵濮嬪寲
             if (UserCenterResourse.UserInfo.InitUserInfoSuccess == false)
             {
                 //涓嶇缁撴灉鎬庝箞鏍�,濡傛灉璋冪敤浜嗚繖涓嚱鏁�,闇�瑕侀噸澶磋幏鍙朤oken,鎵�浠ュ繀椤昏繑鍥炲け璐�
-                await ReInitUserAccoutInfo(listNotShowError);
+                ReInitUserAccoutInfo(listNotShowError);
                 return "Error";
             }
 
             //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮�
             var connectMode = GetHttpConnectMode(checkAuthority);
             //鑾峰彇浠庢帴鍙i偅閲屽彇鍒扮殑姣旂壒鏁版嵁
-            var byteData = await GettByteResponsePack(RequestName, connectMode, obj);
+            var byteData = GettByteResponsePack(RequestName, connectMode, obj);
             if (byteData == null)
             {
-                if (listNotShowError != null && listNotShowError.Contains("NotSetAgain") == true)
+                if (setAgain == false)
                 {
-                    return "ErrorEx";
+                    //涓嶆寚瀹氶噸鍙�
+                    return "Error";
                 }
-                byteData = await ResetByteRequestHttps(RequestName, checkAuthority, obj);
+                byteData = ResetByteRequestHttps(RequestName, checkAuthority, obj);
                 if (byteData == null)
                 {
                     return "Error";
@@ -109,30 +118,36 @@
         /// <param name="RequestName">璁块棶鍦板潃</param>
         /// <param name="checkAuthority">鏄惁妫�娴嬫潈闄愶紝璇ュ弬鏁颁笉鑳界渷鐣�</param>
         /// <param name="obj">涓�涓被</param>
-        /// <param name="listNotShowError">
-        /// <pra>涓嶉渶瑕佹樉绀洪敊璇殑閿欒绫诲埆(鎺ュ彛杩斿洖鐨勯敊璇被鍒�),濡傛灉鍖呭惈锛屽垯浼氳繑鍥炵┖瀛楃涓�</pra>
-        /// <pra>濡傛灉鎸囧畾鏈塏otSetAgain,鍒欎笉浜屾鍙戦��(姣斿鏂綉),鐒跺悗杩斿洖绌哄瓧绗︿覆</pra>
+        /// <param name="listNotShowError">涓嶉渶瑕佹樉绀洪敊璇殑閿欒绫诲埆(鎺ュ彛杩斿洖鐨勯敊璇被鍒�),濡傛灉鍖呭惈锛屽垯浼氳繑鍥炪�恡rue銆�</param>
+        /// <param name="setAgain">褰撳彂閫佸け璐ユ椂,鏄惁閲嶅彂,榛樿涓嶉噸鍙�</param>
         /// </param>
-        public static async Task<string> GetResponseDataByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null)
+        public static string GetResponseDataByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null, bool setAgain = false)
         {
+            if (HdlWifiLogic.Current.CanAccessHttp == false && setAgain == false)
+            {
+                //褰撳墠鏃犳硶璁块棶缃戠粶(褰撻渶瑕侀噸鏂板彂閫佹椂,璺宠繃杩欎釜鍒ゆ柇)
+                ShowNotNetMsg(listNotShowError);
+                return null;
+            }
             //妫�娴嬫槸鍚﹀凡缁忓畬鎴愯处鍙蜂俊鎭垵濮嬪寲
             if (UserCenterResourse.UserInfo.InitUserInfoSuccess == false)
             {
                 //涓嶇缁撴灉鎬庝箞鏍�,濡傛灉璋冪敤浜嗚繖涓嚱鏁�,闇�瑕侀噸澶磋幏鍙朤oken,鎵�浠ュ繀椤昏繑鍥炲け璐�
-                await ReInitUserAccoutInfo(listNotShowError);
+                ReInitUserAccoutInfo(listNotShowError);
                 return null;
             }
             //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮�
             var connectMode = GetHttpConnectMode(checkAuthority);
             //鑾峰彇浠庢帴鍙i偅閲屽彇鍒扮殑姣旂壒鏁版嵁
-            var byteData = await GettByteResponsePack(RequestName, connectMode, obj);
+            var byteData = GettByteResponsePack(RequestName, connectMode, obj);
             if (byteData == null)
             {
-                if (listNotShowError != null && listNotShowError.Contains("NotSetAgain") == true)
+                if (setAgain == false)
                 {
-                    return string.Empty;
+                    //涓嶆寚瀹氶噸鍙�
+                    return null;
                 }
-                byteData = await ResetByteRequestHttps(RequestName, checkAuthority, obj);
+                byteData = ResetByteRequestHttps(RequestName, checkAuthority, obj);
                 if (byteData == null)
                 {
                     return null;
@@ -159,32 +174,36 @@
         /// <param name="RequestName">璁块棶鍦板潃</param>
         /// <param name="checkAuthority">鏄惁妫�娴嬫潈闄愶紝璇ュ弬鏁颁笉鑳界渷鐣�</param>
         /// <param name="obj">涓�涓被</param>
-        /// <param name="listNotShowError">
-        /// <pra>涓嶉渶瑕佹樉绀洪敊璇殑閿欒绫诲埆(鎺ュ彛杩斿洖鐨勯敊璇被鍒�),濡傛灉鍖呭惈锛屽垯浼氳繑鍥炵┖瀛楃涓�</pra>
-        /// <pra>濡傛灉鎸囧畾鏈塏otSetAgain,鍒欎笉浜屾鍙戦��(姣斿鏂綉),鐒跺悗杩斿洖null</pra>
-        /// </param>
-        public static async Task<byte[]> GetByteResponseDataByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null)
+        /// <param name="listNotShowError">涓嶉渶瑕佹樉绀洪敊璇殑閿欒绫诲埆(鎺ュ彛杩斿洖鐨勯敊璇被鍒�),濡傛灉鍖呭惈锛屽垯浼氳繑鍥炪�恡rue銆�</param>
+        /// <param name="setAgain">褰撳彂閫佸け璐ユ椂,鏄惁閲嶅彂,榛樿涓嶉噸鍙�</param>
+        public static byte[] GetByteResponseDataByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null, bool setAgain = false)
         {
+            if (HdlWifiLogic.Current.CanAccessHttp == false && setAgain == false)
+            {
+                //褰撳墠鏃犳硶璁块棶缃戠粶(褰撻渶瑕侀噸鏂板彂閫佹椂,璺宠繃杩欎釜鍒ゆ柇)
+                ShowNotNetMsg(listNotShowError);
+                return null;
+            }
             //妫�娴嬫槸鍚﹀凡缁忓畬鎴愯处鍙蜂俊鎭垵濮嬪寲
             if (UserCenterResourse.UserInfo.InitUserInfoSuccess == false)
             {
                 //涓嶇缁撴灉鎬庝箞鏍�,濡傛灉璋冪敤浜嗚繖涓嚱鏁�,闇�瑕侀噸澶磋幏鍙朤oken,鎵�浠ュ繀椤昏繑鍥炲け璐�
-                await ReInitUserAccoutInfo(listNotShowError);
+                ReInitUserAccoutInfo(listNotShowError);
                 return null;
             }
             //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮�
             var connectMode = GetHttpConnectMode(checkAuthority);
             //鑾峰彇浠庢帴鍙i偅閲屽彇鍒扮殑姣旂壒鏁版嵁
-            var revertObj = await GettByteResponsePack(RequestName, connectMode, obj);
+            var revertObj = GettByteResponsePack(RequestName, connectMode, obj);
 
             if (revertObj == null)
             {
-                if (listNotShowError != null && listNotShowError.Contains("NotSetAgain") == true)
+                if (setAgain == false)
                 {
+                    //涓嶆寚瀹氶噸鍙�
                     return null;
                 }
-                //閲嶆柊鍙戦��
-                revertObj = await ResetByteRequestHttps(RequestName, checkAuthority, obj);
+                revertObj = ResetByteRequestHttps(RequestName, checkAuthority, obj);
                 if (revertObj == null)
                 {
                     return null;
@@ -216,7 +235,7 @@
         /// <param name="checkAuthority">鏄惁妫�娴嬫潈闄愶紝璇ュ弬鏁颁笉鑳界渷鐣�</param>
         /// <param name="obj">涓�涓被</param>
         /// <returns></returns>
-        private static async Task<byte[]> ResetByteRequestHttps(string RequestName, bool checkAuthority, object obj)
+        private static byte[] ResetByteRequestHttps(string RequestName, bool checkAuthority, object obj)
         {
             //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮�
             var connectMode = GetHttpConnectMode(checkAuthority);
@@ -225,9 +244,9 @@
             int count = 0;
             while (true)
             {
-                await Task.Delay(1000);
+                System.Threading.Thread.Sleep(1000);
                 //璋冪敤鎺ュ彛
-                responsePack = await GettByteResponsePack(RequestName, connectMode, obj);
+                responsePack = GettByteResponsePack(RequestName, connectMode, obj);
                 if (responsePack != null)
                 {
                     break;
@@ -235,13 +254,8 @@
                 count++;
                 if (count == 3)
                 {
-                    Application.RunOnMainThread(() =>
-                    {
-                        //缃戠粶涓嶇ǔ瀹�,璇风◢鍚庡啀璇�
-                        string msg = Language.StringByID(R.MyInternationalizationString.uNetIsUnStabilityAndDoAgain);
-                        var control = new ShowMsgControl(ShowMsgType.Tip, msg);
-                        control.Show();
-                    });
+                    //鏄剧ず娌℃湁缃戠粶鐨凪sg
+                    ShowNotNetMsg(null);
                     break;
                 }
             }
@@ -255,7 +269,7 @@
         /// <param name="RequestName">璁块棶鍦板潃</param>
         /// <param name="connectMode">鎺ュ彛鐨勮繛鎺ユā寮�</param>
         /// <param name="obj">涓�涓被</param>
-        private static async Task<byte[]> GettByteResponsePack(string RequestName, HttpConnectMode connectMode, object obj)
+        private static byte[] GettByteResponsePack(string RequestName, HttpConnectMode connectMode, object obj)
         {
             try
             {
@@ -266,12 +280,12 @@
                 if (connectMode == HttpConnectMode.Normal)
                 {
                     //鏅�氳闂�
-                    result = await CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync(RequestName, Encoding.UTF8.GetBytes(requestJson));
+                    result = CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync(RequestName, Encoding.UTF8.GetBytes(requestJson));
                 }
                 else if (connectMode == HttpConnectMode.Admin)
                 {
                     //浠ョ鐞嗗憳鐨勮韩浠借闂紝鑷韩鏄垚鍛�
-                    result = await CommonPage.Instance.RequestZigbeeHttpsByAdmin(RequestName, Encoding.UTF8.GetBytes(requestJson));
+                    result = CommonPage.Instance.RequestZigbeeHttpsByAdmin(RequestName, Encoding.UTF8.GetBytes(requestJson));
                 }
                 return result;
             }
@@ -299,13 +313,13 @@
             }
             if (revertObj == null)
             {
-                Application.RunOnMainThread(() =>
+                HdlThreadLogic.Current.RunMain(() =>
                 {
                     //缃戠粶涓嶇ǔ瀹�,璇风◢鍚庡啀璇�
                     string msg = Language.StringByID(R.MyInternationalizationString.uNetIsUnStabilityAndDoAgain);
                     var control = new ShowMsgControl(ShowMsgType.Tip, msg);
                     control.Show();
-                });
+                }, ShowErrorMode.NO);
 
                 return false;
             }
@@ -316,7 +330,7 @@
                     //涓嶆樉绀洪敊璇�,鐒跺悗杩斿洖true
                     return true;
                 }
-                Application.RunOnMainThread(() =>
+                HdlThreadLogic.Current.RunMain(() =>
                 {
                     if (HdlCheckLogic.Current.IsAccountLoginOut() == true)
                     {
@@ -332,10 +346,10 @@
                         //鏃犳晥鐧诲綍Token
                         if (revertObj.StateCode == "NoLogin")
                         {
-                            UserCenterLogic.ReLoginAgain(Config.Instance.Account, false);
+                            ReLoginAgain(Config.Instance.Account, false);
                         }
                     }
-                });
+                }, ShowErrorMode.NO);
 
                 return false;
             }
@@ -358,6 +372,25 @@
                 return HttpConnectMode.Admin;
             }
             return HttpConnectMode.Normal;
+        }
+
+        /// <summary>
+        /// 鏄剧ず娌℃湁缃戠粶鐨凪sg
+        /// </summary>
+        private static void ShowNotNetMsg(List<string> listNotShowError)
+        {
+            if (listNotShowError != null && listNotShowError.Contains("NotCheck") == true)
+            {
+                //涓嶆娴�
+                return;
+            }
+            HdlThreadLogic.Current.RunMain(() =>
+            {
+                // 褰撳墠鏃犵綉缁滆繛鎺�,璇风‘璁ょ綉缁�
+                string msg = Language.StringByID(R.MyInternationalizationString.uNowIsDonotNetworkAndCheckNetwork);
+                var control = new ShowMsgControl(ShowMsgType.Tip, msg);
+                control.Show();
+            }, ShowErrorMode.NO);
         }
 
         #endregion
@@ -648,12 +681,12 @@
             //娓呴櫎鍗囩骇鍒楄〃
             FirmwareUpdateResourse.dicUpdateList.Clear();
 
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //妫�娴婣PP鏄惁鑳藉閫�鍑�
                 while (UserCenterResourse.AccountOption.AppCanSignout == false)
                 {
-                    await Task.Delay(500);
+                    System.Threading.Thread.Sleep(500);
                 }
                 //璁惧畾涓�涓椂闂�
                 Config.Instance.LoginDateTime = new DateTime(1970, 1, 1);
@@ -685,7 +718,7 @@
                 if (noticeDb == true)
                 {
                     //閫氱煡浜戠锛屽凡缁忛��鍑虹櫥闄�
-                    var result = await CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync("ZigbeeUsers/SignOut", null, "GET");
+                    var result = CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync("ZigbeeUsers/SignOut", null, "GET");
                 }
             });
         }
@@ -835,10 +868,13 @@
         /// </summary>
         /// <param name="ShowPrompted">鏂拌拷鍔犲彉閲忥細鏄惁鏄剧ず鎻愮ず鑷姩澶囦唤鐨勭晫闈�</param>
         /// <returns></returns>
-        public async static Task<bool> InitUserCenterMenmoryAndThread(bool ShowPrompted = true)
+        public static bool InitUserCenterMenmoryAndThread(bool ShowPrompted = true)
         {
             //璋冪敤杩欎釜鏂规硶,閮介渶瑕侀噸鏂板埛鏂颁富椤�
             UserView.UserPage.Instance.RefreshForm = true;
+
+            //娣诲姞缃戠粶鐘舵�佺洃鍚�
+            HdlWifiLogic.Current.StartListenNetWork();
 
             //濡傛灉鏄櫄鎷熶綇瀹�
             if (Config.Instance.Home.IsVirtually == true)
@@ -876,18 +912,15 @@
                 UserCenterResourse.ResidenceOption = UserCenterResourse.ResidenceOption.Load();
 
                 //鍒濆鍖栫櫥闄嗚处鍙风殑淇℃伅
-                var hadNet = await InitUserAccoutInfo(true);
+                var hadNet = InitUserAccoutInfo(true);
                 //濡傛灉鏈夌綉缁滅殑璇�
                 if (hadNet == 1)
                 {
                     //閲嶆柊鍙戦�佸懡浠ゅ幓缁戝畾鏂綉鎯呭喌涓嬪浠界殑缃戝叧
                     HdlGatewayLogic.Current.ResetComandToBindBackupGateway();
                     //璇诲彇闅愬尶閰嶇疆
-                    await HdlBackupLogic.Current.LoadHideOption();
+                    HdlBackupLogic.Current.LoadHideOption();
                 }
-
-                //鍒濆鍖栫紦瀛樻垚鍛樼殑淇℃伅
-                InitLocalMemberListInfo();
 
                 //棰勫垱寤轰釜浜轰腑蹇冨叏閮ㄧ殑鏂囦欢澶�
                 CreatAllUserCenterDirectory();
@@ -907,7 +940,7 @@
                 int result = -1;
                 if (hadNet == 1)
                 {
-                    result = await HdlAutoBackupLogic.SynchronizeDbAutoBackupData();
+                    result = HdlAutoBackupLogic.SynchronizeDbAutoBackupData();
                 }
 
                 //鍒濆鍖栨湰鍦扮殑缃戝叧淇℃伅
@@ -996,7 +1029,7 @@
         /// </summary>
         /// <param name="reLoad">鏄惁浠庢柊浠庢湰鍦板姞杞�(閲嶆柊鍒濆鍖栫櫥闄嗚处鍙风殑淇℃伅,涓嶉渶瑕侀噸鏂板姞杞�)</param>
         /// <returns></returns>
-        private async static Task<int> InitUserAccoutInfo(bool reLoad)
+        private static int InitUserAccoutInfo(bool reLoad)
         {
             //鍒濆鍖栦釜浜轰俊鎭殑鏍囪瘑
             UserCenterResourse.UserInfo.InitUserInfoSuccess = false;
@@ -1006,13 +1039,18 @@
                 UserCenterResourse.UserInfo = GetUserInformationFromLocation();
                 UserCenterResourse.UserInfo.UserIconFile = System.IO.Path.Combine(UserCenterResourse.AccountOption.UserPictruePath, "Admin.png");
             }
+            if (HdlWifiLogic.Current.CanAccessHttp == false)
+            {
+                //鏃犳硶杩炴帴澶栫綉
+                return -1;
+            }
 
             //鑾峰彇鐧诲綍璐﹀彿鐨勪俊鎭�
             var pra = new AccountInfoPra();
             //搴忓垪鍖栧璞�
             var requestJson = JsonConvert.SerializeObject(pra);
             //璁块棶鎺ュ彛
-            byte[] byteData = await CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync("ZigbeeUsers/GetAccountInfo", Encoding.UTF8.GetBytes(requestJson));
+            byte[] byteData = CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync("ZigbeeUsers/GetAccountInfo", Encoding.UTF8.GetBytes(requestJson));
             if (byteData == null)
             {
                 return -1;
@@ -1098,7 +1136,7 @@
             UserCenterResourse.UserInfo.StringPwd = null;
 
             //鍒濆鍖栫鐞嗗憳鎺у埗涓讳汉鐨勮繛鎺ュ湴鍧�(鍥犱负杩欎釜杩炴帴Token鏄笉浼氭敼鍙樼殑,鎵�浠ュ彧闇�瑕佸垵濮嬪寲涓�娆�)
-            var flage = await InitAdminConnectMainInfo();
+            var flage = InitAdminConnectMainInfo();
             //鍒濆鍖栦釜浜轰俊鎭殑鏍囪瘑
             UserCenterResourse.UserInfo.InitUserInfoSuccess = flage == 1;
 
@@ -1125,17 +1163,16 @@
         /// 閲嶆柊鍒濆鍖栫櫥闄嗚处鍙风殑淇℃伅(鏃ㄥ湪瀵瑰簲閭d竴鐬棿,缃戠粶涓嶅ソ,瀵艰嚧璇垽鐨勬儏鍐�)
         /// </summary>
         /// <returns></returns>
-        private async static Task<bool> ReInitUserAccoutInfo(List<string> listNotShowError)
+        private static bool ReInitUserAccoutInfo(List<string> listNotShowError)
         {
             //閲嶆柊鍒濆鍖栬处鍙蜂俊鎭�
-            var result = await InitUserAccoutInfo(false);
+            var result = InitUserAccoutInfo(false);
             //杩炴帴涓嶄簡澶栫綉鐨勬椂鍊�
             if (result == -1)
             {
-                if (listNotShowError != null &&
-                    (listNotShowError.Contains("NotSetAgain") == true || listNotShowError.Contains("NotCheck") == true))
+                if (listNotShowError != null && listNotShowError.Contains("NotCheck") == true)
                 {
-                    //鏈夎繖涓や釜鏍囪瘑鏃�,涓嶆彁绀洪敊璇�
+                    //鏈夎繖涓爣璇嗘椂,涓嶆彁绀洪敊璇�
                     return false;
                 }
                 Application.RunOnMainThread(() =>
@@ -1188,7 +1225,7 @@
         /// 鍒濆鍖栫鐞嗗憳鏉冮檺杩滅▼杩炴帴涓讳汉鐨勪俊鎭� -1:鏃犵綉 1:姝e父 2:鍏朵粬閿欒
         /// </summary>
         /// <returns></returns>
-        private static async Task<int> InitAdminConnectMainInfo()
+        private static int InitAdminConnectMainInfo()
         {
             if (UserCenterResourse.UserInfo.AuthorityNo != 2 && UserCenterResourse.UserInfo.AuthorityNo != 3)
             {
@@ -1206,7 +1243,7 @@
             //搴忓垪鍖栧璞�
             var requestJson = JsonConvert.SerializeObject(pra);
             //璁块棶鎺ュ彛
-            byte[] byteData = await CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync("App/GetSharedHomeApiControl", Encoding.UTF8.GetBytes(requestJson));
+            byte[] byteData = CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync("App/GetSharedHomeApiControl", Encoding.UTF8.GetBytes(requestJson));
             if (byteData == null)
             {
                 return -1;
@@ -1224,39 +1261,6 @@
             Config.Instance.AdminRequestToken = info.RequestToken;
 
             return 1;
-        }
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖栫紦瀛樻垚鍛樼殑淇℃伅_______________
-
-        /// <summary>
-        /// 鍒濆鍖栫紦瀛樻垚鍛樼殑淇℃伅
-        /// </summary>
-        private static void InitLocalMemberListInfo()
-        {
-            //鍏堟竻绌�
-            UserCenterResourse.ListMemberInfo.Clear();
-            string fileName = CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.MemberListInfoFile);
-            if (System.IO.File.Exists(fileName) == false)
-            {
-                return;
-            }
-            var varByte = Shared.IO.FileUtils.ReadFile(fileName);
-            UserCenterResourse.ListMemberInfo = JsonConvert.DeserializeObject<List<MemberInfoRes>>(System.Text.Encoding.UTF8.GetString(varByte));
-        }
-
-        /// <summary>
-        /// 淇濆瓨缂撳瓨鎴愬憳鐨勪俊鎭�
-        /// </summary>
-        public static void SaveLocalMemberListInfo()
-        {
-            var data = Newtonsoft.Json.JsonConvert.SerializeObject(UserCenterResourse.ListMemberInfo);
-            var byteData = System.Text.Encoding.UTF8.GetBytes(data);
-
-            string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.MemberListInfoFile);
-            //鍐欏叆鍐呭
-            Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
index 876de3c..31507b1 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
@@ -79,10 +79,6 @@
         /// </summary>
         public const string DryContactFunctionFile = "10afbada0199511de13edc60259ed03e6ebc817d8a53adce";
         /// <summary>
-        /// 淇濆瓨鎴愬憳鍒楄〃淇℃伅鐨勩�愭枃浠躲��
-        /// </summary>
-        public const string MemberListInfoFile = "84cee4c17e97d9af86e4778aeecae01cc0ab6d9f3409478c";
-        /// <summary>
         /// 瀛樻斁鐢ㄦ埛鍥剧墖鐨勩�愭枃浠跺す銆�
         /// </summary>
         public const string UserPictrueDirectory = "e3263f227598072fef2a204fb1656cd2";
@@ -147,5 +143,12 @@
         /// 鍔熻兘澶囦唤鐨勫悕瀛�  杩欎釜涓滆タ涓嶅姞瀵�
         /// </summary>
         public const string OptionBackupName = "##Option##";
+        /// <summary>
+        /// 璁板綍鍙戦�佸拰鎺ユ敹鐨勬暟鎹甃og
+        /// </summary>
+        public static string SendAndReceveDataLog
+        {
+            get { return System.IO.Path.Combine(Common.Config.Instance.FullPath, LocalMemoryDirectory, "SendAndReceveLog.log"); }
+        }
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/UserCenterResourse.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/UserCenterResourse.cs
index 5ee5159..38bb2ef 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/UserCenterResourse.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/UserCenterResourse.cs
@@ -14,11 +14,7 @@
         /// 鐢婚潰鎵撳紑鏃讹紝浼氳嚜鍔ㄨ拷鍑伙紝鐢婚潰鍏抽棴鏃讹紝鑷姩绉婚櫎銆�
         /// Key:鐢婚潰鐨処D锛屽垪濡傦細UserMainForm
         /// </summary>
-        public static Dictionary<string, CommonFormBase> DicActionForm = new Dictionary<string, CommonFormBase>();
-        /// <summary>
-        /// 鎴愬憳鍒楄〃鐨勪俊鎭�
-        /// </summary>
-        public static List<MemberInfoRes> ListMemberInfo = new List<MemberInfoRes>();
+        public static Dictionary<string, CommonFormBase> DicActionForm = new Dictionary<string, CommonFormBase>();
         /// <summary>
         /// 褰撳墠姝e湪鎿嶄綔鐨勭敾闈D(姝ゅ彉閲忓涓存椂鏂綉鏃�,闈炲父閲嶈,娌′汉浼氭噦瀹冧负浣曡瀛樺湪)
         /// </summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
index 3683150..4e36633 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
@@ -826,18 +826,31 @@
             string gwId = GatewayResourse.NowSelectGatewayId;
             HdlThreadLogic.Current.RunThread(() =>
             {
-                System.Threading.Thread.Sleep(2000);
-                //杩欓噷涓昏鍙槸鑾峰彇鍦ㄧ嚎鐘舵��
-                var list = LocalDevice.Current.GetDeviceOnlineList(gwId);
-                HdlThreadLogic.Current.RunMain(() =>
+                if (this.Parent == null) { return; }
+                //鑾峰彇璁惧鍒楄〃
+                var listDevice = Common.LocalDevice.Current.GetDeviceByGatewayID(gwId);
+                var listCheck = new List<string>();
+                foreach (var device in listDevice)
                 {
-                    for (int i = 0; i < list.Count; i++)
+                    if (this.Parent == null) { return; }
+                    if (listCheck.Contains(device.DeviceAddr) == false)
                     {
-                        //璁剧疆璁惧鍦ㄧ嚎鐘舵��
-                        this.ReceiveDeviceStatu(list[i]);
+                        //鍙涓�涓洖璺嵆鍙�
+                        listCheck.Add(device.DeviceAddr);
+                        var deviceInfo = Common.LocalDevice.Current.ReadDeviceEpointDeviceInfo(device);
+                        if (deviceInfo != null)
+                        {
+                            //鍙樻洿鍦ㄧ嚎鐘舵��
+                            device.IsOnline = deviceInfo.IsOnline;
+                            HdlThreadLogic.Current.RunMain(() =>
+                            {
+                                //璁剧疆璁惧鍦ㄧ嚎鐘舵��
+                                this.ReceiveDeviceStatu(device);
+                            }, ShowErrorMode.NO);
+                        }
+                        System.Threading.Thread.Sleep(30);
                     }
-
-                }, ShowErrorMode.NO);
+                }
             });
         }
 
@@ -861,13 +874,8 @@
             var localDevice = Common.LocalDevice.Current.GetDevice(mainkeys);
             if (localDevice != null)
             {
-                //鍦ㄧ嚎鐘舵�佷竴鏍风殑璇濓紝涓嶉渶瑕佸埛鏂�
-                if (localDevice.IsOnline != device.IsOnline)
-                {
-                    //淇濆瓨鐘舵��
-                    localDevice.IsOnline = device.IsOnline;
-                    localDevice.ReSave();
-                }
+                //淇濆瓨鐘舵��
+                localDevice.IsOnline = device.IsOnline;
             }
 
             rowInfo.MenuRow.IsOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(device);
@@ -936,9 +944,9 @@
         /// <param name="list">ota璁惧</param>
         private void CheckDeviceNewVersion(List<OTADevice> list)
         {
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
-                await System.Threading.Tasks.Task.Delay(2000);
+                System.Threading.Thread.Sleep(2000);
                 foreach (var ota in list)
                 {
                     if (this.Parent == null)
@@ -946,7 +954,7 @@
                         return;
                     }
                     //娣诲姞鍗囩骇鍥轰欢淇℃伅(鎴愪笉鎴愬姛閮芥棤鎵�璋�)
-                    var result = await HdlFirmwareUpdateLogic.AddFirmwareVersionInfo(FirmwareLevelType.ZigbeeDevice, ota.HwVersion.ToString(), ota.ImgTypeId.ToString());
+                    var result = HdlFirmwareUpdateLogic.AddFirmwareVersionInfo(FirmwareLevelType.ZigbeeDevice, ota.HwVersion.ToString(), ota.ImgTypeId.ToString());
 
                     //鑾峰彇璁惧鏈�鏂扮増鏈�
                     var deviceFirmware = HdlFirmwareUpdateLogic.GetFirmwareMostVersionInfo(FirmwareLevelType.ZigbeeDevice,
@@ -960,7 +968,7 @@
                     }
 
                     //鎷ユ湁鏂扮増鏈�
-                    Application.RunOnMainThread(() =>
+                    HdlThreadLogic.Current.RunMain(() =>
                     {
                         if (this.dicRowInfo.ContainsKey(ota.DeviceAddr) == true)
                         {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
index 721ae90..abcd1c3 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -1400,7 +1400,7 @@
         /// <param name="oTADevice">ota璁惧</param>
         private void SetDeviceVersionInfo(PicViewControl btnNewVersion, OTADevice oTADevice)
         {
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 bool receiveImageInfo = false;
                 //璁剧疆璁惧鍏ㄩ儴鐨勯暅鍍忎俊鎭�
@@ -1412,7 +1412,7 @@
                 while (receiveImageInfo == false && count > 0)
                 {
                     //绛夊緟璁惧闀滃儚鐨勫弽棣�
-                    await Task.Delay(300);
+                    System.Threading.Thread.Sleep(300);
                     count--;
                 }
                 //绉婚櫎浜嬩欢
@@ -1420,7 +1420,7 @@
 
                 oTADevice = Common.LocalDevice.Current.GetOTADevice(listNewDevice[0].DeviceAddr);
                 //娣诲姞鍗囩骇鍥轰欢淇℃伅(鎴愪笉鎴愬姛閮芥棤鎵�璋�)
-                var result = await HdlFirmwareUpdateLogic.AddFirmwareVersionInfo(FirmwareLevelType.ZigbeeDevice, oTADevice.HwVersion.ToString(), oTADevice.ImgTypeId.ToString());
+                var result = HdlFirmwareUpdateLogic.AddFirmwareVersionInfo(FirmwareLevelType.ZigbeeDevice, oTADevice.HwVersion.ToString(), oTADevice.ImgTypeId.ToString());
 
                 //鑾峰彇璁惧鏈�鏂扮増鏈�
                 var deviceFirmware = HdlFirmwareUpdateLogic.GetFirmwareMostVersionInfo(FirmwareLevelType.ZigbeeDevice,
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs
index c096739..85edc36 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs
@@ -183,6 +183,11 @@
             objectText = Language.StringByID(R.MyInternationalizationString.uDeviceDirectionName23);
             unSelectPic = "Device/SensorTemperatureHumidity.png";
             this.AddMenuRow(objectText, unSelectPic, "SensorTemperatureHumidityForm");
+
+            //鐞冨瀷绉诲姩浼犳劅鍣�
+            objectText = Language.StringByID(R.MyInternationalizationString.uDeviceDirectionName30);
+            unSelectPic = "Device/SensorSphericalMotion.png";
+            this.AddMenuRow(objectText, unSelectPic, "SensorSphericalMotionDirectionForm");
 
             //PM2.5绌烘皵璐ㄩ噺浼犳劅鍣�
             objectText = Language.StringByID(R.MyInternationalizationString.uDeviceDirectionName27);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorSphericalMotionDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorSphericalMotionDirectionForm.cs
new file mode 100755
index 0000000..fc75ee2
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorSphericalMotionDirectionForm.cs
@@ -0,0 +1,87 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter.DeviceDirection
+{
+    /// <summary>
+    /// 鐞冨瀷绉诲姩浼犳劅鍣ㄧ殑娣诲姞姝ラ鐣岄潰
+    /// </summary>
+    public class SensorSphericalMotionDirectionForm: DirectionCommonForm
+    {
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        public void ShowForm()
+        {
+            //璁剧疆澶撮儴淇℃伅
+            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice));
+
+            //鍒濆鍖栦腑閮ㄤ俊鎭�
+            this.InitMiddleFrame();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+        /// </summary>
+        private void InitMiddleFrame()
+        {
+            //鍥剧墖
+            var framePic = new FrameLayout();
+            framePic.Width = this.GetPictrueRealSize(879);
+            framePic.Height = this.GetPictrueRealSize(753);
+            framePic.Gravity = Gravity.CenterHorizontal;
+            framePic.Y = Application.GetRealHeight(153);
+            bodyFrameLayout.AddChidren(framePic);
+            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
+            btnPic.UnSelectedImagePath = "Instruct/SensorSphericalMotion.png";
+            framePic.AddChidren(btnPic);
+
+            //鎸囩ず鐏彉缁裤�侀棯鐑�
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(506), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.Y = this.GetPictrueRealSize(370);
+            btnGreanLinght.TextAlignment = TextAlignment.Center;
+            btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnGreanLinght.TextSize = 10;
+            btnGreanLinght.TextID = R.MyInternationalizationString.uPilotLinghtInCreanAndLinght;
+            framePic.AddChidren(btnGreanLinght);
+
+            //闀挎寜{0}绉�(鎸夐敭)
+            var btnButton = new NormalViewControl(this.GetPictrueRealSize(250), this.GetPictrueRealSize(90), false);
+            btnButton.X = this.GetPictrueRealSize(757);
+            btnButton.Y = this.GetPictrueRealSize(148);
+            btnButton.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnButton.TextSize = 10;
+            btnButton.Text = Language.StringByID(R.MyInternationalizationString.uLongClickSomeSecond).Replace("{0}", "5");
+            btnButton.Width = btnButton.GetRealWidthByText();
+            btnButton.IsMoreLines = true;
+            btnButton.TextAlignment = TextAlignment.Center;
+            framePic.AddChidren(btnButton);
+            btnButton.Text += "\r\n(" + Language.StringByID(R.MyInternationalizationString.uPanelButton) + ")";
+
+            //闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝鎸囩ず鐏彉缁裤�侀棯鐑�
+            //杩涘叆閰嶇綉鐘舵�侊紝缁跨伅鐔勭伃鍒欓厤缃戞垚鍔�
+            string[] msgArry = Language.StringByID(R.MyInternationalizationString.uAddSensorSphericalMotionMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
+
+            var msg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
+            msg1.Y = Application.GetRealHeight(1037);
+            msg1.Text = msgArry[0];
+            msg1.TextColor = UserCenterColor.Current.TextGrayColor3;
+            msg1.TextAlignment = TextAlignment.Center;
+            bodyFrameLayout.AddChidren(msg1);
+            var msg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
+            msg2.Y = msg1.Bottom;
+            if (msgArry.Length > 1)
+            {
+                msg2.Text = msgArry[1];
+            }
+            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
+            msg2.TextAlignment = TextAlignment.Center;
+            bodyFrameLayout.AddChidren(msg2);
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
index dc06e7d..6fff409 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
@@ -1,7 +1,6 @@
 锘縰sing System;
 using System.Collections.Generic;
 using System.Text;
-using System.Threading.Tasks;
 using ZigBee.Device;
 
 namespace Shared.Phone.UserCenter.DeviceDoorLock
@@ -223,12 +222,12 @@
                 this.listHistoryInfo = null;
             }
 
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鎵撳紑杩涘害鏉�
                 this.ShowProgressBar();
                 //鎴愬憳鍒楄〃
-                var result = await this.GetMemberListInfo();
+                var result = this.GetMemberListInfo();
                 if (result == false)
                 {
                     //鍏抽棴杩涘害鏉�
@@ -242,7 +241,7 @@
                     dicMemberName.Add(listMenberInfo[i].SubAccountDistributedMark, string.IsNullOrEmpty(listMenberInfo[i].UserName) == false ? listMenberInfo[i].UserName : listMenberInfo[i].Account);
                 }
                 //鍘嗗彶璁板綍
-                var historyLog = await this.GetHistoryLogInfo(dicMemberName);
+                var historyLog = this.GetHistoryLogInfo(dicMemberName);
                 if (historyLog == null)
                 {
                     //鍏抽棴杩涘害鏉�
@@ -276,7 +275,7 @@
         /// 鑾峰彇鎴愬憳鍒楄〃淇℃伅
         /// </summary>
         /// <returns></returns>
-        private async Task<bool> GetMemberListInfo()
+        private bool GetMemberListInfo()
         {
             if (listMenberInfo != null)
             {
@@ -299,8 +298,8 @@
             }
 
             var pra = new MemberListInfoPra();
-            string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
-            if (result == null)
+            string result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
+            if (string.IsNullOrEmpty(result) == true)
             {
                 return false;
             }
@@ -585,7 +584,7 @@
         /// 鑾峰彇鍘嗗彶璁板綍
         /// </summary>
         /// <returns></returns>
-        private async Task<List<HistoryInfo>> GetHistoryLogInfo(Dictionary<string, string> dicMemberName)
+        private List<HistoryInfo> GetHistoryLogInfo(Dictionary<string, string> dicMemberName)
         {
             if (this.listHistoryInfo != null)
             {
@@ -596,9 +595,9 @@
             var pra = this.GetReadHistoryPra();
 
             //鑾峰彇闂ㄩ攣鐨勬墦寮�鍜屽叧闂褰�
-            var listAllLog = await this.GetDoorOpenHistoryLog(pra);
+            var listAllLog = this.GetDoorOpenHistoryLog(pra);
             //鑾峰彇闂ㄩ攣鐨勫叾浠栬褰�
-            var listOtherLog = await this.GetDoorOtherHistoryLog(pra.UnlockTimeBegin, pra.UnlockTimeEnd);
+            var listOtherLog = this.GetDoorOtherHistoryLog(pra.UnlockTimeBegin, pra.UnlockTimeEnd);
             listAllLog.AddRange(listOtherLog);
 
             //鎺掑簭涓�涓�
@@ -632,7 +631,7 @@
         /// </summary>
         /// <param name="i_pra"></param>
         /// <returns></returns>
-        private async Task<List<HistoryInfo>> GetDoorOpenHistoryLog(GetHistoryDataPra i_pra)
+        private List<HistoryInfo> GetDoorOpenHistoryLog(GetHistoryDataPra i_pra)
         {
             var listLog = new List<HistoryInfo>();
 
@@ -640,8 +639,8 @@
             while (true)
             {
                 //璁块棶浜戠
-                var result = await UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/GetDoorLockHistoryPager", true, i_pra);
-                if (result == null)
+                var result = UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/GetDoorLockHistoryPager", true, i_pra);
+                if (string.IsNullOrEmpty(result) == true)
                 {
                     return null;
                 }
@@ -680,7 +679,7 @@
         /// 鑾峰彇闂ㄩ攣鐨勫叾浠栬褰�
         /// </summary>
         /// <returns></returns>
-        private async Task<List<HistoryInfo>> GetDoorOtherHistoryLog(string beginTime, string endTime)
+        private List<HistoryInfo> GetDoorOtherHistoryLog(string beginTime, string endTime)
         {
             var listLog = new List<HistoryInfo>();
 
@@ -690,8 +689,8 @@
             pra2.EndTime = endTime;
             pra2.Topic = "/Alarms/SendAlarmInform";
             pra2.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
-            var result = await UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2);
-            if (result == null)
+            var result = UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2);
+            if (string.IsNullOrEmpty(result) == true)
             {
                 return null;
             }
@@ -699,8 +698,8 @@
 
             //浠庤嚜鍔ㄥ寲涓�,鑾峰彇甯稿紑妯″紡璁板綍
             pra2.Topic = "/Logic/Execute_Respon";
-            result = await UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2);
-            if (result == null)
+            result = UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2);
+            if (string.IsNullOrEmpty(result) == true)
             {
                 return null;
             }
@@ -708,8 +707,8 @@
 
             //鑾峰彇闂ㄩ攣涓存椂瀵嗙爜寮�閿佽褰�
             pra2.Topic = "/DoorLock/DoorLockOperatingEventNotificationCommand";
-            result = await UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2);
-            if (result == null)
+            result = UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2);
+            if (string.IsNullOrEmpty(result) == true)
             {
                 return null;
             }
@@ -868,14 +867,14 @@
         /// <summary>
         /// 娓呯┖鎵�鏈夎褰�
         /// </summary>
-        private async void ClearAllHistoryLog()
+        private void ClearAllHistoryLog()
         {
             //鑾峰彇璁块棶浜戠鎺ュ彛鐨勫惎鍔ㄥ弬鏁�(2020.05.08:鍏ㄩ儴娓呯┖)
             var pra = this.GetDeleteDataPra();
 
             //鎵撳紑杩涘害鏉�
             this.ShowProgressBar();
-            var result = await UserCenterLogic.GetResultStatuByRequestHttps("DoorLock/ClearDoorLockHistory", true, pra);
+            var result = UserCenterLogic.GetResultStatuByRequestHttps("DoorLock/ClearDoorLockHistory", true, pra);
             if (result == false)
             {
                 return;
@@ -889,7 +888,7 @@
                 for (int i = 0; i < listOtherMsgId.Count; i++)
                 {
                     pra2.Id = listOtherMsgId[i];
-                    result = await UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/DelMessageCenterItem", true, pra2);
+                    result = UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/DelMessageCenterItem", true, pra2);
                     if (result == false)
                     {
                         return;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs
index 1f1b42d..3b8829a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs
@@ -85,7 +85,7 @@
         /// <summary>
         /// 浠庝簯绔幏鍙栨暟鎹�
         /// </summary>
-        private async void SetBackupInfoToForm()
+        private void SetBackupInfoToForm()
         {
             this.nowSelectBackId = string.Empty;
             this.nowbtnSelect = null;
@@ -94,7 +94,7 @@
             this.ShowProgressBar();
 
             //鑾峰彇鑷姩澶囦唤鐨勬暟鎹�
-            var pageAuto = await HdlBackupLogic.Current.GetBackupListNameFromDB(3, realGateway.GwId);
+            var pageAuto = HdlBackupLogic.Current.GetBackupListNameFromDB(3, realGateway.GwId);
             if (pageAuto == null)
             {
                 //鍏抽棴杩涘害鏉�
@@ -103,7 +103,7 @@
             }
 
             //浠庝簯绔幏鍙栨暟鎹� 
-            var pageData = await HdlBackupLogic.Current.GetBackupListNameFromDB(2, realGateway.GwId);
+            var pageData = HdlBackupLogic.Current.GetBackupListNameFromDB(2, realGateway.GwId);
             if (pageData == null)
             {
                 //鍏抽棴杩涘害鏉�
@@ -263,7 +263,7 @@
         /// </summary>
         /// <param name="BackupClassId"></param>
         /// <param name="backName"></param>
-        private async void EditorBackInfo(string BackupClassId, string backName)
+        private void EditorBackInfo(string BackupClassId, string backName)
         {
             var Pra = new EditorBackUpNamePra();
             Pra.BackupClassId = BackupClassId;
@@ -271,13 +271,17 @@
             //鑾峰彇鎺у埗涓讳汉璐﹀彿鐨凾oken
             Pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-            bool result = await UserCenterLogic.GetResultStatuByRequestHttps("App/UpdateHomeAppGatewayName", true, Pra);
+            bool result = UserCenterLogic.GetResultStatuByRequestHttps("App/UpdateHomeAppGatewayName", true, Pra);
             if (result == false)
             {
                 return;
             }
 
-            this.SetBackupInfoToForm();
+            HdlThreadLogic.Current.RunThread(() =>
+            {
+                //浠庝簯绔幏鍙栨暟鎹�
+                this.SetBackupInfoToForm();
+            });
         }
 
         #endregion
@@ -288,9 +292,9 @@
         /// 鍒犻櫎澶囦唤鏂囨。
         /// </summary>
         /// <param name="BackupClassId"></param>
-        private async void DeleteBackInfo(string BackupClassId)
+        private void DeleteBackInfo(string BackupClassId)
         {
-            bool success = await HdlBackupLogic.Current.DeleteDbBackupData(BackupClassId);
+            bool success = HdlBackupLogic.Current.DeleteDbBackupData(BackupClassId);
             if (success == false)
             {
                 return;
@@ -300,7 +304,11 @@
                 this.nowSelectBackId = string.Empty;
                 this.nowbtnSelect = null;
             }
-            this.SetBackupInfoToForm();
+            HdlThreadLogic.Current.RunThread(() =>
+            {
+                //浠庝簯绔幏鍙栨暟鎹�
+                this.SetBackupInfoToForm();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
index ff1fb33..e3971b1 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
@@ -326,10 +326,10 @@
         /// 妫�娴嬫柊鐗堟湰
         /// </summary>
         /// <param name="btnNewVersion">鎻愮ず鏈夋柊鐗堟湰鐨勬帶浠�</param>
-        private async void CheckNewVersion(PicViewControl btnNewVersion)
+        private void CheckNewVersion(PicViewControl btnNewVersion)
         {
             //鑾峰彇缃戝叧鐗堟湰淇℃伅
-            var result = await HdlGatewayLogic.Current.GetGatewayAllNewVersion(this.zbGateway);
+            var result = HdlGatewayLogic.Current.GetGatewayAllNewVersion(this.zbGateway);
             if (result == null)
             {
                 return;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
index 74055ac..1548f15 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
@@ -206,7 +206,7 @@
                 {
                     HdlThreadLogic.Current.RunThread(() =>
                     {
-                        this.DeleteGateway(strWayId, gatewayRow);
+                        this.DeleteGateway(strWayId);
                     });
                 });
             };
@@ -238,7 +238,7 @@
         /// </summary>
         /// <param name="strWayId"></param>
         /// <param name="row"></param>
-        private async void DeleteGateway(string strWayId, GatewayRowControl row)
+        private async void DeleteGateway(string strWayId)
         {
             //鎵撳紑杩涘害鏉�
             this.ShowProgressBar();
@@ -390,7 +390,7 @@
                     continue;
                 }
                 //鑾峰彇鏈�鏂扮増鏈�
-                var result = await HdlGatewayLogic.Current.GetGatewayAllNewVersion(way, ShowErrorMode.NO);
+                var result = HdlGatewayLogic.Current.GetGatewayAllNewVersion(way, ShowErrorMode.NO);
                 if (result == null)
                 {
                     continue;
@@ -399,7 +399,7 @@
                 {
                     //鏈夋柊鐗堟湰
                     string gwid = way.GwId;
-                    Application.RunOnMainThread(() =>
+                    HdlThreadLogic.Current.RunMain(() =>
                     {
                         if (this.dicRowContr.ContainsKey(gwid) == true && this.dicRowContr[gwid] != null)
                         {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Update/GatewayFirmwareUpdateForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Update/GatewayFirmwareUpdateForm.cs
index 4121ceb..127a3d1 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Update/GatewayFirmwareUpdateForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Update/GatewayFirmwareUpdateForm.cs
@@ -55,13 +55,13 @@
             //娓呯┖bodyFrame
             this.ClearBodyFrame();
 
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //寮�鍚繘搴︽潯
                 this.ShowProgressBar();
 
                 //鑾峰彇缃戝叧鏂扮増鏈俊鎭�
-                this.listVersionInfo = await HdlGatewayLogic.Current.GetGatewayAllNewVersion(this.zbGateway);
+                this.listVersionInfo = HdlGatewayLogic.Current.GetGatewayAllNewVersion(this.zbGateway);
                 if (listVersionInfo == null)
                 {
                     //鍏抽棴杩涘害鏉�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupForm.cs
index 0fc6ba8..e828557 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupForm.cs
@@ -112,9 +112,9 @@
         /// <summary>
         /// 涓婁紶鏁版嵁
         /// </summary>
-        private async void UpLoadBackupInfo()
+        private void UpLoadBackupInfo()
         {
-            int result = await HdlAutoBackupLogic.DoUpLoadAutoBackupData();
+            int result = HdlAutoBackupLogic.DoUpLoadAutoBackupData();
             if (result == -1)
             {
                 //鏂囦欢涓婁紶澶辫触
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs
index e7c1728..8f5900b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs
@@ -70,13 +70,13 @@
         /// <summary>
         /// 浠庝簯绔幏鍙栨暟鎹�
         /// </summary>
-        private async void SetBackupInfoToForm()
+        private void SetBackupInfoToForm()
         {
             //杩涘害鏉�
             this.ShowProgressBar();
 
             //鑾峰彇app鐨勮嚜鍔ㄥ浠�
-            var autoData = await HdlBackupLogic.Current.GetBackupListNameFromDB(1);
+            var autoData = HdlBackupLogic.Current.GetBackupListNameFromDB(1);
             if (autoData == null)
             {
                 //鍏抽棴杩涘害鏉�
@@ -84,7 +84,7 @@
                 return;
             }
             //浠庝簯绔幏鍙栨暟鎹�
-            var pageData = await HdlBackupLogic.Current.GetBackupListNameFromDB();
+            var pageData = HdlBackupLogic.Current.GetBackupListNameFromDB();
             if (pageData == null)
             {
                 //鍏抽棴杩涘害鏉�
@@ -283,10 +283,10 @@
         /// <param name="BackupClassId"></param>
         private void LoadBackupInfo(string BackupClassId)
         {
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //浠庝簯绔幏鍙栧浠界殑鏂囦欢
-                bool result = await HdlBackupLogic.Current.LoadAppBackupInfo(BackupClassId);
+                bool result = HdlBackupLogic.Current.LoadAppBackupInfo(BackupClassId);
                 if (result == false)
                 {
                     //鏂囦欢鎭㈠澶辫触
@@ -295,7 +295,7 @@
                     return;
                 }
 
-                Application.RunOnMainThread(() =>
+                HdlThreadLogic.Current.RunMain(() =>
                 {
                     //鍏抽棴鎵�鏈夌晫闈�
                     UserCenterLogic.CloseAllOpenForm();
@@ -319,10 +319,10 @@
         /// <param name="backName"></param>
         private void UpLoadBackInfo(string backName)
         {
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鍒涘缓涓�涓浠藉悕瀛�
-                string backupClassId = await HdlBackupLogic.Current.CreatNewBackupNameToDB(backName);
+                string backupClassId = HdlBackupLogic.Current.CreatNewBackupNameToDB(backName);
                 if (backupClassId == null)
                 {
                     //鍒涘缓澶囦唤鍚嶅瓧澶辫触
@@ -333,7 +333,7 @@
                 }
 
                 //涓婁紶鏁版嵁鍒颁簯绔�
-                bool result = await HdlBackupLogic.Current.UpLoadBackupFileToDB(backupClassId);
+                bool result = HdlBackupLogic.Current.UpLoadBackupFileToDB(backupClassId);
                 if (result == false)
                 {
                     //鏂囦欢涓婁紶澶辫触
@@ -363,9 +363,9 @@
         /// </summary>
         private void UpLoadAutoBackupInfo()
         {
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
-                int result = await HdlAutoBackupLogic.DoUpLoadAutoBackupData();
+                int result = HdlAutoBackupLogic.DoUpLoadAutoBackupData();
                 if (result == -1)
                 {
                     //鏂囦欢涓婁紶澶辫触
@@ -394,7 +394,7 @@
         /// </summary>
         /// <param name="BackupClassId"></param>
         /// <param name="backName"></param>
-        private async void EditorBackInfo(string BackupClassId, string backName)
+        private void EditorBackInfo(string BackupClassId, string backName)
         {
             //寮�鍚繘搴︽潯
             this.ShowProgressBar();
@@ -405,7 +405,7 @@
             //鑾峰彇鎺у埗涓讳汉璐﹀彿鐨凾oken
             Pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-            bool result = await UserCenterLogic.GetResultStatuByRequestHttps("App/UpdateHomeAppGatewayName", true, Pra);
+            bool result = UserCenterLogic.GetResultStatuByRequestHttps("App/UpdateHomeAppGatewayName", true, Pra);
             if (result == false)
             {
                 //缂栬緫澶囦唤鍚嶇О澶辫触
@@ -432,16 +432,9 @@
         /// </summary>
         /// <param name="BackupClassId"></param>
         /// <param name="showMode"></param>
-        public async void DeleteBackInfo(string BackupClassId, ShowErrorMode showMode = ShowErrorMode.YES)
+        public void DeleteBackInfo(string BackupClassId, ShowErrorMode showMode = ShowErrorMode.YES)
         {
-            //杩涘害鏉�
-            this.ShowProgressBar();
-
-            bool success = await HdlBackupLogic.Current.DeleteDbBackupData(BackupClassId);
-
-            //鍏抽棴杩涘害鏉�
-            this.CloseProgressBar();
-
+            bool success = HdlBackupLogic.Current.DeleteDbBackupData(BackupClassId);
             if (success == false)
             {
                 if (showMode == ShowErrorMode.YES)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs
index b032749..a05bea7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs
@@ -20,6 +20,7 @@
         /// </summary>
         public void ShowForm(string i_file)
         {
+            this.ScrollEnabled = false;
             //璁剧疆澶撮儴淇℃伅
             base.SetTitleText("鏂囦欢鍐呭");
 
@@ -74,6 +75,9 @@
             btnText.TextAlignment = TextAlignment.TopLeft;
             btnText.TextColor = UserCenterColor.Current.TextColor1;
             btnText.Text = textValue;
+#if Android
+            btnText.Foucs = false;
+#endif
             bodyFrameLayout.AddChidren(btnText);
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs
index 2526f82..7bfb326 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs
@@ -126,36 +126,6 @@
                 form.AddForm();
             };
 
-#if Android
-            row1 = new FrameRowControl(listView.rowSpace / 2);
-            row1.UseClickStatu = false;
-            listView.AddChidren(row1);
-            row1.AddLeftCaption("GBS瀹氫綅", 500);
-            row1.AddBottomLine();
-            var btnGbsSwitch = row1.AddMostRightSwitchIcon();
-            string checkFile = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Shared.Phone.UserCenter.DirNameResourse.OpenGbsFile);
-            if (System.IO.File.Exists(checkFile) == true)
-            {
-                btnGbsSwitch.IsSelected = true;
-            }
-            btnGbsSwitch.ButtonClickEvent += (sender, e) =>
-            {
-                this.ShowMassage(ShowMsgType.Confirm, "娉ㄦ剰:寮�鍚垨鑰呭叧闂鍔熻兘浼氶噸鍚疉pp", () =>
-                {
-                    btnGbsSwitch.IsSelected = !btnGbsSwitch.IsSelected;
-                    if (btnGbsSwitch.IsSelected == true)
-                    {
-                        var file = System.IO.File.Create(checkFile);
-                        file.Close();
-                    }
-                    else
-                    {
-                        System.IO.File.Delete(checkFile);
-                    }
-                    HDLUtils.RestartApp();
-                });
-            };
-#endif
             row1 = new FrameRowControl(listView.rowSpace / 2);
             listView.AddChidren(row1);
             row1.AddLeftCaption("璁惧缂撳瓨鍙橀噺", 500);
@@ -167,6 +137,35 @@
                 form.AddForm();
             };
 
+            row1 = new FrameRowControl(listView.rowSpace / 2);
+            listView.AddChidren(row1);
+            row1.AddLeftCaption("鏀堕泦鍙戦�佸拰鎺ユ敹鐨勬暟鎹�", 600);
+            row1.AddBottomLine();
+            var btnSwitchLog = row1.AddMostRightSwitchIcon();
+            btnSwitchLog.ButtonClickEvent += (sender, e) =>
+            {
+                if (btnSwitchLog.IsSelected == false)
+                {
+                    this.ShowMassage(ShowMsgType.Confirm, "鏄惁鎵撳紑璁板綍鍙戦�佸強鎺ユ敹鏁版嵁鐨勮褰�?", () =>
+                    {
+                        btnSwitchLog.IsSelected = true;
+                        HdlFileLogic.Current.DeleteFile(DirNameResourse.SendAndReceveDataLog);
+                        UserCenterResourse.HideOption.WriteSendAndReceveDataToFile = 1;
+                    });
+                }
+                else
+                {
+                    btnSwitchLog.IsSelected = false;
+                    var txtvalue = HdlFileLogic.Current.ReadFileTextContent(DirNameResourse.SendAndReceveDataLog);
+                    if (txtvalue != null)
+                    {
+                        var form = new HideOptionFileContentForm();
+                        form.AddForm(string.Empty);
+
+                        form.SetTextContent(txtvalue);
+                    }
+                }
+            };
 
             row1 = new FrameRowControl(listView.rowSpace / 2);
             listView.AddChidren(row1);
@@ -176,9 +175,9 @@
             {
                 this.ShowMassage(ShowMsgType.Confirm, "鏄惁涓婁紶Log鏂囦欢", () =>
                 {
-                    HdlThreadLogic.Current.RunThread(async () =>
+                    HdlThreadLogic.Current.RunThread(() =>
                     {
-                        await HdlBackupLogic.Current.UpLoadLogBackup();
+                        HdlBackupLogic.Current.UpLoadLogBackup();
                     });
                 });
             };
@@ -285,6 +284,8 @@
         {
             Shared.Phone.UserCenter.UserCenterResourse.DicReceiveGatewayTest = null;
             UserCenterResourse.HideOption.CheckCanReceiveGateway = 0;
+            UserCenterResourse.HideOption.WriteSendAndReceveDataToFile = 1;
+
 
             base.CloseFormBefore();
         }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
index f9b943a..540f95a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
@@ -66,7 +66,11 @@
                     return;
                 }
                 //妫�绱㈡垚鍛樹俊鎭�
-                this.SearchMemberInfo(txtCode.Text.Trim());
+                string strCode = txtCode.Text.Trim();
+                HdlThreadLogic.Current.RunThread(() =>
+                {
+                    this.SearchMemberInfo(strCode);
+                });
             });
         }
 
@@ -79,23 +83,24 @@
         /// </summary>
         /// <param name="accountId">鎴愬憳ID</param>
         /// <param name="txtMsg">淇℃伅鎺т欢</param>
-        private async void SearchMemberInfo(string accountId)
+        private void SearchMemberInfo(string accountId)
         {
             //寮�鍚繘搴︽潯
             this.ShowProgressBar();
 
             var pra = new AccountInfoPra();
             pra.Account = accountId;
-            string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new System.Collections.Generic.List<string>() { "AccountNoExists" });
+            var byteData = UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new System.Collections.Generic.List<string>() { "AccountNoExists" });
             //鍏抽棴杩涘害鏉�
             this.CloseProgressBar();
 
-            if (result == null)
+            if (byteData == null)
             {
                 //寮傚父
                 return;
             }
-            if (result == string.Empty)
+            var revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResponsePack>(System.Text.Encoding.UTF8.GetString(byteData));
+            if (revertObj.StateCode == "AccountNoExists")
             {
                 //鎴愬憳涓嶅瓨鍦�
                 var form = new MemberNotEsixtForm();
@@ -103,10 +108,10 @@
                 return;
             }
 
-            var infoResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountInfoResult>(result);
+            var infoResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountInfoResult>(revertObj.ResponseData.ToString());
             infoResult.Account = accountId;
 
-            Application.RunOnMainThread(() =>
+            HdlThreadLogic.Current.RunMain(() =>
             {
                 var form = new AddMemberInfoForm();
                 form.AddForm(infoResult);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
index f013a0f..00891a0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
@@ -106,7 +106,10 @@
             btnOk.ButtonClickEvent += (sender, e) =>
             {
                 //娣诲姞鎴愬憳
-                this.DoAddMember();
+                HdlThreadLogic.Current.RunThread(() =>
+                {
+                    this.DoAddMember();
+                });
             };
         }
 
@@ -117,7 +120,7 @@
         /// <summary>
         /// 娣诲姞鎴愬憳
         /// </summary>
-        private async void DoAddMember()
+        private void DoAddMember()
         {
             //寮�鍚繘搴︽潯
             this.ShowProgressBar();
@@ -125,7 +128,7 @@
             var pra = new BindSubAccountPra();
             pra.SubAccount = memberResult.Account;
 
-            bool result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/BindSubAccount", false, pra);
+            bool result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/BindSubAccount", false, pra);
             if (result == false)
             {
                 //鍏抽棴杩涘害鏉�
@@ -135,11 +138,11 @@
 
             //鑾峰彇杩欎釜鎴愬憳鐨凷ubDistributedMark
             var pra2 = new MemberListInfoPra();
-            string resultValue = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra2);
+            string resultValue = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra2);
             //鍏抽棴杩涘害鏉�
             this.CloseProgressBar();
 
-            if (resultValue == null)
+            if (string.IsNullOrEmpty(resultValue) == true)
             {
                 //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
                 string msg = Language.StringByID(R.MyInternationalizationString.uUnKnownError);
@@ -163,9 +166,6 @@
                 this.ShowMassage(ShowMsgType.Tip, msg);
                 return;
             }
-            //娣诲姞缂撳瓨
-            UserCenterResourse.ListMemberInfo.Add(memberInfoRes);
-            UserCenterLogic.SaveLocalMemberListInfo();
 
             string iconPath = System.IO.Path.Combine(UserCenterResourse.AccountOption.UserPictruePath, memberInfoRes.DistributedMark + ".png");
             if (memberResult.HeadImage != null)
@@ -174,16 +174,19 @@
                 Shared.IO.FileUtils.WriteFileByBytes(iconPath, memberResult.HeadImage);
             }
 
-            //鎴愬憳娣诲姞鎴愬姛
-            var form = new AddMemberSuccessForm();
-            form.AddForm(memberInfoRes, memberInfoRes.DistributedMark);
-            form.FormCloseEvent += (() =>
+            HdlThreadLogic.Current.RunMain(() =>
             {
-                this.CloseForm();
-                //鍏抽棴鎵嬪姩杈撳叆鎴愬憳ID鐨勭敾闈�
-                this.CloseFormByFormName("AddMemberByIdForm");
-                //娣诲姞鎴愬憳
-                this.LoadFormMethodByName("MemberListForm", "AddRowLayoutByOtherForm", memberInfoRes);
+                //鎴愬憳娣诲姞鎴愬姛
+                var form = new AddMemberSuccessForm();
+                form.AddForm(memberInfoRes, memberInfoRes.DistributedMark);
+                form.FormCloseEvent += (() =>
+                {
+                    this.CloseForm();
+                    //鍏抽棴鎵嬪姩杈撳叆鎴愬憳ID鐨勭敾闈�
+                    this.CloseFormByFormName("AddMemberByIdForm");
+                    //娣诲姞鎴愬憳
+                    this.LoadFormMethodByName("MemberListForm", "AddRowLayoutByOtherForm", memberInfoRes);
+                });
             });
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
index d5b2cbd..36ed38d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
@@ -54,7 +54,10 @@
                             return;
                         }
                         //鎼滅储ID
-                        this.SearchMemberInfo(qrCode);
+                        HdlThreadLogic.Current.RunThread(() =>
+                        {
+                            this.SearchMemberInfo(qrCode);
+                        });
                     }, 
                     Language.StringByID(R.MyInternationalizationString.uCancel),
                     Language.StringByID(R.MyInternationalizationString.uFlashlamp),
@@ -174,14 +177,14 @@
         /// <summary>
         /// 鍒濆鍖栨垚鍛樺垪琛�
         /// </summary>
-        private async void InitMemberList()
+        private void InitMemberList()
         {
             //寮�鍚繘搴︽潯
             this.ShowProgressBar();
 
             var pra = new MemberListInfoPra();
-            string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
-            if (result == null)
+            string result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
+            if (string.IsNullOrEmpty(result) == true)
             {
                 //鍏抽棴杩涘害鏉�
                 this.CloseProgressBar(ShowReLoadMode.YES);
@@ -204,10 +207,8 @@
             //鍏抽棴杩涘害鏉�
             this.CloseProgressBar();
 
-            //鍏堟竻绌烘垚鍛樺垪琛ㄤ俊鎭�
-            UserCenterResourse.ListMemberInfo.Clear();
-
             List<string> listCheck = new List<string>();
+            List<MemberInfoRes> listShowInfo = new List<MemberInfoRes>();
             foreach (MemberInfoRes infoRes in listInfo)
             {
                 if (listCheck.Contains(infoRes.DistributedMark) == true
@@ -225,32 +226,28 @@
 
                 listCheck.Add(infoRes.DistributedMark);
                 //娣诲姞鎴愬憳淇℃伅鐨勭紦瀛�
-                UserCenterResourse.ListMemberInfo.Add(infoRes);
+                listShowInfo.Add(infoRes);
             }
-            listInfo.Clear();
-            //淇濆瓨鎴愬憳淇℃伅鐨勭紦瀛樺埌鏈湴鏂囦欢
-            UserCenterLogic.SaveLocalMemberListInfo();
-            if (UserCenterResourse.ListMemberInfo.Count == 0)
+            if (listShowInfo.Count == 0)
             {
                 return;
             }
             HdlThreadLogic.Current.RunMain(() =>
             {
                 //娣诲姞鎴愬憳鍒楄〃
-                this.AddMemberListRowByData();
+                this.AddMemberListRowByData(listShowInfo);
             });
         }
 
         /// <summary>
         /// 娣诲姞鎴愬憳鍒楄〃
         /// </summary>
-        private void AddMemberListRowByData()
+        private void AddMemberListRowByData(List<MemberInfoRes> listNewInfo)
         {
             if (this.Parent == null)
             {
                 return;
             }
-            var listNewInfo = UserCenterResourse.ListMemberInfo;
 
             int count = listNewInfo.Count - 1;
             for (int i = 0; i < listNewInfo.Count; i++)
@@ -351,7 +348,7 @@
             {
                 return;
             }
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 var pra = new AccountInfoPra();
                 foreach (var keys in dicMemberAccount.Keys)
@@ -361,7 +358,7 @@
                         return;
                     }
                     pra.Account = dicMemberAccount[keys];
-                    var result = await UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new List<string>() { "NotSetAgain" });
+                    var result = UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra);
                     if (result == null)
                     {
                         continue;
@@ -423,17 +420,18 @@
         /// </summary>
         /// <param name="accountId">鎴愬憳ID</param>
         /// <param name="txtMsg">淇℃伅鎺т欢</param>
-        private async void SearchMemberInfo(string accountId)
+        private void SearchMemberInfo(string accountId)
         {
             var pra = new AccountInfoPra();
             pra.Account = accountId;
-            string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new List<string>() { "AccountNoExists" });
-            if (result == null)
+            var byteData = UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new List<string>() { "AccountNoExists" });
+            if (byteData == null)
             {
                 //寮傚父
                 return;
             }
-            if (result == string.Empty)
+            var revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResponsePack>(System.Text.Encoding.UTF8.GetString(byteData));
+            if (revertObj.StateCode == "AccountNoExists")
             {
                 //鎴愬憳涓嶅瓨鍦�
                 var form = new MemberNotEsixtForm();
@@ -441,10 +439,10 @@
                 return;
             }
 
-            var infoResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountInfoResult>(result);
+            var infoResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountInfoResult>(revertObj.ResponseData.ToString());
             infoResult.Account = accountId;
 
-            Application.RunOnMainThread(() =>
+            HdlThreadLogic.Current.RunMain(() =>
             {
                 var form = new AddMemberInfoForm();
                 form.AddForm(infoResult);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
index 658ee39..edac8a3 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
@@ -219,7 +219,10 @@
                 this.ShowMassage(ShowMsgType.Confirm, msg, () =>
                 {
                     //鍒犻櫎瀛愯处鍙�
-                    this.DeleteSubAccount();
+                    HdlThreadLogic.Current.RunThread(() =>
+                    {
+                        this.DeleteSubAccount();
+                    });
                 });
             };
         }
@@ -251,7 +254,8 @@
             }
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
-                HdlThreadLogic.Current.RunThread(async () =>
+                btnSwitch.CanClick = false;
+                HdlThreadLogic.Current.RunThread(() =>
                 {
                     var pra = new
                     {
@@ -261,7 +265,7 @@
                     };
                     //鎵撳紑杩涘害鏉�
                     this.ShowProgressBar();
-                    var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ChangeSubAccountIsAllowRemoteCtrl", false, pra);
+                    var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ChangeSubAccountIsAllowRemoteCtrl", false, pra);
                     //鍏抽棴杩涘害鏉�
                     this.CloseProgressBar();
 
@@ -273,6 +277,7 @@
 
                     Application.RunOnMainThread(() =>
                     {
+                        btnSwitch.CanClick = true;
                         btnSwitch.IsSelected = !btnSwitch.IsSelected;
                     });
                 });
@@ -319,46 +324,49 @@
         /// <summary>
         /// 鍗囩骇鎴栬�呴檷绾у瓙璐﹀彿
         /// </summary>
-        public async void UpOrDownSubAccountLevel()
+        public void UpOrDownSubAccountLevel()
         {
-            //寮�鍚繘搴︽潯
-            this.ShowProgressBar();
-
-            var pra = new UpOrDownLevelPra();
-            pra.DistributedMark = memberInfo.DistributedMark;
-
-            bool result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpSubAccount", false, pra);
-            if (result == false)
+            HdlThreadLogic.Current.RunThread(() =>
             {
-                this.CloseProgressBar();
-                return;
-            }
-            this.CloseProgressBar();
+                //寮�鍚繘搴︽潯
+                this.ShowProgressBar();
 
-            //鍙樻洿鏉冮檺
-            memberInfo.AccountType = memberInfo.AccountType == 1 ? 0 : 1;
+                var pra = new UpOrDownLevelPra();
+                pra.DistributedMark = memberInfo.DistributedMark;
 
-            Application.RunOnMainThread(() =>
-            {
-                if (this.Parent == null)
+                bool result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpSubAccount", false, pra);
+                if (result == false)
                 {
+                    this.CloseProgressBar();
                     return;
                 }
-                //鍙樻洿鏉冮檺鍥炬爣
-                if (memberInfo.AccountType == 1)
-                {
-                    btnTopIcon.UnSelectedImagePath = "Item/HadAuthority.png";
-                }
-                else
-                {
-                    btnTopIcon.UnSelectedImagePath = "Item/NotAuthority.png";
-                }
-                //鍙樻洿鏉冮檺鏂囧瓧
-                btnAuthority.TextID = memberInfo.AccountType == 1 ? R.MyInternationalizationString.uMemberHadActionAuthority : R.MyInternationalizationString.uMember;
+                this.CloseProgressBar();
 
-                //鎵撳紑鏄剧ず鎴愬姛鐨勭敾闈�
-                var form = new SubAccountLevelUpSuccessForm();
-                form.AddForm(memberInfo);
+                //鍙樻洿鏉冮檺
+                memberInfo.AccountType = memberInfo.AccountType == 1 ? 0 : 1;
+
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    if (this.Parent == null)
+                    {
+                        return;
+                    }
+                    //鍙樻洿鏉冮檺鍥炬爣
+                    if (memberInfo.AccountType == 1)
+                    {
+                        btnTopIcon.UnSelectedImagePath = "Item/HadAuthority.png";
+                    }
+                    else
+                    {
+                        btnTopIcon.UnSelectedImagePath = "Item/NotAuthority.png";
+                    }
+                    //鍙樻洿鏉冮檺鏂囧瓧
+                    btnAuthority.TextID = memberInfo.AccountType == 1 ? R.MyInternationalizationString.uMemberHadActionAuthority : R.MyInternationalizationString.uMember;
+
+                    //鎵撳紑鏄剧ず鎴愬姛鐨勭敾闈�
+                    var form = new SubAccountLevelUpSuccessForm();
+                    form.AddForm(memberInfo);
+                });
             });
         }
 
@@ -369,7 +377,7 @@
         /// <summary>
         /// 鍒犻櫎瀛愯处鍙�
         /// </summary>
-        private async void DeleteSubAccount()
+        private void DeleteSubAccount()
         {
             //寮�鍚繘搴︽潯
             this.ShowProgressBar();
@@ -377,7 +385,7 @@
             var pra = new DeleteSubAccountPra();
             pra.SubAccount = memberInfo.SubAccountDistributedMark;
 
-            bool result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/DeletedSubAccount", false, pra);
+            bool result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/DeletedSubAccount", false, pra);
             //鍏抽棴杩涘害鏉�
             this.CloseProgressBar();
 
@@ -386,21 +394,13 @@
                 return;
             }
 
-            //绉婚櫎缂撳瓨
-            UserCenterResourse.ListMemberInfo.RemoveAll((obj) =>
+            HdlThreadLogic.Current.RunMain(() =>
             {
-                if (obj.SubAccountDistributedMark == memberInfo.SubAccountDistributedMark)
-                {
-                    return true;
-                }
-                return false;
+                //浠庢垚鍛樹竴瑙堢敾闈㈢Щ闄�
+                this.LoadFormMethodByName("MemberListForm", "DeleteRowByAccount", memberInfo.Account);
+                //鑷韩鍏抽棴
+                this.CloseForm();
             });
-            UserCenterLogic.SaveLocalMemberListInfo();
-
-            //浠庢垚鍛樹竴瑙堢敾闈㈢Щ闄�
-            this.LoadFormMethodByName("MemberListForm", "DeleteRowByAccount", memberInfo.Account);
-            //鑷韩鍏抽棴
-            this.CloseForm();
         }
 
         #endregion
@@ -412,11 +412,11 @@
         /// </summary>
         private void GetMemberIcon(ImageView btnUserIcon)
         {
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 var pra = new AccountInfoPra();
                 pra.Account = memberInfo.Account;
-                var result = await UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new List<string>() { "NotSetAgain" });
+                var result = UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra);
                 if (result == null)
                 {
                     return;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/OtherParty/OtherPartyAccountMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/OtherParty/OtherPartyAccountMenuForm.cs
index 7ccbfb4..686de8b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/OtherParty/OtherPartyAccountMenuForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/OtherParty/OtherPartyAccountMenuForm.cs
@@ -41,12 +41,12 @@
             //娓呯┖bodyFrame
             this.ClearBodyFrame();
 
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鎵撳紑杩涘害鏉�
                 this.ShowProgressBar();
                 //鑾峰彇缁戝畾鏁版嵁
-                var result = await this.GetBingData();
+                var result = this.GetBingData();
                 if (result == false)
                 {
                     //鍏抽棴杩涘害鏉�
@@ -173,12 +173,12 @@
         /// 鑾峰彇缁戝畾鏁版嵁
         /// </summary>
         /// <returns></returns>
-        private async Task<bool> GetBingData()
+        private bool GetBingData()
         {
             this.dicBindData = new Dictionary<string, OtherPartyResult>();
 
-            var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetUserAuthItem", false, "");
-            if (result == null)
+            var result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetUserAuthItem", false, "");
+            if (string.IsNullOrEmpty(result) == true)
             {
                 return false;
             }
@@ -223,12 +223,12 @@
         /// 缁戝畾寰俊
         /// </summary>
         /// <param name="infoData"></param>
-        private async void BindWechat(string accessToken, string refreshToken, string openID)
+        private void BindWechat(string accessToken, string refreshToken, string openID)
         {
             //鑾峰彇寰俊鏄电О
             var strUrl = "https://api.weixin.qq.com/sns/userinfo?access_token=" + accessToken;
             strUrl += "&openid=" + openID;
-            var byteData = await Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(strUrl, null, null, "GET");
+            var byteData = Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(strUrl, null, null, "GET");
             if (byteData == null)
             {
                 return;
@@ -239,7 +239,7 @@
             //鍏堜笂浼犲井淇¤祫鏂�
             var pra = new { AccessToken = accessToken, RefreshToken = refreshToken, OpenID = openID, UserName = nickData.nickname };
             var listNotShow = new List<string>() { "UserNoBindAccount" };
-            var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/InsertOrUpdateAuthUser", false, pra, listNotShow);
+            var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/InsertOrUpdateAuthUser", false, pra, listNotShow);
             if (result == false)
             {
                 return;
@@ -247,7 +247,7 @@
 
             //鍐嶆墽琛岀粦瀹�
             var pra2 = new { AccountGuid = Common.Config.Instance.Guid, OpenID = openID };
-            result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/BindAuthUserToAccount", false, pra2);
+            result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/BindAuthUserToAccount", false, pra2);
             if (result == true)
             {
                 //缁戝畾鎴愬姛锛佷笅娆′綘鍙互鐢ㄥ井淇0}璐﹀彿蹇�熺櫥褰曞暒
@@ -267,10 +267,10 @@
         /// 瑙i櫎缁戝畾
         /// </summary>
         /// <param name="infoData"></param>
-        private async void UnBindOtherParty(OtherPartyResult infoData)
+        private void UnBindOtherParty(OtherPartyResult infoData)
         {
             var pra = new { DistributedMark = infoData.Id };
-            var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UnBindUserAuth", false, pra);
+            var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UnBindUserAuth", false, pra);
             if (result == true)
             {
                 //閲嶆柊鍒锋柊鐣岄潰
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs
index 29cb8ff..36253de 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs
@@ -151,12 +151,12 @@
         /// <summary>
         /// 鍙戦�侀獙璇佺爜鍒伴偖绠�
         /// </summary>
-        private async void SendCodeToEmail(BottomClickButton btnNext, string Email)
+        private void SendCodeToEmail(BottomClickButton btnNext, string Email)
         {
             var sendCodePra = new SendCodePra();
             sendCodePra.Account = Email;
 
-            bool falge = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/RegisterSendVerCode", false, sendCodePra);
+            bool falge = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/RegisterSendVerCode", false, sendCodePra);
             if (falge == false)
             {
                 return;
@@ -213,7 +213,7 @@
         /// 楠岃瘉楠岃瘉鐮�
         /// </summary>
         /// <returns></returns>
-        private async void CheckVerificationCode(string code)
+        private void CheckVerificationCode(string code)
         {
             if (this.canCheckCode == false)
             {
@@ -226,7 +226,7 @@
             checkCodePra.Code = code;
             checkCodePra.Account = newEmail;
 
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
             if (flage == false)
             {
                 //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
@@ -242,12 +242,12 @@
         /// <summary>
         /// 鍙樻洿閭
         /// </summary>
-        private async void SaveNewEmail()
+        private void SaveNewEmail()
         {
             var pra = new SaveNewEmailPra();
             pra.Account = this.newEmail;
 
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/BindAccount", false, pra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/BindAccount", false, pra);
             if (flage == false)
             {
                 //缁戝畾閭澶辫触
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs
index f1ae8d1..fa5caea 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs
@@ -171,13 +171,13 @@
         /// <summary>
         /// 鍙戦�侀獙璇佺爜鍒版墜鏈�
         /// </summary>
-        private async void SendCodeToPhone(BottomClickButton btnNext,string areaCode, string phoneNum)
+        private void SendCodeToPhone(BottomClickButton btnNext,string areaCode, string phoneNum)
         {
             var sendCodePra = new SendCodePra();
             sendCodePra.Account = phoneNum;
             sendCodePra.AreaCode = Convert.ToInt32(areaCode);
 
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/RegisterSendVerCode", false, sendCodePra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/RegisterSendVerCode", false, sendCodePra);
             if (flage == false)
             {
                 return;
@@ -234,7 +234,7 @@
         /// 楠岃瘉楠岃瘉鐮�
         /// </summary>
         /// <returns></returns>
-        private async void CheckVerificationCode(string code)
+        private void CheckVerificationCode(string code)
         {
             if (this.canCheckCode == false)
             {
@@ -247,7 +247,7 @@
             checkCodePra.Code = code;
             checkCodePra.Account = newPhone;
 
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
             if (flage == false)
             {
                 //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
@@ -263,12 +263,12 @@
         /// <summary>
         /// 鍙樻洿鎵嬫満鍙�
         /// </summary>
-        private async void SaveNewPhoneNumber()
+        private void SaveNewPhoneNumber()
         {
             var pra = new SaveNewPhoneNumPra();
             pra.Account = newPhone;
 
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/BindAccount", false, pra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/BindAccount", false, pra);
             if (flage == false)
             {
                 //缁戝畾鎵嬫満澶辫触
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs
index 88a6757..16ba490 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs
@@ -120,11 +120,11 @@
         /// <summary>
         /// 鍙戦�侀獙璇佺爜鍒伴偖绠�
         /// </summary>
-        private async void SendCodeToEmail(BottomClickButton btnNext)
+        private void SendCodeToEmail(BottomClickButton btnNext)
         {
             var sendCodePra = new SendCodePra();
 
-            bool falge = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/LoginSendVerCode", false, sendCodePra);
+            bool falge = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/LoginSendVerCode", false, sendCodePra);
             if (falge == false)
             {
                 return;
@@ -179,7 +179,7 @@
         /// 楠岃瘉楠岃瘉鐮�
         /// </summary>
         /// <returns></returns>
-        private async void CheckVerificationCode(string code)
+        private void CheckVerificationCode(string code)
         {
             if (this.canCheckCode == false)
             {
@@ -190,7 +190,7 @@
             var checkCodePra = new CheckCodePra();
             checkCodePra.Code = code;
 
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
             if (flage == false)
             {
                 //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs
index c7230fe..0243f21 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs
@@ -133,11 +133,11 @@
         /// <summary>
         /// 鍙戦�侀獙璇佺爜鍒版墜鏈�
         /// </summary>
-        private async void SendCodeToPhone(BottomClickButton btnNext)
+        private void SendCodeToPhone(BottomClickButton btnNext)
         {
             var sendCodePra = new SendCodePra();
 
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/LoginSendVerCode", false, sendCodePra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/LoginSendVerCode", false, sendCodePra);
             if (flage == false)
             {
                 return;
@@ -192,7 +192,7 @@
         /// 楠岃瘉楠岃瘉鐮�
         /// </summary>
         /// <returns></returns>
-        private async void CheckVerificationCode(string code)
+        private void CheckVerificationCode(string code)
         {
             if (this.canCheckCode == false)
             {
@@ -203,7 +203,7 @@
             var checkCodePra = new CheckCodePra();
             checkCodePra.Code = code;
 
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
             if (flage == false)
             {
                 //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorAccountPasswordForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorAccountPasswordForm.cs
index f788e5f..093de67 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorAccountPasswordForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorAccountPasswordForm.cs
@@ -164,13 +164,13 @@
         /// 淇濆瓨瀵嗙爜
         /// </summary>
         /// <param name="newPassword"></param>
-        private async void SavePassword(string newPassword)
+        private void SavePassword(string newPassword)
         {
             var pra = new SavePasswordPra();
             pra.NewPassword = newPassword;
 
             //鏇存敼瀵嗙爜
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdatePassword", false, pra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdatePassword", false, pra);
             if (flage == false)
             {
                 return;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorGesturePasswordForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorGesturePasswordForm.cs
index 9036ecd..8dfcc30 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorGesturePasswordForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorGesturePasswordForm.cs
@@ -229,7 +229,7 @@
         /// <param name="psw">瀵嗙爜</param>
         private void SaveSecondaryPassword(PswGestureInputControl contr, string psw)
         {
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鎵撳紑杩涘害鏉�
                 this.ShowProgressBar();
@@ -240,7 +240,7 @@
                     GesturePwd = psw,
                     StringPwd = UserCenterResourse.AccountOption.PswAuthentication
                 };
-                var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdatEexpandPwd", false, pra);
+                var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdatEexpandPwd", false, pra);
                 //鍏抽棴杩涘害鏉�
                 this.CloseProgressBar();
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorSecondaryPasswordForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorSecondaryPasswordForm.cs
index c2f91ae..972fb7e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorSecondaryPasswordForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorSecondaryPasswordForm.cs
@@ -213,7 +213,7 @@
         /// <param name="psw">瀵嗙爜</param>
         private void SaveSecondaryPassword(PswNumberInputControl contr, string psw)
         {
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鎵撳紑杩涘害鏉�
                 this.ShowProgressBar();
@@ -224,7 +224,7 @@
                     GesturePwd = UserCenterResourse.AccountOption.GestureAuthentication,
                     StringPwd = psw
                 };
-                var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdatEexpandPwd", false, pra);
+                var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdatEexpandPwd", false, pra);
                 //鍏抽棴杩涘害鏉�
                 this.CloseProgressBar();
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs
index 980c379..3d503c4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs
@@ -166,13 +166,13 @@
         /// 鍙戦�侀獙璇佺爜
         /// </summary>
         /// <param name="btnCode"></param>
-        private async void SetVerificationCode(NormalViewControl btnCode)
+        private void SetVerificationCode(NormalViewControl btnCode)
         {
             string account = this.strPhoneEmail.StartsWith("+") == true ? UserCenterResourse.UserInfo.Phone : UserCenterResourse.UserInfo.Email;
             var sendCodePra = new SendCodePra();
             sendCodePra.Account = account;
             sendCodePra.AreaCode = Convert.ToInt32(UserCenterResourse.UserInfo.AreaCode);
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ForgetPassword", false, sendCodePra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ForgetPassword", false, sendCodePra);
             if (flage == false)
             {
                 return;
@@ -267,14 +267,14 @@
         /// 楠岃瘉楠岃瘉鐮�
         /// </summary>
         /// <returns></returns>
-        private async void CheckVerificationCode(TextInputControl txtCode, string code)
+        private void CheckVerificationCode(TextInputControl txtCode, string code)
         {
             string account = this.strPhoneEmail.StartsWith("+") == true ? UserCenterResourse.UserInfo.Phone : UserCenterResourse.UserInfo.Email;
             var checkCodePra = new CheckCodePra();
             checkCodePra.Code = code;
             checkCodePra.Account = account;
 
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
             if (flage == false)
             {
                 //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs
index 7d9474b..21528a3 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs
@@ -166,13 +166,13 @@
         /// 鍙戦�侀獙璇佺爜
         /// </summary>
         /// <param name="btnCode"></param>
-        private async void SetVerificationCode(NormalViewControl btnCode)
+        private void SetVerificationCode(NormalViewControl btnCode)
         {
             string account = this.strPhoneEmail.StartsWith("+") == true ? UserCenterResourse.UserInfo.Phone : UserCenterResourse.UserInfo.Email;
             var sendCodePra = new SendCodePra();
             sendCodePra.Account = account;
             sendCodePra.AreaCode = Convert.ToInt32(UserCenterResourse.UserInfo.AreaCode);
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ForgetPassword", false, sendCodePra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ForgetPassword", false, sendCodePra);
             if (flage == false)
             {
                 return;
@@ -267,14 +267,14 @@
         /// 楠岃瘉楠岃瘉鐮�
         /// </summary>
         /// <returns></returns>
-        private async void CheckVerificationCode(TextInputControl txtCode, string code)
+        private void CheckVerificationCode(TextInputControl txtCode, string code)
         {
             string account = this.strPhoneEmail.StartsWith("+") == true ? UserCenterResourse.UserInfo.Phone : UserCenterResourse.UserInfo.Email;
             var checkCodePra = new CheckCodePra();
             checkCodePra.Code = code;
             checkCodePra.Account = account;
 
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
             if (flage == false)
             {
                 //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/ResetAccountPasswordForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/ResetAccountPasswordForm.cs
index a551422..d15698c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/ResetAccountPasswordForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/ResetAccountPasswordForm.cs
@@ -127,13 +127,13 @@
         /// </summary>
         /// <param name="newPsw">鏂板瘑鐮�</param>
         /// <param name="newPsw2">浜屾纭瀵嗙爜</param>
-        private async void ResetPassword(string newPsw, string newPsw2)
+        private void ResetPassword(string newPsw, string newPsw2)
         {
             var pra = new ResetPswPra();
             pra.Password = newPsw;
             pra.AgainPassword = newPsw2;
             //鏇存敼瀵嗙爜
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ResetPassword", false, pra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ResetPassword", false, pra);
             if (flage == false)
             {
                 return;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs
index 2ac9c0a..31d37fa 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs
@@ -78,7 +78,7 @@
         /// <param name="div">1:鍏堣鍙栦簯绔�,鏃犳硶鑱旂綉,鍐嶈鍙栨湰鍦�  2:鍙浜戠  3:鍙鏈湴</param>
         private void SetResidenceInfo(int div)
         {
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //铏氭嫙浣忓畢鐨勮瘽,鍙鏈湴
                 if (div == 3 || Config.Instance.Home.IsVirtually == true)
@@ -91,7 +91,7 @@
                     //寮�鍚繘搴︽潯
                     this.ShowProgressBar();
                     //璁剧疆浣忓畢淇℃伅(鏈夌綉鎯呭喌)
-                    var result = await this.SetResidenceInfoByOnline();
+                    var result = this.SetResidenceInfoByOnline();
                     if (result == true)
                     {
                         //浜戠璇诲彇鎴愬姛
@@ -120,13 +120,12 @@
         /// <summary>
         /// 璁剧疆浣忓畢淇℃伅(鏈夌綉鎯呭喌)
         /// </summary>
-        private async System.Threading.Tasks.Task<bool> SetResidenceInfoByOnline()
+        private bool SetResidenceInfoByOnline()
         {
             //鑾峰彇浣忓畢淇℃伅
             var Pra = new GetResidenceInfoPra();
-            var listNotCheck = new List<string>() { "NotSetAgain" };
-            string resultData = await UserCenterLogic.GetResponseDataByRequestHttps("App/GetHomePager", false, Pra, listNotCheck);
-            if (resultData == null)
+            string resultData = UserCenterLogic.GetResponseDataByRequestHttps("App/GetHomePager", false, Pra, new List<string> { "NotCheck" });
+            if (string.IsNullOrEmpty(resultData) == true)
             {
                 return false;
             }
@@ -224,7 +223,7 @@
                     }
                     this.ShowMassage(ShowMsgType.Confirm, msg, () =>
                     {
-                        HdlThreadLogic.Current.RunThread(async () =>
+                        HdlThreadLogic.Current.RunThread(() =>
                         {
                             //寮�鍚繘搴︽潯
                             this.ShowProgressBar();
@@ -232,7 +231,7 @@
                             //妫�娴嬫湰鍦版湁娌℃湁杩欎釜浣忓畢
                             this.CheckIsExsitResidence(info);
 
-                            await HdlResidenceLogic.Current.SwitchResidence(info.Id);
+                            HdlResidenceLogic.Current.SwitchResidence(info.Id);
 
                             HdlThreadLogic.Current.RunMain(() =>
                             {
@@ -354,9 +353,9 @@
                     }
                     this.ShowMassage(ShowMsgType.Confirm, msg, () =>
                     {
-                        HdlThreadLogic.Current.RunThread(async () =>
+                        HdlThreadLogic.Current.RunThread(() =>
                         {
-                            await HdlResidenceLogic.Current.SwitchResidence(i_home.Id);
+                            HdlResidenceLogic.Current.SwitchResidence(i_home.Id);
 
                             HdlThreadLogic.Current.RunMain(() =>
                             {
@@ -424,7 +423,10 @@
                     if (info != null)
                     {
                         //缂栬緫浜戠鐨勪綇瀹呭悕绉�
-                        this.EditorResidenceName(textValue, info, btnHome);
+                        HdlThreadLogic.Current.RunThread(() =>
+                        {
+                            this.EditorResidenceName(textValue, info, btnHome);
+                        });
                     }
                     else
                     {
@@ -465,17 +467,20 @@
             Pra.LoginAccessToken = Config.Instance.Token;
 
             //缂栬緫浣忓畢
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", false, Pra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", false, Pra);
             //鍏抽棴杩涘害鏉�
             this.CloseProgressBar();
 
             if (flage == true)
             {
-                //鍒锋柊鍐呭瓨鐨勪綇瀹呭悕
-                HdlResidenceLogic.Current.EditorHouseByHouseId(info.Id, ResidenceName);
-                //鏇存敼鏄剧ず鐨勫悕瀛�
-                btnHome.Text = ResidenceName;
-                info.Name = ResidenceName;
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    //鍒锋柊鍐呭瓨鐨勪綇瀹呭悕
+                    HdlResidenceLogic.Current.EditorHouseByHouseId(info.Id, ResidenceName);
+                    //鏇存敼鏄剧ず鐨勫悕瀛�
+                    btnHome.Text = ResidenceName;
+                    info.Name = ResidenceName;
+                });
             }
         }
 
@@ -508,7 +513,10 @@
                 dialogForm.CloseDialog();
 
                 //淇濆瓨浣忓畢
-                this.AddNewResidence(textValue);
+                HdlThreadLogic.Current.RunThread(() =>
+                {
+                    this.AddNewResidence(textValue);
+                });
             });
         }
 
@@ -517,7 +525,7 @@
         /// </summary>
         /// <param name="ResidenceName"></param>
         /// <returns></returns>
-        private async void AddNewResidence(string ResidenceName)
+        private void AddNewResidence(string ResidenceName)
         {
             //妫�娴嬭兘鍚︿繚瀛樹綇瀹�
             if (this.CheckIsCanSaveResidence(string.Empty, ResidenceName, false) == false)
@@ -530,8 +538,8 @@
             var Pra = new AddResidencePra();
             Pra.Name = ResidenceName;
             //娣诲姞浣忓畢
-            string resultData = await UserCenterLogic.GetResponseDataByRequestHttps("App/AddHome", false, Pra);
-            if (resultData == null)
+            string resultData = UserCenterLogic.GetResponseDataByRequestHttps("App/AddHome", false, Pra);
+            if (string.IsNullOrEmpty(resultData) == true)
             {
                 //鍏抽棴杩涘害鏉�
                 this.CloseProgressBar();
@@ -541,9 +549,14 @@
             var newInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<List<NewResidenceInfo>>(resultData);
 
             HdlResidenceLogic.Current.AddHouseToMemmory(newInfo[0].Id, ResidenceName);
-            //閲嶆柊鍒锋柊鍒楄〃
-            this.listView.RemoveAll();
-            this.SetResidenceInfo(2);
+
+            HdlThreadLogic.Current.RunMain(() =>
+            {
+                //閲嶆柊鍒锋柊鍒楄〃
+                this.listView.RemoveAll();
+                this.SetResidenceInfo(2);
+            });
+
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
index ab1221b..09a400e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
@@ -658,7 +658,7 @@
         /// <summary>
         /// 鍒犻櫎浣忓畢
         /// </summary>
-        public async void DeleteResidence()
+        private void DeleteResidence()
         {
             //寮�鍚繘搴︽潯
             this.ShowProgressBar();
@@ -670,7 +670,7 @@
                 Pra.HomeId = Common.Config.Instance.Home.Id;
                 Pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-                bool result = await UserCenterLogic.GetResultStatuByRequestHttps("App/DelHome", true, Pra);
+                bool result = UserCenterLogic.GetResultStatuByRequestHttps("App/DelHome", true, Pra);
                 if (result == false)
                 {
                     //鍏抽棴杩涘害鏉�
@@ -686,7 +686,7 @@
                     HomeId = Common.Config.Instance.Home.Id,
                     PrimaryUserId = Common.Config.Instance.Home.MainUserDistributedMark
                 };
-                bool result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/SubAccountDelShareHome", false, Pra2);
+                bool result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/SubAccountDelShareHome", false, Pra2);
                 if (result == false)
                 {
                     //鍏抽棴杩涘害鏉�
@@ -725,7 +725,7 @@
             Common.Config.Instance.Save();
 
             //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-            await UserCenterLogic.InitUserCenterMenmoryAndThread(false);
+            UserCenterLogic.InitUserCenterMenmoryAndThread(false);
 
             //鍒犻櫎浣忓畢
             HdlResidenceLogic.Current.DeleteHouseMemmory(deleteId);
@@ -748,7 +748,7 @@
         /// <param name="latitude">绾害</param>
         /// <param name="longitude">缁忓害</param>
         /// <param name="addresName">浣嶇疆鍚嶇О</param>
-        private async void SaveResidenceAdrress(NormalViewControl btnLocation, double latitude, double longitude, string addresName)
+        private void SaveResidenceAdrress(NormalViewControl btnLocation, double latitude, double longitude, string addresName)
         {
             //濡傛灉涓嶆槸铏氭嫙浣忓畢,鎵嶆洿鏂颁簯绔�
             if (Common.Config.Instance.Home.IsVirtually == false)
@@ -764,7 +764,7 @@
                 Pra.Longitude = longitude;
 
                 //缂栬緫浣忓畢
-                bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", true, Pra);
+                bool flage = UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", true, Pra);
                 if (flage == false)
                 {
                     //鍏抽棴杩涘害鏉�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
index c470209..64c7cd3 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
@@ -534,79 +534,59 @@
             //浠庤澶囧垪琛ㄤ腑鑾峰彇鍦ㄧ嚎鐘舵��
             HdlThreadLogic.Current.RunThread(() =>
             {
-                //棣栧厛鑾峰彇杩欎簺浼犳劅鍣ㄦ墍鍦ㄧ殑缃戝叧
-                var listWay = new List<ZbGateway>();
                 foreach (var device in listDevice)
-                {
-                    ZbGateway realWay = null;
-                    //鏄惁瀛樺湪鐪熷疄鐗╃悊缃戝叧
-                    if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, device.CurrentGateWayId) == false)
-                    {
-                        continue;
-                    }
-                    listWay.Add(realWay);
-                }
-                foreach (var zbway in listWay)
                 {
                     if (this.Parent == null)
                     {
                         //鐣岄潰鍏抽棴
                         return;
                     }
-                    int statu = 0;
-                    var list = Common.LocalDevice.Current.GetDeviceListFromGateway(zbway, ref statu, false, ShowErrorMode.NO);
-                    if (statu != -1)
+                    var deviceInfo = Common.LocalDevice.Current.ReadDeviceEpointDeviceInfo(device);
+                    if (deviceInfo != null)
                     {
-                        for (int i = 0; i < list.Count; i++)
-                        {
-                            //璁剧疆璁惧鍦ㄧ嚎鐘舵��
-                            this.ReceiveDeviceStatuPush(list[i]);
-                        }
+                        //璁剧疆璁惧鍦ㄧ嚎鐘舵��
+                        this.ReceiveDeviceStatuPush(device, deviceInfo);
                     }
+                    System.Threading.Thread.Sleep(50);
                 }
-            });
+            }, ShowErrorMode.NO);
         }
 
         /// <summary>
         /// 鎺ュ彈璁惧鍦ㄧ嚎鎺ㄩ��
         /// </summary>
         /// <param name="device"></param>
-        private void ReceiveDeviceStatuPush(CommonDevice device)
+        private void ReceiveDeviceStatuPush(CommonDevice device, CommonDevice.DeviceInfoData deviceInfo)
         {
             if (this.Parent == null)
             {
                 //鐣岄潰鍏抽棴
                 return;
             }
-
-            lock (objOnlineLock)
+            string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
+            if (this.dicSensorStatuView.ContainsKey(mainkeys) == true)
             {
-                string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
-                if (this.dicSensorStatuView.ContainsKey(mainkeys) == true)
+                CommonDevice Loacldevice = Common.LocalDevice.Current.GetDevice(mainkeys);
+                if (Loacldevice == null)
                 {
-                    CommonDevice Loacldevice = Common.LocalDevice.Current.GetDevice(mainkeys);
-                    if (Loacldevice == null)
-                    {
-                        return;
-                    }
-                    //鍦ㄧ嚎鐘舵�佷竴鏍风殑璇濓紝涓嶉渶瑕佸埛鏂�
-                    if (Loacldevice.IsOnline == device.IsOnline)
-                    {
-                        return;
-                    }
-                    //淇濆瓨鐘舵��
-                    Loacldevice.IsOnline = device.IsOnline;
-                    Loacldevice.ReSave();
-
-                    //鍥犱负杩欐槸鎺ㄩ�佽繃鏉ョ殑锛屾垜涓嶄繚璇侀偅涓�鐬棿杩欎釜涓滆タ浼氫笉浼氳绉婚櫎
-                    var control = this.dicSensorStatuView[mainkeys];
-                    Application.RunOnMainThread(() =>
-                    {
-                        //璁剧疆鎺т欢鐨勫湪绾跨姸鎬佹枃鏈晥鏋�
-                        bool bolOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(device);
-                        control?.SetOnlineStatu(bolOnline);
-                    });
+                    return;
                 }
+                //鍦ㄧ嚎鐘舵�佷竴鏍风殑璇濓紝涓嶉渶瑕佸埛鏂�
+                if (Loacldevice.IsOnline == deviceInfo.IsOnline)
+                {
+                    return;
+                }
+                //淇濆瓨鐘舵��
+                Loacldevice.IsOnline = deviceInfo.IsOnline;
+
+                //鍥犱负杩欐槸鎺ㄩ�佽繃鏉ョ殑锛屾垜涓嶄繚璇侀偅涓�鐬棿杩欎釜涓滆タ浼氫笉浼氳绉婚櫎
+                var control = this.dicSensorStatuView[mainkeys];
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    //璁剧疆鎺т欢鐨勫湪绾跨姸鎬佹枃鏈晥鏋�
+                    bool bolOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(device);
+                    control?.SetOnlineStatu(bolOnline);
+                });
             }
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs
index 8e7a9d2..79e9e3b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs
@@ -428,10 +428,10 @@
             {
                 listScene.Add(scene);
             }
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //涓婁紶鏂囦欢
-                var result = await HdlShardLogic.Current.DoUploadSharedContent(memberShardInfo, this.lookRoom, listDevice, listScene);
+                var result = HdlShardLogic.Current.DoUploadSharedContent(memberShardInfo, this.lookRoom, listDevice, listScene);
                 if (result == true)
                 {
                     HdlThreadLogic.Current.RunMain(() =>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs
index fc4a6f3..5506715 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs
@@ -282,7 +282,7 @@
             int fileCount = this.GetUpLoadRoomData(listRoom, dicDevice, dicScene);
 
             var listCheckFile = new HashSet<string>();
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鎵撳紑杩涘害鏉�
                 this.ShowProgressBar();
@@ -290,7 +290,7 @@
                 for (int index = 0; index < listRoom.Count; index++)
                 {
                     //鎵ц涓婁紶
-                    var result = await HdlShardLogic.Current.DoUploadSharedContent(memberShardInfo, listRoom[index], dicDevice[index], dicScene[index], fileCount, listCheckFile);
+                    var result = HdlShardLogic.Current.DoUploadSharedContent(memberShardInfo, listRoom[index], dicDevice[index], dicScene[index], fileCount, listCheckFile);
                     if (result == false)
                     {
                         break;
@@ -300,7 +300,7 @@
                 this.CloseProgressBar();
 
                 //涓嶇鎴愬姛杩樻槸澶辫触,閮藉埛鏂扮晫闈�
-                Application.RunOnMainThread(() =>
+                HdlThreadLogic.Current.RunMain(() =>
                 {
                     if (this.Parent != null)
                     {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs
index 5c1287b..88f393c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs
@@ -409,10 +409,10 @@
             //纭鍒犻櫎閫夋嫨鐨勫叡浜満鏅拰鍔熻兘锛�
             this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uDeleteShardContentMsg), () =>
             {
-                HdlThreadLogic.Current.RunThread(async () =>
+                HdlThreadLogic.Current.RunThread(() =>
                 {
                     //涓婁紶鏂囦欢
-                    var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, this.lookRoom, listDevice, listScene);
+                    var result = HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, this.lookRoom, listDevice, listScene);
                     if (result == true)
                     {
                         HdlThreadLogic.Current.RunMain(() =>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs
index b4cd0ff..911fad6 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs
@@ -67,10 +67,10 @@
             //娓呯┖bodyFrame
             this.ClearBodyFrame();
 
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鑾峰彇鎴愬憳鐨勫叡浜垪琛�
-                var result = await HdlShardLogic.Current.GetMemberShardContentListAndSetToLocation(memberShardInfo);
+                var result = HdlShardLogic.Current.GetMemberShardContentListAndSetToLocation(memberShardInfo);
                 if (result == false)
                 {
                     //鏄剧ず閲嶆柊鍔犺浇鐨勭晫闈�
@@ -291,10 +291,10 @@
                 listScene.Add(sceneUi);
             }
 
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鎵ц鍒犻櫎
-                var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, room, listDevice, listScene);
+                var result = HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, room, listDevice, listScene);
                 if (result == true)
                 {
                     HdlThreadLogic.Current.RunMain(() =>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs
index 6969e15..66bb4c1 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs
@@ -277,7 +277,7 @@
         /// <param name="email"></param>
         private void UploadSuggestion(string strContent, string email)
         {
-            HdlThreadLogic.Current.RunThread(async() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 var pra = new
                 {
@@ -287,7 +287,7 @@
                     OpinionFeedbackType = this.typeMode,
                     Email = email
                 };
-                var result = await UserCenterLogic.GetResultStatuByRequestHttps("App/AddOpinionFeedback", false, pra);
+                var result = UserCenterLogic.GetResultStatuByRequestHttps("App/AddOpinionFeedback", false, pra);
                 if (result == true)
                 {
                     //淇濆瓨娆℃暟
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/MessageManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/MessageManagementForm.cs
index 5baf04c..637ea33 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/MessageManagementForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/MessageManagementForm.cs
@@ -68,10 +68,10 @@
         /// <summary>
         /// 鍒濆鍖栦腑閮ㄤ俊鎭�
         /// </summary>
-        private async void InitMiddleData(bool showReload)
+        private void InitMiddleData(bool showReload)
         {
             //鑾峰彇鏁版嵁
-            var dicData = await this.GetMessageData();
+            var dicData = this.GetMessageData();
             if (dicData == null)
             {
                 if (showReload == true)
@@ -324,9 +324,9 @@
                 {
                     //纭鍒犻櫎娑堟伅?
                     string msg = Language.StringByID(R.MyInternationalizationString.uDeleteMessageMsg);
-                    this.ShowMassage(ShowMsgType.Confirm, msg, async () =>
+                    this.ShowMassage(ShowMsgType.Confirm, msg, () =>
                     {
-                        await this.DeleteMsg(recordInfo.Id, frameList, rowControl);
+                        this.DeleteMsg(recordInfo.Id, frameList, rowControl);
                     });
                 };
             }
@@ -348,7 +348,7 @@
                 if (sender != null)
                 {
                     //鏍囪宸茶(涓嶇瀹冩垚鍔熶笉鎴愬姛)
-                    await this.SetTickIsRead(recordInfo.Id);
+                    this.SetTickIsRead(recordInfo.Id);
                 }
             };
         }
@@ -361,12 +361,12 @@
         /// 鏍囪宸茶
         /// </summary>
         /// <param name="strId"></param>
-        private async Task<bool> SetTickIsRead(string strId)
+        private bool SetTickIsRead(string strId)
         {
             var pra = new MessageReadStatuPra();
             pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
             pra.Id = strId;
-            var result = await UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/TagMessageMessageCenterItem", true, pra);
+            var result = UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/TagMessageMessageCenterItem", true, pra);
             return result;
         }
 
@@ -382,7 +382,7 @@
             //纭鏍囪鍏ㄩ儴娑堟伅涓哄凡璇�?
             this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uUnTipAllMessageMsg), () =>
             {
-                HdlThreadLogic.Current.RunThread(async () =>
+                HdlThreadLogic.Current.RunThread(() =>
                 {
                     //鎵撳紑杩涘害鏉�
                     this.ShowProgressBar();
@@ -390,7 +390,7 @@
                     var pra = new MessageReadStatuPra();
                     pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
                     pra.TagAllOrClearType = 0;
-                    var result = await UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/TagAllOrClearMessageCenter", true, pra);
+                    var result = UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/TagAllOrClearMessageCenter", true, pra);
                     //鍏抽棴杩涘害鏉�
                     this.CloseProgressBar();
                     if (result == false)
@@ -420,12 +420,12 @@
         /// <param name="strId"></param>
         /// <param name="frameList"></param>
         /// <param name="rowContr"></param>
-        private async Task<bool> DeleteMsg(string strId, FrameListControl frameList, RowLayoutControl rowContr)
+        private bool DeleteMsg(string strId, FrameListControl frameList, RowLayoutControl rowContr)
         {
             var pra = new MessageReadStatuPra();
             pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
             pra.Id = strId;
-            var result = await UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/DelMessageCenterItem", true, pra);
+            var result = UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/DelMessageCenterItem", true, pra);
             if (result == false)
             {
                 return false;
@@ -457,7 +457,7 @@
             //纭鍒犻櫎鍏ㄩ儴娑堟伅?
             this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uDeleteAllMessageMsg), () =>
             {
-                HdlThreadLogic.Current.RunThread(async () =>
+                HdlThreadLogic.Current.RunThread(() =>
                 {
                     //鎵撳紑杩涘害鏉�
                     this.ShowProgressBar();
@@ -465,7 +465,7 @@
                     var pra = new MessageReadStatuPra();
                     pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
                     pra.TagAllOrClearType = 1;
-                    var result = await UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/TagAllOrClearMessageCenter", true, pra);
+                    var result = UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/TagAllOrClearMessageCenter", true, pra);
                     if (result == false)
                     {
                         //鍏抽棴杩涘害鏉�
@@ -552,7 +552,7 @@
         /// 鑾峰彇娑堟伅璁板綍
         /// </summary>
         /// <returns></returns>
-        private async Task<Dictionary<string, List<List<MessageRecordInfo>>>> GetMessageData()
+        private Dictionary<string, List<List<MessageRecordInfo>>> GetMessageData()
         {
             this.dicAllRow = new Dictionary<string, RowLayoutControl>();
             var allListData = new List<MessageRecordInfo>();
@@ -562,7 +562,7 @@
 
             //浼犳劅鍣ㄤ笂鎶�
             pra.Topic = "/IASInfoReport";
-            var dataInfo = await this.GetMessageDataFromDb(pra);
+            var dataInfo = this.GetMessageDataFromDb(pra);
             if (dataInfo == null)
             {
                 return null;
@@ -571,7 +571,7 @@
 
             //闂ㄩ攣涓婃姤
             pra.Topic = "/Alarms/SendAlarmInform";
-            dataInfo = await this.GetMessageDataFromDb(pra);
+            dataInfo = this.GetMessageDataFromDb(pra);
             if (dataInfo == null)
             {
                 return null;
@@ -580,7 +580,7 @@
 
             //鎾ら槻
             pra.Topic = "/Security/WithdrawMode_Respon";
-            dataInfo = await this.GetMessageDataFromDb(pra);
+            dataInfo = this.GetMessageDataFromDb(pra);
             if (dataInfo == null)
             {
                 return null;
@@ -589,7 +589,7 @@
 
             //甯冮槻
             pra.Topic = "/Security/EnableMode_Respon";
-            dataInfo = await this.GetMessageDataFromDb(pra);
+            dataInfo = this.GetMessageDataFromDb(pra);
             if (dataInfo == null)
             {
                 return null;
@@ -598,7 +598,7 @@
 
             //閫昏緫瑙﹀彂涓婃姤
             pra.Topic = "/Logic/Execute_Respon";
-            dataInfo = await this.GetMessageDataFromDb(pra);
+            dataInfo = this.GetMessageDataFromDb(pra);
             if (dataInfo == null)
             {
                 return null;
@@ -607,7 +607,7 @@
 
             //鍦烘櫙瑙﹀彂涓婃姤
             pra.Topic = "/Scene/Exec_Respon";
-            dataInfo = await this.GetMessageDataFromDb(pra);
+            dataInfo = this.GetMessageDataFromDb(pra);
             if (dataInfo == null)
             {
                 return null;
@@ -623,10 +623,10 @@
         /// </summary>
         /// <param name="pra"></param>
         /// <returns></returns>
-        private async Task<List<MessageRecordInfo>> GetMessageDataFromDb(MessageInfoPra pra)
+        private List<MessageRecordInfo> GetMessageDataFromDb(MessageInfoPra pra)
         {
-            var result = await UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra);
-            if (result == null)
+            var result = UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra);
+            if (string.IsNullOrEmpty(result) == true)
             {
                 return null;
             }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
index 5043272..f792ccc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
@@ -375,10 +375,10 @@
                     return;
                 }
                 btnTitle.CanClick = false;
-                HdlThreadLogic.Current.RunThread(async () =>
+                HdlThreadLogic.Current.RunThread(() =>
                 {
                     this.ShowProgressBar();
-                    var result = await HdlBackupLogic.Current.LoadHideOption();
+                    var result = HdlBackupLogic.Current.LoadHideOption();
                     this.CloseProgressBar();
                     if (result == true)
                     {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
index 7b002f1..21b346c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
@@ -317,7 +317,7 @@
         /// 鏇存柊鐢ㄦ埛鍚�
         /// </summary>
         /// <param name="txtName"></param>
-        private async void SaveUserName(TextInputControl txtName, bool showMsg)
+        private void SaveUserName(TextInputControl txtName, bool showMsg)
         {
             if (UserCenterResourse.UserInfo.UserName == string.Empty)
             {
@@ -334,7 +334,7 @@
             var pra = new SaveUserNamePra();
             pra.UserName = UserCenterResourse.UserInfo.UserName;
 
-            bool result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdateUserName", false, pra);
+            bool result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdateUserName", false, pra);
             if (result == false)
             {
                 return;
@@ -403,10 +403,10 @@
         /// </summary>
         /// <param name="btnUser"></param>
         /// <param name="imagePath"></param>
-        private async void UpLoadUserIconFile(ImageView btnUser, string imagePath)
+        private void UpLoadUserIconFile(ImageView btnUser, string imagePath)
         {
             var pra = new { HeadImage = Shared.IO.FileUtils.ReadFile(imagePath) };
-            var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdateHeadImage", false, pra);
+            var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdateHeadImage", false, pra);
             if (result == true)
             {
                 UserCenterResourse.UserInfo.UserIconFileChanged = true;
diff --git a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs
index 960d44d..8503e8e 100755
--- a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs
@@ -56,16 +56,17 @@
                 this.ShowLoginLoadView();
                 CommonPage.Loading.Start();
 
-                UserCenter.HdlThreadLogic.Current.RunThread(async () =>
+                UserCenter.HdlThreadLogic.Current.RunThread(() =>
                 {
                     //鐧诲綍
-                    var loginSuccess = await LoginByPWDAsync(Config.Instance.Account, Config.Instance.Password);
+                    var loginSuccess = LoginByPWDAsync(Config.Instance.Account, Config.Instance.Password);
+
                     //鐧诲綍鎴愬姛,鎴栬�呮病鏈夌綉缁滈兘鍙互鐧诲綍
                     if (loginSuccess == 1 || loginSuccess == 2)
                     {
-                        var homes = await UserCenter.HdlResidenceLogic.Current.GetHomeListsFromDb();
+                        var homes = UserCenter.HdlResidenceLogic.Current.GetHomeListsFromDb();
                         //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                        await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
+                        UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
                         //鍚姩ZigBee
                         ZigBee.Common.Application.Init();
 
@@ -121,7 +122,7 @@
         /// <param name="password">Password.</param>
         /// <param name="source">Source.</param>
         /// <param name="company">Company.</param>
-        public async System.Threading.Tasks.Task<int> LoginByPWDAsync(string account, string password, string source = "", int company = 0)
+        public int LoginByPWDAsync(string account, string password, string source = "", int company = 0)
         {
             var isLoginSuccess = -1;
             var requestObj = new SendDataToServer.LoginObj
@@ -132,7 +133,8 @@
                 Company = company
             };
             var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj);
-            var revertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/Login", System.Text.Encoding.UTF8.GetBytes(requestJson));
+            //鐧婚檰鎺ュ彛鐗规畩,闇�瑕佸揩涓�鐐硅闂�,璁剧疆3绉掕秴鏃�
+            var revertObj = CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/Login", System.Text.Encoding.UTF8.GetBytes(requestJson), 3);
             if (revertObj == null)
             {
                 return 2;
@@ -152,7 +154,7 @@
                 Config.Instance.LoginDateTime = DateTime.Now;
                 Config.Instance.LoginToken = revertData.Token;
                 //涓婃姤璁惧ID
-                await CommonPage.Instance.PushRegID();
+                CommonPage.Instance.PushRegID();
                 isLoginSuccess = 1;
             }
             else if (stateCodeStr == "YOUDATANOISLOCALREGION")
@@ -161,7 +163,7 @@
                 var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginLocalRegionRes>(revertObj.ResponseData.ToString());
                 CommonPage.RequestHttpsHost = responseDataObj.RegionServer;
                 //鍐嶆鐧诲綍
-                return await this.LoginByPWDAsync(account, password, source, company);
+                return this.LoginByPWDAsync(account, password, source, company);
             }
             if (stateCodeStr == "NOTVERIFY")
             {
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs b/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
index 0e9c605..973d822 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
@@ -6,8 +6,9 @@
     [System.Serializable]
     public class Config
     {
-        static readonly string fileName = "Config.json";
-        static Config config;
+        private const string fileName = "Config.json";
+
+        private static Config config = null;
         public static Config Instance
         {
             get
@@ -28,11 +29,11 @@
         /// <summary>
         /// 璐︽埛鐧诲綍鎴愬姛鏃剁殑鏃堕棿
         /// </summary>
-        public DateTime LoginDateTime = DateTime.MinValue;
+        public DateTime LoginDateTime = DateTime.MinValue;
         /// <summary>
-        /// Gets a value indicating whether this <see cref="T:Shared.Common.Config"/> is login.
+        /// 
         /// </summary>
-        /// <value><c>true</c> if is login; otherwise, <c>false</c>.</value>
+        [Newtonsoft.Json.JsonIgnore]
         public bool IsLogin
         {
             get
@@ -40,16 +41,6 @@
                 return (DateTime.Now - LoginDateTime).Days < 7;
             }
         }
-
-        /// <summary>
-        /// 璐︽埛鐧诲綍鎴愬姛鐨勮处鎴风被鍨�
-        /// </summary>
-        public int AccountType = 0;
-        /// <summary>
-        /// 璐︽埛鐧诲綍鎴愬姛鐨勪富ID
-        /// </summary>
-        public int MasterID = 0;
-
 
         public static void ReFresh()
         {
@@ -67,6 +58,11 @@
             }
         }
 
+        /// <summary>
+        /// 璐︽埛鐧诲綍鎴愬姛鐨勮处鎴风被鍨�(姝ゅ彉閲忛粯璁や负0,骞朵笖涓嶈祴鍊�)
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        public int AccountType = 0;
         /// <summary>
         /// 褰撳墠鐧诲綍鐨勫笎鍙�
         /// </summary>
@@ -105,12 +101,12 @@
         /// 褰撳墠鐧诲綍鐨勮处鍙锋槸涓嶆槸涔嬪墠鐨勮处鍙�
         /// </summary>
         [Newtonsoft.Json.JsonIgnore]
-        public bool TheSameLoginAccount = false;
-
-        [Newtonsoft.Json.JsonIgnore]
+        public bool TheSameLoginAccount = false;
+
         /// <summary>
         /// 褰撳墠甯愬彿鐨凾oken
         /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
         public string Token
         {
             get
@@ -136,14 +132,18 @@
         }
 
         /// <summary>
-        /// 鐧诲綍鏃禩oken
+        /// 鐧诲綍鏃禩oken(鐩墠杩欎笢瑗挎病鐢�)
         /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
         public string LoginToken = string.Empty;
 
-        public List<string> HomeFilePathList = new List<string> { };
-
         public string HomeId = string.Empty;
 
+        /// <summary>
+        /// 浣忓畢鏂囦欢鍒楄〃
+        /// </summary>
+        public List<string> HomeFilePathList = new List<string>();
+
         [Newtonsoft.Json.JsonIgnore]
         private House m_Home = null;
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
index 1d991f4..561bff8 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
@@ -85,6 +85,7 @@
         /// <para>鎸佺画鏁版嵁涓婃姤(MomentStatus=0   TriggerZoneStatus>=1锛滄姤璀︼紴  TriggerZoneStatus=0锛滃彇娑堟姤璀︼紴)</para>
         /// <para>21: Door/Window 闂ㄧ獥浼犳劅鍣紙鏈�21鍜�22锛岃繖閲屾病鏈夊啓閿欙級</para>
         /// <para>22:Door/Window 闂ㄧ獥浼犳劅鍣紙鏈�21鍜�22锛岃繖閲屾病鏈夊啓閿�</para>
+        /// <para>541 鐞冨瀷绉诲姩浼犳劅鍣�</para>
         /// </summary>
         public int IasDeviceType;
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
index f10262e..826613d 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
@@ -628,11 +628,11 @@
                 //璁块棶鎺ュ彛
                 if (UserCenterResourse.UserInfo.AuthorityNo == 1)
                 {
-                    result1 = await CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync(RequestName, byteData);
+                    result1 = CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync(RequestName, byteData);
                 }
                 else
                 {
-                    result1 = await CommonPage.Instance.RequestZigbeeHttpsByAdmin(RequestName, byteData);
+                    result1 = CommonPage.Instance.RequestZigbeeHttpsByAdmin(RequestName, byteData);
                 }
                 if (result1 != null)
                 {
@@ -662,7 +662,7 @@
             return await System.Threading.Tasks.Task.Run((Func<System.Threading.Tasks.Task<List<Shared.Phone.UserCenter.MemberInfoRes>>>)(async () =>
            {
                var pra = new Shared.Phone.UserCenter.MemberListInfoPra();
-               string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
+               string result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
                if (result == null)
                {
                    return null;
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/IASZone.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/IASZone.cs
index 38aaeca..2db5d41 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/IASZone.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/IASZone.cs
@@ -13,12 +13,41 @@
         }
 
         #region IAS瀹夐槻淇℃伅涓婃姤.
+        /// <summary>
+        /// 涓婁竴娆¤闂甶ASInfo鐨勬椂闂�
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        private DateTime oldiASInfoTime = DateTime.Now;
+        /// <summary>
+        /// IAS瀹夐槻淇℃伅涓婃姤
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        private IASInfoData m_iASInfo = null;
         /// <summary>
-        /// IAS瀹夐槻淇℃伅涓婃姤
+        /// IAS瀹夐槻淇℃伅涓婃姤(杩欎釜涓滆タ30绉掍箣鍚庡氨娓呮帀)
         /// <para>褰撳畨闃茶澶囧睘鎬х姸鎬佹敼鍙樻椂鍊欙紙渚嬪涓�姘у寲纰充紶鎰熷櫒妫�娴嬪埌涓�姘у寲纰虫皵浣擄級锛岃澶囧皢涓婃姤灞炴�х姸鎬佸彉鍖栨暟鎹��</para>
         /// </summary>
         [Newtonsoft.Json.JsonIgnore]
-        public IASInfoData iASInfo;
+        public IASInfoData iASInfo
+        {
+            get
+            {
+                if (m_iASInfo != null && (DateTime.Now - oldiASInfoTime).TotalMilliseconds > 30 * 1000)
+                {
+                    //杩欎釜涓滆タ30绉掍箣鍚庡氨娓呮帀
+                    m_iASInfo = null;
+                    return null;
+                }
+                return m_iASInfo;
+            }
+            set
+            {
+                //璁板綍璧锋洿鏂版椂闂�
+                this.oldiASInfoTime = DateTime.Now;
+                m_iASInfo = value;
+            }
+        }
+
         /// <summary>
         /// IAS瀹夐槻淇℃伅涓婃姤
         /// <para>褰撳畨闃茶澶囧睘鎬х姸鎬佹敼鍙樻椂鍊欙紙渚嬪涓�姘у寲纰充紶鎰熷櫒妫�娴嬪埌涓�姘у寲纰虫皵浣擄級锛岃澶囧皢涓婃姤灞炴�х姸鎬佸彉鍖栨暟鎹��</para>
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
index 9810450..408e3d2 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
@@ -2400,6 +2400,11 @@
                             {
                                 DebugPrintLog($" 鏈湴杩炴帴鎴愬姛_缃戝叧IP:{brokerName}_缃戝叧鏄惁鍔�:{IsEncry}_褰撳墠瀵嗙爜:{Password}");
                                 IsRemote = false;
+                                //Log鍐欏叆(璋冭瘯鐢�)
+                                if (Shared.Phone.UserCenter.UserCenterResourse.HideOption.WriteSendAndReceveDataToFile == 1)
+                                {
+                                    Shared.Phone.UserCenter.HdlLogLogic.Current.WriteLog(2, "鏈湴杩炴帴鎴愬姛");
+                                }
                             });
                         }
 
@@ -2439,7 +2444,12 @@
                     }
                 }
                 catch (Exception ex)
-                {
+                {
+                    //Log鍐欏叆(璋冭瘯鐢�)
+                    if (Shared.Phone.UserCenter.UserCenterResourse.HideOption.WriteSendAndReceveDataToFile == 1)
+                    {
+                        Shared.Phone.UserCenter.HdlLogLogic.Current.WriteLog(2, "鏈湴杩炴帴寮傚父:\r\n" + ex.Message);
+                    }
                     DebugPrintLog($"灞�鍩熺綉閫氳杩炴帴鍑哄紓甯�:{ex.Message}");
                 }
                 finally
@@ -2475,9 +2485,7 @@
                     MainAccountId = Config.Instance.Home.MainUserDistributedMark,
                     SharedHid = Config.Instance.Home.Id
                 };
-
-                var listNotShow = new List<string>() { "NotSetAgain" };
-                var resultData = await Shared.Phone.UserCenter.UserCenterLogic.GetByteResponseDataByRequestHttps("App/GetSharedHomeApiControl", false, pra, listNotShow);
+                var resultData = Shared.Phone.UserCenter.UserCenterLogic.GetByteResponseDataByRequestHttps("App/GetSharedHomeApiControl", false, pra);
                 if (resultData == null)
                 {
                     return;
@@ -2498,7 +2506,7 @@
                 pra2.ReqDto.LoginAccessToken = loginToken;
                 var bytes = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(pra2));
 
-                var result = await CommonPage.Instance.DoRequestZigbeeHttpsInterface("https://global.hdlcontrol.com/HangZhouHdlCloudApi/App/GetSingleHomeGatewayPagger", bytes, loginToken);
+                var result = CommonPage.Instance.DoRequestZigbeeHttpsInterface("https://global.hdlcontrol.com/HangZhouHdlCloudApi/App/GetSingleHomeGatewayPagger", bytes, loginToken);
                 if (result != null)
                 {
                     var jobject = Newtonsoft.Json.Linq.JObject.Parse(Encoding.UTF8.GetString(result));
@@ -2688,7 +2696,7 @@
                                 ["PublishPayloadJsonStr"] = "1"
                             };
                             var bytes = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(jsonData));
-                            result = await CommonPage.Instance.DoRequestZigbeeHttpsInterface("https://global.hdlcontrol.com/HangZhouHdlCloudApi/EmqMqtt/GetConnMqttInfo", bytes, Config.Instance.Token);
+                            result = CommonPage.Instance.DoRequestZigbeeHttpsInterface("https://global.hdlcontrol.com/HangZhouHdlCloudApi/EmqMqtt/GetConnMqttInfo", bytes, Config.Instance.Token);
                         }
                         else
                         {
@@ -2705,7 +2713,7 @@
                                 ["PublishPayloadJsonStr"] = "1"
                             };
                             var bytes = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(jsonData));
-                            result = await CommonPage.Instance.DoRequestZigbeeHttpsInterface("https://global.hdlcontrol.com/HangZhouHdlCloudApi/EmqMqtt/ShareMemberConnMqttInfo", bytes, Config.Instance.Token);
+                            result = CommonPage.Instance.DoRequestZigbeeHttpsInterface("https://global.hdlcontrol.com/HangZhouHdlCloudApi/EmqMqtt/ShareMemberConnMqttInfo", bytes, Config.Instance.Token);
                         }
                         if (result != null)
                         {
@@ -2882,6 +2890,16 @@
                 if (Shared.Common.Config.Instance.HomeId == "")
                 {
                     return;
+                }
+
+                //Log鍐欏叆(璋冭瘯鐢�)
+                if (Shared.Phone.UserCenter.UserCenterResourse.HideOption.WriteSendAndReceveDataToFile == 1)
+                {
+                    string text = "杩滅▼鍙戦��:";
+                    if (IsRemote == false) { text = "鏈湴鍙戦��:"; }
+                    text += topic + "\r\n";
+                    text += Encoding.UTF8.GetString(message) + "\r\n";
+                    Shared.Phone.UserCenter.HdlLogLogic.Current.WriteLog(2, text);
                 }
 
                 if (IsRemote)
@@ -2916,6 +2934,11 @@
                             {
                                 DebugPrintLog($"灞�鍩熺綉鈥斺�斾簩娆″彂閫佸埌缃戝叧鐨勪富棰�:{topic}_鍙戦�佸埌缃戝叧鐨勬暟鎹�:{System.Text.Encoding.UTF8.GetString(message)}_鏄惁鍔犲瘑:{IsEncry}");
                                 await localMqttClient.PublishAsync(new MqttApplicationMessage { Topic = topic, Payload = message, QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.ExactlyOnce, Retain = retain });
+                            }
+                            //Log鍐欏叆(璋冭瘯鐢�)
+                            if (Shared.Phone.UserCenter.UserCenterResourse.HideOption.WriteSendAndReceveDataToFile == 1)
+                            {
+                                Shared.Phone.UserCenter.HdlLogLogic.Current.WriteLog(2, "鏈湴杩炴帴寮傚父鏂紑");
                             }
                         }
                     }
@@ -3132,6 +3155,14 @@
                     attrId = topic.Split('/')[5];
                 }
 
+                //Log鍐欏叆(璋冭瘯鐢�)
+                if (Shared.Phone.UserCenter.UserCenterResourse.HideOption.WriteSendAndReceveDataToFile == 1)
+                {
+                    string text = "缃戝叧鍥炲:" + topic + "\r\n";
+                    text += message + "\r\n";
+                    Shared.Phone.UserCenter.HdlLogLogic.Current.WriteLog(2, text);
+                }
+
                 //鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫(涓轰簡鎵ц閫熷害,灏藉彲鑳界殑鍒姞鑰楁椂鐨勬搷浣�)
                 Shared.Phone.UserCenter.HdlGatewayReceiveLogic.Current.GatewayOverallMsgReceive(gatewayID, topic, reportStatus, message);
 
diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs
index 1ecc9a8..448024f 100755
--- a/ZigbeeApp/Shared/R.cs
+++ b/ZigbeeApp/Shared/R.cs
@@ -937,7 +937,11 @@
         public readonly static int nightLightSwitch = 5406;
         public readonly static int colorTemperature = 5407;
         public readonly static int buzzer = 5408;
-     
+        public readonly static int ambientLight = 5409;
+        public readonly static int illuminanceValue = 5410;
+        public readonly static int dark = 5411;
+        public readonly static int bright = 5412;
+        public readonly static int tipIlluminanceValue = 5413;
 
 
         /// <summary>
@@ -2974,7 +2978,7 @@
         /// </summary>
         public const int uCarbonMonoxideRevealed = 15393;
         /// <summary>
-        /// 鏈変笉鏄庣墿浣撶粡杩�
+        /// 鏈変汉缁忚繃
         /// </summary>
         public const int uHadUnKnowObjectPassed = 15394;
         /// <summary>
@@ -6030,7 +6034,10 @@
         /// 鍚搁《鐕冩皵浼犳劅鍣� -> 闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝缁胯壊蹇棯{0}杩涘叆閰嶇綉鐘舵�侊紝缁跨伅甯镐寒鍒欏叆缃戞垚鍔�
         /// </summary>
         public const int uAddSensorCeilingGasMsg = 21023;
-
+        /// <summary>
+        /// 鐞冨瀷绉诲姩浼犳劅鍣� -> 闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝鎸囩ず鐏彉缁裤�侀棯鐑亄0}杩涘叆閰嶇綉鐘舵�侊紝缁跨伅鐔勭伃鍒欓厤缃戞垚鍔�
+        /// </summary>
+        public const int uAddSensorSphericalMotionMsg = 21024;
 
         //鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勫畼鏂瑰悕瀛�,浠�30000寮�濮嬧槄鈽呪槄鈽�
         /// <summary>
@@ -6213,6 +6220,10 @@
         /// 闀滃儚ID涓�20000鐨勮澶囩殑瀹樻柟鍚嶅瓧锛氳壊娓╃伅
         /// </summary>
         public const int uDeviceModelId20000 = 30044;
+        /// <summary>
+        /// 闀滃儚ID涓�1205鐨勮澶囩殑瀹樻柟鍚嶅瓧锛氱悆鍨嬬Щ鍔ㄤ紶鎰熷櫒
+        /// </summary>
+        public const int uDeviceModelId1205 = 30045;
 
         //鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄澶囨墍灞炵绫荤殑缈昏瘧鍚嶅瓧,浠�40000寮�濮嬧槄鈽呪槄鈽�
         /// <summary>
@@ -6415,7 +6426,11 @@
         /// <summary>
         /// 绠�绾︾幆澧冮潰鏉�
         /// </summary>
-        public const int uDeviceDirectionName29 = 70028;
+        public const int uDeviceDirectionName29 = 70028;
+        /// <summary>
+        /// 鐞冨瀷绉诲姩浼犳劅鍣�
+        /// </summary>
+        public const int uDeviceDirectionName30 = 70029;
 
     }
 }
diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems
index ff57551..7976e40 100755
--- a/ZigbeeApp/Shared/Shared.projitems
+++ b/ZigbeeApp/Shared/Shared.projitems
@@ -36,6 +36,8 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\Controls\DeviceRow\DeviceTemperatureRowControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\SelectLocalSceneImageForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\CurrentDeviceState.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\Illumination.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicDveiceStatus.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicView\AddDeviceView.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicView\Addview.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicView\CompleteView.cs" />
@@ -62,7 +64,6 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountResetPWDSuccess.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\Controls\PhoneEmailSelectControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\PhoneEmailForm.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\PhoneZone.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceAcDetailCardMethord.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\SelectFloorForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\SelectHouseForm.cs" />
@@ -178,6 +179,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlDeviceDoorLockLogic.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlDeviceOtherLogic.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlExperienceAccountLogic.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlFileLogic.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlGatewayBackupLogic.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlGatewayUpdateLogic.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlLogLogic.cs" />
@@ -222,6 +224,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorInfraredDirectionForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorPirDirectionForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorPMTwoPointFiveForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorSphericalMotionDirectionForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorTemperatureHumidityForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorWaterDirectionForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Light\MiniNightLightFunctionSettionForm.cs" />

--
Gitblit v1.8.0