From e22fdb94322e6cec38e5e4a9aec13d431a133fde Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期二, 28 四月 2020 16:32:35 +0800
Subject: [PATCH] 上传合并后的代码

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs                        |    6 
 ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs                                                        |    2 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs                                      |    6 
 ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionDirectoryListForm.cs                             |   14 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs                            |   85 
 ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs                                           |    6 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs                                     |  193 
 ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs                               |    5 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirDirectionForm.cs                 |   68 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs                           |   50 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs              |   52 
 ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs                                                        |    3 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorDoorWindowDirectionForm.cs                     |   18 
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceTemperatureCardControl.cs                     |    5 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelCurtainDirectionForm.cs                         |   16 
 ZigbeeApp/Shared/Phone/Login/AccountResetPWDSuccess.cs                                                  |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs                                      |   14 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueEightButtonDirectionForm.cs              |   16 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs                                  |   67 
 ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileListForm.cs                                  |    2 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFourButtonDirectionForm.cs                      |   74 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FreshAir/FreshAirPic.png                                           |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs                               |    4 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs                                 |   24 
 ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/noMode.png                                              |    0 
 ZigbeeApp/Shared/Phone/ZigBee/Device/HumiditySensor.cs                                                  |    1 
 ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs                                        |   24 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FreshAir/FreshAirRealDevicePic.png                                 |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs                            |    4 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs                                           |   11 
 ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs                               |   16 
 ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs                                |   52 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorWaterDirectionForm.cs                          |   10 
 ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDelayTimeForm.cs                                         |  148 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs              |  322 
 ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs                                                           |   47 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs                                        |   31 
 ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs                                                 |    1 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs                       |   72 
 ZigbeeApp/Shared/Phone/Device/Logic/LogicView/IfString.cs                                               |    4 
 ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs                                 |  220 
 ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs                                           |  390 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayAddSuccessForm.cs                               |    2 
 ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs                                      |   22 
 ZigbeeApp/Shared/Phone/Category/SelectFloorForm.cs                                                      |   34 
 ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs                                        |    6 
 ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj                                                            |   24 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/RepeaterZigbeeDirectionForm.cs                       |   16 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorFireDirectionForm.cs                           |   16 
 ZigbeeApp/Shared/Phone/Category/SelectHouseForm.cs                                                      |   34 
 ZigbeeApp/Shared/Common/CommonPage.cs                                                                   |    4 
 ZigbeeApp/Shared/Phone/Device/Logic/Send.cs                                                             |    2 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpDirectionForm.cs                               |    4 
 ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs                                      |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs    |  156 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueEnvironmentLightSettionForm.cs               |   22 
 ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirPic.png                                             |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueEnvironmentDirectionForm.cs              |   16 
 ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml                                                  |    2 
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAcCardControl.cs                              |   14 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/DimmableLightOneLoadDirectionForm.cs                 |   80 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpSearchForm.cs                                  |   22 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs                               |   29 
 ZigbeeApp/Shared/Phone/Device/CommonForm/SelectTime.cs                                                  |    6 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/RelayThreeLoadDirectionForm.cs                       |   80 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceDoorLockRowControl.cs                          |    8 
 ZigbeeApp/Shared/Phone/UserView/HomePage.cs                                                             |  228 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/LoadingControl.cs                  |    4 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs                               |   24 
 ZigbeeApp/Home.Ios/Home.IOS.csproj                                                                      |    8 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs                           |   25 
 ZigbeeApp/Shared/R.cs                                                                                   |   67 
 ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs                                                     |    6 
 ZigbeeApp/Shared/Common/Logic.cs                                                                        |    1 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/MessageControls/ShowMsgControl.cs                 |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs           |   20 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/GatewayResourse.cs                                |    4 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/RowLayoutControl.cs             |    7 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorCarbonMonoxideDirectionForm.cs                 |   14 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs                                        |  512 +
 ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupForm.cs                                        |    2 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs                           |  198 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs                                     |    4 
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceRelayCardControl.cs                           |   14 
 ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs                                              |   12 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/InformationTipView.cs              |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs |  261 +
 ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/SiphonateDirectionAndLimitSettionForm.cs               |   68 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelTwoButtonDirectionForm.cs                       |   74 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFourButtonDirectionForm.cs               |   16 
 ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirRealDevicePic.png                                   |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs                                      |    8 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs                              |   92 
 ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs                                    |    4 
 ZigbeeApp/Shared/Common/House.cs                                                                        |    5 
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceDoorLockCardControl.cs                        |    9 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection3Form.cs                               |    4 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/IconBigViewControl.cs              |   10 
 ZigbeeApp/GateWay.Droid/Assets/Language.ini                                                             |   31 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs                                              |   41 
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceFunctionUnallocatedControl.cs                            |    2 
 ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/noMode.png                                                |    0 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs                              |    6 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs    |    4 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/FreshAirEpoint.png                                          |    0 
 ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs                                                         |  218 
 ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs                                                     |  123 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs                      |   18 
 ZigbeeApp/Shared/Phone/UserView/UserPage.cs                                                             |  110 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs                             |   44 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs                                  |   26 
 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs                             |  322 +
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs                             |   14 
 ZigbeeApp/Shared/Phone/MainPage/Controls/ListRoomCardControl.cs                                         |    2 
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceColorLightCardControl.cs                      |   13 
 ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitListForm.cs                           |    8 
 ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs                                            |    2 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs                                       |   35 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetyMasterControl.cs           |   28 
 ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs                                                  |  302 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs                         |   72 
 ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs                                                      |    2 
 ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs                                              |   14 
 ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs                                        |    6 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs    |    4 
 ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs                                                    |  130 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/CurtainAutoOpenDirectionForm.cs                      |   16 
 ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs                                                  |  248 
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirSwitchCardControl.cs                       |   13 
 ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs                                                        |  171 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorInfraredDirectionForm.cs                       |   28 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/BackViewControl.cs                 |   52 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs                                          |  137 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/FreshAirEpointSelected.png                                  |    0 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs                                    |  362 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/PswNumberInputControl.cs         |   28 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorTemperatureHumidityForm.cs                     |   22 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs                                          |  126 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AirConditionerZbGatewayDirectionForm.cs              |   16 
 ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs                                           |    6 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/RoomDeviceGroupMenuControl.cs    |    6 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApSearchForm.cs                                   |   20 
 ZigbeeApp/Shared/Shared.projitems                                                                       |   16 
 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs                              |   67 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelColorSelectForm.cs                                  |   24 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs                          |  105 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs                                           |   98 
 ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs                                                  |    4 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs                                          |   82 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection1Form.cs                               |    4 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/CurtainSiphonateDirectionForm.cs                     |   16 
 ZigbeeApp/Shared/Phone/Device/Logic/Method.cs                                                           |   41 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs                         |   13 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs                        |   13 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs                                              |    1 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs                                                |   26 
 ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected2.png                                   |    0 
 ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs                                                     |   28 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs                                            |   41 
 ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs                                            |   11 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomRightClickButton.cs     |    2 
 ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs                                                    |  508 ++
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs                                 |   65 
 ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs                                 |   16 
 ZigbeeApp/Shared/Phone/Login/PhoneZone.cs                                                               |    6 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs                             |   10 
 ZigbeeApp/Shared/Phone/Login/AccountLogin.cs                                                            | 1303 +----
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs                            |   11 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs           |   43 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorPirDirectionForm.cs                            |   22 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs                                      |   24 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueTwoButtonDirectionForm.cs                |   16 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs                                       |    6 
 ZigbeeApp/Shared/Phone/Login/PhoneEmailForm.cs                                                          |  142 
 ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpoint.png                                            |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/FreshAirEpointSelected2.png                                 |    0 
 ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs                                                 |   26 
 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs                                |   20 
 ZigbeeApp/Shared/Phone/Login/AccountRegister.cs                                                         |    2 
 ZigbeeApp/Home.Ios/Resources/Language.ini                                                               |   31 
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceCurtainCardControl.cs                         |   14 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs                 |  256 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs         |   38 
 ZigbeeApp/Shared/Phone/MainPage/Controls/SafetyShortcutControl.cs                                       |    4 
 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs                           |   36 
 ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs                                                         |   65 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/RowLayoutBase.cs           |   37 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomLeftClickButton.cs      |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MostRightIconControl.cs            |   66 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs                         |  964 +++
 ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/openMode.png                                            |    0 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs                       |    5 
 ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDeviceForm.cs                                            |    6 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs            |  110 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/IconViewControl.cs                 |   26 
 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAcDetailCardForm.cs                                   |   98 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs                                |   96 
 ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected.png                                    |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AirSwitchCloudContrDirectionForm.cs                  |   28 
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceSelectUnallocatedControl.cs                              |    6 
 ZigbeeApp/Shared/Common/Device.cs                                                                       |   52 
 ZigbeeApp/Shared/Phone/MainPage/ListRoomViewFrom.cs                                                     |    8 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelThreeButtonDirectionForm.cs                     |   74 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs                                   |   86 
 ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/openMode.png                                              |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs                                     |  157 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs                                   |   37 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs            |   62 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs                                        |  418 +
 /dev/null                                                                                               |  884 ---
 ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs                                      |    8 
 ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs                                                    |   10 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs        |   39 
 ZigbeeApp/Shared/Phone/MainPage/SelectLocalDeviceImageForm.cs                                           |   31 
 ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/ACZbGatewayModuleUpdateForm.cs                  |   37 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs                       |  948 ++-
 216 files changed, 8,690 insertions(+), 6,080 deletions(-)

diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
index 5f78b79..de4baf5 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini
+++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -312,7 +312,8 @@
 307=璀﹀憡锛佹椂鏁堟�у父寮�鍏抽棴闂ㄩ攣鍔熻兘澶辫触锛岃鎵嬪姩鍙栨秷甯稿紑妯″紡銆�
 308=璀﹀憡锛佹椂鏁堟�у父寮�鍒犻櫎澶辫触銆�
 309=鏃舵晥鎬у父寮�鍒犻櫎澶辫触锛岀户缁�滃父寮�妯″紡鈥濊鍓嶅線闂ㄩ攣鐢ㄦ埛鐣岄潰璁剧疆;
- 
+310=璇疯緭鍏ュ悎娉曠殑鏁板瓧
+311=鎵嬪姩
 
 5097=鍙栨秷
 5098=纭畾
@@ -570,8 +571,13 @@
 5380=甯稿紑妯″紡
 5381=娣诲姞鏉′欢鎴栬�呮坊鍔犲姛鑳戒负绌�
 5382=鏌ョ湅
-
-
+5383=鍏抽棴
+5384=骞�
+5385=鏈�
+5386=鏃�
+5387=鍙�
+5388=甯稿紑鑷姩鍖�
+5389=鏃舵晥鎬у父寮�璁剧疆
 
 
 10000=HDL Home
@@ -626,7 +632,7 @@
 
 
 
-10150=鏀规埧闂村悕绉板凡瀛樺湪
+10150=鎴块棿鍚嶇О宸插瓨鍦�
 10151=鍦烘櫙鍚嶄笉鑳戒负绌�
 10152=鎺у埗鍦烘櫙澶辫触
 10153=鍦烘櫙涓虹┖
@@ -661,7 +667,7 @@
 11013=淇℃伅缂栬緫
 11014=鍔熻兘鍚嶇О
 11015=鎵�灞炲尯鍩�
-11016=鎵�灞炴ā鍧�
+11016=鎵�灞炶澶�
 11017=鏈煡
 11018=鍒嗕韩
 11019=鍒嗕韩鐨�
@@ -1810,6 +1816,17 @@
 16101=甯稿紑妯″紡缁撴潫(鑷姩鍖栬Е鍙�)
 16102=涓存椂瀵嗙爜寮�閿佹垚鍔�
 16103=涓存椂瀵嗙爜寮�閿佸け璐�
+16104=鐢垫満绌鸿皟妯″潡
+16105=涓滆姖绌鸿皟妯″潡
+16106=鏍煎姏绌鸿皟妯″潡
+16107=缇庣殑绌鸿皟妯″潡
+16108=铏氭嫙缃戝叧
+16109=鐜勫叧
+16110=鍘ㄦ埧
+16111=璧板粖
+16112=铏氭嫙璐﹀彿
+16113=鐏叏寮�
+16114=鐏叏鍏�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
 18004=鎸囧畾缃戝叧宸茬粡琚粦瀹�
@@ -1991,8 +2008,8 @@
 50031=Zigbee鏂规偊鍥涘紑鍏帶闈㈡澘
 50032=Zigbee鏂规偊鏂伴闈㈡澘
 50033=Zigbee鏂规偊鐜闈㈡澘
-50034=Zigbee绠�绾�4鎸夐敭闈㈡澘
-50035=Zigbee绠�绾�2璺潰鏉�
+50034=Zigbee绠�绾�4鎸夐敭鍦烘櫙闈㈡澘
+50035=Zigbee绠�绾�2璺獥甯橀潰鏉�
 50036=Zigbee鏂规偊2璺獥甯橀潰鏉�
 50037=Zigbee鏅鸿兘闂ㄩ攣
 50038=鏂伴鎺у埗灏忔ā鍧�
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/FreshAirEpoint.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/FreshAirEpoint.png
new file mode 100755
index 0000000..c637e9b
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/FreshAirEpoint.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/FreshAirEpointSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/FreshAirEpointSelected.png
new file mode 100755
index 0000000..d028074
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/FreshAirEpointSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/FreshAirEpointSelected2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/FreshAirEpointSelected2.png
new file mode 100755
index 0000000..14d38c3
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/FreshAirEpointSelected2.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorEmergencyButton.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorEmergencyButton.png
deleted file mode 100755
index 6742514..0000000
--- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorEmergencyButton.png
+++ /dev/null
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FreshAir/FreshAirPic.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FreshAir/FreshAirPic.png
new file mode 100755
index 0000000..fc08f7b
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FreshAir/FreshAirPic.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FreshAir/FreshAirRealDevicePic.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FreshAir/FreshAirRealDevicePic.png
new file mode 100755
index 0000000..721a5dd
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FreshAir/FreshAirRealDevicePic.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/noMode.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/noMode.png
new file mode 100755
index 0000000..899ff12
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/noMode.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/openMode.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/openMode.png
new file mode 100755
index 0000000..83434a8
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/openMode.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
index 40a2824..c075865 100644
--- a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
+++ b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
@@ -19,7 +19,7 @@
     <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
     <NuGetPackageImportStamp>
     </NuGetPackageImportStamp>
-    <AndroidKeyStore>true</AndroidKeyStore>
+    <AndroidKeyStore>false</AndroidKeyStore>
     <AndroidSigningKeyStore>C:\Users\admin\AppData\Local\Xamarin\Mono for Android\Keystore\HDL Home\HDL Home.keystore</AndroidSigningKeyStore>
     <AndroidSigningStorePass>85521566</AndroidSigningStorePass>
     <AndroidSigningKeyAlias>HDL Home</AndroidSigningKeyAlias>
@@ -319,7 +319,6 @@
     <AndroidAsset Include="Assets\Phone\Device\Sensor.png" />
     <AndroidAsset Include="Assets\Phone\Device\SensorCarbonMonoxide.png" />
     <AndroidAsset Include="Assets\Phone\Device\SensorDoorWindow.png" />
-    <AndroidAsset Include="Assets\Phone\Device\SensorEmergencyButton.png" />
     <AndroidAsset Include="Assets\Phone\Device\SensorFire.png" />
     <AndroidAsset Include="Assets\Phone\Device\SensorHumidity.png" />
     <AndroidAsset Include="Assets\Phone\Device\SensorInfrared.png" />
@@ -2096,6 +2095,27 @@
   <ItemGroup>
     <AndroidAsset Include="Assets\Phone\Item\Check1Selected.png" />
   </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\ZigeeLogic\noMode.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\ZigeeLogic\openMode.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Device\FreshAirEpoint.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Device\FreshAirEpointSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Device\FreshAirEpointSelected2.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FreshAir\FreshAirPic.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FreshAir\FreshAirRealDevicePic.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 ecad3bb..f00ee0c 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="2020041501" android:installLocation="auto" android:versionName="1.0.20041501">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="2020042701" android:installLocation="auto" android:versionName="1.0.20042701">
 	<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/Home.Ios/Home.IOS.csproj b/ZigbeeApp/Home.Ios/Home.IOS.csproj
index 308ee69..3620641 100644
--- a/ZigbeeApp/Home.Ios/Home.IOS.csproj
+++ b/ZigbeeApp/Home.Ios/Home.IOS.csproj
@@ -358,6 +358,8 @@
       <BundleResource Include="Resources\Phone\Center\MainBack1.png" />
       <BundleResource Include="Resources\Phone\Center\Admin.png" />
       <BundleResource Include="Resources\Phone\Center\SafetyManagement.png" />
+      <BundleResource Include="Resources\Phone\FreshAir\FreshAirRealDevicePic.png" />
+      <BundleResource Include="Resources\Phone\FreshAir\FreshAirPic.png" />
       <BundleResource Include="Resources\Phone\Navigation\CategorySelected.png" />
       <BundleResource Include="Resources\Phone\Navigation\Category.png" />
       <BundleResource Include="Resources\Phone\Navigation\HomeSelected.png" />
@@ -593,6 +595,7 @@
       <BundleResource Include="Resources\Phone\ZigeeLogic\add.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\sensor0.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\selectedsensor13.png" />
+      <BundleResource Include="Resources\Phone\ZigeeLogic\noMode.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\logicbj1.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\dimmableLight.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\athome.png" />
@@ -662,6 +665,7 @@
       <BundleResource Include="Resources\Phone\ZigeeLogic\humidity.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\2.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\selectedac.png" />
+      <BundleResource Include="Resources\Phone\ZigeeLogic\openMode.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\selectedsensor21.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\3.png" />
       <BundleResource Include="Resources\Phone\ZigeeLogic\back.png" />
@@ -728,6 +732,7 @@
       <BundleResource Include="Resources\Phone\Device\AirConditionerEpointSelected.png" />
       <BundleResource Include="Resources\Phone\Device\CurtainAutoOpenSelected.png" />
       <BundleResource Include="Resources\Phone\Device\Sensor.png" />
+      <BundleResource Include="Resources\Phone\Device\FreshAirEpointSelected2.png" />
       <BundleResource Include="Resources\Phone\Device\RepeaterSelected.png" />
       <BundleResource Include="Resources\Phone\Device\AirSwitchSelected2.png" />
       <BundleResource Include="Resources\Phone\Device\ConverterSelected2.png" />
@@ -738,7 +743,6 @@
       <BundleResource Include="Resources\Phone\Device\IntelligentLocks.png" />
       <BundleResource Include="Resources\Phone\Device\ConverterZb485Selected.png" />
       <BundleResource Include="Resources\Phone\Device\ColorLightSelected.png" />
-      <BundleResource Include="Resources\Phone\Device\SensorEmergencyButton.png" />
       <BundleResource Include="Resources\Phone\Device\AirSwitch.png" />
       <BundleResource Include="Resources\Phone\Device\IntelligentLocksH06CSelected2.png" />
       <BundleResource Include="Resources\Phone\Device\SwitchSelected.png" />
@@ -765,6 +769,7 @@
       <BundleResource Include="Resources\Phone\Device\AirConditionerSelected.png" />
       <BundleResource Include="Resources\Phone\Device\ButtonPanel.png" />
       <BundleResource Include="Resources\Phone\Device\ButtonPanelTwoSelected2.png" />
+      <BundleResource Include="Resources\Phone\Device\FreshAirEpointSelected.png" />
       <BundleResource Include="Resources\Phone\Device\AirConditionerZbGateway.png" />
       <BundleResource Include="Resources\Phone\Device\DryContact.png" />
       <BundleResource Include="Resources\Phone\Device\AirSwitchCloudContrSelected2.png" />
@@ -790,6 +795,7 @@
       <BundleResource Include="Resources\Phone\Device\DimmableLightOneLoadSelected.png" />
       <BundleResource Include="Resources\Phone\Device\SensorTemperatureSelected.png" />
       <BundleResource Include="Resources\Phone\Device\ButtonPanelFangyueTwoSelected2.png" />
+      <BundleResource Include="Resources\Phone\Device\FreshAirEpoint.png" />
       <BundleResource Include="Resources\Phone\Device\ColorLightSelected2.png" />
       <BundleResource Include="Resources\Phone\Device\DimmableLightOneLoadSelected2.png" />
       <BundleResource Include="Resources\Phone\Device\ButtonPanelThree.png" />
diff --git a/ZigbeeApp/Home.Ios/Resources/Language.ini b/ZigbeeApp/Home.Ios/Resources/Language.ini
index 5f78b79..de4baf5 100755
--- a/ZigbeeApp/Home.Ios/Resources/Language.ini
+++ b/ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -312,7 +312,8 @@
 307=璀﹀憡锛佹椂鏁堟�у父寮�鍏抽棴闂ㄩ攣鍔熻兘澶辫触锛岃鎵嬪姩鍙栨秷甯稿紑妯″紡銆�
 308=璀﹀憡锛佹椂鏁堟�у父寮�鍒犻櫎澶辫触銆�
 309=鏃舵晥鎬у父寮�鍒犻櫎澶辫触锛岀户缁�滃父寮�妯″紡鈥濊鍓嶅線闂ㄩ攣鐢ㄦ埛鐣岄潰璁剧疆;
- 
+310=璇疯緭鍏ュ悎娉曠殑鏁板瓧
+311=鎵嬪姩
 
 5097=鍙栨秷
 5098=纭畾
@@ -570,8 +571,13 @@
 5380=甯稿紑妯″紡
 5381=娣诲姞鏉′欢鎴栬�呮坊鍔犲姛鑳戒负绌�
 5382=鏌ョ湅
-
-
+5383=鍏抽棴
+5384=骞�
+5385=鏈�
+5386=鏃�
+5387=鍙�
+5388=甯稿紑鑷姩鍖�
+5389=鏃舵晥鎬у父寮�璁剧疆
 
 
 10000=HDL Home
@@ -626,7 +632,7 @@
 
 
 
-10150=鏀规埧闂村悕绉板凡瀛樺湪
+10150=鎴块棿鍚嶇О宸插瓨鍦�
 10151=鍦烘櫙鍚嶄笉鑳戒负绌�
 10152=鎺у埗鍦烘櫙澶辫触
 10153=鍦烘櫙涓虹┖
@@ -661,7 +667,7 @@
 11013=淇℃伅缂栬緫
 11014=鍔熻兘鍚嶇О
 11015=鎵�灞炲尯鍩�
-11016=鎵�灞炴ā鍧�
+11016=鎵�灞炶澶�
 11017=鏈煡
 11018=鍒嗕韩
 11019=鍒嗕韩鐨�
@@ -1810,6 +1816,17 @@
 16101=甯稿紑妯″紡缁撴潫(鑷姩鍖栬Е鍙�)
 16102=涓存椂瀵嗙爜寮�閿佹垚鍔�
 16103=涓存椂瀵嗙爜寮�閿佸け璐�
+16104=鐢垫満绌鸿皟妯″潡
+16105=涓滆姖绌鸿皟妯″潡
+16106=鏍煎姏绌鸿皟妯″潡
+16107=缇庣殑绌鸿皟妯″潡
+16108=铏氭嫙缃戝叧
+16109=鐜勫叧
+16110=鍘ㄦ埧
+16111=璧板粖
+16112=铏氭嫙璐﹀彿
+16113=鐏叏寮�
+16114=鐏叏鍏�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
 18004=鎸囧畾缃戝叧宸茬粡琚粦瀹�
@@ -1991,8 +2008,8 @@
 50031=Zigbee鏂规偊鍥涘紑鍏帶闈㈡澘
 50032=Zigbee鏂规偊鏂伴闈㈡澘
 50033=Zigbee鏂规偊鐜闈㈡澘
-50034=Zigbee绠�绾�4鎸夐敭闈㈡澘
-50035=Zigbee绠�绾�2璺潰鏉�
+50034=Zigbee绠�绾�4鎸夐敭鍦烘櫙闈㈡澘
+50035=Zigbee绠�绾�2璺獥甯橀潰鏉�
 50036=Zigbee鏂规偊2璺獥甯橀潰鏉�
 50037=Zigbee鏅鸿兘闂ㄩ攣
 50038=鏂伴鎺у埗灏忔ā鍧�
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpoint.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpoint.png
new file mode 100755
index 0000000..c637e9b
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpoint.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected.png
new file mode 100755
index 0000000..d028074
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected2.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected2.png
new file mode 100755
index 0000000..14d38c3
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/FreshAirEpointSelected2.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorEmergencyButton.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorEmergencyButton.png
deleted file mode 100755
index 6742514..0000000
--- a/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorEmergencyButton.png
+++ /dev/null
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirPic.png b/ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirPic.png
new file mode 100755
index 0000000..fc08f7b
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirPic.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirRealDevicePic.png b/ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirRealDevicePic.png
new file mode 100755
index 0000000..721a5dd
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/FreshAir/FreshAirRealDevicePic.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/noMode.png b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/noMode.png
new file mode 100755
index 0000000..899ff12
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/noMode.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/openMode.png b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/openMode.png
new file mode 100755
index 0000000..83434a8
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/ZigeeLogic/openMode.png
Binary files differ
diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs
index edbd684..febcb6a 100755
--- a/ZigbeeApp/Shared/Common/CommonPage.cs
+++ b/ZigbeeApp/Shared/Common/CommonPage.cs
@@ -57,7 +57,7 @@
         /// <summary>
         /// 鐗堟湰鍙�
         /// </summary>
-        public static string CodeIDString = "1.0.20042201";
+        public static string CodeIDString = "1.0.20042701";
         /// <summary>
         /// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee)
         /// </summary>
@@ -392,7 +392,7 @@
                     CommonPage.Instance.Show();
                     var login = new Phone.Login.AccountLogin();
                     CommonPage.Instance.AddChidren(login);
-                    login.Show();
+                    login.ShowForm();
                 });
             }
             catch { }
diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
index 0f8e7c2..d9cddaa 100755
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -400,6 +400,27 @@
             }
         }
 
+        /// <summary>
+        /// 娣诲姞铏氭嫙璁惧鍒扮紦瀛�
+        /// </summary>
+        /// <param name="device">璁惧瀵硅薄</param>
+        public void AddVirtualDeviceToMemory(CommonDevice device)
+        {
+            string mainKeys = this.GetDeviceMainKeys(device);
+            this.dicAllDevice[mainKeys] = device;
+
+            //璁惧鍥炶矾鏀堕泦
+            if (this.dicDeviceEpoint.ContainsKey(device.DeviceAddr) == false)
+            {
+                this.dicDeviceEpoint[device.DeviceAddr] = new HashSet<int>();
+            }
+            if (this.dicDeviceEpoint[device.DeviceAddr].Contains(device.DeviceEpoint) == false)
+            {
+                this.dicDeviceEpoint[device.DeviceAddr].Add(device.DeviceEpoint);
+            }
+            device.ReSave();
+        }
+
         #endregion
 
         #region 鈻� 淇敼璁惧___________________________
@@ -416,6 +437,12 @@
             this.SetEpointName(device, newName);
 
             this.BackupDeviceAfterReName(device);
+
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                return true;
+            }
 
             //涓嶅啀妫�娴嬪悕瀛楁槸鍚︿竴鏍�
             //鎴愬憳鍙兘淇敼鑷繁鏈湴鐨勫悕瀛�
@@ -462,6 +489,11 @@
 
                 //鏇存敼鍚嶅瓧鍚庯紝鍒锋柊璁惧缂撳瓨
                 this.BackupDeviceAfterReName(device2);
+            }
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                return true;
             }
 
             CommonDevice device = listDevice[0];
@@ -679,7 +711,11 @@
         /// <param name="device"></param>
         public void SetFixedPositionCommand(CommonDevice device)
         {
-            device.IdentifyControl(device.DeviceAddr, device.DeviceEpoint, 5);
+            //濡傛灉褰撳墠浣忓畢涓嶆槸铏氭嫙浣忓畢
+            if (Common.Config.Instance.Home.IsVirtually == false)
+            {
+                device.IdentifyControl(device.DeviceAddr, device.DeviceEpoint, 5);
+            }
         }
 
         /// <summary>
@@ -1766,6 +1802,14 @@
                     info.ConcreteType = DeviceConcreteType.Sensor_Humidity;
                 }
                 info.ObjectTypeNameId = 60000;//浼犳劅鍣�
+            }
+            //14鏂伴璁惧
+            else if (dicType.ContainsKey(DeviceType.FreshAir) == true)
+            {
+                info.ConcreteTextId = R.MyInternationalizationString.uDeviceModelId2310;
+                info.BeloneType = DeviceBeloneType.A鏂伴;
+                info.ConcreteType = DeviceConcreteType.Relay_FangyueFreshAirModul;
+                info.ObjectTypeNameId = 60011;//鏂伴
             }
 
             int value = (int)info.BeloneType;
@@ -3002,7 +3046,11 @@
         /// <summary>
         /// 骞叉帴鐐�
         /// </summary>
-        A骞叉帴鐐� = 16
+        A骞叉帴鐐� = 16,
+        /// <summary>
+        /// 鏂伴
+        /// </summary>
+        A鏂伴 = 17
     }
 
     #endregion
diff --git a/ZigbeeApp/Shared/Common/House.cs b/ZigbeeApp/Shared/Common/House.cs
index 0627613..871b61b 100755
--- a/ZigbeeApp/Shared/Common/House.cs
+++ b/ZigbeeApp/Shared/Common/House.cs
@@ -163,6 +163,10 @@
         /// <param name="houseName">House name.</param>
         public static void EditorHouseByHouseId(string houseId, string houseName)
         {
+            if (Config.Instance.Home.Id == houseId)
+            {
+                Config.Instance.Home.Name = houseName;
+            }
             var home = GetHouseByHouseId(houseId);
             if (home == null)
             {
@@ -170,7 +174,6 @@
             }
             home.Name = houseName;
             home.Save();
-            Config.Instance.Save();
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Common/Logic.cs b/ZigbeeApp/Shared/Common/Logic.cs
index 1bc61e4..25b7c00 100755
--- a/ZigbeeApp/Shared/Common/Logic.cs
+++ b/ZigbeeApp/Shared/Common/Logic.cs
@@ -8,6 +8,7 @@
     {
         public static List<Logic> LogicList = new List<Logic>();
         public static List<Logic> LockLogicList = new List<Logic>();
+        public static List<Logic> SoneLogicList = new List<Logic>();
         public static List<ZigBee.Device.CommonDevice> LogicDviceList = new List<ZigBee.Device.CommonDevice>();
         public static Logic CurrentLogic;
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
index 156f29f..d89aea9 100755
--- a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
@@ -639,6 +639,7 @@
             {
                 return true;
             }
+
             //鎵撳紑杩涘害鏉�
             this.ShowProgressBar();
             //鑾峰彇鎵ц鐩爣鍒楄〃
diff --git a/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDelayTimeForm.cs b/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDelayTimeForm.cs
index c88d512..2173df9 100755
--- a/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDelayTimeForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDelayTimeForm.cs
@@ -1,22 +1,22 @@
-锘縰sing System;
-using System.Collections.Generic;
+锘縰sing System;
+using System.Collections.Generic;
 using Shared.Phone.UserCenter;
 
-namespace Shared.Phone.Category
-{
+namespace Shared.Phone.Category
+{
     /// <summary>
     /// 鍦烘櫙鎵ц鐩爣娣诲姞寤舵椂鐨勭晫闈�
-    /// </summary>
-    public class AdjustTargetAddDelayTimeForm : EditorCommonForm
+    /// </summary>
+    public class AdjustTargetAddDelayTimeForm : EditorCommonForm
     {
-        #region 鈻� 鍙橀噺澹版槑___________________________
-
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
         /// <summary>
         /// 纭畾閫夋嫨鐨勪簨浠�
-        /// </summary>
-        public Action<int> FinishSelectEvent = null;
-
-        #endregion
+        /// </summary>
+        public Action<int> FinishSelectEvent = null;
+
+        #endregion
 
         #region 鈻� 鍒濆鍖朹____________________________
 
@@ -48,29 +48,29 @@
             //鍥炬爣绗竴灞傚簳鑹�
             var frameFirstBack = new FrameLayout();
             frameFirstBack.Y = Application.GetRealHeight(118);
-            frameFirstBack.Height = Application.GetMinRealAverage(207);
-            frameFirstBack.Width = Application.GetMinRealAverage(207);
+            frameFirstBack.Height = this.GetPictrueRealSize(207);
+            frameFirstBack.Width = this.GetPictrueRealSize(207);
             frameFirstBack.BackgroundColor = UserCenterColor.Current.White;
-            frameFirstBack.Radius = (uint)Application.GetMinRealAverage(207) / 2;
-            frameFirstBack.Gravity = Gravity.CenterHorizontal;
+            frameFirstBack.Radius = (uint)this.GetPictrueRealSize(207) / 2;
+            frameFirstBack.Gravity = Gravity.CenterHorizontal;
             bodyFrameLayout.AddChidren(frameFirstBack);
             //闃叉鍑虹幇璇樊
-            int iconWidth = Application.GetMinRealAverage(207) - Application.GetMinRealAverage(12) - Application.GetMinRealAverage(12);
+            int iconWidth = this.GetPictrueRealSize(207) - this.GetPictrueRealSize(12) - this.GetPictrueRealSize(12);
             //鍥炬爣绗簩灞傚簳鑹�
             var btnSecondBack = new NormalViewControl(iconWidth, iconWidth, false);
             btnSecondBack.BackgroundColor = 0xfffef1ed;
             btnSecondBack.Radius = (uint)iconWidth / 2;
             btnSecondBack.Gravity = Gravity.Center;
-            frameFirstBack.AddChidren(btnSecondBack);
-            //鍥炬爣
-            var btnIcon = new IconViewControl(124);
-            btnIcon.UnSelectedImagePath = "Item/Timer.png";
-            btnIcon.Gravity = Gravity.Center;
-            frameFirstBack.AddChidren(btnIcon);
-
-            //涓轰綘鐨勫姩浣滃垱寤烘椂闂撮棿闅�
-            var btnMsg = new NormalViewControl(700, 62, true);
-            btnMsg.Y = frameFirstBack.Bottom + Application.GetRealHeight(34);
+            frameFirstBack.AddChidren(btnSecondBack);
+            //鍥炬爣
+            var btnIcon = new IconViewControl(124);
+            btnIcon.UnSelectedImagePath = "Item/Timer.png";
+            btnIcon.Gravity = Gravity.Center;
+            frameFirstBack.AddChidren(btnIcon);
+
+            //涓轰綘鐨勫姩浣滃垱寤烘椂闂撮棿闅�
+            var btnMsg = new NormalViewControl(700, 62, true);
+            btnMsg.Y = frameFirstBack.Bottom + Application.GetRealHeight(34);
             btnMsg.TextSize = 15;
             btnMsg.TextID = R.MyInternationalizationString.SelectTimeForAction;
             btnMsg.TextAlignment = TextAlignment.Center;
@@ -84,35 +84,35 @@
             frameWhiteBack.Height = Application.GetRealHeight(1500);//瓒呰繃搴曢儴鍗冲彲
             frameWhiteBack.Radius = (uint)Application.GetRealHeight(58);
             bodyFrameLayout.AddChidren(frameWhiteBack);
-            //婊戝姩鎺т欢
-            var pickView = new UIPickerView();
+            //婊戝姩鎺т欢
+            var pickView = new UIPickerView();
             pickView.Y = Application.GetRealHeight(127);
-            pickView.Height = Application.GetRealHeight(153 * 3);
-            frameWhiteBack.AddChidren(pickView);
-
-            //鍒�
-            string strMinute = Language.StringByID(R.MyInternationalizationString.uMinute);
-            //绉�
-            string strSecond = Language.StringByID(R.MyInternationalizationString.uSecond);
-            var listfirst = new List<string>();
-            var listSecond = new List<List<string>>();
-            for (int i = 0; i <= 59; i++)
-            {
-                listfirst.Add(i.ToString().PadLeft(2, '0') + strMinute);
-                var listTemp = new List<string>();
-                for (int j = 0; j <= 59; j++)
-                {
-                    if (i == 0 && j == 0)
-                    {
-                        continue;
-                    }
-                    listTemp.Add(j.ToString().PadLeft(2, '0') + strSecond);
-                }
-                listSecond.Add(listTemp);
-            }
-            //鍔犱竴涓�60鍒嗛挓鍚�
-            listfirst.Add("60" + strMinute);
-            var listTemp2 = new List<string>() { "00" + strSecond };
+            pickView.Height = Application.GetRealHeight(153 * 3);
+            frameWhiteBack.AddChidren(pickView);
+
+            //鍒�
+            string strMinute = Language.StringByID(R.MyInternationalizationString.uMinute);
+            //绉�
+            string strSecond = Language.StringByID(R.MyInternationalizationString.uSecond);
+            var listfirst = new List<string>();
+            var listSecond = new List<List<string>>();
+            for (int i = 0; i <= 59; i++)
+            {
+                listfirst.Add(i.ToString().PadLeft(2, '0') + strMinute);
+                var listTemp = new List<string>();
+                for (int j = 0; j <= 59; j++)
+                {
+                    if (i == 0 && j == 0)
+                    {
+                        continue;
+                    }
+                    listTemp.Add(j.ToString().PadLeft(2, '0') + strSecond);
+                }
+                listSecond.Add(listTemp);
+            }
+            //鍔犱竴涓�60鍒嗛挓鍚�
+            listfirst.Add("60" + strMinute);
+            var listTemp2 = new List<string>() { "00" + strSecond };
             listSecond.Add(listTemp2);
 
             int firstIndex = selectTime / 60;
@@ -120,19 +120,19 @@
             //鍥犱负0鍒嗙殑鏃跺�欙紝瀹冩槸浠�1绉掑紑濮嬬殑锛屾墍浠ュ畠鐨勭储寮曢渶瑕�-1
             if (firstIndex == 0) { secondIndex--; }
 
-            pickView.setPicker(listfirst, listSecond);
-            pickView.setCurrentItems(firstIndex, secondIndex, 0);
-            pickView.OnSelectChangeEvent += (value1, value2, value3) =>
+            pickView.setPicker(listfirst, listSecond);
+            pickView.setCurrentItems(firstIndex, secondIndex, 0);
+            pickView.OnSelectChangeEvent += (value1, value2, value3) =>
             {
                 int minute = Convert.ToInt32(listfirst[value1].Substring(0, 2));
                 int second = Convert.ToInt32(listSecond[value1][value2].Substring(0, 2));
-                selectTime = minute * 60 + second;
-            };
-
-            //瀹屾垚鎸夐挳
-            var btnSave = new BottomClickButton();
-            btnSave.TextID = R.MyInternationalizationString.uSave;
-            bodyFrameLayout.AddChidren(btnSave);
+                selectTime = minute * 60 + second;
+            };
+
+            //瀹屾垚鎸夐挳
+            var btnSave = new BottomClickButton();
+            btnSave.TextID = R.MyInternationalizationString.uSave;
+            bodyFrameLayout.AddChidren(btnSave);
             btnSave.ButtonClickEvent += (sender, e) =>
             {
                 //閫夋嫨鐨勬槸鍚屼竴涓椂闂�,鍒欎笉瑙﹀彂鍥炶皟鍑芥暟
@@ -143,20 +143,20 @@
             };
         }
 
-        #endregion
+        #endregion
 
-        #region 鈻� 鐣岄潰鍏抽棴___________________________
-
+        #region 鈻� 鐣岄潰鍏抽棴___________________________
+
         /// <summary>
         /// 鐣岄潰鍏抽棴
-        /// </summary>
+        /// </summary>
         public override void CloseFormBefore()
         {
             this.FinishSelectEvent = null;
 
             base.CloseFormBefore();
-        }
-
-        #endregion
-    }
-}
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDeviceForm.cs b/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDeviceForm.cs
index a0a3125..80f6792 100755
--- a/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDeviceForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDeviceForm.cs
@@ -333,11 +333,11 @@
 
             //璁惧鍥炬爣鑳屾櫙鎺т欢
             var frameIconBackGroud = new FrameLayout();
-            frameIconBackGroud.Height = Application.GetMinRealAverage(112);
-            frameIconBackGroud.Width = Application.GetMinRealAverage(112);
+            frameIconBackGroud.Height = this.GetPictrueRealSize(112);
+            frameIconBackGroud.Width = this.GetPictrueRealSize(112);
             frameIconBackGroud.Gravity = Gravity.CenterVertical;
             frameIconBackGroud.X = Application.GetRealWidth(46);
-            frameIconBackGroud.Radius = (uint)Application.GetMinRealAverage(112 / 2);
+            frameIconBackGroud.Radius = (uint)this.GetPictrueRealSize(112 / 2);
             frameIconBackGroud.BackgroundColor = Common.ZigbeeColor.Current.GXCGrayBackgroundColor;
             rowDevice.AddChidren(frameIconBackGroud, ChidrenBindMode.NotBind);
             frameIconBackGroud.Y += rowDevice.chidrenYaxis;
diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
index d9c5abf..79e9432 100755
--- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -438,8 +438,8 @@
             var noFunction = new Button()
             {
                 Y = Application.GetRealHeight(320),
-                Width = Application.GetMinRealAverage(757),
-                Height = Application.GetMinRealAverage(435),
+                Width = this.GetPictrueRealSize(757),
+                Height = this.GetPictrueRealSize(435),
                 UnSelectedImagePath = "Item/NoFunction.png",
                 Gravity = Gravity.CenterHorizontal
             };
@@ -477,6 +477,15 @@
             for (int i = 0; i < rowInfo.listDeviceKeys.Count; i++)
             {
                 var device = LocalDevice.Current.GetDevice(rowInfo.listDeviceKeys[i]);
+
+                //鑾峰彇璁惧绫诲瀷鐨�
+                var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+                //鏂伴闈㈡澘涓嬬殑鍥炶矾涓嶆樉绀猴紝锛堝鏂伴銆佹俯/婀垮害浼犳劅鍣ㄥ垯涓嶆樉绀猴級
+                if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+                {
+                    continue;
+                }
+
                 if (device != null)
                 {
                     listDevice.Add(device);
@@ -513,6 +522,11 @@
                     else if (device.Type == DeviceType.Thermostat)
                     {
                         cardContr = new Controls.DeviceAcRowControl(listView.rowSpace / 2);
+                    }
+                    // 鏂伴
+                    else if (device.Type == DeviceType.FreshAir)
+                    {
+                        cardContr = new Controls.DeviceFreshAirRowControl(listView.rowSpace / 2);
                     }
                     //褰╃伅(璋冨厜鍣�)
                     else if (device.Type == DeviceType.DimmableLight)
@@ -640,23 +654,45 @@
             {
                 if (listview1 != null)
                 {
-                    //鑾峰彇鍏ㄩ儴鍦烘櫙鐨勫欢鏃舵椂闂�
-                    this.GetAllDelayScene(dicSceneContr, listview1);
+                    //鎵撳紑鍏ㄩ儴鍦烘櫙鐨勫欢鏃舵椂闂�
+                    this.StartAllDelayScene(dicSceneContr, listview1);
                 }
                 else
                 {
-                    //鑾峰彇鍏ㄩ儴鍦烘櫙鐨勫欢鏃舵椂闂�
-                    this.GetAllDelayScene(dicSceneContr, listview2);
+                    //鎵撳紑鍏ㄩ儴鍦烘櫙鐨勫欢鏃舵椂闂�
+                    this.StartAllDelayScene(dicSceneContr, listview2);
                 }
             }, ShowErrorMode.NO);
         }
 
         /// <summary>
-        /// 鑾峰彇鍏ㄩ儴鍦烘櫙鐨勫欢鏃舵椂闂�
+        /// 鎵撳紑鍏ㄩ儴鍦烘櫙鐨勫欢鏃舵椂闂�
         /// </summary>
         /// <param name="dicSceneContr"></param>
-        private async void GetAllDelayScene(Dictionary<int, SceneCategoryView> dicSceneContr, ViewGroup listview)
+        private async void StartAllDelayScene(Dictionary<int, SceneCategoryView> dicSceneContr, ViewGroup listview)
         {
+            string hourText = Language.StringByID(R.MyInternationalizationString.Hour);
+            string minuText = Language.StringByID(R.MyInternationalizationString.Minute);
+            string secondText = Language.StringByID(R.MyInternationalizationString.Second);
+
+            //濡傛灉褰撳墠浣忓畢鏄櫄鎷熶綇瀹�
+            if (Config.Instance.Home.IsVirtually == true)
+            {
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    //寮�鍚欢鏃剁壒鏁�
+                    foreach (var myContr in dicSceneContr.Values)
+                    {
+                        if (myContr.scene.RemainTime > 0)
+                        {
+                            //寮�鍚満鏅欢鏃剁壒鏁�
+                            this.StartSceneDelayApeal(myContr, listview, myContr.scene.RemainTime, hourText, minuText, secondText);
+                        }
+                    }
+                }, ShowErrorMode.NO);
+                return;
+            }
+
             //璇诲彇鍏ㄩ儴鐨勫欢鏃舵椂闂�
             var result = await Scene.CatDelaySceneAsync();
             if (result == null || result.catDelaySceneResponseData == null ||
@@ -665,10 +701,6 @@
                 //鍑洪敊涓嶉笩瀹�
                 return;
             }
-
-            string hourText = Language.StringByID(R.MyInternationalizationString.Hour);
-            string minuText = Language.StringByID(R.MyInternationalizationString.Minute);
-            string secondText = Language.StringByID(R.MyInternationalizationString.Second);
 
             foreach (var data in result.catDelaySceneResponseData.DelayScenesList)
             {
@@ -685,30 +717,45 @@
                 {
                     continue;
                 }
-                HdlThreadLogic.Current.RunThread(() =>
+                //寮�鍚満鏅欢鏃剁壒鏁�
+                this.StartSceneDelayApeal(seceneContr, listview, remainTime, hourText, minuText, secondText);
+            }
+        }
+
+        /// <summary>
+        /// 寮�鍚満鏅欢鏃剁壒鏁�
+        /// </summary>
+        /// <param name="sceneContr"></param>
+        /// <param name="remainTime"></param>
+        /// <param name="hourText"></param>
+        /// <param name="minuText"></param>
+        /// <param name="secondText"></param>
+        private void StartSceneDelayApeal(SceneCategoryView sceneContr, ViewGroup listview, int remainTime,
+            string hourText, string minuText, string secondText)
+        {
+            HdlThreadLogic.Current.RunThread(() =>
+            {
+                //寮�鍚唴閮ㄥ欢鏃舵椂闂寸嚎绋�(鏃ㄥ湪鍏ㄩ儴鍦版柟鐨勫悓涓�鍦烘櫙鏃堕棿鍚屾)
+                HdlSceneLogic.Current.StartDelayTimeThread(sceneContr.scene);
+                while (remainTime > 0 && this.Parent != null)
                 {
-                    //寮�鍚唴閮ㄥ欢鏃舵椂闂寸嚎绋�(鏃ㄥ湪鍏ㄩ儴鍦版柟鐨勫悓涓�鍦烘櫙鏃堕棿鍚屾)
-                    HdlSceneLogic.Current.StartDelayTimeThread(seceneContr.scene);
-                    while (remainTime > 0 && this.Parent != null)
-                    {
-                        System.Threading.Thread.Sleep(1000);
-                        Application.RunOnMainThread(() =>
-                        {
-                            seceneContr.SetTimeText(this.GetTimeString(remainTime, hourText, minuText, secondText));
-                        });
-                        remainTime--;
-                    }
+                    System.Threading.Thread.Sleep(1000);
                     Application.RunOnMainThread(() =>
                     {
-                        if (listview.Parent != null)
-                        {
-                            seceneContr.SetTimeImage();
-                            //寮�鍚疞oading鐗规晥
-                            seceneContr.StartLoadingApreal();
-                        }
+                        sceneContr.SetTimeText(this.GetTimeString(remainTime, hourText, minuText, secondText));
                     });
+                    remainTime--;
+                }
+                Application.RunOnMainThread(() =>
+                {
+                    if (listview.Parent != null)
+                    {
+                        sceneContr.SetTimeImage();
+                        //寮�鍚疞oading鐗规晥
+                        sceneContr.StartLoadingApreal();
+                    }
                 });
-            }
+            });
         }
 
         /// <summary>
@@ -719,8 +766,8 @@
             var noFunction = new Button()
             {
                 Y = Application.GetRealHeight(320),
-                Width = Application.GetMinRealAverage(757),
-                Height = Application.GetMinRealAverage(435),
+                Width = this.GetPictrueRealSize(757),
+                Height = this.GetPictrueRealSize(435),
                 UnSelectedImagePath = "Item/NoFunction.png",
                 Gravity = Gravity.CenterHorizontal
             };
@@ -764,6 +811,11 @@
                         if (report.DeviceStatusReport.CluterID == 513 && report.DeviceStatusReport.AttriBute[0].AttributeId == 28)
                         {
                             //绌鸿皟鏄壒娈婄殑,瀹冪殑寮�鍏虫槸灞炴�т笂鎶ユ潵鐫�.宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉
+                            this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu();
+                        }
+                        if (report.DeviceStatusReport.CluterID == 514 && report.DeviceStatusReport.AttriBute[0].AttributeId == 0)
+                        {
+                            //鏂伴鏄壒娈婄殑,瀹冪殑寮�鍏虫槸灞炴�т笂鎶ユ潵鐫�.宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉
                             this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu();
                         }
                         this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
@@ -872,6 +924,11 @@
                     LocalDevice.Current.GetDeviceObjectIcon(typeInfo.ConcreteType, ref path1, ref path2);
                     dic[typeInfo.BeloneTextId].IconPath = path1;
                     dic[typeInfo.BeloneTextId].IconPathSelected = path2;
+                    if (device.Type == DeviceType.FreshAir)
+                    {
+                        dic[typeInfo.BeloneTextId].IconPath = "Device/FreshAirEpoint.png";
+                        dic[typeInfo.BeloneTextId].IconPathSelected = "Device/FreshAirEpointSelected.png";
+                    }
                     dic[typeInfo.BeloneTextId].TextId = typeInfo.BeloneTextId;
                 }
                 dic[typeInfo.BeloneTextId].listDeviceKeys.Add(LocalDevice.Current.GetDeviceMainKeys(device));
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
index 04dc6ed..afff6e7 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
@@ -77,11 +77,11 @@
             this.device = i_device;
             //璁惧鍥炬爣鑳屾櫙鎺т欢
             this.frameIconBackGroud = new FrameLayout();
-            frameIconBackGroud.Height = Application.GetMinRealAverage(112);
-            frameIconBackGroud.Width = Application.GetMinRealAverage(112);
+            frameIconBackGroud.Height = this.GetPictrueRealSize(112);
+            frameIconBackGroud.Width = this.GetPictrueRealSize(112);
             frameIconBackGroud.Gravity = Gravity.CenterVertical;
             frameIconBackGroud.X = Application.GetRealWidth(46);
-            frameIconBackGroud.Radius = (uint)Application.GetMinRealAverage(112 / 2);
+            frameIconBackGroud.Radius = (uint)this.GetPictrueRealSize(112 / 2);
             frameIconBackGroud.BackgroundColor = Common.ZigbeeColor.Current.GXCGrayBackgroundColor;
             this.frameTable.AddChidren(frameIconBackGroud, ChidrenBindMode.NotBind);
             if (chidrenYaxis != 0)
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs
index dce8e43..8bad345 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs
@@ -36,6 +36,14 @@
             var btnSwitch = this.AddSwitchControl();
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    //鐩存帴鍙樻洿缂撳瓨
+                    ((LightBase)i_device).OnOffStatus = btnSwitch.IsSelected == true ? 0 : 1;
+                    this.RefreshControlInfo(this.device);
+                    return;
+                }
                 bool setStatu = !btnSwitch.IsSelected;
                 //鍙樻洿鍗$墖鐘舵��
                 this.SetRowOpenStatu(setStatu);
@@ -113,6 +121,11 @@
         /// </summary>
         public override void SendStatuComand()
         {
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,姝ゅ姛鑳芥棤鏁�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                return;
+            }
             //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
             if (this.CheckCanSendStatuComand() == true)
             {
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs
index 1066d1e..97018dd 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs
@@ -36,6 +36,14 @@
             var btnSwitch = this.AddSwitchControl();
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鐩存帴淇敼缂撳瓨
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    //鐩存帴鍙樻洿缂撳瓨
+                    ((LightBase)i_device).OnOffStatus = btnSwitch.IsSelected == true ? 0 : 1;
+                    this.RefreshControlInfo(this.device);
+                    return;
+                }
                 bool setStatu = !btnSwitch.IsSelected;
                 //鍙樻洿鍗$墖鐘舵��
                 this.SetRowOpenStatu(setStatu);
@@ -99,6 +107,11 @@
         /// </summary>
         public override void SendStatuComand()
         {
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,姝ゅ姛鑳芥棤鏁�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                return;
+            }
             //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
             if (this.CheckCanSendStatuComand() == true)
             {
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs
index 8fc210c..72e5900 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs
@@ -61,6 +61,13 @@
             btnOpen.X = Application.GetRealWidth(625) - btnOpen.XOffset;
             btnOpen.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鐩存帴淇敼缂撳瓨
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    ((Rollershade)i_device).WcdCurrentPositionLiftPercentage = 100;
+                    base.RefreshControlInfo(i_device);
+                    return;
+                }
                 ((Rollershade)i_device).CurtainUpDownStopControl(0);
             };
 
@@ -74,7 +81,11 @@
             btnStop.X = Application.GetRealWidth(769) - btnOpen.XOffset;
             btnStop.ButtonClickEvent += (sender, e) =>
             {
-                ((Rollershade)i_device).CurtainUpDownStopControl(2);
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,姝ゅ姛鑳芥棤鏁�
+                if (Common.Config.Instance.Home.IsVirtually == false)
+                {
+                    ((Rollershade)i_device).CurtainUpDownStopControl(2);
+                }
             };
 
             //鍏抽棴
@@ -85,6 +96,13 @@
             btnClose.X = Application.GetRealWidth(896) - btnOpen.XOffset;
             btnClose.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鐩存帴淇敼缂撳瓨
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    ((Rollershade)i_device).WcdCurrentPositionLiftPercentage = 0;
+                    base.RefreshControlInfo(i_device);
+                    return;
+                }
                 ((Rollershade)i_device).CurtainUpDownStopControl(1);
             };
 
@@ -134,6 +152,11 @@
         /// </summary>
         public override void SendStatuComand()
         {
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,姝ゅ姛鑳芥棤鏁�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                return;
+            }
             //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
             if (this.CheckCanSendStatuComand() == true)
             {
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceDoorLockRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceDoorLockRowControl.cs
index 52175d5..69d12e9 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceDoorLockRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceDoorLockRowControl.cs
@@ -30,8 +30,12 @@
         {
             base.InitControl(i_device);
 
-            //娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
-            this.AddDetailInfoEvent(i_device);
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,姝ゅ姛鑳芥棤鏁�
+            if (Common.Config.Instance.Home.IsVirtually == false)
+            {
+                //娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+                this.AddDetailInfoEvent(i_device);
+            }
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs
new file mode 100755
index 0000000..41fd742
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs
@@ -0,0 +1,105 @@
+锘縰sing System;
+using Shared.Phone.UserCenter;
+using ZigBee.Device;
+
+namespace Shared.Phone.Category.Controls
+{
+    /// <summary>
+    /// 鍒嗙被鐣岄潰鐨勬柊椋庤澶囪鎺т欢
+    /// </summary>
+    public class DeviceFreshAirRowControl : DeviceRowCommon
+    {
+        /// <summary>
+        /// 鍒嗙被鐣岄潰鐨勬柊椋庤澶囪鎺т欢
+        /// </summary>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        public DeviceFreshAirRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
+        {
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栨帶浠�
+        /// </summary>
+        /// <param name="i_device"></param>
+        public override void InitControl(CommonDevice i_device)
+        {
+            base.InitControl(i_device);
+
+            //娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+            this.AddDetailInfoEvent(i_device);
+
+            //娣诲姞寮�鍏虫帶浠�
+            var btnSwitch = this.AddSwitchControl();
+            btnSwitch.ButtonClickEvent += (sender, e) =>
+            {
+                bool setStatu = !btnSwitch.IsSelected;
+                //鍙樻洿鍗$墖鐘舵��
+                this.SetRowOpenStatu(setStatu);
+                //妫�娴嬫槸鍚﹁幏鍙栫綉鍏冲弽棣堢殑缁撴灉,濡傛灉缃戝叧娌℃湁鍥炲,鍒欎細寮瑰嚭娑堟伅
+                this.StartCheckResponeResult(!setStatu);
+
+                if (setStatu == true)
+                {
+                    //鎵撳紑
+                    this.SetDeviceStatuText(Language.StringByID(R.MyInternationalizationString.uOpen1));
+                    (i_device as FreshAir).Open();
+                }
+                else
+                {
+                    //鍏抽棴
+                    this.SetDeviceStatuText(Language.StringByID(R.MyInternationalizationString.Close));
+                    (i_device as FreshAir).Close();
+                }
+            };
+        }
+
+        #region 鈻� 娣卞害鍗$墖淇℃伅_______________________
+
+        /// <summary>
+        /// 娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+        /// </summary>
+        private void AddDetailInfoEvent(CommonDevice i_device)
+        {
+            //娣卞害鍗$墖淇℃伅
+            this.frameTable.ButtonClickEvent += (sender, e) =>
+            {
+                //鏂伴绫诲瀷鐨勬繁搴﹀崱鐗囩晫闈�
+                var form = new MainPage.ControlForm.DeviceFreshAirDetailCardForm();
+                form.AddForm(i_device, HdlRoomLogic.Current.CurrentRoom, 965, 1374);
+                form.FormCloseEvent += this.CardDetailInfoBackEvent;
+            };
+        }
+
+        #endregion
+
+        #region 鈻� 妫�娴嬭澶囨墦寮�鐘舵�乢__________________
+
+        /// <summary>
+        /// 妫�娴嬭澶囨墦寮�鐘舵��
+        /// </summary>
+        /// <param name="i_device"></param>
+        /// <returns></returns>
+        public override bool CheckIsOpenStatu(CommonDevice i_device)
+        {
+            return ((FreshAir)i_device).currentFanStatus != 0;
+        }
+
+        #endregion
+
+        #region 鈻� 鍙戦�佽幏鍙栫姸鎬佸懡浠__________________
+
+        /// <summary>
+        /// 鍙戦�佽幏鍙栫姸鎬佸懡浠�
+        /// </summary>
+        public override void SendStatuComand()
+        {
+            //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
+            if (this.CheckCanSendStatuComand() == true)
+            {
+                HdlDeviceAttributeLogic.Current.SendFreshAirStatuComand(this.device);
+            }
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs
index f8db2d5..8da00ad 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs
@@ -36,6 +36,15 @@
             var btnSwitch = this.AddSwitchControl();
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    //鐩存帴鍙樻洿缂撳瓨
+                    ((LightBase)i_device).OnOffStatus = btnSwitch.IsSelected == true ? 0 : 1;
+                    this.RefreshControlInfo(this.device);
+                    return;
+                }
+
                 bool setStatu = !btnSwitch.IsSelected;
                 //鍙樻洿鍗$墖鐘舵��
                 this.SetRowOpenStatu(setStatu);
@@ -113,6 +122,11 @@
         /// </summary>
         public override void SendStatuComand()
         {
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,姝ゅ姛鑳芥棤鏁�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                return;
+            }
             //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
             if (this.CheckCanSendStatuComand() == true)
             {
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs
index ac16b4d..3fa9a7c 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs
@@ -29,6 +29,11 @@
         /// </summary>
         public override void SendStatuComand()
         {
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,姝ゅ姛鑳芥棤鏁�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                return;
+            }
             //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
             if (this.CheckCanSendStatuComand() == true)
             {
diff --git a/ZigbeeApp/Shared/Phone/Category/SelectFloorForm.cs b/ZigbeeApp/Shared/Phone/Category/SelectFloorForm.cs
index 9c92d25..29e69c7 100755
--- a/ZigbeeApp/Shared/Phone/Category/SelectFloorForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/SelectFloorForm.cs
@@ -4,7 +4,7 @@
 
 namespace Shared.Phone.Category
 {
-    public class SelectFloorForm : FrameLayout
+    public class SelectFloorForm : UserCenter.FrameLayoutBase
     {
 
         public Action<string> FloorAction;
@@ -43,8 +43,8 @@
             {
                 X = Application.GetRealWidth(x),
                 Y = Application.GetRealHeight(y),
-                Width = Application.GetMinRealAverage(449),
-                Height = Application.GetMinRealAverage(773),
+                Width = this.GetPictrueRealSize(449),
+                Height = this.GetPictrueRealSize(773),
                 UnSelectedImagePath = "Floor/SelectFloor_Left_4.png"
             };
             dialog.AddChidren(bg);
@@ -53,16 +53,16 @@
             {
                 X = Application.GetRealWidth(x),
                 Y = Application.GetRealHeight(y + 23),
-                Width = Application.GetMinRealAverage(449),
-                Height = Application.GetMinRealAverage(773 - 23)
+                Width = this.GetPictrueRealSize(449),
+                Height = this.GetPictrueRealSize(773 - 23)
             };
             dialog.AddChidren(backgroundFL);
 
             var tip = new Button
             {
                 X = Application.GetRealWidth(80),
-                Width = Application.GetMinRealAverage(350),
-                Height = Application.GetMinRealAverage(150),
+                Width = this.GetPictrueRealSize(350),
+                Height = this.GetPictrueRealSize(150),
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                 TextAlignment = TextAlignment.CenterLeft,
                 TextID = R.MyInternationalizationString.SelectFloor,
@@ -74,8 +74,8 @@
             var floorLayout = new VerticalScrolViewLayout
             {
                 Y = tip.Bottom,
-                Width = Application.GetMinRealAverage(449),
-                Height = Application.GetMinRealAverage(600),
+                Width = this.GetPictrueRealSize(449),
+                Height = this.GetPictrueRealSize(600),
                 VerticalScrollBarEnabled = false
             };
             backgroundFL.AddChidren(floorLayout);
@@ -97,16 +97,16 @@
                 if (floorCount > 5)
                 {
                     bg.UnSelectedImagePath = $"Floor/SelectFloor_{directStr}_5.png";
-                    bg.Height = Application.GetMinRealAverage(150*6+23);
-                    backgroundFL.Height = Application.GetMinRealAverage(150 * 6);
-                    floorLayout.Height = Application.GetMinRealAverage(150 * 5);
+                    bg.Height = this.GetPictrueRealSize(150*6+23);
+                    backgroundFL.Height = this.GetPictrueRealSize(150 * 6);
+                    floorLayout.Height = this.GetPictrueRealSize(150 * 5);
                 }
                 else
                 {
                     bg.UnSelectedImagePath = $"Floor/SelectFloor_{directStr}_{floorCount}.png";
-                    bg.Height = Application.GetMinRealAverage(150 * (floorCount + 1)+23);
-                    backgroundFL.Height = Application.GetMinRealAverage(150 * (floorCount + 1));
-                    floorLayout.Height = Application.GetMinRealAverage(150 * floorCount);
+                    bg.Height = this.GetPictrueRealSize(150 * (floorCount + 1)+23);
+                    backgroundFL.Height = this.GetPictrueRealSize(150 * (floorCount + 1));
+                    floorLayout.Height = this.GetPictrueRealSize(150 * floorCount);
                 }
 
                 foreach (var floor in Config.Instance.Home.FloorDics)
@@ -123,8 +123,8 @@
         private void AddFloor(VerticalScrolViewLayout verticalScrolView, KeyValuePair<string, string> floor,bool isLast=false)
         {
             var frow = new Device.CommonForm.LeftIconButtonRow(449, 150);
-            frow.Width = Application.GetMinRealAverage(449);
-            frow.Height = Application.GetMinRealAverage(150);
+            frow.Width = this.GetPictrueRealSize(449);
+            frow.Height = this.GetPictrueRealSize(150);
             frow.Tag = floor.Key;
             frow.Init("Floor/Floor.png", "Floor/FloorSelected.png", floor.Value);
             verticalScrolView.AddChidren(frow);
diff --git a/ZigbeeApp/Shared/Phone/Category/SelectHouseForm.cs b/ZigbeeApp/Shared/Phone/Category/SelectHouseForm.cs
index 2c9bbd6..1383415 100755
--- a/ZigbeeApp/Shared/Phone/Category/SelectHouseForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/SelectHouseForm.cs
@@ -4,7 +4,7 @@
 
 namespace Shared.Phone.Category
 {
-    public class SelectHouseForm : FrameLayout
+    public class SelectHouseForm : UserCenter.FrameLayoutBase
     {
         public Action<string> HouseAction;
 
@@ -33,8 +33,8 @@
             {
                 X = Application.GetRealWidth(35),
                 Y = Application.GetRealHeight(256),
-                Width = Application.GetMinRealAverage(449),
-                Height = Application.GetMinRealAverage(773),
+                Width = this.GetPictrueRealSize(449),
+                Height = this.GetPictrueRealSize(773),
                 UnSelectedImagePath = "Floor/SelectFloor_Left_4.png"
             };
             dialog.AddChidren(bg);
@@ -43,16 +43,16 @@
             {
                 X = Application.GetRealWidth(35),
                 Y = Application.GetRealHeight(256+23),
-                Width = Application.GetMinRealAverage(449),
-                Height = Application.GetMinRealAverage(773 - 23)
+                Width = this.GetPictrueRealSize(449),
+                Height = this.GetPictrueRealSize(773 - 23)
             };
             dialog.AddChidren(changeHomeFL);
 
             var changeHomeBtn = new Button()
             {
                 X = Application.GetRealWidth(80),
-                Width = Application.GetMinRealAverage(350),
-                Height = Application.GetMinRealAverage(150),
+                Width = this.GetPictrueRealSize(350),
+                Height = this.GetPictrueRealSize(150),
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                 TextID = R.MyInternationalizationString.ChangeHome,
                 TextAlignment = TextAlignment.CenterLeft,
@@ -64,8 +64,8 @@
             var scrolView = new VerticalScrolViewLayout()
             {
                 Y = changeHomeBtn.Bottom,
-                Width = Application.GetMinRealAverage(449),
-                Height = Application.GetMinRealAverage(600),
+                Width = this.GetPictrueRealSize(449),
+                Height = this.GetPictrueRealSize(600),
                 VerticalScrollBarEnabled = false
             };
             changeHomeFL.AddChidren(scrolView);
@@ -76,16 +76,16 @@
                 if (houseCount > 5)
                 {
                     bg.UnSelectedImagePath = $"Floor/SelectFloor_Left_5.png";
-                    bg.Height = Application.GetMinRealAverage(150 * 6 + 23);
-                    changeHomeFL.Height = Application.GetMinRealAverage(150 * 6);
-                    scrolView.Height = Application.GetMinRealAverage(150 * 5);
+                    bg.Height = this.GetPictrueRealSize(150 * 6 + 23);
+                    changeHomeFL.Height = this.GetPictrueRealSize(150 * 6);
+                    scrolView.Height = this.GetPictrueRealSize(150 * 5);
                 }
                 else
                 {
                     bg.UnSelectedImagePath = $"Floor/SelectFloor_Left_{houseCount}.png";
-                    bg.Height = Application.GetMinRealAverage(150 * (houseCount + 1) + 23);
-                    changeHomeFL.Height = Application.GetMinRealAverage(150 * (houseCount + 1));
-                    scrolView.Height = Application.GetMinRealAverage(150 * houseCount);
+                    bg.Height = this.GetPictrueRealSize(150 * (houseCount + 1) + 23);
+                    changeHomeFL.Height = this.GetPictrueRealSize(150 * (houseCount + 1));
+                    scrolView.Height = this.GetPictrueRealSize(150 * houseCount);
                 }
 
                 foreach (var housePath in Config.Instance.HomeFilePathList)
@@ -107,8 +107,8 @@
         private void AddFloor(VerticalScrolViewLayout verticalScrolView, House house)
         {
             var frow = new Device.CommonForm.LeftIconButtonRow(449, 150);
-            frow.Width = Application.GetMinRealAverage(449);
-            frow.Height = Application.GetMinRealAverage(150);
+            frow.Width = this.GetPictrueRealSize(449);
+            frow.Height = this.GetPictrueRealSize(150);
             frow.Tag = house.FileName;
             frow.Init("Item/House.png", "Item/HouseSelected.png", house.Name);
             verticalScrolView.AddChidren(frow);
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceIconSelectedIMGByLocal.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceIconSelectedIMGByLocal.cs
deleted file mode 100755
index b965863..0000000
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceIconSelectedIMGByLocal.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-锘縰sing System;
-using Shared.Common;
-
-namespace Shared.Phone.Device.CommonForm
-{
-    public class DeviceIconSelectedIMGByLocal : FrameLayout
-    {
-        /// <summary>
-        /// bodyFrameLayout
-        /// </summary>
-        private FrameLayout bodyFrameLayout;
-        /// <summary>
-        /// action
-        /// </summary>
-        public Action<string, string> action;
-        /// <summary>
-        /// tempIcon
-        /// </summary>
-        private FunctionIconButton tempIcon;
-
-        /// <summary>
-        /// DeviceIconSelectedIMGByLocal
-        /// </summary>
-        public DeviceIconSelectedIMGByLocal()
-        {
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
-        }
-
-        /// <summary>
-        /// RemoveFromParent
-        /// </summary>
-        public override void RemoveFromParent()
-        {
-            base.RemoveFromParent();
-        }
-
-        /// <summary>
-        /// Show
-        /// </summary>
-        public void Show()
-        {
-            AddTop();
-
-            AddBodyView();
-        }
-
-        #region Add____________________________________
-
-        /// <summary>
-        /// AddTop
-        /// </summary>
-        public void AddTop()
-        {
-            var top = new TopFrameLayout();
-            AddChidren(top);
-            top.InitTopview();
-            top.SetTopTitle(R.MyInternationalizationString.SelectIcon);
-            top.backButton.MouseUpEventHandler += (sender, e) =>
-            {
-                RemoveFromParent();
-            };
-        }
-        /// <summary>
-        /// AddBodyView
-        /// </summary>
-        public void AddBodyView()
-        {
-            bodyFrameLayout = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(184),
-                Height = Application.GetRealHeight(1737),
-                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
-            };
-            AddChidren(bodyFrameLayout);
-
-            //FunctionIconButton
-            var scrollView = new VerticalScrolViewLayout()
-            {
-                Height = Application.GetRealHeight(1450),
-                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
-            };
-            bodyFrameLayout.AddChidren(scrollView);
-
-            int k = 1;
-            tempIcon = new FunctionIconButton();
-            for (int j = 0; j < 5; j++)
-            {
-                var itemView = new FrameLayout()
-                {
-                    Height = Application.GetRealHeight(207 + CommonPage.XLeft)
-                };
-                scrollView.AddChidren(itemView);
-                for (int i = 0; i < 4; i++)
-                {
-                    var icon = new FunctionIconButton(58 + i * (207 + 46), 58);
-                    icon.Init($"FunctionIcon/{k}Icon.png", $"FunctionIcon/{k}IconSelected.png");
-                    itemView.AddChidren(icon);
-                    k++;
-
-                    EventHandler<MouseEventArgs> selectIcon = (sender, e) =>
-                    {
-                        ((sender as Button).Parent as FunctionIconButton).IsSelected = true;
-                        tempIcon.IsSelected = false;
-                        tempIcon = (sender as Button).Parent as FunctionIconButton;
-                    };
-                    icon.ImageBG.MouseUpEventHandler += selectIcon;
-                    icon.ImageBtn.MouseUpEventHandler += selectIcon;
-                }
-            }
-
-            var btnConfirm = new UserCenter.BottomClickButton();
-            btnConfirm.TextID = R.MyInternationalizationString.Save;
-            bodyFrameLayout.AddChidren(btnConfirm);
-            btnConfirm.ButtonClickEvent += (sender, e) =>
-            {
-                if (tempIcon.ImageBtn != null)
-                {
-                    action(tempIcon.ImageBtn.UnSelectedImagePath, tempIcon.ImageBtn.SelectedImagePath);
-                }
-                RemoveFromParent();
-            };
-        }
-
-        #endregion
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs
deleted file mode 100755
index 397eb92..0000000
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs
+++ /dev/null
@@ -1,166 +0,0 @@
-锘縰sing System;
-using Shared.Common;
-namespace Shared.Phone.Device.CommonForm
-{
-    public class DeviceInfoRow : FrameLayout
-    {
-        /// <summary>
-        /// TipBtn
-        /// </summary>
-        public Button TipBtn;
-        /// <summary>
-        /// NameText
-        /// </summary>
-        public Button NameText;
-        /// <summary>
-        /// NextBtn
-        /// </summary>
-        public Button NextBtn;
-        /// <summary>
-        /// ClickBtn
-        /// </summary>
-        public Button ClickBtn;
-        /// <summary>
-        /// line
-        /// </summary>
-        private Button line;
-
-        /// <summary>
-        /// DeviceInfoEditRow
-        /// </summary>
-        public DeviceInfoRow(int y)
-        {
-            X = Application.GetRealWidth(0);
-            Y = Application.GetRealHeight(y);
-            Width = Application.GetRealWidth(1080);
-            Height = Application.GetRealHeight(127);
-        }
-
-        /// <summary>
-        /// Init
-        /// </summary>
-        public void Init()
-        {
-            TipBtn = new Button
-            {
-                X = Application.GetRealWidth(CommonFormResouce.X_Left),
-                Width = Application.GetRealWidth(223),
-                Height = Application.GetRealHeight(80),
-                Gravity = Gravity.CenterVertical,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize=CommonFormResouce.TextSize
-            };
-            AddChidren(TipBtn);
-
-            NameText = new Button
-            {
-                X = Application.GetRealWidth(300),
-                Width = Application.GetRealWidth(650),
-                Height = Application.GetRealHeight(80),
-                Gravity = Gravity.CenterVertical,
-                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = CommonFormResouce.TextSize
-            };
-            AddChidren(NameText);
-
-            NextBtn = new Button
-            {
-                X = Application.GetRealWidth(910),
-                Width = Application.GetMinRealAverage(100),
-                Height = Application.GetMinRealAverage(100),
-                Gravity = Gravity.CenterVertical,
-                SelectedImagePath= "Item/NextSelected.png",
-                UnSelectedImagePath= "Item/Next.png"
-            };
-            AddChidren(NextBtn);
-
-            line = new Button()
-            {
-                X = Application.GetRealWidth(CommonFormResouce.X_Left),
-                Y = Height - 1,
-                Width = Application.GetRealWidth(965),
-                Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2,
-            };
-            AddChidren(line);
-
-            ClickBtn = new Button();
-            AddChidren(ClickBtn);
-        }
-
-        /// <summary>
-        /// SetTitle
-        /// </summary>
-        /// <param name="title"></param>
-        public void SetTitle(string title)
-        {
-            NameText.Text = title;
-        }
-
-        /// <summary>
-        /// SetTitle
-        /// </summary>
-        /// <param name="title"></param>
-        public void SetTitle(int title)
-        {
-            SetTitle(Language.StringByID(title));
-        }
-
-        /// <summary>
-        /// SetTitleColor
-        /// </summary>
-        /// <param name="color"></param>
-        public void SetTitleColor(uint color)
-        {
-            NameText.TextColor = color;
-        }
-
-
-        /// <summary>
-        /// SetName
-        /// </summary>
-        /// <param name="title"></param>
-        public void SetTipTitle(string title)
-        {
-            TipBtn.Text = title;
-        }
-
-        /// <summary>
-        /// SetTipTitle
-        /// </summary>
-        /// <param name="title"></param>
-        public void SetTipTitle(int title)
-        {
-            SetTipTitle(Language.StringByID(title));
-        }
-
-        /// <summary>
-        /// HideLine
-        /// </summary>
-        /// <param name="hiden"></param>
-        public void HideLine(bool hiden)
-        {
-            line.Visible = !hiden;
-        }
-
-        /// <summary>
-        /// HideNext
-        /// </summary>
-        /// <param name="hiden"></param>
-        public void HideNext(bool hiden)
-        {
-            NextBtn.Visible = !hiden;
-        }
-
-        /// <summary>
-        /// CanClick
-        /// </summary>
-        /// <param name="canClick"></param>
-        public void CanClick(bool canClick)
-        {
-            ClickBtn.Enable = canClick;
-        }
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionIconButton.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionIconButton.cs
deleted file mode 100755
index ac6d475..0000000
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionIconButton.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-锘縰sing System;
-using Shared.Common;
-
-namespace Shared.Phone.Device.CommonForm
-{
-    public class FunctionIconButton : FrameLayout
-    {
-
-        /// <summary>
-        /// Image
-        /// </summary>
-        public Button ImageBtn;
-        /// <summary>
-        /// ImageBG
-        /// </summary>
-        public Button ImageBG;
-        /// <summary>
-        /// v_Selected
-        /// </summary>
-        private bool v_Selected;
-        /// <summary>
-        /// IsSelected
-        /// </summary>
-        public bool IsSelected
-        {
-            set
-            {
-                try
-                {
-                    v_Selected = value;
-                    SetStatu(v_Selected);
-                }
-                catch { };
-            }
-            get
-            {
-                return v_Selected;
-            }
-        }
-
-        /// <summary>
-        /// FunctionIconButton
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        public FunctionIconButton(int x = 0, int y = 0)
-        {
-            X = Application.GetRealWidth(x);
-            Y = Application.GetRealHeight(y);
-            Width = Application.GetRealWidth(207);
-            Height = Application.GetRealHeight(207);
-        }
-
-        /// <summary>
-        /// Init
-        /// </summary>
-        /// <param name="imagePath"></param>
-        /// <param name="selectedImagePath"></param>
-        public void Init(string imagePath, string selectedImagePath)
-        {
-            ImageBG = new Button()
-            {
-                Width = Application.GetRealWidth(207),
-                Height = Application.GetRealWidth(207),
-                Gravity = Gravity.Center,
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                SelectedBackgroundColor = ZigbeeColor.Current.GXCSelectedBackgroundColor,
-                Radius = (uint)Application.GetRealWidth(207 / 2)
-            };
-            AddChidren(ImageBG);
-
-            ImageBtn = new Button()
-            {
-                Width = Application.GetMinRealAverage(114),
-                Height = Application.GetMinRealAverage(114),
-                Gravity = Gravity.Center,
-                UnSelectedImagePath = imagePath,
-                SelectedImagePath = selectedImagePath,
-            };
-            AddChidren(ImageBtn);
-        }
-
-        /// <summary>
-        /// SetStatu
-        /// </summary>
-        /// <param name="statu"></param>
-        public void SetStatu(bool statu)
-        {
-            ImageBG.IsSelected = ImageBtn.IsSelected = statu;
-        }
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs
index ac65aa1..44418be 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs
@@ -2,7 +2,7 @@
 using Shared.Common;
 namespace Shared.Phone.Device.CommonForm
 {
-    public class LeftIconButtonRow:FrameLayout
+    public class LeftIconButtonRow: UserCenter.FrameLayoutBase
     {
         #region 鈼� 鍙橀噺__________________________
         /// <summary>
@@ -70,8 +70,8 @@
             IconButton = new Button()
             {
                 X = Application.GetRealWidth(80),
-                Height = Application.GetMinRealAverage(80),
-                Width = Application.GetMinRealAverage(80),
+                Height = this.GetPictrueRealSize(80),
+                Width = this.GetPictrueRealSize(80),
                 UnSelectedImagePath = iconPath,
                 SelectedImagePath = iconSelectedPath,
                 Gravity = Gravity.CenterVertical,
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs
index 0c3df7d..9a5f16c 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs
@@ -5,7 +5,7 @@
 
 namespace Shared.Phone.Device.CommonForm
 {
-    public class RoomView : FrameLayout
+    public class RoomView : FrameLayoutBase
     {
         /// <summary>
         /// Room
@@ -21,12 +21,12 @@
         Button temperatureText;
 
         Button humidityText;
-        /// <summary>
-        /// 娓╁害璁惧
+        /// <summary>
+        /// 娓╁害璁惧
         /// </summary>
         private CommonDevice temperDevice = null;
-        /// <summary>
-        /// 婀垮害璁惧
+        /// <summary>
+        /// 婀垮害璁惧
         /// </summary>
         private CommonDevice humidDevice = null;
 
@@ -121,8 +121,8 @@
             var temperatureIcon = new Button
             {
                 X = Application.GetRealWidth(12),
-                Width = Application.GetMinRealAverage(58),
-                Height = Application.GetMinRealAverage(58),
+                Width = this.GetPictrueRealSize(58),
+                Height = this.GetPictrueRealSize(58),
                 Gravity = Gravity.CenterVertical,
                 UnSelectedImagePath = "Room/Temperature.png"
             };
@@ -137,8 +137,8 @@
                 TextAlignment = TextAlignment.CenterLeft
             };
             if (LocalDevice.Current.GetDevice(room.TemperatrueDevice) != null)
-            {
-                //杩欎釜璁惧瑕佸瓨鍦ㄦ湰鍦版墠琛�
+            {
+                //杩欎釜璁惧瑕佸瓨鍦ㄦ湰鍦版墠琛�
                 temperatureText.Text = room.Temperatrue == 0 ? "0.0鈩�" : room.Temperatrue.ToString() + "鈩�";
             }
             roomTemperatureBackground.AddChidren(temperatureText);
@@ -147,8 +147,8 @@
             var humidityIcon = new Button
             {
                 X = temperatureText.Right,
-                Width = Application.GetMinRealAverage(58),
-                Height = Application.GetMinRealAverage(58),
+                Width = this.GetPictrueRealSize(58),
+                Height = this.GetPictrueRealSize(58),
                 Gravity = Gravity.CenterVertical,
                 UnSelectedImagePath = "Room/Humidity.png"
             };
@@ -163,8 +163,8 @@
                 TextAlignment = TextAlignment.CenterLeft
             };
             if (LocalDevice.Current.GetDevice(room.HumidityDevice) != null)
-            {
-                //杩欎釜璁惧瑕佸瓨鍦ㄦ湰鍦版墠琛�
+            {
+                //杩欎釜璁惧瑕佸瓨鍦ㄦ湰鍦版墠琛�
                 humidityText.Text = room.Humidity == 0 ? "0.0%" : room.Humidity.ToString() + "%";
             }
             roomTemperatureBackground.AddChidren(humidityText);
@@ -172,7 +172,7 @@
             roomTemperatureBackground.Width = (humidityText.Width + temperatureText.Width + Application.GetRealWidth(150)) > Application.GetRealWidth(600) ? Application.GetRealWidth(600) : (humidityText.Width + temperatureText.Width + Application.GetRealWidth(150));
 
             if (string.IsNullOrEmpty(room.TemperatrueDevice) == false)
-            {
+            {
                 //鍙戦�佽幏鍙栨俯搴︾殑鍛戒护
                 var dev = Common.LocalDevice.Current.GetDevice(room.TemperatrueDevice);
                 HdlDeviceAttributeLogic.Current.SendTemperatureStatuComand(dev);
@@ -180,7 +180,7 @@
 
             if (string.IsNullOrEmpty(room.HumidityDevice) == false)
             {
-                var dev = Common.LocalDevice.Current.GetDevice(room.HumidityDevice);
+                var dev = Common.LocalDevice.Current.GetDevice(room.HumidityDevice);
                 HdlDeviceAttributeLogic.Current.SendHumidityStatuComand(dev);
             }
 
@@ -188,8 +188,8 @@
             {
                 X = roomBackView.Width - Application.GetRealWidth(100 + 20),
                 Y = Application.GetRealHeight(20),
-                Width = Application.GetMinRealAverage(100),
-                Height = Application.GetMinRealAverage(100),
+                Width = this.GetPictrueRealSize(100),
+                Height = this.GetPictrueRealSize(100),
                 UnSelectedImagePath = "Room/List.png",
             };
             roomBackView.AddChidren(roomListBtn);
@@ -200,50 +200,50 @@
 
                 var form = new UserCenter.Residence.EditorRoomInforForm();
                 form.AddForm(room);
-                form.FinishEditorEvent += (roomName2) =>
-                {
-                    //閲嶆柊鍒锋柊鎺т欢
-                    this.Init(this.room);
+                form.FinishEditorEvent += (roomName2) =>
+                {
+                    //閲嶆柊鍒锋柊鎺т欢
+                    this.Init(this.room);
                 };
             };
             //璁惧灞炴�т笂鎶�
-            HdlGatewayReceiveLogic.Current.AddAttributeEvent("RoomView" + this.room.Id, ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (report) =>
+            HdlGatewayReceiveLogic.Current.AddAttributeEvent("RoomView" + this.room.Id, ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (report) =>
             {
-                if (this.temperDevice != null)
-                {
-                    //娓╁害璁惧
-                    if (report.DeviceAddr == temperDevice.DeviceAddr && report.DeviceEpoint == temperDevice.DeviceEpoint)
-                    {
-                        HdlThreadLogic.Current.RunMain(() =>
-                        {
-                            if (((TemperatureSensor)temperDevice).Temperatrue == 0)
-                            {
-                                temperatureText.Text = "0.0鈩�";
-                            }
-                            else
-                            {
-                                temperatureText.Text = ((TemperatureSensor)temperDevice).Temperatrue + "鈩�";
-                            }
-                        }, ShowErrorMode.NO);
-                    }
+                if (this.temperDevice != null)
+                {
+                    //娓╁害璁惧
+                    if (report.DeviceAddr == temperDevice.DeviceAddr && report.DeviceEpoint == temperDevice.DeviceEpoint)
+                    {
+                        HdlThreadLogic.Current.RunMain(() =>
+                        {
+                            if (((TemperatureSensor)temperDevice).Temperatrue == 0)
+                            {
+                                temperatureText.Text = "0.0鈩�";
+                            }
+                            else
+                            {
+                                temperatureText.Text = ((TemperatureSensor)temperDevice).Temperatrue + "鈩�";
+                            }
+                        }, ShowErrorMode.NO);
+                    }
                 }
-                if (this.humidDevice != null)
-                {
-                    //婀垮害璁惧
-                    if (report.DeviceAddr == humidDevice.DeviceAddr && report.DeviceEpoint == humidDevice.DeviceEpoint)
-                    {
-                        HdlThreadLogic.Current.RunMain(() =>
-                        {
-                            if (((TemperatureSensor)temperDevice).Humidity == 0)
-                            {
-                                humidityText.Text = "--%";
-                            }
-                            else
-                            {
-                                humidityText.Text = ((TemperatureSensor)temperDevice).Humidity + "%";
-                            }
-                        }, ShowErrorMode.NO);
-                    }
+                if (this.humidDevice != null)
+                {
+                    //婀垮害璁惧
+                    if (report.DeviceAddr == humidDevice.DeviceAddr && report.DeviceEpoint == humidDevice.DeviceEpoint)
+                    {
+                        HdlThreadLogic.Current.RunMain(() =>
+                        {
+                            if (((TemperatureSensor)temperDevice).Humidity == 0)
+                            {
+                                humidityText.Text = "--%";
+                            }
+                            else
+                            {
+                                humidityText.Text = ((TemperatureSensor)temperDevice).Humidity + "%";
+                            }
+                        }, ShowErrorMode.NO);
+                    }
                 }
             });
         }
@@ -254,15 +254,15 @@
         public void HideName(bool statu)
         {
             roomNameBackground.Visible = roomTemperatureBackground.Visible = roomListBtn.Visible = !statu;
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public override void RemoveFromParent()
-        {
-            HdlGatewayReceiveLogic.Current.RemoveEvent("RoomView" + this.room.Id);
-            base.RemoveFromParent();
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public override void RemoveFromParent()
+        {
+            HdlGatewayReceiveLogic.Current.RemoveEvent("RoomView" + this.room.Id);
+            base.RemoveFromParent();
         }
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs
index 77d8211..045ed5d 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs
@@ -1,29 +1,29 @@
-锘縰sing System;
-using System.Collections.Generic;
-using Shared.Common;
-using Shared.Phone.UserCenter;
-
-namespace Shared.Phone.Device.CommonForm
-{
-    public class SceneCategoryView : RowLayout
+锘縰sing System;
+using System.Collections.Generic;
+using Shared.Common;
+using Shared.Phone.UserCenter;
+
+namespace Shared.Phone.Device.CommonForm
+{
+    public class SceneCategoryView : RowLayoutBase
     {
-        #region 鈻� 鍙橀噺澹版槑___________________________
-
-        /// <summary>
-        /// scene
-        /// </summary>
-        public SceneUI scene;
-        /// <summary>
-        /// room
-        /// </summary>
-        private Common.Room room;
-        /// <summary>
-        /// 寤舵椂鏃堕棿
-        /// </summary>
-        private NormalViewControl btnDelayTime;
-        /// <summary>
-        /// 寤舵椂鍥炬爣
-        /// </summary>
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// scene
+        /// </summary>
+        public SceneUI scene;
+        /// <summary>
+        /// room
+        /// </summary>
+        private Common.Room room;
+        /// <summary>
+        /// 寤舵椂鏃堕棿
+        /// </summary>
+        private NormalViewControl btnDelayTime;
+        /// <summary>
+        /// 寤舵椂鍥炬爣
+        /// </summary>
         private IconViewControl btnDelayIcon;
         /// <summary>
         /// 鍦烘櫙鍥剧墖鎺т欢
@@ -34,19 +34,19 @@
         /// </summary>
         private bool isInitControlFinish = false;
 
-        #endregion
+        #endregion
 
         #region 鈻� 鍒濆鍖朹____________________________
 
-        /// <summary>
-        /// SceneCategoryView
-        /// </summary>
-        public SceneCategoryView()
-        {
-            this.Width = Application.GetRealWidth(1080);
-            this.Height = Application.GetRealHeight(397 + 46);
-            this.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
-            this.IsUseSameSubViewWidth = false;
+        /// <summary>
+        /// SceneCategoryView
+        /// </summary>
+        public SceneCategoryView()
+        {
+            this.Width = Application.GetRealWidth(1080);
+            this.Height = Application.GetRealHeight(397 + 46);
+            this.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
+            this.IsUseSameSubViewWidth = false;
         }
 
         /// <summary>
@@ -59,47 +59,47 @@
 
             this.LineColor = UserCenterColor.Current.Transparent;
 
-            this.scene = i_scene;
+            this.scene = i_scene;
             this.room = i_room;
 
-            //鑷畾涔夌殑鍦烘櫙鍥剧墖鎺т欢
+            //鑷畾涔夌殑鍦烘櫙鍥剧墖鎺т欢
             this.sceneContr = new ScenePictrueControl();
-            this.AddChidren(sceneContr);
-            sceneContr.InitControl(this.scene);
+            this.AddChidren(sceneContr);
+            sceneContr.InitControl(this.scene);
 
             //鍦烘櫙鐐瑰嚮
             sceneContr.ButtonClickEvent += (sender, e) =>
             {
                 this.SceneUpHandler();
-            };
-
-            //鏀惰棌
-            sceneContr.AddCollectionControl();
+            };
+
+            //鏀惰棌
+            sceneContr.AddCollectionControl();
             sceneContr.CollectEvent += (collect) =>
             {
-                if (room.IsLove)
-                {
-                    this.RemoveFromParent();
+                if (room.IsLove)
+                {
+                    this.RemoveFromParent();
                 }
-            };
-            
-            //寤舵椂鏃堕棿
-            this.btnDelayTime = new NormalViewControl(200, 58, true);
-            btnDelayTime.X = Application.GetRealWidth(780);
-            btnDelayTime.Y = Application.GetRealHeight(317);
-            btnDelayTime.Text = CommonFormResouce.GetTimeString(scene.SceneDelayTime);
+            };
+            
+            //寤舵椂鏃堕棿
+            this.btnDelayTime = new NormalViewControl(400, 58, true);
+            btnDelayTime.X = Application.GetRealWidth(580);
+            btnDelayTime.Y = Application.GetRealHeight(317);
+            btnDelayTime.Text = CommonFormResouce.GetTimeString(scene.SceneDelayTime);
             btnDelayTime.TextAlignment = TextAlignment.CenterRight;
-            btnDelayTime.TextColor = ZigbeeColor.Current.GXCTextSelectedColor3;
-            btnDelayTime.IsBold = true;
-            this.AddChidren(btnDelayTime);
-
-            //寤舵椂鍥炬爣
+            btnDelayTime.TextColor = ZigbeeColor.Current.GXCTextSelectedColor3;
+            btnDelayTime.IsBold = true;
+            this.AddChidren(btnDelayTime);
+
+            //寤舵椂鍥炬爣
             this.btnDelayIcon = new IconViewControl(52);
             btnDelayIcon.X = Application.GetRealWidth(900);
-            btnDelayIcon.Y = Application.GetRealHeight(30);
-            btnDelayIcon.Width = Application.GetMinRealAverage(52);
-            btnDelayIcon.Height = Application.GetMinRealAverage(52);
-            btnDelayIcon.UnSelectedImagePath = "Scene/Delaying.png";
+            btnDelayIcon.Y = Application.GetRealHeight(30);
+            btnDelayIcon.Width = this.GetPictrueRealSize(52);
+            btnDelayIcon.Height = this.GetPictrueRealSize(52);
+            btnDelayIcon.UnSelectedImagePath = "Scene/Delaying.png";
             this.AddChidren(btnDelayIcon);
             btnDelayIcon.Visible = false;
 
@@ -116,14 +116,14 @@
             this.AddLeftView(btnTemp1);
             //瀹氭椂
             var btnDelay = new NormalViewControl(Application.GetRealWidth(199), sceneContr.btnScenePic.Height, false);
-            btnDelay.BackgroundColor = ZigbeeColor.Current.GXCTextSelectedColor;
-            btnDelay.TextID = R.MyInternationalizationString.Delay;
-            btnDelay.TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
-            btnDelay.TextAlignment = TextAlignment.Center;
-            btnDelay.Tag = scene.SceneDelayTime;
-            btnDelay.Radius = (uint)Application.GetRealHeight(17);
-            btnDelay.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight |
-                HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
+            btnDelay.BackgroundColor = ZigbeeColor.Current.GXCTextSelectedColor;
+            btnDelay.TextID = R.MyInternationalizationString.Delay;
+            btnDelay.TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
+            btnDelay.TextAlignment = TextAlignment.Center;
+            btnDelay.Tag = scene.SceneDelayTime;
+            btnDelay.Radius = (uint)Application.GetRealHeight(17);
+            btnDelay.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight |
+                HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
             this.AddLeftView(btnDelay);
             //鍙樻洿鎸夐挳鐨勯珮搴�
             btnDelay.Height = sceneContr.btnScenePic.Height;
@@ -131,23 +131,23 @@
 
             //缂栬緫
             var btnEditor = new NormalViewControl(Application.GetRealWidth(199), sceneContr.btnScenePic.Height, false);
-            btnEditor.BackgroundColor = ZigbeeColor.Current.GXCEditBackGroundColor;
-            btnEditor.TextID = R.MyInternationalizationString.Edit;
-            btnEditor.TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
-            btnEditor.TextAlignment = TextAlignment.Center;
+            btnEditor.BackgroundColor = ZigbeeColor.Current.GXCEditBackGroundColor;
+            btnEditor.TextID = R.MyInternationalizationString.Edit;
+            btnEditor.TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
+            btnEditor.TextAlignment = TextAlignment.Center;
             btnEditor.Tag = scene.SceneDelayTime;
             btnEditor.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerTopLeft);
 
             //鍒犻櫎
-            var btnDelete = new NormalViewControl(Application.GetRealWidth(199), sceneContr.btnScenePic.Height, false);
-            btnDelete.Tag = scene;
-            btnDelete.BackgroundColor = ZigbeeColor.Current.GXCRedColor;
-            btnDelete.TextID = R.MyInternationalizationString.Delete;
-            btnDelete.TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
-            btnDelete.TextAlignment = TextAlignment.Center;
+            var btnDelete = new NormalViewControl(Application.GetRealWidth(199), sceneContr.btnScenePic.Height, false);
+            btnDelete.Tag = scene;
+            btnDelete.BackgroundColor = ZigbeeColor.Current.GXCRedColor;
+            btnDelete.TextID = R.MyInternationalizationString.Delete;
+            btnDelete.TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
+            btnDelete.TextAlignment = TextAlignment.Center;
             btnDelete.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomRight);
 
-            if (room.IsSharedRoom == false && room.IsLove == false)
+            if (room.IsSharedRoom == false && room.IsLove == false)
             {
                 //涓嶆槸鍒嗕韩,骞朵笖涓嶆槸鏀惰棌
                 this.AddRightView(btnEditor);
@@ -155,20 +155,28 @@
                 //鍙樻洿鎸夐挳鐨勯珮搴�
                 btnEditor.Height = sceneContr.btnScenePic.Height;
                 btnEditor.Y = 0;
-                btnDelete.Height = sceneContr.btnScenePic.Height;
-                btnDelete.Y = 0;
-                //娣诲姞鍙宠竟绌虹櫧鍖哄煙
+                btnDelete.Height = sceneContr.btnScenePic.Height;
+                btnDelete.Y = 0;
+                //娣诲姞鍙宠竟绌虹櫧鍖哄煙
                 var btnTemp2 = new NormalViewControl(Application.GetRealWidth(58), sceneContr.btnScenePic.Height, false);
-                this.AddRightView(btnTemp2);
-            }
-
-            //鍒犻櫎鍦烘櫙
+                this.AddRightView(btnTemp2);
+            }
+
+            //鍒犻櫎鍦烘櫙
             btnDelete.ButtonClickEvent += (sender, e) =>
             {
                 var alert = new ShowMsgControl(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.ConfirmDelete));
                 alert.Show();
                 alert.ConfirmClickEvent += async () =>
                 {
+                    //濡傛灉褰撳墠浣忓畢鏄櫄鎷熶綇瀹�
+                    if (Common.Config.Instance.Home.IsVirtually == true)
+                    {
+                        //绉婚櫎缂撳瓨
+                        HdlSceneLogic.Current.DeleteLocalScene(scene);
+                        RemoveFromParent();
+                        return;
+                    }
                     //0 绉婚櫎澶辫触 1 绉婚櫎鎴愬姛 2 娌℃湁璇ュ満鏅�
                     var removeSceneAllData = await ZigBee.Device.Scene.DeleteSceneAsync(scene.Id);
                     if (removeSceneAllData == null || removeSceneAllData.removeSceneData == null)
@@ -179,7 +187,7 @@
                     //1鎴愬姛
                     if (removeSceneAllData.removeSceneData.Result == 1)
                     {
-                        HdlSceneLogic.Current.RemoveScene(scene);
+                        HdlSceneLogic.Current.DeleteLocalScene(scene);
                         RemoveFromParent();
                     }
                     //0 绉婚櫎澶辫触
@@ -191,128 +199,128 @@
                     //2 娌℃湁璇ュ満鏅�
                     else if (removeSceneAllData.removeSceneData.Result == 2)
                     {
-                        HdlSceneLogic.Current.RemoveScene(scene);
+                        HdlSceneLogic.Current.DeleteLocalScene(scene);
                         RemoveFromParent();
                         return;
                     }
                 };
-            };
-
-            //缂栬緫鍦烘櫙
-            btnEditor.ButtonClickEvent += (sender, e) =>
-            {
-                //鍏抽棴宸︽粦鑿滃崟
-                this.HideMenu();
-                //缂栬緫鍦烘櫙
-                var form = new Phone.Category.AddOrEditorSceneForm();
-                form.AddForm(i_scene);
-                form.SceneChangedEvent = (myScene, roomId) =>
-                {
-                    if (roomId != room.Id)
-                    {
-                        //瀹冨彉鏇翠簡鎴块棿
-                        this.RemoveFromParent();
-                    }
-                    else
-                    {
-                        this.InitControl(myScene, room);
-                    }
-                };
-            };
-            //缂栬緫寤舵椂
-            btnDelay.ButtonClickEvent += (sender, e) =>
-            {
-                if (scene.RemainTime > 0)
-                {
-                    CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneIsDelaying));
-                    return;
-                }
-                var timeSelect = new SelectTime();
-                CommonPage.Instance.AddChidren(timeSelect);
-                timeSelect.TempTime = scene.SceneDelayTime;
-                timeSelect.Init();
-                timeSelect.TimeAction = (t) =>
-                {
-                    //闅愯棌鍙冲垝鑿滃崟
-                    this.HideMenu();
-                    scene.SceneDelayTime = t;
-                    btnDelayTime.Text = CommonFormResouce.GetTimeString(t);
-                };
+            };
+
+            //缂栬緫鍦烘櫙
+            btnEditor.ButtonClickEvent += (sender, e) =>
+            {
+                //鍏抽棴宸︽粦鑿滃崟
+                this.HideMenu();
+                //缂栬緫鍦烘櫙
+                var form = new Phone.Category.AddOrEditorSceneForm();
+                form.AddForm(i_scene);
+                form.SceneChangedEvent = (myScene, roomId) =>
+                {
+                    if (roomId != room.Id)
+                    {
+                        //瀹冨彉鏇翠簡鎴块棿
+                        this.RemoveFromParent();
+                    }
+                    else
+                    {
+                        this.InitControl(myScene, room);
+                    }
+                };
+            };
+            //缂栬緫寤舵椂
+            btnDelay.ButtonClickEvent += (sender, e) =>
+            {
+                if (scene.RemainTime > 0)
+                {
+                    CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneIsDelaying));
+                    return;
+                }
+                var timeSelect = new SelectTime();
+                CommonPage.Instance.AddChidren(timeSelect);
+                timeSelect.TempTime = scene.SceneDelayTime;
+                timeSelect.Init();
+                timeSelect.TimeAction = (t) =>
+                {
+                    //闅愯棌鍙冲垝鑿滃崟
+                    this.HideMenu();
+                    scene.SceneDelayTime = t;
+                    btnDelayTime.Text = CommonFormResouce.GetTimeString(t);
+                };
             };
         }
 
-        #endregion
-
+        #endregion
+
         /// <summary>
         /// 
         /// </summary>
         /// <param name="btnScenePic"></param>
-        /// <param name="btnSceneName"></param>
-        private async void SceneUpHandler()
-        {
+        /// <param name="btnSceneName"></param>
+        private async void SceneUpHandler()
+        {
             if (scene.SceneDelayTime <= 0 && scene.RemainTime <= 0)
             {
                 //濡傛灉娌℃湁寤惰繜鐨勮瘽,鐩存帴寮�鍚疞oading鐗规晥
                 this.StartLoadingApreal();
-            }
-            //璋冪敤鍦烘櫙
-            var result = await HdlSceneLogic.Current.ControlScene(scene);
-            if (result == false)
-            {
-                return;
-            }
-            
-            scene.RemainTime = scene.SceneDelayTime;
-            scene.SceneDelayTime = 0;
+            }
+            //璋冪敤鍦烘櫙
+            var result = await HdlSceneLogic.Current.ControlScene(scene);
+            if (result == false)
+            {
+                return;
+            }
+            
+            scene.RemainTime = scene.SceneDelayTime;
+            scene.SceneDelayTime = 0;
             if (scene.RemainTime <= 0)
             {
                 return;
-            }
+            }
             int myRemainTime = scene.RemainTime;
             //寮�鍚唴閮ㄥ欢鏃舵椂闂寸嚎绋�(鏃ㄥ湪鍏ㄩ儴鍦版柟鐨勫悓涓�鍦烘櫙鏃堕棿鍚屾)
-            HdlSceneLogic.Current.StartDelayTimeThread(scene);
-
-            new System.Threading.Thread(() =>
-            {
-                while (myRemainTime > 0 && this.Parent != null)
-                {
-                    System.Threading.Thread.Sleep(1000);
-                    Application.RunOnMainThread(() =>
-                    {
-                        SetTimeText(CommonFormResouce.GetTimeString(scene.RemainTime));
-                    });
-                    myRemainTime--;
-                }
-                Application.RunOnMainThread(() =>
-                {
+            HdlSceneLogic.Current.StartDelayTimeThread(scene);
+
+            new System.Threading.Thread(() =>
+            {
+                while (myRemainTime > 0 && this.Parent != null)
+                {
+                    System.Threading.Thread.Sleep(1000);
+                    Application.RunOnMainThread(() =>
+                    {
+                        SetTimeText(CommonFormResouce.GetTimeString(scene.RemainTime));
+                    });
+                    myRemainTime--;
+                }
+                Application.RunOnMainThread(() =>
+                {
                     if (this.Parent != null)
                     {
                         SetTimeImage();
                         //鐩存帴寮�鍚疞oading鐗规晥
                         this.StartLoadingApreal();
-                    }
-                });
-            })
-            { IsBackground = true }.Start();
-        }
-
-        /// <summary>
-        /// SetTimeText
-        /// </summary>
-        /// <param name="name"></param>
-        public void SetTimeText(string name)
-        {
-            btnDelayIcon.Visible = true;
-            btnDelayTime.Text = name;
-        }
-
-        /// <summary>
-        /// SetTimeImage
-        /// </summary>
-        public void SetTimeImage()
-        {
-            btnDelayIcon.Visible = false;
-            btnDelayTime.Text = string.Empty;
+                    }
+                });
+            })
+            { IsBackground = true }.Start();
+        }
+
+        /// <summary>
+        /// SetTimeText
+        /// </summary>
+        /// <param name="name"></param>
+        public void SetTimeText(string name)
+        {
+            btnDelayIcon.Visible = true;
+            btnDelayTime.Text = name;
+        }
+
+        /// <summary>
+        /// SetTimeImage
+        /// </summary>
+        public void SetTimeImage()
+        {
+            btnDelayIcon.Visible = false;
+            btnDelayTime.Text = string.Empty;
         }
 
         /// <summary>
@@ -349,8 +357,8 @@
                 frameBack1.RemoveFromParent();
                 frameBack2.RemoveFromParent();
             };
-        }
-
+        }
+
         /// <summary>
         /// 鑷畾涔夋帶浠�(闇�瑕佺殑瀹冪Щ闄や簨浠�)
         /// </summary>
@@ -370,6 +378,6 @@
                 this.DisponeEvent?.Invoke();
                 this.DisponeEvent = null;
             }
-        }
-    }
-}
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectTime.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectTime.cs
index e9fe90d..5530536 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectTime.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectTime.cs
@@ -4,7 +4,7 @@
 
 namespace Shared.Phone.Device.CommonForm
 {
-    public class SelectTime:FrameLayout
+    public class SelectTime: UserCenter.FrameLayoutBase
     {
         public Action<int> TimeAction;
 
@@ -166,8 +166,8 @@
             var selectBtn = new Button
             {
                 X = Application.GetRealWidth(942),
-                Width = Application.GetMinRealAverage(60),
-                Height=Application.GetMinRealAverage(60),
+                Width = this.GetPictrueRealSize(60),
+                Height=this.GetPictrueRealSize(60),
                 Gravity=Gravity.CenterVertical,
                 UnSelectedImagePath="Item/ItemSelected.png",
                 Visible=false
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
index 27e8df6..3b5ffb5 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
@@ -303,9 +303,9 @@
             foreach (var sceneId in scenelist)
             {
                 var scene = UserCenter.HdlSceneLogic.Current.GetSceneUIBySceneId(sceneId);
-                if (scene == null)
-                {
-                    continue;
+                if (scene == null)
+                {
+                    continue;
                 }
                 var sceneFramelayout = new FrameLayout
                 {
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs
index 1c697dd..c593a35 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs
@@ -85,13 +85,13 @@
                         }
                         bool yes = false;
                         for (int a = 0; a < logic.Accounts.Count; a++)
-                        {
-                            if (logic.Accounts[a]["MacAddr"].ToString() != Send.CurrentDoorLock.DeviceAddr && logic.Accounts[a]["Epoint"].ToString() != Send.CurrentDoorLock.DeviceEpoint.ToString())
-                            {
-                                //鏌ユ壘鏄惁鏄偅涓棬閿侊紱
-                                //濡傛灉涓嶆槸璇ラ棬閿佽仈鍔ㄤ簨浠朵笉鏄剧ず鍑烘潵;
-                                yes = false;
-                                break;
+                        {
+                            if (logic.Accounts[a]["MacAddr"].ToString() != Send.CurrentDoorLock.DeviceAddr && logic.Accounts[a]["Epoint"].ToString() != Send.CurrentDoorLock.DeviceEpoint.ToString())
+                            {
+                                //鏌ユ壘鏄惁鏄偅涓棬閿侊紱
+                                //濡傛灉涓嶆槸璇ラ棬閿佽仈鍔ㄤ簨浠朵笉鏄剧ず鍑烘潵;
+                                yes = false;
+                                break;
                             }
                             if (logic.Accounts[a]["Account"].ToString() == Config.Instance.Guid)
                             {
@@ -246,13 +246,13 @@
                 {
                     var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm,
                     Language.StringByID(MyInternationalizationString.doyouwanttodelete),
-                    Language.StringByID(MyInternationalizationString.confrim));
-                    alert.Show();
-                    alert.ConfirmClickEvent += () =>
+                    Language.StringByID(MyInternationalizationString.confrim));
+                    alert.Show();
+                    alert.ConfirmClickEvent += () =>
                     {
                         Common.Logic.LockLogicList.Remove(logic);
                         Automationview();
-                        Send.DelLogic(logic.LogicId);
+                        Send.DelLogic(logic.LogicId);
                     };
 
                 };
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs
index af09f9e..a893a4a 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs
@@ -153,7 +153,7 @@
             {
                 if (Common.Logic.CurrentLogic.Actions[i]["LinkType"].ToString() == "8")
                 {
-                    if (Common.Logic.CurrentLogic.Actions[i]["DeviceAddr"].ToString() == common.DeviceAddr && Common.Logic.CurrentLogic.Actions[i]["Epoint"].ToString() == common.DeviceEpoint.ToString())
+                    if (Common.Logic.CurrentLogic.Actions[i]["DeviceAddr"].ToString() == common.DeviceAddr && Common.Logic.CurrentLogic.Actions[i]["Epoint"].ToString() =="200")
                     {
                         Common.Logic.CurrentLogic.Actions.RemoveAt(i);
                         Common.Logic.CurrentLogic.Actions.Insert(i, actionsInfo);
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/IfString.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/IfString.cs
index 13b3d18..6539d80 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/IfString.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/IfString.cs
@@ -15,6 +15,10 @@
         /// </summary>
         public static string _LockLogic = "LockLogic";
         /// <summary>
+        ///- Sone闂ㄩ攣-鑱斿姩浜嬩欢鐨勫垽鏂瓧绗︿覆
+        /// </summary>
+        public static string _SoneLogic = "SoneLogic";
+        /// <summary>
         /// 鑷姩鍖栫殑-鏉′欢-鍒ゆ柇瀛楃涓�
         /// </summary>
         public static string Condition_Logic = "condition_logic";
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
index 12f8acd..5df1e25 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
@@ -767,15 +767,20 @@
                 {
                     succeed = true;
                     CurrentLogic.LogicId = logicifon.LogicId;
+                    if (LogicView.IfString._Logic == if_logic || LogicView.IfString._SoneLogic == if_logic)
+                    {
+                        //鑷姩鍖栭�昏緫鍒楄〃
+                        Common.Logic.LogicList.Add(CurrentLogic);
+                    }
                     if (LogicView.IfString._LockLogic == if_logic)
                     {
                         //闂ㄩ攣鑱斿姩浜嬩欢閫昏緫鍒楄〃
                         Common.Logic.LockLogicList.Add(CurrentLogic);
                     }
-                    else
+                    if (LogicView.IfString._SoneLogic == if_logic)
                     {
-                        //鑷姩鍖栭�昏緫鍒楄〃
-                        Common.Logic.LogicList.Add(CurrentLogic);
+                        //Sone闂ㄩ攣鑱斿姩浜嬩欢閫昏緫鍒楄〃
+                        Common.Logic.SoneLogicList.Add(CurrentLogic);
 
                     }
                     if (tag)
@@ -802,34 +807,32 @@
                 //TipView("娣诲姞鑷姩鍖栧け璐�");
                 //return;
             }
-          
 
+            UserView.HomePage.Instance.RemoveViewByTag("Logic");//绉婚櫎鎵�鏈夋爣璁癓ogic鐣岄潰
             if (LogicView.IfString._Logic == if_logic)
             {
-                UserView.HomePage.Instance.RemoveViewByTag("Logic");
-                if (CurrentLogic.LogicType == 0)
-                {
-                    //鍙埛鏂板垎绫讳笂涓嬫粦鍔╲iew锛�
-                    Phone.Category.CategoryMainForm.instance?.RefreshBodyView();
-                    // Category.Category.instance?.RefreshBodyView();
-                }
-                else if (CurrentLogic.LogicType == 2)
-                {
-                    //鍒锋柊鏁翠釜鍒嗙被锛�
-                    //闂ㄩ攣甯稿紑妯″紡鐗规畩;
-                    UserView.UserPage.Instance.ShowCategoryAutoListForm();
-
-                }
+                //鍙埛鏂板垎绫�-鑷姩鍖栦笂涓嬫粦鍔╲iew锛�
+                Phone.Category.CategoryMainForm.instance?.RefreshBodyView();
+                // Category.Category.instance?.RefreshBodyView();
             }
             else if (LogicView.IfString._LockLogic == if_logic)
             {
-                UserView.HomePage.Instance.RemoveViewByTag("Logic");//绉婚櫎鎵�鏈夋爣璁癓ogic鐣岄潰
+                //璺冲埌闂ㄩ攣鑱斿姩浜嬩欢鍒楄〃鐣岄潰
                 UserView.HomePage.Instance.RemoveViewByTag("LockListView");//绉婚櫎鎵�鏈夋爣璁癓ockListView鐣岄潰
                 var doorLockLogicList = new DoorLockLogic.LockLogicList();
                 UserView.HomePage.Instance.AddChidren(doorLockLogicList);
                 UserView.HomePage.Instance.PageIndex += 1;
                 doorLockLogicList.Show();
             }
+            else if (LogicView.IfString._SoneLogic == if_logic)
+            {
+                //璺冲埌Sone闂ㄩ攣鑱斿姩浜嬩欢鍒楄〃鐣岄潰
+                UserView.HomePage.Instance.RemoveViewByTag("SoneLogic");//绉婚櫎鎵�鏈夋爣璁癓ockListView鐣岄潰
+                var soneLogicList = new SoneLogicList();
+                UserView.HomePage.Instance.AddChidren(soneLogicList);
+                UserView.HomePage.Instance.PageIndex += 1;
+                soneLogicList.Show();
+            }
 
         }
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs b/ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs
index 866f354..437e22b 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs
@@ -24,8 +24,8 @@
         /// <param name="Yes"></param>
         public  void Show(bool Yes)
         {
-             UserView.HomePage.Instance.ScrollEnabled = false;
             #region  View甯冨眬浠g爜
+            UserView.HomePage.Instance.ScrollEnabled = false;
             TopView view = new TopView();
             this.AddChidren(view.TopRowView());
 
@@ -47,7 +47,7 @@
             
             view.clickBtn.MouseDownEventHandler += (sender, e) =>
             {
-                // UserView.HomePage.Instance.ScrollEnabled = true;//鎭㈠宸︽粦
+                UserView.HomePage.Instance.ScrollEnabled = true;//鎭㈠宸︽粦
                 RemoveFromParent();
             };
             var middle = new VerticalScrolViewLayout
@@ -193,17 +193,15 @@
                     //S-one闂ㄩ攣鐗规畩,涓嶈兘鍐嶆缂栬緫;
                     actiondevice.stateRow.AddRightView(actiondevice.edit);
                 }
-            
-                
                 var linkType = int.Parse(Common.Logic.CurrentLogic.Actions[i]["LinkType"].ToString());
                 var actions = Common.Logic.CurrentLogic.Actions[i];
-
                 switch (linkType)
                 {
                     case 8:
-                        {
-
-                            var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
+                        {
+                            //S-one闂ㄩ攣鐗规畩锛圡ac鏄敮涓�鐨勮瘑鍒級
+                            ///濡傛灉涓嶈繖鏍锋煡鎵撅紝鍒嗙被-鑷姩鍖栬繘鏉ユ煡鐪嬩細瀛樺湪闂
+                            var deviceinof = Common.Logic.LogicDviceList.Find((obj) => { return  obj.DeviceAddr == actions["DeviceAddr"].ToString(); });
                             if (deviceinof == null)
                             {
                                 deviceinof = new CommonDevice();
@@ -241,15 +239,16 @@
                         break;
 
                 }
-             
                 ///缂栬緫
                 actiondevice.edit.MouseUpEventHandler += (sender, e) =>
                 {
                     switch (linkType)
                     {
                         case 8:
-                            {
-                                var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
+                            {
+                                //S-one闂ㄩ攣鐗规畩锛圡ac鏄敮涓�鐨勮瘑鍒級
+                                ///濡傛灉涓嶈繖鏍锋煡鎵撅紝鍒嗙被-鑷姩鍖栬繘鏉ユ煡鐪嬩細瀛樺湪闂
+                                var deviceinof = Common.Logic.LogicDviceList.Find((obj) => { return obj.DeviceAddr == actions["DeviceAddr"].ToString(); });
                                 if (deviceinof == null)
                                 {
                                     deviceinof = new CommonDevice();
@@ -326,10 +325,8 @@
                     return;
                 }
                 var name = logicTextBox.Text.Trim();
-                Method.SaveLogic(IfString._Logic, name, IfString.Tag, Common.Logic.CurrentLogic);
+                Method.SaveLogic(IfString._SoneLogic, name, IfString.Tag, Common.Logic.CurrentLogic);
             };
-
-           
 
         }
         /// <summary>
@@ -406,34 +403,24 @@
 
                         };
 
-                        foreach (var deviceinfo in Common.Logic.CurrentLogic.Actions)
+                        if (button.Text == Language.StringByID(MyInternationalizationString.logicopen))
                         {
-                            if (deviceinfo["LinkType"].ToString() == "8")
-                            {
-                                if (deviceinfo["DeviceAddr"].ToString() == common.DeviceAddr && deviceinfo["Epoint"].ToString() == common.DeviceEpoint.ToString())
-                                {
-                                    if (deviceinfo["PassData"].ToString() == "055704010112")
-                                    {//寮�鍚�
-                                        SelectedDeviceStatus = Language.StringByID(MyInternationalizationString.logicopen);
-                                        openView.selectedIconBtn.Visible = true;
-                                        closeView.selectedIconBtn.Visible = false;
-                                        openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
-                                        closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
-                                    }
-                                    else
-                                    {//鍏抽棴
-                                        SelectedDeviceStatus = Language.StringByID(MyInternationalizationString.logicclose);
-                                        openView.selectedIconBtn.Visible = false;
-                                        closeView.selectedIconBtn.Visible = true;
-                                        openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
-                                        closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+                            //寮�鍚�
+                            SelectedDeviceStatus = Language.StringByID(MyInternationalizationString.logicopen);
+                            openView.selectedIconBtn.Visible = true;
+                            closeView.selectedIconBtn.Visible = false;
+                            openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+                            closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
 
-                                    }
-                                    break;
-                                }
-                            }
                         }
-
+                        else {
+                            //鍏抽棴
+                            SelectedDeviceStatus = Language.StringByID(MyInternationalizationString.logicclose);
+                            openView.selectedIconBtn.Visible = false;
+                            closeView.selectedIconBtn.Visible = true;
+                            openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+                            closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+                        }
 
                     }
                     break;
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
index 6d0a404..9b3974a 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -180,7 +180,7 @@
             });
         }
         ///<summary>
-        /// 鍒犻櫎閫昏緫
+        /// 鍒犻櫎閫昏緫(0鎴愬姛,鍏跺畠鍊�:澶辫触)
         /// </summary>
         public static async System.Threading.Tasks.Task<int> DelLogic(int LogicId)
         {
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
index cdccd8b..ca15989 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
@@ -15,10 +15,10 @@
         /// </summary>
         public static void SkipAddLogic(int intvalue, DoorLock doorLock = null, UserCenter.MemberInfoRes accountObj = null)
         {
-            /// 0.姝e父鑷姩鍖�;1.闂ㄩ攣鑷姩鍖�;2.闂ㄩ攣甯稿紑.鍏�;
+            /// 0.姝e父鑷姩鍖�;1.闂ㄩ攣鑷姩鍖�;2.Sone闂ㄩ攣;
             switch (intvalue)
             {
-                case 0:
+                case 0:
                     {
                         //new涓�涓柊閫昏緫瀵硅薄锛�
                         //鏂板姝e父鑷姩鍖栧叆鍙�
@@ -30,75 +30,57 @@
                         UserView.HomePage.Instance.AddChidren(addLogicPage);
                         UserView.HomePage.Instance.PageIndex += 1;
                         addLogicPage.Show();
-                    }
+
+                    }
                     break;
-                case 1:
+                case 1:
                     {
                         //杩涘叆闂ㄩ攣鑱斿姩浜嬩欢鍏ュ彛
-                        Send.UserMemberInfoRes = accountObj;
-                        Send.CurrentDoorLock = doorLock;
-                        if (accountObj == null)
-                        {
-                            ///闃叉鎶涘紓甯�
-                            Send.UserMemberInfoRes = new UserCenter.MemberInfoRes();
-                        }
-                        if (doorLock == null)
-                        {
-                            ///闃叉鎶涘紓甯�
-                            Send.CurrentDoorLock = new DoorLock();
-                        }
-                        ///杩涙潵鍒锋柊涓�娆¤澶囧垪琛紱
-                        Common.Logic.LogicDviceList.Clear();
-                        if (Common.Logic.LogicDviceList.Count == 0)
-                        {
-                            Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
-                        }
-                        var doorLockLogicList = new DoorLockLogic.LockLogicList();
-                        UserView.HomePage.Instance.AddChidren(doorLockLogicList);
-                        UserView.HomePage.Instance.PageIndex += 1;
-                        doorLockLogicList.Show();
-                    }
-                    break;
-                case 2:
-                    {
+                        Send.UserMemberInfoRes = accountObj;
+                        Send.CurrentDoorLock = doorLock;
+                        if (accountObj == null)
+                        {
+                            ///闃叉鎶涘紓甯�
+                            Send.UserMemberInfoRes = new UserCenter.MemberInfoRes();
+                        }
+                        if (doorLock == null)
+                        {
+                            ///闃叉鎶涘紓甯�
+                            Send.CurrentDoorLock = new DoorLock();
+                        }
+                        ///杩涙潵鍒锋柊涓�娆¤澶囧垪琛紱
                         Common.Logic.LogicDviceList.Clear();
                         if (Common.Logic.LogicDviceList.Count == 0)
                         {
                             Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
                         }
-                        //璇诲彇绯荤粺褰撳墠鏃堕棿锛氭椂-鍒�
-                        //璇诲彇绯荤粺褰撳墠鏃堕棿锛氭椂-鍒�
-                        var h = DateTime.Now.ToString("HH");
-                        var m = DateTime.Now.ToString("mm");
-                        Dictionary<string, string> timeConditionsInfo = new Dictionary<string, string>();
-                        timeConditionsInfo.Add("Type", "0");
-                        timeConditionsInfo.Add("IsValid", "1");
-                        timeConditionsInfo.Add("DateType", "0");
-                        timeConditionsInfo.Add("RemindTime", "0");
-                        timeConditionsInfo.Add("EnDelay", "0");
-                        timeConditionsInfo.Add("DelayTime", "0");
-                        timeConditionsInfo.Add("DoorLockOpenDelayTime", "0");
-                        timeConditionsInfo.Add("StartHour", h);
-                        timeConditionsInfo.Add("StartMin", m);
-                        Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
-                        actionsInfo.Add("LinkType", 8);
-                        actionsInfo.Add("DeviceAddr", doorLock.DeviceAddr);
-                        actionsInfo.Add("Epoint", "200");
-                        actionsInfo.Add("PassData", "055704010113");//榛樿闂ㄩ攣甯稿叧
-
-                        //new涓�涓柊閫昏緫瀵硅薄锛�
-                        //鏂板闂ㄩ攣甯稿紑妯″紡鑷姩鍖栧叆鍙o紱
-                        Common.Logic.CurrentLogic = new Common.Logic();
-                        Common.Logic.CurrentLogic.IsEnable = 1;//榛樿涓哄紑
-                        Common.Logic.CurrentLogic.LogicType = 2;//鏍囪閫昏緫绫诲瀷
-                        Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.openmode);
-                        Common.Logic.CurrentLogic.Conditions.Add(timeConditionsInfo);//娣诲姞鏉′欢
-                        Common.Logic.CurrentLogic.Actions.Add(actionsInfo);//娣诲姞鐩爣
-                        var oneLogic = new OneLogic();
-                        UserView.HomePage.Instance.AddChidren(oneLogic);
+                        var doorLockLogicList = new DoorLockLogic.LockLogicList();
+                        UserView.HomePage.Instance.AddChidren(doorLockLogicList);
                         UserView.HomePage.Instance.PageIndex += 1;
-                        oneLogic.Show(false);
-                    }
+                        doorLockLogicList.Show();
+                    }
+                    break;
+                case 2:
+                    {
+                        ///Sone闂ㄩ攣涓诲叆鍙�
+                        if (doorLock == null)
+                        {
+                            ///闃叉鎶涘紓甯�
+                            doorLock = new DoorLock();
+                        }
+                        Send.CurrentDoorLock = doorLock;
+                        ///杩涙潵鍒锋柊涓�娆¤澶囧垪琛紱
+                        Common.Logic.LogicDviceList.Clear();
+                        if (Common.Logic.LogicDviceList.Count == 0)
+                        {
+                            Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
+                        }
+                        var addLogicPage = new SoneLogicList();
+                        UserView.HomePage.Instance.AddChidren(addLogicPage);
+                        UserView.HomePage.Instance.PageIndex += 1;
+                        addLogicPage.Show();
+                     
+                    }
                     break;
             }
 
@@ -106,7 +88,6 @@
 
 
         #region 鈼� 鑷姩鍖朹_________________________
-
         /// <summary>
         /// 鑷姩鍖栧姛鑳戒唬鐮佸叆鍙�
         /// </summary>
@@ -180,8 +161,8 @@
                 X = Application.GetRealWidth(58),
                 Y = scenehorizontalScrol.Bottom,
             };
-            functionSceneAutoBodyView.AddChidren(logicScrolView);
-
+            functionSceneAutoBodyView.AddChidren(logicScrolView);
+
             logicScrolView.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
             bool no = false;
             //鏄剧ず榛樿妯℃澘鐨勭晫闈簨浠�
@@ -286,9 +267,9 @@
                 Read(logicScrolView, no);
                 //鍏抽棴鍒锋柊View锛�
                 logicScrolView.EndHeaderRefreshing();
-            };
-
-            //鑷姩鍖�
+            };
+
+            //鑷姩鍖�
             Read(logicScrolView, no);
 
         }
@@ -341,13 +322,11 @@
             Automationview(logicScrolView, no);
             CommonPage.Loading.Hide();
         }
+        static RowLayout selectedRow = new RowLayout() { Tag = "0" };//璁板綍宸︽粦鐘舵��
         /// <summary>
         /// 鍔犺浇鑷姩鍖栧垪琛ㄧ晫闈�
         /// </summary>
         /// <param name="refresview">Refresview.</param>
-        
-        static  RowLayout selectedRow = new RowLayout() { Tag="0"};//璁板綍宸︽粦鐘舵��
-        
         private static async void Automationview(VerticalRefreshLayout refresview, bool no)
         {
             refresview.RemoveAll();
@@ -439,8 +418,8 @@
                     fLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
                     logicRowlayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
                    
-                }
-                i++;
+                }
+                i++;
                 var logicnameBtn = new Button
                 {
                     Height = Application.GetRealHeight(58),
@@ -537,13 +516,13 @@
                 {
                     var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm,
                     Language.StringByID(MyInternationalizationString.doyouwanttodelete),
-                    Language.StringByID(MyInternationalizationString.confrim));
-                    alert.Show();
-                    alert.ConfirmClickEvent += () =>
+                    Language.StringByID(MyInternationalizationString.confrim));
+                    alert.Show();
+                    alert.ConfirmClickEvent += () =>
                     {
                         Common.Logic.LogicList.Remove(logic);
                         Automationview(refresview, no);
-                        Send.DelLogic(logic.LogicId);
+                        Send.DelLogic(logic.LogicId);
                     };
 
                 };
@@ -555,9 +534,9 @@
                     Width = Application.GetRealWidth(1080 - 58),
                     BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
                 };
-                fLayout.AddChidren(line);
-
-
+                fLayout.AddChidren(line);
+
+
             }
 
         }
@@ -595,8 +574,8 @@
                 {
                     indexlist.Add(linkType);
                 }
-            }
-            //鎺掑垪鍥炬爣椤哄簭;
+            }
+            //鎺掑垪鍥炬爣椤哄簭;
             if (indexlist.Contains("0") || indexlist.Contains("8"))
             {
                 iconIndexlist.Add("0");
@@ -716,7 +695,6 @@
                 }
             }
         }
-
         #endregion
 
         /// <summary>
@@ -753,55 +731,51 @@
             currentLogic.LogicName = Language.StringByID(R.MyInternationalizationString.openmode);
             currentLogic.Conditions.Add(timeConditionsInfo);
             currentLogic.Actions.Add(actionsInfo);
-            Exist(3);//鏌ユ壘鏄惁瀛樺湪璁剧疆杩囧け鏁堟椂闂�(鏈夌殑璇濆垹闄わ紝鍐嶆坊鍔�)
             var logicIfon = await Send.AddModifyLogic(currentLogic);
-            if (logicIfon != null && logicIfon.LogicId != 0)
-            {
-                //娣诲姞闂ㄩ攣澶辨晥鏃堕棿鐨勫巻鍙茶褰�
-                UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog((DoorLock)common, 9003, timeVlaue.ToString());
+            if (logicIfon != null && logicIfon.LogicId != 0)
+            {
+                //娣诲姞闂ㄩ攣澶辨晥鏃堕棿鐨勫巻鍙茶褰�
+                UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog((DoorLock)common, 9003, timeVlaue.ToString());
                 return true;//琛ㄧず娣诲姞鎴愬姛;
             }
             return false;//琛ㄧず娣诲姞澶辫触;
 
-        }
-
-		///<summary>
-		/// s-one闂ㄩ攣鏄惁瀛樺湪鑷姩鍖栫殑鏂规硶;
-		/// 娉ㄦ剰锛堝弬鏁�2锛�3锛夛細valueInt=3鏄垹闄よ缃け鏁堟椂闂磋嚜鍔ㄥ寲锛泇alueInt=2鍒ゆ柇鏄惁瀛樺湪鑷姩鍖栵紱
-		/// 杩斿洖鍊硷細0涓嶅瓨鍦�;1瀛樺湪;2鍒犻櫎鎴愬姛;3鍒犻櫎澶辫触;
-		/// </summary>
-		public static async System.Threading.Tasks.Task<int> Exist(int valueInt = 2)
-        {
-            int exist = 0;
-            var Idlist = await Send.GetLogicId(valueInt);
-            if (Idlist.Count != 0)
-            {
-                if (valueInt == 3)
-                {
-                    for (int i = 0; i < Idlist.Count; i++)
-                    {
-                        //valueInt=3涓�鏉$壒娈婄殑鑷姩鍖�(鐢ㄦ潵璁剧疆澶辨晥鏃堕棿)
-                        var d=await Send.DelLogic(Idlist[i]);
-						if (d == 0)
-						{
-							//鍒犻櫎鎴愬姛
-							exist = 2;
-						}
-						else
-						{
-							//鍒犻櫎澶辫触
-							exist = 3;
-						}
-						return exist;
+        }
 
-					}
-				}
-                exist = 1;
+        ///<summary>
+        /// s-one闂ㄩ攣鏄惁瀛樺湪鑷姩鍖栫殑鏂规硶;
+        /// 娉ㄦ剰(鍙傛暟:2-甯稿紑鑷姩鍖�;3-澶辨晥鏃堕棿鑷姩鍖�);
+        /// 杩斿洖鍊硷細0涓嶅瓨鍦�;鍏跺畠鍊奸兘瀛樺湪;
+        /// </summary>
+        public static async System.Threading.Tasks.Task<int> Exist(int valueInt)
+        {
+            int exist = 0;
+            var Idlist = await Send.GetLogicId(valueInt);
+            if (Idlist.Count != 0)
+            {
+                //榛樿鍙栫涓�涓�昏緫ID
+                exist = Idlist[0];
+
             }
             return exist;
         }
 
-     
+        ///<summary>
+        ///鑾峰彇閫昏緫淇℃伅
+        /// 杩斿洖鍊硷細null涓嶅瓨鍦�;鍏跺畠鍊奸兘瀛樺湪;
+        /// </summary>
+        public static async System.Threading.Tasks.Task<Common.Logic> GetLogicIfon()
+        {
+            Common.Logic logic = null;
+            var Idlist = await Send.GetLogicId(3);
+            if (Idlist.Count != 0)
+            {
+                //榛樿鍙栫涓�涓�昏緫ID(鏃舵晥鎬у彧鏈変竴鏉¢�昏緫)
+                int exist = Idlist[0];
+                logic = await Send.GetLogic(exist, 3);
+            }
+            return logic;
+        }
     }
 }
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
new file mode 100755
index 0000000..57a5a58
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
@@ -0,0 +1,508 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared.Common;
+using Shared.R;
+using Shared;
+
+namespace Shared.Phone.Device.Logic
+{
+    public class SoneLogicList : FrameLayout
+    {
+        public SoneLogicList()
+        {
+            Tag = "SoneLogic";
+        }
+        public async void Show()
+        {
+            #region  鐣岄潰鐨勫竷灞�浠g爜
+            UserView.HomePage.Instance.ScrollEnabled = false;//閿佷綇宸︽粦
+            TopView view = new TopView();
+            this.AddChidren(view.TopRowView());
+            view.toptitleNameBtn.TextID = MyInternationalizationString.selection;
+            view.clickBtn.MouseDownEventHandler += (sender, e) =>
+            {
+                UserView.HomePage.Instance.ScrollEnabled = true;
+                RemoveFromParent();
+            };
+
+            var middle = new FrameLayout
+            {
+                Y = view.topRowLayout.Bottom,
+                Height = Application.GetRealHeight(Method.H - 184),
+                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+            };
+            this.AddChidren(middle);
+            #endregion
+
+            #region  甯稿紑妯″紡鍥炬爣 鏃舵晥鎬у父寮�璁剧疆
+            ///绗簩鍧楃涓�绾х埗鎺т欢
+            var fLayout = new FrameLayout
+            {
+                Width = Application.GetRealWidth(1080),
+                Height = Application.GetRealHeight(829 - 184),
+                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+            };
+            middle.AddChidren(fLayout);
+            ///甯稿紑妯″紡鍥炬爣
+            var modeIconBtn = new Button
+            {
+                X = Application.GetRealWidth(395),
+                Y = Application.GetRealHeight(92),
+                Width = Application.GetMinRealAverage(294),
+                Height = Application.GetMinRealAverage(294),
+                UnSelectedImagePath = "ZigeeLogic/noMode.png",
+                SelectedImagePath = "ZigeeLogic/openMode.png",
+            };
+            fLayout.AddChidren(modeIconBtn);
+            var logic = await SkipView.GetLogicIfon();
+            if (logic != null)
+            {
+
+
+                fLayout.Height = Application.GetRealHeight(780);//鏀瑰彉楂樺害
+                modeIconBtn.IsSelected = true;//鏀瑰彉鍥炬爣鐘舵��
+                ///绗簩绾х埗鎺т欢
+                var openModeFl = new FrameLayout
+                {
+                    Y = Application.GetRealHeight(455),
+                    Height = Application.GetRealHeight(127 + 199),
+                    Width = Application.GetRealWidth(1080),
+                };
+                fLayout.AddChidren(openModeFl);
+                ///鍏抽棴鏃舵晥鎬ц嚜鍔ㄥ寲
+                Button closeBtn = new Button
+                {
+                    X = Application.GetRealWidth(86),
+                    Height = Application.GetRealHeight(127),
+                    Width = Application.GetRealWidth(907),
+                    Radius = (uint)Application.GetRealHeight(58),
+                    BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
+                    TextID = MyInternationalizationString.closeUp,
+                    TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+                    TextSize = 16,
+                };
+                openModeFl.AddChidren(closeBtn);
+                closeBtn.MouseUpEventHandler += (sender,e) => {
+                    
+
+                    var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm,
+                   Language.StringByID(MyInternationalizationString.doyouwanttodelete),
+                   Language.StringByID(MyInternationalizationString.confrim));
+                    alert.Show();
+                    alert.ConfirmClickEvent += () =>
+                    {
+                        Send.DelLogic(logic.LogicId);
+                        this.RemoveFromParent();
+                        var soneLogicList = new SoneLogicList();
+                        UserView.HomePage.Instance.AddChidren(soneLogicList);
+                        UserView.HomePage.Instance.PageIndex += 1;
+                        soneLogicList.Show();
+                    };
+                };
+
+                ///鏄剧ず澶辨晥璁剧疆鏃堕棿鏂囨湰鎺т欢
+                var timeTextBtn= new Button
+                {
+                    Y = Application.GetRealHeight(127 + 69),
+                    X = Application.GetRealWidth(225),
+                    Width = Application.GetRealWidth(634),
+                    Height = Application.GetRealHeight(60),
+                    TextSize = 15,
+                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                    Text = "鏃舵晥鎬у父寮�璁剧疆12:20",
+                };
+                openModeFl.AddChidren(timeTextBtn);
+                ///鏃舵晥鎬у父寮�鍙湁涓�涓潯浠�;
+                try
+                {
+                    var y = DateTime.Now.ToString("yy");//閭d竴骞�
+                    var m = DateTime.Now.ToString("mm");//閭d竴鏈�
+                    var d = DateTime.Now.ToString("dd");//閭d竴澶�
+                    var h =int.Parse(DateTime.Now.ToString("HH"));//褰撳墠绯荤粺鏃堕棿
+                    var me = DateTime.Now.ToLongDateString();
+                    var timeInt = int.Parse(logic.Conditions[0]["DoorLockOpenDelayTime"]);
+                    int dayInt = (h + timeInt)/ 24;//绠楀嚭鍑犲ぉ鍚庢墽琛�
+                    int hour = (h + timeInt) % 24;//绠楀嚭鍑犲ぉ鍚庨偅涓椂闂存墽琛�
+                    timeTextBtn.Text = "鏃舵晥鎬у父寮�璁剧疆" + y + "骞�" + m + "鏈�" + d + dayInt + "鍙�" + timeInt + "鏃�"+ "鎵ц";
+                }
+                catch { }
+
+            }
+            else
+            {
+                fLayout.Height = Application.GetRealHeight(645);//鏀瑰彉楂樺害
+                modeIconBtn.IsSelected = false;//鏀瑰彉鍥炬爣鐘舵��
+                ///绗簩绾х埗鎺т欢
+                var modeFl = new FrameLayout
+                {
+                    Y = Application.GetRealHeight(478),
+                    X = Application.GetRealWidth(58),
+                    Height = Application.GetRealHeight(138),
+                    Width = Application.GetRealWidth(1022),
+                    BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                };
+                fLayout.AddChidren(modeFl);
+                modeFl.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopLeft);
+                modeFl.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerBottomLeft);
+                ///鏃舵晥鎬у父寮�璁剧疆鏄剧ず鏂囨湰鎺т欢
+                var modeTextBtn = new Button
+                {
+
+                    Y = Application.GetRealHeight(40),
+                    X = Application.GetRealWidth(58),
+                    Width = Application.GetRealWidth(600),
+                    Height = Application.GetRealHeight(60),
+                    TextSize = 15,
+                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                    TextAlignment = TextAlignment.CenterLeft,
+                   // Text = "鏃舵晥鎬у父寮�璁剧疆",
+                    TextID=MyInternationalizationString.timeSetSone,
+                };
+                modeFl.AddChidren(modeTextBtn);
+                ///涓嬩竴绾ц彍鍗曞浘鏍囨帶浠�
+                var nextIconBtn = new Button
+                {
+                    Width = Application.GetMinRealAverage(104),
+                    Height = Application.GetMinRealAverage(104),
+                    X = Application.GetRealWidth(861),
+                    Y = Application.GetRealHeight(17),
+                    UnSelectedImagePath = "ZigeeLogic/next.png",
+                };
+                modeFl.AddChidren(nextIconBtn);
+
+                var clickBtn = new Button
+                {
+                    Y = Application.GetRealHeight(478),
+                    X = Application.GetRealWidth(58),
+                    Height = Application.GetRealHeight(138),
+                    Width = Application.GetRealWidth(1022),
+                };
+                modeFl.AddChidren(clickBtn);
+
+
+                clickBtn.MouseUpEventHandler += async (sender, e) =>
+                {
+                    var d = await SkipView.LockAddModifyLogic(12, Send.CurrentDoorLock);
+                };
+            }
+
+            #endregion
+
+            #region 甯稿紑鑷姩鍖�
+            ///绗笁鍧楃涓�绾х埗鎺т欢
+            var listLogicFl = new FrameLayout
+            {
+                Y = fLayout.Bottom,
+                X = Application.GetRealWidth(58),
+                Height = middle.Height - fLayout.Height,
+                Width = Application.GetRealWidth(1022),
+                BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+            };
+            middle.AddChidren(listLogicFl);
+            listLogicFl.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
+
+            ///娣诲姞甯稿紑鑷姩鍖栫殑鐖舵帶浠�
+            var addLogicfL = new FrameLayout
+            {
+                Height = Application.GetRealHeight(187),
+                Width = Application.GetRealWidth(1080 - 58),
+            };
+            listLogicFl.AddChidren(addLogicfL);
+            ///甯稿紑鑷姩鍖栨樉绀烘枃鏈殑鎺т欢
+            var addTextBtn = new Button
+            {
+                Y = Application.GetRealHeight(46),
+                X = Application.GetRealWidth(58),
+                Width = Application.GetRealWidth(600),
+                Height = Application.GetRealHeight(95),
+                TextSize = 24,
+                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                TextAlignment = TextAlignment.CenterLeft,
+                //Text = "甯稿紑鑷姩鍖�",
+                TextID = MyInternationalizationString.openAutomationSone,
+            };
+            addLogicfL.AddChidren(addTextBtn);
+            ///娣诲姞鑷姩鍖栧浘鏍囩殑鎺т欢
+            var addIconBtn = new Button
+            {
+                Width = Application.GetMinRealAverage(69),
+                Height = Application.GetMinRealAverage(69),
+                X = Application.GetRealWidth(890),
+                Y = Application.GetRealHeight(60),
+                UnSelectedImagePath = "ZigeeLogic/add.png",
+            };
+            addLogicfL.AddChidren(addIconBtn);
+            addIconBtn.MouseUpEventHandler += (sender, e) =>
+            {
+               
+                //璇诲彇绯荤粺褰撳墠鏃堕棿锛氭椂-鍒�
+                //璇诲彇绯荤粺褰撳墠鏃堕棿锛氭椂-鍒�
+                var h = DateTime.Now.ToString("HH");
+                var m = DateTime.Now.ToString("mm");
+                Dictionary<string, string> timeConditionsInfo = new Dictionary<string, string>();
+                timeConditionsInfo.Add("Type", "0");
+                timeConditionsInfo.Add("IsValid", "1");
+                timeConditionsInfo.Add("DateType", "0");
+                timeConditionsInfo.Add("RemindTime", "0");
+                timeConditionsInfo.Add("EnDelay", "0");
+                timeConditionsInfo.Add("DelayTime", "0");
+                timeConditionsInfo.Add("DoorLockOpenDelayTime", "0");
+                timeConditionsInfo.Add("StartHour", h);
+                timeConditionsInfo.Add("StartMin", m);
+                Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
+                actionsInfo.Add("LinkType", 8);
+                actionsInfo.Add("DeviceAddr", Send.CurrentDoorLock.DeviceAddr);
+                actionsInfo.Add("Epoint", "200");
+                actionsInfo.Add("PassData", "055704010113");//榛樿闂ㄩ攣甯稿叧
+                //new涓�涓柊閫昏緫瀵硅薄锛�
+                //鏂板闂ㄩ攣甯稿紑妯″紡鑷姩鍖栧叆鍙o紱
+                Common.Logic.CurrentLogic = new Common.Logic();
+                Common.Logic.CurrentLogic.IsEnable = 1;//榛樿涓哄紑
+                Common.Logic.CurrentLogic.LogicType = 2;//鏍囪閫昏緫绫诲瀷
+                Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.openmode);
+                Common.Logic.CurrentLogic.Conditions.Add(timeConditionsInfo);//娣诲姞鏉′欢
+                Common.Logic.CurrentLogic.Actions.Add(actionsInfo);//娣诲姞鐩爣
+                var oneLogic = new OneLogic();
+                UserView.HomePage.Instance.AddChidren(oneLogic);
+                UserView.HomePage.Instance.PageIndex += 1;
+                oneLogic.Show(false);
+
+            };
+
+            ///甯稿紑鑷姩鍖栧垪琛ㄤ笂涓嬫粦鍔ㄧ殑鎺т欢
+            var verticalRefresh = new VerticalRefreshLayout
+            {
+
+                Y = addLogicfL.Bottom,
+                X = Application.GetRealWidth(46),
+                Height = listLogicFl.Height - addLogicfL.Height,
+                Width = listLogicFl.Width - Application.GetRealWidth(46),
+            };
+            listLogicFl.AddChidren(verticalRefresh);
+            verticalRefresh.BeginHeaderRefreshingAction += () =>
+            {
+                Common.Logic.SoneLogicList.Clear();
+                Read(verticalRefresh, false);
+                verticalRefresh.EndHeaderRefreshing();
+            };
+            Read(verticalRefresh, true);
+            #endregion
+        }
+        /// <summary>
+        /// 璇诲彇鑷姩鍖栧垪琛ㄦ暟鎹紱
+        /// </summary>
+        /// <param name="verticalRefresh"></param>
+        private async void Read(VerticalRefreshLayout verticalRefresh, bool yes)
+        {
+            if (yes)
+            {
+                CommonPage.Loading.Start();
+            }
+            try
+            {
+                if (Common.Logic.SoneLogicList.Count == 0)
+                {
+                    var Idlist = await Send.GetLogicId(2);//闂ㄩ攣甯稿紑妯″紡
+                    if (Idlist.Count != 0)
+                    {
+                        var listlogic = await Send.ReadList(Idlist.Count, 2);
+                        for (int i = 0; i < listlogic.Count; i++)
+                        {
+                            var logic = listlogic[i];
+                            if (logic.LogicType != 2)
+                            {
+                                continue;
+                            }
+                            Common.Logic.SoneLogicList.Add(logic);
+                        }
+                    }
+                }
+            }
+            catch (Exception e)
+            {
+                var dd = e.Message;
+            }
+            //鑷姩鍖�
+            RefreshView(verticalRefresh);
+            if (yes)
+            {
+                CommonPage.Loading.Hide();
+
+            }
+        }
+        /// <summary>
+        /// 鍔犺浇鑷姩鍖栧垪琛�
+        /// </summary>
+        /// <param name="verticalRefresh"></param>
+        private void RefreshView(VerticalRefreshLayout verticalRefresh)
+        {
+            verticalRefresh.RemoveAll();
+            for (int i = 0; i < 6; i++)
+            {
+                Common.Logic.SoneLogicList.Add(new Common.Logic { LogicName = i.ToString() });
+
+            }
+            foreach (var logic in Common.Logic.SoneLogicList)
+            {
+                #region  鑷姩鍖栧竷灞�View
+
+                ///鑷姩鍖栫埗鎺т欢
+                var fLayout = new FrameLayout
+                {
+                    Height = Application.GetRealHeight(184),
+                };
+                verticalRefresh.AddChidren(fLayout);
+                ///宸﹀彸鍙粦鍔ㄦ帶浠�
+                var logicRow = new RowLayout
+                {
+                    LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+                    BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+                    SubViewWidth = Application.GetRealWidth(184),//鏀瑰彉缂栬緫鎺т欢瀹藉害澶氬皯锛�
+                };
+                fLayout.AddChidren(logicRow);
+                //宸︽粦鑿滃崟浜嬩欢
+                logicRow.OpenMenuAction += () =>
+                {
+                    //if (selectedRow.Tag.ToString() != logicRowlayout.Tag.ToString())
+                    //{   //淇濈暀宸︽粦鍙湁涓�涓�;
+                    //    selectedRow.HideMenu();//
+                    //}
+                    //selectedRow = logicRowlayout;
+                };
+                ///鏄剧ず閫昏緫鍚嶇О鐨勬帶浠�
+                var nameBtn = new Button
+                {
+                    Height = Application.GetRealHeight(58),
+                    Width = Application.GetRealWidth(350),
+                    Text = logic.LogicName,
+                    X = Application.GetRealWidth(12),
+                    Y = Application.GetRealHeight(3),
+                    TextAlignment = TextAlignment.CenterLeft,
+                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                    TextSize = 14,
+                };
+                logicRow.AddChidren(nameBtn);
+                ///鏄剧ず鐩爣鍔熻兘鑳屾櫙棰滆壊鐨勬帶浠�
+                var typeBjBtn = new FrameLayout
+                {
+                    Width = Application.GetMinRealAverage(82),
+                    Height = Application.GetMinRealAverage(82),
+                    X = Application.GetRealWidth(17),
+                    Y = Application.GetRealHeight(84),
+                    Radius = (uint)Application.GetMinRealAverage(41),
+                    BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+                };
+                logicRow.AddChidren(typeBjBtn);
+                ///鏄剧ず鐩爣鍔熻兘鍥炬爣鐨勬帶浠�
+                var typeIconBtn = new Button
+                {
+                    Width = Application.GetMinRealAverage(58),
+                    Height = Application.GetMinRealAverage(58),
+                    Gravity = Gravity.Center,
+                };
+                typeBjBtn.AddChidren(typeIconBtn);
+                ///閫昏緫寮�鍏冲浘鏍囩殑鎺т欢
+                var switchBtn = new Button
+                {
+                    Width = Application.GetMinRealAverage(104),
+                    Height = Application.GetMinRealAverage(63),
+                    UnSelectedImagePath = "ZigeeLogic/logicclose.png",
+                    SelectedImagePath = "ZigeeLogic/logicopen.png",
+                    X = Application.GetRealWidth(815),
+                    Y = Application.GetRealHeight(92),
+
+                };
+                logicRow.AddChidren(switchBtn);
+                if (logic.IsEnable == 1)
+                {
+                    switchBtn.IsSelected = true;
+                    typeIconBtn.UnSelectedImagePath = "ZigeeLogic/function1.png";
+                    typeBjBtn.BackgroundColor = ZigbeeColor.Current.LogicFunction1Color;
+                }
+                else if (logic.IsEnable == 0)
+                {
+                    switchBtn.IsSelected = false;
+                    typeIconBtn.UnSelectedImagePath = "ZigeeLogic/nofunction.png";
+                    typeBjBtn.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+                }
+                ///缂栬緫
+                var edit = new Button
+                {
+                    BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
+                    Text = Language.StringByID(MyInternationalizationString.edit),
+                    TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+                };
+                logicRow.AddRightView(edit);
+                if (logic.LogicType == 2)
+                {
+                    edit.TextID = MyInternationalizationString.look;
+                }
+                ///鍒犻櫎
+                var del = new Button
+                {
+                    BackgroundColor = ZigbeeColor.Current.LogicDelBlackColor1,
+                    Text = Language.StringByID(MyInternationalizationString.del),
+                    TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+                };
+                logicRow.AddRightView(del);
+                ///绾跨殑鎺т欢
+                var line = new Button
+                {
+                    Y = fLayout.Height - 1,
+                    Height = 1,
+                    Width = Application.GetRealWidth(976),
+                    BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+                };
+                fLayout.AddChidren(line);
+                #endregion
+                ///寮�鍏崇偣鍑讳簨浠�
+                switchBtn.MouseUpEventHandler += (sender1, e1) =>
+                {
+                    switchBtn.IsSelected = !switchBtn.IsSelected;
+                    if (switchBtn.IsSelected)
+                    {
+                        //閫昏緫寮�
+                        logic.IsEnable = 1;
+                        typeIconBtn.UnSelectedImagePath = "ZigeeLogic/function1.png";
+                        typeBjBtn.BackgroundColor = ZigbeeColor.Current.LogicFunction1Color;
+                    }
+                    else
+                    {
+                        //閫昏緫鍏�
+                        typeIconBtn.UnSelectedImagePath = "ZigeeLogic/nofunction.png";
+                        typeBjBtn.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+                    }
+                    Send.LogicControlSwitch(logic);
+                    //Logic.Send.AddModifyLogic(logic);
+                };
+                ///缂栬緫鐐瑰嚮浜嬩欢
+                edit.MouseUpEventHandler += (sender, e) =>
+                {
+                    Common.Logic.CurrentLogic = logic;
+                    var oneLogic = new OneLogic();
+                    UserView.HomePage.Instance.AddChidren(oneLogic);
+                    UserView.HomePage.Instance.PageIndex += 1;
+                    oneLogic.Show(false);
+                };
+                ///鍒犻櫎鐐瑰嚮浜嬩欢
+                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.SoneLogicList.Remove(logic);
+                        //logicRow.Parent.RemoveFromParent();
+                        fLayout.RemoveFromParent();
+                        Send.DelLogic(logic.LogicId);
+                    };
+
+                };
+            }
+
+
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Login/AccountLogin.cs b/ZigbeeApp/Shared/Phone/Login/AccountLogin.cs
index ff07e07..8bafd8e 100755
--- a/ZigbeeApp/Shared/Phone/Login/AccountLogin.cs
+++ b/ZigbeeApp/Shared/Phone/Login/AccountLogin.cs
@@ -1,855 +1,31 @@
-锘縰sing System;
-using Shared.Common;
-using Shared.Phone.UserView;
-using Shared.Phone.Device.CommonForm;
+锘縰sing System;
+using Shared.Common;
+using Shared.Phone.UserView;
+using Shared.Phone.Device.CommonForm;
 using Shared.Phone.UserCenter;
 
-namespace Shared.Phone.Login
-{
-    /// <summary>
-    /// 鐧诲綍鐣岄潰
-    /// </summary>
-    public class AccountLogin : FrameLayout
-    {
-        #region 鈼� 鍙橀噺____________________________
-        /// <summary>
-        /// 鑳屾櫙瑙嗗浘
-        /// </summary>
-        private FrameLayout midFrameLayout;
-        /// <summary>
-        /// 鎵嬫満閭
-        /// </summary>
-        private PhoneEmailForm phoneEmailForm;
-        /// <summary>
-        /// phoneRowForm
-        /// </summary>
-        private PhoneLoginRowForm phoneRow;
-        /// <summary>
-        /// emailRow
-        /// </summary>
-        private EmailLoginRowForm emailRow;
-        /// <summary>
-        /// phonePwdRow
-        /// </summary>
-        private PwdLoginRowForm phonePwdRow;
-        /// <summary>
-        /// emailPwdRow
-        /// </summary>
-        private PwdLoginRowForm emailPwdRow;
-
-        /// <summary>
-        /// 璐﹀彿瀵嗙爜fl
-        /// </summary>
-        private FrameLayout accountPwdFL;
-        /// <summary>
-        /// 鐧诲綍閿欒鎻愮ず鎸夐挳
-        /// </summary>
-        private Button loginErrorBtn;
-        /// <summary>
-        /// 蹇樿瀵嗙爜鎸夐挳
-        /// </summary>
-        private Button forgotPasswordBtn;
-        /// <summary>
-        /// 鐧诲綍鎸夐挳
-        /// </summary>
-        private Button loginBtn;
-        /// <summary>
-        /// 楠岃瘉鐮佺櫥褰曟寜閽�
-        /// </summary>
-        private Button loginByCodeBtn;
-        /// <summary>
-        /// 娉ㄥ唽鎸夐挳
-        /// </summary>
-        private Button registerBtn;
-        /// <summary>
-        /// wechat
-        /// </summary>
-        private Button wechatBtn;
-        /// <summary>
-        /// qq
-        /// </summary>
-        private Button qqBtn;
-        /// <summary>
-        /// 杈撳叆鐨勭櫥闄嗚处鍙�(閲嶆柊鐧婚檰鏃朵娇鐢�)
-        /// </summary>
-        private string oldInputPhone = string.Empty;
-        /// <summary>
-        /// 杈撳叆鐨勭櫥闄嗚处鍙�(閲嶆柊鐧婚檰鏃朵娇鐢�)
-        /// </summary>
-        private string oldInputEmail = string.Empty;
-
-        #endregion
-
-        #region 鈼� 鏋勯�犳柟娉昣________________________
-
-        /// <summary>
-        /// 鏋勯�犳柟娉�
-        /// </summary>
-        public AccountLogin()
-        {
-            CommonPage.Instance.IsDrawerLockMode = true;
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
-            Tag = "Login";
-        }
-
-        public override void RemoveFromParent()
-        {
-            base.RemoveFromParent();
-        }
-
-        #endregion
-
-        #region 鈼� 鏄剧ず鐣岄潰_________________________
-
-        /// <summary>
-        /// 鏄剧ず鐣岄潰
-        /// </summary>
-        /// <param name="account">Account.</param>
-        /// <param name="password">Password.</param>
-        public void Show(string account = "", string password = "")
-        {
-            if (Config.Instance.IsLogin)
-            {
-
-            }
-            else
-            {
-                LoginViewShow(account);
-            }
-        }
-
-        /// <summary>
-        /// Logins the view show.
-        /// </summary>
-        /// <param name="account">Account.</param>
-        public void LoginViewShow(string account = "")
-        {
-            //璁剧疆涓�涓嬪垵濮嬪��
-            if (account.Contains("@") == true) { this.oldInputEmail = account; }
-            else { this.oldInputPhone = account; }
-
-            #region midFrameLayout
-            midFrameLayout = new FrameLayout()
-            {
-                Width = LayoutParams.MatchParent,
-                Height = Application.GetRealHeight(CommonPage.AppRealHeight),
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
-            };
-            AddChidren(midFrameLayout);
-            #endregion
-
-            #region 甯冨眬璐︽埛锛屽瘑鐮侊紝蹇樿瀵嗙爜锛屾敞鍐�  鎵嬫満楠岃瘉鐮佺櫥褰�
-
-            var logoBG = new Button()
-            {
-                Height = Application.GetRealHeight(619),
-                UnSelectedImagePath = "Account/Logo_loginBG.png"
-            };
-            midFrameLayout.AddChidren(logoBG);
-
-            var phoneEmailBGFL = new FrameLayout()
-            {
-                Y = logoBG.Bottom,
-                Height = Application.GetRealHeight(1921),
-                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
-            };
-            midFrameLayout.AddChidren(phoneEmailBGFL);
-
-            var logo = new Button()
-            {
-                Width = Application.GetMinRealAverage(184),
-                Height = Application.GetMinRealAverage(184),
-                Y = Application.GetRealHeight(230),
-                UnSelectedImagePath = "Account/Logo_White.png",
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(logo);
-
-            var logoName = new Button()
-            {
-                Y = logo.Bottom,
-                Height = Application.GetRealHeight(69),
-                Width = Application.GetRealWidth(300),
-                Gravity = Gravity.CenterHorizontal,
-                TextID = R.MyInternationalizationString.AppName,
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                TextSize = 16
-            };
-            midFrameLayout.AddChidren(logoName);
-
-            phoneEmailForm = new PhoneEmailForm();
-            phoneEmailForm.Init(midFrameLayout);
-
-
-            //閿欒鎻愮ずBtn
-            loginErrorBtn = new Button()
-            {
-                X = Application.GetRealWidth(242),
-                Y = Application.GetRealHeight(740),
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(58),
-                TextColor = ZigbeeColor.Current.GXCTextRed,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = CommonFormResouce.TextSize,
-                IsBold = true
-            };
-            midFrameLayout.AddChidren(loginErrorBtn);
-
-            accountPwdFL = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(801),
-                Height = Application.GetRealHeight(553),
-                Width = Application.GetRealWidth(942),
-                Gravity = Gravity.CenterHorizontal,
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                Radius = (uint)Application.GetRealHeight(17)
-            };
-            midFrameLayout.AddChidren(accountPwdFL);
-
-            AddPhoneOrEmailFL(accountPwdFL, "Phone");
-
-            forgotPasswordBtn = new Button()
-            {
-                X = Application.GetRealWidth(CommonPage.AppRealWidth - 115 - 250),
-                Y = Application.GetRealHeight(1198),
-                Width = Application.GetRealWidth(250),
-                Height = Application.GetRealHeight(58),
-                TextID = R.MyInternationalizationString.ForgotPWD_1,
-                TextSize = CommonFormResouce.loginTextSize,
-                TextColor = Shared.Common.ZigbeeColor.Current.GXCTextGrayColor,
-                TextAlignment = TextAlignment.CenterRight
-            };
-            midFrameLayout.AddChidren(forgotPasswordBtn);
-
-            loginBtn = new Button()
-            {
-                Y = Application.GetRealHeight(1293),
-                Width = Application.GetRealWidth(688),
-                Height = Application.GetRealHeight(127),
-                Gravity = Gravity.CenterHorizontal,
-                TextID = R.MyInternationalizationString.Login,
-                TextSize = 16,
-                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
-                SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor,
-                BackgroundColor = ZigbeeColor.Current.GXCButtonUnSelectedColor,
-                Radius = (uint)Application.GetRealHeight(127 / 2),
-                Enable = false,
-                IsBold = true
-            };
-            midFrameLayout.AddChidren(loginBtn);
-
-            loginByCodeBtn = new Button()
-            {
-                X = Application.GetRealWidth(98),
-                Y = Application.GetRealHeight(1466),
-                Width = Application.GetRealWidth(300),
-                Height = Application.GetRealHeight(49),
-                TextID = R.MyInternationalizationString.LoginByCode,
-                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = CommonFormResouce.loginTextSize
-            };
-            midFrameLayout.AddChidren(loginByCodeBtn);
-
-            registerBtn = new Button()
-            {
-                X = Application.GetRealWidth(738),
-                Y = Application.GetRealHeight(1466),
-                Width = Application.GetRealWidth(244),
-                Height = Application.GetRealHeight(49),
-                TextID = R.MyInternationalizationString.Register,
-                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
-                TextAlignment = TextAlignment.CenterRight,
-                TextSize = CommonFormResouce.loginTextSize
-            };
-            midFrameLayout.AddChidren(registerBtn);
-
-            wechatBtn = new Button
-            {
-                X = Application.GetRealWidth(395),
-                Y = Application.GetRealHeight(1737),
-                Width = Application.GetMinRealAverage(115),
-                Height = Application.GetMinRealAverage(115),
-                UnSelectedImagePath = "Account/Wechat.png",
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(wechatBtn);
-
-            qqBtn = new Button
-            {
-                X = Application.GetRealWidth(567),
-                Y = Application.GetRealHeight(1737),
-                Width = Application.GetMinRealAverage(115),
-                Height = Application.GetMinRealAverage(115),
-                UnSelectedImagePath = "Account/QQ.png"
-            };
-            //midFrameLayout.AddChidren(qqBtn);
-
-            //娣诲姞鏈嶅姟鍗忚鎺т欢
-            //this.AddServiceAgreementControl(phoneEmailBGFL);
-
-            #endregion
-
-            BindEvent();
-
-            if (account.Contains("@") == true)
-            {
-                SelectPhoneOrEmail_MouseUpEvent(phoneEmailForm.SelectedEmail, null);
-            }
-        }
-
-        #endregion
-
-        #region 鈼� 缁戝畾浜嬩欢_________________________
-
-        /// <summary>
-        /// 缁戝畾鎸夐挳浜嬩欢
-        /// </summary>
-        private void BindEvent()
-        {
-            //閫夋嫨鎵嬫満閭
-            phoneEmailForm.SelectedPhone.MouseUpEventHandler += SelectPhoneOrEmail_MouseUpEvent;
-            phoneEmailForm.SelectedEmail.MouseUpEventHandler += SelectPhoneOrEmail_MouseUpEvent;
-            //鐧诲綍浜嬩欢
-            loginBtn.MouseUpEventHandler += LoginBtnEvent;
-            //鐭俊鐧诲綍
-            loginByCodeBtn.MouseUpEventHandler += LoginByCode;
-            //娉ㄥ唽浜嬩欢
-            registerBtn.MouseUpEventHandler += Register;
-            //蹇樿瀵嗙爜
-            forgotPasswordBtn.MouseUpEventHandler += ForgetPWD_MouseUpEvent;
-            //wechat
-            wechatBtn.MouseUpEventHandler += LoginByWechat;
-            //qq
-            qqBtn.MouseUpEventHandler += LoginByQQ;
-        }
-
-        #endregion
-
-        #region 鈼� 鐧诲綍____________________________
-
-        /// <summary>
-        /// 鐧诲綍浜嬩欢
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
-        private void LoginBtnEvent(object sender, MouseEventArgs mouseEventArgs)
-        {
-            //妫�娴嬮殣绉佸崗璁�
-            if (this.CheckPrivacyPolicy() == false)
-            {
-                return;
-            }
-            if (phoneEmailForm.SelectedPhone.IsSelected)
-            {
-                Login(phoneRow.AccountET.Text.Trim(), phonePwdRow.PasswrodET.Text.Trim());
-            }
-            else
-            {
-                Login(emailRow.AccountET.Text.Trim(), emailPwdRow.PasswrodET.Text.Trim());
-            }
-
-        }
-
-        /// <summary>
-        /// 鐧诲綍
-        /// </summary>
-        /// <param name="accountStr">Account.</param>
-        /// <param name="passwordStr">Password.</param>
-        private void Login(string accountStr, string passwordStr)
-        {
-            //Application.RunOnMainThread( () =>
-            //{
-            Action action = async () =>
-            {
-                try
-                {
-                    if (CheckAccount(accountStr) == false)
-                    {
-                        return;
-                    }
+namespace Shared.Phone.Login
+{
+    /// <summary>
+    /// 鐧诲綍鐣岄潰
+    /// </summary>
+    public class AccountLogin : FrameLayoutBase
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
 
-                    CommonPage.Loading.Start(Language.StringByID(R.MyInternationalizationString.Logining));
-
-                    var requestObj = new SendDataToServer.LoginObj
-                    {
-                        Account = accountStr,
-                        Password = passwordStr,
-                        Source = CommonPage.Source,
-                        Company = CommonPage.Company
-                    };
-                    var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj);
-                    var revertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/Login", System.Text.Encoding.UTF8.GetBytes(requestJson));
-                    if (revertObj == null)
-                    {
-                        CommonPage.Instance.FailureToServer();
-                        CommonPage.Loading.Hide();
-                        return;
-                    }
-                    var stateCodeStr = revertObj.StateCode.ToUpper();
-                    //Error 涓嶈兘鐩存帴浠庢湇鍔″櫒鍙栵紝鍙兘鏍规嵁鐘舵�佺爜閫愪竴鍒ゆ柇
-                    if (stateCodeStr == "SUCCESS")
-                    {
-                        if (revertObj.ResponseData == null)
-                        {
-                            return;
-                        }
-
-                        HomePage.Instance.ShowLoginLoadView();
-
-                        new System.Threading.Thread(async () =>
-                        {
-                            //瀛樺偍鏁版嵁
-                            var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
-                            var revertData = responseDataObj;
-                            Config.ReFresh();
-                            //鏍囪涓婁竴娆℃槸涓嶆槸鍚屼竴涓处鍙风櫥闄�
-                            UserCenter.UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
-                            Config.Instance.Account = revertData.Account;
-                            Config.Instance.Password = passwordStr;
-                            Config.Instance.MD5PWD = revertData.MD5PWD;
-                            Config.Instance.Guid = revertData.Guid;
-                            Config.Instance.LoginDateTime = DateTime.Now;
-                            Config.Instance.LoginToken = revertData.Token;
-                            Config.Instance.Save();
-
-                            var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
-                            var homes = await House.GetHomeLists();
-                            //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                            await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-                            //鍚姩ZigBee
-                            ZigBee.Common.Application.Init();
-
-                            UserCenter.HdlRoomLogic.Current.InitAllRoom();
-                            Application.RunOnMainThread(() =>
-                            {
-                                CommonPage.Loading.Hide();
-                                this.RemoveFromParent();
-                                CommonPage.Instance.RemoveViewByTag("Login");
-                                UserPage.Instance.Fresh();
-                            });
-                        })
-                        { IsBackground = true }.Start();
-                    }
-                    else if (stateCodeStr == "NOTVERIFY")
-                    {
-                        CommonPage.Loading.Hide();
-                        //鏈縺娲�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.NOTVERIFY;
-                    }
-                    else if (stateCodeStr == "NOTENABLE")
-                    {
-                        CommonPage.Loading.Hide();
-                        //璇ョ敤鎴峰睘浜庤皟璇曡处鍙凤紝骞舵湭鍚敤
-                        loginErrorBtn.TextID = R.MyInternationalizationString.NOTENABLE;
-                    }
-                    else if (stateCodeStr == "USERNAMEORPWDERROR")
-                    {
-                        CommonPage.Loading.Hide();
-                        //璐﹀彿鎴栧瘑鐮侀敊璇�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.USERNAMEORPWDERROR;
-                    }
-                    else if (stateCodeStr == "ACCOUNTNOEXISTS")
-                    {
-                        CommonPage.Loading.Hide();
-                        //璐﹀彿涓嶅瓨鍦�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.ACCOUNTNOEXISTS;
-                    }
-                    else if (stateCodeStr == "YOUDATANOISLOCALREGION")
-                    {
-                        CommonPage.Loading.Hide();
-                        //涓嶅湪鏈尯鍩燂紝闇�瑕侀噸瀹氬悜鍖哄煙鍚庡啀娆¤姹傜櫥褰�
-                        if (revertObj.ResponseData == null)
-                        {
-                            return;
-                        }
-                        var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginLocalRegionRes>(revertObj.ResponseData.ToString());
-                        CommonPage.RequestHttpsHost = responseDataObj.RegionServer;
-                        //鍐嶆鐧诲綍
-                        Login(accountStr, passwordStr);
-                    }
-                    else
-                    {
-                        loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                    }
-                }
-                catch (Exception ex)
-                {
-                    System.Console.WriteLine($"鐧诲綍澶辫触--{ex.Message}");
-                    CommonPage.Loading.Hide();
-                    CommonPage.Instance.FailureToServer();
-                }
-                finally
-                {
-                    //CommonPage.Loading.Hide();
-                }
-                //});
-            };
-            action();
-        }
-
-        /// <summary>
-        /// CheckAccount
-        /// </summary>
-        /// <param name="accountStr"></param>
-        /// <returns></returns>
-        private bool CheckAccount(string accountStr)
-        {
-            if (phoneEmailForm.SelectedEmail.IsSelected)
-            {
-                if (AccountLogic.Instance.CheckEmail(accountStr) == false)
-                {
-                    loginErrorBtn.TextID = R.MyInternationalizationString.TheEmailError;
-                    return false;
-                }
-            }
-            else
-            {
-                if (AccountLogic.Instance.CheckPhone(accountStr) == false)
-                {
-                    loginErrorBtn.TextID = R.MyInternationalizationString.ThePhoneError;
-                    return false;
-                }
-            }
-            return true;
-        }
-
-        /// <summary>
-        /// 閫氳繃楠岃瘉鐮佺櫥褰�
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
-        private void LoginByCode(object sender, MouseEventArgs mouseEventArgs)
-        {
-            //妫�娴嬮殣绉佸崗璁�
-            if (this.CheckPrivacyPolicy() == false)
-            {
-                return;
-            }
-            //this.RemoveFromParent();
-            var loginByCodePage = new AccountLoginByCode();
-            CommonPage.Instance.AddChidren(loginByCodePage);
-            loginByCodePage.Show();
-        }
-
-        /// <summary>
-        /// wechat鐧诲綍
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="mouseEventArgs"></param>
-        private void LoginByWechat(object sender, MouseEventArgs mouseEventArgs)
-        {
-            //妫�娴嬮殣绉佸崗璁�
-            if (this.CheckPrivacyPolicy() == false)
-            {
-                return;
-            }
-#if Android
-            //var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP),
-            //    Language.StringByID(R.MyInternationalizationString.LoginByWechat),
-            //    Language.StringByID(R.MyInternationalizationString.Cancel),
-            //    Language.StringByID(R.MyInternationalizationString.Confrim));
-            //alert.Show();
-            //alert.ResultEventHandler += (send, e) =>
-            //{
-            //if (e)
-            //{
-            com.hdl.home.Application.WXLogin();
-            com.hdl.home.WXEntryActivity.RespAction = (authStr) =>
-            {
-                if (authStr == null)
-                {
-
-                }
-                else
-                {
-                    new System.Threading.Thread(async () =>
-                    {
-                        var re = await isBindAuthAsync(authStr);
-                        if (re)
-                        {
-                            Application.RunOnMainThread(() =>
-                            {
-                                //鐩存帴鐧诲綍
-                                HomePage.Instance.ShowLoginLoadView();
-                            });
-                            var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
-                            var homes = await House.GetHomeLists();
-                            //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                            await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-                            //鍚姩ZigBee
-                            ZigBee.Common.Application.Init();
-                            UserCenter.HdlRoomLogic.Current.InitAllRoom();
-                            Application.RunOnMainThread(() =>
-                            {
-                                this.RemoveFromParent();
-                                CommonPage.Instance.RemoveViewByTag("Login");
-                                UserPage.Instance.Fresh();
-                            });
-                        }
-                        else
-                        {
-                            var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr);
-                            Application.RunOnMainThread(() =>
-                            {
-                                var registerPage = new AccountRegister();
-                                Shared.Common.CommonPage.Instance.AddChidren(registerPage);
-                                registerPage.OpenID = authRes.openid;
-                                registerPage.Show();
-                            });
-                        }
-                    })
-                    { IsBackground = true }.Start();
-                }
-            };
-            //}
-            //};
-#endif
-
-#if iOS
-            Home.IOS.AppDelegate.WXLogin();
-            Home.IOS.AppDelegate.RespAction = (authStr) =>
-            {
-                if (authStr == null)
-                {
-
-                }
-                else
-                {
-                    new System.Threading.Thread(async () =>
-                    {
-
-                        var re = await isBindAuthAsync(authStr);
-                        if (re)
-                        {
-                            //鐩存帴鐧诲綍
-                            //this.RemoveFromParent();
-
-                            //UserPage.Instance.Fresh();
-                            var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
-                            var homes = await House.GetHomeLists();
-                            //鍚姩ZigBee
-                            ZigBee.Common.Application.Init();
-                            //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                            await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-                            UserCenter.HdlRoomLogic.Current.InitAllRoom();
-                            Application.RunOnMainThread(() =>
-                            {
-                                this.RemoveFromParent();
-                                UserPage.Instance.Fresh();
-                            });
-                        }
-                        else
-                        {
-                            var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr);
-                            Application.RunOnMainThread(() =>
-                            {
-                                var registerPage = new AccountRegister();
-                                Shared.Common.CommonPage.Instance.AddChidren(registerPage);
-                                registerPage.OpenID = authRes.openid;
-                                registerPage.Show();
-                            });
-                        }
-                    })
-                    { IsBackground = true }.Start();
-                }
-            };
-#endif
-
-
-
-        }
-
-        /// <summary>
-        /// qq鐧诲綍
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="mouseEventArgs"></param>
-        private void LoginByQQ(object sender, MouseEventArgs mouseEventArgs)
-        {
-
-        }
-
-        /// <summary>
-        /// phone/email 閫夋嫨
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="mouseEventArgs"></param>
-        private void SelectPhoneOrEmail_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
-        {
-            phoneEmailForm.SelectedPhone.IsSelected = phoneEmailForm.SelectedEmail.IsSelected = false;
-            phoneEmailForm.SelectedPhone.IsBold = phoneEmailForm.SelectedEmail.IsBold = false;
-            loginBtn.Enable = loginBtn.IsSelected = false;
-            loginErrorBtn.Text = string.Empty;
-            (sender as Button).IsSelected = (sender as Button).IsBold = true;
-            if ((sender as Button).Tag.ToString() == "Phone")
-            {
-                AddPhoneOrEmailFL(accountPwdFL, "Phone");
-            }
-            else
-            {
-                AddPhoneOrEmailFL(accountPwdFL, "Email");
-            }
-        }
-        /// <summary>
-        /// AddPhoneOrEmailFL
-        /// </summary>
-        /// <param name="accountPwdFrameLayout"></param>
-        /// <param name="phoneOrEmail"></param>
-        private void AddPhoneOrEmailFL(FrameLayout accountPwdFrameLayout, string phoneOrEmail)
-        {
-            if (phoneOrEmail == "Phone")
-            {
-                if (phoneRow != null)
-                {
-                    phoneRow.Visible = true;
-                    phonePwdRow.Visible = true;
-                    if (emailRow != null)
-                    {
-                        emailRow.Visible = false;
-                        emailPwdRow.Visible = false;
-                    }
-                    this.Pwd_TextChange(phonePwdRow);
-                    return;
-                }
-                phoneRow = new PhoneLoginRowForm();
-                phoneRow.Init(accountPwdFrameLayout, this, this.oldInputPhone, 29, 29);
-                phoneRow.AccountET.TextChangeEventHandler += Account_TextChange;
-
-                phonePwdRow = new PwdLoginRowForm();
-                phonePwdRow.Init(accountPwdFrameLayout, 29, 225);
-                phonePwdRow.PasswrodET.TextChangeEventHandler += (sender, e) =>
-                {
-                    this.Pwd_TextChange(phonePwdRow);
-                };
-            }
-            else
-            {
-                if (emailRow != null)
-                {
-                    emailRow.Visible = true;
-                    emailPwdRow.Visible = true;
-                    if (phoneRow != null)
-                    {
-                        phoneRow.Visible = false;
-                        phonePwdRow.Visible = false;
-                    }
-                    this.Pwd_TextChange(emailPwdRow);
-                    return;
-                }
-                emailRow = new EmailLoginRowForm();
-                emailRow.Init(accountPwdFrameLayout, this.oldInputEmail, 29, 29);
-                emailRow.AccountET.TextChangeEventHandler += Account_TextChange;
-
-                emailPwdRow = new PwdLoginRowForm();
-                emailPwdRow.Init(accountPwdFrameLayout, 29, 225);
-                emailPwdRow.PasswrodET.TextChangeEventHandler += (sender, e) =>
-                {
-                    this.Pwd_TextChange(emailPwdRow);
-                };
-            }
-        }
-        #endregion
-
-
-        #region 鈼� 蹇樿瀵嗙爜________________________
-        /// <summary>
-        /// 蹇樿瀵嗙爜
-        /// </summary>
-        private void ForgetPWD_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
-        {
-            //妫�娴嬮殣绉佸崗璁�
-            if (this.CheckPrivacyPolicy() == false)
-            {
-                return;
-            }
-            var forgot = new AccountForgetPWD();
-            CommonPage.Instance.AddChidren(forgot);
-            forgot.Show();
-        }
-
-        #endregion
-
-        #region 鈼� 娉ㄥ唽_____________________________
-
-        /// <summary>
-        /// 娉ㄥ唽
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
-        private void Register(object sender, MouseEventArgs mouseEventArgs)
-        {
-            //妫�娴嬮殣绉佸崗璁�
-            if (this.CheckPrivacyPolicy() == false)
-            {
-                return;
-            }
-            var registerPage = new AccountRegister();
-            CommonPage.Instance.AddChidren(registerPage);
-            registerPage.Show();
-        }
-
-        #endregion
-
-        #region 鈼� 璐﹀彿瀵嗙爜鐩戝惉______________________
-        /// <summary>
-        /// 璐﹀彿鐩戝惉
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
-        private void Account_TextChange(object sender, string mouseEventArgs)
-        {
-            loginErrorBtn.Text = string.Empty;
-        }
-
-        /// <summary>
-        /// 瀵嗙爜鐩戝惉浜嬩欢
-        /// </summary>
-        /// <param name="pwdRow">Sender.</param>
-        private void Pwd_TextChange(PwdLoginRowForm pwdRow)
-        {
-            loginErrorBtn.Text = string.Empty;
-            string pswText = pwdRow.PasswrodET.Text.Trim();
-            if (1 <= pswText.Length && pswText.Length <= 16 && (phoneRow.AccountET.Text.Trim().Length > 0 || emailRow?.AccountET.Text.Trim().Length > 0))
-            {
-                loginBtn.Enable = loginBtn.IsSelected = true;
-            }
-            else if (pswText.Length > 16)
-            {
-                pwdRow.PasswrodET.Text = pswText.Substring(0, 16);
-                if (phoneRow.AccountET.Text.Trim().Length > 0 || emailRow?.AccountET.Text.Trim().Length > 0)
-                {
-                    loginBtn.Enable = loginBtn.IsSelected = true;
-                }
-            }
-            else
-            {
-                loginBtn.Enable = loginBtn.IsSelected = false;
-            }
-        }
-
-
-        #endregion
-
-
-
-
-        #region 鈻� 鍙橀噺澹版槑___________________________
-
         /// <summary>
         /// 閿欒鎻愮ず鎺т欢
-        /// </summary>
-        private NormalViewControl btnErrorMsg = null;
+        /// </summary>
+        private NormalViewControl btnErrorMsg = null;
         /// <summary>
         /// 鏄惁鍚屾剰闅愮鍗忚
-        /// </summary>
-        private bool isAgreePrivacyPolicy = true;
-
-        #endregion
+        /// </summary>
+        private bool isAgreePrivacyPolicy = true;
 
-        #region 鈻� 鍒濆鍖朹____________________________
-
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
         /// <summary>
         /// 鐣岄潰鏄剧ず
         /// </summary>
@@ -860,57 +36,57 @@
             {
                 return;
             }
-            CommonPage.Instance.IsDrawerLockMode = true;
-            this.Tag = "Login";
-
-            //鐣岄潰涓婇儴鐨勯粦鑹插浘鐗�
-            var btnTopBlackPic = new NormalViewControl(this.Width, Application.GetRealHeight(619), false);
-            btnTopBlackPic.UnSelectedImagePath = "Account/Logo_loginBG.png";
-            this.AddChidren(btnTopBlackPic);
-
-            //涓棿娴呯櫧鑹茬殑鑳屾櫙
-            var frameMidBack = new FrameLayout();
-            frameMidBack.Y = btnTopBlackPic.Bottom;
-            frameMidBack.Height = this.Height - btnTopBlackPic.Bottom;
-            frameMidBack.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
-            this.AddChidren(frameMidBack);
-
-            //HdlHome鐨勫浘鏍�
-            var btnLogoIcon = new PicViewControl(184, 184);
-            btnLogoIcon.Y = Application.GetRealHeight(230);
-            btnLogoIcon.UnSelectedImagePath = "Account/Logo_White.png";
+            CommonPage.Instance.IsDrawerLockMode = true;
+            this.Tag = "Login";
+
+            //鐣岄潰涓婇儴鐨勯粦鑹插浘鐗�
+            var btnTopBlackPic = new NormalViewControl(this.Width, Application.GetRealHeight(619), false);
+            btnTopBlackPic.UnSelectedImagePath = "Account/Logo_loginBG.png";
+            this.AddChidren(btnTopBlackPic);
+
+            //涓棿娴呯櫧鑹茬殑鑳屾櫙
+            var frameMidBack = new FrameLayout();
+            frameMidBack.Y = btnTopBlackPic.Bottom;
+            frameMidBack.Height = this.Height - btnTopBlackPic.Bottom;
+            frameMidBack.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
+            this.AddChidren(frameMidBack);
+
+            //HdlHome鐨勫浘鏍�
+            var btnLogoIcon = new PicViewControl(184, 184);
+            btnLogoIcon.Y = Application.GetRealHeight(230);
+            btnLogoIcon.UnSelectedImagePath = "Account/Logo_White.png";
             btnLogoIcon.Gravity = Gravity.CenterHorizontal;
-            this.AddChidren(btnLogoIcon);
-            //Hdl Home
+            this.AddChidren(btnLogoIcon);
+            //Hdl Home
             var btnLogoName = new NormalViewControl(300, 69, true);
             btnLogoName.Y = btnLogoIcon.Bottom;
             btnLogoName.Gravity = Gravity.CenterHorizontal;
             btnLogoName.TextID = R.MyInternationalizationString.AppName;
             btnLogoName.TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
             btnLogoName.TextAlignment = TextAlignment.Center;
-            btnLogoName.TextSize = 16;
+            btnLogoName.TextSize = 16;
             this.AddChidren(btnLogoName);
 
             //1:鎵嬫満鍙�  2锛氶偖绠�
             int selectIndex = account.Contains("@") == false ? 1 : 2;
 
             //鍒濆鍖� 鎵嬫満璐﹀彿鐧婚檰绐楀彛
-            var frameAccLoginPhoneback = this.InitAccoutLoginWindow(frameMidBack, selectIndex == 1 ? account : string.Empty, 1);
+            var frameAccLoginPhoneback = this.InitAccoutLoginWindow(frameMidBack, selectIndex == 1 ? account : string.Empty, 1);
             //鍒濆鍖� 閭璐﹀彿鐧婚檰绐楀彛
             var frameEmailLoginPhoneback = this.InitAccoutLoginWindow(frameMidBack, selectIndex == 1 ? string.Empty : account, 2);
             //鍒濆鍖� 鎵嬫満璐﹀彿楠岃瘉鐮佺櫥闄嗙獥鍙�
-            var frameAccCodeLoginPhoneback = this.InitCodeLoginWindow(frameMidBack, selectIndex == 1 ? account : string.Empty, 1);
+            var frameAccCodeLoginPhoneback = this.InitCodeLoginWindow(frameMidBack, selectIndex == 1 ? account : string.Empty, 1);
             //鍒濆鍖� 閭璐﹀彿楠岃瘉鐮佺櫥闄嗙獥鍙�
-            var frameEmailCodeLoginPhoneback = this.InitCodeLoginWindow(frameMidBack, selectIndex == 1 ? string.Empty : account, 2);
-
-            //瀹氫箟杩欎袱涓笢瑗�,鏄负浜嗗噺灏戝垽鏂殑浠g爜
-            var framePhone = frameAccLoginPhoneback;
-            var frameEmail = frameEmailLoginPhoneback;
-
-            //閭,鎵嬫満鍙风殑鍒囨崲鎺т欢
-            var sitchControl = new Controls.PhoneEmailSelectControl();
-            sitchControl.Y = Application.GetRealHeight(559);
-            this.AddChidren(sitchControl);
+            var frameEmailCodeLoginPhoneback = this.InitCodeLoginWindow(frameMidBack, selectIndex == 1 ? string.Empty : account, 2);
+
+            //瀹氫箟杩欎袱涓笢瑗�,鏄负浜嗗噺灏戝垽鏂殑浠g爜
+            var framePhone = frameAccLoginPhoneback;
+            var frameEmail = frameEmailLoginPhoneback;
+
+            //閭,鎵嬫満鍙风殑鍒囨崲鎺т欢
+            var sitchControl = new Controls.PhoneEmailSelectControl();
+            sitchControl.Y = Application.GetRealHeight(559);
+            this.AddChidren(sitchControl);
             sitchControl.SelectMenuEvent += (selectMenu) =>
             {
                 selectIndex = selectMenu;
@@ -926,26 +102,26 @@
                     framePhone.Visible = false;
                     frameEmail.Visible = true;
                 }
-            };
-            //鎵ц鍒濆鍖�
-            sitchControl.InitControl(ZigbeeColor.Current.GXCButtonSelectedColor, selectIndex);
-
-            //閿欒鎻愮ず鎺т欢
-            this.btnErrorMsg = new NormalViewControl(700, 60, true);
-            btnErrorMsg.Y = frameAccLoginPhoneback.Y - Application.GetRealHeight(60 + 3);
-            btnErrorMsg.X = Application.GetRealWidth(288);
-            btnErrorMsg.TextColor = ZigbeeColor.Current.GXCTextRed;
-            btnErrorMsg.IsBold = true;
+            };
+            //鎵ц鍒濆鍖�
+            sitchControl.InitControl(ZigbeeColor.Current.GXCButtonSelectedColor, selectIndex);
+
+            //閿欒鎻愮ず鎺т欢
+            this.btnErrorMsg = new NormalViewControl(700, 60, true);
+            btnErrorMsg.Y = frameAccLoginPhoneback.Y - Application.GetRealHeight(60 + 3);
+            btnErrorMsg.X = Application.GetRealWidth(288);
+            btnErrorMsg.TextColor = ZigbeeColor.Current.GXCTextRed;
+            btnErrorMsg.IsBold = true;
             frameMidBack.AddChidren(btnErrorMsg);
 
             //楠岃瘉鐮佺櫥闄�
             //1:璐﹀彿鐧婚檰  2:楠岃瘉鐮佺櫥闄�
             int codeDiv = 1;
-            var btnLoginByCode = new NormalViewControl(300, 100, true);
+            var btnLoginByCode = new NormalViewControl(300, 100, true);
             btnLoginByCode.X = Application.GetRealWidth(98);
-            btnLoginByCode.Y = frameAccLoginPhoneback.Bottom + Application.GetRealHeight(21);
-            btnLoginByCode.TextID = R.MyInternationalizationString.LoginByCode;
-            btnLoginByCode.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnLoginByCode.Y = frameAccLoginPhoneback.Bottom + Application.GetRealHeight(21);
+            btnLoginByCode.TextID = R.MyInternationalizationString.LoginByCode;
+            btnLoginByCode.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnLoginByCode.TextSize = 12;
             frameMidBack.AddChidren(btnLoginByCode);
             btnLoginByCode.ButtonClickEvent += (sender, e) =>
@@ -979,12 +155,12 @@
             };
 
             //娉ㄥ唽鐢ㄦ埛
-            var btnRegister = new NormalViewControl(244, 100, true);
-            btnRegister.Y = btnLoginByCode.Y;
-            btnRegister.X = frameMidBack.Width - Application.GetRealWidth(98 + 244);
-            btnRegister.TextID = R.MyInternationalizationString.Register;
-            btnRegister.TextColor = UserCenterColor.Current.TextGrayColor3;
-            btnRegister.TextSize = 12;
+            var btnRegister = new NormalViewControl(300, 100, true);
+            btnRegister.Y = btnLoginByCode.Y;
+            btnRegister.X = frameMidBack.Width - Application.GetRealWidth(98 + 300);
+            btnRegister.TextID = R.MyInternationalizationString.Register;
+            btnRegister.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnRegister.TextSize = 12;
             btnRegister.TextAlignment = TextAlignment.CenterRight;
             frameMidBack.AddChidren(btnRegister);
             btnRegister.ButtonClickEvent += (sender, e) =>
@@ -995,9 +171,9 @@
             };
 
             //寰俊鍥炬爣
-            var btnWebChat = new IconViewControl(115);
-            btnWebChat.Y = frameMidBack.Height - Application.GetRealHeight(69) - btnWebChat.IconSize;
-            btnWebChat.UnSelectedImagePath = "Account/Wechat.png";
+            var btnWebChat = new IconViewControl(115);
+            btnWebChat.Y = frameMidBack.Height - Application.GetRealHeight(69) - btnWebChat.IconSize;
+            btnWebChat.UnSelectedImagePath = "Account/Wechat.png";
             btnWebChat.Gravity = Gravity.CenterHorizontal;
             frameMidBack.AddChidren(btnWebChat);
             btnWebChat.ButtonClickEvent += (sender, e) =>
@@ -1007,19 +183,46 @@
             };
 
             //娣诲姞鏈嶅姟鍗忚鎺т欢
-           // this.AddServiceAgreementControl(frameMidBack);
+            //this.AddServiceAgreementControl(frameMidBack);
+
+            //娓稿浣撻獙
+            var btnTiyan = new NormalViewControl(300, 100, true);
+            btnTiyan.Y = btnLoginByCode.Y;
+            btnTiyan.TextAlignment = TextAlignment.Center;
+            btnTiyan.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnTiyan.TextSize = 12;
+            btnTiyan.Gravity = Gravity.CenterHorizontal;
+            btnTiyan.Text = "娓稿浣撻獙";
+            frameMidBack.AddChidren(btnTiyan);
+            btnTiyan.ButtonClickEvent += (sender, e) =>
+            {
+                btnTiyan.CanClick = false;
+                //鏄剧ず鍚姩椤�
+                HomePage.Instance.ShowLoginLoadView();
+                HdlThreadLogic.Current.RunThread(() =>
+                {
+                    //鍒濆鍖栧叏閮ㄤ綋楠屾暟鎹�
+                    HdlExperienceAccountLogic.Current.InitAllExperienceData();
+                    HdlThreadLogic.Current.RunMain(() =>
+                    {
+                        this.RemoveFromParent();
+                        CommonPage.Instance.RemoveViewByTag("Login");
+                        UserPage.Instance.Fresh();
+                    });
+                });
+            };
         }
 
-        #endregion
+        #endregion
 
-        #region 鈻� 鍒濆鍖栬处鍙风櫥闄嗙獥鍙________________
-
+        #region 鈻� 鍒濆鍖栬处鍙风櫥闄嗙獥鍙________________
+
         /// <summary>
         /// 鍒濆鍖栬处鍙风櫥闄嗙獥鍙�
         /// </summary>
         /// <param name="frameMidBack">涓棿娴呰壊鐨勮儗鏅鍣�</param>
         /// <param name="i_account">鐧婚檰璐﹀彿</param>
-        /// <param name="i_div">1:鎵嬫満鍙� 2:閭</param>
+        /// <param name="i_div">1:鎵嬫満鍙� 2:閭</param>
         private FrameLayout InitAccoutLoginWindow(FrameLayout frameMidBack, string i_account, int i_div)
         {
             //鐧婚檰鎸夐挳
@@ -1077,10 +280,7 @@
             txtAccount.TextChangeEventHandler += (sender, e) =>
             {
                 //闅愯棌閿欒鎻愮ず
-                if (this.btnErrorMsg.Visible == true)
-                {
-                    this.btnErrorMsg.Visible = false;
-                }
+                this.btnErrorMsg.Text = string.Empty;
                 if (txtAccount.Text.Trim().Length > 0 && txtPsw.Text.Length > 0)
                 {
                     //鑳藉鐧婚檰
@@ -1139,9 +339,9 @@
             //闅愯棌鎴栬�呮樉绀哄瘑鐮佺殑鍥炬爣
             var btnHiden = new IconViewControl(92);
             btnHiden.X = rowPassword.Width - Application.GetRealWidth(46) - btnHiden.IconSize;
-            btnHiden.SelectedImagePath = "Account/UnhidePwd.png";
+            btnHiden.SelectedImagePath = "Account/UnhidePwd.png";
             btnHiden.UnSelectedImagePath = "Account/HidePwd.png";
-            btnHiden.Gravity = Gravity.CenterVertical;
+            btnHiden.Gravity = Gravity.CenterVertical;
             rowPassword.AddChidren(btnHiden);
             btnHiden.ButtonClickEvent += (sender, e) =>
             {
@@ -1170,13 +370,13 @@
             };
 
             //蹇樿瀵嗙爜?
-            var btnForgot = new NormalViewControl(250, 90, true);
-            btnForgot.Y = rowPassword.Bottom + Application.GetRealHeight(15);
-            btnForgot.X = frameWhiteBack.Width - Application.GetRealWidth(250 + 35);
-            btnForgot.TextSize = 12;
-            btnForgot.TextColor = UserCenterColor.Current.TextGrayColor3;
-            btnForgot.TextAlignment = TextAlignment.CenterRight;
-            btnForgot.TextID = R.MyInternationalizationString.ForgotPWD_1;
+            var btnForgot = new NormalViewControl(250, 90, true);
+            btnForgot.Y = rowPassword.Bottom + Application.GetRealHeight(15);
+            btnForgot.X = frameWhiteBack.Width - Application.GetRealWidth(250 + 35);
+            btnForgot.TextSize = 12;
+            btnForgot.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnForgot.TextAlignment = TextAlignment.CenterRight;
+            btnForgot.TextID = R.MyInternationalizationString.ForgotPWD_1;
             frameWhiteBack.AddChidren(btnForgot);
             btnForgot.ButtonClickEvent += (sender, e) =>
             {
@@ -1201,7 +401,7 @@
             return frameBack;
         }
 
-        #endregion
+        #endregion
 
         #region 鈻� 鍒濆鍖栭獙璇佺爜鐧婚檰绐楀彛_______________
 
@@ -1210,7 +410,7 @@
         /// </summary>
         /// <param name="frameMidBack">涓棿娴呰壊鐨勮儗鏅鍣�</param>
         /// <param name="i_account">鐧婚檰璐﹀彿</param>
-        /// <param name="i_div">1:鎵嬫満鍙� 2:閭</param>
+        /// <param name="i_div">1:鎵嬫満鍙� 2:閭</param>
         private FrameLayout InitCodeLoginWindow(FrameLayout frameMidBack, string i_account, int i_div)
         {
             //鐧婚檰鎸夐挳
@@ -1286,12 +486,9 @@
             txtAccount.TextChangeEventHandler += (sender, e) =>
             {
                 //闅愯棌閿欒鎻愮ず
-                if (this.btnErrorMsg.Visible == true)
-                {
-                    this.btnErrorMsg.Visible = false;
-                }
+                this.btnErrorMsg.Text = string.Empty;
                 //蹇呴』瑕佸彂閫佹垚鍔熸墠琛�
-                if (hadSendCode = true && txtAccount.Text.Trim().Length > 0 && txtVerCode.Text.Length > 0)
+                if (hadSendCode == true && txtAccount.Text.Trim().Length > 0 && txtVerCode.Text.Length > 0)
                 {
                     //鑳藉鐧婚檰
                     if (btnLogin.CanClick == false) { btnLogin.CanClick = true; }
@@ -1339,25 +536,24 @@
             txtVerCode.Gravity = Gravity.CenterVertical;
             txtVerCode.PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputVerificationCode);
             txtVerCode.PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor;
-            txtVerCode.SecureTextEntry = true;
             rowVerCode.AddChidren(txtVerCode);
             txtVerCode.TextChangeEventHandler += (sender, e) =>
             {
                 txtAccount.TextChangeEventHandler(sender, e);
             };
             //绔栫嚎
-            var btnLine2 = new NormalViewControl(1, Application.GetRealHeight(66), false);
+            var btnLine2 = new NormalViewControl(1, Application.GetRealHeight(66), false);
             btnLine2.X = Application.GetRealWidth(611);
             btnLine2.Gravity = Gravity.CenterVertical;
             btnLine2.BackgroundColor = ZigbeeColor.Current.GXCLineColor;
             rowVerCode.AddChidren(btnLine2);
             //鑾峰彇楠岃瘉鐮�
-            var btnSendCode = new NormalViewControl(250, 70, true);
-            btnSendCode.X = btnLine2.Right + Application.GetRealWidth(36);
-            btnSendCode.Gravity = Gravity.CenterVertical;
+            var btnSendCode = new NormalViewControl(250, 70, true);
+            btnSendCode.X = btnLine2.Right + Application.GetRealWidth(36);
+            btnSendCode.Gravity = Gravity.CenterVertical;
             btnSendCode.TextID = R.MyInternationalizationString.SendVerificationCode;
             btnSendCode.TextColor = UserCenterColor.Current.TextGrayColor3;
-            btnSendCode.TextAlignment = TextAlignment.Center;
+            btnSendCode.TextAlignment = TextAlignment.Center;
             btnSendCode.IsBold = true;
             rowVerCode.AddChidren(btnSendCode);
             btnSendCode.ButtonClickEvent += async (sender, e) =>
@@ -1393,13 +589,13 @@
             };
 
             //蹇樿瀵嗙爜?
-            var btnForgot = new NormalViewControl(250, 90, true);
-            btnForgot.Y = rowVerCode.Bottom + Application.GetRealHeight(15);
-            btnForgot.X = frameWhiteBack.Width - Application.GetRealWidth(250 + 35);
-            btnForgot.TextSize = 12;
-            btnForgot.TextColor = UserCenterColor.Current.TextGrayColor3;
-            btnForgot.TextAlignment = TextAlignment.CenterRight;
-            btnForgot.TextID = R.MyInternationalizationString.ForgotPWD_1;
+            var btnForgot = new NormalViewControl(250, 90, true);
+            btnForgot.Y = rowVerCode.Bottom + Application.GetRealHeight(15);
+            btnForgot.X = frameWhiteBack.Width - Application.GetRealWidth(250 + 35);
+            btnForgot.TextSize = 12;
+            btnForgot.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnForgot.TextAlignment = TextAlignment.CenterRight;
+            btnForgot.TextID = R.MyInternationalizationString.ForgotPWD_1;
             frameWhiteBack.AddChidren(btnForgot);
             btnForgot.ButtonClickEvent += (sender, e) =>
             {
@@ -1423,7 +619,7 @@
             return frameBack;
         }
 
-        #endregion
+        #endregion
 
         #region 鈻� 鏈嶅姟鍗忚___________________________
 
@@ -1434,7 +630,7 @@
         private void AddServiceAgreementControl(FrameLayout frameBack)
         {
             var frameRow = new FrameLayout();
-            frameRow.Height = Application.GetMinRealAverage(110);
+            frameRow.Height = this.GetPictrueRealSize(110);
             frameRow.Y = Application.GetRealHeight(959);
             frameRow.Gravity = Gravity.CenterHorizontal;
 
@@ -1512,7 +708,7 @@
             btnIcon.SelectedImagePath = "Item/Check1Selected.png";
 
             //璁$畻琛屾帶浠剁殑瀹藉害
-            frameRow.Width = fontWidth + Application.GetMinRealAverage(42) + Application.GetRealWidth(23) - speceilValue * 3;
+            frameRow.Width = fontWidth + this.GetPictrueRealSize(42) + Application.GetRealWidth(23) - speceilValue * 3;
             frameBack.AddChidren(frameRow);
 
             //鍥炬爣鎺т欢鍒濆鍖�
@@ -1541,14 +737,14 @@
 
         #endregion
 
-        #region 鈻� 璐﹀彿瀵嗙爜鐧婚檰_______________________
+        #region 鈻� 璐﹀彿瀵嗙爜鐧婚檰_______________________
 
         /// <summary>
         /// 璐﹀彿瀵嗙爜鐧婚檰
         /// </summary>
         /// <param name="i_account">璐﹀彿</param>
-        /// <param name="i_psw">瀵嗙爜</param>
-        /// <param name="i_div">1:鎵嬫満鍙� 2:閭</param>
+        /// <param name="i_psw">瀵嗙爜</param>
+        /// <param name="i_div">1:鎵嬫満鍙� 2:閭</param>
         private void LoginByAccountAndPsw(string i_account, string i_psw, int i_div)
         {
             //妫�娴嬭处鍙�
@@ -1578,59 +774,59 @@
             });
         }
 
-        /// <summary>
-        /// 妫�娴嬭緭鍏ョ殑璐﹀彿
-        /// </summary>
-        /// <param name="i_areaCode">鍦板尯鐮�</param>
-        /// <param name="i_account">璐﹀彿</param>
-        /// <param name="i_div">1:鎵嬫満鍙� 2:閭</param>
-        /// <returns></returns>
-        private bool CheckInputAccount(string i_areaCode, string i_account, int i_div)
-        {
+        /// <summary>
+        /// 妫�娴嬭緭鍏ョ殑璐﹀彿
+        /// </summary>
+        /// <param name="i_areaCode">鍦板尯鐮�</param>
+        /// <param name="i_account">璐﹀彿</param>
+        /// <param name="i_div">1:鎵嬫満鍙� 2:閭</param>
+        /// <returns></returns>
+        private bool CheckInputAccount(string i_areaCode, string i_account, int i_div)
+        {
             if (i_div == 1)
             {
                 //妫�娴嬫墜鏈�
-                if (i_areaCode != string.Empty && AccountLogic.Instance.CheckPhoneWithZone(i_account, i_areaCode) == false)
-                {
-                    btnErrorMsg.TextID = R.MyInternationalizationString.ThePhoneError;
-                    return false;
+                if (i_areaCode != string.Empty && AccountLogic.Instance.CheckPhoneWithZone(i_account, i_areaCode) == false)
+                {
+                    btnErrorMsg.TextID = R.MyInternationalizationString.ThePhoneError;
+                    return false;
                 }
                 //妫�娴嬫墜鏈�
-                if (i_areaCode == string.Empty && AccountLogic.Instance.CheckPhone(i_account) == false)
-                {
-                    btnErrorMsg.TextID = R.MyInternationalizationString.ThePhoneError;
-                    return false;
+                if (i_areaCode == string.Empty && AccountLogic.Instance.CheckPhone(i_account) == false)
+                {
+                    btnErrorMsg.TextID = R.MyInternationalizationString.ThePhoneError;
+                    return false;
                 }
-            }
-            else
+            }
+            else
             {
                 //妫�娴嬮偖绠�
-                if (AccountLogic.Instance.CheckEmail(i_account) == false)
-                {
-                    btnErrorMsg.TextID = R.MyInternationalizationString.TheEmailError;
-                    return false;
+                if (AccountLogic.Instance.CheckEmail(i_account) == false)
+                {
+                    btnErrorMsg.TextID = R.MyInternationalizationString.TheEmailError;
+                    return false;
                 }
-            }
-            return true;
+            }
+            return true;
         }
 
-        #endregion
+        #endregion
 
-        #region 鈻� 寰俊鐧婚檰___________________________
+        #region 鈻� 寰俊鐧婚檰___________________________
 
-        /// <summary>
-        /// 寰俊鐧诲綍
-        /// </summary>
-        private void LoginByWechat()
+        /// <summary>
+        /// 寰俊鐧诲綍
+        /// </summary>
+        private void LoginByWechat()
         {
 #if Android
             com.hdl.home.Application.WXLogin();
             com.hdl.home.WXEntryActivity.RespAction = (authStr) =>
             {
 #endif
-#if iOS
+#if iOS
             Home.IOS.AppDelegate.WXLogin();
-            Home.IOS.AppDelegate.RespAction = (authStr) =>
+            Home.IOS.AppDelegate.RespAction = (authStr) =>
             {
 #endif
                 if (authStr == null)
@@ -1677,19 +873,19 @@
             };
         }
 
-        /// <summary>
-        /// 鏄惁宸茬粦瀹�
-        /// </summary>
-        /// <param name="authStr"></param>
-        /// <returns></returns>
-        private async System.Threading.Tasks.Task<bool> isBindAuthAsync(string authStr)
-        {
-            var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr);
-            var auth = new SendDataToServer.AuthUser()
-            {
-                AccessToken = authRes.access_token,
-                RefreshToken = authRes.refresh_token,
-                OpenID = authRes.openid
+        /// <summary>
+        /// 鏄惁宸茬粦瀹�
+        /// </summary>
+        /// <param name="authStr"></param>
+        /// <returns></returns>
+        private async System.Threading.Tasks.Task<bool> isBindAuthAsync(string authStr)
+        {
+            var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr);
+            var auth = new SendDataToServer.AuthUser()
+            {
+                AccessToken = authRes.access_token,
+                RefreshToken = authRes.refresh_token,
+                OpenID = authRes.openid
             };
             //鑾峰彇寰俊鏄电О
             var strUrl = "https://api.weixin.qq.com/sns/userinfo?access_token=" + authRes.access_token;
@@ -1701,44 +897,44 @@
             }
             var receipData = System.Text.Encoding.UTF8.GetString(byteData);
             var nickData = Newtonsoft.Json.JsonConvert.DeserializeObject<UserCenter.NicknameInfo>(receipData);
-            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));
-            if (revertObj == null)
-            {
-                return false;
-            }
-            var stateCodeStr = revertObj.StateCode.ToUpper();
-            if (stateCodeStr == "SUCCESS")
-            {
-                var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
+            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));
+            if (revertObj == null)
+            {
+                return false;
+            }
+            var stateCodeStr = revertObj.StateCode.ToUpper();
+            if (stateCodeStr == "SUCCESS")
+            {
+                var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
                 var revertData = responseDataObj;
                 //鏍囪涓婁竴娆℃槸涓嶆槸鍚屼竴涓处鍙风櫥闄�
-                UserCenter.UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
-                Config.Instance.Account = revertData.Account;
-                Config.Instance.MD5PWD = revertData.MD5PWD;
-                Config.Instance.Guid = revertData.Guid;
-                Config.Instance.LoginDateTime = DateTime.Now;
-                Config.Instance.Save();
-                return true;
-            }
-            else
-            {
-                return false;
-            }
+                UserCenter.UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
+                Config.Instance.Account = revertData.Account;
+                Config.Instance.MD5PWD = revertData.MD5PWD;
+                Config.Instance.Guid = revertData.Guid;
+                Config.Instance.LoginDateTime = DateTime.Now;
+                Config.Instance.Save();
+                return true;
+            }
+            else
+            {
+                return false;
+            }
         }
 
-        #endregion
+        #endregion
 
-        #region 鈻� 楠岃瘉鐮佺櫥闄哶________________________
+        #region 鈻� 楠岃瘉鐮佺櫥闄哶________________________
 
         /// <summary>
         /// 楠岃瘉鐮佺櫥闄�
         /// </summary>
         /// <param name="i_account">璐﹀彿</param>
-        /// <param name="i_verCode">楠岃瘉鐮�</param>
-        /// <param name="i_div">1:鎵嬫満鍙� 2:閭</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)
         {
             var pra = new SendDataToServer.LoginValidCodeOBJ()
@@ -1751,15 +947,15 @@
             var result = await CommonFormResouce.LoginByCode(pra);
             //澶勭悊鐧婚檰鎴愬姛鐨勬暟鎹�
             this.AdjustLoginSuccessData(result, pra, i_account, string.Empty, i_div);
-        }
-
+        }
+
         /// <summary>
         /// 鍙戦�侀獙璇佺爜
         /// </summary>
         /// <param name="btnSendCode">鍙戦�佹寜閽�</param>
         /// <param name="account">璐﹀彿</param>
         /// <param name="i_div">1:鎵嬫満鍙� 2:閭</param>
-        /// <returns></returns>
+        /// <returns></returns>
         private async System.Threading.Tasks.Task<bool> SendVerCode(NormalViewControl btnSendCode, string account, int i_div)
         {
             //涓嶈兘鍐嶇偣鍑�
@@ -1831,12 +1027,12 @@
             });
 
             return false;
-        }
-
+        }
+
         /// <summary>
         /// 寮�鍚彂閫侀獙璇佺爜鐨勫�掕鏃�
         /// </summary>
-        /// <param name="btnSendCode"></param>
+        /// <param name="btnSendCode"></param>
         private void StartSendVerCodeTimeOutThread(NormalViewControl btnSendCode)
         {
             HdlThreadLogic.Current.RunThread(() =>
@@ -1851,16 +1047,21 @@
                         btnSendCode.Text = time + "s" + strText;
                     });
                     time--;
+                    System.Threading.Thread.Sleep(1000);
                 }
                 //鍊掕鏃跺畬鎴愪箣鍚�,鍙互鍐嶆鐐瑰嚮
                 btnSendCode.CanClick = true;
-                btnSendCode.TextID = R.MyInternationalizationString.SendVerificationCode;//鑾峰彇楠岃瘉鐮�
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    //鑾峰彇楠岃瘉鐮�
+                    btnSendCode.Text = Language.StringByID(R.MyInternationalizationString.SendVerificationCode);
+                });
             });
         }
 
-        #endregion
+        #endregion
 
-        #region 鈻� 澶勭悊鐧婚檰鎴愬姛鐨勬暟鎹甠________________
+        #region 鈻� 澶勭悊鐧婚檰鎴愬姛鐨勬暟鎹甠________________
 
         /// <summary>
         /// 澶勭悊鐧婚檰鎴愬姛鐨勬暟鎹�
@@ -1868,8 +1069,8 @@
         /// <param name="revertObj">浜戠杩斿洖鐨勬暟鎹�</param>
         /// <param name="pra">鎺ュ彛璇锋眰鍙傛暟</param>
         /// <param name="i_account">璐﹀彿</param>
-        /// <param name="i_psw">瀵嗙爜锛岄獙璇佺爜鐧婚檰鏃�,璁剧疆涓� string.Empty</param>
-        /// <param name="i_div">1:鎵嬫満鍙� 2:閭</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,
             string i_account, string i_psw, int i_div)
         {
@@ -1936,15 +1137,15 @@
                     //璇ョ敤鎴峰睘浜庤皟璇曡处鍙凤紝骞舵湭鍚敤
                     btnErrorMsg.TextID = R.MyInternationalizationString.NOTENABLE;
                 }
-                else if (stateCodeStr == "PARAMETEROREMPTY")
-                {
-                    //鎻愪緵鐨勫弬鏁伴敊璇�
-                    btnErrorMsg.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
+                else if (stateCodeStr == "PARAMETEROREMPTY")
+                {
+                    //鎻愪緵鐨勫弬鏁伴敊璇�
+                    btnErrorMsg.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
                 }
-                else if (stateCodeStr == "VALIDCODEANDPHONENOEQUAL")
-                {
-                    //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
-                    btnErrorMsg.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL;
+                else if (stateCodeStr == "VALIDCODEANDPHONENOEQUAL")
+                {
+                    //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
+                    btnErrorMsg.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL;
                 }
                 else if (stateCodeStr == "USERNAMEORPWDERROR")
                 {
@@ -1956,10 +1157,10 @@
                     //璐﹀彿涓嶅瓨鍦�
                     btnErrorMsg.TextID = R.MyInternationalizationString.ACCOUNTNOEXISTS;
                 }
-                else if (stateCodeStr == "NORECORD" && i_psw == string.Empty)
-                {
-                    //璇峰厛鑾峰彇楠岃瘉鐮�
-                    btnErrorMsg.TextID = R.MyInternationalizationString.NORECORD;
+                else if (stateCodeStr == "NORECORD" && i_psw == string.Empty)
+                {
+                    //璇峰厛鑾峰彇楠岃瘉鐮�
+                    btnErrorMsg.TextID = R.MyInternationalizationString.NORECORD;
                 }
                 else if (stateCodeStr == "YOUDATANOISLOCALREGION")
                 {
@@ -1989,14 +1190,14 @@
             });
         }
 
-        #endregion
+        #endregion
 
-        #region 鈻� 涓�鑸柟娉昣__________________________
-
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
         /// <summary>
         /// 妫�娴嬮殣绉佸崗璁�
         /// </summary>
-        /// <returns></returns>
+        /// <returns></returns>
         private bool CheckPrivacyPolicy()
         {
             if (isAgreePrivacyPolicy == false)
@@ -2007,8 +1208,8 @@
                 return false;
             }
             return true;
-        }
-
-        #endregion
-    }
-}
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Login/AccountLoginByCode.cs b/ZigbeeApp/Shared/Phone/Login/AccountLoginByCode.cs
deleted file mode 100755
index db2e075..0000000
--- a/ZigbeeApp/Shared/Phone/Login/AccountLoginByCode.cs
+++ /dev/null
@@ -1,884 +0,0 @@
-锘縰sing System;
-using Shared.Common;
-using System.Text.RegularExpressions;
-using System.Collections.Generic;
-using System.Timers;
-using Shared.Phone.UserView;
-using Shared.Phone.Device.CommonForm;
-
-namespace Shared.Phone.Login
-{
-    /// <summary>
-    /// 楠岃瘉鐮佺櫥褰�
-    /// </summary>
-    public class AccountLoginByCode : FrameLayout
-    {
-
-        #region 鈼� 鍙橀噺____________________________
-        /// <summary>
-        /// 鑳屾櫙瑙嗗浘
-        /// </summary>
-        private FrameLayout midFrameLayout;
-        /// <summary>
-        /// 鎵嬫満閭
-        /// </summary>
-        private PhoneEmailForm phoneEmailForm;
-        /// <summary>
-        /// phoneRowForm
-        /// </summary>
-        private PhoneRowForm phoneRow;
-        /// <summary>
-        /// emailRow
-        /// </summary>
-        private EmailRowForm emailRow;
-        /// <summary>
-        /// codeRow
-        /// </summary>
-        private VerificationCodeRowForm codeRow;
-        /// <summary>
-        /// 璐﹀彿楠岃瘉鐮乫l
-        /// </summary>
-        private FrameLayout accountCodeFL;
-        /// <summary>
-        /// 鐧诲綍鎸夐挳
-        /// </summary>
-        private Button loginBtn;
-        /// <summary>
-        /// 蹇樿瀵嗙爜鎸夐挳
-        /// </summary>
-        private Button forgotPasswordBtn;
-        /// <summary>
-        /// 娉ㄥ唽
-        /// </summary>
-        private Button registerBtn;
-        /// <summary>
-        /// 璐﹀彿鐧诲綍
-        /// </summary>
-        private Button LoginByAccountPWDBtn;
-        /// <summary>
-        /// 鐧诲綍閿欒鎻愮ず鎸夐挳
-        /// </summary>
-        private Button loginErrorBtn;
-        /// <summary>
-        /// 璐﹀彿
-        /// </summary>
-        private string account;
-        /// <summary>
-        /// 楠岃瘉鐮�
-        /// </summary>
-        private string code;
-        /// <summary>
-        /// wechat
-        /// </summary>
-        private Button wechatBtn;
-
-        private Timer t;
-        private DateTime dateBegin;
-
-        #endregion
-
-
-        /// <summary>
-        /// The phone string.
-        /// </summary>
-        //public string phoneStr = "";
-        /// <summary>
-        /// 鎵嬫満鍙疯緭鍏ユ槸鍚︾鍚堣鍒�
-        /// </summary>
-        public bool IsRightAccount = false;
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:Shared.Phone.Device.Account.AccountLoginByCode"/> class.
-        /// </summary>
-        public AccountLoginByCode()
-        {
-            CommonPage.Instance.IsDrawerLockMode = true;
-            Tag = "Login";
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
-            t = new Timer();
-            dateBegin = new DateTime();
-        }
-        public override void RemoveFromParent()
-        {
-            base.RemoveFromParent();
-        }
-        /// <summary>
-        /// Show this instance.
-        /// </summary>
-        public void Show()
-        {
-            ShowLoginByCodeView();
-        }
-        /// <summary>
-        /// Shows the login by code view.
-        /// </summary>
-        public void ShowLoginByCodeView()
-        {
-            #region midFrameLayout
-            midFrameLayout = new FrameLayout()
-            {
-                Width = LayoutParams.MatchParent,
-                Height = Application.GetRealHeight(CommonPage.AppRealHeight),
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
-            };
-            AddChidren(midFrameLayout);
-            #endregion
-
-            var logoBG = new Button()
-            {
-                Height = Application.GetRealHeight(619),
-                UnSelectedImagePath = "Account/Logo_loginBG.png"
-            };
-            midFrameLayout.AddChidren(logoBG);
-
-            var phoneEmailBGFL = new FrameLayout()
-            {
-                Y = logoBG.Bottom,
-                Height = Application.GetRealHeight(1921),
-                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
-            };
-            midFrameLayout.AddChidren(phoneEmailBGFL);
-
-            var logo = new Button()
-            {
-                Width = Application.GetMinRealAverage(184),
-                Height = Application.GetMinRealAverage(184),
-                Y = Application.GetRealHeight(230),
-                UnSelectedImagePath = "Account/Logo_White.png",
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(logo);
-
-            var logoName = new Button()
-            {
-                Y = logo.Bottom,
-                Height = Application.GetRealHeight(69),
-                Width = Application.GetRealWidth(300),
-                Gravity = Gravity.CenterHorizontal,
-                TextID = R.MyInternationalizationString.AppName,
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                TextSize = 16
-            };
-            midFrameLayout.AddChidren(logoName);
-
-            phoneEmailForm = new PhoneEmailForm();
-            phoneEmailForm.Init(midFrameLayout);
-
-            //閿欒鎻愮ずBtn
-            loginErrorBtn = new Button()
-            {
-                X = Application.GetRealWidth(242),
-                Y = Application.GetRealHeight(740),
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(58),
-                TextColor = ZigbeeColor.Current.GXCTextRed,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = CommonFormResouce.TextSize,
-                IsBold = true
-            };
-            midFrameLayout.AddChidren(loginErrorBtn);
-
-            accountCodeFL = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(801),
-                Height = Application.GetRealHeight(553),
-                Width = Application.GetRealWidth(942),
-                Gravity = Gravity.CenterHorizontal,
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                Radius = (uint)Application.GetRealHeight(17)
-            };
-            midFrameLayout.AddChidren(accountCodeFL);
-
-            AddPhoneOrEmailFL(accountCodeFL, "Phone");
-
-            forgotPasswordBtn = new Button()
-            {
-                X = Application.GetRealWidth(CommonPage.AppRealWidth - 115 - 250),
-                Y = Application.GetRealHeight(1198),
-                Width = Application.GetRealWidth(250),
-                Height = Application.GetRealHeight(58),
-                TextID = R.MyInternationalizationString.ForgotPWD_1,
-                TextSize = CommonFormResouce.loginTextSize,
-                TextColor = Shared.Common.ZigbeeColor.Current.GXCTextGrayColor,
-                TextAlignment = TextAlignment.CenterRight
-            };
-            midFrameLayout.AddChidren(forgotPasswordBtn);
-
-            loginBtn = new Button()
-            {
-                Y = Application.GetRealHeight(1281),
-                Width = Application.GetRealWidth(688),
-                Height = Application.GetRealHeight(127),
-                Gravity = Gravity.CenterHorizontal,
-                TextID = R.MyInternationalizationString.Login,
-                TextSize = 16,
-                IsBold=true,
-                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
-                SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor,
-                BackgroundColor = ZigbeeColor.Current.GXCButtonUnSelectedColor,
-                Radius = (uint)Application.GetRealHeight(127 / 2),
-                Enable = !string.IsNullOrEmpty(codeRow.VerificationCodeET?.Text),
-                IsSelected = !string.IsNullOrEmpty(codeRow.VerificationCodeET?.Text)
-            };
-            midFrameLayout.AddChidren(loginBtn);
-
-            LoginByAccountPWDBtn = new Button()
-            {
-                X = Application.GetRealWidth(98),
-                Y = Application.GetRealHeight(1466),
-                Width = Application.GetRealWidth(300),
-                Height = Application.GetRealHeight(49),
-                TextID = R.MyInternationalizationString.LoginByAccountPWD,
-                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = CommonFormResouce.loginTextSize
-            };
-            midFrameLayout.AddChidren(LoginByAccountPWDBtn);
-
-            registerBtn = new Button()
-            {
-                X = Application.GetRealWidth(738),
-                Y = Application.GetRealHeight(1466),
-                Width = Application.GetRealWidth(244),
-                Height = Application.GetRealHeight(49),
-                TextID = R.MyInternationalizationString.Register,
-                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
-                TextAlignment = TextAlignment.CenterRight,
-                TextSize = CommonFormResouce.loginTextSize
-            };
-            midFrameLayout.AddChidren(registerBtn);
-
-            wechatBtn = new Button
-            {
-                X = Application.GetRealWidth(395),
-                Y = Application.GetRealHeight(1737),
-                Width = Application.GetMinRealAverage(115),
-                Height = Application.GetMinRealAverage(115),
-                UnSelectedImagePath = "Account/Wechat.png",
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(wechatBtn);
-
-            BindEvent();
-        }
-
-        #region 鈼� 缁戝畾浜嬩欢_________________________
-
-        /// <summary>
-        /// 缁戝畾鎸夐挳浜嬩欢
-        /// </summary>
-        private void BindEvent()
-        {
-            //閫夋嫨鎵嬫満閭
-            phoneEmailForm.SelectedPhone.MouseUpEventHandler += SelectPhoneOrEmail_MouseUpEvent;
-            phoneEmailForm.SelectedEmail.MouseUpEventHandler += SelectPhoneOrEmail_MouseUpEvent;
-            //鐧诲綍浜嬩欢
-            loginBtn.MouseUpEventHandler += LoginBtnEvent;
-            //璐﹀彿鐧诲綍
-            LoginByAccountPWDBtn.MouseUpEventHandler += LoginByPWD;
-            //娉ㄥ唽浜嬩欢
-            registerBtn.MouseUpEventHandler += Register;
-            //蹇樿瀵嗙爜
-            forgotPasswordBtn.MouseUpEventHandler += ForgetPWD_MouseUpEvent;
-            //wechat
-            wechatBtn.MouseUpEventHandler += LoginByWechat;
-
-        }
-
-        #endregion
-
-
-        #region 鈼� 鐧诲綍____________________________
-
-        /// <summary>
-        /// 鐧诲綍浜嬩欢
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
-        private async void LoginBtnEvent(object sender, MouseEventArgs mouseEventArgs)
-        {
-            CommonPage.Loading.Start();
-            try
-            {
-                if (CheckAccount(account) == false)
-                {
-                    return;
-                }
-                var reqLoginByCode = new SendDataToServer.LoginValidCodeOBJ()
-                {
-                    Account = account,
-                    Code = code,
-                    Language = CommonPage.ZigBeeLanguage,
-                    AreaCode = int.Parse(CommonPage.PhoneZoneStr)
-                };
-                var requestRevetLoginCodeOBJ = await CommonFormResouce.LoginByCode(reqLoginByCode);
-                if (requestRevetLoginCodeOBJ == null)
-                {
-                    CommonPage.Instance.FailureToServer();
-                    return;
-                }
-                var stateCodeStr = requestRevetLoginCodeOBJ.StateCode.ToUpper();
-                if (stateCodeStr == "SUCCESS")
-                {
-                    if (requestRevetLoginCodeOBJ.ResponseData == null)
-                    {
-                        return;
-                    }
-
-                    HomePage.Instance.ShowLoginLoadView();
-                    new System.Threading.Thread(async () =>
-                    {
-                        var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(requestRevetLoginCodeOBJ.ResponseData.ToString());
-                        var revertData = responseDataObj;
-                        Config.ReFresh();
-                        //鏍囪涓婁竴娆℃槸涓嶆槸鍚屼竴涓处鍙风櫥闄�
-                        UserCenter.UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
-                        Config.Instance.Password = string.Empty;
-                        Config.Instance.Account = revertData.Account;
-                        Config.Instance.Guid = revertData.Guid;
-                        Config.Instance.MD5PWD = revertData.MD5PWD;
-                        Config.Instance.LoginDateTime = DateTime.Now;
-                        Config.Instance.LoginToken = revertData.Token;
-                        //闇�瑕佹妸鐧诲綍鍚庤繑鍥炵殑md5瀵嗙爜 璧嬪�肩敓鎴怲oken  鍥犱负鐢ㄦ埛娌℃湁杈撳叆瀵嗙爜
-                        Config.Instance.MD5PWD = revertData.MD5PWD;
-                        Config.Instance.Save();
-                        var resultRegID = await CommonPage.Instance.PushRegID();
-                        var homes = await House.GetHomeLists();
-    
-                        //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                        await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-                        //鍚姩ZigBee
-                        ZigBee.Common.Application.Init();
-
-                        UserCenter.HdlRoomLogic.Current.InitAllRoom();
-                        Application.RunOnMainThread(() =>
-                        {
-                            this.RemoveFromParent();
-                            CommonPage.Instance.RemoveViewByTag("Login");
-                            UserPage.Instance.Fresh();
-                            CommonPage.Loading.Hide();
-                        });
-                    })
-                    { IsBackground = true }.Start();
-                }
-                else if (stateCodeStr == "NOTVERIFY")
-                {
-                    CommonPage.Loading.Hide();
-                    //鏈縺娲�
-                    loginErrorBtn.TextID = R.MyInternationalizationString.NOTVERIFY;
-                    CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.NOTVERIFY);
-                }
-                else if (stateCodeStr == "NOTENABLE")
-                {
-                    CommonPage.Loading.Hide();
-                    //璇ョ敤鎴峰睘浜庤皟璇曡处鍙凤紝骞舵湭鍚敤
-                    loginErrorBtn.TextID = R.MyInternationalizationString.NOTENABLE;
-                }
-                else if (stateCodeStr == "PARAMETEROREMPTY")
-                {
-                    CommonPage.Loading.Hide();
-                    //鎻愪緵鐨勫弬鏁伴敊璇�
-                    loginErrorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
-                }
-                else if (stateCodeStr == "VALIDCODEANDPHONENOEQUAL")
-                {
-                    CommonPage.Loading.Hide();
-                    loginErrorBtn.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL;
-                }
-                else if (stateCodeStr == "NORECORD")
-                {
-                    CommonPage.Loading.Hide();
-                    loginErrorBtn.TextID = R.MyInternationalizationString.NORECORD;
-                }
-                else if (stateCodeStr == "YOUDATANOISLOCALREGION")
-                {
-                    CommonPage.Loading.Hide();
-                    //涓嶅湪鏈尯鍩燂紝闇�瑕侀噸瀹氬悜鍖哄煙鍚庡啀娆¤姹傜櫥褰�
-                    if (requestRevetLoginCodeOBJ.ResponseData == null)
-                    {
-                        return;
-                    }
-                    var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginLocalRegionRes>(requestRevetLoginCodeOBJ.ResponseData.ToString());
-                    CommonPage.RequestHttpsHost = responseDataObj.RegionServer;
-                    //鍐嶆鐧诲綍
-                    //loginByCode();
-                }
-                else
-                {
-                    CommonPage.Loading.Hide();
-                    loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                }
-            }
-            catch
-            {
-                CommonPage.Loading.Hide();
-                CommonPage.Instance.FailureToServer();
-            }
-            finally
-            {
-                CommonPage.Loading.Hide();
-            }
-
-        }
-
-        /// <summary>
-        /// 閫氳繃瀵嗙爜鐧诲綍
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
-        private void LoginByPWD(object sender, MouseEventArgs mouseEventArgs)
-        {
-            this.RemoveFromParent();
-            var login = new AccountLogin();
-            Shared.Common.CommonPage.Instance.AddChidren(login);
-            login.Show();
-        }
-
-        /// <summary>
-        /// phone/email 閫夋嫨
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="mouseEventArgs"></param>
-        private void SelectPhoneOrEmail_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
-        {
-            phoneEmailForm.SelectedPhone.IsSelected = phoneEmailForm.SelectedEmail.IsSelected = false;
-            phoneEmailForm.SelectedPhone.IsBold = phoneEmailForm.SelectedEmail.IsBold = false;
-            loginBtn.Enable = loginBtn.IsSelected = false;
-            (sender as Button).IsSelected = (sender as Button).IsBold = true;
-            if ((sender as Button).Tag.ToString() == "Phone")
-            {
-                AddPhoneOrEmailFL(accountCodeFL, "Phone");
-            }
-            else
-            {
-                AddPhoneOrEmailFL(accountCodeFL, "Email");
-            }
-        }
-        /// <summary>
-        /// AddPhoneOrEmailFL
-        /// </summary>
-        /// <param name="accountCodeFrameLayout"></param>
-        /// <param name="phoneOrEmail"></param>
-        private void AddPhoneOrEmailFL(FrameLayout accountCodeFrameLayout, string phoneOrEmail)
-        {
-            accountCodeFrameLayout.RemoveAll();
-            account = string.Empty;
-            loginErrorBtn.Text = string.Empty;
-            if (phoneOrEmail == "Phone")
-            {
-                phoneRow = new PhoneRowForm();
-                phoneRow.Init(accountCodeFrameLayout, this, this.account, 29, 29);
-                phoneRow.AccountET.TextChangeEventHandler += Account_TextChange;
-            }
-            else
-            {
-                emailRow = new EmailRowForm();
-                emailRow.Init(accountCodeFrameLayout, this.account, 29, 29);
-                emailRow.AccountET.TextChangeEventHandler += Account_TextChange;
-            }
-
-            codeRow = new VerificationCodeRowForm();
-            codeRow.Init(accountCodeFrameLayout, 29, 225);
-            codeRow.SendCodeBtn.MouseUpEventHandler += SendCode_MouseUpEventAsync;
-            codeRow.VerificationCodeET.TextChangeEventHandler += Code_TextChange;
-        }
-
-        /// <summary>
-        /// wechat鐧诲綍
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="mouseEventArgs"></param>
-        private void LoginByWechat(object sender, MouseEventArgs mouseEventArgs)
-        {
-#if Android
-            //var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP),
-            //    Language.StringByID(R.MyInternationalizationString.LoginByWechat),
-            //    Language.StringByID(R.MyInternationalizationString.Cancel),
-            //    Language.StringByID(R.MyInternationalizationString.Confrim));
-            //alert.Show();
-            //alert.ResultEventHandler += (send, e) =>
-            //{
-            //if (e)
-            //{
-            com.hdl.home.Application.WXLogin();
-            com.hdl.home.WXEntryActivity.RespAction = (authStr) =>
-            {
-                if (authStr == null)
-                {
-
-                }
-                else
-                {
-                    new System.Threading.Thread(async () =>
-                    {
-                        var re = await isBindAuthAsync(authStr);
-                        if (re)
-                        {
-                            Application.RunOnMainThread(() =>
-                            {
-                                //鐩存帴鐧诲綍
-                                HomePage.Instance.ShowLoginLoadView();
-                            });
-                            var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
-                            var homes = await House.GetHomeLists();
-                            //鍚姩ZigBee
-                            ZigBee.Common.Application.Init();
-                            //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                            await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-                            UserCenter.HdlRoomLogic.Current.InitAllRoom();
-                            Application.RunOnMainThread(() =>
-                            {
-                                this.RemoveFromParent();
-                                CommonPage.Instance.RemoveViewByTag("Login");
-                                UserPage.Instance.Fresh();
-                            });
-                        }
-                        else
-                        {
-                            var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr);
-                            Application.RunOnMainThread(() =>
-                            {
-                                var registerPage = new AccountRegister();
-                                Shared.Common.CommonPage.Instance.AddChidren(registerPage);
-                                registerPage.OpenID = authRes.openid;
-                                registerPage.Show();
-                            });
-                        }
-                    })
-                    { IsBackground = true }.Start();
-                }
-            };
-            //}
-            //};
-#endif
-
-#if iOS
-            Home.IOS.AppDelegate.WXLogin();
-            Home.IOS.AppDelegate.RespAction = (authStr) =>
-            {
-                if (authStr == null)
-                {
-
-                }
-                else
-                {
-                    new System.Threading.Thread(async () =>
-                    {
-
-                        var re = await isBindAuthAsync(authStr);
-                        if (re)
-                        {
-                            //鐩存帴鐧诲綍
-                            //this.RemoveFromParent();
-
-                            //UserPage.Instance.Fresh();
-                            var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
-                            var homes = await House.GetHomeLists();
-                            //鍚姩ZigBee
-                            ZigBee.Common.Application.Init();
-                            //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                            await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-                            UserCenter.HdlRoomLogic.Current.InitAllRoom();
-                            Application.RunOnMainThread(() =>
-                            {
-                                this.RemoveFromParent();
-                                UserPage.Instance.Fresh();
-                            });
-                        }
-                        else
-                        {
-                            var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr);
-                            Application.RunOnMainThread(() =>
-                            {
-                                var registerPage = new AccountRegister();
-                                Shared.Common.CommonPage.Instance.AddChidren(registerPage);
-                                registerPage.OpenID = authRes.openid;
-                                registerPage.Show();
-                            });
-                        }
-                    })
-                    { IsBackground = true }.Start();
-                }
-            };
-#endif
-        }
-
-        /// <summary>
-        /// qq鐧诲綍
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="mouseEventArgs"></param>
-        private void LoginByQQ(object sender, MouseEventArgs mouseEventArgs)
-        {
-
-        }
-
-        /// <summary>
-        /// 鏄惁宸茬粦瀹�
-        /// </summary>
-        /// <param name="authStr"></param>
-        /// <returns></returns>
-        private async System.Threading.Tasks.Task<bool> isBindAuthAsync(string authStr)
-        {
-            var authRes = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.AuthUserRes>(authStr);
-            var auth = new SendDataToServer.AuthUser()
-            {
-                AccessToken = authRes.access_token,
-                RefreshToken = authRes.refresh_token,
-                OpenID = authRes.openid
-            };
-            var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(auth);
-            var revertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/InsertOrUpdateAuthUser", System.Text.Encoding.UTF8.GetBytes(requestJson));
-            if (revertObj == null)
-            {
-                return false;
-            }
-            var stateCodeStr = revertObj.StateCode.ToUpper();
-            if (stateCodeStr == "SUCCESS")
-            {
-                var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
-                var revertData = responseDataObj;
-                //鏍囪涓婁竴娆℃槸涓嶆槸鍚屼竴涓处鍙风櫥闄�
-                UserCenter.UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
-                Config.Instance.Account = revertData.Account;
-                Config.Instance.MD5PWD = revertData.MD5PWD;
-                Config.Instance.Guid = revertData.Guid;
-                Config.Instance.LoginDateTime = DateTime.Now;
-                Config.Instance.Save();
-                return true;
-            }
-            else
-            {
-                return false;
-            }
-        }
-
-        #endregion
-
-        #region 鈼� 璐﹀彿銆侀獙璇佺爜鐩戝惉______________________
-        /// <summary>
-        /// 璐﹀彿鐩戝惉
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
-        private void Account_TextChange(object sender, string mouseEventArgs)
-        {
-            loginErrorBtn.Text = string.Empty;
-            if ((sender as EditText).Text.Trim().Length > 0)
-            {
-                IsRightAccount = true;
-                codeRow.SendCodeBtn.Enable = codeRow.SendCodeBtn.IsSelected = true;
-                account= (sender as EditText).Text.Trim();
-            }
-            else
-            {
-                IsRightAccount = false;
-                codeRow.SendCodeBtn.Enable = codeRow.SendCodeBtn.IsSelected = false;
-            }
-        }
-
-        /// <summary>
-        /// code鐩戝惉浜嬩欢
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
-        private void Code_TextChange(object sender, string mouseEventArgs)
-        {
-            loginErrorBtn.Text = "";
-            if ((sender as EditText).Text.Trim().Length > 0 && IsRightAccount)
-            {
-                loginBtn.Enable = loginBtn.IsSelected = true;
-            }
-            else
-            {
-                loginBtn.Enable = loginBtn.IsSelected = false;
-            }
-            code = (sender as EditText).Text.Trim();
-        }
-
-        #endregion
-
-
-        void TimeOut(object sender, System.Timers.ElapsedEventArgs e)
-        {
-            var span = DateTime.Now - dateBegin;
-            if (span.TotalSeconds <= 61)
-            {
-                Application.RunOnMainThread(() =>
-                {
-                    codeRow.SendCodeBtn.Text = Convert.ToInt16(60 - span.TotalSeconds) + "s" + Language.StringByID(R.MyInternationalizationString.SendVerificationCodeAgain);
-                    codeRow.SendCodeBtn.Enable = false;
-                });
-            }
-            else
-            {
-                Application.RunOnMainThread(() =>
-                {
-                    codeRow.SendCodeBtn.Enable = true;
-                    codeRow.SendCodeBtn.TextID = R.MyInternationalizationString.SendVerificationCode;
-                    t.Stop();
-                    t.Close();
-                });
-            }
-        }
-
-        void TimeBegin()
-        {
-            t.Interval = 1000;
-            t.AutoReset = true;
-            t.Enabled = true;
-            t.Elapsed += TimeOut;
-            //鍚姩璁℃椂鍣ㄥ�掕鏃�-60s
-            t.Start();
-            dateBegin = DateTime.Now;
-        }
-
-        #region 鈼� 娉ㄥ唽_____________________________
-
-        /// <summary>
-        /// 娉ㄥ唽
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
-        private void Register(object sender, MouseEventArgs mouseEventArgs)
-        {
-            this.RemoveFromParent();
-            var registerPage = new AccountRegister();
-            CommonPage.Instance.AddChidren(registerPage);
-            registerPage.Show();
-        }
-
-        #endregion
-
-        #region 鈼� 蹇樿瀵嗙爜________________________
-        /// <summary>
-        /// 蹇樿瀵嗙爜
-        /// </summary>
-        private void ForgetPWD_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
-        {
-            this.RemoveFromParent();
-            var forgot = new AccountForgetPWD();
-            CommonPage.Instance.AddChidren(forgot);
-            forgot.Show();
-        }
-
-        #endregion
-
-        #region 鈼� 鍙戦�侀獙璇佺爜________________________
-        /// <summary>
-        /// 鍙戦�侀獙璇佺爜
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="mouseEventArgs"></param>
-        private async void SendCode_MouseUpEventAsync(object sender, MouseEventArgs mouseEventArgs)
-        {
-            if (CheckAccount(account) == false)
-            {
-                return;
-            }
-
-            (sender as Button).Enable = (sender as Button).IsSelected = false;
-            CommonPage.Loading.Start();
-            try
-            {
-                int companyInt = 0;
-                if (CommonPage.PhoneZoneStr == "86" || phoneEmailForm.SelectedEmail.IsSelected)
-                {
-                    companyInt = CommonPage.Company;
-                }
-                else
-                {
-                    companyInt = CommonPage.CompanyForINTERNETION;
-                }
-                var reqDtoSignPhone = new SendDataToServer.LoginSendVerCodeObj()
-                {
-                    Account = account,
-                    Company = companyInt,
-                    AreaCode = int.Parse(CommonPage.PhoneZoneStr),
-                    Language = CommonPage.ZigBeeLanguage
-                };
-                var requestRevertObj = await CommonFormResouce.LoginSendVerCode(reqDtoSignPhone);
-                if (requestRevertObj == null)
-                {
-                    CommonPage.Instance.FailureToServer();
-                    return;
-                }
-                var stateCodeStr = requestRevertObj.StateCode.ToUpper();
-                if (stateCodeStr == "SUCCESS")
-                {
-                    TimeBegin();
-                    var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.SendVerificationCodeSuccess), Language.StringByID(R.MyInternationalizationString.Confrim));
-                    alert.Show();
-                }
-                else if (stateCodeStr == "PARAMETEROREMPTY")
-                {
-                    //鎻愪緵鐨勫弬鏁伴敊璇�
-                    loginErrorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
-                    (sender as Button).Enable = (sender as Button).IsSelected = true;
-                }
-                else if (stateCodeStr == "ACCOUNTNOEXISTS")
-                {
-                    //璐﹀彿涓嶅瓨鍦�
-                    loginErrorBtn.TextID = R.MyInternationalizationString.ACCOUNTNOEXISTS;
-                    IsRightAccount = false;
-                    (sender as Button).Enable = (sender as Button).IsSelected = true;
-                }
-                else if (stateCodeStr == "SENDFAIL")
-                {
-                    //楠岃瘉鐮佸彂閫佸け璐�
-                    loginErrorBtn.TextID = R.MyInternationalizationString.SENDFAIL;
-                    (sender as Button).Enable = (sender as Button).IsSelected = true;
-                }
-                else
-                {
-                    loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                    (sender as Button).Enable = (sender as Button).IsSelected = true;
-                }
-            }
-            catch
-            {
-                loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                (sender as Button).Enable = (sender as Button).IsSelected = true;
-            }
-            finally
-            {
-                CommonPage.Loading.Hide();
-            }
-        }
-
-        /// <summary>
-        /// CheckAccount
-        /// </summary>
-        /// <param name="accountStr"></param>
-        /// <returns></returns>
-        private bool CheckAccount(string accountStr)
-        {
-            loginErrorBtn.Text = string.Empty;
-            if (phoneEmailForm.SelectedEmail.IsSelected)
-            {
-                if (AccountLogic.Instance.CheckEmail(accountStr) == false)
-                {
-                    loginErrorBtn.TextID = R.MyInternationalizationString.TheEmailError;
-                    return false;
-                }
-            }
-            else
-            {
-                if (AccountLogic.Instance.CheckPhoneWithZone(accountStr, CommonPage.PhoneZoneStr) == false)
-                {
-                    loginErrorBtn.TextID = R.MyInternationalizationString.ThePhoneError;
-                    return false;
-                }
-            }
-            return true;
-        }
-
-        #endregion
-
-        #region 鈼� 楠岃瘉楠岃瘉鐮乢_______________________
-
-
-
-        #endregion
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Login/AccountRegister.cs b/ZigbeeApp/Shared/Phone/Login/AccountRegister.cs
index fbd8451..13b39cb 100755
--- a/ZigbeeApp/Shared/Phone/Login/AccountRegister.cs
+++ b/ZigbeeApp/Shared/Phone/Login/AccountRegister.cs
@@ -308,7 +308,7 @@
                 {
                     var registerSuccess = new AccountRegisterSuccess();
                     CommonPage.Instance.AddChidren(registerSuccess);
-                    registerSuccess.Show(account, pwdRow.PasswrodET.Text.Trim(), OpenID);
+                    registerSuccess.ShowForm(account, pwdRow.PasswrodET.Text.Trim(), OpenID);
                 }
                 else if (stateCodeStr == "EXIST")
                 {
diff --git a/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs b/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs
index d7429da..20faead 100755
--- a/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs
+++ b/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs
@@ -1,186 +1,168 @@
 锘縰sing System;
 using System.Text;
 using Shared.Common;
+using Shared.Phone.UserCenter;
 using Shared.Phone.UserView;
 
 namespace Shared.Phone.Login
 {
+    /// <summary>
+    /// 璐﹀彿娉ㄥ唽鎴愬姛鐨勬彁绀虹晫闈�
+    /// </summary>
     public class AccountRegisterSuccess : FrameLayout
-    {
+    {
+        #region 鈻� 鍒濆鍖朹____________________________
+
         /// <summary>
-        /// registerSuccess
+        /// 鍒濆鍖�
         /// </summary>
-        /// <param name="account"></param>
-        /// <param name="password"></param>
-        public void Show(string account, string password,string OpenID="")
+        /// <param name="account">璐﹀彿</param>
+        /// <param name="password">瀵嗙爜</param>
+        /// <param name="OpenID">绗笁鏂圭粦瀹氱殑id</param>
+        public void ShowForm(string account, string password, string OpenID = "")
         {
-            var dialog = new FrameLayout()
-            {
-                BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
-            };
-            AddChidren(dialog);
+            //鏁翠釜鑳屾櫙
+            var frameBack = new FrameLayout();
+            frameBack.BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor;
+            this.AddChidren(frameBack);
+            //涓婇儴榛戣壊閮ㄥ垎
+            var frameBlack = new FrameLayout();
+            frameBlack.Y = Application.GetRealHeight(527);
+            frameBlack.Width = Application.GetRealWidth(688);
+            frameBlack.Height = Application.GetRealHeight(274);
+            frameBlack.Gravity = Gravity.CenterHorizontal;
+            frameBlack.BackgroundColor = ZigbeeColor.Current.GXCBlackBackgroundColor;
+            frameBlack.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+            this.AddChidren(frameBlack);
+            //涓嬮儴鐧借壊閮ㄥ垎
+            var frameWhite = new FrameLayout();
+            frameWhite.Y = frameBlack.Bottom;
+            frameWhite.Width = Application.GetRealWidth(688);
+            frameWhite.Height = Application.GetRealHeight(579);
+            frameWhite.Gravity = Gravity.CenterHorizontal;
+            frameWhite.BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
+            frameWhite.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
+            this.AddChidren(frameWhite);
+            //璐﹀彿澶村儚
+            var btnAccountIcon = new PicViewControl(294, 316);
+            btnAccountIcon.Y = Application.GetRealHeight(648);
+            btnAccountIcon.Gravity = Gravity.CenterHorizontal;
+            btnAccountIcon.UnSelectedImagePath = "Account/Cat.png";
+            this.AddChidren(btnAccountIcon);
+            //璐﹀彿
+            var btnAccount = new NormalViewControl(500, 80, true);
+            btnAccount.Y = btnAccountIcon.Bottom;
+            btnAccount.Gravity = Gravity.CenterHorizontal;
+            btnAccount.Text = account;
+            btnAccount.TextColor = ZigbeeColor.Current.GXCTextGrayColor2;
+            btnAccount.TextAlignment = TextAlignment.Center;
+            this.AddChidren(btnAccount);
+            //鎭枩娉ㄥ唽鎴愬姛锛�
+            var btnTip = new NormalViewControl(500, 80, true);
+            btnTip.Y = Application.GetRealHeight(1143);
+            btnTip.Gravity = Gravity.CenterHorizontal;
+            btnTip.TextID = R.MyInternationalizationString.RegisterSuccessTip;
+            btnTip.TextColor = ZigbeeColor.Current.GXCTextBlackColor2;
+            btnTip.TextAlignment = TextAlignment.Center;
+            btnTip.TextSize = 16;
+            btnTip.IsBold = true;
+            this.AddChidren(btnTip);
+            //鍗冲皢鑷姩鐧诲綍
+            var btnWillLogin = new NormalViewControl(500, 80, true);
+            btnWillLogin.Y = btnTip.Bottom + Application.GetRealHeight(15);
+            btnWillLogin.Gravity = Gravity.CenterHorizontal;
+            btnWillLogin.TextID = R.MyInternationalizationString.WillAutoLogin;
+            btnWillLogin.TextColor = ZigbeeColor.Current.GXCTextGrayColor;
+            btnWillLogin.TextAlignment = TextAlignment.Center;
+            AddChidren(btnWillLogin);
 
-            var blackBG = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(527),
-                Width = Application.GetRealWidth(688),
-                Height = Application.GetRealHeight(274),
-                Gravity = Gravity.CenterHorizontal,
-                BackgroundColor = ZigbeeColor.Current.GXCBlackBackgroundColor
-            };
-            AddChidren(blackBG);
-
-            var whiteBG = new FrameLayout()
-            {
-                Y = blackBG.Bottom,
-                Width = Application.GetRealWidth(688),
-                Height = Application.GetRealHeight(579),
-                Gravity = Gravity.CenterHorizontal,
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
-            };
-            AddChidren(whiteBG);
-
-            var accountImg = new Button()
-            {
-                Y = Application.GetRealHeight(648),
-                Width = Application.GetMinRealAverage(294),
-                Height = Application.GetMinRealAverage(316),
-                Gravity = Gravity.CenterHorizontal,
-                UnSelectedImagePath = "Account/Cat.png"
-            };
-            AddChidren(accountImg);
-
-            var accountBtn = new Button()
-            {
-                Y = accountImg.Bottom,
-                Width = Application.GetRealWidth(500),
-                Height = Application.GetRealHeight(80),
-                Gravity = Gravity.CenterHorizontal,
-                Text = account,
-                TextColor = ZigbeeColor.Current.GXCTextGrayColor2,
-                TextSize = 14,
-            };
-            AddChidren(accountBtn);
-
-            var tip = new Button()
-            {
-                Y = Application.GetRealHeight(1143),
-                Width = Application.GetRealWidth(500),
-                Height = Application.GetRealHeight(80),
-                Gravity = Gravity.CenterHorizontal,
-                TextID = R.MyInternationalizationString.RegisterSuccessTip,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor2,
-                TextSize = 16,
-            };
-            AddChidren(tip);
-
-            var willLogin = new Button()
-            {
-                Y = tip.Bottom + Application.GetRealHeight(15),
-                Width = Application.GetRealWidth(500),
-                Height = Application.GetRealHeight(80),
-                Gravity = Gravity.CenterHorizontal,
-                TextID = R.MyInternationalizationString.WillAutoLogin,
-                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
-                TextSize = 14,
-            };
-            AddChidren(willLogin);
-
-            AutoLogin(account, password,OpenID);
-        }
-
+            HdlThreadLogic.Current.RunThread(() =>
+            {
+                System.Threading.Thread.Sleep(2000);
+                //2绉掑悗鑷姩鐧诲綍
+                this.LoginByAccountAndPsw(account, password, OpenID);
+            });
+        }
+
+        #endregion
+
+        #region 鈻� 鑷姩鐧诲綍___________________________
+
         /// <summary>
         /// AutoLogin
         /// </summary>
         /// <param name="account"></param>
         /// <param name="password"></param>
-        private void AutoLogin(string account, string password, string OpenID = "")
+        private void LoginByAccountAndPsw(string account, string password, string OpenID = "")
         {
-            new System.Threading.Thread(() =>
-            {
-                System.Threading.Thread.Sleep(1500);
-                Application.RunOnMainThread(() =>
-                {
-                    try
-                    {
-                        HomePage.Instance.ShowLoginLoadView();
-
-                        CommonPage.Loading.Start(Language.StringByID(R.MyInternationalizationString.Logining));
-                        Action action = async () => {
-                            var loginSuccess = await HomePage.Instance.LoginByPWDAsync(account, password);
-                            if (loginSuccess==1)
-                            {
-                                new System.Threading.Thread(async () =>
-                                {
-                                    if (string.IsNullOrEmpty(OpenID)==false)
-                                    {
-                                        BindAuthUser(Config.Instance.Guid, OpenID);
-                                    }
-                                    //鐧诲綍鎴愬姛
-                                    var homes = await House.GetHomeLists();
-                      
-                                    //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                                    await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-                                    //鍚姩ZigBee
-                                    ZigBee.Common.Application.Init();
-
-                                    Application.RunOnMainThread(() =>
-                                    {
-                                        CommonPage.Loading.Hide();
-                                        this.RemoveFromParent();
-                                        CommonPage.Instance.RemoveViewByTag("Register");
-                                        CommonPage.Instance.RemoveViewByTag("Login");
-                                        UserPage.Instance.Fresh();
-                                    });
-                                })
-                                { IsBackground = true }.Start();
-
-                            }
-                            else
-                            {
-                                //鏈櫥褰曟垚鍔熷脊鍑虹櫥褰曠晫闈� 鍚屾椂闇�瑕佹爣璁颁负鏈櫥褰曠姸鎬�
-                                Config.Instance.LoginDateTime = new DateTime(1970, 1, 1);
-                                Config.Instance.Save();
-                                var login = new AccountLogin { };
-                                CommonPage.Instance.AddChidren(login);
-                                login.Show(account);
-                            }
-                        };
-                        action();
-                    }
-                    catch (Exception ex)
-                    {
-                        var errMsg = ex.Message;
-                    }
-                    finally
-                    {
-                        CommonPage.Loading.Hide();
-                    }
-                });
-            })
-            { IsBackground = true }.Start();
-        }
+            HdlThreadLogic.Current.RunMain(() =>
+            {
+                //鎵撳紑鍚姩椤�
+                HomePage.Instance.ShowLoginLoadView();
+                CommonPage.Loading.Start(Language.StringByID(R.MyInternationalizationString.Logining));
+                
+                HdlThreadLogic.Current.RunThread(async () =>
+                {
+                    //璐﹀彿瀵嗙爜鐧婚檰
+                    var loginSuccess = await HomePage.Instance.LoginByPWDAsync(account, password);
+                    if (loginSuccess == 1)
+                    {
+                        if (string.IsNullOrEmpty(OpenID) == false)
+                        {
+                            //缁戝畾绗笁鏂�
+                            await BindAuthUser(Config.Instance.Guid, OpenID);
+                        }
+                        var homes = await House.GetHomeLists();
+
+                        //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
+                        await UserCenterLogic.InitUserCenterMenmoryAndThread();
+                        //鍚姩ZigBee
+                        ZigBee.Common.Application.Init();
+
+                        HdlThreadLogic.Current.RunMain(() =>
+                        {
+                            CommonPage.Loading.Hide();
+                            this.RemoveFromParent();
+                            CommonPage.Instance.RemoveViewByTag("Register");
+                            CommonPage.Instance.RemoveViewByTag("Login");
+                            UserPage.Instance.Fresh();
+                        });
+                    }
+                    else
+                    {
+                        HdlThreadLogic.Current.RunMain(() =>
+                        {
+                            //鏈櫥褰曟垚鍔熷脊鍑虹櫥褰曠晫闈� 鍚屾椂闇�瑕佹爣璁颁负鏈櫥褰曠姸鎬�
+                            Config.Instance.LoginDateTime = new DateTime(1970, 1, 1);
+                            Config.Instance.Save();
+                            var login = new AccountLogin();
+                            CommonPage.Instance.AddChidren(login);
+                            login.ShowForm(account);
+                        });
+                    }
+                });
+            });
+        }
+
+        #endregion
+
+        #region 鈻� 缁戝畾绗笁鏂筥________________________
 
         /// <summary>
         /// 缁戝畾
         /// </summary>
         /// <param name="guid"></param>
         /// <param name="openId"></param>
-        private void BindAuthUser(string guid, string openId)
-        {
-            new System.Threading.Thread(async () =>
-            {
-                var auth = new SendDataToServer.BindAuthUser
-                {
-                    AccountGuid = guid,
-                    OpenID = openId
-                };
-                var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(auth);
-                var revert = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/BindAuthUserToAccount", Encoding.UTF8.GetBytes(requestJson));
-            })
-            {
-                IsBackground = true
-            }.Start();
-        }
+        private async System.Threading.Tasks.Task 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));
+        }
+
+        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Login/AccountResetPWDSuccess.cs b/ZigbeeApp/Shared/Phone/Login/AccountResetPWDSuccess.cs
index a8d0d6b..6c3db57 100755
--- a/ZigbeeApp/Shared/Phone/Login/AccountResetPWDSuccess.cs
+++ b/ZigbeeApp/Shared/Phone/Login/AccountResetPWDSuccess.cs
@@ -97,7 +97,7 @@
                 {
                     var login = new AccountLogin();
                     CommonPage.Instance.AddChidren(login);
-                    login.Show();
+                    login.ShowForm();
                 }
             };
         }
diff --git a/ZigbeeApp/Shared/Phone/Login/PhoneEmailForm.cs b/ZigbeeApp/Shared/Phone/Login/PhoneEmailForm.cs
index 0ae4177..9e3a426 100755
--- a/ZigbeeApp/Shared/Phone/Login/PhoneEmailForm.cs
+++ b/ZigbeeApp/Shared/Phone/Login/PhoneEmailForm.cs
@@ -6,7 +6,7 @@
 
 namespace Shared.Phone.Login
 {
-    public class PhoneEmailForm : FrameLayout
+    public class PhoneEmailForm : FrameLayoutBase
     {
         /// <summary>
         /// 閫夋嫨鎵嬫満
@@ -33,8 +33,8 @@
             PhoneEmailFL = new FrameLayout()
             {
                 Y = Application.GetRealHeight(y),
-                Width = Application.GetMinRealAverage(905),
-                Height = Application.GetMinRealAverage(170),
+                Width = this.GetPictrueRealSize(905),
+                Height = this.GetPictrueRealSize(170),
                 //BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor,
                 //Radius = (uint)Application.GetRealHeight(height / 2),
                 Gravity = Gravity.CenterHorizontal
@@ -43,8 +43,8 @@
 
             var bg = new Button
             {
-                Width = Application.GetMinRealAverage(905),
-                Height = Application.GetMinRealAverage(170),
+                Width = this.GetPictrueRealSize(905),
+                Height = this.GetPictrueRealSize(170),
                 UnSelectedImagePath = "Account/PhoneEmail_White.png",
                 Gravity = Gravity.CenterHorizontal
             };
@@ -53,8 +53,8 @@
             SelectedPhone = new Button()
             {
                 X=Application.GetRealWidth(10),
-                Width = Application.GetMinRealAverage(905 / 2 + 20),
-                Height=Application.GetMinRealAverage(height),
+                Width = this.GetPictrueRealSize(905 / 2 + 20),
+                Height=this.GetPictrueRealSize(height),
                 SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor,
                 TextID = R.MyInternationalizationString.PhoneNum,
                 TextColor = ZigbeeColor.Current.GXCTextColor,
@@ -69,9 +69,9 @@
 
             SelectedEmail = new Button()
             {
-                X = Application.GetMinRealAverage(905 / 2 - 20),
-                Width = Application.GetMinRealAverage(905 / 2 + 20),
-                Height = Application.GetMinRealAverage(height),
+                X = this.GetPictrueRealSize(905 / 2 - 20),
+                Width = this.GetPictrueRealSize(905 / 2 + 20),
+                Height = this.GetPictrueRealSize(height),
                 SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor,
                 TextID = R.MyInternationalizationString.Email,
                 TextColor = ZigbeeColor.Current.GXCTextColor,
@@ -97,7 +97,7 @@
         }
     }
 
-    public class PhoneRowForm : FrameLayout
+    public class PhoneRowForm : FrameLayoutBase
     {
         /// <summary>
         /// 鎵嬫満鍖哄彿btn
@@ -206,7 +206,7 @@
         }
     }
 
-    public class PhoneLoginRowForm : FrameLayout
+    public class PhoneLoginRowForm : FrameLayoutBase
     {
         /// <summary>
         /// 璐﹀彿杈撳叆鎺т欢
@@ -227,19 +227,19 @@
         /// <param name="frameLayout"></param>
         /// <param name="account"></param>
         public void Init(FrameLayout frameLayout, FrameLayout parFL, string account, int x, int y)
-        {
-            this.X = Application.GetRealWidth(x);
-            this.Y = Application.GetRealHeight(y);
-            this.Width = Application.GetRealWidth(CommonFormResouce.Row_Width);
-            this.Height = Application.GetRealHeight(CommonFormResouce.Row_Height);
+        {
+            this.X = Application.GetRealWidth(x);
+            this.Y = Application.GetRealHeight(y);
+            this.Width = Application.GetRealWidth(CommonFormResouce.Row_Width);
+            this.Height = Application.GetRealHeight(CommonFormResouce.Row_Height);
             this.BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
             frameLayout.AddChidren(this);
 
             var accountBtn = new Button()
             {
                 X = Application.GetRealWidth(69),
-                Width = Application.GetMinRealAverage(Button_Height),
-                Height = Application.GetMinRealAverage(Button_Height),
+                Width = this.GetPictrueRealSize(Button_Height),
+                Height = this.GetPictrueRealSize(Button_Height),
                 Gravity = Gravity.CenterVertical,
                 UnSelectedImagePath = "Account/Account.png"
             };
@@ -294,7 +294,7 @@
         }
     }
 
-    public class EmailRowForm : FrameLayout
+    public class EmailRowForm : FrameLayoutBase
     {
         /// <summary>
         /// 璐﹀彿杈撳叆鎺т欢
@@ -329,8 +329,8 @@
             var accountBtn = new Button()
             {
                 X = Application.GetRealWidth(29),
-                Width = Application.GetMinRealAverage(Button_Height),
-                Height = Application.GetMinRealAverage(Button_Height),
+                Width = this.GetPictrueRealSize(Button_Height),
+                Height = this.GetPictrueRealSize(Button_Height),
                 Gravity = Gravity.CenterVertical,
                 UnSelectedImagePath = "Account/Account.png"
             };
@@ -385,7 +385,7 @@
     }
 
 
-    public class EmailLoginRowForm : FrameLayout
+    public class EmailLoginRowForm : FrameLayoutBase
     {
         /// <summary>
         /// 璐﹀彿杈撳叆鎺т欢
@@ -406,19 +406,19 @@
         /// <param name="frameLayout"></param>
         /// <param name="account"></param>
         public void Init(FrameLayout frameLayout, string account, int x, int y)
-        {
-            this.X = Application.GetRealWidth(x);
-            this.Y = Application.GetRealHeight(y);
-            this.Width = Application.GetRealWidth(CommonFormResouce.Row_Width);
-            this.Height = Application.GetRealHeight(CommonFormResouce.Row_Height);
+        {
+            this.X = Application.GetRealWidth(x);
+            this.Y = Application.GetRealHeight(y);
+            this.Width = Application.GetRealWidth(CommonFormResouce.Row_Width);
+            this.Height = Application.GetRealHeight(CommonFormResouce.Row_Height);
             this.BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
             frameLayout.AddChidren(this);
 
             var accountBtn = new Button()
             {
                 X = Application.GetRealWidth(69),
-                Width = Application.GetMinRealAverage(Button_Height),
-                Height = Application.GetMinRealAverage(Button_Height),
+                Width = this.GetPictrueRealSize(Button_Height),
+                Height = this.GetPictrueRealSize(Button_Height),
                 Gravity = Gravity.CenterVertical,
                 UnSelectedImagePath = "Account/Account.png"
             };
@@ -472,7 +472,7 @@
 
     }
 
-    public class EmailForgotRowForm : FrameLayout
+    public class EmailForgotRowForm : FrameLayoutBase
     {
         /// <summary>
         /// 璐﹀彿杈撳叆鎺т欢
@@ -551,7 +551,7 @@
         }
     }
 
-    public class VerificationCodeRowForm : FrameLayout
+    public class VerificationCodeRowForm : FrameLayoutBase
     {
         /// <summary>
         /// Button_Height
@@ -595,8 +595,8 @@
             var codeBtn = new Button()
             {
                 X = Application.GetRealWidth(29),
-                Width = Application.GetMinRealAverage(Button_Height),
-                Height = Application.GetMinRealAverage(Button_Height),
+                Width = this.GetPictrueRealSize(Button_Height),
+                Height = this.GetPictrueRealSize(Button_Height),
                 Gravity = Gravity.CenterVertical,
                 UnSelectedImagePath = "Account/Code.png"
             };
@@ -675,7 +675,7 @@
         }
     }
 
-    public class PwdRowForm : FrameLayout
+    public class PwdRowForm : FrameLayoutBase
     {
         /// <summary>
         /// PasswrodET
@@ -716,8 +716,8 @@
             var passwordBtn = new Button()
             {
                 X = Application.GetRealWidth(29),
-                Width = Application.GetMinRealAverage(Button_Height),
-                Height = Application.GetMinRealAverage(Button_Height),
+                Width = this.GetPictrueRealSize(Button_Height),
+                Height = this.GetPictrueRealSize(Button_Height),
                 Gravity=Gravity.CenterVertical,
                 UnSelectedImagePath = "Account/Password.png"
             };
@@ -797,7 +797,7 @@
         }
     }
 
-    public class PwdLoginRowForm : FrameLayout
+    public class PwdLoginRowForm : FrameLayoutBase
     {
         /// <summary>
         /// PasswrodET
@@ -824,19 +824,19 @@
         /// <param name="x"></param>
         /// <param name="y"></param>
         public void Init(FrameLayout frameLayout, int x, int y, string password = "")
-        {
-            this.X = Application.GetRealWidth(x);
-            this.Y = Application.GetRealHeight(y);
-            this.Width = Application.GetRealWidth(CommonFormResouce.Row_Width);
-            this.Height = Application.GetRealHeight(CommonFormResouce.Row_Height);
+        {
+            this.X = Application.GetRealWidth(x);
+            this.Y = Application.GetRealHeight(y);
+            this.Width = Application.GetRealWidth(CommonFormResouce.Row_Width);
+            this.Height = Application.GetRealHeight(CommonFormResouce.Row_Height);
             this.BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
             frameLayout.AddChidren(this);
 
             var passwordBtn = new Button()
             {
                 X = Application.GetRealWidth(69),
-                Width = Application.GetMinRealAverage(Button_Height),
-                Height = Application.GetMinRealAverage(Button_Height),
+                Width = this.GetPictrueRealSize(Button_Height),
+                Height = this.GetPictrueRealSize(Button_Height),
                 Gravity = Gravity.CenterVertical,
                 UnSelectedImagePath = "Account/Password.png"
             };
@@ -916,7 +916,7 @@
         }
     }
 
-    public class PwdForForgetRowForm : FrameLayout
+    public class PwdForForgetRowForm : FrameLayoutBase
     {
         /// <summary>
         /// PasswrodET
@@ -1029,7 +1029,7 @@
         }
     }
 
-    public class CodeForRegisterRowForm : FrameLayout
+    public class CodeForRegisterRowForm : FrameLayoutBase
     {
         /// <summary>
         /// Button_Height
@@ -1084,8 +1084,8 @@
             var codeBtn = new Button()
             {
                 X = Application.GetRealWidth(29),
-                Width = Application.GetMinRealAverage(Button_Height),
-                Height = Application.GetMinRealAverage(Button_Height),
+                Width = this.GetPictrueRealSize(Button_Height),
+                Height = this.GetPictrueRealSize(Button_Height),
                 Gravity = Gravity.CenterVertical,
                 UnSelectedImagePath = "Account/Code.png"
             };
@@ -1156,31 +1156,31 @@
         /// TimeBegin
         /// </summary>
         public void TimeBegin()
-        {
-            SendCodeBtn.BackgroundColor = UserCenterColor.Current.White;
-            SendCodeBtn.TextColor = ZigbeeColor.Current.GXCTextBlackColor;
-
-            HdlThreadLogic.Current.RunThread(() =>
-            {
-                //鍚庨噸鍙�
-                string txtValue = Language.StringByID(R.MyInternationalizationString.SendVerificationCodeAgain);
-                int timeOut = 60;
-                while (timeOut > 0 && SendCodeBtn.Parent != null)
-                {
-                    HdlThreadLogic.Current.RunMain(() =>
-                    {
-                        SendCodeBtn.Text = timeOut + "s" + txtValue;
-                    });
-                    timeOut--;
-                    System.Threading.Thread.Sleep(1000);
-                }
-                HdlThreadLogic.Current.RunMain(() =>
-                {
+        {
+            SendCodeBtn.BackgroundColor = UserCenterColor.Current.White;
+            SendCodeBtn.TextColor = ZigbeeColor.Current.GXCTextBlackColor;
+
+            HdlThreadLogic.Current.RunThread(() =>
+            {
+                //鍚庨噸鍙�
+                string txtValue = Language.StringByID(R.MyInternationalizationString.SendVerificationCodeAgain);
+                int timeOut = 60;
+                while (timeOut > 0 && SendCodeBtn.Parent != null)
+                {
+                    HdlThreadLogic.Current.RunMain(() =>
+                    {
+                        SendCodeBtn.Text = timeOut + "s" + txtValue;
+                    });
+                    timeOut--;
+                    System.Threading.Thread.Sleep(1000);
+                }
+                HdlThreadLogic.Current.RunMain(() =>
+                {
                     SendCodeBtn.TextID = R.MyInternationalizationString.SendVerificationCode;
                     SendCodeBtn.BackgroundColor = 0xFFFC744B;
                     SendCodeBtn.TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
-                    SendCodeBtn.CanClick = true;
-                });
+                    SendCodeBtn.CanClick = true;
+                });
             });
         }
 
diff --git a/ZigbeeApp/Shared/Phone/Login/PhoneZone.cs b/ZigbeeApp/Shared/Phone/Login/PhoneZone.cs
index e91aa2e..13a0844 100755
--- a/ZigbeeApp/Shared/Phone/Login/PhoneZone.cs
+++ b/ZigbeeApp/Shared/Phone/Login/PhoneZone.cs
@@ -4,7 +4,7 @@
 
 namespace Shared.Phone.Device.Login
 {
-    public class PhoneZone : FrameLayout
+    public class PhoneZone : UserCenter.FrameLayoutBase
     {
         #region 鈼� 鍙橀噺____________________________
         /// <summary>
@@ -197,8 +197,8 @@
             var cancleBtn = new Button()
             {
                 Y = Application.GetRealHeight(1719),
-                Height = Application.GetMinRealAverage(86),
-                Width = Application.GetMinRealAverage(86),
+                Height = this.GetPictrueRealSize(86),
+                Width = this.GetPictrueRealSize(86),
                 UnSelectedImagePath = "Account/Cancle.png",
                 Gravity = Gravity.CenterHorizontal
             };
diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAcDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAcDetailCardForm.cs
index 6b371cf..13fae51 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAcDetailCardForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAcDetailCardForm.cs
@@ -84,7 +84,7 @@
             //娓呮礂婊ょ綉鎻愮ず鐨凢rameLayout
             this.frameClrean = new FrameLayout();
             frameClrean.Width = Application.GetRealWidth(600);
-            frameClrean.Height = Application.GetMinRealAverage(69);
+            frameClrean.Height = this.GetPictrueRealSize(69);
             frameClrean.X = ControlCommonResourse.XXLeft;
             frameClrean.Y = Application.GetRealHeight(35);
             frameWhiteBack.AddChidren(frameClrean);
@@ -117,8 +117,8 @@
             //绌鸿皟鎺т欢鐨勫鍣�
             var frameAcBack = new FrameLayout();
             frameAcBack.Y = Application.GetRealHeight(412);
-            frameAcBack.Width = Application.GetMinRealAverage(671);
-            frameAcBack.Height = Application.GetMinRealAverage(671);
+            frameAcBack.Width = this.GetPictrueRealSize(671);
+            frameAcBack.Height = this.GetPictrueRealSize(671);
             frameAcBack.Gravity = Gravity.CenterHorizontal;
             frameWhiteBack.AddChidren(frameAcBack);
 
@@ -146,7 +146,7 @@
 
             //绌鸿皟鎺т欢閲岄潰鐨勯偅涓樉绀哄埗鐑�,鍒跺喎鐨勬帶浠�
             this.btnNowModeView = new NormalViewControl(200, 55, true);
-            btnNowModeView.Y = Application.GetMinRealAverage(184);
+            btnNowModeView.Y = this.GetPictrueRealSize(184);
             btnNowModeView.Gravity = Gravity.CenterHorizontal;
             btnNowModeView.Text = DeviceAcDetailCardMethord.GetModeNameByModeId(deviceAc.currentSystemMode);
             btnNowModeView.TextSize = 12;
@@ -157,8 +157,8 @@
             this.btnReduce = new IconViewControl(81);
             btnReduce.CanClick = isAcOpen;
             btnReduce.UnSelectedImagePath = "AC/Reduce.png";
-            btnReduce.X = Application.GetMinRealAverage(132);
-            btnReduce.Y = Application.GetMinRealAverage(268);
+            btnReduce.X = this.GetPictrueRealSize(132);
+            btnReduce.Y = this.GetPictrueRealSize(268);
             frameAcBack.AddChidren(btnReduce);
             btnReduce.ButtonClickEvent += (sender, e) =>
             {
@@ -173,7 +173,7 @@
             this.btnAdd = new IconViewControl(81);
             btnAdd.CanClick = isAcOpen;
             btnAdd.UnSelectedImagePath = "AC/Add.png";
-            btnAdd.X = frameAcBack.Width - Application.GetMinRealAverage(81 + 132);
+            btnAdd.X = frameAcBack.Width - this.GetPictrueRealSize(81 + 132);
             btnAdd.Y = btnReduce.Y;
             frameAcBack.AddChidren(btnAdd);
             btnAdd.ButtonClickEvent += (sender, e) =>
@@ -187,7 +187,7 @@
 
             //鈩�
             var btnUint = new NormalViewControl(100, 66, true);
-            btnUint.Y = Application.GetMinRealAverage(366);
+            btnUint.Y = this.GetPictrueRealSize(366);
             btnUint.Gravity = Gravity.CenterHorizontal;
             btnUint.TextAlignment = TextAlignment.Center;
             btnUint.Text = "鈩�";
@@ -358,14 +358,35 @@
             //鍙戦�佽繘搴﹀��
             if (deviceAc.currentSystemMode == 3 || deviceAc.currentSystemMode == 8)
             {
+                //濡傛灉浣忓畢鏄櫄鎷熶綇瀹�
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    this.canSetProgress = true;
+                    deviceAc.currentCoolingSetpoint = value;
+                    return;
+                }
                 deviceAc.SetCoolingTemperatureAsync(value * 100);
             }
             else if (deviceAc.currentSystemMode == 4)
             {
+                //濡傛灉浣忓畢鏄櫄鎷熶綇瀹�
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    this.canSetProgress = true;
+                    deviceAc.currentHeatingSetpoint = value;
+                    return;
+                }
                 deviceAc.SetHeatingTemperatureAsync(value * 100);
             }
             else if (deviceAc.currentSystemMode == 1)
             {
+                //濡傛灉浣忓畢鏄櫄鎷熶綇瀹�
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    this.canSetProgress = true;
+                    deviceAc.currentAutoSetpoint = value;
+                    return;
+                }
                 deviceAc.SetAutoTemperatureAsync(value * 100);
             }
         }
@@ -480,6 +501,16 @@
         /// <param name="fanSwingMode">Fan mode.</param>
         private void SetFanSwingComand(AC.FanSwingMode fanSwingMode)
         {
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欑洿鎺ヤ慨鏀圭紦瀛�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                deviceAc.currentFanSwingMode = (int)fanSwingMode;
+                var tempDevice = new CommonDevice();
+                tempDevice.DeviceStatusReport = new CommonDevice.DeviceStatusReportData() { CluterID = 514 };
+                tempDevice.DeviceStatusReport.AttriBute = new List<CommonDevice.AttributeDataObj>() { new CommonDevice.AttributeDataObj() { AttributeId = 4096 } };
+                this.CheckResponeResultStatu(ReceiveComandDiv.A璁惧灞炴�т笂鎶�, tempDevice);
+                return;
+            }
             var oldModel = (AC.FanSwingMode)deviceAc.currentFanSwingMode;
             if (oldModel == fanSwingMode)
             {
@@ -645,6 +676,32 @@
                 //閫夋嫨鐨勬槸鍚屼竴涓�
                 return;
             }
+
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欑洿鎺ヤ慨鏀圭紦瀛�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                deviceAc.currentSystemMode = (int)mode;
+                var tempDevice = new CommonDevice();
+                tempDevice.DeviceStatusReport = new CommonDevice.DeviceStatusReportData() { CluterID = 513 };
+                tempDevice.DeviceStatusReport.AttriBute = new List<CommonDevice.AttributeDataObj>() { new CommonDevice.AttributeDataObj() { AttributeId = 28 } };
+                this.CheckResponeResultStatu(ReceiveComandDiv.A璁惧灞炴�т笂鎶�, tempDevice);
+                //閫侀鐨勬椂鍊�,娌℃湁娓╁害鐨勬蹇�
+                if (mode == AC.AcMode.FanOnly)
+                {
+                    //鍔犲噺涓嶅彲浠ョ偣鍑�
+                    btnAdd.CanClick = false;
+                    btnReduce.CanClick = false;
+                }
+                //濡傛灉鍘熸潵鐨勭姸鎬佹槸閫侀鐨勮瘽
+                else if (oldModel == AC.AcMode.FanOnly)
+                {
+                    //鍔犲噺鍙互鐐瑰嚮
+                    btnAdd.CanClick = true;
+                    btnReduce.CanClick = true;
+                }
+                return;
+            }
+
             //妫�娴嬫槸鍚﹁幏鍙栫綉鍏冲弽棣堢殑缁撴灉,濡傛灉缃戝叧娌℃湁鍥炲,鍒欎細寮瑰嚭娑堟伅
             this.StartCheckResponeResult(this.listControl, (result) =>
             {
@@ -718,6 +775,20 @@
         /// <param name="isOpen"></param>
         private void SetSwitchComand(bool isOpen)
         {
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欑洿鎺ヤ慨鏀圭紦瀛�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                deviceAc.currentSystemMode = isOpen == true ? 3 : 0;
+                var tempDevice = new CommonDevice();
+                tempDevice.DeviceStatusReport = new CommonDevice.DeviceStatusReportData() { CluterID = 513 };
+                tempDevice.DeviceStatusReport.AttriBute = new List<CommonDevice.AttributeDataObj>() { new CommonDevice.AttributeDataObj() { AttributeId = 28 } };
+                this.CheckResponeResultStatu(ReceiveComandDiv.A璁惧灞炴�т笂鎶�, tempDevice);
+                //鍔犲噺鏄惁鍙互鐐瑰嚮
+                btnAdd.CanClick = isOpen;
+                btnReduce.CanClick = isOpen;
+                return;
+            }
+
             //妫�娴嬫槸鍚﹁幏鍙栫綉鍏冲弽棣堢殑缁撴灉,濡傛灉缃戝叧娌℃湁鍥炲,鍒欎細寮瑰嚭娑堟伅
             this.StartCheckResponeResult(this.listControl, (result) =>
             {
@@ -853,6 +924,17 @@
             rowFrame.ButtonClickEvent += (sender, e) =>
             {
                 ((DialogCommonForm)frameBack.Parent.Parent).CloseForm();
+
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欑洿鎺ヤ慨鏀圭紦瀛�
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    deviceAc.currentFanMode = (int)i_div;
+                    var tempDevice = new CommonDevice();
+                    tempDevice.DeviceStatusReport = new CommonDevice.DeviceStatusReportData() { CluterID = 514 };
+                    tempDevice.DeviceStatusReport.AttriBute = new List<CommonDevice.AttributeDataObj>() { new CommonDevice.AttributeDataObj() { AttributeId = 0 } };
+                    this.CheckResponeResultStatu(ReceiveComandDiv.A璁惧灞炴�т笂鎶�, tempDevice);
+                    return;
+                }
                 //鍙戦�侀閫熷懡浠�
                 this.SetAcWindSpeedComand(i_div);
             };
diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs
index de15ae1..1204b2f 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs
@@ -72,8 +72,8 @@
             //褰╃伅鎺т欢
             this.waveSeekBar = new WaveSeekBar();
             waveSeekBar.Y = Application.GetRealHeight(377);
-            waveSeekBar.Width = Application.GetMinRealAverage(271);
-            waveSeekBar.Height = Application.GetMinRealAverage(533);
+            waveSeekBar.Width = this.GetPictrueRealSize(271);
+            waveSeekBar.Height = this.GetPictrueRealSize(533);
             waveSeekBar.Gravity = Gravity.CenterHorizontal;
             waveSeekBar.WavePadding = Application.GetRealWidth(8);
             waveSeekBar.MaxValue = 100;
@@ -154,7 +154,15 @@
                 //鍙樻洿杩涘害鐧惧垎姣旂殑鏄剧ず
                 btnProgress.Y = progressY + waveSeekBar.NowProgressY;
                 btnProgress.Text = value + "%";
-                nowProgressValue = value;
+                if (Common.Config.Instance.Home.IsVirtually == false)
+                {
+                    nowProgressValue = value;
+                }
+                else
+                {
+                    //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鐩存帴鏀圭紦瀛�
+                    ((DimmableLight)this.device).Level = value;
+                }
             };
 
             if (this.hadInitControl == true)
@@ -193,6 +201,15 @@
         /// <param name="isOpen"></param>
         private void SetSwitchCommand(bool isOpen)
         {
+            //濡傛灉浣忓畢鏄櫄鎷熶綇瀹�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                ((LightBase)this.device).OnOffStatus = isOpen == true ? 1 : 0;
+                //鍒锋柊寮�鍏崇姸鎬�
+                this.RefreshSwitchStatu(isOpen);
+                return;
+            }
+
             //褰撴寜涓嬪紑鍏虫寜閽椂,涓嶈兘鍐嶅彂閫佽繘搴﹀��
             this.canSetProgressValue = false;
 
@@ -216,27 +233,20 @@
                 });
             });
 
-            //鐘舵�佸彇鍙�
-            listControl[0].IsSelected = !listControl[0].IsSelected;
             //鍙戦�佺瓑寰呯殑鏃堕棿鍐�,涓嶈兘婊戝姩褰╃伅鎺т欢
             waveSeekBar.IsClickable = false;
+            //鐘舵�佸彇鍙�
+            listControl[0].IsSelected = !listControl[0].IsSelected;
             if (isOpen == true)
             {
                 waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarColor_Start, ZigbeeColor.Current.GXCWaveSeekBarColor_End);
-            }
-            else
-            {
-                waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor);
-            }
-
-            if (isOpen == true)
-            {
                 //鎵撳紑
                 this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uOpen1));
                 this.device.SwitchControl(1);
             }
             else
             {
+                waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor);
                 //鍏抽棴
                 this.SetStatuText(Language.StringByID(R.MyInternationalizationString.Close));
                 this.device.SwitchControl(0);
diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs
index 8fb999c..27098e8 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs
@@ -83,6 +83,22 @@
             btnOpen.Y = Application.GetRealHeight(994) - btnOpen.YOffset;
             btnOpen.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    ((Rollershade)device).WcdCurrentPositionLiftPercentage = 100;
+                    if (this.WcdType == 0)
+                    {
+                        SeekBarSiphonateCurtain.Progress = 100;
+                    }
+                    else
+                    {
+                        SeekBarOpenCurtain.Progress = 100;
+                    }
+                    //璁剧疆鐘舵�佹枃瀛�
+                    this.SetStatuText(HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device));
+                    return;
+                }
                 //鍙戦�佺獥甯樺懡浠�
                 this.SetCurtainCommand(0);
             };
@@ -98,6 +114,11 @@
             btnStop.Y = btnOpen.Y;
             btnStop.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    return;
+                }
                 //鍙戦�佺獥甯樺懡浠�
                 this.SetCurtainCommand(2);
             };
@@ -111,6 +132,22 @@
             btnClose.Y = btnOpen.Y;
             btnClose.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    ((Rollershade)device).WcdCurrentPositionLiftPercentage = 0;
+                    if (this.WcdType == 0)
+                    {
+                        SeekBarSiphonateCurtain.Progress = 0;
+                    }
+                    else
+                    {
+                        SeekBarOpenCurtain.Progress = 0;
+                    }
+                    //璁剧疆鐘舵�佹枃瀛�
+                    this.SetStatuText(HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device));
+                    return;
+                }
                 //鍙戦�佺獥甯樺懡浠�
                 this.SetCurtainCommand(1);
             };
@@ -143,8 +180,8 @@
             //鍗峰笜鎺т欢
             this.SeekBarSiphonateCurtain = new CurtainRollSeekBar();
             SeekBarSiphonateCurtain.Y = Application.GetRealHeight(300);
-            SeekBarSiphonateCurtain.Width = Application.GetMinRealAverage(438);
-            SeekBarSiphonateCurtain.Height = Application.GetMinRealAverage(576);
+            SeekBarSiphonateCurtain.Width = this.GetPictrueRealSize(438);
+            SeekBarSiphonateCurtain.Height = this.GetPictrueRealSize(576);
             SeekBarSiphonateCurtain.Gravity = Gravity.CenterHorizontal;
             SeekBarSiphonateCurtain.Progress = (device as Rollershade).WcdCurrentPositionLiftPercentage;
             frameWhiteBack.AddChidren(SeekBarSiphonateCurtain);
@@ -193,7 +230,16 @@
                 //鍙樻洿杩涘害鐧惧垎姣旂殑鏄剧ず
                 btnProgress.Y = progressY + SeekBarSiphonateCurtain.NowProgressY;
                 btnProgress.Text = value + "%";
-                nowProgressValue = value;
+
+                if (Common.Config.Instance.Home.IsVirtually == false)
+                {
+                    nowProgressValue = value;
+                }
+                else
+                {
+                    //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鐩存帴鏀圭紦瀛�
+                    (device as Rollershade).WcdCurrentPositionLiftPercentage = value;
+                }
             };
 
             if (this.hadInitControl == true)
@@ -233,8 +279,8 @@
             //寮�鍚堝笜鎺т欢
             this.SeekBarOpenCurtain = new CurtainSeekBar();
             SeekBarOpenCurtain.Y = Application.GetRealHeight(334);
-            SeekBarOpenCurtain.Width = Application.GetMinRealAverage(570);
-            SeekBarOpenCurtain.Height = Application.GetMinRealAverage(513);
+            SeekBarOpenCurtain.Width = this.GetPictrueRealSize(570);
+            SeekBarOpenCurtain.Height = this.GetPictrueRealSize(513);
             SeekBarOpenCurtain.Gravity = Gravity.CenterHorizontal;
             SeekBarOpenCurtain.IsProgressTextShow = false;
             SeekBarOpenCurtain.Progress = (device as Rollershade).WcdCurrentPositionLiftPercentage;
@@ -280,7 +326,16 @@
             {
                 btnProgress.X = progressX + SeekBarOpenCurtain.NowProgressX - Application.GetMinReal(5);
                 btnProgress.Text = value + "%";
-                nowProgressValue = value;
+
+                if (Common.Config.Instance.Home.IsVirtually == false)
+                {
+                    nowProgressValue = value;
+                }
+                else
+                {
+                    //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鐩存帴淇敼缂撳瓨
+                    (device as Rollershade).WcdCurrentPositionLiftPercentage = value;
+                }
             };
 
             //寮�涓�涓嚎绋�,鐩戣鏄惁婊戝姩鐨勬粦鍔ㄦ潯,姣忕妫�娴嬩竴娆�
diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs
new file mode 100755
index 0000000..32925fc
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs
@@ -0,0 +1,322 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared.Common;
+using Shared.Phone.UserCenter;
+using ZigBee.Device;
+
+namespace Shared.Phone.MainPage.ControlForm
+{
+    /// <summary>
+    /// 鏂伴绫诲瀷鐨勬繁搴﹀崱鐗囩晫闈�
+    /// </summary>
+    public class DeviceFreshAirDetailCardForm : DeviceDetailCardCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________ 
+        /// <summary>
+        /// 鐣岄潰涓婂彲浠ユ搷浣滅殑鎺т欢
+        /// </summary>
+        private List<ButtonBase> listControl = new List<ButtonBase>();
+        /// <summary>
+        /// 鎺т欢
+        /// </summary>
+        private FreshAir FreshAirDev = null;
+        /// <summary>
+        /// 鐘舵�佹帶浠�
+        /// </summary>
+        private NormalViewControl btnStatu = null;
+        /// <summary>
+        /// 褰撳墠鐨勬枃鏈�
+        /// </summary>
+        private string CurrentText = string.Empty;
+
+        /// <summary>
+        /// 璁惧鍚嶇О鎺т欢
+        /// </summary>
+        private NormalViewControl btnDeviceName = null;
+
+        #endregion
+
+
+        #region 鈻� 鍒濆鍖朹____________________________
+        public override void InitMiddleFrameAfter(FrameLayout frameWhiteBack)
+        {
+
+            //宸︽粦涓嶈兘
+            this.ScrollEnabled = true;
+            this.FreshAirDev = (FreshAir)this.device;
+            //鍏堟竻绌�
+            this.listControl = new List<ButtonBase>();
+            InitFreshAirControl(frameWhiteBack);
+            UpdateStatus();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栨柊椋庢帶浠�
+        /// </summary>
+        /// <param name="frameWhiteBack"></param>
+        private void InitFreshAirControl(FrameLayout frameWhiteBack)
+        {
+            //鏂伴鎺т欢鐨勫鍣�
+            var frameAcBack = new FrameLayout();
+            frameAcBack.Y = Application.GetRealHeight(262);
+            frameAcBack.Width = Application.GetMinRealAverage(444);
+            frameAcBack.Height = Application.GetMinRealAverage(444);
+            frameAcBack.Gravity = Gravity.CenterHorizontal;
+            frameAcBack.BackgroundImagePath = "FreshAir/FreshAirPic.png";
+            frameWhiteBack.AddChidren(frameAcBack);
+
+            // 鑷姩锛堢1涓紝listControl銆�0銆戯級
+            var btnAuto = new NormalViewControl(213, 63, true);
+            btnAuto.X = Application.GetRealWidth(275);
+            btnAuto.Y = Application.GetRealHeight(821);
+            btnAuto.TextID = R.MyInternationalizationString.Mode_Auto;
+            btnAuto.TextColor = ZigbeeColor.Current.XMGray3;
+            btnAuto.IsBold = false;
+            btnAuto.TextAlignment = TextAlignment.Center;
+            frameWhiteBack.AddChidren(btnAuto);
+            this.listControl.Add(btnAuto);
+            btnAuto.ButtonClickEvent += (sender, e) =>
+            {
+                if (!btnAuto.IsSelected)
+                {
+                    this.SetFanComand(5);
+                }
+            };
+
+            //鑷姩涓嬪垝绾匡紙绗�2涓紝listControl銆�1銆戯級
+            var btnAutoLine = new NormalViewControl(72, 12, true);
+            btnAutoLine.X = Application.GetRealWidth(346);
+            btnAutoLine.Y = Application.GetRealHeight(896);
+            btnAutoLine.BackgroundColor = ZigbeeColor.Current.XMOrange;
+            btnAutoLine.Visible = false;
+            frameWhiteBack.AddChidren(btnAutoLine);
+            this.listControl.Add(btnAutoLine);
+
+            //鎵嬪姩锛堢3涓紝listControl銆�2銆戯級
+            var btnManual = new NormalViewControl(213, 63, true);
+            btnManual.X = Application.GetRealWidth(488);
+            btnManual.Y = btnAuto.Y;
+            btnManual.TextID = R.MyInternationalizationString.Manual;
+            btnManual.TextColor = ZigbeeColor.Current.XMGray3;
+            btnManual.IsBold = false;
+            btnManual.TextAlignment = TextAlignment.Center;
+            frameWhiteBack.AddChidren(btnManual);
+            this.listControl.Add(btnManual);
+            btnManual.ButtonClickEvent += (sender, e) =>
+            {
+                if (!btnManual.IsSelected)
+                {
+                    this.SetFanComand(7);
+                }
+            };
+
+            //鎵嬪姩涓嬪垝绾匡紙绗�4涓紝listControl銆�3銆戯級
+            var btnManualLine = new NormalViewControl(72, 12, true);
+            btnManualLine.X = Application.GetRealWidth(560);
+            btnManualLine.BackgroundColor = ZigbeeColor.Current.XMOrange;
+            btnManualLine.Y = btnAutoLine.Y;
+            btnManualLine.Visible = false;
+            frameWhiteBack.AddChidren(btnManualLine);
+            this.listControl.Add(btnManualLine);
+
+            //楂橀锛堢5涓紝listControl銆�4銆戯級
+            var btnHighSpeed = new IconViewControl(81);
+            btnHighSpeed.X = Application.GetRealWidth(207);
+            btnHighSpeed.Y = Application.GetRealHeight(999);
+            btnHighSpeed.UnSelectedImagePath = "AC/Fan_Height.png";
+            btnHighSpeed.SelectedImagePath = "AC/Fan_HeightSelected.png";
+            frameWhiteBack.AddChidren(btnHighSpeed);
+            this.listControl.Add(btnHighSpeed);
+            btnHighSpeed.ButtonClickEvent += (sender, e) =>
+            {
+                if (!btnHighSpeed.IsSelected)
+                {
+                    this.SetFanComand(3);
+                }
+            };
+
+            //寮�鍏筹紙绗�6涓紝listControl銆�5銆戯級
+            var btnSwitch = new IconViewControl(81);
+            btnSwitch.X = Application.GetRealWidth(444);
+            btnSwitch.Y = btnHighSpeed.Y;
+            btnSwitch.UnSelectedImagePath = "AC/OpenOrClose.png";
+            btnSwitch.SelectedImagePath = "AC/OpenOrCloseSelected.png";
+            frameWhiteBack.AddChidren(btnSwitch);
+            this.listControl.Add(btnSwitch);
+            btnSwitch.ButtonClickEvent += (sender, e) =>
+            {
+                btnSwitch.IsSelected = !btnSwitch.IsSelected;
+                if (btnSwitch.IsSelected)
+                {
+                    this.SetFanComand(4);
+                }
+                else
+                {
+                    this.SetFanComand(0);
+                }
+            };
+
+            //浣庨锛堢7涓紝listControl銆�6銆戯級
+            var btnLowSpeed = new IconViewControl(81);
+            btnLowSpeed.X = Application.GetRealWidth(677);
+            btnLowSpeed.Y = btnHighSpeed.Y;
+            btnLowSpeed.UnSelectedImagePath = "AC/Fan_Low.png";
+            btnLowSpeed.SelectedImagePath = "AC/Fan_LowSelected.png";
+            frameWhiteBack.AddChidren(btnLowSpeed);
+            this.listControl.Add(btnLowSpeed);
+            btnLowSpeed.ButtonClickEvent += (sender, e) =>
+            {
+                if (!btnLowSpeed.IsSelected)
+                {
+                    this.SetFanComand(1);
+                }
+            };
+        }
+        #endregion 
+
+        #region 鈻� 鏄惁鑾峰彇缃戝叧鍙嶉鐨勭粨鏋淿____________
+
+        /// <summary>
+        /// 妫�娴嬬綉鍏崇殑鍙嶉缁撴灉(灞炴�т笂鎶ョ殑瀵硅薄锛歞evice.DeviceStatusReport)
+        /// </summary>
+        /// <param name="comandDiv">鍛戒护鍖哄垎</param>
+        /// <param name="report">涓婃姤鏁版嵁</param>
+        /// <returns></returns>
+        public override bool CheckResponeResultStatu(ReceiveComandDiv comandDiv, CommonDevice report)
+        {
+            if (comandDiv == ReceiveComandDiv.A璁惧灞炴�т笂鎶�)
+            {
+                if (report.DeviceStatusReport.CluterID == 514)
+                {
+                    var attriButeList = report.DeviceStatusReport.AttriBute;
+                    foreach (var attList in attriButeList)
+                    {
+                        if (attList.AttributeId == 0)
+                        {
+                            //椋庨��
+                            HdlThreadLogic.Current.RunMain(() =>
+                            {
+                                UpdateStatus();
+                            });
+
+                            //宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉
+                            return true;
+                        }
+                    }
+                }
+            }
+            return false;
+        }
+        #endregion
+
+        #region 鈻� 璁剧疆鏂规硶 
+        /// <summary>
+        ///鍛戒护
+        ///0:Off
+        ///1:Low
+        ///3:High
+        ///4:On
+        ///5:Auto
+        /// 7:Manual
+        /// </summary> 
+        private void SetFanComand(int command)
+        {
+            //妫�娴嬫槸鍚﹁幏鍙栫綉鍏冲弽棣堢殑缁撴灉,濡傛灉缃戝叧娌℃湁鍥炲,鍒欎細寮瑰嚭娑堟伅
+            this.StartCheckResponeResult(this.listControl, (result) =>
+            {
+                //鎺ユ敹鍒扮綉鍏冲洖澶�
+                if (result == true)
+                {
+                }
+            });
+
+            switch (command)
+            {
+                case 0:
+                    FreshAirDev.Close();
+                    break;
+                case 1:
+                    FreshAirDev.SetLowSpeed();
+                    break;
+                case 3:
+                    FreshAirDev.SetHighSpeed();
+                    break;
+                case 4:
+                    FreshAirDev.Open();
+                    break;
+                case 5:
+                    FreshAirDev.SetAuto();
+                    break;
+                case 7:
+                    FreshAirDev.SetManual();
+                    break;
+            }
+        }
+        #endregion
+
+        #region 鈻� 鍒锋柊鐘舵�乢____________
+        /// <summary>
+        /// 鍒锋柊鐘舵��
+        /// </summary>
+        private void UpdateStatus()
+        {
+            //璁剧疆鐘舵�佹枃瀛�
+            if (FreshAirDev.currentFanStatus == 4)
+            {
+                //鎵撳紑
+                this.listControl[5].IsSelected = true;
+                //璁剧疆鐘舵�佹枃瀛� 
+                this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uOpen1));
+            }
+            if (FreshAirDev.currentFanStatus == 0)
+            {
+                //鍏抽棴
+                this.listControl[0].TextColor = ZigbeeColor.Current.XMGray3;
+                this.listControl[0].IsBold = false;
+                this.listControl[1].Visible = false;
+                this.listControl[2].TextColor = ZigbeeColor.Current.XMGray3;
+                this.listControl[2].IsBold = false;
+                this.listControl[3].Visible = false;
+                this.listControl[4].IsSelected = false;
+                this.listControl[5].IsSelected = false;
+                this.listControl[6].IsSelected = false;
+                //璁剧疆鐘舵�佹枃瀛� 
+                this.SetStatuText(Language.StringByID(R.MyInternationalizationString.Close));
+                return;
+            }
+
+            //璁剧疆妯″紡
+            if (FreshAirDev.currentFanMode == 5)
+            {
+                this.listControl[0].TextColor = ZigbeeColor.Current.XMGray1;
+                this.listControl[0].IsBold = true;
+                this.listControl[1].Visible = true;
+                this.listControl[2].TextColor = ZigbeeColor.Current.XMGray3;
+                this.listControl[2].IsBold = false;
+                this.listControl[3].Visible = false;
+            }
+            else if (FreshAirDev.currentFanMode == 7)
+            {
+                this.listControl[0].TextColor = ZigbeeColor.Current.XMGray3;
+                this.listControl[0].IsBold = false;
+                this.listControl[1].Visible = false;
+                this.listControl[2].TextColor = ZigbeeColor.Current.XMGray1;
+                this.listControl[2].IsBold = true;
+                this.listControl[3].Visible = true;
+            }
+
+            //璁剧疆椋庨��
+            if (FreshAirDev.currentFanSpeed == 1)
+            {
+                this.listControl[4].IsSelected = false;
+                this.listControl[6].IsSelected = true;
+            }
+            else if (FreshAirDev.currentFanSpeed == 3)
+            {
+                this.listControl[4].IsSelected = true;
+                this.listControl[6].IsSelected = false;
+            }
+        }
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs
index 542282a..885111b 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs
@@ -109,8 +109,8 @@
         {
             //寮�鍏崇殑鑳屾櫙鍥剧墖
             var picSwitchBack = new FrameLayout();
-            picSwitchBack.Height = Application.GetMinRealAverage(579);
-            picSwitchBack.Width = Application.GetMinRealAverage(579);
+            picSwitchBack.Height = this.GetPictrueRealSize(579);
+            picSwitchBack.Width = this.GetPictrueRealSize(579);
             picSwitchBack.Y = Application.GetRealHeight(340);
             picSwitchBack.BackgroundImagePath = "Light/OnOff.png";
             picSwitchBack.Gravity = Gravity.CenterHorizontal;
@@ -120,8 +120,8 @@
             var btnClose = new IconViewControl(81);
             btnClose.UnSelectedImagePath = "Light/OFF.png";
             btnClose.SelectedImagePath = "Light/OFFSelected.png";
-            btnClose.X = Application.GetMinRealAverage(101);
-            btnClose.Y = Application.GetMinRealAverage(248);
+            btnClose.X = this.GetPictrueRealSize(101);
+            btnClose.Y = this.GetPictrueRealSize(248);
             picSwitchBack.AddChidren(btnClose);
             listControl.Add(btnClose);
 
@@ -129,7 +129,7 @@
             var btnOpen = new IconViewControl(81);
             btnOpen.UnSelectedImagePath = "Light/ON.png";
             btnOpen.SelectedImagePath = "Light/ONSelected.png";
-            btnOpen.X = Application.GetMinRealAverage(397);
+            btnOpen.X = this.GetPictrueRealSize(397);
             btnOpen.Y = btnClose.Y;
             picSwitchBack.AddChidren(btnOpen);
             listControl.Add(btnOpen);
@@ -273,6 +273,16 @@
         /// <param name="isOpen"></param>
         private void SetSwitchCommand(bool isOpen)
         {
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                ((LightBase)this.device).OnOffStatus = isOpen == true ? 1 : 0;
+                //鍙樻洿鍗$墖鐘舵��
+                this.RefreshSwitchStatu(((LightBase)this.device).OnOffStatus == 1);
+                //璁剧疆鐘舵�佹枃瀛�
+                this.SetStatuText(HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device));
+                return;
+            }
             //妫�娴嬫槸鍚﹁幏鍙栫綉鍏冲弽棣堢殑缁撴灉,濡傛灉缃戝叧娌℃湁鍥炲,鍒欎細寮瑰嚭娑堟伅
             this.StartCheckResponeResult(this.listControl, (result) =>
             {
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs
index e40e221..fbc388a 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs
@@ -9,7 +9,7 @@
     /// <summary>
     /// 涓婚〉鐨勮澶囧崱鐗囨帶浠跺簳灞傚叡閫�(瀹藉害:458 + 14 * 2 楂樺害:305 + 43)
     /// </summary>
-    public class DeviceCardCommon : FrameLayoutControl
+    public class DeviceCardCommon : FrameLayoutStatuControl
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
@@ -145,7 +145,7 @@
             this.ChangedChidrenBindMode(fraDeviceRound, ChidrenBindMode.BindEventOnly);
 
             //鐘舵�佹枃鏈帶浠�
-            this.btnStatu = new NormalViewControl(HdlControlLogic.Current.GetPictrueRealSize(280), HdlControlLogic.Current.GetPictrueRealSize(63), false);
+            this.btnStatu = new NormalViewControl(HdlControlLogic.Current.GetPictrueRealSize(300), HdlControlLogic.Current.GetPictrueRealSize(63), false);
             btnStatu.X = HdlControlLogic.Current.GetPictrueRealSize(46);
             btnStatu.Y = HdlControlLogic.Current.GetPictrueRealSize(236);
             btnStatu.TextColor = UserCenterColor.Current.TextColor1;
@@ -195,6 +195,8 @@
             }
             //璁惧鍥炬爣涔熷埛鏂�
             Common.LocalDevice.Current.SetDeviceIconToControl2(btnDeviceIcon, i_device);
+            //鍚嶅瓧鍒锋柊
+            this.btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device);
             //妫�娴嬭澶囨槸鍚︽槸鎵撳紑鐘舵��
             bool isOpen = this.CheckIsOpenStatu(i_device);
             if (this.isHadOpenSwitch == true && i_device.HadReadDeviceStatu == false)
@@ -343,6 +345,11 @@
         /// <param name="oldOpenStatu">璁惧鐩墠鐨勫紑鍏崇姸鎬�</param>
         public void StartCheckResponeResult(bool oldOpenStatu)
         {
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                return;
+            }
             this.ResponeResult = 0;
             //寮�鍏虫寜閽笉鑳藉啀鐐瑰嚮
             if (btnSwitch != null) { this.btnSwitch.CanClick = false; }
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAcCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAcCardControl.cs
index 91fb30f..fecfda3 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAcCardControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAcCardControl.cs
@@ -28,6 +28,15 @@
             var btnSwitch = this.AddSwitchControl();
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    //鐩存帴鍙樻洿缂撳瓨
+                    ((AC)i_device).currentSystemMode = btnSwitch.IsSelected == true ? 0 : 3;
+                    this.RefreshControlInfo(this.device);
+                    return;
+                }
+
                 bool setStatu = !btnSwitch.IsSelected;
                 //鍙樻洿鍗$墖鐘舵��
                 this.SetCardOpenStatu(setStatu);
@@ -93,6 +102,11 @@
         /// </summary>
         public override void SendStatuComand()
         {
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                return;
+            }
             //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
             if (this.CheckCanSendStatuComand() == true)
             {
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirSwitchCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirSwitchCardControl.cs
index 9502ec5..d37e7e5 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirSwitchCardControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirSwitchCardControl.cs
@@ -28,6 +28,14 @@
             var btnSwitch = this.AddSwitchControl();
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    //鐩存帴鍙樻洿缂撳瓨
+                    ((LightBase)i_device).OnOffStatus = btnSwitch.IsSelected == true ? 0 : 1;
+                    this.RefreshControlInfo(this.device);
+                    return;
+                }
                 bool setStatu = !btnSwitch.IsSelected;
                 //鍙樻洿鍗$墖鐘舵��
                 this.SetCardOpenStatu(setStatu);
@@ -107,6 +115,11 @@
         /// </summary>
         public override void SendStatuComand()
         {
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                return;
+            }
             //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
             if (this.CheckCanSendStatuComand() == true)
             {
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceColorLightCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceColorLightCardControl.cs
index 757165b..1d249da 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceColorLightCardControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceColorLightCardControl.cs
@@ -28,6 +28,14 @@
             var btnSwitch = this.AddSwitchControl();
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    //鐩存帴鍙樻洿缂撳瓨
+                    ((LightBase)i_device).OnOffStatus = btnSwitch.IsSelected == true ? 0 : 1;
+                    this.RefreshControlInfo(this.device);
+                    return;
+                }
                 bool setStatu = !btnSwitch.IsSelected;
                 //鍙樻洿鍗$墖鐘舵��
                 this.SetCardOpenStatu(setStatu);
@@ -93,6 +101,11 @@
         /// </summary>
         public override void SendStatuComand()
         {
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                return;
+            }
             //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
             if (this.CheckCanSendStatuComand() == true)
             {
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceCurtainCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceCurtainCardControl.cs
index 28cfa9e..e0184f4 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceCurtainCardControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceCurtainCardControl.cs
@@ -28,6 +28,15 @@
             var btnSwitch = this.AddSwitchControl();
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    //鐩存帴鍙樻洿缂撳瓨
+                    ((Rollershade)i_device).WcdCurrentPositionLiftPercentage = btnSwitch.IsSelected == true ? 0 : 100;
+                    this.RefreshControlInfo(this.device);
+                    return;
+                }
+
                 bool setStatu = !btnSwitch.IsSelected;
                 //鍙樻洿鍗$墖鐘舵��
                 this.SetCardOpenStatu(setStatu);
@@ -92,6 +101,11 @@
         /// </summary>
         public override void SendStatuComand()
         {
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                return;
+            }
             //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
             if (this.CheckCanSendStatuComand() == true)
             {
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceDoorLockCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceDoorLockCardControl.cs
index 5e9c574..fdc89bc 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceDoorLockCardControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceDoorLockCardControl.cs
@@ -19,9 +19,12 @@
         public override void InitControl(CommonDevice i_device)
         {
             base.InitControl(i_device);
-
-            //娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
-            this.AddDetailInfoEvent(i_device);
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+            if (Common.Config.Instance.Home.IsVirtually == false)
+            {
+                //娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+                this.AddDetailInfoEvent(i_device);
+            }
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceRelayCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceRelayCardControl.cs
index 7c6bdbb..738ffde 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceRelayCardControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceRelayCardControl.cs
@@ -28,6 +28,15 @@
             var btnSwitch = this.AddSwitchControl();
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    //鐩存帴鍙樻洿缂撳瓨
+                    ((LightBase)i_device).OnOffStatus = btnSwitch.IsSelected == true ? 0 : 1;
+                    this.RefreshControlInfo(this.device);
+                    return;
+                }
+
                 bool setStatu = !btnSwitch.IsSelected;
                 //鍙樻洿鍗$墖鐘舵��
                 this.SetCardOpenStatu(setStatu);
@@ -107,6 +116,11 @@
         /// </summary>
         public override void SendStatuComand()
         {
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                return;
+            }
             //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
             if (this.CheckCanSendStatuComand() == true)
             {
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceTemperatureCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceTemperatureCardControl.cs
index b9b5160..85f4a84 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceTemperatureCardControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceTemperatureCardControl.cs
@@ -17,6 +17,11 @@
         /// </summary>
         public override void SendStatuComand()
         {
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                return;
+            }
             //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
             if (this.CheckCanSendStatuComand() == true)
             {
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceFunctionUnallocatedControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceFunctionUnallocatedControl.cs
index f23edeb..3bd2403 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceFunctionUnallocatedControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceFunctionUnallocatedControl.cs
@@ -8,7 +8,7 @@
     /// <summary>
     /// 鏈垎閰嶇晫闈㈢殑璁惧鍔熻兘鍥炬爣鎺т欢
     /// </summary>
-    public class DeviceFunctionUnallocatedControl : FrameLayoutControl
+    public class DeviceFunctionUnallocatedControl : FrameLayoutStatuControl
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceSelectUnallocatedControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceSelectUnallocatedControl.cs
index aafb758..aa87c60 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceSelectUnallocatedControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceSelectUnallocatedControl.cs
@@ -79,11 +79,11 @@
             this.device = i_device;
             //璁惧鍥炬爣鑳屾櫙鎺т欢
             this.frameIconBackGroud = new FrameLayout();
-            frameIconBackGroud.Height = Application.GetMinRealAverage(112);
-            frameIconBackGroud.Width = Application.GetMinRealAverage(112);
+            frameIconBackGroud.Height = this.GetPictrueRealSize(112);
+            frameIconBackGroud.Width = this.GetPictrueRealSize(112);
             frameIconBackGroud.Gravity = Gravity.CenterVertical;
             frameIconBackGroud.X = Application.GetRealWidth(46);
-            frameIconBackGroud.Radius = (uint)Application.GetMinRealAverage(112 / 2);
+            frameIconBackGroud.Radius = (uint)this.GetPictrueRealSize(112 / 2);
             frameIconBackGroud.BackgroundColor = Common.ZigbeeColor.Current.GXCGrayBackgroundColor;
             this.AddChidren(frameIconBackGroud, ChidrenBindMode.NotBind);
             if (chidrenYaxis != 0)
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/ListRoomCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/ListRoomCardControl.cs
index 319a7f6..02125b8 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/ListRoomCardControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/ListRoomCardControl.cs
@@ -8,7 +8,7 @@
     /// <summary>
     /// 宸︽粦鐨勬埧闂村垪琛ㄧ晫闈㈤噷闈㈢殑鎴块棿鍗$墖鎺т欢
     /// </summary>
-    public class ListRoomCardControl : FrameLayoutControl
+    public class ListRoomCardControl : FrameLayoutStatuControl
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/SafetyShortcutControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/SafetyShortcutControl.cs
index 38484ea..b8df966 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/SafetyShortcutControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/SafetyShortcutControl.cs
@@ -21,8 +21,8 @@
         /// </summary>
         public SafetyShortcutControl()
         {
-            this.Height = Application.GetMinRealAverage(69);
-            this.Width = Application.GetMinRealAverage(69);
+            this.Height = HdlControlLogic.Current.GetPictrueRealSize(69);
+            this.Width = HdlControlLogic.Current.GetPictrueRealSize(69);
             this.UnSelectedImagePath = "Item/SafetyShortcut.png";
             this.MouseUpEventHandler += (sender, e) =>
             {
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs
index fbb0cd2..58b89b3 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs
@@ -8,7 +8,7 @@
     /// <summary>
     /// 鍦烘櫙鍗$墖鎺т欢
     /// </summary>
-    public class SceneCardControl : FrameLayoutControl
+    public class SceneCardControl : FrameLayoutStatuControl
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
diff --git a/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs b/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs
index 3f52cff..3e38a1c 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs
@@ -86,11 +86,9 @@
             btnPic.InitControl(device.DeviceAddr, device.DeviceEpoint);
             btnPic.ButtonClickEvent += (sender, e) =>
             {
-                var localPic = new Device.CommonForm.DeviceIconSelectedIMGByLocal();
-                UserView.HomePage.Instance.AddChidren(localPic);
-                UserView.HomePage.Instance.PageIndex += 1;
-                localPic.Show();
-                localPic.action = (unSelectedImagePath, selectedImagePath) =>
+                var form = new SelectLocalDeviceImageForm();
+                form.AddForm();
+                form.FinishSelectEvent = (unSelectedImagePath) =>
                 {
                     //鍙樻洿鍥剧墖
                     device.IconPath = unSelectedImagePath;
@@ -151,7 +149,7 @@
             }
 
             //鎵�灞炴ā鍧�
-            caption = Language.StringByID(R.MyInternationalizationString.BelongModel);
+            caption = Language.StringByID(R.MyInternationalizationString.BelongDevice);
             deviceName = Common.LocalDevice.Current.GetDeviceMacName(device);
             var rowBelongModul = new FrameCaptionViewControl(caption, deviceName, listview.rowSpace / 2);
             listview.AddChidren(rowBelongModul);
@@ -248,7 +246,7 @@
             }
 
             //鎵�灞炴ā鍧�
-            caption = Language.StringByID(R.MyInternationalizationString.BelongModel);
+            caption = Language.StringByID(R.MyInternationalizationString.BelongDevice);
             nameValue = Common.LocalDevice.Current.GetDeviceMacName(device);
             var rowBelongModul = new FrameCaptionViewControl(caption, nameValue, listview.rowSpace / 2);
             rowBelongModul.UseClickStatu = false;
@@ -360,6 +358,20 @@
                     };
                 }
             }
+
+            //濡傛灉鏄柊椋�
+            if (device.Type == DeviceType.FreshAir)
+            {
+                //鍔熻兘绫诲瀷
+                string caption = Language.StringByID(R.MyInternationalizationString.uFunctionType);
+                string strType = Language.StringByID(R.MyInternationalizationString.FreshAir);
+                var btnFunction = new FrameCaptionViewControl(caption, strType, listview.rowSpace / 2);
+                btnFunction.UseClickStatu = false;
+                listview.AddChidren(btnFunction);
+                btnFunction.InitControl();
+                //搴曠嚎
+                btnFunction.AddBottomLine();
+            }
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
index cfbcfbf..fb67b15 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -187,7 +187,7 @@
             }
 
             //妫�娴嬫槸鍚︾粦瀹氭湁缃戝叧
-            if (this.CheckHadBindGateway() == false)
+            if (Common.Config.Instance.Home.IsVirtually == false && this.CheckHadBindGateway() == false)
             {
                 //鏄剧ず娌℃湁缁戝畾杩囩綉鍏崇殑鐣岄潰
                 this.ShowNoGatewayTip();
@@ -312,7 +312,7 @@
             bg.UnSelectedImagePath = "Item/NoBindGW.png";
             this.listBodyContr.frameTable.AddChidren(bg);
 
-            var tip = new NormalViewControl(Application.GetMinRealAverage(717), Application.GetMinRealAverage(58), false);
+            var tip = new NormalViewControl(this.GetPictrueRealSize(717), this.GetPictrueRealSize(58), false);
             tip.Y = Application.GetRealHeight(815);
             tip.Gravity = Gravity.CenterHorizontal;
             tip.TextID = R.MyInternationalizationString.NewAccountNeedBingGW;
@@ -573,7 +573,7 @@
             //璁惧璁℃暟
             int contrCount = 0;
             //X杞村潗鏍�(鍥剧墖宸﹁竟鏈変綑鐧�)
-            int XX = Application.GetMinRealAverage(44);
+            int XX = this.GetPictrueRealSize(44);
             //Y杞村潗鏍�
             int YY = 0;
             var listContr = new List<Controls.DeviceCardCommon>();
@@ -647,11 +647,11 @@
                     //璁惧璁℃暟
                     contrCount++;
                     //鍗$墖宸﹀彸涓よ竟鏈�14鐨勪綑鐧�,姣忎袱涓悗,X杞撮噸缃�
-                    XX = contrCount % 2 == 0 ? Application.GetMinRealAverage(44) : cardContr.Right + Application.GetMinRealAverage(20);
+                    XX = contrCount % 2 == 0 ? this.GetPictrueRealSize(44) : cardContr.Right + this.GetPictrueRealSize(20);
                     if (contrCount % 2 == 0)
                     {
                         //娌′袱涓箣鍚�,Y杞撮�掑
-                        YY = cardContr.Bottom + Application.GetMinRealAverage(15);
+                        YY = cardContr.Bottom + this.GetPictrueRealSize(15);
                     }
                     //鎺т欢璁板綍鍒扮紦瀛樹腑
                     this.dicDeviceCardControl[LocalDevice.Current.GetDeviceMainKeys(device)] = cardContr;
@@ -699,8 +699,8 @@
             var noFunction = new Button
             {
                 Y = Application.GetRealHeight(69),
-                Width = Application.GetMinRealAverage(683),
-                Height = Application.GetMinRealAverage(392),
+                Width = this.GetPictrueRealSize(683),
+                Height = this.GetPictrueRealSize(392),
                 Gravity = Gravity.CenterHorizontal,
                 UnSelectedImagePath = "Item/NoFunction.png"
             };
@@ -755,12 +755,12 @@
                 if (contrCount % 2 == 1)
                 {
                     //绗竴涓浐瀹�44
-                    XX = Application.GetMinRealAverage(44);
+                    XX = this.GetPictrueRealSize(44);
                 }
                 else
                 {
                     //绗簩涓槸44+鎺т欢瀹藉害+20浣欑櫧
-                    XX = Application.GetMinRealAverage(44) + this.dicDeviceCardControl[mainkey].Width + Application.GetMinRealAverage(20);
+                    XX = this.GetPictrueRealSize(44) + this.dicDeviceCardControl[mainkey].Width + this.GetPictrueRealSize(20);
                 }
 
                 //姣忎袱涓箣鍚�,骞朵笖鏄涓�涓殑鏃跺��,Y杞撮�掑
@@ -769,7 +769,7 @@
                     //姹傚晢
                     int value = contrCount / 2;
                     //鎺т欢鐨勫簳閮ㄦ湁15鐨勯棿闅�
-                    YY = value * (this.dicDeviceCardControl[mainkey].Height + Application.GetMinRealAverage(15));
+                    YY = value * (this.dicDeviceCardControl[mainkey].Height + this.GetPictrueRealSize(15));
                 }
                 if (canMove == true)
                 {
@@ -1009,12 +1009,12 @@
                 if (contrCount % 2 == 1)
                 {
                     //绗竴涓浐瀹�44
-                    XX = Application.GetMinRealAverage(44);
+                    XX = this.GetPictrueRealSize(44);
                 }
                 else
                 {
                     //绗簩涓槸44+鎺т欢瀹藉害+20浣欑櫧
-                    XX = Application.GetMinRealAverage(44) + this.dicSceneCardControl[sceneId].Width + Application.GetMinRealAverage(20);
+                    XX = this.GetPictrueRealSize(44) + this.dicSceneCardControl[sceneId].Width + this.GetPictrueRealSize(20);
                 }
 
                 //姣忎袱涓箣鍚�,骞朵笖鏄涓�涓椂,Y杞撮�掑
@@ -1023,7 +1023,7 @@
                     //姹傚晢
                     int value = contrCount / 2;
                     //鎺т欢鐨勫簳閮ㄦ湁15鐨勯棿闅�
-                    YY = value * (this.dicSceneCardControl[sceneId].Height + Application.GetMinRealAverage(15));
+                    YY = value * (this.dicSceneCardControl[sceneId].Height + this.GetPictrueRealSize(15));
                 }
                 if (canMove == true)
                 {
@@ -1095,8 +1095,6 @@
                     Config.Instance.Save();
                     //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
                     await UserCenterLogic.InitUserCenterMenmoryAndThread();
-                    //鍒濆鍖栧叏閮ㄦ埧闂�
-                    HdlRoomLogic.Current.InitAllRoom();
 
                     Application.RunOnMainThread(() =>
                     {
diff --git a/ZigbeeApp/Shared/Phone/MainPage/ListRoomViewFrom.cs b/ZigbeeApp/Shared/Phone/MainPage/ListRoomViewFrom.cs
old mode 100644
new mode 100755
index 5ac8557..aa8dd52
--- a/ZigbeeApp/Shared/Phone/MainPage/ListRoomViewFrom.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/ListRoomViewFrom.cs
@@ -90,9 +90,9 @@
             };
 
             //鑾峰彇妤煎眰
-            if (this.curFloorId == string.Empty)
-            {
-                this.curFloorId = Config.Instance.Home.CurrentFloorId;
+            if (this.curFloorId == string.Empty)
+            {
+                this.curFloorId = Config.Instance.Home.CurrentFloorId;
             }
             var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
             if (dicFloor.Count == 0)
@@ -239,7 +239,7 @@
         private void InitRoomCardControl(int XX, int YY)
         {
             //妗屽竷鎺т欢
-            var frameBack = new FrameLayoutControl();
+            var frameBack = new FrameLayoutStatuControl();
             frameBack.X = XX;
             frameBack.Y = YY;
             frameBack.Width = this.GetPictrueRealSize(495);
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/SelectLocalDeviceImageForm.cs b/ZigbeeApp/Shared/Phone/MainPage/SelectLocalDeviceImageForm.cs
similarity index 77%
rename from ZigbeeApp/Shared/Phone/MainPage/Controls/SelectLocalDeviceImageForm.cs
rename to ZigbeeApp/Shared/Phone/MainPage/SelectLocalDeviceImageForm.cs
index 3cdfc7b..6b03468 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/SelectLocalDeviceImageForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/SelectLocalDeviceImageForm.cs
@@ -3,7 +3,7 @@
 using System.Collections.Generic;
 using System.Text;
 
-namespace Shared.Phone.MainPage.Controls
+namespace Shared.Phone.MainPage
 {
     /// <summary>
     /// 閫夋嫨鏈湴璁惧鍥剧墖鐨勭晫闈�
@@ -16,6 +16,10 @@
         /// 缁撴潫閫夋嫨鐨勪簨浠�(鍥剧墖鍚嶅瓧)
         /// </summary>
         public Action<string> FinishSelectEvent = null;
+        /// <summary>
+        /// 褰撳墠閫夋嫨鐨勫浘鏍囨帶浠�
+        /// </summary>
+        private PicViewControl selectContr = null;
 
         #endregion
 
@@ -29,7 +33,7 @@
             //鍒濆鍖栦腑閮ㄤ俊鎭�
             this.InitMiddleFrame();
             //璁剧疆澶撮儴淇℃伅
-            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.LocalPicture));
+            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.SelectIcon));
         }
 
         /// <summary>
@@ -63,7 +67,7 @@
                     listView.AddChidren(frameRow);
                 }
                 //鑳屾櫙
-                var frameBack = new FrameLayoutControl();
+                var frameBack = new FrameLayoutStatuControl();
                 frameBack.UseClickStatu = false;
                 frameBack.Height = backWidth;
                 frameBack.Width = backWidth;
@@ -82,17 +86,28 @@
 
                 frameBack.ButtonClickEvent += (sender, e) =>
                 {
-                    //缁撴潫閫夋嫨鐨勪簨浠�
-                    //this.FinishSelectEvent?.Invoke(btnIcon.ImagePath);
-                    this.CloseForm();
+                    btnIcon.IsSelected = !btnIcon.IsSelected;
+                    if (this.selectContr != null && this.selectContr.UnSelectedImagePath != btnIcon.UnSelectedImagePath)
+                    {
+                        //鍙栨秷鎺夊墠涓�涓�
+                        this.selectContr.IsSelected = false;
+                    }
+                    this.selectContr = btnIcon;
                 };
             }
 
-            //淇濆瓨
+            //纭畾
             var btnSave = new BottomClickButton();
-            btnSave.TextID = R.MyInternationalizationString.uSave;
+            btnSave.TextID = R.MyInternationalizationString.uConfirm1;
+            bodyFrameLayout.AddChidren(btnSave);
             btnSave.ButtonClickEvent += (sender, e) =>
             {
+                if (this.selectContr != null && this.selectContr.IsSelected == true)
+                {
+                    //璋冪敤鍥炶皟鍑芥暟
+                    this.FinishSelectEvent?.Invoke(this.selectContr.UnSelectedImagePath);
+                }
+                this.CloseForm();
             };
 
             //璋冩暣妗屽竷楂樺害
diff --git a/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs b/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
index e1f77c9..81d6f2a 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
@@ -18,7 +18,7 @@
         /// <summary>
         /// 娣诲姞鍒� 鐨勮儗鏅浘鎺т欢
         /// </summary>
-        private FrameLayoutControl frameAddBackGroud = null;
+        private FrameLayoutStatuControl frameAddBackGroud = null;
         /// <summary>
         /// 鍔熻兘鐨勬甯冩帶浠�
         /// </summary>
@@ -510,7 +510,7 @@
         private void InitAddToControl()
         {
             //娣诲姞鍒� 鐨勮儗鏅浘鎺т欢
-            this.frameAddBackGroud = new FrameLayoutControl();
+            this.frameAddBackGroud = new FrameLayoutStatuControl();
             frameAddBackGroud.UseClickStatu = false;
             frameAddBackGroud.Height = Application.GetRealHeight(202);
             frameAddBackGroud.Gravity = Gravity.BottomCenter;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
index 7b0dbfb..5ffb606 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
@@ -1,10 +1,9 @@
 锘縰sing System;
 using System.Collections.Generic;
 using System.Net;
-using System.Runtime.Remoting.Contexts;
 using System.Text;
 using Shared.Common;
-using Shared.Phone.Device.CommonForm;
+
 namespace Shared.Phone.UserCenter.Abount
 {
     /// <summary>
@@ -20,11 +19,11 @@
         /// <summary>
         /// The web client.
         /// </summary>
-        public WebClient webClient=new WebClient { };
+        public WebClient webClient = new WebClient { };
         /// <summary>
         /// 鏇存柊涓�
         /// </summary>
-        public Button updatingBtn;
+        public NormalViewControl btnUpdating;
         /// <summary>
         /// distributedMark
         /// </summary>
@@ -32,7 +31,7 @@
         /// <summary>
         /// updateRow
         /// </summary>
-        public DeviceInfoRow updateRow;
+        public FrameRowControl rowUpdate;
         /// <summary>
         /// 涓嬭浇瀹夊崜apk鐨刡yte闀垮害
         /// </summary>
@@ -40,13 +39,6 @@
 
         #endregion
 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:Shared.Phone.UserCenter.Abount.AbountForm"/> class.
-        /// </summary>
-        public AbountForm()
-        {
-
-        }
         /// <summary>
         /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
         /// </summary>
@@ -63,28 +55,9 @@
         public override void CloseFormBefore()
         {
 #if Android
-            //if (isUpdating == true)
-            //{
-                //var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.CancelUpdating), Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim));
-                //alert.Show();
-                //alert.ResultEventHandler += (send, e) =>
-                //{
-                //    if (e)
-                //    {
-                        SetDownLoadBtnNoVisible();
-                        CancelDownLoadApkAsync();
-                        base.CloseFormBefore();
-                    //}
-            //        else
-            //        {
-            //            return;
-            //        }
-            //    };
-            //}
-            //else
-            //{
-            //    base.CloseFormBefore();
-            //}
+            SetDownLoadBtnNoVisible();
+            CancelDownLoadApkAsync();
+            base.CloseFormBefore();
 #elif iOS
            base.CloseFormBefore();
 #endif
@@ -94,111 +67,103 @@
         /// </summary>
         private void InitMiddleFrame()
         {
-            bodyFrameLayout.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
-            var logoFrameLayout = new FrameLayout
-            {
-                Height = Application.GetRealHeight(484),
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
-            };
-            bodyFrameLayout.AddChidren(logoFrameLayout);
-
-            var logoBackground = new FrameLayout
-            {
-                Y = Application.GetRealHeight(104),
-                Width = Application.GetMinRealAverage(167),
-                Height = Application.GetMinRealAverage(167),
-                Gravity = Gravity.CenterHorizontal,
-                BackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor,
-                Radius = (uint)Application.GetRealHeight(37),
-            };
-            logoFrameLayout.AddChidren(logoBackground);
-
-            var logoBtn = new Button()
-            {
-                Width = Application.GetMinRealAverage(144),
-                Height = Application.GetMinRealAverage(144),
-                UnSelectedImagePath = "Account/Logo_White.png",
-                Gravity = Gravity.Center
-            };
-            logoBackground.AddChidren(logoBtn);
-
-            var nameBtn = new Button()
-            {
-                Y = Application.GetRealHeight(294),
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(60),
-                Gravity = Gravity.CenterHorizontal,
-                Text = "HDL Home",
-                TextSize = 15,
-                TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor
-            };
-            logoFrameLayout.AddChidren(nameBtn);
-
-            var versionBtn = new Button()
-            {
-                Y = Application.GetRealHeight(366),
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(50),
-                Gravity = Gravity.CenterHorizontal,
-                Text = $"{Language.StringByID(R.MyInternationalizationString.VersionCode)} {CommonPage.CodeIDString}",
-                TextSize = 12,
-                TextColor = ZigbeeColor.Current.GXCTextGrayColor
-            };
-            logoFrameLayout.AddChidren(versionBtn);
-
-
-            var versionFL = new FrameLayout
-            {
-                Y = Application.GetRealHeight(510),
-                //Height = Application.GetRealHeight(300),
-                Height = Application.GetRealHeight(300-127-12),
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
-            };
-            bodyFrameLayout.AddChidren(versionFL);
-
-            //var SLARow = new DeviceInfoRow(12);
-            //SLARow.Init();
-            //SLARow.SetTipTitle(R.MyInternationalizationString.SLA);
-            //SLARow.NameText.TextAlignment = TextAlignment.CenterRight;
-            //versionFL.AddChidren(SLARow);
-            //SLARow.ClickBtn.MouseUpEventHandler += (sender, e) =>
-            //{
-            //    var slaForm = new SLAForm();
-            //    slaForm.AddForm();
-            //};
-
-            //updateRow = new DeviceInfoRow(12 + 127 + 12);
-            updateRow = new DeviceInfoRow(12);
-            updateRow.Init();
-            updateRow.SetTipTitle(R.MyInternationalizationString.UpdateVersion);
-            updateRow.NameText.TextAlignment = TextAlignment.CenterRight;
-            updateRow.HideLine(true);
-            updateRow.SetTitle(R.MyInternationalizationString.TheAppVersionIsNewest);
-            updateRow.CanClick(false);
-            updateRow.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor);
-            versionFL.AddChidren(updateRow);
-            updateRow.ClickBtn.MouseUpEventHandler += (sender, e) =>
+            //澶撮儴鐧借壊鑳屾櫙
+            var frameLogo = new FrameLayoutBase();
+            frameLogo.Height = Application.GetRealHeight(484);
+            frameLogo.BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
+            bodyFrameLayout.AddChidren(frameLogo);
+            //鍥炬爣鐨勫鍣�
+            var frameLogoBackground = new FrameLayoutBase();
+            frameLogoBackground.Y = Application.GetRealHeight(104);
+            frameLogoBackground.Width = this.GetPictrueRealSize(167);
+            frameLogoBackground.Height = this.GetPictrueRealSize(167);
+            frameLogoBackground.Gravity = Gravity.CenterHorizontal;
+            frameLogoBackground.BackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor;
+            frameLogoBackground.Radius = (uint)Application.GetRealHeight(37);
+            frameLogo.AddChidren(frameLogoBackground);
+            //鍥炬爣
+            var btnLogo = new IconViewControl(144);
+            btnLogo.UnSelectedImagePath = "Account/Logo_White.png";
+            btnLogo.Gravity = Gravity.Center;
+            frameLogoBackground.AddChidren(btnLogo);
+            //HDL Home
+            var btnName = new NormalViewControl(700, 60, true);
+            btnName.Y = Application.GetRealHeight(294);
+            btnName.Gravity = Gravity.CenterHorizontal;
+            btnName.Text = "HDL Home";
+            btnName.TextSize = 15;
+            btnName.TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor;
+            btnName.TextAlignment = TextAlignment.Center;
+            frameLogo.AddChidren(btnName);
+            //鐗堟湰鍙�
+            var btnVersion = new NormalViewControl(700, 50, true);
+            btnVersion.Y = Application.GetRealHeight(366);
+            btnVersion.Gravity = Gravity.CenterHorizontal;
+            btnVersion.Text = $"{Language.StringByID(R.MyInternationalizationString.VersionCode)} {CommonPage.CodeIDString}";
+            btnVersion.TextSize = 12;
+            btnVersion.TextColor = ZigbeeColor.Current.GXCTextGrayColor;
+            btnVersion.TextAlignment = TextAlignment.Center;
+            frameLogo.AddChidren(btnVersion);
+            //鍒楄〃鎺т欢
+            var listView = new FrameListControl(12);
+            listView.Y = frameLogo.Bottom + Application.GetRealHeight(23);
+            listView.BackgroundColor = UserCenterColor.Current.White;
+            listView.Height = Application.GetRealHeight(500);
+            bodyFrameLayout.AddChidren(listView);
+            //鏈嶅姟鍗忚
+            //var rowService = new FrameRowControl(listView.rowSpace / 2);
+            //listView.AddChidren(rowService);
+            //rowService.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.SLA), 400);
+            //rowService.AddRightArrow();
+            //rowService.AddBottomLine();
+            //鐗堟湰鏇存柊
+            this.rowUpdate = new FrameRowControl(listView.rowSpace / 2);
+            listView.AddChidren(rowUpdate);
+            rowUpdate.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.UpdateVersion), 400);
+            rowUpdate.AddRightArrow();
+            var btnRightView = rowUpdate.AddMostRightView("", 400);
+            rowUpdate.CanClick = false;
+            rowUpdate.ButtonClickEvent += (sender, e) =>
             {
                 UpdateVersion();
             };
+            //璋冩暣妗屽竷楂樺害
+            listView.AdjustRealHeight(Application.GetRealHeight(23));
 
+            //鏇存柊涓�
+            this.btnUpdating = new NormalViewControl(556, 106, true);
+            btnUpdating.Y = Application.GetRealHeight(994);
+            btnUpdating.Radius = (uint)Application.GetRealHeight(53);
+            btnUpdating.BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor;
+            btnUpdating.TextID = R.MyInternationalizationString.Updating;
+            btnUpdating.TextSize = 15;
+            btnUpdating.TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
+            btnUpdating.Gravity = Gravity.CenterHorizontal;
+            btnUpdating.TextAlignment = TextAlignment.Center;
+            bodyFrameLayout.AddChidren(btnUpdating);
 
-            updatingBtn = new Button()
+            //璁剧疆杩涘害鎺т欢涓嶅彲瑙�
+            this.SetDownLoadBtnNoVisible();
+
+            //妫�娴嬫柊鐗堟湰
+            HdlThreadLogic.Current.RunThread(async () =>
             {
-                Y = Application.GetRealHeight(994),
-                Width = Application.GetRealWidth(556),
-                Height = Application.GetRealHeight(106),
-                Radius=(uint)Application.GetRealHeight(53),
-                BackgroundColor=ZigbeeColor.Current.GXCDailogBackGroundColor,
-                TextID = R.MyInternationalizationString.Updating,
-                TextSize=15,
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                Gravity=Gravity.CenterHorizontal
-            };
-            bodyFrameLayout.AddChidren(updatingBtn);
+                var result = await CanUpdateAsync();
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    if (result)
+                    {
+                        //鏇存柊鏈�鏂扮増
+                        btnRightView.TextID = R.MyInternationalizationString.Update;
+                        rowUpdate.CanClick = true;
+                    }
+                    else
+                    {
+                        btnRightView.TextID = R.MyInternationalizationString.TheAppVersionIsNewest;
+                    }
+                });
 
-            SetDownLoadBtnNoVisible();
-            CheckVersion();
+            });
         }
 
         /// <summary>
@@ -208,16 +173,7 @@
         {
             new System.Threading.Thread(async () =>
             {
-                var re = await CanUpdateAsync();
-                if (re)
-                {
-                    Application.RunOnMainThread(() =>
-                    {
-                        updateRow.CanClick(true);
-                        updateRow.SetTitleColor(ZigbeeColor.Current.GXCButtonSelectedColor);
-                        updateRow.SetTitle(R.MyInternationalizationString.Update);
-                    });
-                }
+                
             })
             { IsBackground = true }.Start();
 
@@ -228,7 +184,7 @@
         private void SetDownLoadBtnNoVisible()
         {
             isUpdating = false;
-            updatingBtn.Visible = false;
+            btnUpdating.Visible = false;
         }
         /// <summary>
         /// 璁剧疆杩涘害鎺т欢鍙
@@ -236,8 +192,8 @@
         private void SetDownLoadBtnVisible()
         {
             isUpdating = true;
-            updatingBtn.Visible = true;
-            updateRow.CanClick(false);
+            btnUpdating.Visible = true;
+            rowUpdate.CanClick = false;
         }
 
         /// <summary>
@@ -501,7 +457,7 @@
                 Application.RunOnMainThread(() =>
                 {
                     SetDownLoadBtnVisible();
-                    updatingBtn.Text = $"{ Language.StringByID(R.MyInternationalizationString.Updating)} {(int)(e.BytesReceived / (float)ApkBytesTotalLength * 100)}%";
+                    btnUpdating.Text = $"{ Language.StringByID(R.MyInternationalizationString.Updating)} {(int)(e.BytesReceived / (float)ApkBytesTotalLength * 100)}%";
                 });
             }
         }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs
index 6427e96..000d878 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs
@@ -17,7 +17,7 @@
         private bool m_CanClick = true;
         /// <summary>
         /// 璁剧疆鑳藉惁瑙︾偣鍑讳簨浠�
-        /// </summary>
+        /// </summary>
         public bool CanClick
         {
             get { return m_CanClick; }
@@ -82,8 +82,8 @@
         /// <summary>
         /// 鍒濆鍖栨帶浠跺ぇ灏�(涓嶄互骞冲潎鍊艰繘琛岀湡瀹炴暟鍊艰绠�)
         /// </summary>
-        /// <param name="i_Width">瀹藉害</param>
-        /// <param name="i_Height">楂樺害</param>
+        /// <param name="i_Width">瀹藉害</param>
+        /// <param name="i_Height">楂樺害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
         public void InitSize(int i_Width, int i_Height, bool real = true)
         {
@@ -91,50 +91,50 @@
             {
                 i_Width = Application.GetRealWidth(i_Width);
                 i_Height = Application.GetRealHeight(i_Height);
-            }
-            this.Height = i_Height;
+            }
+            this.Height = i_Height;
             this.Width = i_Width;
         }
 
         /// <summary>
         /// 鍒濆鍖栨帶浠跺ぇ灏�(涓嶄互骞冲潎鍊艰繘琛岀湡瀹炴暟鍊艰绠�)
         /// </summary>
-        /// <param name="i_Width">瀹藉害</param>
+        /// <param name="i_Width">瀹藉害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
         public void InitSize(int i_Width, bool real = false)
         {
             if (real == true)
             {
                 i_Width = Application.GetRealWidth(i_Width);
-            }
-
-            this.Height = ControlCommonResourse.NormalControlHeight;
+            }
+
+            this.Height = ControlCommonResourse.NormalControlHeight;
             this.Width = i_Width;
         }
 
         /// <summary>
         /// 鍒濆鍖栧浘鏍囨帶浠跺ぇ灏�(浠ュ钩鍧囧�艰繘琛岀湡瀹炴暟鍊艰绠�)
         /// </summary>
-        /// <param name="i_Width">瀹藉害</param>
-        /// <param name="i_Height">楂樺害</param>
+        /// <param name="i_Width">瀹藉害</param>
+        /// <param name="i_Height">楂樺害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
         public void InitIconSize(int i_Width, int i_Height, bool real = true)
         {
             if (real == true)
             {
-                i_Width = Application.GetMinRealAverage(i_Width);
-                i_Height = Application.GetMinRealAverage(i_Height);
-            }
-
-            this.Height = i_Height;
+                i_Width = this.GetPictrueRealSize(i_Width);
+                i_Height = this.GetPictrueRealSize(i_Height);
+            }
+
+            this.Height = i_Height;
             this.Width = i_Width;
         }
 
         /// <summary>
         /// 鍒濆鍖栧浘鐗囨帶浠跺ぇ灏�
         /// </summary>
-        /// <param name="i_Width">瀹藉害</param>
-        /// <param name="i_Height">楂樺害</param>
+        /// <param name="i_Width">瀹藉害</param>
+        /// <param name="i_Height">楂樺害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
         public void InitPictrueSize(int i_Width, int i_Height, bool real = true)
         {
@@ -142,9 +142,9 @@
             {
                 i_Width = HdlControlLogic.Current.GetPictrueRealSize(i_Width);
                 i_Height = HdlControlLogic.Current.GetPictrueRealSize(i_Height);
-            }
-
-            this.Height = i_Height;
+            }
+
+            this.Height = i_Height;
             this.Width = i_Width;
         }
 
@@ -319,6 +319,16 @@
 #endif
         }
 
+        /// <summary>
+        /// 璁$畻鍥剧墖鐨勭湡瀹為珮瀹藉害
+        /// </summary>
+        /// <param name="i_size"></param>
+        /// <returns></returns>
+        public int GetPictrueRealSize(int i_size)
+        {
+            return HdlControlLogic.Current.GetPictrueRealSize(i_size);
+        }
+
         #endregion
 
         #region 鈻� Log鍑哄姏____________________________
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs
new file mode 100755
index 0000000..889170d
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs
@@ -0,0 +1,38 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+    /// <summary>
+    /// FrameLayout鐨勬渶鍒濆師鍨�
+    /// </summary>
+    public class FrameLayoutBase : FrameLayout
+    {
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// FrameLayout鐨勬渶鍒濆師鍨�
+        /// </summary>
+        public FrameLayoutBase()
+        {
+        }
+
+        #endregion
+
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        /// <summary>
+        /// 璁$畻鍥剧墖鐨勭湡瀹為珮瀹藉害
+        /// </summary>
+        /// <param name="i_size"></param>
+        /// <returns></returns>
+        public int GetPictrueRealSize(int i_size)
+        {
+            return HdlControlLogic.Current.GetPictrueRealSize(i_size);
+        }
+
+        #endregion
+
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/RowLayoutBase.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/RowLayoutBase.cs
new file mode 100755
index 0000000..f808a9c
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/RowLayoutBase.cs
@@ -0,0 +1,37 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+    /// <summary>
+    /// RowLayout鐨勬渶鍒濆師鍨�
+    /// </summary>
+    public class RowLayoutBase : RowLayout
+    {
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// FrameLayout鐨勬渶鍒濆師鍨�
+        /// </summary>
+        public RowLayoutBase()
+        {
+        }
+
+        #endregion
+
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        /// <summary>
+        /// 璁$畻鍥剧墖鐨勭湡瀹為珮瀹藉害
+        /// </summary>
+        /// <param name="i_size"></param>
+        /// <returns></returns>
+        public int GetPictrueRealSize(int i_size)
+        {
+            return HdlControlLogic.Current.GetPictrueRealSize(i_size);
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs
index 4c69fe1..c825e64 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs
@@ -49,8 +49,8 @@
         /// <summary>
         /// 鍒濆鍖栨帶浠跺ぇ灏�(涓嶄互骞冲潎鍊艰繘琛岀湡瀹炴暟鍊艰绠�)
         /// </summary>
-        /// <param name="i_Width">瀹藉害</param>
-        /// <param name="i_Height">楂樺害</param>
+        /// <param name="i_Width">瀹藉害</param>
+        /// <param name="i_Height">楂樺害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
         public void InitSize(int i_Width, int i_Height, bool real = true)
         {
@@ -58,43 +58,43 @@
             {
                 i_Width = Application.GetRealWidth(i_Width);
                 i_Height = Application.GetRealHeight(i_Height);
-            }
-
-            this.Height = i_Height;
+            }
+
+            this.Height = i_Height;
             this.Width = i_Width;
         }
 
         /// <summary>
         /// 鍒濆鍖栨帶浠跺ぇ灏�(涓嶄互骞冲潎鍊艰繘琛岀湡瀹炴暟鍊艰绠�)
         /// </summary>
-        /// <param name="i_Width">瀹藉害</param>
+        /// <param name="i_Width">瀹藉害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
         public void InitSize(int i_Width, bool real = true)
         {
             if (real == true)
             {
                 i_Width = Application.GetRealWidth(i_Width);
-            }
-
-            this.Height = ControlCommonResourse.NormalControlHeight;
+            }
+
+            this.Height = ControlCommonResourse.NormalControlHeight;
             this.Width = i_Width;
         }
 
         /// <summary>
         /// 鍒濆鍖栨帶浠跺ぇ灏�(浠ュ钩鍧囧�艰繘琛岀湡瀹炴暟鍊艰绠�)
         /// </summary>
-        /// <param name="i_Width">瀹藉害</param>
-        /// <param name="i_Height">楂樺害</param>
+        /// <param name="i_Width">瀹藉害</param>
+        /// <param name="i_Height">楂樺害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
         public void InitAvgSize(int i_Width, int i_Height, bool real = true)
         {
             if (real == true)
             {
-                i_Width = Application.GetMinRealAverage(i_Width);
-                i_Height = Application.GetMinRealAverage(i_Height);
-            }
-
-            this.Height = i_Height;
+                i_Width = this.GetPictrueRealSize(i_Width);
+                i_Height = this.GetPictrueRealSize(i_Height);
+            }
+
+            this.Height = i_Height;
             this.Width = i_Width;
         }
 
@@ -143,6 +143,17 @@
             //Y杞撮噸缃�
             this.Y = HdlControlLogic.Current.GetControlChidrenYaxis(this.Parent.Height, this.Height, alignment, Space);
         }
+
+        /// <summary>
+        /// 璁$畻鍥剧墖鐨勭湡瀹為珮瀹藉害
+        /// </summary>
+        /// <param name="i_size"></param>
+        /// <returns></returns>
+        public int GetPictrueRealSize(int i_size)
+        {
+            return HdlControlLogic.Current.GetPictrueRealSize(i_size);
+        }
+
         #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomLeftClickButton.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomLeftClickButton.cs
index 7754ffb..659a38b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomLeftClickButton.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomLeftClickButton.cs
@@ -7,7 +7,7 @@
     /// <summary>
     /// 浣嶄簬宸︿笅瑙掔殑鍗曞嚮鎺т欢
     /// </summary>
-    public class BottomLeftClickButton : FrameLayoutControl
+    public class BottomLeftClickButton : FrameLayoutStatuControl
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomRightClickButton.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomRightClickButton.cs
index 3e47a2b..f79050c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomRightClickButton.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomRightClickButton.cs
@@ -7,7 +7,7 @@
     /// <summary>
     /// 浣嶄簬鍙充笅瑙掔殑鍗曞嚮鎺т欢
     /// </summary>
-    public class BottomRightClickButton : FrameLayoutControl
+    public class BottomRightClickButton : FrameLayoutStatuControl
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/PswNumberInputControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/PswNumberInputControl.cs
index cf840fd..e348862 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/PswNumberInputControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/PswNumberInputControl.cs
@@ -7,7 +7,7 @@
     /// <summary>
     /// 鏁板瓧鎸夐敭瀵嗙爜杈撳叆鎺т欢(鑷埗鐨勬墜鍔ㄦ寜閿緭鍏ョ被鍨�,璇峰疄鐜般�怉ctionPswFinish銆戜簨浠�)
     /// </summary>
-    public class PswNumberInputControl : FrameLayout
+    public class PswNumberInputControl : FrameLayoutBase
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
@@ -79,8 +79,8 @@
         {
             this.passwordLength = i_passwordLength;
             //鍔犻棿璺�
-            this.Width = Application.GetMinRealAverage(NumberSize * 3 + NumberLeftRightSpace * 2 + 80);
-            this.Height = Application.GetMinRealAverage(NumberSize * 4 + NumberTopButtomSpace * 3) + Application.GetRealHeight(368);
+            this.Width = this.GetPictrueRealSize(NumberSize * 3 + NumberLeftRightSpace * 2 + 80);
+            this.Height = this.GetPictrueRealSize(NumberSize * 4 + NumberTopButtomSpace * 3) + Application.GetRealHeight(368);
             this.btnTitle = new NormalViewControl(Application.CurrentWidth, Application.GetRealWidth(75), false);
             btnTitle.Text = i_title;
             btnTitle.IsBold = true;
@@ -112,7 +112,7 @@
 
             //鍒犻櫎鎺т欢
             this.btnDelete = new NormalViewControl(200, 60, true);
-            btnDelete.X = this.Width - Application.GetRealWidth(200) - Application.GetMinRealAverage(40);
+            btnDelete.X = this.Width - Application.GetRealWidth(200) - this.GetPictrueRealSize(40);
             btnDelete.Y = this.Height - Application.GetRealHeight(60);
             btnDelete.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnDelete.TextAlignment = TextAlignment.Center;
@@ -144,9 +144,9 @@
         private void InitPswIconControl()
         {
             //鍥炬爣澶у皬
-            int iconSize = Application.GetMinRealAverage(36);
+            int iconSize = this.GetPictrueRealSize(36);
             //鍥炬爣闂寸殑闂撮殧
-            int space = Application.GetMinRealAverage(100);
+            int space = this.GetPictrueRealSize(100);
             //璁$畻瀵嗙爜涓暟鏄惁瓒婄晫
             int value = Application.CurrentWidth - iconSize * passwordLength;
             if (passwordLength > 1)
@@ -194,13 +194,13 @@
             frameNumberIcon.Y = Application.GetRealHeight(368);
             frameNumberIcon.Width = this.Width;
             frameNumberIcon.Gravity = Gravity.CenterHorizontal;
-            frameNumberIcon.Height = Application.GetMinRealAverage(NumberSize * 4 + NumberTopButtomSpace * 3);
+            frameNumberIcon.Height = this.GetPictrueRealSize(NumberSize * 4 + NumberTopButtomSpace * 3);
             this.AddChidren(frameNumberIcon);
 
             //鍓嶄竴涓帶浠剁殑鍙冲潗鏍�
             int btnTempRight = 0;
             //闂磋窛
-            int space = Application.GetMinRealAverage(NumberLeftRightSpace);
+            int space = this.GetPictrueRealSize(NumberLeftRightSpace);
             //1鍒�9鐨勬暟瀛楃洏
             for (int i = 1; i <= 9; i++)
             {
@@ -212,7 +212,7 @@
                 }
 
                 frameNumberIcon.AddChidren(btnNum);
-                btnNum.Y = (i - 1) / 3 * (btnNum.Height + Application.GetMinRealAverage(NumberTopButtomSpace));
+                btnNum.Y = (i - 1) / 3 * (btnNum.Height + this.GetPictrueRealSize(NumberTopButtomSpace));
                 btnNum.ButtonClickEvent += (sender, e) =>
                 {
                     //鐐瑰嚮鏁板瓧鎸夐敭
@@ -228,11 +228,11 @@
 
             //0鐨勬暟瀛楃洏
             var btnNum0 = this.InitNumberControl();
-            btnNum0.X = Application.GetMinRealAverage(40) + frameNumberIcon.GetChildren(0).Height + space;
+            btnNum0.X = this.GetPictrueRealSize(40) + frameNumberIcon.GetChildren(0).Height + space;
             btnNum0.Text = "0";
 
             frameNumberIcon.AddChidren(btnNum0);
-            btnNum0.Y = 3 * (frameNumberIcon.GetChildren(0).Height + Application.GetMinRealAverage(NumberTopButtomSpace));
+            btnNum0.Y = 3 * (frameNumberIcon.GetChildren(0).Height + this.GetPictrueRealSize(NumberTopButtomSpace));
             btnNum0.ButtonClickEvent += (sender, e) =>
             {
                 //鐐瑰嚮鏁板瓧鎸夐敭
@@ -246,9 +246,9 @@
         /// <returns></returns>
         private NormalClickButton InitNumberControl()
         {
-            int iconSize = Application.GetMinRealAverage(NumberSize);
+            int iconSize = this.GetPictrueRealSize(NumberSize);
             var btnNum = new NormalClickButton(iconSize, iconSize, false);
-            btnNum.X = Application.GetMinRealAverage(40);
+            btnNum.X = this.GetPictrueRealSize(40);
             btnNum.BackgroundColor = this.NumberIconBackColor;
             btnNum.clickStatuColor = 0x7e656565;
             btnNum.Radius = (uint)iconSize / 2;
@@ -364,7 +364,7 @@
             }
 
             //鑷姩璋冩暣楂樺害
-            int minHeight = Application.GetMinRealAverage(NumberSize * 4 + NumberTopButtomSpace * 3) + Application.GetRealHeight(368);
+            int minHeight = this.GetPictrueRealSize(NumberSize * 4 + NumberTopButtomSpace * 3) + Application.GetRealHeight(368);
             int realHeight = this.btnDelete.Bottom;
             if (realHeight < minHeight)
             {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/RoomDeviceGroupMenuControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/RoomDeviceGroupMenuControl.cs
index 9d32c3d..2b18246 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/RoomDeviceGroupMenuControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/RoomDeviceGroupMenuControl.cs
@@ -58,7 +58,7 @@
         /// <summary>
         /// 鍓嶅洖閫夋嫨鐨勬帶浠�
         /// </summary>
-        private FrameLayoutControl oldFrameBack = null;
+        private FrameLayoutStatuControl oldFrameBack = null;
         /// <summary>
         /// 鍓嶅洖閫夋嫨鐨勬帶浠�
         /// </summary>
@@ -163,7 +163,7 @@
             }
 
             //甯﹀浘鐗囩殑
-            var frameBack = new FrameLayoutControl();
+            var frameBack = new FrameLayoutStatuControl();
             frameBack.UseClickStatu = false;
             frameBack.Gravity = Gravity.Center;
             frameBack.Height = Application.GetRealHeight(159);
@@ -257,7 +257,7 @@
             }
 
             //甯﹀浘鐗囩殑
-            var frameBack = new FrameLayoutControl();
+            var frameBack = new FrameLayoutStatuControl();
             frameBack.UseClickStatu = false;
             frameBack.Gravity = Gravity.Center;
             frameBack.Height = Application.GetRealHeight(159);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetyMasterControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetyMasterControl.cs
index e5428f4..736f59c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetyMasterControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetyMasterControl.cs
@@ -138,11 +138,11 @@
 
         #endregion
 
-        #region 鈻� 甯冮槻鎾ら槻___________________________
+        #region 鈻� 甯冮槻鎾ら槻___________________________
 
         /// <summary>
         /// 鍦ㄥ甯冮槻
-        /// </summary>
+        /// </summary>
         private async void SetSafetyGarrisonModeInAtHome()
         {
             //鎵撳紑杩涘害鏉�
@@ -180,11 +180,11 @@
                 var control = new ShowMsgControl(ShowMsgType.Tip, msg);
                 control.Show();
             });
-        }
-
+        }
+
         /// <summary>
         /// 绂诲甯冮槻
-        /// </summary>
+        /// </summary>
         private async void SetSafetyGarrisonModeInRemoveHome()
         {
             //鎵撳紑杩涘害鏉�
@@ -212,11 +212,11 @@
                 var control = new ShowMsgControl(ShowMsgType.Tip, msg);
                 control.Show();
             });
-        }
-
+        }
+
         /// <summary>
         /// 鎾ら槻
-        /// </summary>
+        /// </summary>
         private async void RemoveSafetyGarrisonMode()
         {
             //鎵撳紑杩涘害鏉�
@@ -240,12 +240,12 @@
                 var control = new ShowMsgControl(ShowMsgType.Tip, msg);
                 control.Show();
             });
-        }
-
+        }
+
         /// <summary>
         /// 鏍规嵁甯冮槻妯″紡锛岃缃浘鏍囩殑閫夋嫨鐘舵��
         /// </summary>
-        /// <param name="mode"></param>
+        /// <param name="mode"></param>
         public void SetIconStatuByGarrisonMode(GarrisonMode mode)
         {
             //鍦ㄥ甯冮槻
@@ -277,7 +277,7 @@
 
         /// <summary>
         /// 璁剧疆甯冮槻鎸夐挳鐨勫彲瑙嗙姸鎬�
-        /// </summary>
+        /// </summary>
         public void SetButtonVisible()
         {
             //璁剧疆鏈夊唴閮ㄩ槻鍖�
@@ -303,7 +303,7 @@
         /// <summary>
         /// 灏佽鐨勫竷闃叉帶浠�
         /// </summary>
-        private class GarrisonControl : FrameLayoutControl
+        private class GarrisonControl : FrameLayoutStatuControl
         {
             #region 鈻� 鍙橀噺澹版槑___________________________
 
@@ -350,7 +350,7 @@
                 this.RemoveBaseClickEvent();
 
                 //鑳屾櫙
-                int backHeight = Application.GetMinRealAverage(132);
+                int backHeight = this.GetPictrueRealSize(132);
                 btnBack = new NormalViewControl(backHeight, backHeight, false);
                 btnBack.Gravity = Gravity.CenterHorizontal;
                 btnBack.Radius = (uint)backHeight / 2;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs
index 373ca78..484e815 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs
@@ -37,7 +37,7 @@
         /// <summary>
         /// 榛樿鐨勯偅涓彍鍗�
         /// </summary>
-        private FrameLayoutControl frameDefult = null;
+        private FrameLayoutStatuControl frameDefult = null;
 
         #endregion
 
@@ -81,7 +81,7 @@
         private int InitTitleTextControl(int i_index, string titleText, int realWidth, int XX)
         {
             //鍦烘櫙妗�(鐐瑰嚮鑼冨洿鏈夌偣灏忥紝闇�瑕佹墿澶у畠鐨勭偣鍑昏寖鍥�)
-            var frameBack = new FrameLayoutControl();
+            var frameBack = new FrameLayoutStatuControl();
             frameBack.UseClickStatu = false;
             frameBack.Height = Application.GetRealHeight(90);
             frameBack.Width = realWidth;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs
index 7da740e..561b5b3 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceInfoIconControl.cs
@@ -8,7 +8,7 @@
     /// <summary>
     /// 璁惧淇℃伅鐣岄潰鐨勮澶囧浘鏍囨帶浠�(鍏煎缃戝叧)
     /// </summary>
-    public class DeviceInfoIconControl : FrameLayoutControl
+    public class DeviceInfoIconControl : FrameLayoutStatuControl
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
@@ -39,10 +39,10 @@
         public DeviceInfoIconControl()
         {
             //绗竴灞傚簳鑹�
-            this.Height = Application.GetMinRealAverage(207);
-            this.Width = Application.GetMinRealAverage(207);
+            this.Height = this.GetPictrueRealSize(207);
+            this.Width = this.GetPictrueRealSize(207);
             this.BackgroundColor = UserCenterColor.Current.White;
-            this.Radius = (uint)Application.GetMinRealAverage(207) / 2;
+            this.Radius = (uint)this.GetPictrueRealSize(207) / 2;
             this.UseClickStatu = false;
         }
 
@@ -54,7 +54,7 @@
         {
             this.deviceMac = i_device.DeviceAddr;
             //闃叉鍑虹幇璇樊
-            int iconWidth = Application.GetMinRealAverage(207) - Application.GetMinRealAverage(12) - Application.GetMinRealAverage(12);
+            int iconWidth = this.GetPictrueRealSize(207) - this.GetPictrueRealSize(12) - this.GetPictrueRealSize(12);
             //绗簩灞傚簳鑹�
             var btnIcon2 = new NormalViewControl(iconWidth, iconWidth, false);
             btnIcon2.BackgroundColor = 0xfffef1ed;
@@ -69,7 +69,7 @@
                 //瀵瑰簲鍗曠函鍙湁200鍥炶矾鐨勮澶�
                 listDevice.Add(Common.LocalDevice.Current.GetOTADevice(deviceMac));
             }
-            btnIcon = new NormalViewControl(Application.GetMinRealAverage(121), Application.GetMinRealAverage(121), false);
+            btnIcon = new NormalViewControl(this.GetPictrueRealSize(121), this.GetPictrueRealSize(121), false);
             btnIcon.Gravity = Gravity.Center;
             Common.LocalDevice.Current.SetDeviceObjectIconToControl(btnIcon, listDevice);
             this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
@@ -84,7 +84,7 @@
             this.deviceMac = deviceMacAddr;
             this.deviceEpoint = epoint;
             //闃叉鍑虹幇璇樊
-            int iconWidth = Application.GetMinRealAverage(207) - Application.GetMinRealAverage(12) - Application.GetMinRealAverage(12);
+            int iconWidth = this.GetPictrueRealSize(207) - this.GetPictrueRealSize(12) - this.GetPictrueRealSize(12);
             //绗簩灞傚簳鑹�
             var btnIcon2 = new NormalViewControl(iconWidth, iconWidth, false);
             btnIcon2.BackgroundColor = 0xfffef1ed;
@@ -93,7 +93,7 @@
             this.AddChidren(btnIcon2, ChidrenBindMode.BindEventOnly);
 
             //璁惧鍥炬爣
-            btnIcon = new NormalViewControl(Application.GetMinRealAverage(121), Application.GetMinRealAverage(121), false);
+            btnIcon = new NormalViewControl(this.GetPictrueRealSize(121), this.GetPictrueRealSize(121), false);
             btnIcon.Gravity = Gravity.Center;
             Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, Common.LocalDevice.Current.GetDevice(deviceMacAddr, epoint));
             this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
@@ -107,7 +107,7 @@
         {
             this.zbGateway = i_gateway;
             //闃叉鍑虹幇璇樊
-            int iconWidth = Application.GetMinRealAverage(207) - Application.GetMinRealAverage(12) - Application.GetMinRealAverage(12);
+            int iconWidth = this.GetPictrueRealSize(207) - this.GetPictrueRealSize(12) - this.GetPictrueRealSize(12);
             //绗簩灞傚簳鑹�
             var btnIcon2 = new NormalViewControl(iconWidth, iconWidth, false);
             btnIcon2.BackgroundColor = 0xfffef1ed;
@@ -116,7 +116,7 @@
             this.AddChidren(btnIcon2, ChidrenBindMode.BindEventOnly);
 
             //璁惧鍥炬爣
-            btnIcon = new NormalViewControl(Application.GetMinRealAverage(121), Application.GetMinRealAverage(121), false);
+            btnIcon = new NormalViewControl(this.GetPictrueRealSize(121), this.GetPictrueRealSize(121), false);
             btnIcon.Gravity = Gravity.Center;
             HdlGatewayLogic.Current.SetGatewayIcon(btnIcon, i_gateway);
             this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs
index d2b9aa3..7038321 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs
@@ -36,7 +36,7 @@
         /// 鍋氭垚涓�涓ā鎷烺owLayout,杩涜杈撳叆鐨凢rameLayout鎺т欢(宸﹁竟鏈夋爣棰�)
         /// </summary>
         /// <param name="i_caption">鏍囬鏂囨湰</param>
-        /// <param name="i_text">杈撳叆妗嗙殑鍊�</param>
+        /// <param name="i_text">鏄剧ず鏂囨湰鐨勫��</param>
         /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
         public FrameCaptionViewControl(string i_caption, string i_text, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
@@ -58,7 +58,7 @@
         /// </summary>
         /// <param name="caption">鏍囬</param>
         /// <param name="text">鏂囨湰妗嗙殑鍊�</param>
-        public void InitControl()
+        public virtual void InitControl()
         {
             this.AddChidren(btnCaption, ChidrenBindMode.BindEventOnly);
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs
similarity index 97%
rename from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs
rename to ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs
index bab9c6a..f5da451 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs
@@ -7,21 +7,21 @@
     /// <summary>
     /// 鍋氭垚涓�涓偣鍑诲悗鑳藉鏄剧ず鐐瑰嚮鐘舵�佺殑鎺т欢(鍩哄眰鎺т欢)
     /// </summary>
-    public class FrameLayoutControl : FrameLayout
+    public class FrameLayoutStatuControl : FrameLayoutBase
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
-        /// <summary>
-        /// 鍗曞嚮寮硅捣浜嬩欢
-        /// </summary>
-        public Action<object, MouseEventArgs> ButtonClickEvent;
-        /// <summary>
-        /// 鐘舵�佽缃殑浜嬩欢(浼氶噸杞藉簳灞傛晥鏋�)
-        /// </summary>
+        /// <summary>
+        /// 鍗曞嚮寮硅捣浜嬩欢
+        /// </summary>
+        public Action<object, MouseEventArgs> ButtonClickEvent;
+        /// <summary>
+        /// 鐘舵�佽缃殑浜嬩欢(浼氶噸杞藉簳灞傛晥鏋�)
+        /// </summary>
         public Action<bool> SelectStatuEvent;
         /// <summary>
         /// 鏄惁鍚敤鐐逛寒鍔熻兘(榛樿鍚敤)
-        /// </summary>
+        /// </summary>
         public bool UseClickStatu = true;
         /// <summary>
         /// 鑳藉惁鐐瑰嚮
@@ -29,11 +29,11 @@
         public bool CanClick = true;
         /// <summary>
         /// 鍘熸潵鐨勮儗鏅壊
-        /// </summary>
-        private uint oldBackColor = 0;
+        /// </summary>
+        private uint oldBackColor = 0;
         /// <summary>
         /// 褰撳墠鏄惁宸茬粡澶勪簬閫夋嫨鐘舵��
-        /// </summary>
+        /// </summary>
         private bool IsSelectStatu = false;
         /// <summary>
         /// 瀛愭帶浠禮杞村亸绉婚噺(鍏遍�氬畾涔夎�屽凡)
@@ -47,47 +47,47 @@
             set { this.Radius = (uint)Application.GetRealHeight(value); }
         }
 
-        #endregion
+        #endregion
 
         #region 鈻� 鍒濆鍖朹____________________________
 
         /// <summary>
         /// 鍋氭垚涓�涓偣鍑诲悗鑳藉鏄剧ず鐐瑰嚮鐘舵�佺殑鎺т欢
-        /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
-        public FrameLayoutControl(int i_ChidrenYaxis = 0)
+        /// </summary>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        public FrameLayoutStatuControl(int i_ChidrenYaxis = 0)
         {
             this.chidrenYaxis = i_ChidrenYaxis;
 
             this.MouseUpEventHandler += ChildrenUpEvent;
-            this.MouseDownEventHandler += ChildrenDownEvent;
+            this.MouseDownEventHandler += ChildrenDownEvent;
         }
 
-        #endregion
+        #endregion
 
-        #region 鈻� 缁戝畾浜嬩欢___________________________
+        #region 鈻� 缁戝畾浜嬩欢___________________________
 
         /// <summary>
         /// 鍙樻洿瀛愭帶浠剁殑缁戝畾妯″紡
         /// </summary>
         /// <param name="view">瀛愭帶浠�</param>
-        /// <param name="chidrenBindMode">鍙樻洿鐨勭粦瀹氭ā寮�</param>
+        /// <param name="chidrenBindMode">鍙樻洿鐨勭粦瀹氭ā寮�</param>
         public void ChangedChidrenBindMode(View view, ChidrenBindMode chidrenBindMode)
         {
-            if (view is ButtonBase)
+            if (view is ButtonBase)
             {
                 //瀛愭帶浠剁Щ闄や簨浠�
                 ButtonBase button = (ButtonBase)view;
                 button.ButtonClickEvent -= ChildrenUpEvent;
-                button.MouseDownEventHandler -= ChildrenDownEvent;
-
-                this.BindChidrenEvent(view, chidrenBindMode);
+                button.MouseDownEventHandler -= ChildrenDownEvent;
+
+                this.BindChidrenEvent(view, chidrenBindMode);
             }
             else if (view is ImageView)
             {
                 view.MouseUpEventHandler -= ChildrenUpEvent;
-                view.MouseDownEventHandler -= ChildrenDownEvent;
-
+                view.MouseDownEventHandler -= ChildrenDownEvent;
+
                 this.BindChidrenEvent(view, chidrenBindMode);
             }
             else if (view is ViewGroup)
@@ -114,20 +114,20 @@
 
                 this.BindChidrenEvent(view, chidrenBindMode);
             }
-        }
-
+        }
+
         /// <summary>
         /// 缁戝畾瀛愭帶浠朵簨浠�(濡傛灉鏄鍚堟帶浠�,鍦ㄥ垵濮嬪寲瀹屾垚鍚�,璋冪敤ChangedChidrenBindMode)
         /// </summary>
         /// <param name="view"></param>
-        /// <param name="chidrenBindMode"></param>
+        /// <param name="chidrenBindMode"></param>
         private void BindChidrenEvent(View view, ChidrenBindMode chidrenBindMode)
         {
             if (chidrenBindMode == ChidrenBindMode.NotBind)
             {
                 return;
             }
-            if (view is ButtonBase)
+            if (view is ButtonBase)
             {
                 //涓哄瓙鎺т欢娣诲姞浜嬩欢
                 ButtonBase button = (ButtonBase)view;
@@ -135,7 +135,7 @@
                 button.MouseDownEventHandler -= ChildrenDownEvent;
 
                 button.ButtonClickEvent += ChildrenUpEvent;
-                button.MouseDownEventHandler += ChildrenDownEvent;
+                button.MouseDownEventHandler += ChildrenDownEvent;
             }
             else if (view is ImageView)
             {
@@ -181,52 +181,52 @@
 
         #region 鈻� 娣诲姞瀛愭帶浠禵________________________
 
-        /// <summary>
-        /// 娣诲姞瀛愭帶浠�
-        /// </summary>
-        /// <param name="view">瀛愭帶浠�</param>
-        /// <param name="chidrenBindMode">缁戝畾妯″紡</param>
-        public void AddChidren(View view, ChidrenBindMode chidrenBindMode = ChidrenBindMode.BindAll)
+        /// <summary>
+        /// 娣诲姞瀛愭帶浠�
+        /// </summary>
+        /// <param name="view">瀛愭帶浠�</param>
+        /// <param name="chidrenBindMode">缁戝畾妯″紡</param>
+        public void AddChidren(View view, ChidrenBindMode chidrenBindMode = ChidrenBindMode.BindAll)
         {
             this.oldBackColor = this.BackgroundColor;
-
+
             base.AddChidren(view);
 
             //缁戝畾瀛愭帶浠朵簨浠�
-            this.BindChidrenEvent(view, chidrenBindMode);
+            this.BindChidrenEvent(view, chidrenBindMode);
         }
 
         #endregion
 
         #region 鈻� 鎺т欢浜嬩欢___________________________
 
-        /// <summary>
-        /// 鐐瑰嚮鎸変笅浜嬩欢(鐐逛寒)
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="e">E.</param>
-        private void ChildrenDownEvent(object sender, MouseEventArgs e)
+        /// <summary>
+        /// 鐐瑰嚮鎸変笅浜嬩欢(鐐逛寒)
+        /// </summary>
+        /// <param name="sender">Sender.</param>
+        /// <param name="e">E.</param>
+        private void ChildrenDownEvent(object sender, MouseEventArgs e)
         {
-            if (this.UseClickStatu == false|| this.CanClick == false)
+            if (this.UseClickStatu == false || this.CanClick == false)
             {
                 return;
             }
-            this.StartSelectStatuAppeal(ControlCommonResourse.StatuChangedWaitTime);
+            this.StartSelectStatuAppeal(ControlCommonResourse.StatuChangedWaitTime);
         }
 
-        /// <summary>
-        /// 鐐瑰嚮鏉惧紑浜嬩欢
-        /// </summary>
-        /// <param name="sender">Sender.</param>
-        /// <param name="e">E.</param>
-        private void ChildrenUpEvent(object sender, MouseEventArgs e)
+        /// <summary>
+        /// 鐐瑰嚮鏉惧紑浜嬩欢
+        /// </summary>
+        /// <param name="sender">Sender.</param>
+        /// <param name="e">E.</param>
+        private void ChildrenUpEvent(object sender, MouseEventArgs e)
         {
             if (this.CanClick == false)
             {
                 //涓嶅厑璁哥偣鍑�
                 return;
             }
-            if (sender is FrameLayoutControl)
+            if (sender is FrameLayoutStatuControl)
             {
                 //LOG鍑哄姏
                 this.WriteLog();
@@ -235,49 +235,49 @@
             {
                 //璋冪敤濮旀墭
                 ButtonClickEvent?.Invoke(sender, e);
-            }
-            catch (Exception ex)
+            }
+            catch (Exception ex)
             {
                 //鍑虹幇鏈煡閿欒
                 var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError));
                 alert.Show();
                 //Log鍑哄姏
                 HdlLogLogic.Current.WriteLog(ex);
-            }
+            }
         }
 
-        #endregion
+        #endregion
 
-        #region 鈻� 鍗曞嚮鐘舵�佹樉绀篲______________________
+        #region 鈻� 鍗曞嚮鐘舵�佹樉绀篲______________________
 
-        /// <summary>
-        /// 璁剧疆鍗曞嚮鍚庣粨鏉熺殑鐘舵��
-        /// </summary>
-        public void SetClickNotSelectStatu()
+        /// <summary>
+        /// 璁剧疆鍗曞嚮鍚庣粨鏉熺殑鐘舵��
+        /// </summary>
+        public void SetClickNotSelectStatu()
         {
-            this.IsSelectStatu = false;
+            this.IsSelectStatu = false;
             if (this.SelectStatuEvent != null)
             {
                 this.SelectStatuEvent(false);
                 return;
             }
-
-            this.BackgroundColor = this.oldBackColor;
-        }
-
-        /// <summary>
-        /// 璁剧疆鍗曞嚮鏃剁殑鐘舵��
-        /// </summary>
-        public void SetClickSelectStatu()
+
+            this.BackgroundColor = this.oldBackColor;
+        }
+
+        /// <summary>
+        /// 璁剧疆鍗曞嚮鏃剁殑鐘舵��
+        /// </summary>
+        public void SetClickSelectStatu()
         {
-            this.IsSelectStatu = true;
+            this.IsSelectStatu = true;
             if (this.SelectStatuEvent != null)
             {
                 this.SelectStatuEvent(true);
                 return;
             }
-
-            this.BackgroundColor = UserCenterColor.Current.RowSelectBackColor;
+
+            this.BackgroundColor = UserCenterColor.Current.RowSelectBackColor;
         }
 
         #endregion
@@ -287,7 +287,7 @@
         /// <summary>
         /// 寮哄埗瀹炴柦鎺т欢閫変腑鐘舵�佺殑鐗规晥
         /// </summary>
-        /// <param name="waiTime"></param>
+        /// <param name="waiTime"></param>
         public void StartSelectStatuAppeal(int waiTime)
         {
             if (this.IsSelectStatu == true)
@@ -311,7 +311,7 @@
 
         /// <summary>
         /// 绉婚櫎搴曞眰鎺т欢鑷韩鐨勫崟鍑讳簨浠�
-        /// </summary>
+        /// </summary>
         public void RemoveBaseClickEvent()
         {
             this.MouseUpEventHandler -= ChildrenUpEvent;
@@ -320,7 +320,7 @@
 
         /// <summary>
         /// 鎺т欢鎽ф瘉
-        /// </summary>
+        /// </summary>
         public override void RemoveFromParent()
         {
             this.ButtonClickEvent = null;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
index bb6104d..9fff52d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
@@ -1,18 +1,18 @@
-锘縰sing System;
-using System.Collections.Generic;
-
-namespace Shared.Phone.UserCenter
-{
-    /// <summary>
-    /// 鍋氭垚涓�涓猂owLayout鍨嬬殑FrameLayout
-    /// </summary>
-    public class FrameRowControl : FrameLayoutControl
+锘縰sing System;
+using System.Collections.Generic;
+
+namespace Shared.Phone.UserCenter
+{
+    /// <summary>
+    /// 鍋氭垚涓�涓猂owLayout鍨嬬殑FrameLayout
+    /// </summary>
+    public class FrameRowControl : FrameLayoutStatuControl
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
         /// <summary>
         /// 姝ゆ帶浠剁殑璇嗗埆涓婚敭(鑷畾涔夎缃殑)
-        /// </summary>
+        /// </summary>
         public string MainKeys = string.Empty;
         /// <summary>
         /// 宸﹀亸绉婚噺,鍙拡瀵瑰唴缃帶浠舵湁鏁�(杩欐槸涓�涓湡瀹炲��,榛樿涓嶅亸绉汇�傛鏁颁负鍚戝彸鍋忕Щ,璐熸暟涓哄悜宸﹀亸绉�)
@@ -35,19 +35,19 @@
         /// </summary>
         private NormalViewControl btnBottomLine = null;
 
-        #endregion
+        #endregion
 
         #region 鈻� 鍒濆鍖朹____________________________
 
         /// <summary>
         /// 鍋氭垚涓�涓猂owLayout鍨嬬殑FrameLayout
-        /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
-        public FrameRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
-        {
+        /// </summary>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        public FrameRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
+        {
             this.Height = ControlCommonResourse.ListViewRowHeight;
-            this.Width = Application.CurrentWidth;
-        }
+            this.Width = Application.CurrentWidth;
+        }
 
         #endregion
 
@@ -56,7 +56,7 @@
         /// <summary>
         /// <para>娣诲姞搴曠嚎(濡傛灉宸﹁竟鏈夊浘鏍囷紝鍒欏厛娣诲姞鍥炬爣锛屽啀娣诲姞搴曠嚎)</para>
         /// <para>瀹冪殑闀垮害涓猴細褰撳墠鎺т欢瀹藉害-宸﹀彸鍥哄畾闂磋窛-宸﹁竟鍥剧墖瀹藉害(濡傛灉鏈�)-鍙宠竟鐨勫亸绉婚噺</para>
-        /// </summary>
+        /// </summary>
         public virtual NormalViewControl AddBottomLine()
         {
             if (this.btnBottomLine != null)
@@ -90,7 +90,7 @@
         /// <param name="i_caption">鍐呭</param>
         /// <param name="i_width">瀹藉害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
-        /// <returns></returns>
+        /// <returns></returns>
         public NormalViewControl AddLeftCaption(string i_caption, int i_width, bool real = true)
         {
             if (real == true)
@@ -114,7 +114,7 @@
         /// <param name="i_width">瀹藉害</param>
         /// <param name="i_height">楂樺害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
-        /// <returns></returns>
+        /// <returns></returns>
         public NormalViewControl AddLeftCaption(string i_caption, int i_width, int i_height, bool real = true)
         {
             int XX = ControlCommonResourse.XXLeft + LeftOffset;
@@ -140,7 +140,7 @@
         /// <param name="i_txtValue">鍒濆鍐呭</param>
         /// <param name="i_width">瀹藉害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
-        /// <returns></returns>
+        /// <returns></returns>
         public TextInputControl AddLeftInput(string i_txtValue, int i_width, bool real = true)
         {
             if (real == true)
@@ -173,7 +173,7 @@
         /// 娣诲姞宸﹁竟鍥炬爣
         /// </summary>
         /// <param name="i_Iconsize">鍥炬爣澶у皬</param>
-        /// <returns></returns>
+        /// <returns></returns>
         public IconViewControl AddLeftIcon(int i_Iconsize = 81)
         {
             var btnIcon = new IconViewControl(i_Iconsize);
@@ -217,7 +217,7 @@
         /// <summary>
         /// 娣诲姞鏈�鍙宠竟鐨勭┖鐧藉浘鐗囨帶浠�
         /// </summary>
-        /// <param name="i_width">鎺т欢绌哄害(闈炵湡瀹炲��)</param>
+        /// <param name="i_width">鎺т欢绌哄害(闈炵湡瀹炲��)</param>
         /// <param name="i_height">鎺т欢楂樺害(闈炵湡瀹炲��)</param>
         /// <returns></returns>
         public MostRightIconControl AddMostRightEmptyIcon(int i_width, int i_height)
@@ -233,7 +233,7 @@
                 btnContr.X += RightOffset;
             }
 
-            this.rightIconSize = Application.GetMinRealAverage(i_width);
+            this.rightIconSize = this.GetPictrueRealSize(i_width);
             if (chidrenYaxis != 0)
             {
                 btnContr.btnIcon.Y += chidrenYaxis;
@@ -312,7 +312,7 @@
             return btnContr;
         }
 
-        #endregion
+        #endregion
 
         #region 鈻� 娣诲姞涓婇儴鐨勬樉绀烘枃鏈琠________________
 
@@ -322,7 +322,7 @@
         /// <param name="i_caption">鍐呭</param>
         /// <param name="i_width">瀹藉害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
-        /// <returns></returns>
+        /// <returns></returns>
         public NormalViewControl AddTopView(string i_caption, int i_width, bool real = true)
         {
             if (real == true)
@@ -337,7 +337,7 @@
             return contr;
         }
 
-        #endregion
+        #endregion
 
         #region 鈻� 娣诲姞涓嬮儴鐨勬樉绀烘枃鏈琠________________
 
@@ -347,7 +347,7 @@
         /// <param name="i_caption">鍐呭</param>
         /// <param name="i_width">瀹藉害</param>
         /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
-        /// <returns></returns>
+        /// <returns></returns>
         public NormalViewControl AddBottomView(string i_caption, int i_width, bool real = true)
         {
             if (real == true)
@@ -363,6 +363,6 @@
             return contr;
         }
 
-        #endregion
-    }
-}
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/MessageControls/ShowMsgControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/MessageControls/ShowMsgControl.cs
index 5f5a143..25cbd29 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/MessageControls/ShowMsgControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/MessageControls/ShowMsgControl.cs
@@ -196,7 +196,7 @@
         {
 #if Android
             //纭
-            var frameConfirm = new FrameLayoutControl();
+            var frameConfirm = new FrameLayoutStatuControl();
             frameConfirm.Height = Application.GetRealHeight(127);
             frameConfirm.Width = frameBack.Width;
             frameConfirm.Gravity = Gravity.BottomCenter;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/BackViewControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/BackViewControl.cs
index 7e73166..369fa2e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/BackViewControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/BackViewControl.cs
@@ -1,16 +1,16 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Shared.Phone.UserCenter
-{
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
     /// <summary>
     /// 鍋氭垚涓�涓猅opFrameLayout鐨勮繑鍥為敭鉁�
     /// </summary>
-    public class BackViewControl : FrameLayoutControl
+    public class BackViewControl : FrameLayoutStatuControl
     {
-        /// <summary>
-        /// 鍥炬爣瀹藉害
+        /// <summary>
+        /// 鍥炬爣瀹藉害
         /// </summary>
         private int iconWidth = 30;
 
@@ -22,25 +22,25 @@
             this.UseClickStatu = false;
             this.Name = "btnBack";
             this.X = ControlCommonResourse.XXLeft - Application.GetRealWidth((110 - iconWidth) / 2);
-            this.Width = Application.GetMinRealAverage(110);
-            this.Height = Application.GetMinRealAverage(110);
+            this.Width = this.GetPictrueRealSize(110);
+            this.Height = this.GetPictrueRealSize(110);
             this.Gravity = Gravity.CenterVertical;
         }
 
-        /// <summary>
-        /// 鍒濆鍖�
+        /// <summary>
+        /// 鍒濆鍖�
         /// </summary>
-        public void InitControl()
-        {
-            var btnIcon = new ButtonBase();
-            btnIcon.Width = Application.GetMinRealAverage(30);
-            btnIcon.Height = Application.GetMinRealAverage(51);
-            btnIcon.UnSelectedImagePath = "Item/Back.png";
-            btnIcon.Gravity = Gravity.Center;
-
-            this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
-            //杩欏紶鍥剧墖濂藉儚寰堢壒娈�,鏃犳硶灞呬腑
-            btnIcon.Y += Application.GetRealHeight(5);
+        public void InitControl()
+        {
+            var btnIcon = new ButtonBase();
+            btnIcon.Width = this.GetPictrueRealSize(30);
+            btnIcon.Height = this.GetPictrueRealSize(51);
+            btnIcon.UnSelectedImagePath = "Item/Back.png";
+            btnIcon.Gravity = Gravity.Center;
+
+            this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
+            //杩欏紶鍥剧墖濂藉儚寰堢壒娈�,鏃犳硶灞呬腑
+            btnIcon.Y += Application.GetRealHeight(5);
         }
-    }
-}
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/IconBigViewControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/IconBigViewControl.cs
index cec8d6f..c63d817 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/IconBigViewControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/IconBigViewControl.cs
@@ -7,7 +7,7 @@
     /// <summary>
     /// 鍋氭垚涓�涓姞澶х偣鍑诲尯鍩熺殑鍥炬爣鎺т欢
     /// </summary>
-    public class IconBigViewControl : FrameLayoutControl
+    public class IconBigViewControl : FrameLayoutStatuControl
     {
         /// <summary>
         /// 鍥炬爣鎺т欢(杩笉寰楀繁锛岃繖涓笢瑗垮紑鏀惧嚭鍘�)
@@ -61,12 +61,12 @@
         /// <param name="i_height">鎺т欢楂樺害</param>
         public IconBigViewControl(int i_width, int i_height)
         {
-            this.Width = Application.GetMinRealAverage(110);
-            this.Height = Application.GetMinRealAverage(110);
+            this.Width = this.GetPictrueRealSize(110);
+            this.Height = this.GetPictrueRealSize(110);
 
             this.btnIcon = new IconControlCommon();
-            btnIcon.Width = Application.GetMinRealAverage(i_width);
-            btnIcon.Height = Application.GetMinRealAverage(i_height);
+            btnIcon.Width = this.GetPictrueRealSize(i_width);
+            btnIcon.Height = this.GetPictrueRealSize(i_height);
             btnIcon.Gravity = Gravity.Center;
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/IconViewControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/IconViewControl.cs
index 6068952..eb6a9cc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/IconViewControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/IconViewControl.cs
@@ -1,16 +1,16 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Shared.Phone.UserCenter
-{
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
     /// <summary>
     /// 鍋氭垚涓�涓樉绀哄浘鏍囩殑鎺т欢(闇�瑕佹墜鍔ㄥ紑鍚偣鍑荤姸鎬�)
     /// </summary>
     public class IconViewControl : IconControlCommon
     {
-        /// <summary>
-        /// 鍥炬爣澶у皬
+        /// <summary>
+        /// 鍥炬爣澶у皬
         /// </summary>
         public int IconSize = 0;
         /// <summary>
@@ -22,10 +22,10 @@
         {
             this.InitIconSize(size, size, real);
             this.IconSize = size;
-            if (real == true)
-            {
-                this.IconSize = Application.GetMinRealAverage(size);
+            if (real == true)
+            {
+                this.IconSize = this.GetPictrueRealSize(size);
             }
         }
-    }
-}
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/InformationTipView.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/InformationTipView.cs
index 70dd722..7733c6f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/InformationTipView.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/InformationTipView.cs
@@ -18,7 +18,7 @@
         {
             this.InitIconSize(size, size, true);
             this.BackgroundColor = UserCenterColor.Current.Red;
-            this.Radius = (uint)Application.GetMinRealAverage(size) / 2;
+            this.Radius = (uint)this.GetPictrueRealSize(size) / 2;
             this.X = TargetView.X + TargetView.Width / 2 + Application.GetRealWidth(10);
             this.Y = TargetView.Y;
         }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/LoadingControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/LoadingControl.cs
index 979d63f..9ba0531 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/LoadingControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/LoadingControl.cs
@@ -14,8 +14,8 @@
         /// </summary>
         public LoadingControl()
         {
-            this.Width = Application.GetMinRealAverage(74);
-            this.Height = Application.GetMinRealAverage(76);
+            this.Width = HdlControlLogic.Current.GetPictrueRealSize(74);
+            this.Height = HdlControlLogic.Current.GetPictrueRealSize(76);
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs
index 2a7151f..77406ae 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs
@@ -14,23 +14,28 @@
         /// </summary>
         public MessageManagementControl()
         {
-            this.Height = Application.GetMinRealAverage(69);
-            this.Width = Application.GetMinRealAverage(69);
+            this.Height = this.GetPictrueRealSize(69);
+            this.Width = this.GetPictrueRealSize(69);
             this.UnSelectedImagePath = "Item/MessageManagement.png";
             this.SelectedImagePath = "Item/MessageManagementSelected.png";
-            this.ButtonClickEvent += (sender, e) =>
-            {
-                //鐐瑰嚮鍚�,娓呯┖鐘舵��
-                this.IsSelected = false;
-                ControlCommonResourse.HadNewMessage = false;
 
-                var form = new UserMain.MessageManagementForm();
-                form.AddForm();
-            };
-            //娣诲姞缂撳瓨
-            ControlCommonResourse.listMessageManaContr.Add(this);
-            //鍒锋柊鐘舵��
-            this.RefreshStatu();
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+            if (Common.Config.Instance.Home.IsVirtually == false)
+            {
+                this.ButtonClickEvent += (sender, e) =>
+                {
+                    //鐐瑰嚮鍚�,娓呯┖鐘舵��
+                    this.IsSelected = false;
+                    ControlCommonResourse.HadNewMessage = false;
+
+                    var form = new UserMain.MessageManagementForm();
+                    form.AddForm();
+                };
+                //娣诲姞缂撳瓨
+                ControlCommonResourse.listMessageManaContr.Add(this);
+                //鍒锋柊鐘舵��
+                this.RefreshStatu();
+            }
         }
 
         /// <summary>
@@ -38,6 +43,12 @@
         /// </summary>
         public void RefreshStatu()
         {
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                return;
+            }
+
             if (ControlCommonResourse.HadNewMessage == true)
             {
                 //濡傛灉宸茬粡鏈夋柊娑堟伅杩囨潵浜�,灏变笉鐢ㄨ浜�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MostRightIconControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MostRightIconControl.cs
index 673e824..0d777ab 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MostRightIconControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MostRightIconControl.cs
@@ -4,18 +4,18 @@
 
 namespace Shared.Phone.UserCenter
 {
-    /// <summary>
-    /// 鍋氭垚鏀惧湪鐢婚潰鍙宠竟鐨勭殑鍥炬爣鎺т欢(娉ㄦ剰,瀹冧笉鑳界敤鏉ュ仛銆愬悜鍙炽�戠殑鍥炬爣)
-    /// </summary>
-    public class MostRightIconControl : FrameLayoutControl
-    {
+    /// <summary>
+    /// 鍋氭垚鏀惧湪鐢婚潰鍙宠竟鐨勭殑鍥炬爣鎺т欢(娉ㄦ剰,瀹冧笉鑳界敤鏉ュ仛銆愬悜鍙炽�戠殑鍥炬爣)
+    /// </summary>
+    public class MostRightIconControl : FrameLayoutStatuControl
+    {
         /// <summary>
         /// 鍥炬爣鎺т欢(杩笉寰楀繁锛岃繖涓笢瑗垮紑鏀惧嚭鍘�)
-        /// </summary>
-        public IconControlCommon btnIcon = null;
+        /// </summary>
+        public IconControlCommon btnIcon = null;
         /// <summary>
         /// UnSelectedImagePath
-        /// </summary>
+        /// </summary>
         public string UnSelectedImagePath
         {
             get { return btnIcon.UnSelectedImagePath; }
@@ -23,7 +23,7 @@
         }
         /// <summary>
         /// SelectedImagePath
-        /// </summary>
+        /// </summary>
         public string SelectedImagePath
         {
             get { return btnIcon.SelectedImagePath; }
@@ -31,49 +31,49 @@
         }
         /// <summary>
         /// IsSelected
-        /// </summary>
+        /// </summary>
         public bool IsSelected
         {
             get { return btnIcon.IsSelected; }
             set { btnIcon.IsSelected = value; }
-        }
-
+        }
+
         /// <summary>
         /// X杞寸殑鐪熷疄鍋忕Щ閲�(璇风‘淇濆凡缁忚皟鐢↖nitControl鍒濆鍖栧嚱鏁�,鐢ㄦ硶:钃濇箹涓婄殑X杞�,鍑忔帀杩欎釜鍊煎嵆鍙�)
-        /// </summary>
+        /// </summary>
         public int XOffset
         {
             get { return (this.Width - btnIcon.Width) / 2; }
-        }
-
+        }
+
         /// <summary>
         /// 鍋氭垚鏀惧湪鐢婚潰鍙宠竟鐨勭殑鍥炬爣鎺т欢(娉ㄦ剰,瀹冧笉鑳界敤鏉ュ仛銆愬悜鍙炽�戠殑鍥炬爣)
         /// </summary>
-        /// <param name="i_width">鎺т欢绌哄害</param>
-        /// <param name="i_height">鎺т欢楂樺害</param>
-        public MostRightIconControl(int i_width, int i_height)
-        {
-            this.UseClickStatu = false;
-
-            this.Width = Application.GetMinRealAverage(110);
-            this.Height = this.Parent != null ? this.Parent.Height : ControlCommonResourse.ListViewRowHeight;
-            this.Gravity = Gravity.CenterVertical;
-
-            var XX = Application.CurrentWidth - Application.GetMinRealAverage(i_width) - ControlCommonResourse.XXLeft;
-            this.X = XX - Application.GetMinRealAverage((110 - i_width) / 2);
+        /// <param name="i_width">鎺т欢绌哄害</param>
+        /// <param name="i_height">鎺т欢楂樺害</param>
+        public MostRightIconControl(int i_width, int i_height)
+        {
+            this.UseClickStatu = false;
+
+            this.Width = this.GetPictrueRealSize(110);
+            this.Height = this.Parent != null ? this.Parent.Height : ControlCommonResourse.ListViewRowHeight;
+            this.Gravity = Gravity.CenterVertical;
+
+            var XX = Application.CurrentWidth - this.GetPictrueRealSize(i_width) - ControlCommonResourse.XXLeft;
+            this.X = XX - this.GetPictrueRealSize((110 - i_width) / 2);
 
             this.btnIcon = new IconControlCommon();
-            btnIcon.Width = Application.GetMinRealAverage(i_width);
-            btnIcon.Height = Application.GetMinRealAverage(i_height);
+            btnIcon.Width = this.GetPictrueRealSize(i_width);
+            btnIcon.Height = this.GetPictrueRealSize(i_height);
             btnIcon.Gravity = Gravity.Center;
-        }
-
+        }
+
         /// <summary>
         /// 鍒濆鍖�
-        /// </summary>
+        /// </summary>
         public void InitControl()
         {
             this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
-        }
+        }
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
new file mode 100755
index 0000000..d907473
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
@@ -0,0 +1,261 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using ZigBee.Device;
+
+namespace Shared.Phone.UserCenter
+{
+    /// <summary>
+    /// 璁惧鍔熻兘绫诲瀷鐨勮嚜瀹氫箟琛屾帶浠�
+    /// </summary>
+    public class DeviceFunctionTypeRowControl : FrameCaptionViewControl
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 鍒ゆ柇璇ユ帶浠惰兘鍚︽樉绀�(鏈�濂界‘淇濊澶囧璞′笉涓簄ull)
+        /// </summary>
+        public bool CanShowRow
+        {
+            get { return this.CheckCanShowRow(); }
+        }
+        /// <summary>
+        /// 璁惧瀵硅薄
+        /// </summary>
+        private CommonDevice device = null;
+        /// <summary>
+        /// 褰撳墠閫夋嫨鐨勫姛鑳界被鍨嬬储寮�
+        /// </summary>
+        private int nowSelectNo = -1;
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 璁惧鍔熻兘绫诲瀷鐨勮嚜瀹氫箟琛屾帶浠�(姝ゆ柟娉曢�夋嫨涔嬪悗,鏃犳潯浠剁洿鎺ュ彉鏇寸被鍨�)
+        /// </summary>
+        /// <param name="i_device">璁惧鐨勫璞�</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        public DeviceFunctionTypeRowControl(CommonDevice i_device, int i_ChidrenYaxis = 0) : base("", "", i_ChidrenYaxis)
+        {
+            this.device = i_device;
+            this.UseClickStatu = false;
+        }
+
+        /// <summary>
+        /// 鍒濆鍖�
+        /// </summary>
+        public override void InitControl()
+        {
+            //鍒濆鍖栧垵濮嬫暟鎹�
+            this.InitDefultData();
+            //鍒濆鍖栧簳灞傛暟鎹�
+            base.InitControl();
+
+            if (this.device == null)
+            {
+                //姝ゆ帶浠堕噰鐢ㄧ殑鏄彟澶栦竴绉嶅垵濮嬪寲鏂瑰紡
+                return;
+            }
+
+            //绌烘皵寮�鍏冲拰缁х數鍣ㄥ彲浠ラ�夋嫨鍔熻兘绫诲瀷
+            if (this.device.Type == DeviceType.AirSwitch
+                || this.device.Type == DeviceType.OnOffOutput)
+            {
+                this.UseClickStatu = true;
+                //鍙崇澶�
+                this.AddRightArrow();
+
+                this.ButtonClickEvent += (sender, e) =>
+                {
+                    //鏄剧ず閫夋嫨璁惧鍔熻兘绫诲瀷鐨勭晫闈�
+                    this.ShowSelectDeviceFunctionListForm();
+                };
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 鏄剧ず閫夋嫨璁惧鍔熻兘绫诲瀷_______________
+
+        /// <summary>
+        /// 鏄剧ず閫夋嫨璁惧鍔熻兘绫诲瀷鐨勭晫闈�
+        /// </summary>
+        private void ShowSelectDeviceFunctionListForm()
+        {
+            //鏄剧ず鍒楄〃
+            var listText = new List<string>();
+            listText.Add(Language.StringByID(R.MyInternationalizationString.uSwitch));//寮�鍏�
+            listText.Add(Language.StringByID(R.MyInternationalizationString.uLight));//鐏厜
+            listText.Add(Language.StringByID(R.MyInternationalizationString.uSocket1));//鎻掑骇
+            //鏍囬:閫夋嫨鍔熻兘绫诲瀷
+            var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType);
+
+            var form = new BottomItemSelectForm();
+            form.CancelCallEvent = true;//鍏佽鍙栨秷
+            form.AddForm(title, listText, nowSelectNo);
+            form.FinishSelectEvent += (selectNo) =>
+            {
+                //-1:閫夋嫨鍙栨秷
+                this.Text = selectNo == -1 ? string.Empty : listText[selectNo];
+                nowSelectNo = selectNo;
+
+                //璁板綍璧峰綋鍓嶉�夋嫨鐨勫姛鑳界被鍨�
+                this.RefreshDfunctionType();
+            };
+        }
+        #endregion
+
+        #region 鈻� 鍒濆鍖栧垵濮嬫暟鎹甠____________________
+
+        /// <summary>
+        /// 鍒濆鍖栧垵濮嬫暟鎹�
+        /// </summary>
+        private void InitDefultData()
+        {
+            //鏍囬锛氬姛鑳界被鍨�
+            this.btnCaption.Text = Language.StringByID(R.MyInternationalizationString.uFunctionType);
+
+            var myFunType = DeviceFunctionType.A鏈畾涔�;
+            if (this.device != null)
+            {
+                myFunType = this.device.DfunctionType;
+            }
+
+            //鍔熻兘绫诲瀷鐨勭炕璇戝悕瀛�
+            string strType = string.Empty;
+            if (myFunType == DeviceFunctionType.A鐏厜)
+            {
+                strType = Language.StringByID(R.MyInternationalizationString.uLight);
+                nowSelectNo = 1;
+            }
+            else if (this.device.DfunctionType == DeviceFunctionType.A寮�鍏�)
+            {
+                strType = Language.StringByID(R.MyInternationalizationString.uSwitch);
+                nowSelectNo = 0;
+            }
+            else if (this.device.DfunctionType == DeviceFunctionType.A鎻掑骇)
+            {
+                strType = Language.StringByID(R.MyInternationalizationString.uSocket1);
+                nowSelectNo = 2;
+            }
+
+            //濡傛灉璁惧涓嶄负null
+            if (this.device != null)
+            {
+                if (this.device.Type == DeviceType.ColorDimmableLight
+                    || this.device.Type == DeviceType.DimmableLight)
+                {
+                    //鐏厜绫诲浐瀹氫负 鐏厜
+                    strType = Language.StringByID(R.MyInternationalizationString.uLight);
+                    nowSelectNo = 1;
+                }
+                else if (this.device.Type == DeviceType.WindowCoveringDevice)
+                {
+                    //绐楀笜鍥哄畾涓� 閬槼
+                    strType = Language.StringByID(R.MyInternationalizationString.uDeviceBelongId100);
+                    nowSelectNo = -1;
+                }
+                else if (this.device.Type == DeviceType.Thermostat)
+                {
+                    //绌鸿皟鍥哄畾涓� 绌鸿皟
+                    strType = Language.StringByID(R.MyInternationalizationString.uDeviceBelongId3600);
+                    nowSelectNo = -1;
+                }
+                else if (this.device.Type == DeviceType.DoorLock)
+                {
+                    //闂ㄩ攣鍥哄畾涓� 闂ㄩ攣
+                    strType = Language.StringByID(R.MyInternationalizationString.uDeviceBelongId2800);
+                    nowSelectNo = -1;
+                }
+            }
+            //鏄剧ず鏂囨湰
+            this.txtView.Text = strType;
+        }
+
+        #endregion
+
+        #region 鈻� 妫�娴嬭兘鍚︽樉绀篲______________________
+
+        /// <summary>
+        /// 妫�娴嬭兘鍚︽樉绀�
+        /// </summary>
+        /// <returns></returns>
+        private bool CheckCanShowRow()
+        {
+            if (this.device == null) { return true; }
+
+            if (this.device.Type == DeviceType.AirSwitch//绌烘皵寮�鍏�
+                || this.device.Type == DeviceType.ColorDimmableLight//褰╃伅
+                || this.device.Type == DeviceType.DimmableLight//璋冨厜鐏�
+                || this.device.Type == DeviceType.DoorLock//闂ㄩ攣
+                || this.device.Type == DeviceType.OnOffOutput//缁х數鍣�
+                || this.device.Type == DeviceType.Thermostat//绌鸿皟
+                || this.device.Type == DeviceType.WindowCoveringDevice)//绐楀笜
+            {
+                return true;
+            }
+            return false;
+        }
+
+        #endregion
+
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        /// <summary>
+        /// 鍒锋柊璁惧鍔熻兘绫诲瀷
+        /// </summary>
+        private void RefreshDfunctionType()
+        {
+            if (this.nowSelectNo == 0)
+            {
+                this.device.DfunctionType = DeviceFunctionType.A寮�鍏�;
+                if (this.device.IsCustomizeImage == false)
+                {
+                    //閲嶆柊璁剧疆鍥剧墖
+                    this.device.IconPath = "Device/Switch.png";
+                }
+            }
+            else if (this.nowSelectNo == 1)
+            {
+                this.device.DfunctionType = DeviceFunctionType.A鐏厜;
+                if (this.device.IsCustomizeImage == false)
+                {
+                    //閲嶆柊璁剧疆鍥剧墖
+                    this.device.IconPath = "Device/Light.png";
+                }
+            }
+            else if (this.nowSelectNo == 2)
+            {
+                this.device.DfunctionType = DeviceFunctionType.A鎻掑骇;
+                if (this.device.IsCustomizeImage == false)
+                {
+                    //閲嶆柊璁剧疆鍥剧墖
+                    this.device.IconPath = "Device/Socket1.png";
+                }
+            }
+            else
+            {
+                this.device.DfunctionType = DeviceFunctionType.A鏈畾涔�;
+                if (this.device.IsCustomizeImage == false)
+                {
+                    //閲嶆柊璁剧疆鍥剧墖
+                    if (this.device.Type == DeviceType.AirSwitch)
+                    {
+                        //绌烘皵寮�鍏�
+                        this.device.IconPath = "Device/Switch.png";
+                    }
+                    else if (this.device.Type == DeviceType.OnOffOutput)
+                    {
+                        //缁х數鍣�
+                        this.device.IconPath = "Device/RelayEpoint.png";
+                    }
+                }
+            }
+            this.device.ReSave();
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/RowLayoutControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/RowLayoutControl.cs
index 1e42396..668b90c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/RowLayoutControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/RowLayoutControl.cs
@@ -6,7 +6,7 @@
     /// <summary>
     /// 鍋氭垚涓�涓偣鍑昏兘澶熸樉绀洪�変腑鐘舵�佽儗鏅壊鐨凴owLayout(鎷ユ湁妗屽竷)
     /// </summary>
-    public class RowLayoutControl : RowLayout
+    public class RowLayoutControl : RowLayoutBase
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
@@ -112,9 +112,8 @@
             }
 
             return btnEditor;
-        }
-
-        #endregion
+        }
 
+        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
index 653e1d9..bc94bb7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
@@ -236,6 +236,56 @@
 
         #endregion
 
+        #region 鈻� 鏂伴_______________________________
+        /// <summary>
+        /// SendFreshAirStatuComand
+        /// </summary>
+        /// <param name="device">璁惧</param>
+        public void SendFreshAirStatuComand(CommonDevice device)
+        {
+            if (device == null)
+            {
+                return;
+            }
+            new System.Threading.Thread(() =>
+            {
+                SendFreshAirFanStatuComand(device);
+                System.Threading.Thread.Sleep(300);
+            })
+            { IsBackground = true }.Start();
+        }
+
+        /// <summary>
+        /// SendFanStatuComand
+        /// </summary>
+        /// <param name="device">璁惧</param>
+        private void SendFreshAirFanStatuComand(CommonDevice device)
+        {
+            if (device == null)
+            {
+                return;
+            }
+            var jObject = new Newtonsoft.Json.Linq.JObject
+            {
+                { "DeviceAddr",device.DeviceAddr },
+                { "Epoint", device.DeviceEpoint },
+                { "Cluster_ID", (int)Cluster_ID.FanControl },
+                { "Command", 108 }
+            };
+            var attriBute = new Newtonsoft.Json.Linq.JArray
+            {
+               new Newtonsoft.Json.Linq.JObject
+               {
+                 { "AttriButeId", (int)AttriButeId.FanMode}
+               }
+            };
+            var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
+            jObject.Add("Data", data);
+            device.Gateway?.Send("GetDeviceStatus", jObject.ToString());
+        }
+
+        #endregion
+
         #region 鈻� 绐楀笜_______________________________
         /// <summary>
         /// 鍙戦�佽幏鍙栫獥甯樼姸鎬佸懡浠�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs
index 6544496..99c9608 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs
@@ -71,7 +71,7 @@
         {
             var pra = new GetDoorIdPra();
             pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
-            pra.DoorLockId = i_doorLock.DeviceAddr + "_200";
+            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);
@@ -87,7 +87,7 @@
             //濡傛灉杩樻病鏈夊垱寤�,鍒欒櫄鎷熶竴涓壒娈婄殑涓滆タ鍑烘潵
             var pra2 = new AddDoorPra();
             pra2.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
-            pra2.DoorLockId = i_doorLock.DeviceAddr + "_200";
+            pra2.DoorLockId = i_doorLock.DeviceAddr + "_" + i_doorLock.DeviceEpoint;
             var result2 = await 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 179faf5..6fbdb9e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs
@@ -154,6 +154,35 @@
                 }
                 return $"{(device as Rollershade).WcdCurrentPositionLiftPercentage}%";
             }
+            else if (device.Type == DeviceType.FreshAir)
+            {
+                //鍦ㄧ綉鍏虫病鏈夊洖澶嶄箣鍓�,榛樿绂荤嚎
+                if (device.HadReadDeviceStatu == false)
+                {
+                    return Language.StringByID(R.MyInternationalizationString.uOffLine);
+                }
+
+                //妯″紡
+                string wind = string.Empty;
+                var freshAir = device as FreshAir;
+                if (freshAir.currentFanStatus == 0)
+                {
+                    return Language.StringByID(R.MyInternationalizationString.Close);
+                }
+                if (freshAir.currentFanSpeed == 1)
+                {
+                    wind = Language.StringByID(R.MyInternationalizationString.Fan_Low);
+                }
+                else if (freshAir.currentFanSpeed == 2)
+                {
+                    wind = Language.StringByID(R.MyInternationalizationString.Fan_Middle);
+                }
+                else if (freshAir.currentFanSpeed == 3)
+                {
+                    wind = Language.StringByID(R.MyInternationalizationString.Fan_Height);
+                }
+                return $"{wind}";
+            }
             else if (device.Type == DeviceType.Thermostat)
             {
                 //鍦ㄧ綉鍏虫病鏈夊洖澶嶄箣鍓�,榛樿绂荤嚎
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
new file mode 100755
index 0000000..d181a06
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
@@ -0,0 +1,964 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using Shared.Common;
+using ZigBee.Device;
+
+namespace Shared.Phone.UserCenter
+{
+    /// <summary>
+    /// App浣撻獙璐﹀彿鐨勯�昏緫
+    /// </summary>
+    public class HdlExperienceAccountLogic
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// App浣撻獙璐﹀彿鐨勯�昏緫
+        /// </summary>
+        private static HdlExperienceAccountLogic m_Current = null;
+        /// <summary>
+        /// App浣撻獙璐﹀彿鐨勯�昏緫
+        /// </summary>
+        public static HdlExperienceAccountLogic Current
+        {
+            get
+            {
+                if (m_Current == null)
+                {
+                    m_Current = new HdlExperienceAccountLogic();
+                }
+                return m_Current;
+            }
+        }
+
+        /// <summary>
+        /// 鐢ㄦ潵閫掑鐢熸垚Mac鐢ㄧ殑
+        /// </summary>
+        private int DeviceNumber = 0;
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鍒濆鍖栧叏閮ㄤ綋楠屾暟鎹�
+        /// </summary>
+        public void InitAllExperienceData()
+        {
+            //鍒濆鍖栫敤鎴�
+            this.InitUserInfoData();
+            //鍒濆鍖栦綇瀹�
+            this.InitHomeData();
+            //鍒濆鍖栨ゼ灞�
+            this.InitFloorData();
+            //鍒濆鍖栨埧闂�
+            this.InitRoomData();
+            //鍒濆鍖栬澶�
+            this.InitDeviceData();
+            //鍒濆鍖栧満鏅�
+            this.InitSceneData();
+        }
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖栫敤鎴穇________________________
+
+        /// <summary>
+        /// 鍒濆鍖栫敤鎴�
+        /// </summary>
+        private void InitUserInfoData()
+        {
+            UserCenterResourse.UserInfo = new UserInformation();
+            UserCenterResourse.UserInfo.AuthorityNo = 1;//缁欎粬绠$悊鍛樼О鍙�
+            UserCenterResourse.UserInfo.AuthorityText = Language.StringByID(R.MyInternationalizationString.Administrator);
+            //铏氭嫙璐﹀彿
+            UserCenterResourse.UserInfo.UserName = Language.StringByID(R.MyInternationalizationString.uVirtualAccount);
+        }
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖栦綇瀹卂________________________
+
+        /// <summary>
+        /// 鍒濆鍖栦綇瀹�
+        /// </summary>
+        private void InitHomeData()
+        {
+            //鍒濆鍖栦綇瀹匢D
+            string homeId = "abcdefghijklmn";
+            //鍒濆Guid
+            Config.Instance.Guid = "chushiGuid";
+            var path = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Config.Instance.Guid, homeId);
+            if (System.IO.Directory.Exists(path) == true)
+            {
+                //鍐嶆鍚姩鐨勬椂鍊欙紝閲嶆柊寮�濮�
+                System.IO.Directory.Delete(path, true);
+            }
+            System.IO.Directory.CreateDirectory(path);
+
+            //娉ㄦ剰,杩欓噷涓嶆竻绌哄綋鍓嶄綇瀹呭垪琛�,淇濈暀瀹冧箣鍓嶇殑浣忓畢鍒楄〃
+
+            //鍒涘缓涓存椂浣忓畢
+            var house = new House() { Id = homeId, Name = Language.StringByID(R.MyInternationalizationString.uMyHome) };
+            house.IsVirtually = true;
+            house.Save(false);
+            Config.Instance.HomeId = house.Id;
+            Config.Instance.Home = House.GetHouseByHouseId(house.Id);
+        }
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖栨ゼ灞俖________________________
+
+        /// <summary>
+        /// 鍒濆鍖栨ゼ灞�
+        /// </summary>
+        private void InitFloorData()
+        {
+            Config.Instance.Home.FloorDics = new Dictionary<string, string>();
+            //Config.Instance.Home.FloorDics["floorKey1"] = "1F";
+            //Config.Instance.Home.FloorDics["floorKey2"] = "2F";
+            //Config.Instance.Home.FloorDics["floorKey3"] = "3F";
+            //Config.Instance.Home.FloorDics["floorKey4"] = "4F";
+            //Config.Instance.Home.FloorDics["floorKey5"] = "5F";
+        }
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖栨埧闂確________________________
+
+        /// <summary>
+        /// 鑾峰彇鎴块棿鏍锋澘鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        private Dictionary<string, string> GetRoomSampleList()
+        {
+            var dicRoomName = new Dictionary<string, string>();
+            //瀹㈠巺
+            dicRoomName["KeTing"] = Language.StringByID(R.MyInternationalizationString.uLivingRoom);
+            //闃冲彴
+            dicRoomName["YangTai"] = Language.StringByID(R.MyInternationalizationString.uBalcony);
+            //鍗у
+            dicRoomName["WoShi"] = Language.StringByID(R.MyInternationalizationString.uBedroom);
+            //鐜勫叧
+            dicRoomName["XuanGuan"] = Language.StringByID(R.MyInternationalizationString.uVestibule);
+            //鍘ㄦ埧
+            dicRoomName["ChuFang"] = Language.StringByID(R.MyInternationalizationString.uKitchen);
+            //璧板粖
+            dicRoomName["ZouLang"] = Language.StringByID(R.MyInternationalizationString.uCorridor);
+
+            return dicRoomName;
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栨埧闂�
+        /// </summary>
+        private void InitRoomData()
+        {
+            //鍏堝埛鏂板鍣�
+            HdlRoomLogic.Current.InitAllRoom();
+
+            //鑾峰彇鍏ㄩ儴鐨勬ゼ灞備富閿�
+            var listFloorKey = this.GetAllFloorKeys();
+            var dicRoomName = this.GetRoomSampleList();
+
+            //璁剧疆鍒濆妤煎眰
+            Config.Instance.Home.CurrentFloorId = listFloorKey[0];
+            foreach (string floorKey in listFloorKey)
+            {
+                foreach (string roomId in dicRoomName.Keys)
+                {
+                    //鍒涘缓鏂版埧闂�
+                    var newRoom = new Room();
+                    newRoom.Id = floorKey + "_" + roomId;
+                    newRoom.Name = dicRoomName[roomId];
+                    newRoom.BackgroundImage = "RoomIcon/0.jpg";
+                    newRoom.FloorId = floorKey;
+                    HdlRoomLogic.Current.AddRoom(newRoom, false);
+                }
+            }
+        }
+
+        /// <summary>
+        /// 鑾峰彇鍏ㄩ儴鐨勬ゼ灞備富閿�
+        /// </summary>
+        /// <returns></returns>
+        private List<string> GetAllFloorKeys()
+        {
+            var listKey = new List<string>();
+            foreach (var strKey in Config.Instance.Home.FloorDics.Keys)
+            {
+                listKey.Add(strKey);
+            }
+            if (listKey.Count == 0)
+            {
+                listKey.Add("");
+            }
+            return listKey;
+        }
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖栬澶嘷________________________
+
+        /// <summary>
+        /// 璁剧疆闇�瑕佸垱寤虹殑铏氭嫙璁惧鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        private List<AddDevicePra> GetVirtualDeviceList()
+        {
+            //floorKey1   _   KeTing  YangTai  WoShi  XuanGuan  ChuFang  ZouLang
+            var list = new List<AddDevicePra>();
+            //鑾峰彇鍏ㄩ儴鐨勬ゼ灞備富閿�
+            var listFloorKey = this.GetAllFloorKeys();
+            foreach (var floorKey in listFloorKey)
+            {
+                //瀹㈠巺
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A2鎸夐敭闈㈡澘, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A3鎸夐敭闈㈡澘, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A4鎸夐敭闈㈡澘, RoomId = floorKey + "_KeTing", DeviceCount = 2 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A绌鸿皟缃戝叧, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
+
+                //闃冲彴
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A220pir浼犳劅鍣�, RoomId = floorKey + "_YangTai", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鍗峰笜鐢垫満, RoomId = floorKey + "_YangTai", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A寮�鍚堝笜鐢垫満, RoomId = floorKey + "_YangTai", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A2鎸夐敭闈㈡澘, RoomId = floorKey + "_YangTai", DeviceCount = 1 });
+
+                //鍗у
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A1璺皟鍏夊櫒, RoomId = floorKey + "_WoShi", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A3璺户鐢靛櫒, RoomId = floorKey + "_WoShi", DeviceCount = 1 });
+
+                //鐜勫叧
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A绌烘皵寮�鍏�, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A1璺皟鍏夊櫒, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A闂ㄧ獥纾佷紶鎰熷櫒, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鏅鸿兘闂ㄩ攣, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
+
+                //鍘ㄦ埧
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A4鎸夐敭闈㈡澘, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A姘存蹈浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鐑熼浘浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鐕冩皵浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
+
+                //璧板粖
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A4鎸夐敭闈㈡澘, RoomId = floorKey + "_ZouLang", DeviceCount = 1 });
+            }
+            return list;
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栬澶�
+        /// </summary>
+        private void InitDeviceData()
+        {
+            //鍏堝埛鏂板鍣�
+            LocalDevice.Current.ReFreshByLocal();
+
+            Type thisType = m_Current.GetType();
+            //鑾峰彇闇�瑕佸垱寤虹殑铏氭嫙璁惧鍒楄〃
+            var list = this.GetVirtualDeviceList();
+            foreach (var data in list)
+            {
+                string methordName = "Zigbee" + data.DeviceType.ToString().Substring(1);
+                //鍙嶅皠鎸囧畾鐨勫嚱鏁�
+                var myMethod = thisType.GetMethod(methordName);
+                myMethod.Invoke(this, new object[] { data.DeviceCount, data.RoomId });
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖栧満鏅痏________________________
+
+        /// <summary>
+        /// 鍒濆鍖栧満鏅�
+        /// </summary>
+        private void InitSceneData()
+        {
+            //鍒锋柊瀹瑰櫒
+            HdlSceneLogic.Current.ReFreshByLocal();
+
+            //鑾峰彇鍏ㄩ儴鐨勬ゼ灞備富閿�
+            var listFloorKey = this.GetAllFloorKeys();
+            //鑾峰彇鍏ㄩ儴鐨勬埧闂存ā鏉垮垪琛�
+            var dicRoom = this.GetRoomSampleList();
+
+            //floorKey1   _   KeTing  YangTai  WoShi  XuanGuan  ChuFang  ZouLang
+            int sceneIdNo = 1;
+            //瀵规瘡涓�涓ゼ灞�
+            foreach (var floorKey in listFloorKey)
+            {
+                //瀵规瘡涓�涓埧闂�
+                foreach (var strKey in dicRoom.Keys)
+                {
+                    var room = HdlRoomLogic.Current.GetRoomById(floorKey + "_" + strKey);
+                    if (room == null)
+                    {
+                        continue;
+                    }
+                    //鐏叏寮�
+                    var listAdjust1 = this.InitVirtualSceneAdjustList(room, 1);
+                    var sceneName = Language.StringByID(R.MyInternationalizationString.uAllLightOpen);
+                    var scene = HdlSceneLogic.Current.AddVirtualScene(sceneIdNo, sceneName, listAdjust1);
+                    sceneIdNo++;
+                    HdlSceneLogic.Current.AddSceneToRoom(room, scene);
+
+                    //鐏叏鍏�
+                    var listAdjust2 = this.InitVirtualSceneAdjustList(room, 0);
+                    var sceneName2 = Language.StringByID(R.MyInternationalizationString.uAllLightClose);
+                    var scene2 = HdlSceneLogic.Current.AddVirtualScene(sceneIdNo, sceneName2, listAdjust2);
+                    sceneIdNo++;
+                    HdlSceneLogic.Current.AddSceneToRoom(room, scene2);
+                }
+            }
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栬櫄鎷熷満鏅殑鎵ц鐩爣(statu 0:鍏� 1:寮�)
+        /// </summary>
+        /// <param name="i_room"></param>
+        /// <param name="statu"></param>
+        /// <returns></returns>
+        private List<Scene.DeviceListData> InitVirtualSceneAdjustList(Room i_room, int statu)
+        {
+            var listBind = new List<Scene.DeviceListData>();
+            foreach (var mainKey in i_room.ListDevice)
+            {
+                var device = LocalDevice.Current.GetDevice(mainKey);
+                if (device == null) { continue; }
+                //鍙缁х數鍣ㄥ拰鐏�
+                if (device.Type == DeviceType.OnOffOutput
+                    || device.Type == DeviceType.DimmableLight)
+                {
+                    var data = new Scene.DeviceListData();
+                    data.Type = 0;
+                    data.DeviceAddr = device.DeviceAddr;
+                    data.Epoint = device.DeviceEpoint;
+                    data.TaskList.Add(new Safeguard.TaskListInfo() { TaskType = 1, Data1 = statu });
+                    listBind.Add(data);
+                }
+            }
+            return listBind;
+        }
+
+        #endregion
+
+        #region 鈻� 鍒涘缓铏氭嫙璁惧鍒楄〃___________________
+
+        public void Zigbee寮�鍚堝笜鐢垫満(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new Rollershade() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.WcdType = 4;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 100, 100, "MWM65B-ZB.20", i_RoomId);
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鍗峰笜鐢垫満(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new Rollershade() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.WcdType = 0;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 101, 101, "MVSM35B-ZB.20", i_RoomId);
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee4鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //4涓共鎺ョ偣
+                for (int j = 1; j <= 4; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 200, 200, "MPT4/R4-ZB.18", i_RoomId);
+                }
+                //4涓户鐢靛櫒
+                for (int j = 5; j <= 8; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 200, 200, "MPT4/R4-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 4);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 9 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 200, 200, "MPT4/R4-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee3鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //3涓共鎺ョ偣
+                for (int j = 1; j <= 3; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 201, 201, "MPT3/R3-ZB.18", i_RoomId);
+                }
+                //3涓户鐢靛櫒
+                for (int j = 4; j <= 6; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 201, 201, "MPT3/R3-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 3);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 7 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 201, 201, "MPT3/R3-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee2鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //2涓共鎺ョ偣
+                for (int j = 1; j <= 2; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 202, 202, "MPT2/R2-ZB.18", i_RoomId);
+                }
+                //2涓户鐢靛櫒
+                for (int j = 3; j <= 4; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 202, 202, "MPT2/R2-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 2);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 5 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 202, 202, "MPT2/R2-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee绠�绾�4鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //4涓共鎺ョ偣
+                for (int j = 1; j <= 4; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 220, 220, "MPT4R4L/S-ZB.18", i_RoomId);
+                }
+                //4涓户鐢靛櫒
+                for (int j = 5; j <= 8; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 220, 220, "MPT4R4L/S-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 4);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 9 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 220, 220, "MPT4R4L/S-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee绠�绾�3鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //3涓共鎺ョ偣
+                for (int j = 1; j <= 3; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 221, 221, "MPT3R3L/S-ZB.18", i_RoomId);
+                }
+                //3涓户鐢靛櫒
+                for (int j = 4; j <= 6; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 221, 221, "MPT3R3L/S-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 3);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 7 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 221, 221, "MPT3R3L/S-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee绠�绾�2鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //2涓共鎺ョ偣
+                for (int j = 1; j <= 2; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 222, 222, "MPT2R2L/S-ZB.18", i_RoomId);
+                }
+                //2涓户鐢靛櫒
+                for (int j = 3; j <= 4; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 222, 222, "MPT2R2L/S-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 2);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 5 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 222, 222, "MPT2R2L/S-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee220pir浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //1涓紶鎰熷櫒
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 13;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1200, 1200, "MSPIR01-ZB.10", i_RoomId);
+
+                //1涓户鐢靛櫒
+                var device2 = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 2 };
+                device2.DfunctionType = DeviceFunctionType.A鐏厜;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 1200, 1200, "MSPIR01-ZB.10", i_RoomId);
+                device2.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + 1;
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鐕冩皵浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 43;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1300, 1300, "MSG01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee闂ㄧ獥纾佷紶鎰熷櫒(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 21;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1301, 1301, "MSDC01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鐑熼浘浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 40;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1301, 1301, "MSS01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee绾㈠浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 13;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1303, 1303, "MSPIR01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee姘存蹈浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 42;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1304, 1304, "MSW01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee绱ф�ユ寜閿�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 44;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1305, 1305, "MBU01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee3璺户鐢靛櫒(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //3涓户鐢靛櫒
+                for (int j = 1; j <= 3; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 2300, 2300, "MPR0310-ZB.10", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + j;
+                }
+                //7涓共鎺ョ偣
+                for (int j = 4; j <= 10; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 2300, 2300, "MPR0310-ZB.10", i_RoomId);
+                }
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee1璺皟鍏夊櫒(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //7涓共鎺ョ偣
+                for (int j = 1; j <= 7; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 2300, 2300, "MPD0101-ZB.10", i_RoomId);
+                }
+
+                //1涓户鐢靛櫒
+                var device2 = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 8 };
+                device2.DfunctionType = DeviceFunctionType.A鐏厜;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 2300, 2300, "MPD0101-ZB.10", i_RoomId);
+                device2.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + 1;
+
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee绌鸿皟缃戝叧(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //10涓┖璋冨簲璇ュ彲浠ヤ簡
+                for (int j = 1; j <= 10; j++)
+                {
+                    var device = new AC() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //瀹ゆ俯榛樿26鈩�
+                    device.currentLocalTemperature = 26;
+                    device.currentCoolingSetpoint = 26;
+                    device.currentHeatingSetpoint = 26;
+                    device.currentAutoSetpoint = 26;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 3600, 3600, "MAC/GW-ZB.10", i_RoomId);
+                }
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee绌烘皵寮�鍏�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new AirSwitch() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 4100, 4100, "MBCI01-ZB.10", i_RoomId);
+                device.DfunctionType = DeviceFunctionType.A寮�鍏�;
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鏅鸿兘闂ㄩ攣(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new ZigBee.Device.DoorLock() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 2800, 2800, "S-one", i_RoomId);
+                device.DfunctionType = DeviceFunctionType.A寮�鍏�;
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鏂规偊鍗曞紑鍙屾帶闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //2涓共鎺ョ偣
+                for (int j = 1; j <= 2; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 240, 240, "MP2B/TILE-ZB.18", i_RoomId);
+                }
+                //1涓户鐢靛櫒
+                for (int j = 3; j <= 3; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 240, 240, "MP2B/TILE-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 2);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 4 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 240, 240, "MP2B/TILE-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鏂规偊鍙屽紑鍥涙帶闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //4涓共鎺ョ偣
+                for (int j = 1; j <= 4; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 241, 241, "MP4B/TILE-ZB.18", i_RoomId);
+                }
+                //2涓户鐢靛櫒
+                for (int j = 5; j <= 6; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 241, 241, "MP4B/TILE-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 4);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 7 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 241, 241, "MP4B/TILE-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鏂规偊鍥涘紑鍏帶闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //8涓共鎺ョ偣
+                for (int j = 1; j <= 8; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 242, 242, "MP8B/TILE-ZB.18", i_RoomId);
+                }
+                //4涓户鐢靛櫒
+                for (int j = 9; j <= 12; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 242, 242, "MP8B/TILE-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 8);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 13 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 242, 242, "MP8B/TILE-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鏂规偊鏂伴闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //1鏂伴
+                var device = new FreshAir() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 250, 250, "MPFA/TILE-ZB.18", i_RoomId);
+
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 2 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 250, 250, "MPFA/TILE-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鏂规偊鏂伴灏忔ā鍧�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //1鏂伴
+                var device = new FreshAir() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 2310, 2310, "MFA01-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        /// <summary>
+        /// 璁剧疆璁惧鐨勫熀鏈俊鎭�
+        /// </summary>
+        /// <param name="device"></param>
+        private void SetBaseDataToDevice(CommonDevice device, int HwVersion, int ImgTypeId,
+            string ModelIdentifier, string roomId)
+        {
+            device.DeviceEpointName = string.Empty;
+            device.HadReadDeviceStatu = true;
+            device.DeviceName = string.Empty;
+            device.IsOnline = 1;
+            device.HwVersion = HwVersion;
+            device.ImgTypeId = ImgTypeId;
+            device.DriveCode = 0;
+            device.ManufacturerName = "HDL";
+            device.ModelIdentifier = ModelIdentifier;
+            device.CurrentGateWayId = string.Empty;
+
+            //榛樿姣忎釜璁惧閮藉彲浠ュ畾浣�
+            device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 3 });
+            device.OutClusterList.Add(new CommonDevice.OutClusterObj { OutCluster = 3 });
+
+            //娣诲姞铏氭嫙璁惧
+            LocalDevice.Current.AddVirtualDeviceToMemory(device);
+
+            var room = HdlRoomLogic.Current.GetRoomById(roomId);
+            if (room != null)
+            {
+                //娣诲姞鎴块棿
+                HdlRoomLogic.Current.AddDevice(room, device, true);
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 璁惧鏋氫妇___________________________
+
+        /// <summary>
+        /// 铏氭嫙璁惧鏋氫妇
+        /// </summary>
+        private enum VirtualDeviceEnum
+        {
+            A寮�鍚堝笜鐢垫満 = 1,
+            A鍗峰笜鐢垫満 = 2,
+            A4鎸夐敭闈㈡澘 = 3,
+            A3鎸夐敭闈㈡澘 = 4,
+            A2鎸夐敭闈㈡澘 = 5,
+            A绠�绾�4鎸夐敭闈㈡澘 = 7,
+            A绠�绾�3鎸夐敭闈㈡澘 = 8,
+            A绠�绾�2鎸夐敭闈㈡澘 = 9,
+            A220pir浼犳劅鍣� = 10,
+            A鐕冩皵浼犳劅鍣� = 11,
+            A闂ㄧ獥纾佷紶鎰熷櫒 = 12,
+            A鐑熼浘浼犳劅鍣� = 13,
+            A绾㈠浼犳劅鍣� = 14,
+            A姘存蹈浼犳劅鍣� = 15,
+            A绱ф�ユ寜閿� = 16,
+            A3璺户鐢靛櫒 = 17,
+            A1璺皟鍏夊櫒 = 18,
+            A绌鸿皟缃戝叧 = 19,
+            A绌烘皵寮�鍏� = 20,
+            A鏅鸿兘闂ㄩ攣 = 21,
+            A鏂规偊鍗曞紑鍙屾帶闈㈡澘 = 22,
+            A鏂规偊鍙屽紑鍥涙帶闈㈡澘 = 23,
+            A鏂规偊鍥涘紑鍏帶闈㈡澘 = 24,
+            A鏂规偊鏂伴闈㈡澘 = 25,
+            A鏂规偊鏂伴灏忔ā鍧� = 26
+        }
+
+        #endregion
+
+        #region 鈻� 缁撴瀯浣揰____________________________
+
+        /// <summary>
+        /// 娣诲姞璁惧鐨勫弬鏁�
+        /// </summary>
+        private class AddDevicePra
+        {
+            /// <summary>
+            /// 璁惧绫诲瀷
+            /// </summary>
+            public VirtualDeviceEnum DeviceType = VirtualDeviceEnum.A绌烘皵寮�鍏�;
+            /// <summary>
+            /// 娣诲姞鐨勮澶囦釜鏁�(涓嶆槸鍥炶矾鏁�)
+            /// </summary>
+            public int DeviceCount = 1;
+            /// <summary>
+            /// 灏嗚澶囨坊鍔犲埌鐨勬埧闂�(涓嶈缃〃绀轰笉娣诲姞鍒版埧闂�)
+            /// </summary>
+            public string RoomId = string.Empty;
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
index 79f5634..31b6add 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
@@ -274,7 +274,7 @@
                 }
                 #endregion
 
-                #region 鈻� 绌鸿皟鏁版嵁
+                #region 鈻� 绌鸿皟鍜屾柊椋庢暟鎹�
                 //绌鸿皟鏁版嵁
                 else if (report.DeviceStatusReport.CluterID == 513)
                 {
@@ -343,29 +343,59 @@
                     locadevice.DeviceStatusReport = report.DeviceStatusReport;
                     foreach (var attData in report.DeviceStatusReport.AttriBute)
                     {
-                        if (attData.AttributeId == 0)
+                        //鍖哄垎鏄┖璋冭繕鏄柊椋�
+                        var device = Shared.Common.LocalDevice.Current.GetDevice(report.DeviceAddr, report.DeviceEpoint);
+
+                        if (device.Type == DeviceType.FreshAir)
                         {
-                            //椋庢墖妯″紡
-                            ((AC)locadevice).currentFanMode = attData.AttriButeData;
-                            //宸茬粡鎺ユ敹鍒扮姸鎬�
-                            locadevice.HadReadDeviceStatu = true;
+                            if (attData.AttributeId == 0)
+                            {
+                                switch (attData.AttriButeData)
+                                {
+                                    case 0:
+                                    case 4:
+                                        ((FreshAir)locadevice).currentFanStatus = attData.AttriButeData;
+                                        break;
+                                    case 1:
+                                    case 2:
+                                    case 3:
+                                        ((FreshAir)locadevice).currentFanSpeed = attData.AttriButeData;
+                                        break;
+                                    case 5:
+                                    case 7:
+                                        ((FreshAir)locadevice).currentFanMode = attData.AttriButeData;
+                                        break;
+                                }
+                                //宸茬粡鎺ユ敹鍒扮姸鎬�
+                                locadevice.HadReadDeviceStatu = true;
+                            }
                         }
-                        else if (attData.AttributeId == 4096)
+                        else
                         {
-                            //椋庢墖鎵
-                            ((AC)locadevice).currentFanSwingMode = attData.AttriButeData;
-                            //宸茬粡鎺ユ敹鍒扮姸鎬�
-                            locadevice.HadReadDeviceStatu = true;
-                        }
-                        else if (attData.AttributeId == 4097)
-                        {
-                            //杞崲涓轰簩杩涘埗
-                            var value = Convert.ToString(attData.AttriButeData, 2).PadLeft(16, '0');
-                            //杩欎釜璁剧疆鏄斁鍦ㄥ悗闈㈢殑
-                            value = value.Substring(value.Length - 1, 1);
-                            //鍚敤鎽嗛鍔熻兘
-                            ((AC)locadevice).UseSwingFunction = value == "1";
-                            locadevice.ReSave();
+                            if (attData.AttributeId == 0)
+                            {
+                                //椋庢墖妯″紡
+                                ((AC)locadevice).currentFanMode = attData.AttriButeData;
+                                //宸茬粡鎺ユ敹鍒扮姸鎬�
+                                locadevice.HadReadDeviceStatu = true;
+                            }
+                            else if (attData.AttributeId == 4096)
+                            {
+                                //椋庢墖鎵
+                                ((AC)locadevice).currentFanSwingMode = attData.AttriButeData;
+                                //宸茬粡鎺ユ敹鍒扮姸鎬�
+                                locadevice.HadReadDeviceStatu = true;
+                            }
+                            else if (attData.AttributeId == 4097)
+                            {
+                                //杞崲涓轰簩杩涘埗
+                                var value = Convert.ToString(attData.AttriButeData, 2).PadLeft(16, '0');
+                                //杩欎釜璁剧疆鏄斁鍦ㄥ悗闈㈢殑
+                                value = value.Substring(value.Length - 1, 1);
+                                //鍚敤鎽嗛鍔熻兘
+                                ((AC)locadevice).UseSwingFunction = value == "1";
+                                locadevice.ReSave();
+                            }
                         }
                     }
                 }
@@ -512,10 +542,17 @@
                     //甯稿紑妯″紡鍏抽棴
                     if (info.AlarmCode == 217 || info.AlarmCode == 219)
                     {
-                        HdlThreadLogic.Current.RunMain(() =>
+                        HdlThreadLogic.Current.RunThread(async () =>
                         {
-                            //寮瑰嚭寰愭鐨勯偅涓獥鍙�
-                            DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device, DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush, null);
+                            //娓╁眳鍩庣殑瑕佺綉鍏充腑鏄惁鏈夐�昏緫瀛樺湪 
+                            //鍙傛暟:2-甯稿紑鑷姩鍖�;3-澶辨晥鏃堕棿鑷姩鍖�
+                            var result = await Shared.Phone.Device.Logic.SkipView.Exist(2);
+                            HdlThreadLogic.Current.RunMain(() =>
+                            {
+                                //寮瑰嚭寰愭鐨勯偅涓獥鍙�
+                                DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device, DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush,
+                                    result != 0 ? true : false, null);
+                            });
                         });
                     }
                 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs
index 50863d1..997240b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs
@@ -32,6 +32,71 @@
 
         #endregion
 
+        #region 鈻� 鑾峰彇鏈湴浣忓畢鍒楄〃___________________
+
+        /// <summary>
+        /// 鑾峰彇鏈湴浣忓畢鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        public List<Common.House> GetLocalResidenceList()
+        {
+            //濡傛灉鏄櫄鎷熶綇瀹�,鍒欎粠鏍圭洰褰曚腑鑾峰彇
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //浠庢枃浠跺す涓幏鍙栧叏閮ㄧ殑浣忓畢瀵硅薄
+                return this.GetAllLocalResidenceListByDirectory();
+            }
+
+            var listHome = new List<Common.House>();
+            foreach (var housePath in Common.Config.Instance.HomeFilePathList)
+            {
+                var home = Common.House.GetHouseByFilePath(housePath);
+                if (home == null)
+                {
+                    continue;
+                }
+                listHome.Add(home);
+            }
+            return listHome;
+        }
+
+        /// <summary>
+        /// 浠庢枃浠跺す涓幏鍙栧叏閮ㄧ殑浣忓畢瀵硅薄
+        /// </summary>
+        /// <returns></returns>
+        public List<Common.House> GetAllLocalResidenceListByDirectory()
+        {
+            var strPath = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid);
+            var listHome = new List<Common.House>();
+            //鑾峰彇鍏ㄩ儴鐨勬枃浠跺す
+            var listDirectory = new List<string>();
+            var arryDirs = System.IO.Directory.GetDirectories(strPath);
+            foreach (var file in arryDirs)
+            {
+                string[] arry = file.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
+                listDirectory.Add(arry[arry.Length - 1]);
+            }
+            foreach (var myDir in listDirectory)
+            {
+                //鑾峰彇鍚勪釜鏂囦欢澶归噷闈㈢殑浣忓畢鏂囦欢
+                string nowPath = System.IO.Path.Combine(strPath, myDir);
+                var arryHouse = System.IO.Directory.GetFiles(nowPath, "House_*");
+                if (arryHouse.Length > 0)
+                {
+                    //璇诲彇鏂囦欢鍐呭
+                    var textValue = UserCenterLogic.LoadFileContent(System.IO.Path.Combine(nowPath, arryHouse[0]));
+                    if (textValue != null)
+                    {
+                        var myHouse = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.House>(textValue);
+                        listHome.Add(myHouse);
+                    }
+                }
+            }
+            return listHome;
+        }
+
+        #endregion
+
         #region 鈻� 涓�鑸柟娉昣__________________________
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs
index fff74a2..8daca3a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs
@@ -227,7 +227,8 @@
         /// 澧炲姞鎴块棿
         /// </summary>
         /// <param name="room">Room.</param>
-        public void AddRoom(Room room)
+        /// <param name="rorefreshRoomViewom">鏄惁鍒锋柊鎴块棿瑙嗗浘鍒楄〃鐣岄潰</param>
+        public void AddRoom(Room room, bool refreshRoomView = true)
         {
             if (Global.IsExistsByHomeId(room.FileName) == true
                 || Config.Instance.Home.ListRooms.Contains(room.Id) == true)
@@ -242,8 +243,11 @@
             room.Save();
             //澶囦唤
             HdlAutoBackupLogic.AddOrEditorFile(room.FileName);
-            //鍒锋柊鎴块棿瑙嗗浘鍒楄〃
-            this.RefreshRoomListView();
+            if (refreshRoomView == true)
+            {
+                //鍒锋柊鎴块棿瑙嗗浘鍒楄〃
+                this.RefreshRoomListView();
+            }
         }
 
         #endregion
@@ -924,6 +928,10 @@
         /// <returns></returns>
         public List<Room> GetFloorSortRoom(string i_floorKeys, bool getShard = true)
         {
+            if (i_floorKeys == null)
+            {
+                i_floorKeys = string.Empty;
+            }
             Dictionary<string, List<string>> dicAllSort = new Dictionary<string, List<string>>();
             //璇诲彇鎴块棿椤哄簭
             string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.RoomSortFile);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs
index ce36714..7f5755c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs
@@ -109,7 +109,7 @@
             foreach (var sceneui in listDelete)
             {
                 //鎵ц鍒犻櫎
-                this.RemoveScene(sceneui);
+                this.DeleteLocalScene(sceneui);
             }
 
             return true;
@@ -127,25 +127,36 @@
         /// <returns></returns>
         public async Task<SceneUI> AddNewSceneToGateway(string sceneName, List<Scene.DeviceListData> listAdjustTarget)
         {
-            var result1 = await Scene.GetSceneNewIdAsync(sceneName);
-            //鍏遍�氶敊璇娴�
-            string error = HdlCheckLogic.Current.CheckCommonErrorCode(result1);
-            if (error != null)
+            int NewScenesId = -1;
+            //濡傛灉褰撳墠浣忓畢涓嶆槸铏氭嫙浣忓畢
+            if (Common.Config.Instance.Home.IsVirtually == false)
             {
-                this.ShowErrorMsg(error);
-                return null;
+                var result1 = await Scene.GetSceneNewIdAsync(sceneName);
+                //鍏遍�氶敊璇娴�
+                string error = HdlCheckLogic.Current.CheckCommonErrorCode(result1);
+                if (error != null)
+                {
+                    this.ShowErrorMsg(error);
+                    return null;
+                }
+                if (result1 == null || result1.getSceneIdData == null)
+                {
+                    //娣诲姞鍦烘櫙澶辫触
+                    string msg1 = Language.StringByID(R.MyInternationalizationString.AddSceneFail);
+                    //鎷兼帴涓娿�愮綉鍏冲洖澶嶈秴鏃躲�戠殑Msg
+                    msg1 = UserCenterLogic.CombineGatewayTimeOutMsg(msg1, result1);
+                    this.ShowTipMsg(msg1);
+                    return null;
+                }
+                NewScenesId = result1.getSceneIdData.NewScenesId;
             }
-            if (result1 == null || result1.getSceneIdData == null)
+            else
             {
-                //娣诲姞鍦烘櫙澶辫触
-                string msg1 = Language.StringByID(R.MyInternationalizationString.AddSceneFail);
-                //鎷兼帴涓娿�愮綉鍏冲洖澶嶈秴鏃躲�戠殑Msg
-                msg1 = UserCenterLogic.CombineGatewayTimeOutMsg(msg1, result1);
-                this.ShowTipMsg(msg1);
-                return null;
+                //铏氭嫙鍦烘櫙ID
+                NewScenesId = Convert.ToInt32(DateTime.Now.ToString("HHmmss"));
             }
             //娣诲姞鎵ц鐩爣
-            var listSuccess = await this.AddTargetToScene(result1.getSceneIdData.NewScenesId, listAdjustTarget);
+            var listSuccess = await this.AddTargetToScene(NewScenesId, listAdjustTarget);
             if (listSuccess == null)
             {
                 return null;
@@ -154,7 +165,7 @@
             //鍒涘缓鍦烘櫙瀵硅薄
             var newScene = new SceneUI();
             newScene.Name = sceneName;
-            newScene.Id = result1.getSceneIdData.NewScenesId;
+            newScene.Id = NewScenesId;
             newScene.AdjustTargetList.AddRange(listSuccess);
             //娣诲姞缂撳瓨
             newScene.Save();
@@ -172,6 +183,12 @@
         /// <returns></returns>
         private async Task<List<Scene.DeviceListData>> AddTargetToScene(int sceneId, List<Scene.DeviceListData> listAdjustTarget)
         {
+            //濡傛灉褰撳墠浣忓畢鏄櫄鎷熶綇瀹呯殑璇�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //涓嶉渶瑕佹洿鏂扮綉鍏�
+                return listAdjustTarget;
+            }
             var listSuccess = new List<Scene.DeviceListData>();
             for (int i = 0; i < listAdjustTarget.Count; i++)
             {
@@ -286,32 +303,34 @@
         }
 
         /// <summary>
-        /// 鍒犻櫎鍦烘櫙(杩欎釜鍙Щ闄ゅ唴瀛�)
+        /// 娣诲姞铏氭嫙鍦烘櫙
         /// </summary>
-        /// <param name="scene"></param>
-        public void DeleteSceneFromRoom(Room i_room, SceneUI scene)
+        /// <param name="sceneId">鎸囧畾鍦烘櫙id,濡傛灉涓�-1,鍒欎細鍐呴儴鑷姩缂栧彿(鍙兘浼氶噸澶�)</param>
+        /// <param name="sceneName">鍦烘櫙鍚嶅瓧</param>
+        /// <param name="listAdjustTarget">缁戝畾鐩爣</param>
+        /// <returns></returns>
+        public SceneUI AddVirtualScene(int sceneId, string sceneName, List<Scene.DeviceListData> listAdjustTarget)
         {
-            //绉婚櫎缂撳瓨
-            if (i_room.ListSceneId.Contains(scene.Id) == true)
+            if (sceneId == -1)
             {
-                i_room.ListSceneId.Remove(scene.Id);
-                i_room.Save();
+                sceneId = Convert.ToInt32(DateTime.Now.ToString("HHmmss"));
             }
-        }
+            //鍒涘缓鍦烘櫙瀵硅薄
+            var newScene = new SceneUI();
+            newScene.Name = sceneName;
+            newScene.IconPath = "SceneIcon/0.png";
+            //铏氭嫙鍦烘櫙ID
+            newScene.Id = sceneId;
+            if (listAdjustTarget != null)
+            {
+                newScene.AdjustTargetList.AddRange(listAdjustTarget);
+            }
+            //娣诲姞缂撳瓨
+            newScene.Save();
+            //鍔犲叆缂撳瓨
+            this.dicScenes[newScene.Id] = newScene;
 
-        /// <summary>
-        /// 鍒犻櫎鎼滆棌鍦烘櫙
-        /// </summary>
-        /// <param name="scene"></param>
-        public void DeleteLoveScene(SceneUI scene)
-        {
-            var nowRoom = HdlRoomLogic.Current.GetLoveRoom();
-            //绉婚櫎缂撳瓨
-            if (nowRoom.ListSceneId.Contains(scene.Id) == true)
-            {
-                nowRoom.ListSceneId.Remove(scene.Id);
-                nowRoom.Save();
-            }
+            return newScene;
         }
 
         #endregion
@@ -326,6 +345,16 @@
         /// <returns></returns>
         public async Task<bool> EditorSceneFromGateway(SceneUI sceneUI, List<Scene.DeviceListData> listAdjustTarget)
         {
+            //濡傛灉褰撳墠浣忓畢鏄櫄鎷熶綇瀹呯殑璇�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //娓呯┖鍦烘櫙鐨勬墽琛岀洰鏍囧垪琛ㄧ殑缂撳瓨
+                sceneUI.AdjustTargetList.Clear();
+                sceneUI.AdjustTargetList.AddRange(listAdjustTarget);
+                sceneUI.Save();
+                return true;
+            }
+
             //鍏堟竻绌哄叏閮ㄧ殑鎵ц鐩爣
             var deleteData = new Scene.SceneRemoveMemberData();
             var deleteTargetData = new List<Scene.RemoveSceneDeviceListInfo>();
@@ -401,6 +430,12 @@
         /// <returns></returns>
         public async Task<bool> EditorSceneNameFromGateway(SceneUI scene, string newName)
         {
+            //濡傛灉褰撳墠浣忓畢鏄櫄鎷熶綇瀹呯殑璇�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //涓嶉渶瑕佹洿鏂扮綉鍏�
+                return true;
+            }
             var result1 = await Scene.RenameSceneAsync(scene.Id, newName);
             //鍏遍�氶敊璇娴�
             string error = HdlCheckLogic.Current.CheckCommonErrorCode(result1);
@@ -440,10 +475,10 @@
         #region 鈻� 鍒犻櫎鍦烘櫙___________________________
 
         /// <summary>
-        /// 绉婚櫎鍦烘櫙--璇ヤ粎杩涜浜嗗鏈湴鍦烘櫙鏁版嵁鐨勫垹闄�
+        /// 鍒犻櫎鏈湴鍦烘櫙鏁版嵁
         /// </summary>
         /// <param name="sceneUI">Scene user interface.</param>
-        public void RemoveScene(SceneUI sceneUI)
+        public void DeleteLocalScene(SceneUI sceneUI)
         {
             //绉婚櫎缂撳瓨
             this.dicScenes.Remove(sceneUI.Id);
@@ -476,6 +511,35 @@
                     Global.DeleteFilebyHomeId(sceneUI.IconPath);
                     HdlAutoBackupLogic.DeleteFile(sceneUI.IconPath);
                 }
+            }
+        }
+
+        /// <summary>
+        /// 鍒犻櫎鍦烘櫙(杩欎釜鍙Щ闄ゅ唴瀛�)
+        /// </summary>
+        /// <param name="scene"></param>
+        public void DeleteSceneFromRoom(Room i_room, SceneUI scene)
+        {
+            //绉婚櫎缂撳瓨
+            if (i_room.ListSceneId.Contains(scene.Id) == true)
+            {
+                i_room.ListSceneId.Remove(scene.Id);
+                i_room.Save();
+            }
+        }
+
+        /// <summary>
+        /// 鍒犻櫎鎼滆棌鍦烘櫙
+        /// </summary>
+        /// <param name="scene"></param>
+        public void DeleteLoveScene(SceneUI scene)
+        {
+            var nowRoom = HdlRoomLogic.Current.GetLoveRoom();
+            //绉婚櫎缂撳瓨
+            if (nowRoom.ListSceneId.Contains(scene.Id) == true)
+            {
+                nowRoom.ListSceneId.Remove(scene.Id);
+                nowRoom.Save();
             }
         }
 
@@ -639,6 +703,13 @@
                 });
                 return false;
             }
+            //濡傛灉鏄櫄鎷熶綇瀹�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //涓嶈皟鐢ㄧ綉鍏�
+                return true;
+            }
+
             //鎵ц璋冪敤鍦烘櫙
             var result = await Scene.ControlSceneAsync(scene.Id, scene.SceneDelayTime);
             if (result == null || result.sceneOpenData == null)
@@ -681,6 +752,14 @@
         /// <returns></returns>
         public async Task<List<Scene.DeviceListData>> GetAdjustTargetList(SceneUI i_scene)
         {
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                var listAdjustTarget = new List<Scene.DeviceListData>();
+                listAdjustTarget.AddRange(i_scene.AdjustTargetList);
+                return listAdjustTarget;
+            }
+
             var result = await Scene.GetSceneDeviceListAsync(i_scene.Id);
             //鍏遍�氶敊璇娴�
             string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
index 2da6efc..4244dad 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
@@ -451,7 +451,7 @@
         private Dictionary<string, string> GetAllShardFileAgoUpdateTime()
         {
             var dicTime = new Dictionary<string, string>();
-            var data = Global.ReadFileByDirectory(DirNameResourse.LocalMemoryDirectory, DirNameResourse.ShardFileUpdateFile);
+            var data = Global.ReadFileByDirectory(DirNameResourse.LocalMemoryDirectory, DirNameResourse.ShardFileUpdateTimeFile);
             if (data == null)
             {
                 //鐩爣鏂囦欢涓嶅瓨鍦�
@@ -469,7 +469,7 @@
         {
             var data = Newtonsoft.Json.JsonConvert.SerializeObject(dicTime);
             var byteData = System.Text.Encoding.UTF8.GetBytes(data);
-            Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.ShardFileUpdateFile, byteData);
+            Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.ShardFileUpdateTimeFile, byteData);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
index d97b76c..421cd93 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -631,6 +631,23 @@
         /// <param name="noticeDb">鏄惁閫氱煡浜戠</param>
         public static void ReLoginAgain(string account = "", bool noticeDb = true)
         {
+            if (Config.Instance.Home.IsVirtually == true)
+            {
+                //濡傛灉鏄櫄鎷熶綇瀹�
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    //鏀惰捣宸﹁彍鍗�
+                    CommonPage.Instance.CloseLeftMenu();
+                    //鍏抽棴鎵�鏈夋墦寮�浜嗙殑鐣岄潰
+                    CloseAllOpenForm();
+
+                    //鏄剧ず鐧婚檰鐢婚潰
+                    var formLogin = new Login.AccountLogin();
+                    Shared.Common.CommonPage.Instance.AddChidren(formLogin);
+                    formLogin.ShowForm(account);
+                });
+                return;
+            }
             UserCenterResourse.AccountOption.OldAccountId = string.Empty;
             //鍏抽棴鎵�鏈夋帴鏀�
             HdlGatewayReceiveLogic.Current.RemoveAllEvent();
@@ -668,7 +685,7 @@
                     //鏄剧ず鐧婚檰鐢婚潰
                     var formLogin = new Login.AccountLogin();
                     Shared.Common.CommonPage.Instance.AddChidren(formLogin);
-                    formLogin.Show(account);
+                    formLogin.ShowForm(account);
                 });
 
                 if (noticeDb == true)
@@ -815,6 +832,14 @@
         /// <returns></returns>
         public async static Task<bool> InitUserCenterMenmoryAndThread(bool ShowPrompted = true)
         {
+            //濡傛灉鏄櫄鎷熶綇瀹�
+            if (Config.Instance.Home.IsVirtually == true)
+            {
+                //鍒濆鍖栬櫄鎷熶綇瀹呯殑涓汉涓績鐨勬暟鎹�(鍒囨崲浣忓畢浣跨敤)
+                InitUserCenterMenmoryByVirtualHome();
+                return true;
+            }
+
             //APP缂撳瓨鍔犺浇寮�濮�
             UserCenterResourse.AccountOption.AppCanSignout = false;
             //杩樺師杩滅▼杩炴帴鏉冮檺鍙橀噺
@@ -898,7 +923,7 @@
                 //0:宸茬粡鍚屾杩囷紝涓嶉渶瑕佸悓姝�,杩欎釜鏃跺�欓渶瑕佹彁绀哄浠�
                 if (result == 0 && ShowPrompted == true)
                 {
-                    //寮�鍚嚜鍔ㄥ浠芥彁绀�
+                    //寮�鍚嚜鍔ㄥ浠�
                     HdlAutoBackupLogic.ShowAutoBackupPromptedForm();
                 }
                 //鏄剧ず寮曞鐣岄潰
@@ -908,6 +933,25 @@
             UserCenterResourse.AccountOption.AppCanSignout = true;
 
             return true;
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栬櫄鎷熶綇瀹呯殑涓汉涓績鐨勬暟鎹�(鍒囨崲浣忓畢浣跨敤)
+        /// </summary>
+        private static void InitUserCenterMenmoryByVirtualHome()
+        {
+            //娓呯┖鎵�鏈夋垚鍛樼紦瀛�
+            ClearAllMemberMemory();
+            //棰勫垱寤轰釜浜轰腑蹇冨叏閮ㄧ殑鏂囦欢澶�
+            CreatAllUserCenterDirectory();
+            //鍏抽棴鎵�鏈夋帴鏀�
+            HdlGatewayReceiveLogic.Current.RemoveAllEvent();
+            //鍒濆鍖栨湰鍦扮殑缃戝叧淇℃伅
+            HdlGatewayLogic.Current.ReFreshByLocal();
+            //鍒濆鍖栨湰鍦扮殑璁惧淇℃伅
+            Common.LocalDevice.Current.ReFreshByLocal();
+            //鍒濆鍖栨埧闂�(閮洩鍩庨偅杈逛笉鍋氬鐞�,闇�瑕佽繖閲岀壒娈婃墽琛屼竴姝�)
+            HdlRoomLogic.Current.RefreshAllRoomByLocation();
         }
 
         /// <summary>
@@ -1411,7 +1455,7 @@
         #region 鈻� 鏂囦欢淇濆瓨鍜岃鍙朹____________________
 
         /// <summary>
-        /// 鏂囦欢淇濆瓨(鏁村ぉ蹇樿,鎵�浠ュ缓涓�涓嚱鏁版潵鐜╃帺)
+        /// 鏂囦欢淇濆瓨,浠呴檺褰撳墠浣忓畢(鏁村ぉ蹇樿,鎵�浠ュ缓涓�涓嚱鏁版潵鐜╃帺)
         /// </summary>
         /// <param name="fullName">鍏ㄨ矾寰�</param>
         /// <param name="obj">闇�瑕佸簭鍒楀寲鐨勪笢瑗�</param>
@@ -1424,18 +1468,48 @@
         }
 
         /// <summary>
-        /// 璇诲彇鏂囦欢(鏂囦欢涓嶅瓨鍦ㄨ繑鍥瀗ull,鏁村ぉ蹇樿,鎵�浠ュ缓涓�涓嚱鏁版潵鐜╃帺)
+        /// 璇诲彇鏂囦欢,涓嶉檺鍒朵綇瀹�(鏂囦欢涓嶅瓨鍦ㄨ繑鍥瀗ull,鏁村ぉ蹇樿,鎵�浠ュ缓涓�涓嚱鏁版潵鐜╃帺)
         /// </summary>
         /// <param name="fullName">鍏ㄨ矾寰�</param>
         /// <returns></returns>
         public static string LoadFileContent(string fullName)
         {
+            //璇诲彇鏂囦欢
+            var varByte = ReadFileContent(fullName);
+            if (varByte == null)
+            {
+                return null;
+            }
+            return Encoding.UTF8.GetString(varByte);
+        }
+
+        /// <summary>
+        /// 璇诲彇鏂囦欢,涓嶉檺鍒朵綇瀹�,鏂囦欢涓嶅瓨鍦ㄨ繑鍥瀗ull
+        /// </summary>
+        /// <param name="fullName">鍏ㄨ矾寰�</param>
+        /// <returns></returns>
+        public static byte[] ReadFileContent(string fullName)
+        {
             if (System.IO.File.Exists(fullName) == false)
             {
                 return null;
             }
-            var varByte = Shared.IO.FileUtils.ReadFile(fullName);
-            return System.Text.Encoding.UTF8.GetString(varByte);
+            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
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
index aef49cd..381c07e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
@@ -35,10 +35,6 @@
         /// </summary>
         public const string AppOldSelectGatewayFile = "1f2d13116b051b76b111b99246bb23f1";
         /// <summary>
-        /// 鑷姩澶囦唤涓嶉渶瑕佸啀娆℃彁閱掔殑銆愭枃浠跺悕銆�(涓嶉渶瑕佸浠藉強涓婁紶)
-        /// </summary>
-        public const string AutoBackupNotPromptedFile = "9479e724666d970fb9ae5dff2b739cf1bc8c1a95d63bf182dc8f290cac98592f";
-        /// <summary>
         /// 淇濆瓨瀹夐槻璁板綍鐨勩�愭枃浠跺す銆�
         /// </summary>
         public const string SafeguardAlarmDirectory = "b101c307ddc2fae59a133a31604304560180c5748135de81";
@@ -61,7 +57,11 @@
         /// <summary>
         /// 璁板綍鍒嗕韩鏂囦欢鏇存柊鏃堕棿鐨勩�愭枃浠躲��
         /// </summary>
-        public const string ShardFileUpdateFile = "b4137733cb527d03d1ee8417c8230a8b35109a02db4d0528";
+        public const string ShardFileUpdateTimeFile = "b4137733cb527d033a3f63d2b32cd6e0f886eef3cee19601";
+        /// <summary>
+        /// 璁板綍鑷姩澶囦唤鏂囦欢鏇存柊鏃堕棿鐨勩�愭枃浠躲��
+        /// </summary>
+        public const string AutoBackFileUpdateTimeFile = "9479e724666d970f1a2df4fa67cc456b74b31c4d3fce3b4f8c8eef2f2c0559ec";
         /// <summary>
         /// 淇濆瓨鐢ㄦ埛涓汉淇℃伅鐨勩�愭枃浠躲��
         /// </summary>
@@ -70,6 +70,10 @@
         /// 淇濆瓨鏂綉鏃跺�欙紝澶囦唤缃戝叧id鐢ㄧ殑銆愭枃浠躲��
         /// </summary>
         public const string BackupGatewayIdFile = "5f7fdfe4258d4cd19a433412468a586834643bed528cdba1";
+        /// <summary>
+        /// 鑷姩澶囦唤涓嶉渶瑕佸啀娆℃彁閱掔殑銆愭枃浠跺悕銆�(涓嶉渶瑕佸浠藉強涓婁紶)
+        /// </summary>
+        public const string AutoBackupNotPromptedFile = "9479e724666d970fb9ae5dff2b739cf1bc8c1a95d63bf182dc8f290cac98592f";
         /// <summary>
         /// 骞叉帴鐐圭鏈夊睘鎬х殑淇濆瓨鏂囦欢
         /// </summary>
@@ -132,6 +136,10 @@
         public const string OpenGbsFile = "cd8f75492cb65ef0951442460336db62";
 
         /// <summary>
+        /// 璁板綍鑷姩澶囦唤涓婁紶鏃ユ湡鐨勩�愭枃浠躲��,涓嶅姞瀵�
+        /// </summary>
+        public const string UpLoadAutoBackDayFile = "UpLoadAutoBackDayFile";
+        /// <summary>
         /// 鏄剧ず鍔熻兘鑿滃崟鐨勩�愭爣璇嗘枃浠躲��,涓嶅姞瀵�
         /// </summary>
         public const string ShowOptionMenuFile = "ShowOptionMenuFile";
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/GatewayResourse.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/GatewayResourse.cs
index 002f576..b5aaf62 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/GatewayResourse.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/GatewayResourse.cs
@@ -11,9 +11,9 @@
     public class GatewayResourse
     {
         /// <summary>
-        /// 褰撳墠閫夋嫨鐨勭綉鍏�(浣跨敤瀹屾椂锛岃缃┖)
+        /// 褰撳墠閫夋嫨鐨勭綉鍏矷D
         /// </summary>
-        public static ZbGateway NowSelectGateway = null;
+        public static string NowSelectGatewayId = string.Empty;
         /// <summary>
         /// APP鏈�鍚庨�夋嫨鐨勭綉鍏矷D(鎴栬杩欎釜鍙橀噺鏄澶囩鐞嗙晫闈笓鐢ㄧ殑)
         /// </summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/ACZbGatewayModuleUpdateForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/ACZbGatewayModuleUpdateForm.cs
index 2680692..4cd1d83 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/ACZbGatewayModuleUpdateForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/ACZbGatewayModuleUpdateForm.cs
@@ -78,7 +78,16 @@
         private void InitAirConditioningModuleList(VerticalListControl listView)
         {
             var list = HdlFirmwareUpdateLogic.GetFirmwareVersionListInfo(FirmwareLevelType.ZigbeeDevice, otaDevice.HwVersion.ToString(), otaDevice.ImgTypeId.ToString());
-            if (list.Count == 0)
+            var listUpdate = new List<FirmwareVersionInfo>();
+            foreach (var data in list)
+            {
+                if (data.Name.EndsWith(".bin") == true)
+                {
+                    //鍙.bin鏂囦欢
+                    listUpdate.Add(data);
+                }
+            }
+            if (listUpdate.Count == 0)
             {
                 //娌℃湁鍙崌绾х殑绌鸿皟妯″潡
                 this.ShowNotDataImage(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uNotHadAirConditioningUpdateModule));
@@ -86,10 +95,10 @@
             }
             HdlThreadLogic.Current.RunMainInThread(() =>
             {
-                for (int i = 0; i < list.Count; i++)
+                for (int i = 0; i < listUpdate.Count; i++)
                 {
                     //娣诲姞妯″潡琛�
-                    this.AddModuleRow(listView, list[i], i.ToString(), i != list.Count - 1);
+                    this.AddModuleRow(listView, listUpdate[i], i.ToString(), i != listUpdate.Count - 1);
                 }
                 //璋冩暣楂樺害
                 listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(23));
@@ -100,7 +109,7 @@
                 bodyFrameLayout.AddChidren(btnUpdate);
                 btnUpdate.ButtonClickEvent += (sender, e) =>
                 {
-                    var selectInfo = this.GetSelectFirmware(listView, list);
+                    var selectInfo = this.GetSelectFirmware(listView, listUpdate);
                     if (selectInfo == null)
                     {
                         //娌℃湁閫夋嫨鍥轰欢
@@ -175,6 +184,26 @@
                 //鏃ョ珛绌鸿皟妯″潡
                 textView = Language.StringByID(R.MyInternationalizationString.uHitachiAirConditioningModule);
             }
+            else if (info.Name.Contains("IRACC_SAEC") == true)
+            {
+                //鐢垫満绌鸿皟妯″潡
+                textView = Language.StringByID(R.MyInternationalizationString.uSaecAirConditioningModule);
+            }
+            else if (info.Name.Contains("IRACC_TOSHIBA") == true)
+            {
+                //涓滆姖绌鸿皟妯″潡
+                textView = Language.StringByID(R.MyInternationalizationString.uToshibaAirConditioningModule);
+            }
+            else if (info.Name.Contains("IRACC_GREE") == true)
+            {
+                //鏍煎姏绌鸿皟妯″潡
+                textView = Language.StringByID(R.MyInternationalizationString.uGreeAirConditioningModule);
+            }
+            else if (info.Name.Contains("IRACC_MIDEA") == true)
+            {
+                //缇庣殑绌鸿皟妯″潡
+                textView = Language.StringByID(R.MyInternationalizationString.uMideaAirConditioningModule);
+            }
             else
             {
                 //绌鸿皟鍗囩骇妯″潡
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitListForm.cs
index f95c63a..85634c4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitListForm.cs
@@ -86,7 +86,7 @@
         {
             var rowInfo = new RowControlInfo();
 
-            var frameTable = new FrameLayoutControl();
+            var frameTable = new FrameLayoutStatuControl();
             frameTable.UseClickStatu = false;
             frameTable.Width = Application.GetRealWidth(994);
             frameTable.Height = Application.GetRealHeight(337);
@@ -98,9 +98,9 @@
             var btnIconBack = new FrameLayout();
             btnIconBack.X = Application.GetRealWidth(46);
             btnIconBack.Y = Application.GetRealHeight(43);
-            btnIconBack.Height = Application.GetMinRealAverage(112);
-            btnIconBack.Width = Application.GetMinRealAverage(112);
-            btnIconBack.Radius = (uint)Application.GetMinRealAverage(112) / 2;
+            btnIconBack.Height = this.GetPictrueRealSize(112);
+            btnIconBack.Width = this.GetPictrueRealSize(112);
+            btnIconBack.Radius = (uint)this.GetPictrueRealSize(112) / 2;
             btnIconBack.BackgroundColor = 0xfff5f6fa;
             frameTable.AddChidren(btnIconBack, ChidrenBindMode.NotBind);
             rowInfo.btnIconBack = btnIconBack;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
index cdbc6d0..1685d91 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
@@ -102,20 +102,20 @@
             {
                 RemoveFromParent();
             };
-            this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 200 - 58);
+            this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 300);
             this.btnBack.MouseUpEventHandler += eHandlerBack;
             this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
             this.MidFrameLayout(this);
 
             var btnAddFrameLayout = new FrameLayout
             {
-                X = Application.GetRealWidth(830),
+                X = Application.GetRealWidth(619),
             };
             this.titleFrameLayout.AddChidren(btnAddFrameLayout);
 
             btnFloorText = new Button
             {
-                Width = Application.GetRealWidth(110),
+                Width = Application.GetRealWidth(300 - 69 - 58),
                 X = Application.GetRealWidth(15),
                 Text = Language.StringByID(R.MyInternationalizationString.FirstFloor),
                 TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
@@ -125,32 +125,40 @@
             };
             btnAddFrameLayout.AddChidren(btnFloorText);
 
+            var btnBindDownFrameLayout = new FrameLayout
+            {
+                Width = Application.GetMinReal(69 + 58),
+                X = Application.GetRealWidth(300 - 69 - 58),
+            };
+            btnAddFrameLayout.AddChidren(btnBindDownFrameLayout);
+
             var btnBindDown = new Button
             {
                 Height = Application.GetMinReal(69),
                 Width = Application.GetMinReal(69),
-                X = Application.GetRealWidth(200 - 77),
                 UnSelectedImagePath = "BindPic/BindDown.png",
                 Gravity = Gravity.CenterVertical,
             };
-            btnAddFrameLayout.AddChidren(btnBindDown);
+            btnBindDownFrameLayout.AddChidren(btnBindDown);
 
             if (Common.Config.Instance.Home.FloorDics.Count == 0)
             {
                 btnBindDown.Visible = false;
             }
 
-            btnBindDown.MouseDownEventHandler += (sender, e) =>
+            EventHandler<MouseEventArgs> eHandlerBindDown = (sender, e) =>
             {
                 SideslipFramelayout();
             };
+            btnBindDown.MouseDownEventHandler += eHandlerBindDown;
+            btnBindDownFrameLayout.MouseDownEventHandler += eHandlerBindDown;
             if (Common.Config.Instance.Home.FloorDics.Count == 0)
             {
                 btnAddFrameLayout.Width = 0;
             }
             else
             {
-                btnAddFrameLayout.Width = Application.GetRealWidth(200);
+                btnAddFrameLayout.Width = Application.GetRealWidth(300);
             }
             MidFrameLayoutContent(btnFloorText);
         }
@@ -226,8 +234,8 @@
                 }
             }
             else
-            {
-                // 鑾峰彇妤煎眰瀵瑰簲瀵规埧闂�
+            {
+                // 鑾峰彇妤煎眰瀵瑰簲瀵规埧闂�
                 var listAllRoom = HdlRoomLogic.Current.GetAllListRooms();
                 foreach (var room in listAllRoom)
                 {
@@ -445,7 +453,7 @@
         /// <returns></returns>
         List<CommonDevice> GetALlDispalyRoomDeviceList()
         {
-            currentKeyAllRoomDeviceList.Clear();
+            currentKeyAllRoomDeviceList.Clear();
             var listAllRoom = HdlRoomLogic.Current.GetAllListRooms();
             switch (curDeviceBindType)
             {
@@ -484,7 +492,7 @@
                         if (r.IsLove == true)
                         {
                             continue;
-                        }
+                        }
                         foreach (var deviceKeys in r.ListDevice)
                         {
                             var device = LocalDevice.Current.GetDevice(deviceKeys);
@@ -540,9 +548,9 @@
             switch (curDeviceBindType)
             {
                 case "AddSwitch":
-                    foreach (var deviceKeys in curRoom.ListDevice)
-                    {
-                        var device = LocalDevice.Current.GetDevice(deviceKeys);
+                    foreach (var deviceKeys in curRoom.ListDevice)
+                    {
+                        var device = LocalDevice.Current.GetDevice(deviceKeys);
                         if (device != null)
                         {
                             var dev = device.InClusterList.Find(obj => (obj != null) && (obj.InCluster == 6));
@@ -553,10 +561,10 @@
                         }
                     }
                     break;
-                case "AddDimmer":
-                    foreach (var deviceKeys in curRoom.ListDevice)
-                    {
-                        var device = LocalDevice.Current.GetDevice(deviceKeys);
+                case "AddDimmer":
+                    foreach (var deviceKeys in curRoom.ListDevice)
+                    {
+                        var device = LocalDevice.Current.GetDevice(deviceKeys);
                         if (device != null)
                         {
                             var dev = device.InClusterList.Find(obj => (obj != null) && (obj.InCluster == 8));
@@ -567,10 +575,10 @@
                         }
                     }
                     break;
-                case "AddCurtain":
-                    foreach (var deviceKeys in curRoom.ListDevice)
-                    {
-                        var device = LocalDevice.Current.GetDevice(deviceKeys);
+                case "AddCurtain":
+                    foreach (var deviceKeys in curRoom.ListDevice)
+                    {
+                        var device = LocalDevice.Current.GetDevice(deviceKeys);
                         if (device != null)
                         {
                             var dev = device.InClusterList.Find(obj => (obj != null) && (obj.InCluster == 258));
@@ -733,7 +741,6 @@
 
             var sidelipFrameLayout = new FrameLayout()
             {
-                Height = Application.GetMinReal(783),
                 Width = Application.GetMinReal(449),
                 Y = Application.GetRealHeight(161),
                 X = Application.GetRealWidth(596),
@@ -758,17 +765,19 @@
             var sidelipVerticalScrolViewLayout = new VerticalScrolViewLayout()
             {
                 Height = Application.GetRealHeight(600),
-                Y = btnSelectFloor.Bottom,
+                Y = btnSelectFloor.Bottom + Application.GetRealHeight(45),
             };
             sidelipFrameLayout.AddChidren(sidelipVerticalScrolViewLayout);
 
             Button oldbutton = null;
             Button oldbuttonText = null;
+            int count = 0;
             foreach (var floorId in dicFloor.Keys)
             {
+                count++;
                 var rowFrameLayout = new RowLayout()
                 {
-                    Height = Application.GetRealHeight(150),
+                    Height = Application.GetRealHeight(152),
                     LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
                     X = Application.GetRealWidth(81),
                 };
@@ -778,7 +787,7 @@
                 {
                     Width = Application.GetMinReal(81),
                     Height = Application.GetMinReal(81),
-                    Y = Application.GetRealHeight(55),
+                    Gravity = Gravity.CenterVertical,
                     UnSelectedImagePath = "Floor/Floor.png",
                     SelectedImagePath = "Floor/FloorSelected.png",
                 };
@@ -789,7 +798,7 @@
                     Width = Application.GetRealWidth(311),
                     Height = Application.GetRealHeight(58),
                     X = Application.GetRealWidth(92),
-                    Y = Application.GetRealHeight(69),
+                    Gravity = Gravity.CenterVertical,
                     TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                     TextSize = 14,
                     TextAlignment = TextAlignment.CenterLeft,
@@ -830,9 +839,9 @@
                         btnMethodText.IsSelected = true;
                         oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                         oldbuttonText.IsBold = true;
-                    }
-
-                    //鑾峰彇妤煎眰瀵瑰簲鐨勬埧闂�
+                    }
+
+                    //鑾峰彇妤煎眰瀵瑰簲鐨勬埧闂�
                     var listAllRoom = HdlRoomLogic.Current.GetAllListRooms();
                     foreach (var room in listAllRoom)
                     {
@@ -860,6 +869,19 @@
                 rowFrameLayout.MouseUpEventHandler += hander;
                 btnMethodText.MouseUpEventHandler += hander;
             }
+
+            if (count == 0)
+            {
+                sidelipFrameLayout.Height = 0;
+            }
+            else if (count <= 4 && count > 0)
+            {
+                sidelipFrameLayout.Height = Application.GetRealHeight(180) + count * Application.GetRealHeight(150);
+            }
+            else
+            {
+                sidelipFrameLayout.Height = Application.GetMinReal(780);
+            }
         }
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
index 72394ac..3cf0c4f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
@@ -75,20 +75,20 @@
             {
                 RemoveFromParent();
             };
-            this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 200 - 58);
+            this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 300);
             this.btnBack.MouseUpEventHandler += eHandlerBack;
             this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
             this.MidFrameLayout(this);
 
             var btnAddFrameLayout = new FrameLayout
             {
-                X = Application.GetRealWidth(830),
+                X = Application.GetRealWidth(619),
             };
             this.titleFrameLayout.AddChidren(btnAddFrameLayout);
 
             btnFloorText = new Button
             {
-                Width = Application.GetRealWidth(110),
+                Width = Application.GetRealWidth(300 - 69 - 58),
                 X = Application.GetRealWidth(15),
                 Text = Language.StringByID(R.MyInternationalizationString.FirstFloor),
                 TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
@@ -98,26 +98,36 @@
             };
             btnAddFrameLayout.AddChidren(btnFloorText);
 
+            var btnBindDownFrameLayout = new FrameLayout
+            {
+                Width = Application.GetMinReal(69 + 58),
+                X = Application.GetRealWidth(300 - 69 - 58),
+            };
+            btnAddFrameLayout.AddChidren(btnBindDownFrameLayout);
+
             var btnBindDown = new Button
             {
                 Height = Application.GetMinReal(69),
                 Width = Application.GetMinReal(69),
-                X = Application.GetRealWidth(200 - 77),
                 UnSelectedImagePath = "BindPic/BindDown.png",
                 Gravity = Gravity.CenterVertical,
             };
-            btnAddFrameLayout.AddChidren(btnBindDown);
-            btnBindDown.MouseDownEventHandler += (sender, e) =>
+            btnBindDownFrameLayout.AddChidren(btnBindDown);
+
+            EventHandler<MouseEventArgs> eHandlerBindDown = (sender, e) =>
             {
                 SideslipFramelayout();
             };
+            btnBindDown.MouseDownEventHandler += eHandlerBindDown;
+            btnBindDownFrameLayout.MouseDownEventHandler += eHandlerBindDown;
+
             if (Common.Config.Instance.Home.FloorDics.Count == 0)
             {
                 btnAddFrameLayout.Width = 0;
             }
             else
             {
-                btnAddFrameLayout.Width = Application.GetRealWidth(200);
+                btnAddFrameLayout.Width = Application.GetRealWidth(300);
             }
             MidFrameLayoutContent(btnFloorText);
         }
@@ -173,8 +183,8 @@
             //鑾峰彇妤煎眰
             dicFloor = HdlRoomLogic.Current.GetFloorSortList();
             currentKey.currentSelectFloorId = BindInfo.GetCurrentSelectFloorId();
-            btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
-
+            btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
+
             var listAllRoom = HdlRoomLogic.Current.GetAllListRooms();
             if (Common.Config.Instance.Home.FloorDics.Count == 0)
             {
@@ -362,18 +372,7 @@
 
                         var dev = new AddedDeviceBindResponseAllData();
                         dev = await currentKey.AddDeviceBindAsync(addBindeDev);
-                        if (dev.addedDeviceBindResponseData == null)
-                        {
-                            Application.RunOnMainThread(() =>
-                            {
-                                CommonPage.Loading.Hide();
-                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
-                            });
-                            btnFinifh.Enable = true;
-                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-                            return;
-                        }
-                        else
+                        if (dev != null && dev.addedDeviceBindResponseData != null)
                         {
                             if (dev.addedDeviceBindResponseData.Result == 0)
                             {
@@ -433,6 +432,17 @@
                                 btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                 return;
                             }
+                        }
+                        else
+                        {
+                            Application.RunOnMainThread(() =>
+                            {
+                                CommonPage.Loading.Hide();
+                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
+                            });
+                            btnFinifh.Enable = true;
+                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+                            return;
                         }
                     }
                 }
@@ -605,7 +615,7 @@
                     Y = Application.GetMinRealAverage(46),
                     Width = Application.GetMinReal(81),
                     Height = Application.GetMinReal(81),
-                    UnSelectedImagePath = "Scene/SceneIcon.png",// scene.IconPath,
+                    UnSelectedImagePath = "Scene/SceneIcon.png",// scene.IconPath,
                 };
                 rowLayout.AddChidren(devicePic);
 
@@ -761,7 +771,6 @@
 
             var sidelipFrameLayout = new FrameLayout()
             {
-                Height = Application.GetMinReal(783),
                 Width = Application.GetMinReal(449),
                 Y = Application.GetRealHeight(161),
                 X = Application.GetRealWidth(596),
@@ -786,17 +795,19 @@
             var sidelipVerticalScrolViewLayout = new VerticalScrolViewLayout()
             {
                 Height = Application.GetRealHeight(600),
-                Y = btnSelectFloor.Bottom,
+                Y = btnSelectFloor.Bottom + Application.GetRealHeight(45),
             };
             sidelipFrameLayout.AddChidren(sidelipVerticalScrolViewLayout);
 
             Button oldbutton = null;
             Button oldbuttonText = null;
+            int count = 0;
             foreach (var floorId in dicFloor.Keys)
             {
+                count++;
                 var rowFrameLayout = new RowLayout()
                 {
-                    Height = Application.GetRealHeight(150),
+                    Height = Application.GetRealHeight(152),
                     LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
                     X = Application.GetRealWidth(81),
                 };
@@ -806,7 +817,7 @@
                 {
                     Width = Application.GetMinReal(81),
                     Height = Application.GetMinReal(81),
-                    Y = Application.GetRealHeight(55),
+                    Gravity = Gravity.CenterVertical,
                     UnSelectedImagePath = "Floor/Floor.png",
                     SelectedImagePath = "Floor/FloorSelected.png",
                 };
@@ -817,7 +828,7 @@
                     Width = Application.GetRealWidth(311),
                     Height = Application.GetRealHeight(58),
                     X = Application.GetRealWidth(92),
-                    Y = Application.GetRealHeight(69),
+                    Gravity = Gravity.CenterVertical,
                     TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                     TextSize = 14,
                     TextAlignment = TextAlignment.CenterLeft,
@@ -857,9 +868,9 @@
                         btnMethodText.IsSelected = true;
                         oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                         oldbuttonText.IsBold = true;
-                    }
-
-                    //鑾峰彇妤煎眰瀵瑰簲鐨勬埧闂�
+                    }
+
+                    //鑾峰彇妤煎眰瀵瑰簲鐨勬埧闂�
                     var listAllRoom = HdlRoomLogic.Current.GetAllListRooms();
                     foreach (var room in listAllRoom)
                     {
@@ -898,6 +909,19 @@
                 rowFrameLayout.MouseUpEventHandler += hander;
                 btnMethodText.MouseUpEventHandler += hander;
             }
+
+            if (count == 0)
+            {
+                sidelipFrameLayout.Height = 0;
+            }
+            else if (count <= 4 && count > 0)
+            {
+                sidelipFrameLayout.Height = Application.GetRealHeight(180) + count * Application.GetRealHeight(150);
+            }
+            else
+            {
+                sidelipFrameLayout.Height = Application.GetMinReal(780);
+            }
         }
 
         /// <summary>
@@ -906,8 +930,8 @@
         /// <returns></returns>
         List<SceneUI> GetALlDispalyRoomSceneList()
         {
-            currentKeyAllRoomSceneList.Clear();
-            // 鑾峰彇鎵�鏈夋埧闂� 
+            currentKeyAllRoomSceneList.Clear();
+            // 鑾峰彇鎵�鏈夋埧闂� 
             var listAllRoom = HdlRoomLogic.Current.GetAllListRooms();
             foreach (var room in listAllRoom)
             {
@@ -923,7 +947,7 @@
                 }
 
                 foreach (var sceneId in room.ListSceneId)
-                {
+                {
                     var scene = HdlSceneLogic.Current.GetSceneUIBySceneId(sceneId);
                     if (scene == null)
                     {
@@ -944,10 +968,10 @@
             var tempSceneUIList = new List<SceneUI>();
             foreach (var sceneId in curRoom.ListSceneId)
             {
-                var scene = HdlSceneLogic.Current.GetSceneUIBySceneId(sceneId);
-                if (scene == null)
-                {
-                    continue;
+                var scene = HdlSceneLogic.Current.GetSceneUIBySceneId(sceneId);
+                if (scene == null)
+                {
+                    continue;
                 }
                 var gwSc = gwCurScenesList.Find(obj => (obj.ScenesId == sceneId));
                 if (gwSc != null)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
index 49fbae3..d0b4550 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
@@ -13,6 +13,7 @@
         #region 鈼� 鍙橀噺鐢虫槑__________________________
         public FrameLayout topFrameLayout = new FrameLayout { Height = Application.GetRealHeight(184), BackgroundColor = ZigbeeColor.Current.XMTopFrameLayout };
         public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1925 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout };
+
         public FrameLayout bottomRadiusFrameLayout = new FrameLayout()
         {
             Height = Application.GetRealHeight(100),
@@ -20,35 +21,47 @@
             Radius = 17,
             BackgroundColor = ZigbeeColor.Current.XMWhite,
         };
+
         public FrameLayout titleFrameLayout = new FrameLayout
         {
             Y = Application.GetRealHeight(92),
+            X = Application.GetRealWidth(161),
+            Width = Application.GetRealWidth(1080 - 161),//919
             Height = Application.GetRealHeight(69),
         };
         public Button btnTitle = new Button
         {
             TextAlignment = TextAlignment.CenterLeft,
             TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText,
-            X = Application.GetRealWidth(161),
-            Width = Application.GetRealWidth(1080 - 161),
+            Width = Application.GetRealWidth(1080 - 161),//919
             Height = Application.GetRealWidth(69),
-            IsBold = true,
             TextSize = 17,
+            IsBold = true,
+            //X = Application.GetRealWidth(161 - 116),
         };
+        /// <summary>
+        /// 鏍囬杩斿洖甯冨眬
+        /// </summary>
         public FrameLayout btnBackFrameLayout = new FrameLayout
         {
-            X = Application.GetRealWidth(58),
-            Height = Application.GetRealHeight(58),
-            Width = Application.GetRealWidth(58),
+            Width = Application.GetRealWidth(58 * 2),//116
         };
 
+        /// <summary>
+        /// 鏍囬杩斿洖鎸夐敭
+        /// </summary>
         public Button btnBack = new Button
         {
-            Height = Application.GetMinReal(51),
-            Width = Application.GetMinReal(30),
+            Height = Application.GetRealHeight(51),
+            Width = Application.GetRealWidth(30),
+            X = Application.GetRealWidth(58),
+            Y = Application.GetRealHeight(98),
             UnSelectedImagePath = "DoorLock/Left.png",
         };
 
+        /// <summary>
+        /// 鏍囬涓嬬嚎
+        /// </summary>
         public Button btnTitleLine = new Button
         {
             Y = Application.GetRealHeight(181),
@@ -58,18 +71,18 @@
         #endregion
 
         /// <summary>
-        /// 闂ㄩ攣椤堕儴甯冨眬
+        /// 椤堕儴甯冨眬
         /// </summary>
         /// <param name="frameLayout"></param>
         public void TopFrameLayout(FrameLayout frameLayout, string titleText)
         {
             this.AddChidren(topFrameLayout);
+            topFrameLayout.AddChidren(btnBackFrameLayout);
             topFrameLayout.AddChidren(titleFrameLayout);
             topFrameLayout.AddChidren(btnTitleLine);
+            btnBackFrameLayout.AddChidren(btnBack);
             titleFrameLayout.AddChidren(btnTitle);
             btnTitle.Text = titleText;
-            titleFrameLayout.AddChidren(btnBackFrameLayout);
-            btnBackFrameLayout.AddChidren(btnBack);
         }
         /// <summary>
         /// 闂ㄩ攣涓儴甯冨眬
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
index b0f791b..14d3e84 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
@@ -246,7 +246,7 @@
 
             var btnAddFrameLayout = new FrameLayout()
             {
-                X = Application.GetRealWidth(888),
+                X = Application.GetRealWidth(772 - 58),
                 Width = Application.GetRealWidth(192),
             };
             this.titleFrameLayout.AddChidren(btnAddFrameLayout);
@@ -352,6 +352,7 @@
             InitListInfo();
 
         }
+
         /// <summary>
         /// 涓儴甯冨眬
         /// </summary>
@@ -490,6 +491,10 @@
                             {
                                 btnFloorRoomNameText = myName;
                             }
+                            else
+                            {
+                                btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed);
+                            }
                         }
                     }
                     else
@@ -512,11 +517,25 @@
                                     var tempDevFloorName = Common.Config.Instance.Home.GetFloorNameById(tempDevFloorId);
                                     if (string.IsNullOrEmpty(tempDevFloorName))
                                     {
-                                        btnFloorRoomNameText = tempDevRoomName;
+                                        if (string.IsNullOrEmpty(tempDevRoomName))
+                                        {
+                                            btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed);
+                                        }
+                                        else
+                                        {
+                                            btnFloorRoomNameText = tempDevRoomName;
+                                        }
                                     }
                                     else
                                     {
-                                        btnFloorRoomNameText = tempDevFloorName + "," + tempDevRoomName;
+                                        if (string.IsNullOrEmpty(tempDevRoomName))
+                                        {
+                                            btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed);
+                                        }
+                                        else
+                                        {
+                                            btnFloorRoomNameText = tempDevFloorName + "," + tempDevRoomName;
+                                        }
                                     }
                                 }
 
@@ -640,10 +659,10 @@
                              else
                              {
                                  var temp = await currentKey.ConfigureHdlKeyValueAsync(Panel.KeyMode.Default);
-                                 if (temp.setWritableValueResponData?.Status != 0)
+                                 if (temp != null && temp.setWritableValueResponData?.Status != 0)
                                  {
                                      var temp1 = await currentKey.ConfigureHdlKeyValueAsync(Panel.KeyMode.Default);
-                                     if (temp1.setWritableValueResponData?.Status != 0)
+                                     if (temp1 != null && temp1.setWritableValueResponData?.Status != 0)
                                      {
                                          new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.ChangeBindMode), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(btnDel);
                                      }
@@ -739,8 +758,10 @@
                 }
             }
 
+            int count = 0;
             foreach (var value in typeModeList)
             {
+                count++;
                 #region  rowView
                 var rowView = new FrameLayout()
                 {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
index 2028413..7fd5ff7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
@@ -244,18 +244,7 @@
 
                             var dev = new AddedDeviceBindResponseAllData();
                             dev = await currentKey.AddDeviceBindAsync(addBindeDev);
-                            if (dev != null || dev.addedDeviceBindResponseData == null)
-                            {
-                                Application.RunOnMainThread(() =>
-                                {
-                                    CommonPage.Loading.Hide();
-                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
-                                });
-                                btnFinifh.Enable = true;
-                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-                                return;
-                            }
-                            else
+                            if (dev != null && dev.addedDeviceBindResponseData != null)
                             {
                                 if (dev.addedDeviceBindResponseData.Result == 0)
                                 {
@@ -318,6 +307,17 @@
                                     return;
                                 }
                             }
+                            else
+                            {
+                                Application.RunOnMainThread(() =>
+                                {
+                                    CommonPage.Loading.Hide();
+                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
+                                });
+                                btnFinifh.Enable = true;
+                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+                                return;
+                            }
                         }
                         else
                         {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/SiphonateDirectionAndLimitSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/SiphonateDirectionAndLimitSettionForm.cs
index c141dc8..49d8a27 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/SiphonateDirectionAndLimitSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/SiphonateDirectionAndLimitSettionForm.cs
@@ -185,44 +185,44 @@
             var frameIcon = new FrameLayout();
             frameIcon.X = Application.GetRealWidth(228);
             frameIcon.Y = Application.GetRealHeight(121);
-            frameIcon.Width = Application.GetMinRealAverage(265);
-            frameIcon.Height= Application.GetMinRealAverage(495);
+            frameIcon.Width = this.GetPictrueRealSize(265);
+            frameIcon.Height= this.GetPictrueRealSize(495);
             frameIcon.BackgroundImagePath = "Item/DeviceLimitGround.png";
             frameBack.AddChidren(frameIcon);
 
-            var frameIconback = new FrameLayoutControl();
-            frameIconback.Height = Application.GetMinRealAverage(144);
-            frameIconback.Width = Application.GetMinRealAverage(144);
-            frameIconback.Radius = (uint)Application.GetMinRealAverage(144) / 2;
+            var frameIconback = new FrameLayoutStatuControl();
+            frameIconback.Height = this.GetPictrueRealSize(144);
+            frameIconback.Width = this.GetPictrueRealSize(144);
+            frameIconback.Radius = (uint)this.GetPictrueRealSize(144) / 2;
             frameIconback.BackgroundColor = 0xffeff2fb;
             frameIconback.Gravity = Gravity.CenterHorizontal;
-            frameIconback.Y = Application.GetMinRealAverage(35);
+            frameIconback.Y = this.GetPictrueRealSize(35);
             frameIcon.AddChidren(frameIconback);
-            var btnIcon = new NormalViewControl(Application.GetMinRealAverage(69), Application.GetMinRealAverage(35), false);
+            var btnIcon = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(35), false);
             btnIcon.UnSelectedImagePath = "Item/DownTriangle.png";
             btnIcon.Gravity = Gravity.Center;
             frameIconback.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
 
-            var frameText = new FrameLayoutControl();
-            frameText.Y= Application.GetMinRealAverage(265);
-            frameText.Height = Application.GetMinRealAverage(120);
+            var frameText = new FrameLayoutStatuControl();
+            frameText.Y= this.GetPictrueRealSize(265);
+            frameText.Height = this.GetPictrueRealSize(120);
             frameIcon.AddChidren(frameText);
 
             //纭畾
-            var btnOk = new NormalViewControl(frameIcon.Width, Application.GetMinRealAverage(60), false);
+            var btnOk = new NormalViewControl(frameIcon.Width, this.GetPictrueRealSize(60), false);
             btnOk.TextID = R.MyInternationalizationString.uConfirm1;
             btnOk.TextAlignment = TextAlignment.Center;
             btnOk.TextColor = UserCenterColor.Current.TextOrangeColor;
             frameText.AddChidren(btnOk, ChidrenBindMode.BindEventOnly);
             //搴曠嚎
-            var btnLine1 = new NormalViewControl(Application.GetMinRealAverage(100), ControlCommonResourse.BottomLineHeight, false);
+            var btnLine1 = new NormalViewControl(this.GetPictrueRealSize(100), ControlCommonResourse.BottomLineHeight, false);
             btnLine1.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
             btnLine1.Gravity = Gravity.CenterHorizontal;
-            btnLine1.Y = btnOk.Bottom - Application.GetMinRealAverage(8);
+            btnLine1.Y = btnOk.Bottom - this.GetPictrueRealSize(8);
             frameText.AddChidren(btnLine1);
 
             //涓嬮檺浣�
-            var btnDown = new NormalViewControl(frameIcon.Width, Application.GetMinRealAverage(60), false);
+            var btnDown = new NormalViewControl(frameIcon.Width, this.GetPictrueRealSize(60), false);
             btnDown.TextID = R.MyInternationalizationString.uDownLimit;
             btnDown.Y = btnOk.Bottom;
             btnDown.TextAlignment = TextAlignment.Center;
@@ -230,10 +230,10 @@
             frameText.AddChidren(btnDown, ChidrenBindMode.BindEventOnly);
 
             //搴曠嚎
-            var btnLine2 = new NormalViewControl(Application.GetMinRealAverage(124), ControlCommonResourse.BottomLineHeight, false);
+            var btnLine2 = new NormalViewControl(this.GetPictrueRealSize(124), ControlCommonResourse.BottomLineHeight, false);
             btnLine2.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
             btnLine2.Gravity = Gravity.CenterHorizontal;
-            btnLine2.Y = btnDown.Bottom - Application.GetMinRealAverage(8);
+            btnLine2.Y = btnDown.Bottom - this.GetPictrueRealSize(8);
             frameText.AddChidren(btnLine2);
 
             //鍥炬爣鐐瑰嚮
@@ -294,44 +294,44 @@
             var frameIcon = new FrameLayout();
             frameIcon.X = Application.GetRealWidth(619);
             frameIcon.Y = Application.GetRealHeight(121);
-            frameIcon.Width = Application.GetMinRealAverage(265);
-            frameIcon.Height = Application.GetMinRealAverage(495);
+            frameIcon.Width = this.GetPictrueRealSize(265);
+            frameIcon.Height = this.GetPictrueRealSize(495);
             frameIcon.BackgroundImagePath = "Item/DeviceLimitGround.png";
             frameBack.AddChidren(frameIcon);
 
-            var frameIconback = new FrameLayoutControl();
-            frameIconback.Height = Application.GetMinRealAverage(144);
-            frameIconback.Width = Application.GetMinRealAverage(144);
-            frameIconback.Radius = (uint)Application.GetMinRealAverage(144) / 2;
+            var frameIconback = new FrameLayoutStatuControl();
+            frameIconback.Height = this.GetPictrueRealSize(144);
+            frameIconback.Width = this.GetPictrueRealSize(144);
+            frameIconback.Radius = (uint)this.GetPictrueRealSize(144) / 2;
             frameIconback.BackgroundColor = 0xffeff2fb;
             frameIconback.Gravity = Gravity.CenterHorizontal;
-            frameIconback.Y = Application.GetMinRealAverage(35);
+            frameIconback.Y = this.GetPictrueRealSize(35);
             frameIcon.AddChidren(frameIconback);
-            var btnIcon = new NormalViewControl(Application.GetMinRealAverage(69), Application.GetMinRealAverage(35), false);
+            var btnIcon = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(35), false);
             btnIcon.UnSelectedImagePath = "Item/UpTriangle.png";
             btnIcon.Gravity = Gravity.Center;
             frameIconback.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
 
-            var frameText = new FrameLayoutControl();
-            frameText.Y = Application.GetMinRealAverage(265);
-            frameText.Height = Application.GetMinRealAverage(120);
+            var frameText = new FrameLayoutStatuControl();
+            frameText.Y = this.GetPictrueRealSize(265);
+            frameText.Height = this.GetPictrueRealSize(120);
             frameIcon.AddChidren(frameText);
 
             //纭畾
-            var btnOk = new NormalViewControl(frameIcon.Width, Application.GetMinRealAverage(60), false);
+            var btnOk = new NormalViewControl(frameIcon.Width, this.GetPictrueRealSize(60), false);
             btnOk.TextID = R.MyInternationalizationString.uConfirm1;
             btnOk.TextAlignment = TextAlignment.Center;
             btnOk.TextColor = UserCenterColor.Current.TextOrangeColor;
             frameText.AddChidren(btnOk, ChidrenBindMode.BindEventOnly);
             //搴曠嚎
-            var btnLine1 = new NormalViewControl(Application.GetMinRealAverage(100), ControlCommonResourse.BottomLineHeight, false);
+            var btnLine1 = new NormalViewControl(this.GetPictrueRealSize(100), ControlCommonResourse.BottomLineHeight, false);
             btnLine1.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
             btnLine1.Gravity = Gravity.CenterHorizontal;
-            btnLine1.Y = btnOk.Bottom - Application.GetMinRealAverage(8);
+            btnLine1.Y = btnOk.Bottom - this.GetPictrueRealSize(8);
             frameText.AddChidren(btnLine1);
 
             //涓婇檺浣�
-            var btnDown = new NormalViewControl(frameIcon.Width, Application.GetMinRealAverage(60), false);
+            var btnDown = new NormalViewControl(frameIcon.Width, this.GetPictrueRealSize(60), false);
             btnDown.TextID = R.MyInternationalizationString.uUpLimit;
             btnDown.Y = btnOk.Bottom;
             btnDown.TextAlignment = TextAlignment.Center;
@@ -339,10 +339,10 @@
             frameText.AddChidren(btnDown, ChidrenBindMode.BindEventOnly);
 
             //搴曠嚎
-            var btnLine2 = new NormalViewControl(Application.GetMinRealAverage(124), ControlCommonResourse.BottomLineHeight, false);
+            var btnLine2 = new NormalViewControl(this.GetPictrueRealSize(124), ControlCommonResourse.BottomLineHeight, false);
             btnLine2.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
             btnLine2.Gravity = Gravity.CenterHorizontal;
-            btnLine2.Y = btnDown.Bottom - Application.GetMinRealAverage(8);
+            btnLine2.Y = btnDown.Bottom - this.GetPictrueRealSize(8);
             frameText.AddChidren(btnLine2);
 
             //鍥炬爣鐐瑰嚮
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
index b38dd82..bf36e95 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
@@ -87,7 +87,15 @@
 
             //鍒濆鍖栨甯�
             this.tableContr = new InformationEditorControl();
-            this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1128);
+
+            if (this.deviceObj.Type == DeviceType.FreshAir)
+            {
+                this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1028);
+            }
+            else
+            {
+                this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1128);
+            }
 
             //鍒濆鍖栬澶囧洖璺浘鏍�
             this.InitDeviceEpointIcon(listBackControl);
@@ -377,6 +385,20 @@
                     };
                 }
             }
+
+            //濡傛灉鏄柊椋�
+            if (nowSelectDevice.Type == DeviceType.FreshAir)
+            {
+                //鍔熻兘绫诲瀷
+                string caption = Language.StringByID(R.MyInternationalizationString.uFunctionType);
+                string strType = Language.StringByID(R.MyInternationalizationString.FreshAir);
+                var btnFunction = new FrameCaptionViewControl(caption, strType, listview.rowSpace / 2);
+                btnFunction.UseClickStatu = false;
+                listview.AddChidren(btnFunction);
+                btnFunction.InitControl();
+                //搴曠嚎
+                btnFunction.AddBottomLine();
+            }
         }
 
         #endregion
@@ -430,6 +452,19 @@
                 if (listIcon.Count == 1)
                 {
                     frame.Gravity = Gravity.CenterVertical;
+
+                    //濡傛灉鏄柊椋�
+                    if (deviceObj.Type == DeviceType.FreshAir)
+                    {
+                        frame.RemoveFromParent();
+                        frameBorder.Y = Application.GetRealHeight(0);
+                        frameBorder.Height = Application.GetRealHeight(709);
+                        frameBack.BackgroundImagePath = "FreshAir/FreshAirRealDevicePic.png";
+                        frameBack.Width = this.GetPictrueRealSize(878);
+                        frameBack.Height = this.GetPictrueRealSize(354);
+                        frameBack.Y = Application.GetRealHeight(153);
+                        frameBack.Gravity = Gravity.Center;
+                    }
                 }
                 else
                 {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
index 0dc5e74..4bd8639 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
@@ -59,20 +59,6 @@
             btnAddDeviceIcon.InitControl();
             btnAddDeviceIcon.ButtonClickEvent += (sender, e) =>
             {
-                ZbGateway realWay = null;
-                if (GatewayResourse.NowSelectGateway == null || HdlGatewayLogic.Current.GetRealGateway(ref realWay, GatewayResourse.NowSelectGateway) == false)
-                {
-                    //缃戝叧瀵硅薄寮傚父,璇烽噸鏂伴�夋嫨缃戝叧
-                    string msg = Language.StringByID(R.MyInternationalizationString.uGatewayIsErrorAndReSelect);
-                    this.ShowMassage(ShowMsgType.Error, msg, () =>
-                    {
-                        var form2 = new GatewayManage.GatewayListForm();
-                        form2.AddForm();
-                    });
-                    return;
-                }
-                GatewayResourse.NowSelectGateway = realWay;
-
                 var form = new DeviceDirection.AddDeviceTypeListForm();
                 form.AddForm();
             };
@@ -92,8 +78,9 @@
             this.ClearBodyFrame();
 
             //鍒濆鍖栫綉鍏宠鎺т欢
-            GatewayResourse.NowSelectGateway = HdlGatewayLogic.Current.GetLocalGateway(GatewayResourse.AppOldSelectGatewayId);
-            this.gatewayViewRow = new MyGatewayControl(GatewayResourse.NowSelectGateway);
+            GatewayResourse.NowSelectGatewayId = GatewayResourse.AppOldSelectGatewayId;
+            var nowGateway = HdlGatewayLogic.Current.GetLocalGateway(GatewayResourse.AppOldSelectGatewayId);
+            this.gatewayViewRow = new MyGatewayControl(nowGateway);
             bodyFrameLayout.AddChidren(gatewayViewRow);
             gatewayViewRow.InitControl();
 
@@ -156,9 +143,8 @@
         private void InitDeviceListControl()
         {
             //鑾峰彇璁惧鍒楄〃
-            string gwID = HdlGatewayLogic.Current.GetGatewayId(GatewayResourse.NowSelectGateway);
-            var listDevice = Common.LocalDevice.Current.GetDeviceByGatewayID(gwID);
-            var listSpecialOta = Common.LocalDevice.Current.GetSpecialOtaDevice(gwID);
+            var listDevice = Common.LocalDevice.Current.GetDeviceByGatewayID(GatewayResourse.NowSelectGatewayId);
+            var listSpecialOta = Common.LocalDevice.Current.GetSpecialOtaDevice(GatewayResourse.NowSelectGatewayId);
             listDevice.AddRange(listSpecialOta);
 
             this.dicRowInfo.Clear();
@@ -190,11 +176,14 @@
                     //娣诲姞璁惧鐨勮彍鍗曡
                     this.AddDeviceMenuRow(macAddress);
                 }
-
-                //寮�鍚綉鍏冲湪绾跨洃娴嬬殑绾跨▼
-                this.StartGatewayOnlieCheckThread();
-                //妫�娴嬭澶囨柊鐗堟湰
-                this.CheckDeviceNewVersion(listOta);
+                //濡傛灉褰撳墠涓嶆槸铏氭嫙浣忓畢
+                if (Common.Config.Instance.Home.IsVirtually == false)
+                {
+                    //寮�鍚綉鍏冲湪绾跨洃娴嬬殑绾跨▼
+                    this.StartGatewayOnlieCheckThread();
+                    //妫�娴嬭澶囨柊鐗堟湰
+                    this.CheckDeviceNewVersion(listOta);
+                }
             });
         }
 
@@ -384,8 +373,12 @@
                 rowDevice.HideMenu();
                 //鐣岄潰璺宠浆,璁板綍褰撳墠鐨勬鍦ㄦ搷浣滅殑璁惧鐨凪ac鍦板潃
                 this.nowActionDeviceMac = device.DeviceAddr;
-                //鏄剧ず璁惧鍔熻兘閰嶇疆鐣岄潰
-                this.ShowDeviceFunctionSettionForm(device, deviceEnumInfo);
+                //濡傛灉褰撳墠浣忓畢涓嶆槸铏氭嫙浣忓畢
+                if (Common.Config.Instance.Home.IsVirtually == false)
+                {
+                    //鏄剧ず璁惧鍔熻兘閰嶇疆鐣岄潰
+                    this.ShowDeviceFunctionSettionForm(device, deviceEnumInfo);
+                }
             };
             //宸︽粦鑿滃崟浜嬩欢
             rowDevice.OpenMenuAction += () =>
@@ -448,8 +441,17 @@
             else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
             {
                 //鏂规偊鏂伴闈㈡澘鐨勬寜閿厤缃�
-                var form = new DevicePanel.PanelFangyueFreshAirButtonSettionForm();
-                form.AddForm(device);
+                //骞叉帴鐐�
+                if (device.Type == DeviceType.FreshAir)
+                {
+                    var form = new DevicePanel.PanelFangyueFreshAirButtonSettionForm();
+                    form.AddForm(device);
+                }
+                else
+                {
+                    var form = new DeviceFunctionSettionForm();
+                    form.AddForm(device, true);
+                }
             }
             //鏂规偊闈㈡澘
             else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueTwo
@@ -591,12 +593,25 @@
         /// </summary>
         private async void ListViewBeginHeaderRefreshing()
         {
+            //濡傛灉褰撳墠浣忓畢鏄櫄鎷熺殑
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //灏辨樉绀轰竴涓壒鏁堣�屽凡
+                System.Threading.Thread.Sleep(2000);
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    //闅愯棌涓嬫媺鍒锋柊鐗规晥
+                    listView.EndHeaderRefreshing();
+                });
+                return;
+            }
             //濡傛灉鏄湪绾跨殑
-            if (HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(GatewayResourse.NowSelectGateway) == true)
+            var nowGateway = HdlGatewayLogic.Current.GetLocalGateway(GatewayResourse.NowSelectGatewayId);
+            if (HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(nowGateway) == true)
             {
                 //妫�娴嬪箍鎾埌鐨勮繖涓綉鍏虫槸鍚︽嫢鏈変綇瀹匢D
                 ZbGateway realWay = null;
-                if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, GatewayResourse.NowSelectGateway) == true)
+                if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, nowGateway) == true)
                 {
                     //閲嶆柊璁剧疆浣忓畢ID(杩欎釜搴旇鏄笉缁忚繃APP,鐩存帴鎶婄綉鍏虫仮澶嶄簡鍑哄巶璁剧疆)
                     if (HdlGatewayLogic.Current.HomeIdIsEmpty(realWay.getGatewayBaseInfo.HomeId) == true)
@@ -619,7 +634,7 @@
             }
 
             //鑾峰彇鍏ㄩ儴璁惧
-            int result = LocalDevice.Current.SetDeviceToMemmoryByGateway(GatewayResourse.NowSelectGateway);
+            int result = LocalDevice.Current.SetDeviceToMemmoryByGateway(nowGateway);
             if (this.Parent == null)
             {
                 return;
@@ -645,12 +660,7 @@
         /// </summary>
         private void StartGatewayOnlieCheckThread()
         {
-            if (GatewayResourse.NowSelectGateway == null)
-            {
-                return;
-            }
-
-            string selectGwId = HdlGatewayLogic.Current.GetGatewayId(GatewayResourse.NowSelectGateway);
+            string selectGwId = GatewayResourse.NowSelectGatewayId;
             HdlThreadLogic.Current.RunThread(() =>
             {
                 ZbGateway zbGateway = HdlGatewayLogic.Current.GetLocalGateway(selectGwId);
@@ -722,7 +732,7 @@
         private void StartCheckDeviceOnline()
         {
             //澶栭儴璋冪敤鐨勮瘽,涓嶅啀閲嶆柊鑾峰彇璁惧鐘舵��
-            if (GatewayResourse.NowSelectGateway == null || this.reGetDeviceOnlineStatu == false)
+            if (this.reGetDeviceOnlineStatu == false)
             {
                 return;
             }
@@ -730,7 +740,7 @@
             //娣诲姞鎺ユ敹璁惧鍦ㄧ嚎涓婃姤鐨勭洃鍚�
             HdlGatewayReceiveLogic.Current.AddAttributeEvent("DeviceListFormReceivePushOnline", ReceiveComandDiv.A璁惧鍦ㄧ嚎涓婃姤, this.ReceiveDeviceStatu);
 
-            string gwId = HdlGatewayLogic.Current.GetGatewayId(GatewayResourse.NowSelectGateway);
+            string gwId = GatewayResourse.NowSelectGatewayId;
             HdlThreadLogic.Current.RunThread(() =>
             {
                 //杩欓噷涓昏鍙槸鑾峰彇鍦ㄧ嚎鐘舵��
@@ -1017,8 +1027,6 @@
             HdlGatewayReceiveLogic.Current.RemoveEvent("DeviceListFormSensor");
             HdlGatewayReceiveLogic.Current.RemoveEvent("DeviceListFormReceivePushOnline");
 
-            GatewayResourse.NowSelectGateway = null;
-
             base.CloseFormBefore();
         }
 
@@ -1082,7 +1090,10 @@
             public MyGatewayControl(ZbGateway i_zbGateway)
             {
                 this.UseClickStatu = false;
-                this.zbGatewayId = HdlGatewayLogic.Current.GetGatewayId(i_zbGateway);
+                if (i_zbGateway != null)
+                {
+                    this.zbGatewayId = HdlGatewayLogic.Current.GetGatewayId(i_zbGateway);
+                }
                 this.BackgroundColor = UserCenterColor.Current.White;
                 this.Height = Application.GetRealHeight(173);
             }
@@ -1096,16 +1107,32 @@
                 ZbGateway zbway = HdlGatewayLogic.Current.GetLocalGateway(zbGatewayId);
                 //鍥炬爣
                 var btnIcon = this.AddLeftIcon(81);
-                HdlGatewayLogic.Current.SetGatewayIcon(btnIcon, zbway);
+                if (zbway != null)
+                {
+                    HdlGatewayLogic.Current.SetGatewayIcon(btnIcon, zbway);
+                }
+                else
+                {
+                    btnIcon.UnSelectedImagePath = "Gateway/GatewayIcon1.png";
+                }
 
                 //鏄剧ず鏂囨湰
-                btnName = this.AddLeftCaption(HdlGatewayLogic.Current.GetGatewayName(zbway), 700);
+                btnName = this.AddLeftCaption(string.Empty, 700);
                 btnName.Height = Application.GetRealHeight(60);
                 btnName.TextSize = 15;
                 btnName.Y = Application.GetRealHeight(35);
-                if (HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(zbway) == false)
+                if (zbway != null)
                 {
-                    btnName.TextColor = UserCenterColor.Current.TextGrayColor1;
+                    btnName.Text = HdlGatewayLogic.Current.GetGatewayName(zbway);
+                    if (HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(zbway) == false)
+                    {
+                        btnName.TextColor = UserCenterColor.Current.TextGrayColor1;
+                    }
+                }
+                else
+                {
+                    //铏氭嫙缃戝叧
+                    btnName.Text = Language.StringByID(R.MyInternationalizationString.uVirtualGateway);
                 }
 
                 //褰撳墠缃戝叧
@@ -1122,15 +1149,19 @@
                 var btnMament = this.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uGatewayManagement), 300);
                 btnMament.Name = "btnMament";
 
-                this.ButtonClickEvent += (sernder, e) =>
+                //褰撳墠涓嶆槸铏氭嫙浣忓畢鐨勮瘽
+                if (Common.Config.Instance.Home.IsVirtually == false)
                 {
-                    if (string.IsNullOrEmpty(((View)sernder).Name) == false)
+                    this.ButtonClickEvent += (sernder, e) =>
                     {
-                        //鎵撳紑缃戝叧鍒楄〃鐣岄潰
-                        var form = new GatewayManage.GatewayListForm();
-                        form.AddForm();
-                    }
-                };
+                        if (string.IsNullOrEmpty(((View)sernder).Name) == false)
+                        {
+                            //鎵撳紑缃戝叧鍒楄〃鐣岄潰
+                            var form = new GatewayManage.GatewayListForm();
+                            form.AddForm();
+                        }
+                    };
+                }
             }
 
             /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
index 4722fd7..e7b18cf 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -161,6 +161,12 @@
                         listCheck.Add(mainKeys);
                         HdlRoomLogic.Current.ChangedRoom(device, roomKeys);
                     }
+                    else if (this.deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir
+                      && device.Type == DeviceType.FreshAir)
+                    {
+                        //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欏尯鍩熻窡鐫�妯″潡涓�璧�
+                        HdlRoomLogic.Current.ChangedRoom(device, roomKeys);
+                    }
                     else if (listCheck.Contains(mainKeys) == true)
                     {
                         //濡傛灉杩欎釜鍥炶矾涔嬪墠閮借繕娌℃湁鍖哄煙,鍦ㄦ湰鐣岄潰杩樻病鏈夊叧闂箣鍓�,鍙互鏃犳潯浠堕殢渚垮彉鏇�
@@ -200,6 +206,19 @@
                     this.CloseForm();
                 }
             };
+            //濡傛灉褰撳墠浣忓畢鏄櫄鎷熶綇瀹呯殑璇�,璁╂墍鏈夎彍鍗曢兘涓嶈兘鐐瑰嚮
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                for (int i = 0; i < listview.ChildrenCount; i++)
+                {
+                    var myRow = listview.GetChildren(i) as FrameRowControl;
+                    if (myRow != null)
+                    {
+                        myRow.UseClickStatu = false;
+                        myRow.CanClick = false;
+                    }
+                }
+            }
         }
 
         #endregion
@@ -245,8 +264,8 @@
                     //娣诲姞銆愭寜閿缃�戣(闈㈡澘涓撶敤)
                     this.AddPanelSettionRow();
                 }
-
-                if (this.IsFangyueFreshaAirPanel() == false)
+                //妫�娴嬭兘鍚︽樉绀哄姛鑳借缃殑鑿滃崟
+                if (this.CheckCanShowFunctionSettionRow() == true)
                 {
                     //娣诲姞銆愬姛鑳借缃�戣
                     this.AddFunctionSettionRow();
@@ -370,6 +389,11 @@
                 if (string.IsNullOrEmpty(doorLock.RemoteUnlockPassword) == false)
                 {
                     btnswitch.IsSelected = true;
+                }
+                //濡傛灉褰撳墠浣忓畢鏄櫄鎷熶綇瀹呯殑璇�,璁╂墍鏈夎彍鍗曢兘涓嶈兘鐐瑰嚮
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    btnswitch.CanClick = false;
                 }
 
                 btnswitch.ButtonClickEvent += async (sender, e) =>
@@ -552,22 +576,6 @@
 
         #endregion
 
-        #region 鈻� 鎸夐敭璁剧疆(鏂规偊)_____________________
-
-        /// <summary>
-        /// 鏄惁鏄柟鎮︽柊椋庨潰鏉�
-        /// </summary>
-        private bool IsFangyueFreshaAirPanel()
-        {
-            if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
-            {
-                return true;
-            }
-            return false;
-        }
-
-        #endregion
-
         #region 鈻� 骞叉帴鐐硅缃�(骞叉帴鐐�)_________________
 
         /// <summary>
@@ -674,7 +682,11 @@
             //鍙湁鍥炶矾鏁板ぇ浜�1鎵嶈兘鏈夎繖涓彍鍗�
             if (Common.LocalDevice.Current.GetDevicesCountByMac(listNewDevice[0].DeviceAddr) == 1)
             {
-                return;
+                //瑕佹眰鏂伴灏忔ā鍧楃殑鏂伴鏈夊姛鑳借缃�
+                if (deviceEnumInfo.ConcreteType != DeviceConcreteType.Relay_FangyueFreshAirModul)
+                {
+                    return;
+                }
             }
             if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment
                 || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
@@ -803,6 +815,11 @@
             btnFunction.AddLeftCaption(caption, 600);
             //寮�鍏冲浘鏍�
             var btnSwitch = btnFunction.AddMostRightSwitchIcon();
+            //濡傛灉褰撳墠浣忓畢鏄櫄鎷熶綇瀹呯殑璇�,璁╂墍鏈夎彍鍗曢兘涓嶈兘鐐瑰嚮
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                btnSwitch.CanClick = false;
+            }
             //搴曠嚎
             btnFunction.AddBottomLine();
             btnSwitch.ButtonClickEvent += async (sender, e) =>
@@ -889,103 +906,12 @@
                 //涓嶆槸绌烘皵寮�鍏�
                 return;
             }
-
-            //鍔熻兘绫诲瀷
-            string caption = Language.StringByID(R.MyInternationalizationString.uFunctionType);
-            var DfunctionType = this.listNewDevice[0].DfunctionType;
-
-            //鍔熻兘绫诲瀷鐨勭炕璇戝悕瀛�
-            int nowSelectNo = 1;
-            string strType = string.Empty;
-            if (DfunctionType == DeviceFunctionType.A鐏厜)
-            {
-                strType = Language.StringByID(R.MyInternationalizationString.uLight);
-                nowSelectNo = 1;
-            }
-            else if (DfunctionType == DeviceFunctionType.A寮�鍏�)
-            {
-                strType = Language.StringByID(R.MyInternationalizationString.uSwitch);
-                nowSelectNo = 0;
-            }
-            else if (DfunctionType == DeviceFunctionType.A鎻掑骇)
-            {
-                strType = Language.StringByID(R.MyInternationalizationString.uSocket1);
-                nowSelectNo = 2;
-            }
-
-            var btnFunction = new FrameCaptionViewControl(caption, strType, listview.rowSpace / 2);
-            btnFunction.UseClickStatu = true;
-            listview.AddChidren(btnFunction);
-            btnFunction.InitControl();
+            //鑷畾涔夊姛鑳界被鍨嬫帶浠�
+            var rowFunction = new DeviceFunctionTypeRowControl(this.listNewDevice[0], listview.rowSpace / 2);
+            listview.AddChidren(rowFunction);
+            rowFunction.InitControl();
             //搴曠嚎
-            btnFunction.AddBottomLine();
-            //鍙崇澶�
-            btnFunction.AddRightArrow();
-            btnFunction.ButtonClickEvent += (sender, e) =>
-            {
-                //鏄剧ず鍒楄〃
-                var listText = new List<string>();
-                listText.Add(Language.StringByID(R.MyInternationalizationString.uSwitch));//寮�鍏�
-                listText.Add(Language.StringByID(R.MyInternationalizationString.uLight));//鐏厜
-                listText.Add(Language.StringByID(R.MyInternationalizationString.uSocket1));//鎻掑骇
-                //鏍囬:閫夋嫨鍔熻兘绫诲瀷
-                var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType);
-
-                var form = new BottomItemSelectForm();
-                form.CancelCallEvent = true;//鍏佽鍙栨秷
-                form.AddForm(title, listText, nowSelectNo);
-                form.FinishSelectEvent += (selectNo) =>
-                {
-                    if (selectNo == -1)
-                    {
-                        //閫夋嫨鍙栨秷
-                        btnFunction.Text = string.Empty;
-                    }
-                    else
-                    {
-                        btnFunction.Text = listText[selectNo];
-                    }
-                    nowSelectNo = selectNo;
-                    //璁板綍璧峰綋鍓嶉�夋嫨鐨勫姛鑳界被鍨�
-                    if (selectNo == 0)
-                    {
-                        this.listNewDevice[0].DfunctionType = DeviceFunctionType.A寮�鍏�;
-                        if (this.listNewDevice[0].IsCustomizeImage == false)
-                        {
-                            //閲嶆柊璁剧疆鍥剧墖
-                            this.listNewDevice[0].IconPath = "Device/Switch.png";
-                        }
-                    }
-                    else if (selectNo == 1)
-                    {
-                        this.listNewDevice[0].DfunctionType = DeviceFunctionType.A鐏厜;
-                        if (this.listNewDevice[0].IsCustomizeImage == false)
-                        {
-                            //閲嶆柊璁剧疆鍥剧墖
-                            this.listNewDevice[0].IconPath = "Device/Light.png";
-                        }
-                    }
-                    else if (selectNo == 2)
-                    {
-                        this.listNewDevice[0].DfunctionType = DeviceFunctionType.A鎻掑骇;
-                        if (this.listNewDevice[0].IsCustomizeImage == false)
-                        {
-                            //閲嶆柊璁剧疆鍥剧墖
-                            this.listNewDevice[0].IconPath = "Device/Socket1.png";
-                        }
-                    }
-                    else
-                    {
-                        this.listNewDevice[0].DfunctionType = DeviceFunctionType.A鏈畾涔�;
-                        if (this.listNewDevice[0].IsCustomizeImage == false)
-                        {
-                            //閲嶆柊璁剧疆鍥剧墖
-                            this.listNewDevice[0].IconPath = "Device/Switch.png";
-                        }
-                    }
-                    this.listNewDevice[0].ReSave();
-                };
-            };
+            rowFunction.AddBottomLine();
         }
 
         #endregion
@@ -1091,8 +1017,12 @@
                 btnNewVersion.Visible = false;
             };
 
-            //璁剧疆璁惧鐨勭増鏈俊鎭�
-            this.SetDeviceVersionInfo(btnNewVersion, oTADevice);
+            //濡傛灉褰撳墠浣忓畢涓嶆槸铏氭嫙浣忓畢
+            if (Common.Config.Instance.Home.IsVirtually == false)
+            {
+                //璁剧疆璁惧鐨勭増鏈俊鎭�
+                this.SetDeviceVersionInfo(btnNewVersion, oTADevice);
+            }
         }
 
         /// <summary>
@@ -1153,15 +1083,9 @@
         /// <param name="i_deviceName">deviceName.</param>
         private async void DeviceReName(string i_deviceName, bool closeForm)
         {
-            //寮�鍚繘搴︽潯
-            this.ShowProgressBar();
-
             //淇敼MAC鍚�
             string deviceName = i_deviceName.Trim();
             var result = await Common.LocalDevice.Current.ReMacName(this.listNewDevice, deviceName);
-            //鍏抽棴杩涘害鏉�
-            this.CloseProgressBar();
-
             if (result == false)
             {
                 return;
@@ -1206,7 +1130,7 @@
         {
             //妫�娴嬫鍥炶矾鏄惁鎷ユ湁瀹氫綅鍔熻兘(鎷跨鐐规渶灏忕殑閭d釜鍥炶矾鍘诲畾浣�)
             bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]);
-            
+
             var frame = new TopRightMenuControl(canTest == true ? 2 : 1, 1);
             string deviceMenu = string.Empty;
             if (canTest == true)
@@ -1224,6 +1148,11 @@
             deviceMenu = Language.StringByID(R.MyInternationalizationString.uDelete);
             frame.AddRowMenu(deviceMenu, "Item/DeleteIcon2.png", "Item/DeleteIcon2Selected.png", () =>
             {
+                //濡傛灉褰撳墠浣忓畢鏄櫄鎷熶綇瀹�,姝ゅ姛鑳芥棤鏁�
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    return;
+                }
                 //纭鍒犻櫎璇ヨ澶囧強鍔熻兘锛�
                 string msg = Language.StringByID(R.MyInternationalizationString.uDeleteDeviceMsg);
                 this.ShowMassage(ShowMsgType.Confirm, msg, () =>
@@ -1354,6 +1283,22 @@
             });
         }
 
+        /// <summary>
+        /// 妫�娴嬭兘鍚︽樉绀哄姛鑳借缃殑鑿滃崟
+        /// </summary>
+        /// <returns></returns>
+        private bool CheckCanShowFunctionSettionRow()
+        {
+            //鏂规偊鏂伴闈㈡澘娌℃湁鍔熻兘璁剧疆
+            if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir
+                || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FourButtonScene
+                || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_TwoButtonCurtain)
+            {
+                return false;
+            }
+            return true;
+        }
+
         #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
index 4102a31..e0ea8f3 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
@@ -80,7 +80,7 @@
             //璁剧疆鏍囬淇℃伅
             base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice));
 
-            this.gatewayId = HdlGatewayLogic.Current.GetGatewayId(GatewayResourse.NowSelectGateway);
+            this.gatewayId = GatewayResourse.NowSelectGatewayId;
             HdlGatewayLogic.Current.GetRealGateway(ref this.realGateway, this.gatewayId);
 
             //鍒濆鍖栦腑閮ㄦ帶浠�
@@ -97,7 +97,7 @@
 
             //鍥剧墖
             var btnPic = new PicViewControl(878, 478);
-            btnPic.Y = Application.GetMinRealAverage(251);
+            btnPic.Y = Application.GetRealHeight(251);
             btnPic.Gravity = Gravity.CenterHorizontal;
             btnPic.UnSelectedImagePath = "Instruct/DeviceSearch.png";
             bodyFrameLayout.AddChidren(btnPic);
@@ -142,11 +142,13 @@
             btnProgressView.Text = "0%";
             frameProgress.AddChidren(btnProgressView);
 
-            //鍏佽璁惧鍏ョ綉
-            this.StartDeviceCanAddToGateway(false);
-
-            //娣诲姞鐩戣璁惧鏂颁笂鎶ョ殑浜嬩欢
-            this.realGateway.GwResDataAction += this.AdjustGatewayResultData;
+            if (this.realGateway != null)
+            {
+                //鍏佽璁惧鍏ョ綉
+                this.StartDeviceCanAddToGateway(false);
+                //娣诲姞鐩戣璁惧鏂颁笂鎶ョ殑浜嬩欢
+                this.realGateway.GwResDataAction += this.AdjustGatewayResultData;
+            }
             //寮�鍚繛鎺ョ殑鍋囨兂鍔ㄧ敾鏁堟灉绾跨▼
             this.StartConcetionAnimeteThread();
         }
@@ -312,20 +314,20 @@
         /// </summary>
         private void StartConcetionAnimeteThread()
         {
-            int iconSize = Application.GetMinRealAverage(23);
+            int iconSize = this.GetPictrueRealSize(23);
 
             var listPoint = new List<int>();
             for (int i = 0; i < 9; i++)
             {
                 //X杞�+Index*(鍥炬爣澶у皬+闂磋窛)
-                listPoint.Add(Application.GetMinRealAverage(394) + i * (iconSize + Application.GetMinRealAverage(10)));
+                listPoint.Add(this.GetPictrueRealSize(394) + i * (iconSize + this.GetPictrueRealSize(10)));
             }
 
             var btnRound = new PicViewControl(iconSize, iconSize, false);
             btnRound.Radius = (uint)iconSize / 2;
             btnRound.BackgroundColor = UserCenterColor.Current.ConcetionRoundColor;
             btnRound.X = listPoint[0];
-            btnRound.Y = Application.GetMinRealAverage(475);
+            btnRound.Y = this.GetPictrueRealSize(475);
             bodyFrameLayout.AddChidren(btnRound);
 
             HdlThreadLogic.Current.RunThread(() =>
@@ -571,15 +573,18 @@
         /// </summary>
         public override void CloseFormBefore()
         {
-            //鍋滄鎺ユ敹
-            this.realGateway.GwResDataAction -= this.AdjustGatewayResultData;
-
-            HdlThreadLogic.Current.RunThread(() =>
+            if (this.realGateway != null)
             {
-                System.Threading.Thread.Sleep(1200);
-                //鍏抽棴鍏ョ綉妯″紡
-                this.realGateway.AddNewDeviceToGateway(0);
-            });
+                //鍋滄鎺ユ敹
+                this.realGateway.GwResDataAction -= this.AdjustGatewayResultData;
+
+                HdlThreadLogic.Current.RunThread(() =>
+                {
+                    System.Threading.Thread.Sleep(1200);
+                    //鍏抽棴鍏ョ綉妯″紡
+                    this.realGateway.AddNewDeviceToGateway(0);
+                });
+            }
             base.CloseFormBefore();
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AirConditionerZbGatewayDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AirConditionerZbGatewayDirectionForm.cs
index 046fa30..56fc6ad 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AirConditionerZbGatewayDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AirConditionerZbGatewayDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(893);
-            framePic.Height = Application.GetMinRealAverage(852);
+            framePic.Width = this.GetPictrueRealSize(893);
+            framePic.Height = this.GetPictrueRealSize(852);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(75);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //缁胯壊鎸囩ず鐏棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(475), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(415);
-            btnGreanLinght.Y = Application.GetMinRealAverage(272);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(475), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(415);
+            btnGreanLinght.Y = this.GetPictrueRealSize(272);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -55,9 +55,9 @@
             {
                 textMsg = string.Format(textMsg, "5");
             }
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(360), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(573);
-            btnSecond.Y = Application.GetMinRealAverage(718);
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(360), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(573);
+            btnSecond.Y = this.GetPictrueRealSize(718);
             btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond.TextSize = 10;
             btnSecond.Text = textMsg;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AirSwitchCloudContrDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AirSwitchCloudContrDirectionForm.cs
index 2c2f206..eaf94e5 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AirSwitchCloudContrDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AirSwitchCloudContrDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(858);
-            framePic.Height = Application.GetMinRealAverage(850);
+            framePic.Width = this.GetPictrueRealSize(858);
+            framePic.Height = this.GetPictrueRealSize(850);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(58);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,36 +40,36 @@
             framePic.AddChidren(btnPic);
 
             //鎸囩ず鐏�
-            var btnLinght = new NormalViewControl(Application.GetMinRealAverage(100), Application.GetMinRealAverage(40), false);
-            btnLinght.X = Application.GetMinRealAverage(487);
-            btnLinght.Y = Application.GetMinRealAverage(202);
+            var btnLinght = new NormalViewControl(this.GetPictrueRealSize(100), this.GetPictrueRealSize(40), false);
+            btnLinght.X = this.GetPictrueRealSize(487);
+            btnLinght.Y = this.GetPictrueRealSize(202);
             btnLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnLinght.TextSize = 8.45f;
             btnLinght.TextID = R.MyInternationalizationString.uPilotLamp;
             framePic.AddChidren(btnLinght);
 
             //宸ヤ綔
-            var btnWork = new NormalViewControl(Application.GetMinRealAverage(70), Application.GetMinRealAverage(40), false);
-            btnWork.X = Application.GetMinRealAverage(628);
-            btnWork.Y = Application.GetMinRealAverage(113);
+            var btnWork = new NormalViewControl(this.GetPictrueRealSize(70), this.GetPictrueRealSize(40), false);
+            btnWork.X = this.GetPictrueRealSize(628);
+            btnWork.Y = this.GetPictrueRealSize(113);
             btnWork.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnWork.TextSize = 8.45f;
             btnWork.TextID = R.MyInternationalizationString.uWork;
             framePic.AddChidren(btnWork);
 
             //閰嶅
-            var btnPair = new NormalViewControl(Application.GetMinRealAverage(70), Application.GetMinRealAverage(40), false);
-            btnPair.X = Application.GetMinRealAverage(628);
-            btnPair.Y = Application.GetMinRealAverage(217);
+            var btnPair = new NormalViewControl(this.GetPictrueRealSize(70), this.GetPictrueRealSize(40), false);
+            btnPair.X = this.GetPictrueRealSize(628);
+            btnPair.Y = this.GetPictrueRealSize(217);
             btnPair.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnPair.TextSize = 8.45f;
             btnPair.TextID = R.MyInternationalizationString.uPair;
             framePic.AddChidren(btnPair);
 
             //绾㈣壊鎸囩ず鐏棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(455), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(397);
-            btnGreanLinght.Y = Application.GetMinRealAverage(295);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(455), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(397);
+            btnGreanLinght.Y = this.GetPictrueRealSize(295);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/CurtainAutoOpenDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/CurtainAutoOpenDirectionForm.cs
index 5dae3ab..17285b3 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/CurtainAutoOpenDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/CurtainAutoOpenDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(873);
-            framePic.Height = Application.GetMinRealAverage(665);
+            framePic.Width = this.GetPictrueRealSize(873);
+            framePic.Height = this.GetPictrueRealSize(665);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(144);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //缁胯壊鎸囩ず鐏紦鎱㈤棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(449), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(420);
-            btnGreanLinght.Y = Application.GetMinRealAverage(343);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(449), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(420);
+            btnGreanLinght.Y = this.GetPictrueRealSize(343);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 9;
@@ -55,9 +55,9 @@
             {
                 textMsg = string.Format(textMsg, "5");
             }
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(400), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(478);
-            btnSecond.Y = Application.GetMinRealAverage(568);
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(400), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(478);
+            btnSecond.Y = this.GetPictrueRealSize(568);
             btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond.TextSize = 9;
             btnSecond.Text = textMsg;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/CurtainSiphonateDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/CurtainSiphonateDirectionForm.cs
index 6187bf4..971a3ec 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/CurtainSiphonateDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/CurtainSiphonateDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(887);
-            framePic.Height = Application.GetMinRealAverage(769);
+            framePic.Width = this.GetPictrueRealSize(887);
+            framePic.Height = this.GetPictrueRealSize(769);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(89);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //缁胯壊鎸囩ず鐏棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(501), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(383);
-            btnGreanLinght.Y = Application.GetMinRealAverage(372);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(501), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(383);
+            btnGreanLinght.Y = this.GetPictrueRealSize(372);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 9;
@@ -55,9 +55,9 @@
             {
                 textMsg = string.Format(textMsg, "5");
             }
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(400), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(547);
-            btnSecond.Y = Application.GetMinRealAverage(583);
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(400), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(547);
+            btnSecond.Y = this.GetPictrueRealSize(583);
             btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond.TextSize = 9;
             btnSecond.Text = textMsg;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/DimmableLightOneLoadDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/DimmableLightOneLoadDirectionForm.cs
index adb0a07..d16048c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/DimmableLightOneLoadDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/DimmableLightOneLoadDirectionForm.cs
@@ -11,38 +11,38 @@
     {
         #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 = Application.GetMinRealAverage(873);
-            framePic.Height = Application.GetMinRealAverage(665);
-            framePic.Gravity = Gravity.CenterHorizontal;
-            framePic.Y = Application.GetRealHeight(144);
-            bodyFrameLayout.AddChidren(framePic);
-            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
-            btnPic.UnSelectedImagePath = "Instruct/DimmableLightOneLoad.png";
+        /// <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(873);
+            framePic.Height = this.GetPictrueRealSize(665);
+            framePic.Gravity = Gravity.CenterHorizontal;
+            framePic.Y = Application.GetRealHeight(144);
+            bodyFrameLayout.AddChidren(framePic);
+            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
+            btnPic.UnSelectedImagePath = "Instruct/DimmableLightOneLoad.png";
             framePic.AddChidren(btnPic);
 
             //缁胯壊鎸囩ず鐏棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(360), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(442);
-            btnGreanLinght.Y = Application.GetMinRealAverage(368);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(360), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(442);
+            btnGreanLinght.Y = this.GetPictrueRealSize(368);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -50,9 +50,9 @@
             framePic.AddChidren(btnGreanLinght);
 
             //鎸囩ず鐏�
-            var btnLinght = new NormalViewControl(Application.GetMinRealAverage(250), Application.GetMinRealAverage(45), false);
-            btnLinght.X = Application.GetMinRealAverage(340);
-            btnLinght.Y = Application.GetMinRealAverage(514);
+            var btnLinght = new NormalViewControl(this.GetPictrueRealSize(250), this.GetPictrueRealSize(45), false);
+            btnLinght.X = this.GetPictrueRealSize(340);
+            btnLinght.Y = this.GetPictrueRealSize(514);
             btnLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnLinght.TextSize = 10;
             btnLinght.TextID = R.MyInternationalizationString.uPilotLamp;
@@ -64,9 +64,9 @@
             {
                 textMsg = string.Format(textMsg, "5");
             }
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(400), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(518);
-            btnSecond.Y = Application.GetMinRealAverage(545);
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(400), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(518);
+            btnSecond.Y = this.GetPictrueRealSize(545);
             btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond.TextSize = 10;
             btnSecond.Text = textMsg;
@@ -79,8 +79,8 @@
             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;
+            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;
@@ -88,9 +88,9 @@
             {
                 msg2.Text = msgArry[1];
             }
-            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
-            msg2.TextAlignment = TextAlignment.Center;
-            bodyFrameLayout.AddChidren(msg2);
+            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
+            msg2.TextAlignment = TextAlignment.Center;
+            bodyFrameLayout.AddChidren(msg2);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelCurtainDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelCurtainDirectionForm.cs
index dd721fa..5617e35 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelCurtainDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelCurtainDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(835);
-            framePic.Height = Application.GetMinRealAverage(711);
+            framePic.Width = this.GetPictrueRealSize(835);
+            framePic.Height = this.GetPictrueRealSize(711);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(115);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //鎸夐敭鎸囩ず鐏寒璧�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(463), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(372);
-            btnGreanLinght.Y = Application.GetMinRealAverage(258);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(463), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(372);
+            btnGreanLinght.Y = this.GetPictrueRealSize(258);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -50,9 +50,9 @@
             framePic.AddChidren(btnGreanLinght);
 
             //鎸変綇姝ゆ寜閿�
-            var btnPress = new NormalViewControl(Application.GetMinRealAverage(400), Application.GetMinRealAverage(45), false);
-            btnPress.X = Application.GetMinRealAverage(144);
-            btnPress.Y = Application.GetMinRealAverage(275);
+            var btnPress = new NormalViewControl(this.GetPictrueRealSize(400), this.GetPictrueRealSize(45), false);
+            btnPress.X = this.GetPictrueRealSize(144);
+            btnPress.Y = this.GetPictrueRealSize(275);
             btnPress.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnPress.TextSize = 10;
             btnPress.TextID = R.MyInternationalizationString.uPressAndHoldThisKey;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueEightButtonDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueEightButtonDirectionForm.cs
index 123f6ed..c57c089 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueEightButtonDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueEightButtonDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(835);
-            framePic.Height = Application.GetMinRealAverage(711);
+            framePic.Width = this.GetPictrueRealSize(835);
+            framePic.Height = this.GetPictrueRealSize(711);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(115);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //鎸夐敭鎸囩ず鐏寒璧�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(455), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(374);
-            btnGreanLinght.Y = Application.GetMinRealAverage(258);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(455), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(374);
+            btnGreanLinght.Y = this.GetPictrueRealSize(258);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -50,9 +50,9 @@
             framePic.AddChidren(btnGreanLinght);
 
             //鎸変綇姝ゆ寜閿�
-            var btnPress = new NormalViewControl(Application.GetMinRealAverage(230), Application.GetMinRealAverage(45), false);
-            btnPress.X = Application.GetMinRealAverage(144);
-            btnPress.Y = Application.GetMinRealAverage(275);
+            var btnPress = new NormalViewControl(this.GetPictrueRealSize(230), this.GetPictrueRealSize(45), false);
+            btnPress.X = this.GetPictrueRealSize(144);
+            btnPress.Y = this.GetPictrueRealSize(275);
             btnPress.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnPress.TextSize = 10;
             btnPress.TextID = R.MyInternationalizationString.uPressAndHoldThisKey;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueEnvironmentDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueEnvironmentDirectionForm.cs
index 0cda559..d49c5b9 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueEnvironmentDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueEnvironmentDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(835);
-            framePic.Height = Application.GetMinRealAverage(708);
+            framePic.Width = this.GetPictrueRealSize(835);
+            framePic.Height = this.GetPictrueRealSize(708);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(115);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //鎸夐敭鎸囩ず鐏寒璧�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(455), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(374);
-            btnGreanLinght.Y = Application.GetMinRealAverage(319);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(455), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(374);
+            btnGreanLinght.Y = this.GetPictrueRealSize(319);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -50,9 +50,9 @@
             framePic.AddChidren(btnGreanLinght);
 
             //鎸変綇姝ゆ寜閿�
-            var btnPress = new NormalViewControl(Application.GetMinRealAverage(230), Application.GetMinRealAverage(45), false);
-            btnPress.X = Application.GetMinRealAverage(409);
-            btnPress.Y = Application.GetMinRealAverage(584);
+            var btnPress = new NormalViewControl(this.GetPictrueRealSize(230), this.GetPictrueRealSize(45), false);
+            btnPress.X = this.GetPictrueRealSize(409);
+            btnPress.Y = this.GetPictrueRealSize(584);
             btnPress.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnPress.TextSize = 10;
             btnPress.TextID = R.MyInternationalizationString.uKeyIndicatorLightsUp;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFourButtonDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFourButtonDirectionForm.cs
index 823a184..a08100b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFourButtonDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFourButtonDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(835);
-            framePic.Height = Application.GetMinRealAverage(711);
+            framePic.Width = this.GetPictrueRealSize(835);
+            framePic.Height = this.GetPictrueRealSize(711);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(115);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //鎸夐敭鎸囩ず鐏寒璧�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(455), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(374);
-            btnGreanLinght.Y = Application.GetMinRealAverage(258);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(455), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(374);
+            btnGreanLinght.Y = this.GetPictrueRealSize(258);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -50,9 +50,9 @@
             framePic.AddChidren(btnGreanLinght);
 
             //鎸変綇姝ゆ寜閿�
-            var btnPress = new NormalViewControl(Application.GetMinRealAverage(230), Application.GetMinRealAverage(45), false);
-            btnPress.X = Application.GetMinRealAverage(144);
-            btnPress.Y = Application.GetMinRealAverage(275);
+            var btnPress = new NormalViewControl(this.GetPictrueRealSize(230), this.GetPictrueRealSize(45), false);
+            btnPress.X = this.GetPictrueRealSize(144);
+            btnPress.Y = this.GetPictrueRealSize(275);
             btnPress.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnPress.TextSize = 10;
             btnPress.TextID = R.MyInternationalizationString.uPressAndHoldThisKey;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirDirectionForm.cs
index 4470e76..3c20826 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirDirectionForm.cs
@@ -3,7 +3,7 @@
 {
     public class PanelFangyueFreshAirDirectionForm : DirectionCommonForm
     {
-        #region 鈻� 鍒濆鍖朹____________________________
+        #region 鈻� 鍒濆鍖朹____________________________
 
         /// <summary>
         /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
@@ -24,49 +24,49 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(835);
-            framePic.Height = Application.GetMinRealAverage(711);
+            framePic.Width = this.GetPictrueRealSize(835);
+            framePic.Height = this.GetPictrueRealSize(711);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(144);
             bodyFrameLayout.AddChidren(framePic);
             var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
             btnPic.UnSelectedImagePath = "Instruct/PanelFreshAir.png";
-            framePic.AddChidren(btnPic);
-
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(455), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(374);
-            btnGreanLinght.Y = Application.GetMinRealAverage(319);
-            btnGreanLinght.TextAlignment = TextAlignment.Center;
-            btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
-            btnGreanLinght.TextSize = 10;
-            btnGreanLinght.TextID = R.MyInternationalizationString.uKeyIndicatorLightsUp;
+            framePic.AddChidren(btnPic);
+
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(455), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(374);
+            btnGreanLinght.Y = this.GetPictrueRealSize(319);
+            btnGreanLinght.TextAlignment = TextAlignment.Center;
+            btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnGreanLinght.TextSize = 10;
+            btnGreanLinght.TextID = R.MyInternationalizationString.uKeyIndicatorLightsUp;
             framePic.AddChidren(btnGreanLinght);
 
             //鎸変綇姝ゆ寜閿�
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(400), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(441);
-            btnSecond.Y = Application.GetMinRealAverage(583);
-            btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
-            btnSecond.TextSize = 10;
-            btnSecond.TextID = R.MyInternationalizationString.uPressAndHoldThisKey;
-            framePic.AddChidren(btnSecond);
-
-            //闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝鎸囩ず鐏彉缁裤�侀棯鐑�
-            //杩涘叆閰嶇綉鐘舵�併�傜豢鐏揩闂�3绉掑垯閰嶇綉鎴愬姛
-            string[] msgArry = Language.StringByID(R.MyInternationalizationString.AddFreshAirPanelMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
-
-            var msg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
-            msg1.Y = Application.GetRealHeight(1037);
-            msg1.Text = msgArry[0];
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(400), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(441);
+            btnSecond.Y = this.GetPictrueRealSize(583);
+            btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnSecond.TextSize = 10;
+            btnSecond.TextID = R.MyInternationalizationString.uPressAndHoldThisKey;
+            framePic.AddChidren(btnSecond);
+
+            //闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝鎸囩ず鐏彉缁裤�侀棯鐑�
+            //杩涘叆閰嶇綉鐘舵�併�傜豢鐏揩闂�3绉掑垯閰嶇綉鎴愬姛
+            string[] msgArry = Language.StringByID(R.MyInternationalizationString.AddFreshAirPanelMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
+
+            var msg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
+            msg1.Y = Application.GetRealHeight(1037);
+            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];
-            }
+            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);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs
index 5fe1158..1fb635c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs
@@ -1,54 +1,54 @@
-锘縰sing System;
-using Shared.Phone.UserCenter.DeviceDirection;
-
-namespace Shared.Phone.UserCenter.DeviceDirection
-{
-    public class PanelFangyueFreshAirModulDirectionForm : DirectionCommonForm
-    {
+锘縰sing System;
+using Shared.Phone.UserCenter.DeviceDirection;
+
+namespace Shared.Phone.UserCenter.DeviceDirection
+{
+    public class PanelFangyueFreshAirModulDirectionForm : 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 = Application.GetMinRealAverage(873);
-            framePic.Height = Application.GetMinRealAverage(665);
-            framePic.Gravity = Gravity.CenterHorizontal;
-            framePic.Y = Application.GetRealHeight(144);
-            bodyFrameLayout.AddChidren(framePic);
-            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
-            btnPic.UnSelectedImagePath = "Instruct/RelayThreeLoad.png";
+
+        /// <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(873);
+            framePic.Height = this.GetPictrueRealSize(665);
+            framePic.Gravity = Gravity.CenterHorizontal;
+            framePic.Y = Application.GetRealHeight(144);
+            bodyFrameLayout.AddChidren(framePic);
+            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
+            btnPic.UnSelectedImagePath = "Instruct/RelayThreeLoad.png";
             framePic.AddChidren(btnPic);
 
-            //缁胯壊鎸囩ず鐏棯鐑� 
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(360), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(442);
-            btnGreanLinght.Y = Application.GetMinRealAverage(368);
+            //缁胯壊鎸囩ず鐏棯鐑� 
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(360), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(442);
+            btnGreanLinght.Y = this.GetPictrueRealSize(368);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
             btnGreanLinght.TextID = R.MyInternationalizationString.GreenLightLighting;
             framePic.AddChidren(btnGreanLinght);
 
-            //鎸囩ず鐏�  
-            var btnLinght = new NormalViewControl(Application.GetMinRealAverage(250), Application.GetMinRealAverage(45), false);
-            btnLinght.X = Application.GetMinRealAverage(340);
-            btnLinght.Y = Application.GetMinRealAverage(514);
+            //鎸囩ず鐏�  
+            var btnLinght = new NormalViewControl(this.GetPictrueRealSize(250), this.GetPictrueRealSize(45), false);
+            btnLinght.X = this.GetPictrueRealSize(340);
+            btnLinght.Y = this.GetPictrueRealSize(514);
             btnLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnLinght.TextSize = 10;
             btnLinght.TextID = R.MyInternationalizationString.uPilotLamp;
@@ -59,10 +59,10 @@
             if (textMsg.Contains("{0}") == true)
             {
                 textMsg = string.Format(textMsg, "5");
-            }
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(400), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(518);
-            btnSecond.Y = Application.GetMinRealAverage(545);
+            }
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(400), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(518);
+            btnSecond.Y = this.GetPictrueRealSize(545);
             btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond.TextSize = 10;
             btnSecond.Text = textMsg;
@@ -75,8 +75,8 @@
             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;
+            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;
@@ -84,10 +84,10 @@
             {
                 msg2.Text = msgArry[1];
             }
-            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
-            msg2.TextAlignment = TextAlignment.Center;
-            bodyFrameLayout.AddChidren(msg2);
-        }
-        #endregion
-    }
-}
+            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
+            msg2.TextAlignment = TextAlignment.Center;
+            bodyFrameLayout.AddChidren(msg2);
+        }
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueTwoButtonDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueTwoButtonDirectionForm.cs
index ef36eeb..c34dadd 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueTwoButtonDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueTwoButtonDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(835);
-            framePic.Height = Application.GetMinRealAverage(711);
+            framePic.Width = this.GetPictrueRealSize(835);
+            framePic.Height = this.GetPictrueRealSize(711);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(115);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //鎸夐敭鎸囩ず鐏寒璧�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(455), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(374);
-            btnGreanLinght.Y = Application.GetMinRealAverage(258);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(455), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(374);
+            btnGreanLinght.Y = this.GetPictrueRealSize(258);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -50,9 +50,9 @@
             framePic.AddChidren(btnGreanLinght);
 
             //鎸変綇姝ゆ寜閿�
-            var btnPress = new NormalViewControl(Application.GetMinRealAverage(230), Application.GetMinRealAverage(45), false);
-            btnPress.X = Application.GetMinRealAverage(144);
-            btnPress.Y = Application.GetMinRealAverage(279);
+            var btnPress = new NormalViewControl(this.GetPictrueRealSize(230), this.GetPictrueRealSize(45), false);
+            btnPress.X = this.GetPictrueRealSize(144);
+            btnPress.Y = this.GetPictrueRealSize(279);
             btnPress.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnPress.TextSize = 10;
             btnPress.TextID = R.MyInternationalizationString.uPressAndHoldThisKey;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFourButtonDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFourButtonDirectionForm.cs
index 5bcf6e8..acded9a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFourButtonDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFourButtonDirectionForm.cs
@@ -11,38 +11,38 @@
     {
         #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 = Application.GetMinRealAverage(835);
-            framePic.Height = Application.GetMinRealAverage(711);
-            framePic.Gravity = Gravity.CenterHorizontal;
-            framePic.Y = Application.GetRealHeight(144);
-            bodyFrameLayout.AddChidren(framePic);
-            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
-            btnPic.UnSelectedImagePath = "Instruct/PanelFourButton.png";
+        /// <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(835);
+            framePic.Height = this.GetPictrueRealSize(711);
+            framePic.Gravity = Gravity.CenterHorizontal;
+            framePic.Y = Application.GetRealHeight(144);
+            bodyFrameLayout.AddChidren(framePic);
+            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
+            btnPic.UnSelectedImagePath = "Instruct/PanelFourButton.png";
             framePic.AddChidren(btnPic);
 
             //鎸夐敭鑳屽厜鐏棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(360), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(442);
-            btnGreanLinght.Y = Application.GetMinRealAverage(257);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(360), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(442);
+            btnGreanLinght.Y = this.GetPictrueRealSize(257);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -55,9 +55,9 @@
             {
                 textMsg = string.Format(textMsg, "5");
             }
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(400), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(441);
-            btnSecond.Y = Application.GetMinRealAverage(583);
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(400), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(441);
+            btnSecond.Y = this.GetPictrueRealSize(583);
             btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond.TextSize = 10;
             btnSecond.Text = textMsg;
@@ -70,8 +70,8 @@
             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;
+            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;
@@ -79,9 +79,9 @@
             {
                 msg2.Text = msgArry[1];
             }
-            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
-            msg2.TextAlignment = TextAlignment.Center;
-            bodyFrameLayout.AddChidren(msg2);
+            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
+            msg2.TextAlignment = TextAlignment.Center;
+            bodyFrameLayout.AddChidren(msg2);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelThreeButtonDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelThreeButtonDirectionForm.cs
index ab7c507..02ade6f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelThreeButtonDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelThreeButtonDirectionForm.cs
@@ -11,38 +11,38 @@
     {
         #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 = Application.GetMinRealAverage(835);
-            framePic.Height = Application.GetMinRealAverage(711);
-            framePic.Gravity = Gravity.CenterHorizontal;
-            framePic.Y = Application.GetRealHeight(144);
-            bodyFrameLayout.AddChidren(framePic);
-            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
-            btnPic.UnSelectedImagePath = "Instruct/PanelThreeButton.png";
+        /// <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(835);
+            framePic.Height = this.GetPictrueRealSize(711);
+            framePic.Gravity = Gravity.CenterHorizontal;
+            framePic.Y = Application.GetRealHeight(144);
+            bodyFrameLayout.AddChidren(framePic);
+            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
+            btnPic.UnSelectedImagePath = "Instruct/PanelThreeButton.png";
             framePic.AddChidren(btnPic);
 
             //鎸夐敭鑳屽厜鐏棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(360), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(442);
-            btnGreanLinght.Y = Application.GetMinRealAverage(257);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(360), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(442);
+            btnGreanLinght.Y = this.GetPictrueRealSize(257);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -55,9 +55,9 @@
             {
                 textMsg = string.Format(textMsg, "5");
             }
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(400), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(441);
-            btnSecond.Y = Application.GetMinRealAverage(583);
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(400), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(441);
+            btnSecond.Y = this.GetPictrueRealSize(583);
             btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond.TextSize = 10;
             btnSecond.Text = textMsg;
@@ -70,8 +70,8 @@
             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;
+            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;
@@ -79,9 +79,9 @@
             {
                 msg2.Text = msgArry[1];
             }
-            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
-            msg2.TextAlignment = TextAlignment.Center;
-            bodyFrameLayout.AddChidren(msg2);
+            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
+            msg2.TextAlignment = TextAlignment.Center;
+            bodyFrameLayout.AddChidren(msg2);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelTwoButtonDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelTwoButtonDirectionForm.cs
index dcd81d1..ae74341 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelTwoButtonDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelTwoButtonDirectionForm.cs
@@ -11,38 +11,38 @@
     {
         #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 = Application.GetMinRealAverage(835);
-            framePic.Height = Application.GetMinRealAverage(711);
-            framePic.Gravity = Gravity.CenterHorizontal;
-            framePic.Y = Application.GetRealHeight(144);
-            bodyFrameLayout.AddChidren(framePic);
-            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
-            btnPic.UnSelectedImagePath = "Instruct/PanelTwoButton.png";
+        /// <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(835);
+            framePic.Height = this.GetPictrueRealSize(711);
+            framePic.Gravity = Gravity.CenterHorizontal;
+            framePic.Y = Application.GetRealHeight(144);
+            bodyFrameLayout.AddChidren(framePic);
+            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
+            btnPic.UnSelectedImagePath = "Instruct/PanelTwoButton.png";
             framePic.AddChidren(btnPic);
 
             //鎸夐敭鑳屽厜鐏棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(360), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(442);
-            btnGreanLinght.Y = Application.GetMinRealAverage(257);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(360), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(442);
+            btnGreanLinght.Y = this.GetPictrueRealSize(257);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -55,9 +55,9 @@
             {
                 textMsg = string.Format(textMsg, "5");
             }
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(400), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(441);
-            btnSecond.Y = Application.GetMinRealAverage(583);
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(400), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(441);
+            btnSecond.Y = this.GetPictrueRealSize(583);
             btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond.TextSize = 10;
             btnSecond.Text = textMsg;
@@ -70,8 +70,8 @@
             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;
+            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;
@@ -79,9 +79,9 @@
             {
                 msg2.Text = msgArry[1];
             }
-            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
-            msg2.TextAlignment = TextAlignment.Center;
-            bodyFrameLayout.AddChidren(msg2);
+            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
+            msg2.TextAlignment = TextAlignment.Center;
+            bodyFrameLayout.AddChidren(msg2);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/RelayThreeLoadDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/RelayThreeLoadDirectionForm.cs
index 355df9c..5a4d5eb 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/RelayThreeLoadDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/RelayThreeLoadDirectionForm.cs
@@ -11,38 +11,38 @@
     {
         #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 = Application.GetMinRealAverage(873);
-            framePic.Height = Application.GetMinRealAverage(665);
-            framePic.Gravity = Gravity.CenterHorizontal;
-            framePic.Y = Application.GetRealHeight(144);
-            bodyFrameLayout.AddChidren(framePic);
-            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
-            btnPic.UnSelectedImagePath = "Instruct/RelayThreeLoad.png";
+        /// <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(873);
+            framePic.Height = this.GetPictrueRealSize(665);
+            framePic.Gravity = Gravity.CenterHorizontal;
+            framePic.Y = Application.GetRealHeight(144);
+            bodyFrameLayout.AddChidren(framePic);
+            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
+            btnPic.UnSelectedImagePath = "Instruct/RelayThreeLoad.png";
             framePic.AddChidren(btnPic);
 
             //缁胯壊鎸囩ず鐏棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(360), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(442);
-            btnGreanLinght.Y = Application.GetMinRealAverage(368);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(360), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(442);
+            btnGreanLinght.Y = this.GetPictrueRealSize(368);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -50,9 +50,9 @@
             framePic.AddChidren(btnGreanLinght);
 
             //鎸囩ず鐏�
-            var btnLinght = new NormalViewControl(Application.GetMinRealAverage(250), Application.GetMinRealAverage(45), false);
-            btnLinght.X = Application.GetMinRealAverage(340);
-            btnLinght.Y = Application.GetMinRealAverage(514);
+            var btnLinght = new NormalViewControl(this.GetPictrueRealSize(250), this.GetPictrueRealSize(45), false);
+            btnLinght.X = this.GetPictrueRealSize(340);
+            btnLinght.Y = this.GetPictrueRealSize(514);
             btnLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnLinght.TextSize = 10;
             btnLinght.TextID = R.MyInternationalizationString.uPilotLamp;
@@ -64,9 +64,9 @@
             {
                 textMsg = string.Format(textMsg, "5");
             }
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(400), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(518);
-            btnSecond.Y = Application.GetMinRealAverage(545);
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(400), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(518);
+            btnSecond.Y = this.GetPictrueRealSize(545);
             btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond.TextSize = 10;
             btnSecond.Text = textMsg;
@@ -79,8 +79,8 @@
             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;
+            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;
@@ -88,9 +88,9 @@
             {
                 msg2.Text = msgArry[1];
             }
-            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
-            msg2.TextAlignment = TextAlignment.Center;
-            bodyFrameLayout.AddChidren(msg2);
+            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
+            msg2.TextAlignment = TextAlignment.Center;
+            bodyFrameLayout.AddChidren(msg2);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/RepeaterZigbeeDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/RepeaterZigbeeDirectionForm.cs
index dad0545..a7bba65 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/RepeaterZigbeeDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/RepeaterZigbeeDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(878);
-            framePic.Height = Application.GetMinRealAverage(691);
+            framePic.Width = this.GetPictrueRealSize(878);
+            framePic.Height = this.GetPictrueRealSize(691);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(135);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //鎸囩ず鐏彉缁块棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(501), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(374);
-            btnGreanLinght.Y = Application.GetMinRealAverage(346);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(501), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(374);
+            btnGreanLinght.Y = this.GetPictrueRealSize(346);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -55,9 +55,9 @@
             {
                 textMsg = string.Format(textMsg, "5");
             }
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(360), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(432);
-            btnSecond.Y = Application.GetMinRealAverage(508);
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(360), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(432);
+            btnSecond.Y = this.GetPictrueRealSize(508);
             btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond.TextSize = 10;
             btnSecond.Text = textMsg;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorCarbonMonoxideDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorCarbonMonoxideDirectionForm.cs
index a66f80b..5e9ceea 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorCarbonMonoxideDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorCarbonMonoxideDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(861);
-            framePic.Height = Application.GetMinRealAverage(706);
+            framePic.Width = this.GetPictrueRealSize(861);
+            framePic.Height = this.GetPictrueRealSize(706);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(135);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //缁胯壊鎸囩ず鐏揩閫熼棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(501), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(357);
-            btnGreanLinght.Y = Application.GetMinRealAverage(326);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(501), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(357);
+            btnGreanLinght.Y = this.GetPictrueRealSize(326);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -56,8 +56,8 @@
             {
                 textMsg = string.Format(textMsg, "5");
             }
-            var btnSecond2 = new NormalViewControl(Application.GetMinRealAverage(357), Application.GetMinRealAverage(45), false);
-            btnSecond2.Y = Application.GetMinRealAverage(222);
+            var btnSecond2 = new NormalViewControl(this.GetPictrueRealSize(357), this.GetPictrueRealSize(45), false);
+            btnSecond2.Y = this.GetPictrueRealSize(222);
             btnSecond2.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond2.TextSize = 10;
             btnSecond2.TextAlignment = TextAlignment.Center;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorDoorWindowDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorDoorWindowDirectionForm.cs
index cd71d66..3948f52 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorDoorWindowDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorDoorWindowDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(877);
-            framePic.Height = Application.GetMinRealAverage(723);
+            framePic.Width = this.GetPictrueRealSize(877);
+            framePic.Height = this.GetPictrueRealSize(723);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(132);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //缁胯壊鎸囩ず鐏揩閫熼棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(501), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(383);
-            btnGreanLinght.Y = Application.GetMinRealAverage(372);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(501), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(383);
+            btnGreanLinght.Y = this.GetPictrueRealSize(372);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -60,15 +60,15 @@
             string textMsg1 = textMsg.Substring(0, index);
             string textMsg2 = textMsg.Substring(index, textMsg.Length - index);
 
-            var btnSecond1 = new NormalViewControl(Application.GetMinRealAverage(150), Application.GetMinRealAverage(45), false);
-            btnSecond1.X = Application.GetMinRealAverage(235);
-            btnSecond1.Y = Application.GetMinRealAverage(214);
+            var btnSecond1 = new NormalViewControl(this.GetPictrueRealSize(150), this.GetPictrueRealSize(45), false);
+            btnSecond1.X = this.GetPictrueRealSize(235);
+            btnSecond1.Y = this.GetPictrueRealSize(214);
             btnSecond1.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond1.TextAlignment = TextAlignment.Center;
             btnSecond1.TextSize = 10;
             btnSecond1.Text = textMsg1;
             framePic.AddChidren(btnSecond1);
-            var btnSecond2 = new NormalViewControl(Application.GetMinRealAverage(120), Application.GetMinRealAverage(45), false);
+            var btnSecond2 = new NormalViewControl(this.GetPictrueRealSize(120), this.GetPictrueRealSize(45), false);
             btnSecond2.X = btnSecond1.X;
             btnSecond2.Y = btnSecond1.Bottom;
             btnSecond2.TextAlignment = TextAlignment.Center;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorFireDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorFireDirectionForm.cs
index f579a2c..01557a1 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorFireDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorFireDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(861);
-            framePic.Height = Application.GetMinRealAverage(706);
+            framePic.Width = this.GetPictrueRealSize(861);
+            framePic.Height = this.GetPictrueRealSize(706);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(135);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //缁胯壊鎸囩ず鐏揩閫熼棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(501), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(357);
-            btnGreanLinght.Y = Application.GetMinRealAverage(326);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(501), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(357);
+            btnGreanLinght.Y = this.GetPictrueRealSize(326);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -55,9 +55,9 @@
             {
                 textMsg = string.Format(textMsg, "5");
             }
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(360), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(400);
-            btnSecond.Y = Application.GetMinRealAverage(614);
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(360), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(400);
+            btnSecond.Y = this.GetPictrueRealSize(614);
             btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond.TextSize = 10;
             btnSecond.Text = textMsg;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorInfraredDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorInfraredDirectionForm.cs
index 9063711..2b3b497 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorInfraredDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorInfraredDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(988);
-            framePic.Height = Application.GetMinRealAverage(775);
+            framePic.Width = this.GetPictrueRealSize(988);
+            framePic.Height = this.GetPictrueRealSize(775);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(78);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //鎸囩ず鐏�
-            var btnLinght = new NormalViewControl(Application.GetMinRealAverage(200), Application.GetMinRealAverage(45), false);
-            btnLinght.X = Application.GetMinRealAverage(173);
-            btnLinght.Y = Application.GetMinRealAverage(266);
+            var btnLinght = new NormalViewControl(this.GetPictrueRealSize(200), this.GetPictrueRealSize(45), false);
+            btnLinght.X = this.GetPictrueRealSize(173);
+            btnLinght.Y = this.GetPictrueRealSize(266);
             btnLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnLinght.TextSize = 10;
             btnLinght.TextID = R.MyInternationalizationString.uPilotLamp;
@@ -54,9 +54,9 @@
             {
                 textMsg = string.Format(textMsg, "5");
             }
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(550), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(435);
-            btnSecond.Y = Application.GetMinRealAverage(120);
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(550), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(435);
+            btnSecond.Y = this.GetPictrueRealSize(120);
             btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond.TextAlignment = TextAlignment.Center;
             btnSecond.TextSize = 10;
@@ -64,9 +64,9 @@
             framePic.AddChidren(btnSecond);
 
             //缁胯壊鎸囩ず鐏棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(550), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(435);
-            btnGreanLinght.Y = Application.GetMinRealAverage(400);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(550), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(435);
+            btnGreanLinght.Y = this.GetPictrueRealSize(400);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -74,9 +74,9 @@
             framePic.AddChidren(btnGreanLinght);
 
             //閫嗘椂閽堟嫥寮�鐢垫睜鍚庣洊
-            var btnBattery = new NormalViewControl(Application.GetMinRealAverage(550), Application.GetMinRealAverage(50), false);
-            btnBattery.X = Application.GetMinRealAverage(455);
-            btnBattery.Y = Application.GetMinRealAverage(622);
+            var btnBattery = new NormalViewControl(this.GetPictrueRealSize(550), this.GetPictrueRealSize(50), false);
+            btnBattery.X = this.GetPictrueRealSize(455);
+            btnBattery.Y = this.GetPictrueRealSize(622);
             btnBattery.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnBattery.TextSize = 12;
             btnBattery.TextID = R.MyInternationalizationString.uUnscrewTheBatteryAnticlockwise;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorPirDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorPirDirectionForm.cs
index 5d83487..e8f209c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorPirDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorPirDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(860);
-            framePic.Height = Application.GetMinRealAverage(714);
+            framePic.Width = this.GetPictrueRealSize(860);
+            framePic.Height = this.GetPictrueRealSize(714);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(130);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //鎸囩ず鐏彉缁裤�侀棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(455), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(398);
-            btnGreanLinght.Y = Application.GetMinRealAverage(300);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(455), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(398);
+            btnGreanLinght.Y = this.GetPictrueRealSize(300);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -50,18 +50,18 @@
             framePic.AddChidren(btnGreanLinght);
 
             //鎸囩ず鐏�
-            var btnLinght = new NormalViewControl(Application.GetMinRealAverage(250), Application.GetMinRealAverage(45), false);
-            btnLinght.X = Application.GetMinRealAverage(398);
-            btnLinght.Y = Application.GetMinRealAverage(642);
+            var btnLinght = new NormalViewControl(this.GetPictrueRealSize(250), this.GetPictrueRealSize(45), false);
+            btnLinght.X = this.GetPictrueRealSize(398);
+            btnLinght.Y = this.GetPictrueRealSize(642);
             btnLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnLinght.TextSize = 10;
             btnLinght.TextID = R.MyInternationalizationString.uPilotLamp;
             framePic.AddChidren(btnLinght);
 
             //閽堝瓟寮忛噸缃寜閿�
-            var btnReset = new NormalViewControl(Application.GetMinRealAverage(250), Application.GetMinRealAverage(45), false);
-            btnReset.X = Application.GetMinRealAverage(512);
-            btnReset.Y = Application.GetMinRealAverage(512);
+            var btnReset = new NormalViewControl(this.GetPictrueRealSize(250), this.GetPictrueRealSize(45), false);
+            btnReset.X = this.GetPictrueRealSize(512);
+            btnReset.Y = this.GetPictrueRealSize(512);
             btnReset.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnReset.TextSize = 10;
             btnReset.TextID = R.MyInternationalizationString.uPinholeTypeResetButton;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorTemperatureHumidityForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorTemperatureHumidityForm.cs
index 50363d8..29311a8 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorTemperatureHumidityForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorTemperatureHumidityForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(897);
-            framePic.Height = Application.GetMinRealAverage(732);
+            framePic.Width = this.GetPictrueRealSize(897);
+            framePic.Height = this.GetPictrueRealSize(732);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(130);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //淇″彿鍥炬爣蹇棯
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(455), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(400);
-            btnGreanLinght.Y = Application.GetMinRealAverage(295);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(455), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(400);
+            btnGreanLinght.Y = this.GetPictrueRealSize(295);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
@@ -50,9 +50,9 @@
             framePic.AddChidren(btnGreanLinght);
 
             //淇″彿鍥炬爣
-            var btnLinght = new NormalViewControl(Application.GetMinRealAverage(250), Application.GetMinRealAverage(45), false);
-            btnLinght.X = Application.GetMinRealAverage(505);
-            btnLinght.Y = Application.GetMinRealAverage(602);
+            var btnLinght = new NormalViewControl(this.GetPictrueRealSize(250), this.GetPictrueRealSize(45), false);
+            btnLinght.X = this.GetPictrueRealSize(505);
+            btnLinght.Y = this.GetPictrueRealSize(602);
             btnLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnLinght.TextSize = 10;
             btnLinght.TextID = R.MyInternationalizationString.uSignalIcon;
@@ -64,9 +64,9 @@
             {
                 textMsg = string.Format(textMsg, "5");
             }
-            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(360), Application.GetMinRealAverage(45), false);
-            btnSecond.X = Application.GetMinRealAverage(100);
-            btnSecond.Y = Application.GetMinRealAverage(200);
+            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(360), this.GetPictrueRealSize(45), false);
+            btnSecond.X = this.GetPictrueRealSize(100);
+            btnSecond.Y = this.GetPictrueRealSize(200);
             btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnSecond.TextSize = 10;
             btnSecond.Text = textMsg;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorWaterDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorWaterDirectionForm.cs
index d681c51..4f8a917 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorWaterDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorWaterDirectionForm.cs
@@ -30,8 +30,8 @@
         {
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(861);
-            framePic.Height = Application.GetMinRealAverage(706);
+            framePic.Width = this.GetPictrueRealSize(861);
+            framePic.Height = this.GetPictrueRealSize(706);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(135);
             bodyFrameLayout.AddChidren(framePic);
@@ -40,9 +40,9 @@
             framePic.AddChidren(btnPic);
 
             //缁胯壊鎸囩ず鐏揩閫熼棯鐑�
-            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(501), Application.GetMinRealAverage(45), false);
-            btnGreanLinght.X = Application.GetMinRealAverage(369);
-            btnGreanLinght.Y = Application.GetMinRealAverage(358);
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(501), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(369);
+            btnGreanLinght.Y = this.GetPictrueRealSize(358);
             btnGreanLinght.TextAlignment = TextAlignment.Center;
             btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnGreanLinght.TextSize = 10;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
index 39a09ef..3879f6e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
@@ -724,7 +724,7 @@
         private void AdjustDoorOtherAlarmData(ref List<HistoryInfo> listLog, string result)
         {
             var dataInfo2 = Newtonsoft.Json.JsonConvert.DeserializeObject<MessageCentetInfo>(result);
-            string doorKey = this.DeviceDoor.DeviceAddr + "_200";
+            string doorKey = this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint;
             foreach (var myInfo in dataInfo2.PageData)
             {
                 //璁惧瀵硅薄
@@ -764,7 +764,7 @@
         private void AdjustDoorNormallyOpenData(ref List<HistoryInfo> listLog, string result)
         {
             var dataInfo2 = Newtonsoft.Json.JsonConvert.DeserializeObject<MessageCentetInfo>(result);
-            string doorKey = this.DeviceDoor.DeviceAddr + "_200";
+            string doorKey = this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint;
             foreach (var myInfo in dataInfo2.PageData)
             {
                 var jobject = Newtonsoft.Json.Linq.JObject.Parse(myInfo.PayloadJson);
@@ -819,7 +819,7 @@
         private void AdjustDoorTemporaryPasswordData(ref List<HistoryInfo> listLog, string result)
         {
             var dataInfo2 = Newtonsoft.Json.JsonConvert.DeserializeObject<MessageCentetInfo>(result);
-            string doorKey = this.DeviceDoor.DeviceAddr + "_200";
+            string doorKey = this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint;
             foreach (var myInfo in dataInfo2.PageData)
             {
                 var jobject = Newtonsoft.Json.Linq.JObject.Parse(myInfo.PayloadJson);
@@ -931,7 +931,7 @@
             pra.UnlockTimeBegin = dateFrom.ToUniversalTime().ToString();
             pra.UnlockTimeEnd = dateTo.ToUniversalTime().ToString();
             pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
-            pra.DoorLockId = this.DeviceDoor.DeviceAddr + "_200";
+            pra.DoorLockId = this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint;
 
             return pra;
         }
@@ -970,7 +970,7 @@
             pra.UnlockTimeBegin = dateFrom.ToUniversalTime().ToString();
             pra.UnlockTimeEnd = dateTo.ToUniversalTime().ToString();
             pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
-            pra.DoorLockId = this.DeviceDoor.DeviceAddr + "_200";
+            pra.DoorLockId = this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint;
             pra.CloudAccountIds = listUser;
             pra.OpenLockModes = listLock;
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs
index bb77abd..6181276 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs
@@ -2,17 +2,17 @@
 using System.Collections.Generic;
 using System.Text;
 using System.Threading.Tasks;
-using ZigBee.Device;
-namespace Shared.Phone.UserCenter.DevicePanel
-{
-    public class PanelBackLighWithSensorForm : EditorCommonForm
-    {
-        #region 鈻� 鍙橀噺澹版槑___________________________ 
+using ZigBee.Device;
+namespace Shared.Phone.UserCenter.DevicePanel
+{
+    public class PanelBackLighWithSensorForm : EditorCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________ 
         /// <summary>
         /// 鍒楄〃鎺т欢
         /// </summary>
-        private VerticalScrolViewLayout listview = null;
-
+        private VerticalScrolViewLayout listview = null;
+
         /// <summary>
         /// 闈㈡澘鐨勫洖璺�
         /// </summary>
@@ -68,35 +68,35 @@
             if (result == false)
             {
                 return;
-            }
-
-            //娓呯┖bodyFrame
-            this.ClearBodyFrame();
-
+            }
+
+            //娓呯┖bodyFrame
+            this.ClearBodyFrame();
+
             HdlThreadLogic.Current.RunMain(() =>
             {
-                listview = new VerticalScrolViewLayout();
-                listview.Height = Application.GetRealHeight(1981 - 184);
-                bodyFrameLayout.AddChidren(listview);
-
-                //娣诲姞鑺傝兘妯″紡
-                this.AddEnergyConservationRow();
-                //娣诲姞鐐瑰嚮鍓嶏紝浜害杩涘害鏉�
+                listview = new VerticalScrolViewLayout();
+                listview.Height = Application.GetRealHeight(1981 - 184);
+                bodyFrameLayout.AddChidren(listview);
+
+                //娣诲姞鑺傝兘妯″紡
+                this.AddEnergyConservationRow();
+                //娣诲姞鐐瑰嚮鍓嶏紝浜害杩涘害鏉�
                 this.AddBeforeClickProgress();
                 //娣诲姞鐐瑰嚮鍚庯紝浜害杩涘害鏉�
-                this.AddAfterClickProgress();
-
-                this.FinishInitControl(listview, energyModeInfo.enable);
+                this.AddAfterClickProgress();
 
-                //淇濆瓨
-                var btnSave = new BottomClickButton();
-                btnSave.TextID = R.MyInternationalizationString.uSave;
-                bodyFrameLayout.AddChidren(btnSave);
-                btnSave.ButtonClickEvent += (sender, e) =>
-                {
-                    //淇濆瓨闈㈡澘鏁版嵁
-                    this.SavePanelData();
-                };
+                this.FinishInitControl(listview, energyModeInfo.enable);
+
+                //淇濆瓨
+                var btnSave = new BottomClickButton();
+                btnSave.TextID = R.MyInternationalizationString.uSave;
+                bodyFrameLayout.AddChidren(btnSave);
+                btnSave.ButtonClickEvent += (sender, e) =>
+                {
+                    //淇濆瓨闈㈡澘鏁版嵁
+                    this.SavePanelData();
+                };
             });
         }
 
@@ -123,18 +123,18 @@
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
                 btnSwitch.IsSelected = !btnSwitch.IsSelected;
-                energyModeInfo.enable = btnSwitch.IsSelected;
-                //灞曞紑鎴栬�呯缉灏忕殑楂樺害
+                energyModeInfo.enable = btnSwitch.IsSelected;
+                //灞曞紑鎴栬�呯缉灏忕殑楂樺害
                 var value = Application.GetRealHeight(443);
                 if (btnSwitch.IsSelected == true)
                 {
-                    frameBack.Height += value;
+                    frameBack.Height += value;
                 }
                 else
                 {
-                    frameBack.Height -= value;
-                }
-                //瀹瑰櫒琛ュ厖
+                    frameBack.Height -= value;
+                }
+                //瀹瑰櫒琛ュ厖
                 this.FinishInitControl(listview, energyModeInfo.enable);
             };
             if (energyModeInfo.enable == true)
@@ -195,20 +195,20 @@
                 frameBack.Height += value;
             }
 
-            //娣诲姞鎺ヨ繎鎰熷簲
-            this.AddProximitySensorsRow(frameBack);
-        }
-
+            //娣诲姞鎺ヨ繎鎰熷簲
+            this.AddProximitySensorsRow(frameBack);
+        }
+
         #endregion
-
+
         #region 鈻� 鎺ヨ繎鎰熷簲___________________________
-
+
         /// <summary>
         /// 鎺ヨ繎鎰熷簲琛�
         /// </summary>
         private void AddProximitySensorsRow(FrameRowControl frameRowControl)
-        {
-            //鎺ヨ繎鎰熷簲琛�
+        {
+            //鎺ヨ繎鎰熷簲琛�
             var frameBack = new FrameRowControl();
             frameBack.BackgroundColor = UserCenterColor.Current.White;
             frameBack.UseClickStatu = false;
@@ -219,22 +219,22 @@
             //鎺ヨ繎鎰熷簲
             frameBack.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.ProximitySensors), 400);
             //寮�鍏虫帶浠�
-            var btnSwitch = frameBack.AddMostRightSwitchIcon();
-
-            btnSwitch.ButtonClickEvent += (sender, e) =>
-            {
-                btnSwitch.IsSelected = !btnSwitch.IsSelected;
-                proximitySensorsInfo.enable = btnSwitch.IsSelected;
-            };
+            var btnSwitch = frameBack.AddMostRightSwitchIcon();
+
+            btnSwitch.ButtonClickEvent += (sender, e) =>
+            {
+                btnSwitch.IsSelected = !btnSwitch.IsSelected;
+                proximitySensorsInfo.enable = btnSwitch.IsSelected;
+            };
             if (proximitySensorsInfo.enable == true)
             {
                 btnSwitch.IsSelected = true;
-            }
-        }
+            }
+        }
         #endregion
-
+
         #region 鈻� 鐐瑰嚮鍓峗____________________________
-
+
         /// <summary>
         ///  娣诲姞鐐瑰嚮鍓嶇殑鑳屽厜鐏繘搴︽潯
         /// </summary>
@@ -243,7 +243,7 @@
         {
             //鐐瑰嚮鍓�
             var btnClick = new NormalViewControl(600, 107, true);
-            btnClick.X = ControlCommonResourse.XXLeft;
+            btnClick.X = ControlCommonResourse.XXLeft;
             btnClick.TextSize = 12;
             btnClick.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnClick.TextID = R.MyInternationalizationString.uBeforeClick;
@@ -299,16 +299,16 @@
             btnTemp2.Text = "100%";
             frameBack.AddChidren(btnTemp2);
 
-            var frameColor = new FrameLayoutControl();
+            var frameColor = new FrameLayoutStatuControl();
             frameColor.UseClickStatu = false;
             frameColor.Width = Application.GetRealHeight(262);
-            frameColor.Height = Application.GetMinRealAverage(79);
+            frameColor.Height = this.GetPictrueRealSize(79);
             frameColor.Y = Application.GetRealHeight(26);
             frameColor.X = listview.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262);
             frameBack.AddChidren(frameColor);
 
             //棰滆壊
-            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), Application.GetMinRealAverage(49), false);
+            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(49), false);
             btnColorView.Gravity = Gravity.CenterVertical;
             btnColorView.TextAlignment = TextAlignment.CenterRight;
             btnColorView.TextSize = 12;
@@ -320,33 +320,33 @@
             int R1 = Convert.ToInt32(this.keyColorData.CloseColorR, 16);
             int G1 = Convert.ToInt32(this.keyColorData.CloseColorG, 16);
             int B1 = Convert.ToInt32(this.keyColorData.CloseColorB, 16);
-            uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
-
-            //棰滆壊澶栨 
-            var btnColorLine = new FrameLayoutControl();
+            uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
+
+            //棰滆壊澶栨 
+            var btnColorLine = new FrameLayoutStatuControl();
             btnColorLine.Width = Application.GetRealHeight(79);
-            btnColorLine.Height = Application.GetMinRealAverage(79);
+            btnColorLine.Height = this.GetPictrueRealSize(79);
             btnColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
-            btnColorLine.Radius = (uint)Application.GetMinRealAverage(79) / 2;
+            btnColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
             btnColorLine.BorderWidth = 1;
-            btnColorLine.BorderColor = 0xffcccccc;
+            btnColorLine.BorderColor = 0xffcccccc;
             frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEventOnly);
 
-            var btnColor = new NormalViewControl(Application.GetMinRealAverage(69), Application.GetMinRealAverage(69), false);
+            var btnColor = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(69), false);
             btnColor.Gravity = Gravity.Center;
-            btnColor.Radius = (uint)Application.GetMinRealAverage(69) / 2;
+            btnColor.Radius = (uint)this.GetPictrueRealSize(69) / 2;
             btnColor.BackgroundColor = backColor;
             btnColorLine.AddChidren(btnColor, ChidrenBindMode.BindEventOnly);
 
             //鍙樻洿婊戝姩鏉$殑棰滆壊
             seekBar1.ProgressBarColor = backColor;
 
-            var btnRight = new NormalViewControl(Application.GetMinRealAverage(58), Application.GetMinRealAverage(58), false);
+            var btnRight = new NormalViewControl(this.GetPictrueRealSize(58), this.GetPictrueRealSize(58), false);
             btnRight.UnSelectedImagePath = "Item/RightNext.png";
             btnRight.Y = Application.GetRealHeight(5);
-            btnRight.X = frameColor.Width - Application.GetMinRealAverage(58);
+            btnRight.X = frameColor.Width - this.GetPictrueRealSize(58);
             frameColor.AddChidren(btnRight, ChidrenBindMode.BindEventOnly);
-            btnRight.Y += Application.GetMinRealAverage(8);
+            btnRight.Y += this.GetPictrueRealSize(8);
 
             frameColor.ButtonClickEvent += (sender, e) =>
             {
@@ -437,16 +437,16 @@
             btnTemp2.Text = "100%";
             frameBack.AddChidren(btnTemp2);
 
-            var frameColor = new FrameLayoutControl();
+            var frameColor = new FrameLayoutStatuControl();
             frameColor.UseClickStatu = false;
             frameColor.Width = Application.GetRealHeight(262);
-            frameColor.Height = Application.GetMinRealAverage(79);
+            frameColor.Height = this.GetPictrueRealSize(79);
             frameColor.Y = Application.GetRealHeight(26);
             frameColor.X = listview.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262);
-            frameBack.AddChidren(frameColor);
-
-            //棰滆壊
-            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), Application.GetMinRealAverage(49), false);
+            frameBack.AddChidren(frameColor);
+
+            //棰滆壊
+            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(49), false);
             btnColorView.Gravity = Gravity.CenterVertical;
             btnColorView.TextAlignment = TextAlignment.CenterRight;
             btnColorView.TextSize = 12;
@@ -458,33 +458,33 @@
             int R1 = Convert.ToInt32(this.keyColorData.OpenColorR, 16);
             int G1 = Convert.ToInt32(this.keyColorData.OpenColorG, 16);
             int B1 = Convert.ToInt32(this.keyColorData.OpenColorB, 16);
-            uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
-
-            //棰滆壊澶栨
-            var btnColorLine = new FrameLayoutControl();
+            uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
+
+            //棰滆壊澶栨
+            var btnColorLine = new FrameLayoutStatuControl();
             btnColorLine.Width = Application.GetRealHeight(79);
-            btnColorLine.Height = Application.GetMinRealAverage(79);
+            btnColorLine.Height = this.GetPictrueRealSize(79);
             btnColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
-            btnColorLine.Radius = (uint)Application.GetMinRealAverage(79) / 2;
+            btnColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
             btnColorLine.BorderWidth = 1;
-            btnColorLine.BorderColor = 0xffcccccc;
-            frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEventOnly);
-
-            var btnColor = new NormalViewControl(Application.GetMinRealAverage(69), Application.GetMinRealAverage(69), false);
+            btnColorLine.BorderColor = 0xffcccccc;
+            frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEventOnly);
+
+            var btnColor = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(69), false);
             btnColor.Gravity = Gravity.Center;
-            btnColor.Radius = (uint)Application.GetMinRealAverage(69) / 2;
+            btnColor.Radius = (uint)this.GetPictrueRealSize(69) / 2;
             btnColor.BackgroundColor = backColor;
             btnColorLine.AddChidren(btnColor, ChidrenBindMode.BindEventOnly);
 
             //鍙樻洿婊戝姩鏉$殑棰滆壊
             seekBar1.ProgressBarColor = backColor;
 
-            var btnRight = new NormalViewControl(Application.GetMinRealAverage(58), Application.GetMinRealAverage(58), false);
+            var btnRight = new NormalViewControl(this.GetPictrueRealSize(58), this.GetPictrueRealSize(58), false);
             btnRight.UnSelectedImagePath = "Item/RightNext.png";
             btnRight.Y = Application.GetRealHeight(5);
-            btnRight.X = frameColor.Width - Application.GetMinRealAverage(58);
+            btnRight.X = frameColor.Width - this.GetPictrueRealSize(58);
             frameColor.AddChidren(btnRight, ChidrenBindMode.BindEventOnly);
-            btnRight.Y += Application.GetMinRealAverage(8);
+            btnRight.Y += this.GetPictrueRealSize(8);
 
             frameColor.ButtonClickEvent += (sender, e) =>
             {
@@ -575,15 +575,15 @@
             }
 
             //鑺傝兘妯″紡淇敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�)
-            //璁惧鍚屼簨璇撮粯璁ゅ幓绉掓椂闂达紝杩欐牱鎺ヨ繎鎰熷簲鍔熻兘鎵嶅悎鐞�
-            energyModeInfo.time = 1;
+            //鑲栧織璞粰鎸夐敭鎺у埗闈㈡澘锛堝洓寮�鍏帶锛夎澶囷紝璇撮粯璁�15绉掓椂闂达紝杩欐牱鎺ヨ繎鎰熷簲鍔熻兘鎵嶅悎鐞�
+            energyModeInfo.time = 15;
             result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(panelDevice, energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
             if (result == false)
             {
                 this.CloseProgressBar();
                 return;
             }
-            //鎺ヨ繎淇敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�)
+            //鎺ヨ繎浼犳劅璁剧疆  (鑲栧織璞粰鎸夐敭鎺у埗闈㈡澘锛堝洓寮�鍏帶锛夎澶囷紝浼犳劅璺濈鍜岃Е鍙戝欢杩熸椂闂撮粯璁ょ敤鏈�澶у��)
             result = await HdlDevicePanelLogic.Current.SetProximitySensorStatus(panelDevice, proximitySensorsInfo.enable);
             if (result == false)
             {
@@ -640,8 +640,8 @@
         private uint GetColorByRGB(byte R, byte G, byte B)
         {
             return (uint)(0xFF000000 + R * 256 * 256 + G * 256 + B);
-        }
-
+        }
+
         #endregion 
     }
-}
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs
index 085aae4..26f4c3a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs
@@ -273,15 +273,15 @@
             btnTemp2.Text = "100%";
             frameBack.AddChidren(btnTemp2);
 
-            var frameColor = new FrameLayoutControl();
+            var frameColor = new FrameLayoutStatuControl();
             frameColor.UseClickStatu = false;
             frameColor.Width = Application.GetRealHeight(262);
-            frameColor.Height = Application.GetMinRealAverage(79);
+            frameColor.Height = this.GetPictrueRealSize(79);
             frameColor.Y = Application.GetRealHeight(26);
             frameColor.X = frameLinght.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262);
             frameBack.AddChidren(frameColor);
             //棰滆壊
-            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), Application.GetMinRealAverage(49), false);
+            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(49), false);
             btnColorView.Gravity = Gravity.CenterVertical;
             btnColorView.TextAlignment = TextAlignment.CenterRight;
             btnColorView.TextSize = 12;
@@ -296,18 +296,18 @@
             uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
 
             //棰滆壊澶栨
-            var frameColorLine = new FrameLayoutControl();
+            var frameColorLine = new FrameLayoutStatuControl();
             frameColorLine.UseClickStatu = false;
-            frameColorLine.Height = Application.GetMinRealAverage(79);
-            frameColorLine.Width = Application.GetMinRealAverage(79);
+            frameColorLine.Height = this.GetPictrueRealSize(79);
+            frameColorLine.Width = this.GetPictrueRealSize(79);
             frameColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
-            frameColorLine.Radius = (uint)Application.GetMinRealAverage(79) / 2;
+            frameColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
             frameColorLine.BorderWidth = 1;
             frameColorLine.BorderColor = 0xffcccccc;
             frameColor.AddChidren(frameColorLine, ChidrenBindMode.NotBind);
 
             //鍒嗕袱姝ヨ绠楋紝涓嶇劧鏈夊彲鑳藉畠寰楀嚭鐨勭粨鏋滄湁璇樊瀵艰嚧涓嶅眳涓�
-            int btnColorWidth = frameColorLine.Height - Application.GetMinRealAverage(7) - Application.GetMinRealAverage(7);
+            int btnColorWidth = frameColorLine.Height - this.GetPictrueRealSize(7) - this.GetPictrueRealSize(7);
             var btnColor = new NormalViewControl(btnColorWidth, btnColorWidth, false);
             btnColor.Gravity = Gravity.Center;
             btnColor.Radius = (uint)btnColorWidth / 2;
@@ -318,12 +318,12 @@
             //鍙樻洿婊戝姩鏉$殑棰滆壊
             seekBar1.ProgressBarColor = backColor;
 
-            var btnRight = new NormalViewControl(Application.GetMinRealAverage(58), Application.GetMinRealAverage(58), false);
+            var btnRight = new NormalViewControl(this.GetPictrueRealSize(58), this.GetPictrueRealSize(58), false);
             btnRight.UnSelectedImagePath = "Item/RightNext.png";
             btnRight.Y = Application.GetRealHeight(5);
-            btnRight.X = frameColor.Width - Application.GetMinRealAverage(58);
+            btnRight.X = frameColor.Width - this.GetPictrueRealSize(58);
             frameColor.AddChidren(btnRight, ChidrenBindMode.BindEventOnly);
-            btnRight.Y += Application.GetMinRealAverage(8);
+            btnRight.Y += this.GetPictrueRealSize(8);
 
             frameColor.ButtonClickEvent += (sender, e) =>
             {
@@ -415,15 +415,15 @@
             btnTemp2.Text = "100%";
             frameBack.AddChidren(btnTemp2);
 
-            var frameColor = new FrameLayoutControl();
+            var frameColor = new FrameLayoutStatuControl();
             frameColor.UseClickStatu = false;
             frameColor.Width = Application.GetRealHeight(262);
-            frameColor.Height = Application.GetMinRealAverage(79);
+            frameColor.Height = this.GetPictrueRealSize(79);
             frameColor.Y = Application.GetRealHeight(26);
             frameColor.X = frameLinght.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262);
             frameBack.AddChidren(frameColor);
             //棰滆壊
-            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), Application.GetMinRealAverage(49), false);
+            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(49), false);
             btnColorView.Gravity = Gravity.CenterVertical;
             btnColorView.TextAlignment = TextAlignment.CenterRight;
             btnColorView.TextSize = 12;
@@ -438,18 +438,18 @@
             uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
 
             //棰滆壊澶栨
-            var frameColorLine = new FrameLayoutControl();
+            var frameColorLine = new FrameLayoutStatuControl();
             frameColorLine.UseClickStatu = false;
-            frameColorLine.Height = Application.GetMinRealAverage(79);
-            frameColorLine.Width = Application.GetMinRealAverage(79);
+            frameColorLine.Height = this.GetPictrueRealSize(79);
+            frameColorLine.Width = this.GetPictrueRealSize(79);
             frameColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
-            frameColorLine.Radius = (uint)Application.GetMinRealAverage(79) / 2;
+            frameColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
             frameColorLine.BorderWidth = 1;
             frameColorLine.BorderColor = 0xffcccccc;
             frameColor.AddChidren(frameColorLine, ChidrenBindMode.NotBind);
 
             //鍒嗕袱姝ヨ绠楋紝涓嶇劧鏈夊彲鑳藉畠寰楀嚭鐨勭粨鏋滄湁璇樊瀵艰嚧涓嶅眳涓�
-            int btnColorWidth = frameColorLine.Height - Application.GetMinRealAverage(7) - Application.GetMinRealAverage(7);
+            int btnColorWidth = frameColorLine.Height - this.GetPictrueRealSize(7) - this.GetPictrueRealSize(7);
             var btnColor = new NormalViewControl(btnColorWidth, btnColorWidth, false);
             btnColor.Gravity = Gravity.Center;
             btnColor.Radius = (uint)btnColorWidth / 2;
@@ -460,12 +460,12 @@
             //鍙樻洿婊戝姩鏉$殑棰滆壊
             seekBar1.ProgressBarColor = backColor;
 
-            var btnRight = new NormalViewControl(Application.GetMinRealAverage(58), Application.GetMinRealAverage(58), false);
+            var btnRight = new NormalViewControl(this.GetPictrueRealSize(58), this.GetPictrueRealSize(58), false);
             btnRight.UnSelectedImagePath = "Item/RightNext.png";
             btnRight.Y = Application.GetRealHeight(5);
-            btnRight.X = frameColor.Width - Application.GetMinRealAverage(58);
+            btnRight.X = frameColor.Width - this.GetPictrueRealSize(58);
             frameColor.AddChidren(btnRight, ChidrenBindMode.BindEventOnly);
-            btnRight.Y += Application.GetMinRealAverage(8);
+            btnRight.Y += this.GetPictrueRealSize(8);
 
             frameColor.ButtonClickEvent += (sender, e) =>
             {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs
index 390b7e9..428d2c0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs
@@ -322,7 +322,9 @@
             //鍙湁绠�绾﹂潰鏉挎墠浼氭湁杩欎釜鑿滃崟
             if (myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleTwo
                 || myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleThree
-                || myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleFour)
+                || myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleFour
+                || myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FourButtonScene
+                || myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_TwoButtonCurtain)
             {
                 //闇囧姩鍙嶉
                 var rowContr = new FrameRowControl(listview.rowSpace / 2);
@@ -436,8 +438,8 @@
             var frameBorder = new FrameLayout();
             frameBorder.Y = Application.GetRealHeight(150);
             frameBorder.Gravity = Gravity.CenterHorizontal;
-            frameBorder.Width = Application.GetMinRealAverage(426);
-            frameBorder.Height = Application.GetMinRealAverage(426);
+            frameBorder.Width = this.GetPictrueRealSize(426);
+            frameBorder.Height = this.GetPictrueRealSize(426);
             listBackControl.frameTable.AddChidren(frameBorder);
 
             var btnPic = new PicViewControl(frameBorder.Width, frameBorder.Height, false);
@@ -468,12 +470,12 @@
         /// <param name="device">璁惧瀵硅薄</param>
         /// <param name="isFirst">鏄惁鏄涓�涓�</param>
         /// <returns></returns>
-        private void InitDeviceIcon(FrameLayoutControl frame, CommonDevice device)
+        private void InitDeviceIcon(FrameLayoutStatuControl frame, CommonDevice device)
         {
             //涓嶄娇鐢ㄧ偣鍑荤壒鏁�
             frame.UseClickStatu = false;
 
-            var btnIcon = new NormalViewControl(Application.GetMinRealAverage(52), Application.GetMinRealAverage(52), false);
+            var btnIcon = new NormalViewControl(this.GetPictrueRealSize(52), this.GetPictrueRealSize(52), false);
             btnIcon.Name = "btn" + device.DeviceEpoint;
             btnIcon.Gravity = Gravity.Center;
             btnIcon.RadiusEx = 16;
@@ -506,20 +508,20 @@
         private void InitTwoButtonPanelIcon(FrameLayout frameBack, List<CommonDevice> listDevice)
         {
             //鎸夐敭1
-            var frame1 = new FrameLayoutControl();
-            frame1.Height = Application.GetMinRealAverage(110);
-            frame1.Width = Application.GetMinRealAverage(110);
-            frame1.Y = Application.GetMinRealAverage(63);
+            var frame1 = new FrameLayoutStatuControl();
+            frame1.Height = this.GetPictrueRealSize(110);
+            frame1.Width = this.GetPictrueRealSize(110);
+            frame1.Y = this.GetPictrueRealSize(63);
             frame1.Gravity = Gravity.CenterHorizontal;
             frameBack.AddChidren(frame1);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame1, listDevice[0]);
 
             //鎸夐敭2
-            var frame2 = new FrameLayoutControl();
-            frame2.Height = Application.GetMinRealAverage(110);
-            frame2.Width = Application.GetMinRealAverage(110);
-            frame2.Y = Application.GetMinRealAverage(245);
+            var frame2 = new FrameLayoutStatuControl();
+            frame2.Height = this.GetPictrueRealSize(110);
+            frame2.Width = this.GetPictrueRealSize(110);
+            frame2.Y = this.GetPictrueRealSize(245);
             frame2.Gravity = Gravity.CenterHorizontal;
             frameBack.AddChidren(frame2);
             //鍒濆鍖栬澶囧浘鏍�
@@ -538,31 +540,31 @@
         private void InitThreeButtonPanelIcon(FrameLayout frameBack, List<CommonDevice> listDevice)
         {
             //鎸夐敭1
-            var frame1 = new FrameLayoutControl();
-            frame1.Height = Application.GetMinRealAverage(110);
-            frame1.Width = Application.GetMinRealAverage(110);
-            frame1.Y = Application.GetMinRealAverage(63);
+            var frame1 = new FrameLayoutStatuControl();
+            frame1.Height = this.GetPictrueRealSize(110);
+            frame1.Width = this.GetPictrueRealSize(110);
+            frame1.Y = this.GetPictrueRealSize(63);
             frame1.Gravity = Gravity.CenterHorizontal;
             frameBack.AddChidren(frame1);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame1, listDevice[0]);
 
             //鎸夐敭2
-            var frame2 = new FrameLayoutControl();
-            frame2.Height = Application.GetMinRealAverage(110);
-            frame2.Width = Application.GetMinRealAverage(110);
-            frame2.X = Application.GetMinRealAverage(63);
-            frame2.Y = Application.GetMinRealAverage(245);
+            var frame2 = new FrameLayoutStatuControl();
+            frame2.Height = this.GetPictrueRealSize(110);
+            frame2.Width = this.GetPictrueRealSize(110);
+            frame2.X = this.GetPictrueRealSize(63);
+            frame2.Y = this.GetPictrueRealSize(245);
             frameBack.AddChidren(frame2);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame2, listDevice[1]);
 
             //鎸夐敭3
-            var frame3 = new FrameLayoutControl();
-            frame3.Height = Application.GetMinRealAverage(110);
-            frame3.Width = Application.GetMinRealAverage(110);
-            frame3.X = Application.GetMinRealAverage(245);
-            frame3.Y = Application.GetMinRealAverage(245);
+            var frame3 = new FrameLayoutStatuControl();
+            frame3.Height = this.GetPictrueRealSize(110);
+            frame3.Width = this.GetPictrueRealSize(110);
+            frame3.X = this.GetPictrueRealSize(245);
+            frame3.Y = this.GetPictrueRealSize(245);
             frameBack.AddChidren(frame3);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame3, listDevice[2]);
@@ -580,41 +582,41 @@
         private void InitFourButtonPanelIcon(FrameLayout frameBack, List<CommonDevice> listDevice)
         {
             //鎸夐敭1
-            var frame1 = new FrameLayoutControl();
-            frame1.Height = Application.GetMinRealAverage(110);
-            frame1.Width = Application.GetMinRealAverage(110);
-            frame1.X = Application.GetMinRealAverage(63);
-            frame1.Y = Application.GetMinRealAverage(63);
+            var frame1 = new FrameLayoutStatuControl();
+            frame1.Height = this.GetPictrueRealSize(110);
+            frame1.Width = this.GetPictrueRealSize(110);
+            frame1.X = this.GetPictrueRealSize(63);
+            frame1.Y = this.GetPictrueRealSize(63);
             frameBack.AddChidren(frame1);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame1, listDevice[0]);
 
             //鎸夐敭2
-            var frame2 = new FrameLayoutControl();
-            frame2.Height = Application.GetMinRealAverage(110);
-            frame2.Width = Application.GetMinRealAverage(110);
-            frame2.X = Application.GetMinRealAverage(245);
-            frame2.Y = Application.GetMinRealAverage(63);
+            var frame2 = new FrameLayoutStatuControl();
+            frame2.Height = this.GetPictrueRealSize(110);
+            frame2.Width = this.GetPictrueRealSize(110);
+            frame2.X = this.GetPictrueRealSize(245);
+            frame2.Y = this.GetPictrueRealSize(63);
             frameBack.AddChidren(frame2);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame2, listDevice[1]);
 
             //鎸夐敭3
-            var frame3 = new FrameLayoutControl();
-            frame3.Height = Application.GetMinRealAverage(110);
-            frame3.Width = Application.GetMinRealAverage(110);
-            frame3.X = Application.GetMinRealAverage(63);
-            frame3.Y = Application.GetMinRealAverage(245);
+            var frame3 = new FrameLayoutStatuControl();
+            frame3.Height = this.GetPictrueRealSize(110);
+            frame3.Width = this.GetPictrueRealSize(110);
+            frame3.X = this.GetPictrueRealSize(63);
+            frame3.Y = this.GetPictrueRealSize(245);
             frameBack.AddChidren(frame3);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame3, listDevice[2]);
 
             //鎸夐敭4
-            var frame4 = new FrameLayoutControl();
-            frame4.Height = Application.GetMinRealAverage(110);
-            frame4.Width = Application.GetMinRealAverage(110);
-            frame4.X = Application.GetMinRealAverage(245);
-            frame4.Y = Application.GetMinRealAverage(245);
+            var frame4 = new FrameLayoutStatuControl();
+            frame4.Height = this.GetPictrueRealSize(110);
+            frame4.Width = this.GetPictrueRealSize(110);
+            frame4.X = this.GetPictrueRealSize(245);
+            frame4.Y = this.GetPictrueRealSize(245);
             frameBack.AddChidren(frame4);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame4, listDevice[3]);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelColorSelectForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelColorSelectForm.cs
index 54474b0..b1cbd81 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelColorSelectForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelColorSelectForm.cs
@@ -23,11 +23,11 @@
         /// <summary>
         /// 褰撳墠閫夋嫨鐨勬帶浠�(澶栨)
         /// </summary>
-        private FrameLayoutControl nowSelectIcon1 = null;
+        private FrameLayoutStatuControl nowSelectIcon1 = null;
         /// <summary>
         /// 鍦嗙洏閫夋嫨鐨勯鑹叉樉绀烘帶浠�(澶栨)
         /// </summary>
-        private FrameLayoutControl wheelSelectIcon1 = null;
+        private FrameLayoutStatuControl wheelSelectIcon1 = null;
         /// <summary>
         /// 鍦嗙洏閫夋嫨鐨勯鑹叉樉绀烘帶浠�(鍐呮)
         /// </summary>
@@ -102,8 +102,8 @@
             bodyFrameLayout.AddChidren(frameBack);
 
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(588);
-            framePic.Height = Application.GetMinRealAverage(588);
+            framePic.Width = this.GetPictrueRealSize(588);
+            framePic.Height = this.GetPictrueRealSize(588);
             framePic.Gravity = Gravity.Center;
             frameBack.AddChidren(framePic);
 
@@ -116,7 +116,7 @@
             var btnWhiteView = new IconViewControl(30);
             btnWhiteView.Visible = false;
             btnWhiteView.BackgroundColor = UserCenterColor.Current.White;
-            btnWhiteView.Radius = (uint)Application.GetMinRealAverage(30) / 2;
+            btnWhiteView.Radius = (uint)this.GetPictrueRealSize(30) / 2;
             framePic.AddChidren(btnWhiteView);
 
             colorPic.ColorChaged += (sender, eColor) =>
@@ -163,16 +163,16 @@
             //鎺т欢鏁�
             var listColor = this.InitSpareDefultColor();
             //X杞村垵濮嬪潗鏍�
-            int Xdefult = (bodyFrameLayout.Width - Application.GetMinRealAverage(80 + 24) * (listColor.Count - 1) - Application.GetMinRealAverage(80)) / 2;
+            int Xdefult = (bodyFrameLayout.Width - this.GetPictrueRealSize(80 + 24) * (listColor.Count - 1) - this.GetPictrueRealSize(80)) / 2;
             for (int i = 0; i < listColor.Count; i++)
             {
                 var dataColor = listColor[i];
 
-                var btnFrame = new FrameLayoutControl();
-                btnFrame.Height = Application.GetMinRealAverage(80);
-                btnFrame.Width = Application.GetMinRealAverage(80);
-                btnFrame.Radius = (uint)Application.GetMinRealAverage(80) / 2;
-                btnFrame.X = Xdefult + i * Application.GetMinRealAverage(80 + 24);
+                var btnFrame = new FrameLayoutStatuControl();
+                btnFrame.Height = this.GetPictrueRealSize(80);
+                btnFrame.Width = this.GetPictrueRealSize(80);
+                btnFrame.Radius = (uint)this.GetPictrueRealSize(80) / 2;
+                btnFrame.X = Xdefult + i * this.GetPictrueRealSize(80 + 24);
                 btnFrame.Y = Application.GetRealHeight(1054);
                 btnFrame.BackgroundColor = UserCenterColor.Current.White;
                 btnFrame.BorderWidth = 1;
@@ -180,7 +180,7 @@
                 bodyFrameLayout.AddChidren(btnFrame);
 
                 //鍒嗕袱姝ヨ绠楋紝涓嶇劧鏈夊彲鑳藉畠寰楀嚭鐨勭粨鏋滄湁璇樊瀵艰嚧涓嶅眳涓�
-                int iconWidth = btnFrame.Height - Application.GetMinRealAverage(10) - Application.GetMinRealAverage(10);
+                int iconWidth = btnFrame.Height - this.GetPictrueRealSize(10) - this.GetPictrueRealSize(10);
                 var btnIcon = new IconViewControl(iconWidth, false);
                 btnIcon.Gravity = Gravity.Center;
                 btnIcon.Radius = (uint)btnIcon.IconSize / 2;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs
index 514859d..225a2aa 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs
@@ -340,8 +340,8 @@
             var frameBorder = new FrameLayout();
             frameBorder.Y = Application.GetRealHeight(150);
             frameBorder.Gravity = Gravity.CenterHorizontal;
-            frameBorder.Width = Application.GetMinRealAverage(426);
-            frameBorder.Height = Application.GetMinRealAverage(426);
+            frameBorder.Width = this.GetPictrueRealSize(426);
+            frameBorder.Height = this.GetPictrueRealSize(426);
             listBackControl.frameTable.AddChidren(frameBorder);
 
             var btnPic = new PicViewControl(frameBorder.Width, frameBorder.Height, false);
@@ -376,14 +376,14 @@
         /// <returns></returns>
         private NormalViewControl InitDeviceButtonControl(FrameLayout frame, CommonDevice device)
         {
-            var btnIcon = new NormalViewControl(Application.GetMinRealAverage(52), Application.GetMinRealAverage(52), false);
+            var btnIcon = new NormalViewControl(this.GetPictrueRealSize(52), this.GetPictrueRealSize(52), false);
             btnIcon.Text = "Button" + device.DeviceEpoint;
             btnIcon.TextAlignment = TextAlignment.Center;
             btnIcon.TextColor = UserCenterColor.Current.TextGrayColor1;
-            if (frame is FrameLayoutControl)
+            if (frame is FrameLayoutStatuControl)
             {
-                ((FrameLayoutControl)frame).AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
-                ((FrameLayoutControl)frame).ButtonClickEvent += (sender, e) =>
+                ((FrameLayoutStatuControl)frame).AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
+                ((FrameLayoutStatuControl)frame).ButtonClickEvent += (sender, e) =>
                 {
                     //鎸夐敭鐐瑰嚮
                     this.DeviceEpointSelectEvent(btnIcon, null);
@@ -421,15 +421,15 @@
         {
             //鎸夐敭1
             var btnButton1 = this.InitDeviceButtonControl(frameBack, listDevice[0]);
-            btnButton1.Height = Application.GetMinRealAverage(175);
-            btnButton1.Width = Application.GetMinRealAverage(361);
-            btnButton1.Y = Application.GetMinRealAverage(39);
+            btnButton1.Height = this.GetPictrueRealSize(175);
+            btnButton1.Width = this.GetPictrueRealSize(361);
+            btnButton1.Y = this.GetPictrueRealSize(39);
             btnButton1.Gravity = Gravity.CenterHorizontal;
 
             //鎸夐敭2
             var btnButton2 = this.InitDeviceButtonControl(frameBack, listDevice[1]);
-            btnButton2.Height = Application.GetMinRealAverage(175);
-            btnButton2.Width = Application.GetMinRealAverage(361);
+            btnButton2.Height = this.GetPictrueRealSize(175);
+            btnButton2.Width = this.GetPictrueRealSize(361);
             btnButton2.Y = btnButton1.Bottom;
             btnButton2.Gravity = Gravity.CenterHorizontal;
         }
@@ -448,32 +448,32 @@
             //鎸夐敭1
             var btnButton1 = this.InitDeviceButtonControl(frameBack, listDevice[0]);
             btnButton1.TextSize = 12;
-            btnButton1.Height = Application.GetMinRealAverage(175);
-            btnButton1.Width = Application.GetMinRealAverage(183);
-            btnButton1.X = Application.GetMinRealAverage(34);
-            btnButton1.Y = Application.GetMinRealAverage(30);
+            btnButton1.Height = this.GetPictrueRealSize(175);
+            btnButton1.Width = this.GetPictrueRealSize(183);
+            btnButton1.X = this.GetPictrueRealSize(34);
+            btnButton1.Y = this.GetPictrueRealSize(30);
 
             //鎸夐敭2
             var btnButton2 = this.InitDeviceButtonControl(frameBack, listDevice[1]);
             btnButton2.TextSize = 12;
-            btnButton2.Height = Application.GetMinRealAverage(175);
-            btnButton2.Width = Application.GetMinRealAverage(183);
+            btnButton2.Height = this.GetPictrueRealSize(175);
+            btnButton2.Width = this.GetPictrueRealSize(183);
             btnButton2.X = btnButton1.Right;
             btnButton2.Y = btnButton1.Y;
 
             //鎸夐敭3
             var btnButton3 = this.InitDeviceButtonControl(frameBack, listDevice[2]);
             btnButton3.TextSize = 12;
-            btnButton3.Height = Application.GetMinRealAverage(175);
-            btnButton3.Width = Application.GetMinRealAverage(183);
+            btnButton3.Height = this.GetPictrueRealSize(175);
+            btnButton3.Width = this.GetPictrueRealSize(183);
             btnButton3.X = btnButton1.X;
-            btnButton3.Y = btnButton1.Bottom + Application.GetMinRealAverage(4);
+            btnButton3.Y = btnButton1.Bottom + this.GetPictrueRealSize(4);
 
             //鎸夐敭4
             var btnButton4 = this.InitDeviceButtonControl(frameBack, listDevice[3]);
             btnButton4.TextSize = 12;
-            btnButton4.Height = Application.GetMinRealAverage(175);
-            btnButton4.Width = Application.GetMinRealAverage(183);
+            btnButton4.Height = this.GetPictrueRealSize(175);
+            btnButton4.Width = this.GetPictrueRealSize(183);
             btnButton4.X = btnButton2.X;
             btnButton4.Y = btnButton3.Y;
         }
@@ -491,10 +491,10 @@
         {
             //鎸夐敭1锝炴寜閿�2
             var frame1 = new FrameLayout();
-            frame1.X = Application.GetMinRealAverage(34);
-            frame1.Y = Application.GetMinRealAverage(30);
-            frame1.Height = Application.GetMinRealAverage(183);
-            frame1.Width = Application.GetMinRealAverage(183);
+            frame1.X = this.GetPictrueRealSize(34);
+            frame1.Y = this.GetPictrueRealSize(30);
+            frame1.Height = this.GetPictrueRealSize(183);
+            frame1.Width = this.GetPictrueRealSize(183);
             frameBack.AddChidren(frame1);
             this.InitEightButtonPanelIcon(frame1, listDevice[0], listDevice[1]);
 
@@ -510,7 +510,7 @@
             //鎸夐敭5锝炴寜閿�6
             var frame3 = new FrameLayout();
             frame3.X = frame1.X;
-            frame3.Y = frame1.Bottom + Application.GetMinRealAverage(4);
+            frame3.Y = frame1.Bottom + this.GetPictrueRealSize(4);
             frame3.Height = frame1.Height;
             frame3.Width = frame1.Width;
             frameBack.AddChidren(frame3);
@@ -519,7 +519,7 @@
             //鎸夐敭7锝炴寜閿�8
             var frame4 = new FrameLayout();
             frame4.X = frame1.Right;
-            frame4.Y = frame1.Bottom + Application.GetMinRealAverage(4);
+            frame4.Y = frame1.Bottom + this.GetPictrueRealSize(4);
             frame4.Height = frame1.Height;
             frame4.Width = frame1.Width;
             frameBack.AddChidren(frame4);
@@ -535,19 +535,19 @@
         private void InitEightButtonPanelIcon(FrameLayout frameBack, CommonDevice device1, CommonDevice device2)
         {
             //鎸夐敭1
-            var frameButton1 = new FrameLayoutControl();
+            var frameButton1 = new FrameLayoutStatuControl();
             frameButton1.UseClickStatu = false;
-            frameButton1.Height = Application.GetMinRealAverage(92);
-            frameButton1.Width = Application.GetMinRealAverage(183);
+            frameButton1.Height = this.GetPictrueRealSize(92);
+            frameButton1.Width = this.GetPictrueRealSize(183);
             frameBack.AddChidren(frameButton1);
             var btnButton1 = this.InitDeviceButtonControl(frameButton1, device1);
             btnButton1.TextSize = 10;
-            btnButton1.Height = Application.GetMinRealAverage(35);
-            btnButton1.Width = Application.GetMinRealAverage(183);
-            btnButton1.Y = Application.GetMinRealAverage(37);
+            btnButton1.Height = this.GetPictrueRealSize(35);
+            btnButton1.Width = this.GetPictrueRealSize(183);
+            btnButton1.Y = this.GetPictrueRealSize(37);
 
             //鎸夐敭2
-            var frameButton2 = new FrameLayoutControl();
+            var frameButton2 = new FrameLayoutStatuControl();
             frameButton2.UseClickStatu = false;
             frameButton2.Height = frameButton1.Height;
             frameButton2.Width = frameButton1.Width;
@@ -557,7 +557,7 @@
             btnButton2.TextSize = 10;
             btnButton2.Height = btnButton1.Height;
             btnButton2.Width = btnButton1.Width;
-            btnButton2.Y = Application.GetMinRealAverage(20);
+            btnButton2.Y = this.GetPictrueRealSize(20);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueEnvironmentLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueEnvironmentLightSettionForm.cs
index ef714aa..d70ff25 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueEnvironmentLightSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueEnvironmentLightSettionForm.cs
@@ -212,15 +212,15 @@
             btnTemp2.Text = "100%";
             frameBack.AddChidren(btnTemp2);
 
-            var frameColor = new FrameLayoutControl();
+            var frameColor = new FrameLayoutStatuControl();
             frameColor.UseClickStatu = false;
             frameColor.Width = Application.GetRealHeight(262);
-            frameColor.Height = Application.GetMinRealAverage(79);
+            frameColor.Height = this.GetPictrueRealSize(79);
             frameColor.Y = Application.GetRealHeight(26);
             frameColor.X = frameBack.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262);
             frameBack.AddChidren(frameColor);
             //棰滆壊
-            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), Application.GetMinRealAverage(50), false);
+            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(50), false);
             btnColorView.Gravity = Gravity.CenterVertical;
             btnColorView.TextAlignment = TextAlignment.CenterRight;
             btnColorView.TextSize = 12;
@@ -235,17 +235,17 @@
             uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
 
             //棰滆壊澶栨
-            var frameColorLine = new FrameLayoutControl();
+            var frameColorLine = new FrameLayoutStatuControl();
             frameColorLine.UseClickStatu = false;
-            frameColorLine.Height = Application.GetMinRealAverage(79);
-            frameColorLine.Width = Application.GetMinRealAverage(79);
-            frameColorLine.Radius = (uint)Application.GetMinRealAverage(79) / 2;
+            frameColorLine.Height = this.GetPictrueRealSize(79);
+            frameColorLine.Width = this.GetPictrueRealSize(79);
+            frameColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
             frameColorLine.BorderWidth = 1;
             frameColorLine.BorderColor = 0xffcccccc;
             frameColor.AddChidren(frameColorLine, ChidrenBindMode.NotBind);
 
             //鍒嗕袱姝ヨ绠楋紝涓嶇劧鏈夊彲鑳藉畠寰楀嚭鐨勭粨鏋滄湁璇樊瀵艰嚧涓嶅眳涓�
-            int btnColorWidth = frameColorLine.Height - Application.GetMinRealAverage(7) - Application.GetMinRealAverage(7);
+            int btnColorWidth = frameColorLine.Height - this.GetPictrueRealSize(7) - this.GetPictrueRealSize(7);
             var btnColor = new NormalViewControl(btnColorWidth, btnColorWidth, false);
             btnColor.Gravity = Gravity.Center;
             btnColor.Radius = (uint)btnColorWidth / 2;
@@ -256,12 +256,12 @@
             //鍙樻洿婊戝姩鏉$殑棰滆壊
             seekBar1.ProgressBarColor = backColor;
 
-            var btnRight = new NormalViewControl(Application.GetMinRealAverage(58), Application.GetMinRealAverage(58), false);
+            var btnRight = new NormalViewControl(this.GetPictrueRealSize(58), this.GetPictrueRealSize(58), false);
             btnRight.UnSelectedImagePath = "Item/RightNext.png";
             btnRight.Y = Application.GetRealHeight(5);
-            btnRight.X = frameColor.Width - Application.GetMinRealAverage(58);
+            btnRight.X = frameColor.Width - this.GetPictrueRealSize(58);
             frameColor.AddChidren(btnRight, ChidrenBindMode.BindEventOnly);
-            btnRight.Y += Application.GetMinRealAverage(8);
+            btnRight.Y += this.GetPictrueRealSize(8);
 
             frameColor.ButtonClickEvent += (sender, e) =>
             {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
index 35dea98..7e3c14c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
@@ -1,15 +1,15 @@
-锘縰sing System;
-using System.Threading.Tasks;
-using ZigBee.Device;
-namespace Shared.Phone.UserCenter.DevicePanel
-{
-    public class PanelFangyueFreshAirBackLightSettionForm : EditorCommonForm
-    {
+锘縰sing System;
+using System.Threading.Tasks;
+using ZigBee.Device;
+namespace Shared.Phone.UserCenter.DevicePanel
+{
+    public class PanelFangyueFreshAirBackLightSettionForm : EditorCommonForm
+    {
         #region 鈻� 鍙橀噺澹版槑___________________________
         /// <summary>
         /// 鍒楄〃鎺т欢
         /// </summary>
-        private VerticalScrolViewLayout listview = null;
+        private VerticalScrolViewLayout listview = null;
         /// <summary>
         /// 闈㈡澘鐨勫洖璺�
         /// </summary>
@@ -42,7 +42,7 @@
         public void ShowForm(Panel i_panel)
         {
             //宸︽粦浣胯兘涓嶅彲
-            this.ScrollEnabled = false;
+            this.ScrollEnabled = false;
             this.panelDevice = i_panel;
 
             //璁剧疆澶撮儴淇℃伅
@@ -56,8 +56,8 @@
         /// 鍒濆鍖栦腑閮ㄤ俊鎭�
         /// </summary>
         private async void InitMiddleFrame()
-        {
-            //鑾峰彇璁惧鍒濆鏁版嵁
+        {
+            //鑾峰彇璁惧鍒濆鏁版嵁
             var result = await this.GetDeviceDefultData();
             if (result == false)
             {
@@ -65,34 +65,34 @@
             }
 
             //娓呯┖bodyFrame
-            this.ClearBodyFrame();
-
-            listview = new VerticalScrolViewLayout();
-            listview.Height = Application.GetRealHeight(1981 - 184);
-            bodyFrameLayout.AddChidren(listview);
-
+            this.ClearBodyFrame();
+
+            listview = new VerticalScrolViewLayout();
+            listview.Height = Application.GetRealHeight(1981 - 184);
+            bodyFrameLayout.AddChidren(listview);
+
             HdlThreadLogic.Current.RunMain(() =>
-            {
-                //娣诲姞鑺傝兘妯″紡鎺т欢
-                this.AddEnergyConservationRow();
-
-                //娣诲姞灞忓箷浜害绾у埆鎺т欢
-                this.AddScreenBrightnesLevelControl();
-                //娣诲姞鑳屽厜鐏寒搴︽帶浠躲�愭殏鏃朵笉闇�瑕侊紝鍙兘鍚庢湡鏂伴闈㈡澘鐨勮繖涓鑹茶琛ュ洖鏉ャ��
-                //this.AddBackLightControl();
-                //銆愭殏鏃朵笉闇�瑕侊紝鍙兘鍚庢湡鏂伴闈㈡澘鐨勮繖涓鑹茶琛ュ洖鏉ャ��
+            {
+                //娣诲姞鑺傝兘妯″紡鎺т欢
+                this.AddEnergyConservationRow();
+
+                //娣诲姞灞忓箷浜害绾у埆鎺т欢
+                this.AddScreenBrightnesLevelControl();
+                //娣诲姞鑳屽厜鐏寒搴︽帶浠躲�愭殏鏃朵笉闇�瑕侊紝鍙兘鍚庢湡鏂伴闈㈡澘鐨勮繖涓鑹茶琛ュ洖鏉ャ��
+                //this.AddBackLightControl();
+                //銆愭殏鏃朵笉闇�瑕侊紝鍙兘鍚庢湡鏂伴闈㈡澘鐨勮繖涓鑹茶琛ュ洖鏉ャ��
                 //this.FinishInitControl(listview, energyModeInfo.enable);
 
-                //淇濆瓨
+                //淇濆瓨
                 var btnSave = new BottomClickButton();
                 btnSave.TextID = R.MyInternationalizationString.uSave;
                 bodyFrameLayout.AddChidren(btnSave);
                 btnSave.ButtonClickEvent += (sender, e) =>
                 {
-                    //淇濆瓨闈㈡澘鏁版嵁
+                    //淇濆瓨闈㈡澘鏁版嵁
                     this.SavePanelData();
                 };
-            });
+            });
         }
 
         #endregion
@@ -103,13 +103,13 @@
         /// </summary>
         private void AddScreenBrightnesLevelControl()
         {
-            var btnEspace = new NormalViewControl(600, 58, true);
-            btnEspace.X = ControlCommonResourse.XXLeft;
-            listview.AddChidren(btnEspace);
-
+            var btnEspace = new NormalViewControl(600, 58, true);
+            btnEspace.X = ControlCommonResourse.XXLeft;
+            listview.AddChidren(btnEspace);
+
             var frameBack = new FrameLayout();
             frameBack.Height = Application.GetRealHeight(429);
-            frameBack.Y = Application.GetRealHeight(58);
+            frameBack.Y = Application.GetRealHeight(58);
             frameBack.BackgroundColor = UserCenterColor.Current.White;
             listview.AddChidren(frameBack);
 
@@ -152,79 +152,97 @@
             frameBack.AddChidren(seekBar1);
             seekBar1.ProgressChangedEvent += (div, value) =>
             {
-                btnProgress1.Text = value.ToString();
-                switch (value)
-                {
-                    case 1:
-                        linghtLevelInfo.panelDirectionsLevel = 20;
-                        btnLevel.Text = "1" + strRank;
-                        break;
-                    case 2:
-                        linghtLevelInfo.panelDirectionsLevel = 40;
-                        btnLevel.Text = "2" + strRank;
-                        break;
-                    case 3:
-                        linghtLevelInfo.panelDirectionsLevel = 60;
-                        btnLevel.Text = "3" + strRank;
-                        break;
-                    case 4:
-                        linghtLevelInfo.panelDirectionsLevel = 80;
-                        btnLevel.Text = "4" + strRank;
-                        break;
-                    case 5:
-                        linghtLevelInfo.panelDirectionsLevel = 100;
-                        btnLevel.Text = "5" + strRank;
-                        break;
-                    default:
-                        linghtLevelInfo.panelDirectionsLevel = 0;
-                        btnLevel.Text = "0" + strRank;
-                        break;
-                }
+                if (value == 0)
+                {
+                    btnProgress1.Text = (value + 1).ToString();
+                }
+                else
+                {
+                    btnProgress1.Text = value.ToString();
+                }
+
+                switch (value)
+                {
+                    case 0:
+                    case 1:
+                        linghtLevelInfo.panelDirectionsLevel = 20;
+                        btnLevel.Text = "1" + strRank;
+
+                        break;
+                    case 2:
+                        linghtLevelInfo.panelDirectionsLevel = 40;
+                        btnLevel.Text = "2" + strRank;
+                        break;
+                    case 3:
+                        linghtLevelInfo.panelDirectionsLevel = 60;
+                        btnLevel.Text = "3" + strRank;
+                        break;
+                    case 4:
+                        linghtLevelInfo.panelDirectionsLevel = 80;
+                        btnLevel.Text = "4" + strRank;
+                        break;
+                    case 5:
+                        linghtLevelInfo.panelDirectionsLevel = 100;
+                        btnLevel.Text = "5" + strRank;
+                        break;
+                }
             };
 
-            if (linghtLevelInfo.panelDirectionsLevel <= 20 && linghtLevelInfo.panelDirectionsLevel > 0)
-            {
-                btnLevel.Text = "1" + strRank;
-                btnProgress1.Text = "1";
-                seekBar1.Progress = 1;
-            }
-            else if (linghtLevelInfo.panelDirectionsLevel <= 40 && linghtLevelInfo.panelDirectionsLevel > 20)
-            {
-                btnLevel.Text = "2" + strRank;
-                btnProgress1.Text = "2";
-                seekBar1.Progress = 2;
-            }
-            else if (linghtLevelInfo.panelDirectionsLevel <= 60 && linghtLevelInfo.panelDirectionsLevel > 40)
-            {
-                btnLevel.Text = "3" + strRank;
-                btnProgress1.Text = "3";
-                seekBar1.Progress = 3;
-            }
-            else if (linghtLevelInfo.panelDirectionsLevel <= 80 && linghtLevelInfo.panelDirectionsLevel > 60)
-            {
-                btnLevel.Text = "4" + strRank;
-                btnProgress1.Text = "4";
-                seekBar1.Progress = 4;
-            }
-            else if (linghtLevelInfo.panelDirectionsLevel <= 100 && linghtLevelInfo.panelDirectionsLevel > 80)
-            {
-                btnLevel.Text = "5" + strRank;
-                btnProgress1.Text = "5";
-                seekBar1.Progress = 5;
-            }
-            else
-            {
-                btnLevel.Text = "0" + strRank;
-                btnProgress1.Text = "0";
-                seekBar1.Progress = 0;
-            }
+            seekBar1.OnStopTrackingTouchEvent += (div, value) =>
+            {
+                if (value == 0)
+                {
+                    seekBar1.Progress = 1;
+                }
+                else
+                {
+                    seekBar1.Progress = value;
+                }
+            };
+
+            if (linghtLevelInfo.panelDirectionsLevel <= 20 && linghtLevelInfo.panelDirectionsLevel >= 0)
+            {
+                btnLevel.Text = "1" + strRank;
+                btnProgress1.Text = "1";
+                seekBar1.Progress = 1;
+            }
+            else if (linghtLevelInfo.panelDirectionsLevel <= 40 && linghtLevelInfo.panelDirectionsLevel > 20)
+            {
+                btnLevel.Text = "2" + strRank;
+                btnProgress1.Text = "2";
+                seekBar1.Progress = 2;
+            }
+            else if (linghtLevelInfo.panelDirectionsLevel <= 60 && linghtLevelInfo.panelDirectionsLevel > 40)
+            {
+                btnLevel.Text = "3" + strRank;
+                btnProgress1.Text = "3";
+                seekBar1.Progress = 3;
+            }
+            else if (linghtLevelInfo.panelDirectionsLevel <= 80 && linghtLevelInfo.panelDirectionsLevel > 60)
+            {
+                btnLevel.Text = "4" + strRank;
+                btnProgress1.Text = "4";
+                seekBar1.Progress = 4;
+            }
+            else if (linghtLevelInfo.panelDirectionsLevel <= 100 && linghtLevelInfo.panelDirectionsLevel > 80)
+            {
+                btnLevel.Text = "5" + strRank;
+                btnProgress1.Text = "5";
+                seekBar1.Progress = 5;
+            }
+            else
+            {
+                btnLevel.Text = "1" + strRank;
+                btnProgress1.Text = "1";
+                seekBar1.Progress = 1;
+            }
 
             var btnTemp1 = new NormalViewControl(200, 50, true);
             btnTemp1.X = ControlCommonResourse.XXLeft;
             btnTemp1.Y = Application.GetRealHeight(322);
             btnTemp1.TextSize = 12;
             btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3;
-            btnTemp1.Text = "0";
+            btnTemp1.Text = "1";
             frameBack.AddChidren(btnTemp1);
 
             var btnTemp2 = new NormalViewControl(100, 50, true);
@@ -245,10 +263,10 @@
         /// </summary>
         private void AddBackLightControl()
         {
-            var btnEspace = new NormalViewControl(600, 58, true);
-            btnEspace.X = ControlCommonResourse.XXLeft;
-            listview.AddChidren(btnEspace);
-
+            var btnEspace = new NormalViewControl(600, 58, true);
+            btnEspace.X = ControlCommonResourse.XXLeft;
+            listview.AddChidren(btnEspace);
+
             //鑳屾櫙
             var frameBack = new FrameLayout();
             frameBack.Y = Application.GetRealHeight(490);
@@ -306,15 +324,15 @@
             btnTemp2.Text = "100%";
             frameBack.AddChidren(btnTemp2);
 
-            var frameColor = new FrameLayoutControl();
+            var frameColor = new FrameLayoutStatuControl();
             frameColor.UseClickStatu = false;
             frameColor.Width = Application.GetRealHeight(262);
-            frameColor.Height = Application.GetMinRealAverage(79);
+            frameColor.Height = this.GetPictrueRealSize(79);
             frameColor.Y = Application.GetRealHeight(26);
             frameColor.X = frameBack.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262);
             frameBack.AddChidren(frameColor);
             //棰滆壊
-            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), Application.GetMinRealAverage(50), false);
+            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(50), false);
             btnColorView.Gravity = Gravity.CenterVertical;
             btnColorView.TextAlignment = TextAlignment.CenterRight;
             btnColorView.TextSize = 12;
@@ -329,29 +347,29 @@
             uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
 
             //棰滆壊澶栨
-            var btnColorLine = new NormalViewControl(Application.GetMinRealAverage(79), Application.GetMinRealAverage(79), false);
+            var btnColorLine = new NormalViewControl(this.GetPictrueRealSize(79), this.GetPictrueRealSize(79), false);
             btnColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
-            btnColorLine.Radius = (uint)Application.GetMinRealAverage(79) / 2;
+            btnColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
             btnColorLine.BorderWidth = 1;
             btnColorLine.BorderColor = 0xff666666;
             frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEventOnly);
 
-            var btnColor = new NormalViewControl(Application.GetMinRealAverage(69), Application.GetMinRealAverage(69), false);
+            var btnColor = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(69), false);
             btnColor.Y = Application.GetRealHeight(5);
             btnColor.X = btnColorView.Right + Application.GetRealHeight(23);
-            btnColor.Radius = (uint)Application.GetMinRealAverage(69) / 2;
+            btnColor.Radius = (uint)this.GetPictrueRealSize(69) / 2;
             btnColor.BackgroundColor = UserCenterColor.Current.ErrorColor;
             frameColor.AddChidren(btnColor, ChidrenBindMode.BindEventOnly);
 
             //鍙樻洿婊戝姩鏉$殑棰滆壊
             seekBar1.ProgressBarColor = backColor;
 
-            var btnRight = new NormalViewControl(Application.GetMinRealAverage(58), Application.GetMinRealAverage(58), false);
+            var btnRight = new NormalViewControl(this.GetPictrueRealSize(58), this.GetPictrueRealSize(58), false);
             btnRight.UnSelectedImagePath = "Item/RightNext.png";
             btnRight.Y = Application.GetRealHeight(5);
-            btnRight.X = frameColor.Width - Application.GetMinRealAverage(58);
+            btnRight.X = frameColor.Width - this.GetPictrueRealSize(58);
             frameColor.AddChidren(btnRight, ChidrenBindMode.BindEventOnly);
-            btnRight.Y += Application.GetMinRealAverage(8);
+            btnRight.Y += this.GetPictrueRealSize(8);
 
             frameColor.ButtonClickEvent += (sender, e) =>
             {
@@ -372,10 +390,10 @@
                     seekBar1.ProgressBarColor = btnColor.BackgroundColor;
                 };
             };
-        }
-
+        }
+
         #endregion
-
+
         #region 鈻� 鑺傝兘妯″紡琛宊________________________ 
         /// <summary>
         ///  娣诲姞鑺傝兘妯″紡琛�
@@ -397,18 +415,18 @@
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
                 btnSwitch.IsSelected = !btnSwitch.IsSelected;
-                energyModeInfo.enable = btnSwitch.IsSelected;
-                //灞曞紑鎴栬�呯缉灏忕殑楂樺害
+                energyModeInfo.enable = btnSwitch.IsSelected;
+                //灞曞紑鎴栬�呯缉灏忕殑楂樺害
                 var value = Application.GetRealHeight(443);
                 if (btnSwitch.IsSelected == true)
                 {
-                    frameBack.Height += value;
+                    frameBack.Height += value;
                 }
                 else
                 {
-                    frameBack.Height -= value;
+                    frameBack.Height -= value;
                 }
-                //瀹瑰櫒琛ュ厖
+                //瀹瑰櫒琛ュ厖
                 this.FinishInitControl(listview, energyModeInfo.enable);
             };
             if (energyModeInfo.enable == true)
@@ -467,21 +485,21 @@
                 //灞曞紑鎴栬�呯缉灏忕殑楂樺害
                 var value = Application.GetRealHeight(443);
                 frameBack.Height += value;
-            }
-            //娣诲姞鎺ヨ繎鎰熷簲
-            this.AddProximitySensorsRow(frameBack);
-        }
-
+            }
+            //娣诲姞鎺ヨ繎鎰熷簲
+            this.AddProximitySensorsRow(frameBack);
+        }
+
         #endregion
-
+
         #region 鈻� 鎺ヨ繎鎰熷簲___________________________
-
+
         /// <summary>
         /// 鎺ヨ繎鎰熷簲琛�
         /// </summary>
         private void AddProximitySensorsRow(FrameRowControl frameRowControl)
-        {
-            //鎺ヨ繎鎰熷簲琛�
+        {
+            //鎺ヨ繎鎰熷簲琛�
             var frameBack = new FrameRowControl();
             frameBack.BackgroundColor = UserCenterColor.Current.White;
             frameBack.UseClickStatu = false;
@@ -492,18 +510,18 @@
             //鎺ヨ繎鎰熷簲
             frameBack.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.ProximitySensors), 400);
             //寮�鍏虫帶浠�
-            var btnSwitch = frameBack.AddMostRightSwitchIcon();
-
-            btnSwitch.ButtonClickEvent += (sender, e) =>
-            {
-                btnSwitch.IsSelected = !btnSwitch.IsSelected;
-                proximitySensorsInfo.enable = btnSwitch.IsSelected;
-            };
+            var btnSwitch = frameBack.AddMostRightSwitchIcon();
+
+            btnSwitch.ButtonClickEvent += (sender, e) =>
+            {
+                btnSwitch.IsSelected = !btnSwitch.IsSelected;
+                proximitySensorsInfo.enable = btnSwitch.IsSelected;
+            };
             if (proximitySensorsInfo.enable == true)
             {
                 btnSwitch.IsSelected = true;
-            }
-        }
+            }
+        }
         #endregion
 
         #region 鈻� 鑾峰彇鍒濆鏁版嵁_______________________
@@ -565,30 +583,30 @@
             this.ShowProgressBar();
 
             //鑺傝兘妯″紡淇敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�)
-            //璁惧鍚屼簨璇撮粯璁ゅ幓1绉掓椂闂达紝杩欐牱鎺ヨ繎鎰熷簲鍔熻兘鎵嶅悎鐞�
-            energyModeInfo.time = 1;
+            //璁惧鍚屼簨璇存柊椋庨潰鏉块粯璁�60绉掓椂闂达紝杩欐牱鎺ヨ繎鎰熷簲鍔熻兘鎵嶅悎鐞�
+            energyModeInfo.time = 60;
             var result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(panelDevice, energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
             if (result == false)
             {
                 this.CloseProgressBar();
                 return;
             }
-            //鎺ヨ繎鎰熷簲(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�)
+            //鎺ヨ繎鎰熷簲(鎻愪緵璁惧鐨勫悓浜嬭闅忎究涓�涓洖璺氨琛�)
             result = await HdlDevicePanelLogic.Current.SetProximitySensorStatus(panelDevice, proximitySensorsInfo.enable);
             if (result == false)
             {
                 this.CloseProgressBar();
                 return;
             }
-
-            //浜害璋冭妭鏇存敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�)
-            result = await HdlDevicePanelLogic.Current.SetDeviceLightSettion(panelDevice, linghtLevelInfo.panelDirectionsLevel, linghtLevelInfo.panelBacklightLevel);
-            if (result == false)
-            {
-                this.CloseProgressBar();
-                return;
-            }
-
+
+            //浜害璋冭妭鏇存敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�)
+            result = await HdlDevicePanelLogic.Current.SetDeviceLightSettion(panelDevice, linghtLevelInfo.panelDirectionsLevel, linghtLevelInfo.panelBacklightLevel);
+            if (result == false)
+            {
+                this.CloseProgressBar();
+                return;
+            }
+
             //璁剧疆鎸夐敭闈㈡澘鎸囧畾绔偣鐨勩�愭寚绀虹伅寮�鍏抽鑹层�戠殑淇℃伅
             //result = await HdlDevicePanelLogic.Current.SetPanelEpointColorInfo(panelDevice, this.keyColorData);
             //this.CloseProgressBar();
@@ -643,4 +661,4 @@
 
         #endregion
     }
-}
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
index 6e119bd..51837e9 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
@@ -1,4 +1,7 @@
 锘縰sing System;
+using System.Collections.Generic;
+using Shared.Common;
+using ZigBee.Common;
 using ZigBee.Device;
 
 namespace Shared.Phone.UserCenter.DevicePanel
@@ -18,8 +21,25 @@
         /// 璁惧鐨勬煇涓�鍥炶矾
         /// </summary>
         private CommonDevice deviceObj = null;
+        /// <summary>
+        /// 鏂伴鐩爣鍚嶅瓧
+        /// </summary>
+        private string bindFreshAirName = string.Empty;
+        /// <summary>
+        /// 娓╁害鐩爣鍚嶅瓧
+        /// </summary>
+        private string bindTemperatureName = string.Empty;
+        /// <summary>
+        /// 婀垮害鐩爣鍚嶅瓧
+        /// </summary>
+        private string bindHumidityName = string.Empty;
+        /// <summary>
+        /// PM鐩爣鍚嶅瓧
+        /// </summary>
+        private string bindPmName = string.Empty;
 
         #endregion
+
         #region 鈻� 鍒濆鍖朹____________________________
 
         /// <summary>
@@ -29,6 +49,8 @@
         public void ShowForm(CommonDevice i_device)
         {
             this.deviceObj = i_device;
+            //鑾峰彇鏁版嵁
+            ReadDoorLockUserInfo(deviceObj);
 
             //璁剧疆澶撮儴淇℃伅
             base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uPanelSettion));
@@ -90,15 +112,55 @@
             //娣诲姞鏂伴鐩爣
             this.AddFreshAirRow();
             //PM2.5鏉ユ簮
-            //this.AddPMRow();
+            this.AddPMRow();
             //娣诲姞娓╁害鏉ユ簮
-            //this.AddTemperatureSensorRow();
+            this.AddTemperatureSensorRow();
             //娣诲姞婀垮害鏉ユ簮
-            //this.AddHumiditySourceRow();
-            //娣诲姞鏂伴鐩爣
-            //this.AddPMRow();
+            this.AddHumiditySourceRow();
             //浜害璋冭妭
             this.AddLevelRow();
+        }
+        #endregion
+
+        #region 鈻� 鍒濆鍖栨暟鎹甠________________________ 
+
+        /// <summary>
+        /// 鍒濆鍖栨暟鎹�
+        /// </summary>
+        void ReadDoorLockUserInfo(CommonDevice curControlDev)
+        {
+            System.Threading.Tasks.Task.Run(async () =>
+            {
+                try
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        CommonPage.Loading.Start("");
+                    });
+
+                    var result = await GetBindName(curControlDev);
+                    if (!result)
+                    {
+
+                        Application.RunOnMainThread(() =>
+                        {
+                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
+                        });
+                    }
+                }
+                catch (Exception ex)
+                {
+                    var mess = ex.Message;
+                }
+                finally
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        this.InitMenuRow();
+                        CommonPage.Loading.Hide();
+                    });
+                }
+            });
         }
         #endregion
 
@@ -116,20 +178,88 @@
             rowNewWind.AddBottomLine();
             //鍙崇澶�
             rowNewWind.AddRightArrow();
+
             var msg = Language.StringByID(R.MyInternationalizationString.nothing);
-            // 鍥炶皟鏂伴缁戝畾鐩爣
+            if (!string.IsNullOrEmpty(bindFreshAirName))
+            {
+                msg = bindFreshAirName;
+            }
             var btnNewWindStatu = rowNewWind.AddMostRightView(msg, 700);
+
             rowNewWind.ButtonClickEvent += (sender, e) =>
             {
-                //var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, 1);
-                //Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
-                //Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
-                //addDevicePage.Show();
-                var form = new PanelFangyueFreshAirTargetForm();
-                form.AddForm(this.deviceObj, string.Empty, 3);
+                var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, 1);
+                Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
+                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+                addDevicePage.Show();
+
+                addDevicePage.actionFreshAirTarget += (bindName) =>
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        if (string.IsNullOrEmpty(bindName))
+                        {
+                            btnNewWindStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
+                        }
+                        else
+                        {
+                            btnNewWindStatu.Text = bindName;
+                        }
+                    });
+                };
+
+                //var form = new PanelFangyueFreshAirTargetForm();
+                //form.AddForm(this.deviceObj, string.Empty, 3);
             };
         }
         #endregion
+
+        /// <summary>
+        /// 鑾峰彇缁戝畾鐩爣
+        /// </summary>
+        /// <param name="curControlDev"></param>
+        /// <returns></returns>
+        private async System.Threading.Tasks.Task<bool> GetBindName(CommonDevice curDev)
+        {
+            bool result = false;
+            //鑾峰彇闈㈡澘涓瓨鍦ㄧ殑缁戝畾鐩爣
+            FreshAir curControlDev = curDev as FreshAir;
+            var panelBindListRes = await curControlDev.GetDeviceBindAsync();
+            if (panelBindListRes != null && panelBindListRes.getAllBindResponseData != null)
+            {
+                foreach (var bDev in panelBindListRes.getAllBindResponseData.BindList)
+                {
+                    curControlDev.bindList.Add(bDev);
+                    var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
+
+                    if (device.Type == DeviceType.FreshAir)
+                    {
+                        //鑾峰彇璁惧绫诲瀷鐨�
+                        var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+                        //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
+                        if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+                        {
+                            continue;
+                        }
+                        bindFreshAirName = device.DeviceEpointName;
+                    }
+                    if (device.Type == DeviceType.TemperatureSensor)
+                    {
+                        bindTemperatureName = device.DeviceEpointName;
+                    }
+                    if (device.Type == DeviceType.FreshAirHumiditySensor)
+                    {
+                        bindHumidityName = device.DeviceEpointName;
+                    }
+                    //if (device.Type == DeviceType.FreshAir)
+                    //{
+                    //    bindPmName  = device.DeviceEpointName;
+                    //}
+                }
+                result = true;
+            }
+            return result;
+        }
 
         #region 鈻� PM2.5鏉ユ簮_________________________ 
         /// <summary>
@@ -138,22 +268,40 @@
         private void AddPMRow()
         {
             //PM2.5
-            var rowNewWind = new FrameRowControl(listview.rowSpace / 2);
-            listview.AddChidren(rowNewWind);
-            rowNewWind.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.PM25Source), 600);
+            var rowPM = new FrameRowControl(listview.rowSpace / 2);
+            listview.AddChidren(rowPM);
+            rowPM.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.PM25Source), 600);
             //搴曠嚎
-            rowNewWind.AddBottomLine();
+            rowPM.AddBottomLine();
             //鍙崇澶�
-            rowNewWind.AddRightArrow();
+            rowPM.AddRightArrow();
             var msg = Language.StringByID(R.MyInternationalizationString.nothing);
-            // 鍥炶皟PM2.5鏉ユ簮缁戝畾鐩爣
-            var btnNewWindStatu = rowNewWind.AddMostRightView(msg, 700);
-            rowNewWind.ButtonClickEvent += (sender, e) =>
+            if (!string.IsNullOrEmpty(bindPmName))
+            {
+                msg = bindPmName;
+            }
+            var btnPMStatu = rowPM.AddMostRightView(msg, 700);
+            rowPM.ButtonClickEvent += (sender, e) =>
             {
                 var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, 4);
                 Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
                 Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                 addDevicePage.Show();
+
+                addDevicePage.actionPMTarget += (bindName) =>
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        if (string.IsNullOrEmpty(bindName))
+                        {
+                            btnPMStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
+                        }
+                        else
+                        {
+                            btnPMStatu.Text = bindName;
+                        }
+                    });
+                };
             };
         }
         #endregion
@@ -165,22 +313,40 @@
         private void AddTemperatureSensorRow()
         {
             //娓╁害鏉ユ簮
-            var rowNewWind = new FrameRowControl(listview.rowSpace / 2);
-            listview.AddChidren(rowNewWind);
-            rowNewWind.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.TemperatureSource), 600);
+            var rowTemPerature = new FrameRowControl(listview.rowSpace / 2);
+            listview.AddChidren(rowTemPerature);
+            rowTemPerature.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.TemperatureSource), 600);
             //搴曠嚎
-            rowNewWind.AddBottomLine();
+            rowTemPerature.AddBottomLine();
             //鍙崇澶�
-            rowNewWind.AddRightArrow();
+            rowTemPerature.AddRightArrow();
             var msg = Language.StringByID(R.MyInternationalizationString.nothing);
-            // 鍥炶皟娓╁害鏉ユ簮缁戝畾鐩爣
-            var btnNewWindStatu = rowNewWind.AddMostRightView(msg, 700);
-            rowNewWind.ButtonClickEvent += (sender, e) =>
+            if (!string.IsNullOrEmpty(bindTemperatureName))
+            {
+                msg = bindTemperatureName;
+            }
+            var btnTemperatureStatu = rowTemPerature.AddMostRightView(msg, 700);
+            rowTemPerature.ButtonClickEvent += (sender, e) =>
             {
                 var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, 2);
                 Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
                 Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                 addDevicePage.Show();
+
+                addDevicePage.actionTemperatureTarget += (bindName) =>
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        if (string.IsNullOrEmpty(bindName))
+                        {
+                            btnTemperatureStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
+                        }
+                        else
+                        {
+                            btnTemperatureStatu.Text = bindName;
+                        }
+                    });
+                };
             };
         }
         #endregion
@@ -192,22 +358,40 @@
         private void AddHumiditySourceRow()
         {
             //婀垮害
-            var rowNewWind = new FrameRowControl(listview.rowSpace / 2);
-            listview.AddChidren(rowNewWind);
-            rowNewWind.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.HumiditySource), 600);
+            var rowHumidity = new FrameRowControl(listview.rowSpace / 2);
+            listview.AddChidren(rowHumidity);
+            rowHumidity.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.HumiditySource), 600);
             //搴曠嚎
-            rowNewWind.AddBottomLine();
+            rowHumidity.AddBottomLine();
             //鍙崇澶�
-            rowNewWind.AddRightArrow();
+            rowHumidity.AddRightArrow();
             var msg = Language.StringByID(R.MyInternationalizationString.nothing);
-            // 鍥炶皟婀垮害鏉ユ簮缁戝畾鐩爣
-            var btnNewWindStatu = rowNewWind.AddMostRightView(msg, 700);
-            rowNewWind.ButtonClickEvent += (sender, e) =>
+            if (!string.IsNullOrEmpty(bindHumidityName))
+            {
+                msg = bindHumidityName;
+            }
+            var btnHumidityStatu = rowHumidity.AddMostRightView(msg, 700);
+            rowHumidity.ButtonClickEvent += (sender, e) =>
             {
                 var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, 3);
                 Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
                 Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                 addDevicePage.Show();
+
+                addDevicePage.actionHumidityTarget += (bindName) =>
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        if (string.IsNullOrEmpty(bindName))
+                        {
+                            btnHumidityStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
+                        }
+                        else
+                        {
+                            btnHumidityStatu.Text = bindName;
+                        }
+                    });
+                };
             };
         }
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs
index 64b9ea0..4a06c6c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs
@@ -6,8 +6,7 @@
 {
     public class PanelFangyueFreshAirTargetForm : EditorCommonForm
     {
-        #region 鈻� 鍙橀噺澹版槑___________________________
-
+        #region 鈻� 鍙橀噺澹版槑___________________________ 
         /// <summary>
         /// 鍒楄〃鎺т欢
         /// </summary>
@@ -309,8 +308,6 @@
                         this.dicShowDevice[room.Id].Add(device);
                     }
                 }
-
-
             }
             return canShow;
         }
@@ -321,7 +318,6 @@
 
             return canShow;
         }
-
         #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs
index e2765e4..b7a80c6 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs
@@ -62,10 +62,6 @@
         /// </summary>
         List<Room> supportRoomList = new List<Room>();
         /// <summary>
-        /// 褰撶粦瀹氳〃鍙樺寲鍚庣殑鍥炶皟
-        /// </summary>
-        public Action<List<BindListResponseObj>> action;
-        /// <summary>
         /// 淇濆瓨瀹屾垚鎸夐挳
         /// </summary>
         Button btnFinifh;
@@ -92,19 +88,19 @@
         /// <summary>
         /// 鏂伴缁戝畾鐩爣鍥炶皟
         /// </summary>
-        Action actionFreshAirTarget = null;
+        public Action<string> actionFreshAirTarget = null;
         /// <summary>
         /// 娓╁害缁戝畾鐩爣鍥炶皟
         /// </summary>
-        Action actionTemperatureTarget = null;
+        public Action<string> actionTemperatureTarget = null;
         /// <summary>
         /// 婀垮害缁戝畾鐩爣鍥炶皟
         /// </summary>
-        Action actionHumidityTarget = null;
+        public Action<string> actionHumidityTarget = null;
         /// <summary>
         /// PM缁戝畾鐩爣鍥炶皟
         /// </summary>
-        Action actionPMTarget = null;
+        public Action<string> actionPMTarget = null;
         #endregion
 
         #region UI璁捐 
@@ -135,7 +131,7 @@
             {
                 RemoveFromParent();
             };
-            this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 200 - 58);
+            this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 300);
             this.btnBack.MouseUpEventHandler += eHandlerBack;
             this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
             this.MidFrameLayout(this);
@@ -156,14 +152,13 @@
         {
             var btnAddFrameLayout = new FrameLayout
             {
-                X = Application.GetRealWidth(830),
+                X = Application.GetRealWidth(619),
             };
             this.titleFrameLayout.AddChidren(btnAddFrameLayout);
 
             btnFloorText = new Button
             {
-                Width = Application.GetRealWidth(110),
-                X = Application.GetRealWidth(15),
+                Width = Application.GetRealWidth(300 - 69 - 58),
                 Text = Language.StringByID(R.MyInternationalizationString.FirstFloor),
                 TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                 TextSize = 14,
@@ -172,26 +167,35 @@
             };
             btnAddFrameLayout.AddChidren(btnFloorText);
 
+            var btnBindDownFrameLayout = new FrameLayout
+            {
+                Width = Application.GetMinReal(69 + 58),
+                X = Application.GetRealWidth(300 - 69 - 58),
+            };
+            btnAddFrameLayout.AddChidren(btnBindDownFrameLayout);
+
             var btnBindDown = new Button
             {
                 Height = Application.GetMinReal(69),
                 Width = Application.GetMinReal(69),
-                X = Application.GetRealWidth(200 - 77),
                 UnSelectedImagePath = "BindPic/BindDown.png",
                 Gravity = Gravity.CenterVertical,
             };
-            btnAddFrameLayout.AddChidren(btnBindDown);
-            btnBindDown.MouseDownEventHandler += (sender, e) =>
+            btnBindDownFrameLayout.AddChidren(btnBindDown);
+
+            EventHandler<MouseEventArgs> eHandlerBindDown = (sender, e) =>
             {
                 SideslipFramelayout();
             };
+            btnBindDown.MouseDownEventHandler += eHandlerBindDown;
+            btnBindDownFrameLayout.MouseDownEventHandler += eHandlerBindDown;
             if (Common.Config.Instance.Home.FloorDics.Count == 0)
             {
                 btnAddFrameLayout.Width = 0;
             }
             else
             {
-                btnAddFrameLayout.Width = Application.GetRealWidth(200);
+                btnAddFrameLayout.Width = Application.GetRealWidth(300);
             }
         }
 
@@ -220,6 +224,11 @@
                 Height = Application.GetRealHeight(1145),
             };
             this.midFrameLayout.AddChidren(midVerticalScrolViewLayout);
+            midVerticalScrolViewLayout.BeginHeaderRefreshingAction += () =>
+            {
+                midVerticalScrolViewLayout.BeginHeaderRefreshing();
+                InitData();
+            };
 
             //搴曢儴淇濆瓨鏍�
             var bottomFrameLayout = new FrameLayout()
@@ -253,8 +262,9 @@
         /// </summary>
         /// <param name="gateway">Gateway.</param>
         /// <param name="key">Key.</param>
-        void RefreshRoomList(Room curRoom, ref int index2)
+        void RefreshRoomList()
         {
+            Room curRoom = null;
             if (supportRoomList.Count == 0)
             {
                 return;
@@ -263,7 +273,7 @@
             Button curentOldRoom = null;
             FrameLayout curentOldRoomFrameLayout = null;
             int index = 0;
-            var roomTempList = GetSupportRoomList(curRoom);
+            var roomTempList = GetSupportRoomList();
             for (int i = 0; i < roomTempList.Count; i++)
             {
                 var room = roomTempList[i];
@@ -302,7 +312,6 @@
                 }
                 EventHandler<MouseEventArgs> eHandlerRoom = (sender, e) =>
                 {
-                    //ChangeRoom(curRoom, room, btnRoom, curentOldRoom, btnRoomFrameLayout, curentOldRoomFrameLayout);
                     if (!btnRoom.IsSelected)
                     {
                         if (curentOldRoom != null)
@@ -327,26 +336,11 @@
                     }
                     curRoom = room;
                     curControlDev.RoomId = room.Id;
-                    if (curRoom.ListSceneId.Count == 0)
-                    {
-                        btnFinifh.Enable = false;
-                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
-                    }
-                    else
-                    {
-                        btnFinifh.Enable = true;
-                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-                    }
-                    if (targetList.Count == 0)
-                    {
-                        btnFinifh.Enable = false;
-                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
-                    }
-                    else
-                    {
-                        btnFinifh.Enable = true;
-                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-                    }
+
+                    //鏂伴闈㈡澘淇濆瓨浣胯兘
+                    btnFinifh.Enable = true;
+                    btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+
                     RefreshDeviceList(curRoom);
                 };
                 btnRoom.MouseUpEventHandler += eHandlerRoom;
@@ -354,6 +348,17 @@
                 index++;
             }
             BindInfo.FinishDisplay(roomTempList, btnFinifh);
+
+            if (roomTempList.Count != 0)
+            {
+                curRoom = roomTempList[0];
+            }
+            else
+            {
+                curRoom = new Shared.Common.Room();
+            }
+
+            RefreshDeviceList(curRoom);
         }
 
         /// <summary>
@@ -425,7 +430,7 @@
                 };
                 rowLayout.AddChidren(line2);
 
-                if (curIndex == currentPanelSupportBindDeviceList.Count - 1)
+                if (curIndex == currentRoomSupportBindDeviceList.Count - 1)
                 {
                     line2.Visible = false;
                 }
@@ -435,23 +440,6 @@
                 string mianKey = device.DeviceAddr + device.DeviceEpoint;
                 if (targetList.Count != 0)
                 {
-                    //    if(curControlDev!=null)
-                    //    {
-                    //        foreach (var bindedSc in curControlDev.bindList)
-                    //        {
-                    //            if (bindedSc.BindMacAddr + bindedSc.BindEpoint == mianKey)
-                    //            {
-                    //                btnChoose.IsSelected = true;
-                    //                btnChoose.Visible = true;
-                    //                oldDevice = btnChoose;
-                    //                targetList.Add(device);
-                    //            }
-                    //        }
-                    //    }
-
-                    //}
-                    //else
-                    //{
                     foreach (var bindedDev in targetList)
                     {
                         if (bindedDev.DeviceAddr + bindedDev.DeviceEpoint == mianKey)
@@ -465,17 +453,20 @@
 
                 EventHandler<MouseEventArgs> hander = (sender, e) =>
                {
-                   //ChangeTarget(device, btnChoose, oldDevice);
-                   if (curControlDev.bindList.Count != 0)
-                   {
-                       if (btnChoose.IsSelected)
-                       {
-                           new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindExist), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
-                           return;
-                       }
-                   }
-
+                   btnChoose.IsSelected = !btnChoose.IsSelected;
                    if (!btnChoose.IsSelected)
+                   {
+                       if (oldDevice != null)
+                       {
+                           oldDevice.IsSelected = false;
+                           oldDevice.Visible = false;
+                       }
+                       oldDevice = btnChoose;
+                       oldDevice.IsSelected = false;
+                       oldDevice.Visible = false;
+                       targetList.Clear();
+                   }
+                   else
                    {
                        if (oldDevice != null)
                        {
@@ -488,33 +479,16 @@
                        targetList.Clear();
                        targetList.Add(device);
                    }
-                   if (targetList.Count == 0)
-                   {
-                       btnFinifh.Enable = false;
-                       btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
-                   }
-                   else
-                   {
-                       btnFinifh.Enable = true;
-                       btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-                   }
+
+                   //鏂伴闈㈡澘锛氱敱浜庣洰鏍囨病鏈夋彁渚涘垹闄ゆ帴鍙o紝鎵�浠ュ彲浠ュ彇娑堥�変腑鑳戒繚瀛�
+                   btnFinifh.Enable = true;
+                   btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                };
                 rowLayout.MouseUpEventHandler += hander;
                 devicePic.MouseUpEventHandler += hander;
                 btnBindName.MouseUpEventHandler += hander;
                 btnChoose.MouseUpEventHandler += hander;
                 curIndex++;
-            }
-
-            if (targetList.Count == 0)
-            {
-                btnFinifh.Enable = false;
-                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
-            }
-            else
-            {
-                btnFinifh.Enable = true;
-                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
             }
         }
 
@@ -537,7 +511,6 @@
 
             var sidelipFrameLayout = new FrameLayout()
             {
-                Height = Application.GetMinReal(783),
                 Width = Application.GetMinReal(449),
                 Y = Application.GetRealHeight(161),
                 X = Application.GetRealWidth(596),
@@ -561,18 +534,19 @@
 
             var sidelipVerticalScrolViewLayout = new VerticalScrolViewLayout()
             {
+                Y = btnSelectFloor.Bottom + Application.GetRealHeight(45),
                 Height = Application.GetRealHeight(600),
-                Y = btnSelectFloor.Bottom,
             };
             sidelipFrameLayout.AddChidren(sidelipVerticalScrolViewLayout);
 
             Button oldbutton = null;
             Button oldbuttonText = null;
+            int count = 0;
             foreach (var floorId in dicFloorList.Keys)
             {
                 var rowFrameLayout = new RowLayout()
                 {
-                    Height = Application.GetRealHeight(150),
+                    Height = Application.GetRealHeight(152),
                     LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
                     X = Application.GetRealWidth(81),
                 };
@@ -582,9 +556,9 @@
                 {
                     Width = Application.GetMinReal(81),
                     Height = Application.GetMinReal(81),
-                    Y = Application.GetRealHeight(55),
                     UnSelectedImagePath = "Floor/Floor.png",
                     SelectedImagePath = "Floor/FloorSelected.png",
+                    Gravity = Gravity.CenterVertical,
                 };
                 rowFrameLayout.AddChidren(btnAllMethod);
 
@@ -593,7 +567,7 @@
                     Width = Application.GetRealWidth(311),
                     Height = Application.GetRealHeight(58),
                     X = Application.GetRealWidth(92),
-                    Y = Application.GetRealHeight(69),
+                    Gravity = Gravity.CenterVertical,
                     TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                     TextSize = 14,
                     TextAlignment = TextAlignment.CenterLeft,
@@ -608,36 +582,18 @@
                     btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                 }
 
+                string curFloorId = floorId;
                 EventHandler<MouseEventArgs> hander = (sender, e) =>
                 {
-                    //ChangeFloor(dialog, floorId, btnMethodText, oldbuttonText, oldbutton);
-                    var curFloorId = floorId;
-                    curControlDev.currentSelectFloorId = curFloorId;
-                    btnFloorText.Text = dicFloorList[curFloorId];
                     if (curControlDev.currentSelectFloorId == curFloorId)
                     {
                         return;
                     }
                     curControlDev.currentSelectFloorId = curFloorId;
-                    btnFloorText.Text = dicFloorList[curFloorId];
+                    btnFloorText.Text = dicFloorList[floorId];
 
                     //鑾峰彇妤煎眰涓埧闂村垪琛� 
                     supportRoomList = GetFloorRoomList();
-                    if (supportRoomList.Count == 0)
-                    {
-                        return;
-                    }
-                    var curRoom = new Room();
-                    if (supportRoomList.Count != 0)
-                    {
-                        curRoom = supportRoomList[0];
-                    }
-                    else
-                    {
-                        curRoom = new Shared.Common.Room();
-                        supportRoomList.Add(curRoom);
-                    }
-
                     if (!btnMethodText.IsSelected)
                     {
                         if (oldbutton != null)
@@ -656,23 +612,26 @@
                     }
 
                     int index = 0;
-                    RefreshRoomList(curRoom, ref index);
-
-                    if (targetList.Count == 0)
-                    {
-                        btnFinifh.Enable = false;
-                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
-                    }
-                    else
-                    {
-                        btnFinifh.Enable = true;
-                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-                    }
+                    RefreshRoomList();
                     dialog.Close();
                 };
                 btnAllMethod.MouseUpEventHandler += hander;
                 rowFrameLayout.MouseUpEventHandler += hander;
                 btnMethodText.MouseUpEventHandler += hander;
+                count++;
+            }
+
+            if (count == 0)
+            {
+                sidelipFrameLayout.Height = 0;
+            }
+            else if (count <= 4 && count > 0)
+            {
+                sidelipFrameLayout.Height = Application.GetRealHeight(180) + count * Application.GetRealHeight(150);
+            }
+            else
+            {
+                sidelipFrameLayout.Height = Application.GetMinReal(780);
             }
         }
         #endregion
@@ -697,8 +656,10 @@
                     curControlDev.currentSelectFloorId = BindInfo.GetCurrentSelectFloorId();
                     if (BindInfo.GetCurrentSelectFloorIdName() != null)
                     {
-                        btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
-
+                        Application.RunOnMainThread(() =>
+                        {
+                            btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
+                        });
                     }
 
                     //鑾峰彇妤煎眰涓埧闂村垪琛�
@@ -743,215 +704,76 @@
                                 var device = LocalDevice.Current.GetDevice(bindDev.DeviceAddr, bindDev.DeviceEpoint);
                                 if (device != null)
                                 {
-                                    //鑾峰彇璁惧绫诲瀷鐨�
-                                    var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
-                                    //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
-                                    if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+                                    switch (curDeviceBindType)
                                     {
-                                        continue;
+                                        case 1:
+                                            //鑾峰彇璁惧绫诲瀷鐨�
+                                            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+                                            //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
+                                            if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+                                            {
+                                                continue;
+                                            }
+                                            if (device.Type == DeviceType.FreshAir)
+                                            {
+                                                targetList.Add(device);
+                                                oldTargetList.Add(device);
+                                            }
+                                            break;
+                                        case 2:
+                                            if (device.Type == DeviceType.TemperatureSensor)
+                                            {
+                                                targetList.Add(device);
+                                                oldTargetList.Add(device);
+                                            }
+                                            break;
+                                        case 3:
+                                            if (device.Type == DeviceType.FreshAirHumiditySensor)
+                                            {
+                                                targetList.Add(device);
+                                                oldTargetList.Add(device);
+                                            }
+                                            break;
+                                        case 4:
+                                            //PM2.5
+                                            break;
                                     }
-                                    if (device.Type == DeviceType.FreshAir)
-                                    {
-                                        targetList.Add(device);
-                                        oldTargetList.Add(device);
-                                    }
-                                }
 
+                                }
                             }
                         }
                     }
                 }
-                catch { }
+                catch (Exception ex)
+                {
+                    var mess = ex.Message;
+                }
                 finally
                 {
                     Application.RunOnMainThread(() =>
                     {
                         if (supportRoomList.Count != 0)
                         {
-                            Shared.Common.Room curRoom = supportRoomList[0];
-                            int index = 0;
-                            RefreshRoomList(curRoom, ref index);
-                            RefreshDeviceList(curRoom);
-
-                            if (curRoom.ListDevice.Count == 0 || targetList.Count == 0)
-                            {
-                                btnFinifh.Enable = false;
-                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
-                            }
-                            else
-                            {
-                                btnFinifh.Enable = true;
-                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-                            }
+                            RefreshRoomList();
                         }
+
+                        //棣栨鏄惁鑳界偣鍑讳繚瀛�
+                        if (targetList.Count == 0)
+                        {
+                            btnFinifh.Enable = false;
+                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
+                        }
+                        else
+                        {
+                            btnFinifh.Enable = true;
+                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+                        }
+
                         CommonPage.Loading.Hide();
+                        midVerticalScrolViewLayout.EndHeaderRefreshing();
                     });
                 }
             });
-        }
-
-        /// <summary>
-        /// 鍒囨崲妤煎眰
-        /// </summary>
-        /// <param name="dialog"></param>
-        /// <param name="curFloorId"></param>
-        /// <param name="btnMethodText"></param>
-        /// <param name="oldbuttonText"></param>
-        /// <param name="oldbutton"></param>
-        void ChangeFloor(Dialog dialog, string curFloorId, Button btnMethodText, Button oldbuttonText, Button oldbutton)
-        {
-            if (curControlDev.currentSelectFloorId == curFloorId)
-            {
-                return;
-            }
-            curControlDev.currentSelectFloorId = curFloorId;
-            btnFloorText.Text = dicFloorList[curFloorId];
-
-            //鑾峰彇妤煎眰涓埧闂村垪琛� 
-            supportRoomList = GetFloorRoomList();
-            if (supportRoomList.Count == 0)
-            {
-                return;
-            }
-            var curRoom = new Room();
-            if (supportRoomList.Count != 0)
-            {
-                curRoom = supportRoomList[0];
-            }
-            else
-            {
-                curRoom = new Shared.Common.Room();
-                supportRoomList.Add(curRoom);
-            }
-
-            if (!btnMethodText.IsSelected)
-            {
-                if (oldbutton != null)
-                {
-                    oldbutton.IsSelected = false;
-                }
-                if (oldbuttonText != null)
-                {
-                    oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3;
-                }
-                oldbutton = btnMethodText;
-                oldbuttonText = btnMethodText;
-                btnMethodText.IsSelected = true;
-                oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-                oldbuttonText.IsBold = true;
-            }
-
-            int index = 0;
-            RefreshRoomList(curRoom, ref index);
-
-            if (targetList.Count == 0)
-            {
-                btnFinifh.Enable = false;
-                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
-            }
-            else
-            {
-                btnFinifh.Enable = true;
-                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-            }
-            dialog.Close();
-        }
-
-        /// <summary>
-        /// 鍒囨崲鎴块棿
-        /// </summary>
-        /// <param name="curRoom"></param>
-        /// <param name="room"></param>
-        /// <param name="btnRoom"></param>
-        /// <param name="curentOldRoom"></param>
-        /// <param name="btnRoomFrameLayout"></param>
-        /// <param name="curentOldRoomFrameLayout"></param>
-        void ChangeRoom(Room curRoom, Room room, Button btnRoom, Button curentOldRoom, FrameLayout btnRoomFrameLayout, FrameLayout curentOldRoomFrameLayout)
-        {
-            if (!btnRoom.IsSelected)
-            {
-                if (curentOldRoom != null)
-                {
-                    curentOldRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3;
-                }
-                curentOldRoom = btnRoom;
-                curentOldRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMWhite;
-            }
-
-            if (btnRoomFrameLayout.BorderWidth == 1)
-            {
-                if (curentOldRoomFrameLayout != null)
-                {
-                    curentOldRoomFrameLayout.BorderWidth = 1;
-                    curentOldRoomFrameLayout.BorderColor = Shared.Common.ZigbeeColor.Current.XMOrange;
-                    curentOldRoomFrameLayout.BackgroundImagePath = "Item/RoomIconBackground.png";
-                }
-                curentOldRoomFrameLayout = btnRoomFrameLayout;
-                curentOldRoomFrameLayout.BorderWidth = 0;
-                curentOldRoomFrameLayout.BackgroundImagePath = "Item/RoomIconBackgroundSelected.png";
-            }
-            curRoom = room;
-            curControlDev.RoomId = room.Id;
-            if (curRoom.ListSceneId.Count == 0)
-            {
-                btnFinifh.Enable = false;
-                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
-            }
-            else
-            {
-                btnFinifh.Enable = true;
-                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-            }
-            if (targetList.Count == 0)
-            {
-                btnFinifh.Enable = false;
-                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
-            }
-            else
-            {
-                btnFinifh.Enable = true;
-                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-            }
-            RefreshDeviceList(curRoom);
-        }
-
-        /// <summary>
-        /// 鍒囨崲缁戝畾鐩爣
-        /// </summary>
-        void ChangeTarget(CommonDevice device, Button btnChoose, Button oldDevice)
-        {
-            if (curControlDev.bindList.Count != 0)
-            {
-                if (btnChoose.IsSelected)
-                {
-                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindExist), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
-                    return;
-                }
-            }
-
-            if (!btnChoose.IsSelected)
-            {
-                if (oldDevice != null)
-                {
-                    oldDevice.IsSelected = false;
-                    oldDevice.Visible = false;
-                }
-                oldDevice = btnChoose;
-                oldDevice.IsSelected = true;
-                oldDevice.Visible = true;
-                targetList.Clear();
-                targetList.Add(device);
-            }
-            if (targetList.Count == 0)
-            {
-                btnFinifh.Enable = false;
-                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
-            }
-            else
-            {
-                btnFinifh.Enable = true;
-                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-            }
         }
 
         /// <summary>
@@ -960,24 +782,127 @@
         /// <param name="curControlDev"></param>
         void SaveTarget()
         {
-            bool isFinish = false;
-
-            //绌虹洰鏍�
             if (targetList.Count == 0)
             {
-                Application.RunOnMainThread(() =>
+                //绌虹洰鏍�
+                System.Threading.Tasks.Task.Run(async () =>
                 {
-                    var myTip = new Tip();
-                    myTip.Direction = AMPopTipDirection.None;
-                    myTip.CloseTime = 2;
-                    myTip.Text = Language.StringByID(R.MyInternationalizationString.BindDeviceTargetIsEmpty);
-                    myTip.Show(Common.CommonPage.Instance);
+                    try
+                    {
+                        Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
+
+                        if (oldTargetList.Count != 0)
+                        {
+                            //鍒犻櫎鍙栨秷鐨勭洰鏍�
+                            foreach (var bd in oldTargetList)
+                            {
+                                var delDevice = new DelDeviceBindData();
+                                delDevice.DeviceAddr = curControlDev.DeviceAddr;
+                                delDevice.Epoint = curControlDev.DeviceEpoint;
+
+                                var removeDevice = new RemoveBindListObj();
+                                removeDevice.BindType = 0;
+                                switch (curDeviceBindType)
+                                {
+                                    case 1:
+                                        removeDevice.BindCluster = 514;
+                                        break;
+                                    case 2:
+                                        removeDevice.BindCluster = 1026;
+                                        break;
+                                    case 3:
+                                        removeDevice.BindCluster = 1029;
+                                        break;
+                                    case 4:
+                                        //PM2.5
+                                        break;
+                                }
+                                removeDevice.BindMacAddr = bd.DeviceAddr;
+                                removeDevice.BindEpoint = bd.DeviceEpoint;
+                                delDevice.RemoveBindList.Add(removeDevice);
+
+                                var delResult = new DelDeviceBindResponseAllData();
+                                delResult = await curControlDev.DelDeviceBindAsync(delDevice);
+                                if (delResult != null && delResult.removeBindResultResponseData != null)
+                                {
+                                    if (delResult.removeBindResultResponseData.Result == 0)
+                                    {
+                                        switch (curDeviceBindType)
+                                        {
+                                            case 1:
+                                                if (actionFreshAirTarget != null)
+                                                {
+                                                    actionFreshAirTarget("");
+                                                }
+                                                break;
+                                            case 2:
+                                                if (actionTemperatureTarget != null)
+                                                {
+                                                    actionTemperatureTarget("");
+                                                }
+                                                break;
+                                            case 3:
+                                                if (actionHumidityTarget != null)
+                                                {
+                                                    actionHumidityTarget("");
+                                                }
+                                                break;
+                                            case 4:
+                                                if (actionPMTarget != null)
+                                                {
+                                                    actionPMTarget("");
+                                                }
+                                                break;
+                                        }
+                                        Application.RunOnMainThread(() =>
+                                        {
+                                            CommonPage.Loading.Hide();
+                                            btnFinifh.Enable = true;
+                                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+                                            this.RemoveFromParent();
+                                        });
+                                    }
+                                    else
+                                    {
+                                        Application.RunOnMainThread(() =>
+                                        {
+                                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+                                            btnFinifh.Enable = true;
+                                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+                                            CommonPage.Loading.Hide();
+                                        });
+                                        return;
+                                    }
+                                }
+                            }
+                        }
+                        else
+                        {
+                            //娌℃湁鐩爣鎻愮ず
+                            Application.RunOnMainThread(() =>
+                            {
+                                var myTip = new Tip();
+                                myTip.Direction = AMPopTipDirection.None;
+                                myTip.CloseTime = 2;
+                                myTip.Text = Language.StringByID(R.MyInternationalizationString.BindDeviceTargetIsEmpty);
+                                myTip.Show(Common.CommonPage.Instance);
+                                btnFinifh.Enable = true;
+                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+                                CommonPage.Loading.Hide();
+                            });
+                            return;
+                        }
+                    }
+                    catch (Exception ex)
+                    {
+                        var mess = ex.Message;
+                    }
                 });
-                return;
             }
             else
             {
-                //宸茬粡缁戝畾杩囩殑鐩爣
+                //閫変腑鐩爣
+                //1銆佸凡缁忕粦瀹氳繃鐨勭洰鏍�
                 if (checkExistDevice())
                 {
                     Application.RunOnMainThread(() =>
@@ -987,6 +912,8 @@
                         myTip.CloseTime = 2;
                         myTip.Text = Language.StringByID(R.MyInternationalizationString.BindExist);
                         myTip.Show(Common.CommonPage.Instance);
+                        btnFinifh.Enable = true;
+                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                     });
                     return;
                 }
@@ -1002,23 +929,52 @@
                         {
                             foreach (var bd in oldTargetList)
                             {
-                                var res = await RemoveTargets(bd);
-                                if (res != 0)
-                                {
-                                    Application.RunOnMainThread(() =>
-                                    {
-                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
-                                        btnFinifh.Enable = true;
-                                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-                                        CommonPage.Loading.Hide();
-                                        return;
-                                    });
-                                }
+                                var delDevice = new DelDeviceBindData();
+                                delDevice.DeviceAddr = curControlDev.DeviceAddr;
+                                delDevice.Epoint = curControlDev.DeviceEpoint;
 
+                                var removeDevice = new RemoveBindListObj();
+                                removeDevice.BindType = 0;
+                                switch (curDeviceBindType)
+                                {
+                                    case 1:
+                                        removeDevice.BindCluster = 514;
+                                        break;
+                                    case 2:
+                                        removeDevice.BindCluster = 1026;
+                                        break;
+                                    case 3:
+                                        removeDevice.BindCluster = 1029;
+                                        break;
+                                    case 4:
+                                        //PM2.5
+                                        break;
+                                }
+                                removeDevice.BindMacAddr = bd.DeviceAddr;
+                                removeDevice.BindEpoint = bd.DeviceEpoint;
+                                delDevice.RemoveBindList.Add(removeDevice);
+
+                                var delResult = new DelDeviceBindResponseAllData();
+                                delResult = await curControlDev.DelDeviceBindAsync(delDevice);
+                                if (delResult != null && delResult.removeBindResultResponseData != null)
+                                {
+                                    if (delResult.removeBindResultResponseData.Result != 0)
+                                    {
+                                        Application.RunOnMainThread(() =>
+                                        {
+                                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+                                            btnFinifh.Enable = true;
+                                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+                                            CommonPage.Loading.Hide();
+                                        });
+                                        return;
+                                    }
+                                }
                             }
                         }
 
-                        //娣诲姞鏂扮殑鐩爣
+                        //2銆佹坊鍔犳柊鐨勭洰鏍�
+                        string bindName = "";
                         var addBindeDev = new AddBindData();
                         addBindeDev.DeviceAddr = curControlDev.DeviceAddr;
                         addBindeDev.Epoint = curControlDev.DeviceEpoint;
@@ -1036,25 +992,29 @@
                                 case 3:
                                     addBindInfo.BindCluster = 1029;
                                     break;
+                                case 4:
+                                    //PM2.5
+                                    break;
                             }
                             addBindInfo.BindType = 0;
                             addBindInfo.BindMacAddr = de.DeviceAddr;
                             addBindInfo.BindEpoint = de.DeviceEpoint;
                             addBindeDev.BindList.Add(addBindInfo);
+                            bindName = de.DeviceEpointName;
                         }
 
                         var dev = new AddedDeviceBindResponseAllData();
                         dev = await curControlDev.AddDeviceBindAsync(addBindeDev);
-                        if (dev != null || dev.addedDeviceBindResponseData == null)
+                        if (dev == null || dev.addedDeviceBindResponseData == null)
                         {
                             Application.RunOnMainThread(() =>
                             {
                                 CommonPage.Loading.Hide();
                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+                                btnFinifh.Enable = true;
+                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+                                return;
                             });
-                            btnFinifh.Enable = true;
-                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-                            return;
                         }
                         else
                         {
@@ -1062,24 +1022,41 @@
                             {
                                 curControlDev.bindList = dev.addedDeviceBindResponseData.BindList;
                                 targetList.Clear();
-                                isFinish = true;
-                                if (isFinish)
+
+                                switch (curDeviceBindType)
                                 {
-                                    if (action != null)
-                                    {
-                                        action(curControlDev.bindList);
-                                    }
-                                    this.RemoveFromParent();
+                                    case 1:
+                                        if (actionFreshAirTarget != null)
+                                        {
+                                            actionFreshAirTarget(bindName);
+                                        }
+                                        break;
+                                    case 2:
+                                        if (actionTemperatureTarget != null)
+                                        {
+                                            actionTemperatureTarget(bindName);
+                                        }
+                                        break;
+                                    case 3:
+                                        if (actionHumidityTarget != null)
+                                        {
+                                            actionHumidityTarget(bindName);
+                                        }
+                                        break;
+                                    case 4:
+                                        if (actionPMTarget != null)
+                                        {
+                                            actionPMTarget(bindName);
+                                        }
+                                        break;
                                 }
-                                else
-                                {
-                                    this.RemoveFromParent();
-                                }
+
                                 Application.RunOnMainThread(() =>
                                 {
                                     CommonPage.Loading.Hide();
                                     btnFinifh.Enable = true;
                                     btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+                                    this.RemoveFromParent();
                                 });
                             }
                             else if (dev.addedDeviceBindResponseData.Result == 1)
@@ -1118,68 +1095,12 @@
                             }
                         }
                     }
-                    catch
+                    catch (Exception ex)
                     {
+                        var mess = ex.Message;
                     }
                 });
             }
-        }
-
-        /// <summary>
-        /// 鍒犻櫎瀛樺湪鐨勭洰鏍�
-        /// </summary>
-        /// <param name="bindDevice"></param>
-        /// <param name="btnDel"></param>
-        /// <returns></returns>
-        private async System.Threading.Tasks.Task<int> RemoveTargets(CommonDevice delDev)
-        {
-            var delDevice = new DelDeviceBindData();
-            delDevice.DeviceAddr = curControlDev.DeviceAddr;
-            delDevice.Epoint = curControlDev.DeviceEpoint;
-
-            var removeDevice = new RemoveBindListObj();
-            removeDevice.BindType = 0;
-            switch (curDeviceBindType)
-            {
-                case 1:
-                    removeDevice.BindCluster = 514;
-                    break;
-                case 2:
-                    removeDevice.BindCluster = 1026;
-                    break;
-                case 3:
-                    removeDevice.BindCluster = 1029;
-                    break;
-            }
-            removeDevice.BindMacAddr = delDev.DeviceAddr;
-            removeDevice.BindEpoint = delDev.DeviceEpoint;
-            delDevice.RemoveBindList.Add(removeDevice);
-
-            try
-            {
-                CommonPage.Loading.Start("");
-                var delResult = new DelDeviceBindResponseAllData();
-                delResult = await curControlDev.DelDeviceBindAsync(delDevice);
-                if (delResult != null && delResult.delDeviceBindResponseData != null)
-                {
-                    if (delResult.delDeviceBindResponseData?.RemoveBindList != null)
-                    {
-                        foreach (var re in delResult.delDeviceBindResponseData.RemoveBindList)
-                        {
-                            if (re.Result == 0)
-                            {
-                                return 0;
-                            }
-                            {
-                                return -1;
-                            }
-                        }
-                    }
-                }
-            }
-            catch { }
-
-            return -1;
         }
 
         /// <summary>
@@ -1208,7 +1129,7 @@
         /// <summary>
         /// 鑳芥樉绀虹殑鎴块棿鍒楄〃
         /// </summary>
-        private List<Room> GetSupportRoomList(Room curRoom)
+        private List<Room> GetSupportRoomList()
         {
             var roomTempList = new List<Room>();
             for (int i = 0; i < supportRoomList.Count; i++)
@@ -1225,11 +1146,81 @@
                 {
                     continue;
                 }
-
-                roomTempList.Add(room);
-                if (roomTempList.Count != 0)
+                else
                 {
-                    curRoom = roomTempList[0];
+                    List<CommonDevice> roomIncludeMatchDevice = new List<CommonDevice>();
+
+                    //鎴块棿涓病鏈夊搴旂殑鏀寔缁戝畾鐨勭洰鏍�
+                    switch (curDeviceBindType)
+                    {
+                        case 1:
+                            foreach (var de in room.ListDevice)
+                            {
+                                var device = LocalDevice.Current.GetDevice(de);
+                                if (device != null)
+                                {
+                                    //鑾峰彇璁惧绫诲瀷鐨�
+                                    var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+                                    //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
+                                    if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+                                    {
+                                        continue;
+                                    }
+                                    if (device.Type == DeviceType.FreshAir)
+                                    {
+                                        roomIncludeMatchDevice.Add(device);
+                                    }
+                                }
+                            }
+                            break;
+                        case 2:
+                            foreach (var de in room.ListDevice)
+                            {
+                                var device = LocalDevice.Current.GetDevice(de);
+                                if (device != null)
+                                {
+                                    if (device.Type == DeviceType.TemperatureSensor)
+                                    {
+                                        roomIncludeMatchDevice.Add(device);
+                                    }
+                                }
+                            }
+                            break;
+                        case 3:
+                            foreach (var de in room.ListDevice)
+                            {
+                                var device = LocalDevice.Current.GetDevice(de);
+                                if (device != null)
+                                {
+                                    if (device.Type == DeviceType.FreshAirHumiditySensor)
+                                    {
+                                        roomIncludeMatchDevice.Add(device);
+                                    }
+                                }
+                            }
+                            break;
+                        case 4:
+                            break;
+                    }
+
+                    if (roomIncludeMatchDevice.Count == 0)
+                    {
+                        continue;
+                    }
+                }
+
+                if (!string.IsNullOrEmpty(room.FloorId))
+                {
+                    //鏈夋ゼ灞�
+                    if (room.FloorId == curControlDev.currentSelectFloorId)
+                    {
+                        roomTempList.Add(room);
+                    }
+                }
+                else
+                {
+                    //娌℃湁妤煎眰
+                    roomTempList.Add(room);
                 }
             }
             return roomTempList;
@@ -1261,24 +1252,21 @@
             }
             else
             {
-                // 鑾峰彇妤煎眰瀵瑰簲瀵规埧闂�
+                // 鑾峰彇鏀寔鐨勬埧闂�
                 foreach (var room in listAllRoom)
                 {
-                    if (room.FloorId == curControlDev.currentSelectFloorId)
+                    if (room.IsLove)
                     {
-                        if (room.IsLove)
-                        {
-                            continue;
-                        }
-                        supportRoomListTemp.Add(room);
+                        continue;
                     }
+                    supportRoomListTemp.Add(room);
                 }
             }
             return supportRoomListTemp;
         }
 
         /// <summary>
-        /// 鎴块棿涓尮閰嶇殑鏀寔缁戝畾鐨勬墍鏈夌洰鏍囧垪琛�
+        /// 鎵�鏈夋埧闂翠腑鍖归厤鐨勬敮鎸佺粦瀹氱殑鎵�鏈夌洰鏍囧垪琛�
         /// </summary>
         /// <returns></returns>
         List<CommonDevice> GetAllRoomSupportDeviceList()
@@ -1299,13 +1287,13 @@
                             var device = LocalDevice.Current.GetDevice(deviceKeys);
                             if (device != null)
                             {
-                                ////鑾峰彇璁惧绫诲瀷鐨�
-                                //var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
-                                ////鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
-                                //if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
-                                //{
-                                //    continue;
-                                //}
+                                //鑾峰彇璁惧绫诲瀷鐨�
+                                var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+                                //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
+                                if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+                                {
+                                    continue;
+                                }
                                 if (device.Type == DeviceType.FreshAir)
                                 {
                                     currentPanelBindSupportDeviceListTemp.Add(device);
@@ -1315,8 +1303,44 @@
                     }
                     break;
                 case 2:
+                    foreach (var r in supportRoomList)
+                    {
+                        if (r.ListDevice.Count == 0)
+                        {
+                            continue;
+                        }
+                        foreach (var deviceKeys in r.ListDevice)
+                        {
+                            var device = LocalDevice.Current.GetDevice(deviceKeys);
+                            if (device != null)
+                            {
+                                if (device.Type == DeviceType.TemperatureSensor)
+                                {
+                                    currentPanelBindSupportDeviceListTemp.Add(device);
+                                }
+                            }
+                        }
+                    }
                     break;
                 case 3:
+                    foreach (var r in supportRoomList)
+                    {
+                        if (r.ListDevice.Count == 0)
+                        {
+                            continue;
+                        }
+                        foreach (var deviceKeys in r.ListDevice)
+                        {
+                            var device = LocalDevice.Current.GetDevice(deviceKeys);
+                            if (device != null)
+                            {
+                                if (device.Type == DeviceType.FreshAirHumiditySensor)
+                                {
+                                    currentPanelBindSupportDeviceListTemp.Add(device);
+                                }
+                            }
+                        }
+                    }
                     break;
                 case 4:
                     break;
@@ -1337,16 +1361,16 @@
                 case 1:
                     foreach (var deviceKeys in curRoom.ListDevice)
                     {
-                        var device = LocalDevice.Current.GetDevice(deviceKeys);
+                        var device = LocalDevice.Current.GetDevice(deviceKeys);
                         if (device != null)
                         {
-                            ////鑾峰彇璁惧绫诲瀷鐨�
-                            //var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
-                            ////鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
-                            //if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
-                            //{
-                            //    continue;
-                            //}
+                            //鑾峰彇璁惧绫诲瀷鐨�
+                            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+                            //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
+                            if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+                            {
+                                continue;
+                            }
                             if (device.Type == DeviceType.FreshAir)
                             {
                                 curRoomDeviceListTemp.Add(device);
@@ -1355,14 +1379,50 @@
                     }
                     break;
                 case 2:
+                    foreach (var deviceKeys in curRoom.ListDevice)
+                    {
+                        var device = LocalDevice.Current.GetDevice(deviceKeys);
+                        if (device != null)
+                        {
+                            if (device.Type == DeviceType.TemperatureSensor)
+                            {
+                                curRoomDeviceListTemp.Add(device);
+                            }
+                        }
+                    }
                     break;
                 case 3:
+                    foreach (var deviceKeys in curRoom.ListDevice)
+                    {
+                        var device = LocalDevice.Current.GetDevice(deviceKeys);
+                        if (device != null)
+                        {
+                            if (device.Type == DeviceType.FreshAirHumiditySensor)
+                            {
+                                curRoomDeviceListTemp.Add(device);
+                            }
+                        }
+                    }
                     break;
                 case 4:
                     break;
             }
             return curRoomDeviceListTemp;
         }
-        #endregion 
+        #endregion
+
+        #region 绉婚櫎鏂规硶
+        /// <summary>
+        /// 閲嶅啓绉婚櫎鏂规硶
+        /// </summary>
+        public override void RemoveFromParent()
+        {
+            actionFreshAirTarget = null;
+            actionTemperatureTarget = null;
+            actionHumidityTarget = null;
+            actionPMTarget = null;
+            base.RemoveFromParent();
+        }
+        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs
index 711e561..82f7f96 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs
@@ -417,8 +417,8 @@
             var frameBorder = new FrameLayout();
             frameBorder.Y = Application.GetRealHeight(150);
             frameBorder.Gravity = Gravity.CenterHorizontal;
-            frameBorder.Width = Application.GetMinRealAverage(426);
-            frameBorder.Height = Application.GetMinRealAverage(426);
+            frameBorder.Width = this.GetPictrueRealSize(426);
+            frameBorder.Height = this.GetPictrueRealSize(426);
             listBackControl.frameTable.AddChidren(frameBorder);
 
             var btnPic = new PicViewControl(frameBorder.Width, frameBorder.Height, false);
@@ -453,14 +453,14 @@
         /// <returns></returns>
         private NormalViewControl InitDeviceButtonControl(FrameLayout frame, CommonDevice device)
         {
-            var btnIcon = new NormalViewControl(Application.GetMinRealAverage(52), Application.GetMinRealAverage(52), false);
+            var btnIcon = new NormalViewControl(this.GetPictrueRealSize(52), this.GetPictrueRealSize(52), false);
             btnIcon.Text = "Button" + device.DeviceEpoint;
             btnIcon.TextAlignment = TextAlignment.Center;
             btnIcon.TextColor = UserCenterColor.Current.TextGrayColor1;
-            if (frame is FrameLayoutControl)
+            if (frame is FrameLayoutStatuControl)
             {
-                ((FrameLayoutControl)frame).AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
-                ((FrameLayoutControl)frame).ButtonClickEvent += (sender, e) =>
+                ((FrameLayoutStatuControl)frame).AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
+                ((FrameLayoutStatuControl)frame).ButtonClickEvent += (sender, e) =>
                 {
                     //鎸夐敭鐐瑰嚮
                     this.DeviceEpointSelectEvent(btnIcon, null);
@@ -498,15 +498,15 @@
         {
             //鎸夐敭1
             var btnButton1 = this.InitDeviceButtonControl(frameBack, listDevice[0]);
-            btnButton1.Height = Application.GetMinRealAverage(175);
-            btnButton1.Width = Application.GetMinRealAverage(361);
-            btnButton1.Y = Application.GetMinRealAverage(39);
+            btnButton1.Height = this.GetPictrueRealSize(175);
+            btnButton1.Width = this.GetPictrueRealSize(361);
+            btnButton1.Y = this.GetPictrueRealSize(39);
             btnButton1.Gravity = Gravity.CenterHorizontal;
 
             //鎸夐敭2
             var btnButton2 = this.InitDeviceButtonControl(frameBack, listDevice[1]);
-            btnButton2.Height = Application.GetMinRealAverage(175);
-            btnButton2.Width = Application.GetMinRealAverage(361);
+            btnButton2.Height = this.GetPictrueRealSize(175);
+            btnButton2.Width = this.GetPictrueRealSize(361);
             btnButton2.Y = btnButton1.Bottom;
             btnButton2.Gravity = Gravity.CenterHorizontal;
         }
@@ -525,32 +525,32 @@
             //鎸夐敭1
             var btnButton1 = this.InitDeviceButtonControl(frameBack, listDevice[0]);
             btnButton1.TextSize = 12;
-            btnButton1.Height = Application.GetMinRealAverage(175);
-            btnButton1.Width = Application.GetMinRealAverage(183);
-            btnButton1.X = Application.GetMinRealAverage(34);
-            btnButton1.Y = Application.GetMinRealAverage(30);
+            btnButton1.Height = this.GetPictrueRealSize(175);
+            btnButton1.Width = this.GetPictrueRealSize(183);
+            btnButton1.X = this.GetPictrueRealSize(34);
+            btnButton1.Y = this.GetPictrueRealSize(30);
 
             //鎸夐敭2
             var btnButton2 = this.InitDeviceButtonControl(frameBack, listDevice[1]);
             btnButton2.TextSize = 12;
-            btnButton2.Height = Application.GetMinRealAverage(175);
-            btnButton2.Width = Application.GetMinRealAverage(183);
+            btnButton2.Height = this.GetPictrueRealSize(175);
+            btnButton2.Width = this.GetPictrueRealSize(183);
             btnButton2.X = btnButton1.Right;
             btnButton2.Y = btnButton1.Y;
 
             //鎸夐敭3
             var btnButton3 = this.InitDeviceButtonControl(frameBack, listDevice[2]);
             btnButton3.TextSize = 12;
-            btnButton3.Height = Application.GetMinRealAverage(175);
-            btnButton3.Width = Application.GetMinRealAverage(183);
+            btnButton3.Height = this.GetPictrueRealSize(175);
+            btnButton3.Width = this.GetPictrueRealSize(183);
             btnButton3.X = btnButton1.X;
-            btnButton3.Y = btnButton1.Bottom + Application.GetMinRealAverage(4);
+            btnButton3.Y = btnButton1.Bottom + this.GetPictrueRealSize(4);
 
             //鎸夐敭4
             var btnButton4 = this.InitDeviceButtonControl(frameBack, listDevice[3]);
             btnButton4.TextSize = 12;
-            btnButton4.Height = Application.GetMinRealAverage(175);
-            btnButton4.Width = Application.GetMinRealAverage(183);
+            btnButton4.Height = this.GetPictrueRealSize(175);
+            btnButton4.Width = this.GetPictrueRealSize(183);
             btnButton4.X = btnButton2.X;
             btnButton4.Y = btnButton3.Y;
         }
@@ -568,10 +568,10 @@
         {
             //鎸夐敭1锝炴寜閿�2
             var frame1 = new FrameLayout();
-            frame1.X = Application.GetMinRealAverage(34);
-            frame1.Y = Application.GetMinRealAverage(30);
-            frame1.Height = Application.GetMinRealAverage(183);
-            frame1.Width = Application.GetMinRealAverage(183);
+            frame1.X = this.GetPictrueRealSize(34);
+            frame1.Y = this.GetPictrueRealSize(30);
+            frame1.Height = this.GetPictrueRealSize(183);
+            frame1.Width = this.GetPictrueRealSize(183);
             frameBack.AddChidren(frame1);
             this.InitEightButtonPanelIcon(frame1, listDevice[0], listDevice[1]);
 
@@ -587,7 +587,7 @@
             //鎸夐敭5锝炴寜閿�6
             var frame3 = new FrameLayout();
             frame3.X = frame1.X;
-            frame3.Y = frame1.Bottom + Application.GetMinRealAverage(4);
+            frame3.Y = frame1.Bottom + this.GetPictrueRealSize(4);
             frame3.Height = frame1.Height;
             frame3.Width = frame1.Width;
             frameBack.AddChidren(frame3);
@@ -596,7 +596,7 @@
             //鎸夐敭7锝炴寜閿�8
             var frame4 = new FrameLayout();
             frame4.X = frame1.Right;
-            frame4.Y = frame1.Bottom + Application.GetMinRealAverage(4);
+            frame4.Y = frame1.Bottom + this.GetPictrueRealSize(4);
             frame4.Height = frame1.Height;
             frame4.Width = frame1.Width;
             frameBack.AddChidren(frame4);
@@ -612,19 +612,19 @@
         private void InitEightButtonPanelIcon(FrameLayout frameBack, CommonDevice device1, CommonDevice device2)
         {
             //鎸夐敭1
-            var frameButton1 = new FrameLayoutControl();
+            var frameButton1 = new FrameLayoutStatuControl();
             frameButton1.UseClickStatu = false;
-            frameButton1.Height = Application.GetMinRealAverage(92);
-            frameButton1.Width = Application.GetMinRealAverage(183);
+            frameButton1.Height = this.GetPictrueRealSize(92);
+            frameButton1.Width = this.GetPictrueRealSize(183);
             frameBack.AddChidren(frameButton1);
             var btnButton1 = this.InitDeviceButtonControl(frameButton1, device1);
             btnButton1.TextSize = 10;
-            btnButton1.Height = Application.GetMinRealAverage(35);
-            btnButton1.Width = Application.GetMinRealAverage(183);
-            btnButton1.Y = Application.GetMinRealAverage(37);
+            btnButton1.Height = this.GetPictrueRealSize(35);
+            btnButton1.Width = this.GetPictrueRealSize(183);
+            btnButton1.Y = this.GetPictrueRealSize(37);
 
             //鎸夐敭2
-            var frameButton2 = new FrameLayoutControl();
+            var frameButton2 = new FrameLayoutStatuControl();
             frameButton2.UseClickStatu = false;
             frameButton2.Height = frameButton1.Height;
             frameButton2.Width = frameButton1.Width;
@@ -634,7 +634,7 @@
             btnButton2.TextSize = 10;
             btnButton2.Height = btnButton1.Height;
             btnButton2.Width = btnButton1.Width;
-            btnButton2.Y = Application.GetMinRealAverage(20);
+            btnButton2.Y = this.GetPictrueRealSize(20);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs
index 47590b7..3a46d58 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs
@@ -417,8 +417,8 @@
             var frameBorder = new FrameLayout();
             frameBorder.Y = Application.GetRealHeight(150);
             frameBorder.Gravity = Gravity.CenterHorizontal;
-            frameBorder.Width = Application.GetMinRealAverage(426);
-            frameBorder.Height = Application.GetMinRealAverage(426);
+            frameBorder.Width = this.GetPictrueRealSize(426);
+            frameBorder.Height = this.GetPictrueRealSize(426);
             listBackControl.frameTable.AddChidren(frameBorder);
 
             var btnPic = new PicViewControl(frameBorder.Width, frameBorder.Height, false);
@@ -448,12 +448,12 @@
         /// <param name="frame">鎵╁ぇ鐐瑰嚮鍖哄煙鐨勫鍣�</param>
         /// <param name="device">璁惧瀵硅薄</param>
         /// <returns></returns>
-        private void InitDeviceIcon(FrameLayoutControl frame, CommonDevice device)
+        private void InitDeviceIcon(FrameLayoutStatuControl frame, CommonDevice device)
         {
             //涓嶄娇鐢ㄧ偣鍑荤壒鏁�
             frame.UseClickStatu = false;
 
-            var btnIcon = new NormalViewControl(Application.GetMinRealAverage(52), Application.GetMinRealAverage(52), false);
+            var btnIcon = new NormalViewControl(this.GetPictrueRealSize(52), this.GetPictrueRealSize(52), false);
             btnIcon.Name = "btn" + device.DeviceEpoint;
             btnIcon.Gravity = Gravity.Center;
             btnIcon.RadiusEx = 16;
@@ -486,20 +486,20 @@
         private void InitTwoButtonPanelIcon(FrameLayout frameBack, List<CommonDevice> listDevice)
         {
             //鎸夐敭1
-            var frame1 = new FrameLayoutControl();
-            frame1.Height = Application.GetMinRealAverage(110);
-            frame1.Width = Application.GetMinRealAverage(110);
-            frame1.Y = Application.GetMinRealAverage(63);
+            var frame1 = new FrameLayoutStatuControl();
+            frame1.Height = this.GetPictrueRealSize(110);
+            frame1.Width = this.GetPictrueRealSize(110);
+            frame1.Y = this.GetPictrueRealSize(63);
             frame1.Gravity = Gravity.CenterHorizontal;
             frameBack.AddChidren(frame1);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame1, listDevice[0]);
 
             //鎸夐敭2
-            var frame2 = new FrameLayoutControl();
-            frame2.Height = Application.GetMinRealAverage(110);
-            frame2.Width = Application.GetMinRealAverage(110);
-            frame2.Y = Application.GetMinRealAverage(245);
+            var frame2 = new FrameLayoutStatuControl();
+            frame2.Height = this.GetPictrueRealSize(110);
+            frame2.Width = this.GetPictrueRealSize(110);
+            frame2.Y = this.GetPictrueRealSize(245);
             frame2.Gravity = Gravity.CenterHorizontal;
             frameBack.AddChidren(frame2);
             //鍒濆鍖栬澶囧浘鏍�
@@ -518,31 +518,31 @@
         private void InitThreeButtonPanelIcon(FrameLayout frameBack, List<CommonDevice> listDevice)
         {
             //鎸夐敭1
-            var frame1 = new FrameLayoutControl();
-            frame1.Height = Application.GetMinRealAverage(110);
-            frame1.Width = Application.GetMinRealAverage(110);
-            frame1.Y = Application.GetMinRealAverage(63);
+            var frame1 = new FrameLayoutStatuControl();
+            frame1.Height = this.GetPictrueRealSize(110);
+            frame1.Width = this.GetPictrueRealSize(110);
+            frame1.Y = this.GetPictrueRealSize(63);
             frame1.Gravity = Gravity.CenterHorizontal;
             frameBack.AddChidren(frame1);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame1, listDevice[0]);
 
             //鎸夐敭2
-            var frame2 = new FrameLayoutControl();
-            frame2.Height = Application.GetMinRealAverage(110);
-            frame2.Width = Application.GetMinRealAverage(110);
-            frame2.X = Application.GetMinRealAverage(63);
-            frame2.Y = Application.GetMinRealAverage(245);
+            var frame2 = new FrameLayoutStatuControl();
+            frame2.Height = this.GetPictrueRealSize(110);
+            frame2.Width = this.GetPictrueRealSize(110);
+            frame2.X = this.GetPictrueRealSize(63);
+            frame2.Y = this.GetPictrueRealSize(245);
             frameBack.AddChidren(frame2);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame2, listDevice[1]);
 
             //鎸夐敭3
-            var frame3 = new FrameLayoutControl();
-            frame3.Height = Application.GetMinRealAverage(110);
-            frame3.Width = Application.GetMinRealAverage(110);
-            frame3.X = Application.GetMinRealAverage(245);
-            frame3.Y = Application.GetMinRealAverage(245);
+            var frame3 = new FrameLayoutStatuControl();
+            frame3.Height = this.GetPictrueRealSize(110);
+            frame3.Width = this.GetPictrueRealSize(110);
+            frame3.X = this.GetPictrueRealSize(245);
+            frame3.Y = this.GetPictrueRealSize(245);
             frameBack.AddChidren(frame3);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame3, listDevice[2]);
@@ -560,41 +560,41 @@
         private void InitFourButtonPanelIcon(FrameLayout frameBack, List<CommonDevice> listDevice)
         {
             //鎸夐敭1
-            var frame1 = new FrameLayoutControl();
-            frame1.Height = Application.GetMinRealAverage(110);
-            frame1.Width = Application.GetMinRealAverage(110);
-            frame1.X = Application.GetMinRealAverage(63);
-            frame1.Y = Application.GetMinRealAverage(63);
+            var frame1 = new FrameLayoutStatuControl();
+            frame1.Height = this.GetPictrueRealSize(110);
+            frame1.Width = this.GetPictrueRealSize(110);
+            frame1.X = this.GetPictrueRealSize(63);
+            frame1.Y = this.GetPictrueRealSize(63);
             frameBack.AddChidren(frame1);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame1, listDevice[0]);
 
             //鎸夐敭2
-            var frame2 = new FrameLayoutControl();
-            frame2.Height = Application.GetMinRealAverage(110);
-            frame2.Width = Application.GetMinRealAverage(110);
-            frame2.X = Application.GetMinRealAverage(245);
-            frame2.Y = Application.GetMinRealAverage(63);
+            var frame2 = new FrameLayoutStatuControl();
+            frame2.Height = this.GetPictrueRealSize(110);
+            frame2.Width = this.GetPictrueRealSize(110);
+            frame2.X = this.GetPictrueRealSize(245);
+            frame2.Y = this.GetPictrueRealSize(63);
             frameBack.AddChidren(frame2);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame2, listDevice[1]);
 
             //鎸夐敭3
-            var frame3 = new FrameLayoutControl();
-            frame3.Height = Application.GetMinRealAverage(110);
-            frame3.Width = Application.GetMinRealAverage(110);
-            frame3.X = Application.GetMinRealAverage(63);
-            frame3.Y = Application.GetMinRealAverage(245);
+            var frame3 = new FrameLayoutStatuControl();
+            frame3.Height = this.GetPictrueRealSize(110);
+            frame3.Width = this.GetPictrueRealSize(110);
+            frame3.X = this.GetPictrueRealSize(63);
+            frame3.Y = this.GetPictrueRealSize(245);
             frameBack.AddChidren(frame3);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame3, listDevice[2]);
 
             //鎸夐敭4
-            var frame4 = new FrameLayoutControl();
-            frame4.Height = Application.GetMinRealAverage(110);
-            frame4.Width = Application.GetMinRealAverage(110);
-            frame4.X = Application.GetMinRealAverage(245);
-            frame4.Y = Application.GetMinRealAverage(245);
+            var frame4 = new FrameLayoutStatuControl();
+            frame4.Height = this.GetPictrueRealSize(110);
+            frame4.Width = this.GetPictrueRealSize(110);
+            frame4.X = this.GetPictrueRealSize(245);
+            frame4.Y = this.GetPictrueRealSize(245);
             frameBack.AddChidren(frame4);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame4, listDevice[3]);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
index 9b0f7c9..bb30fa1 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
@@ -74,13 +74,33 @@
         /// 澶辨晥鏁堟棩鏈熲�滅鈥�
         /// </summary>
         public static int InValidDateSecond = 0;
-        #endregion
 
         /// <summary>
-        /// 鑾峰彇褰撳墠闂ㄩ攣鐨勫父寮�妯″紡
+        /// 闂ㄩ攣鎿嶄綔绫诲瀷
+        /// </summary>
+        public enum DoorLockMessType
+        {
+            /// <summary>
+            /// app鎿嶄綔
+            /// </summary>
+            AppOperate = 0,
+            /// <summary>
+            /// 閫氳繃闂ㄩ攣鎿嶄綔璁惧涓婃姤
+            /// </summary>
+            DeviceReport = 1,
+            /// <summary>
+            /// 閫氳繃鏈嶅姟鍣ㄦ帹閫�
+            /// </summary>
+            ServicePush = 2,
+        }
+        #endregion
+
+        #region 甯稿紑妯″紡 API
+        /// <summary>
+        /// 鑾峰彇褰撳墠闂ㄩ攣鐨勫父寮�妯″紡 
         /// </summary>
         /// <param name="doorLock:褰撳墠闂ㄩ攣"></param> 
-        /// <returns></returns> 
+        /// <returns>null:娌℃湁鍥炲  锛� true:闂ㄩ攣甯稿紑锛沠alse锛氶棬閿佸父鍏�</returns> 
         public static async System.Threading.Tasks.Task<bool?> GetNormallyOpenMode(ZigBee.Device.DoorLock doorLock)
         {
             bool? IsDoorLockNormallyMode = null;
@@ -122,6 +142,343 @@
         }
 
         /// <summary>
+        /// 璁剧疆鏈湴闂ㄩ攣鐨勫父寮�妯″紡鍊�
+        /// </summary>
+        public static void NormallyOpenModeValue(ZigBee.Device.DoorLock doorLock, bool value)
+        {
+            string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
+            if (doorLock.IsDoorLockNormallyMode.ContainsKey(key))
+            {
+                doorLock.IsDoorLockNormallyMode[key] = value;
+            }
+            else
+            {
+                doorLock.IsDoorLockNormallyMode.Add(key, value);
+            }
+        }
+
+        /// <summary>
+        /// 甯稿紑妯″紡澶辨晥澶勭悊銆愬脊绐椼��
+        /// </summary>
+        /// <param name="doorLock">褰撳墠闂ㄩ攣</param>
+        /// <param name="doorLockMessType">瀵艰嚧闂ㄩ攣澶辨晥鐨勬搷浣滅被鍨�</param>
+        /// <param name="haveLogic">缃戝叧涓槸鍚﹀瓨鍦ㄩ�昏緫甯稿紑妯″紡</param>
+        /// <param name="action">鍥炶皟澶勭悊鏇存柊鍐呭</param>
+        public static async void NomallyOpenModeInvalidDialog(ZigBee.Device.DoorLock doorLock, DoorLockMessType doorLockMessType, bool haveLogic, Action action = null)
+        {
+            //甯稿紑妯″紡鍙兘涓讳汉鎿嶄綔
+            if (UserCenterResourse.UserInfo.AuthorityNo != 1)
+            {
+                Application.RunOnMainThread(() =>
+                {
+                    string msg0 = Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate);
+                    ShowTipMsg(msg0);
+                });
+                return;
+            }
+
+            //甯稿紑妯″紡灏嗚鍙栨秷寮圭獥
+            string msg = Language.StringByID(R.MyInternationalizationString.NomallyModeIsCanceled).Replace("{0}", "\r\n");
+            var confirm = Language.StringByID(R.MyInternationalizationString.SureCancel);
+            var alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.NomallyOpenMode, msg, confirm);
+
+            if (haveLogic)
+            {
+                //鏈夐�昏緫璁剧疆鐨勫脊绐�
+                alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.CancelNomallyOpenModeWithLogic, msg, confirm);
+            }
+            alert.Show();
+
+            alert.MsgControlClickEvent += async () =>
+            {
+                if (doorLockMessType == DoorLockMessType.DeviceReport || doorLockMessType == DoorLockMessType.ServicePush)
+                {
+                    //涓婃姤鈥滃父寮�妯″紡鈥濆凡琚彇娑堬紝app榛樿浜嗏�滃父寮�妯″紡鈥濊鍙栨秷 
+                    DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
+                }
+                else
+                {
+                    //淇濇寔甯稿紑
+                    NormallyOpenModeValue(doorLock, true);
+                }
+                action?.Invoke();
+            };
+
+            alert.CancelClickEvent += async () =>
+            {
+                if (doorLockMessType == DoorLockMessType.DeviceReport || doorLockMessType == DoorLockMessType.ServicePush)
+                {
+                    //涓婃姤鈥滃父寮�妯″紡鈥濆凡琚彇娑�
+                    Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
+                    //鍏堝垹闄ゅ凡澶辨晥鐨勨�滃父寮�妯″紡鈥濈殑閫昏緫 
+                    //if (resTemp == 1)
+                    //{
+                    //    var restulTemp = await Shared.Phone.Device.Logic.SkipView.Exist(3);
+                    //    //if (restulTemp == 3)
+                    //    //{
+                    //    //    string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed2);
+                    //    //    this.ShowTipMsg(msg0);
+                    //    //    return;
+                    //    //}
+                    //}
+
+                    //app閲嶆柊寮�鍚�滃父寮�妯″紡鈥�
+                    var result = await doorLock.SetNormallyOpenModeFuncAsync(true);
+                    if (result == null || result.defaultControlResponseData == null)
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            string msg0 = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime);
+                            ShowTipMsg(msg0);
+                            NormallyOpenModeValue(doorLock, false);
+                            CommonPage.Loading.Hide();
+                            //new Tip() { MaxWidth = 150, Text = msg0, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+                        });
+                        action?.Invoke();
+                        return;
+                    }
+                    if (result.defaultControlResponseData.status != 0)
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            string msg1 = Language.StringByID(R.MyInternationalizationString.OpenNormallyOpenModeFailed);
+                            ShowTipMsg(msg1);
+                            NormallyOpenModeValue(doorLock, false);
+                            CommonPage.Loading.Hide();
+                            //new Tip() { MaxWidth = 150, Text = msg1, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+                        });
+                        action?.Invoke();
+                        return;
+                    }
+                    else
+                    {
+                        //鍒涘缓甯稿紑妯″紡鐨勭壒娈婇�昏緫 
+                        var resu = await Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock);
+                        Application.RunOnMainThread(() =>
+                        {
+                            string msg0 = Language.StringByID(R.MyInternationalizationString.OpenNormallyOpenModeSuccess);
+                            ShowTipMsg(msg0);
+                            NormallyOpenModeValue(doorLock, true);
+                            CommonPage.Loading.Hide();
+                            //new Tip() { MaxWidth = 150, Text = msg0, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+                        });
+                    }
+                }
+                else
+                {
+                    //app鎿嶄綔涓嶅彇娑堚�滃父寮�妯″紡鈥� 
+                    DoorLockCommonInfo.NormallyOpenModeValue(doorLock, true);
+                }
+                action?.Invoke();
+            };
+
+            alert.ConfirmClickEvent += async () =>
+            {
+                if (doorLockMessType == DoorLockMessType.DeviceReport || doorLockMessType == DoorLockMessType.ServicePush)
+                {
+                    NormallyOpenModeValue(doorLock, false);
+                    if (haveLogic)
+                    {
+                        var resTemp2 = await Shared.Phone.Device.Logic.SkipView.Exist(3);
+                        //if (resTemp2 == 3)
+                        //{
+                        //    string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed);
+                        //    this.ShowTipMsg(msg0);
+                        //}
+                    }
+                }
+                else
+                {
+                    //app鎿嶄綔鍙栨秷鈥滃父寮�妯″紡鈥�
+                    Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
+                    var result = await doorLock.SetNormallyOpenModeFuncAsync(false);
+                    if (result == null || result.defaultControlResponseData == null)
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            ShowTipMsg(Language.StringByID(R.MyInternationalizationString.GwResponseOvertime));
+                            CommonPage.Loading.Hide();
+                            //new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+                        });
+                        action?.Invoke();
+                        return;
+                    }
+                    if (result.defaultControlResponseData.status != 0)
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            string msg1 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeFailed);
+                            ShowTipMsg(msg1);
+                            CommonPage.Loading.Hide();
+                            //new Tip() { MaxWidth = 150, Text = msg1, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+                        });
+                        action?.Invoke();
+                        return;
+                    }
+                    else
+                    {
+                        //娣诲姞App寮�鍚父寮�妯″紡鐨勫巻鍙茶褰�
+                        HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(doorLock, 9002, string.Empty);
+                        //app纭鍙栨秷鈥滃父寮�妯″紡鈥濇垚鍔� 
+                        NormallyOpenModeValue(doorLock, false);
+                        //鍒犻櫎璁剧疆甯稿紑妯″紡鍒涘缓鐨勯�昏緫
+                        if (haveLogic)
+                        {
+                            var resTemp1 = await Shared.Phone.Device.Logic.SkipView.Exist(3);
+                            //鍥犱负鐩墠鏈哄埗闂锛岄�昏緫缁忓父澶辫触锛屾墍浠ヤ笉鎻愮ず锛屽悗鏈熸満鍒惰鏀癸紝閲嶆柊鍋氫竴涓繖涓晫闈�
+                            //if (resTemp1 == 3)
+                            //{ 
+                            //Application.RunOnMainThread(() =>
+                            //{
+                            //        string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed);
+                            //        ShowTipMsg(msg0);
+                            //}); 
+                            //}
+                            //else if (resTemp1 == 2)
+                            //{
+                            //Application.RunOnMainThread(() =>
+                            //{
+                            //    string msg0 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeSuccess);
+                            //    ShowTipMsg(msg0);
+                            //}); 
+                        }
+                        Application.RunOnMainThread(() =>
+                        {
+                            string msg2 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeSuccess);
+                            ShowTipMsg(msg2);
+                            CommonPage.Loading.Hide();
+                        });
+                    }
+                }
+                action?.Invoke();
+            };
+        }
+
+        /// <summary>
+        /// 鍒犻櫎甯稿紑妯″紡
+        /// </summary>
+        /// <param name="doorLock">褰撳墠闂ㄩ攣</param>
+        /// <param name="action">鍥炶皟澶勭悊鏇存柊鍐呭</param>
+        /// <returns></returns>
+        public static async System.Threading.Tasks.Task<bool> DelNormallyOpenMode(ZigBee.Device.DoorLock doorLock, Action action = null)
+        {
+            //app鎿嶄綔鍙栨秷鈥滃父寮�妯″紡鈥� 
+            var result = await doorLock.SetNormallyOpenModeFuncAsync(false);
+            if (result == null || result.defaultControlResponseData == null || result.defaultControlResponseData.status != 0)
+            {
+                action?.Invoke();
+                return false;
+            }
+
+            if (result.defaultControlResponseData.status == 0)
+            {
+                //app纭鍙栨秷鈥滃父寮�妯″紡鈥濇垚鍔� 
+                NormallyOpenModeValue(doorLock, false);
+                action?.Invoke();
+                return true;
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// 鍚姩甯稿紑妯″紡銆愬脊绐椼��
+        /// </summary>
+        /// <param name="doorLock">褰撳墠闂ㄩ攣</param>
+        /// <param name="action">鍥炶皟澶勭悊鏇存柊鍐呭</param>
+        public static async void NomallyOpenModeStartDialog(ZigBee.Device.DoorLock doorLock, Action action)
+        {
+            //甯稿紑妯″紡鍙兘涓讳汉鎿嶄綔ZigBee.Device.DoorLock doorLock
+            if (UserCenterResourse.UserInfo.AuthorityNo != 1)
+            {
+                Application.RunOnMainThread(() =>
+                {
+                    string msg0 = Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate);
+                    ShowTipMsg(msg0);
+                });
+                return;
+            }
+
+            //璁剧疆甯稿紑妯″紡鍚庯紝鎮ㄧ殑闂ㄩ攣灏嗗缁堝浜庢墦寮�鐘舵�侊紝纭寮�鍚紵 
+            string msg = Language.StringByID(R.MyInternationalizationString.SetDoorLockNomallyOpen).Replace("{0}", "\r\n");
+            var confirm = Language.StringByID(R.MyInternationalizationString.Confrim);
+            var alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.Confirm, msg, confirm);
+            alert.Show();
+
+            alert.ConfirmClickEvent += async () =>
+            {
+                Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
+                var result = await doorLock.SetNormallyOpenModeFuncAsync(true);
+                if (result == null || result.defaultControlResponseData == null)
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        string msg0 = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime);
+                        ShowTipMsg(msg0);
+                        CommonPage.Loading.Hide();
+                    });
+                    return;
+                }
+                if (result.defaultControlResponseData.status != 0)
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        string msg1 = Language.StringByID(R.MyInternationalizationString.OpenNormallyOpenModeFailed);
+                        ShowTipMsg(msg1);
+                        CommonPage.Loading.Hide();
+                    });
+                    return;
+                }
+                else
+                {
+                    //娣诲姞App寮�鍚父寮�妯″紡鐨勫巻鍙茶褰�
+                    HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(doorLock, 9001, string.Empty);
+                    DoorLockCommonInfo.NormallyOpenModeValue(doorLock, true);
+                    action?.Invoke();
+                    Application.RunOnMainThread(() =>
+                    {
+                        NomallyOpenModeInvalidTimeDialog(doorLock);
+                        CommonPage.Loading.Hide();
+                    });
+                }
+            };
+        }
+
+        /// <summary>
+        /// 甯稿紑妯″紡澶辨晥鏃堕棿澶勭悊銆愬脊绐椼��
+        /// </summary>
+        public static async void NomallyOpenModeInvalidTimeDialog(ZigBee.Device.DoorLock doorLock)
+        {
+            //澶辨晥璁剧疆 
+            string msgTimeInValidSetting = Language.StringByID(R.MyInternationalizationString.DoorLockOpenAllTheTime);
+            var timeConfrim = Language.StringByID(R.MyInternationalizationString.Confrim);
+            var alertTimeInValidSetting = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.InValid, msgTimeInValidSetting, timeConfrim);
+            alertTimeInValidSetting.Show();
+
+            alertTimeInValidSetting.InvalidTimeAction += async (obj) =>
+            {
+                //甯稿紑妯″紡澶辨晥鏃堕棿璁剧疆鎴愬姛
+                var temp = int.Parse(obj);
+                DoorLockCommonInfo.NormallyOpenModeInvalidTime = temp;
+                //榛樿鍒涘缓甯稿紑妯″紡鐨勭壒娈婇�昏緫 
+                var res = await Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock);
+                if (!res)
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        //榛樿鍒涘缓甯稿紑妯″紡澶辫触
+                        string msg0 = Language.StringByID(R.MyInternationalizationString.AddLogicNormallyModeFailed);
+                        var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal, msg0, Language.StringByID(R.MyInternationalizationString.confrim));
+                        alert.Show();
+                        //浜屾鍔犺浇寮圭獥 甯稿紑妯″紡寮�鍚彁绀�
+                        NomallyOpenModeInvalidTimeDialog(doorLock);
+                    });
+                }
+            };
+        }
+        #endregion
+
+        #region 闊抽噺
+        /// <summary>
         /// 闂ㄩ攣鏄惁鏀寔闊抽噺[杩欓噷鏆傛椂鍙湁S-One闂ㄩ攣鏀寔锛孒06C涓嶆敮鎸侊紝鍚庢湡閫氳繃鑳藉姏鍊兼敮鎸乚
         /// </summary>
         /// <param name="doorLock:褰撳墠闂ㄩ攣"></param> 
@@ -137,6 +494,8 @@
             }
             return false;
         }
+
+        #endregion
 
         #region 浠庝簯绔幏鍙栫殑鏂规硶 
         /// <summary>
@@ -856,7 +1215,7 @@
         /// 鏄剧ず閿欒淇℃伅绐楀彛
         /// </summary>
         /// <param name="msg"></param>
-        private void ShowErrorMsg(string msg)
+        private static void ShowErrorMsg(string msg)
         {
             Application.RunOnMainThread(() =>
             {
@@ -869,7 +1228,7 @@
         /// 鏄剧ずTip淇℃伅绐楀彛
         /// </summary>
         /// <param name="msg"></param>
-        private void ShowTipMsg(string msg)
+        private static void ShowTipMsg(string msg)
         {
             Application.RunOnMainThread(() =>
             {
@@ -880,148 +1239,5 @@
 
         #endregion
 
-        public enum DoorLockMessType
-        {
-            /// <summary>
-            /// app鎿嶄綔
-            /// </summary>
-            AppOperate = 0,
-            /// <summary>
-            /// 璁惧涓婃姤
-            /// </summary>
-            DeviceReport = 1,
-            /// <summary>
-            /// 鏈嶅姟鍣ㄦ帹閫�
-            /// </summary>
-            ServicePush = 2,
-        }
-
-        /// <summary>
-        /// 甯稿紑妯″紡澶辨晥澶勭悊
-        /// </summary>
-        public static async void NomallyOpenModeInvalidDialog(ZigBee.Device.DoorLock doorLock, DoorLockMessType doorLockMessType, Action action)
-        {
-            if (UserCenterResourse.UserInfo.AuthorityNo != 1)
-            {
-                return;
-            }
-            string msg = Language.StringByID(R.MyInternationalizationString.NomallyModeIsCanceled).Replace("{0}", "\r\n");
-            var confirm = Language.StringByID(R.MyInternationalizationString.SureCancel);
-            var alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.NomallyOpenMode, msg, confirm);
-            var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist();
-
-            if (resTemp == 1)
-            {
-                //鏈夐�昏緫璁剧疆鐨勫脊绐�
-                alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.CancelNomallyOpenModeWithLogic, msg, confirm);
-            }
-            alert.Show();
-            alert.MsgControlClickEvent += async () =>
-            {
-                if (doorLockMessType == DoorLockMessType.DeviceReport || doorLockMessType == DoorLockMessType.ServicePush)
-                {
-                    //鍙栨秷甯稿紑
-                    NormallyOpenModeValue(doorLock, false);
-                }
-                else
-                {
-                    //淇濇寔甯稿紑
-                    NormallyOpenModeValue(doorLock, true);
-                }
-                action?.Invoke();
-                action = null;
-            };
-            alert.CancelClickEvent += async () =>
-            {
-                if (doorLockMessType == DoorLockMessType.DeviceReport || doorLockMessType == DoorLockMessType.ServicePush)
-                {
-                    var result = await doorLock.SetNormallyOpenModeFuncAsync(true);
-                    if (result == null || result.defaultControlResponseData == null)
-                    {
-                        string msg0 = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime);
-                        Application.RunOnMainThread(() =>
-                        {
-                            new Tip() { MaxWidth = 150, Text = msg0, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
-                        });
-                        NormallyOpenModeValue(doorLock, false);
-                        return;
-                    }
-                    if (result.defaultControlResponseData.status != 0)
-                    {
-                        string msg1 = Language.StringByID(R.MyInternationalizationString.OpenNormallyOpenModeFailed);
-                        Application.RunOnMainThread(() =>
-                        {
-                            new Tip() { MaxWidth = 150, Text = msg1, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
-                        });
-                        NormallyOpenModeValue(doorLock, false);
-                        return;
-                    }
-                    else
-                    {
-                        NormallyOpenModeValue(doorLock, true);
-                    }
-                }
-                else
-                {
-                    NormallyOpenModeValue(doorLock, true);
-                }
-                action?.Invoke();
-                action = null;
-            };
-            alert.ConfirmClickEvent += async () =>
-            {
-                if (doorLockMessType == DoorLockMessType.DeviceReport || doorLockMessType == DoorLockMessType.ServicePush)
-                {
-                    NormallyOpenModeValue(doorLock, false);
-                }
-                else
-                {
-                    var result = await doorLock.SetNormallyOpenModeFuncAsync(false);
-                    if (result == null || result.defaultControlResponseData == null)
-                    {
-                        Application.RunOnMainThread(() =>
-                        {
-                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
-                        });
-                        return;
-                    }
-                    if (result.defaultControlResponseData.status != 0)
-                    {
-                        string msg1 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeFailed);
-                        Application.RunOnMainThread(() => { });
-
-                        new Tip() { MaxWidth = 150, Text = msg1, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
-                        return;
-                    }
-                    else
-                    {
-                        NormallyOpenModeValue(doorLock, false);
-                        string msg2 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeSuccess);
-                        Application.RunOnMainThread(() =>
-                        {
-                            new Tip() { MaxWidth = 150, Text = msg2, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
-                        });
-                    }
-                }
-                action?.Invoke();
-                action = null;
-            };
-        }
-
-        /// <summary>
-        /// 闂ㄩ攣甯稿紑妯″紡鍊�
-        /// </summary>
-        public static void NormallyOpenModeValue(ZigBee.Device.DoorLock doorLock, bool value)
-        {
-            string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
-            if (doorLock.IsDoorLockNormallyMode.ContainsKey(key))
-            {
-                doorLock.IsDoorLockNormallyMode[key] = value;
-            }
-            else
-            {
-                doorLock.IsDoorLockNormallyMode.Add(key, value);
-            }
-        }
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
index 8574e46..1c10f51 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
@@ -15,7 +15,7 @@
         }
         #region 鍙橀噺鐢虫槑
         public FrameLayout topFrameLayout = new FrameLayout { Height = Application.GetRealHeight(184), BackgroundColor = ZigbeeColor.Current.XMTopFrameLayout };
-        public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1921 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout };
+        public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1925 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout };
         #region 搴曢儴鏈夊渾瑙掑竷灞�
         /// 鑳屾櫙闃村奖鐣岄潰
         /// </summary>
@@ -120,7 +120,6 @@
             Height = 1,
             BackgroundColor = Shared.Common.ZigbeeColor.Current.XMTitleLine,
         };
-
 
         /// <summary>
         /// 寮圭獥鍙栨秷鎸夐敭
@@ -233,6 +232,7 @@
                 PlaceholderText = Language.StringByID(R.MyInternationalizationString.InputUnlockPasswrd),
                 TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                 TextAlignment = TextAlignment.BottomLeft,
+                IsNumberKeyboardType = true,
             };
             editInputPasswordFrameLayout.AddChidren(editInputPassword);
 
@@ -386,7 +386,7 @@
         }
 
         /// <summary>
-        /// 鍘讳釜浜轰腑蹇冿紝寮�鍚繙绋嬪紑閿侀獙璇�
+        /// 鍘讳釜浜轰腑蹇冿紝寮�鍚郴缁熷瘑鐮佹敮鎸佸紑閿佹潈闄�
         /// </summary>
         public void SystemSecondAuthentication()
         {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs
index de24e88..37945a5 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs
@@ -74,10 +74,11 @@
             {
                 RemoveFromParent();
 
-                var userDoorLockPage = new UserDoorLockPage(currentRoom, deviceUI);
-                HomePage.Instance.AddChidren(userDoorLockPage);
-                HomePage.Instance.PageIndex += 1;
-                userDoorLockPage.Show();
+                //鏆傛椂涓嶈�冭檻涓嬬骇鐣岄潰绛夋帹閫佸鑷村父寮�妯″紡澶辨晥鐨勯棶棰�
+                //var userDoorLockPage = new UserDoorLockPage(currentRoom, deviceUI);
+                //HomePage.Instance.AddChidren(userDoorLockPage);
+                //HomePage.Instance.PageIndex += 1;
+                //userDoorLockPage.Show();
             };
             this.btnBack.MouseUpEventHandler += eHandlerBack;
             this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
@@ -215,7 +216,7 @@
             };
 
             //璁惧妯″潡
-            caption = Language.StringByID(R.MyInternationalizationString.BelongModel);
+            caption = Language.StringByID(R.MyInternationalizationString.BelongDevice);
             deviceName = Common.LocalDevice.Current.GetDeviceObjectText(listNewDevice);
             var btnType = new FrameCaptionViewControl(caption, deviceName, listview.rowSpace / 2);
             btnType.UseClickStatu = false;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs
index de6bb06..ea5123d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs
@@ -1,8 +1,8 @@
 锘縰sing System;
 using System.Text;
-using System.Text.RegularExpressions;
-using Shared.Common;
-
+using System.Text.RegularExpressions;
+using Shared.Common;
+
 namespace Shared.Phone.UserCenter.DoorLock
 {
     /// <summary>
@@ -18,11 +18,11 @@
         /// <summary>
         /// 鐐瑰嚮鍙栨秷鐨勫洖璋冧簨浠�
         /// </summary>
-        public Action CancelClickEvent = null;
+        public Action CancelClickEvent = null;
         /// <summary>
         /// 鐐瑰嚮鑷姩鍖栫殑鍥炶皟浜嬩欢
         /// </summary>
-        public Action LogicClickEvent = null;
+        public Action LogicClickEvent = null;
         /// <summary>
         /// 鐐瑰嚮纭鐨勫洖璋冧簨浠�
         /// </summary>
@@ -50,16 +50,16 @@
         /// <summary>
         /// 纭鎸夐挳鐨勬枃鏈�
         /// </summary>
-        private string buttonOkText = null;
-        /// <summary>
-        /// 澶辨晥鏃堕棿缂栬緫
-        /// </summary>
-        private EditText editInvalidTime = null;
-
+        private string buttonOkText = null;
+        /// <summary>
+        /// 澶辨晥鏃堕棿缂栬緫
+        /// </summary>
+        private EditText editInvalidTime = null;
+
         #endregion
-
+
         #region 鈻� 鍒濆鍖朹____________________________
-
+
         /// <summary>
         /// 鏄剧ず涓�涓渶瑕佺‘璁ょ殑淇℃伅妗�
         /// </summary>
@@ -71,7 +71,7 @@
             //纭鎸夐挳鏂囨湰
             this.buttonOkText = buttonText == null ? Language.StringByID(R.MyInternationalizationString.OkMsg) : buttonText;
             this.msgType = i_msgType;
-            this.msgText = i_msg;
+            this.msgText = i_msg;
         }
 
         #endregion
@@ -84,8 +84,8 @@
         public void Show()
         {
             try
-            {
-                //鍒濆鍖栨帶浠�
+            {
+                //鍒濆鍖栨帶浠�
                 this.InitMsgControl();
             }
             catch (Exception ex) { HdlLogLogic.Current.WriteLog(ex); }
@@ -121,24 +121,24 @@
 
             //鐧借壊鑳屾櫙妗�
             var frameBack = new FrameLayout();
-            frameBack.BackgroundColor = UserCenterColor.Current.White;
+            frameBack.BackgroundColor = UserCenterColor.Current.White;
             frameBack.Gravity = Gravity.CenterHorizontal;
             frameBack.Radius = (uint)Application.GetRealHeight(17);
-            if (msgType == DoorLockMsgType.CancelNomallyOpenModeWithLogic)
-            {
-                frameBack.Height = Application.GetRealHeight(409 + 127);
-                frameBack.Width = Application.GetRealWidth(850);
-                frameBack.Y = Application.GetRealHeight(648);
-            }
-            else
-            {
-                frameBack.Height = Application.GetRealHeight(478);
-                frameBack.Width = Application.GetRealWidth(792);
-                frameBack.Y = Application.GetRealHeight(706);
+            if (msgType == DoorLockMsgType.CancelNomallyOpenModeWithLogic)
+            {
+                frameBack.Height = Application.GetRealHeight(409 + 127);
+                frameBack.Width = Application.GetRealWidth(850);
+                frameBack.Y = Application.GetRealHeight(648);
             }
-            MsgControlFrameLayout.AddChidren(frameBack);
-
-            //鏍囬
+            else
+            {
+                frameBack.Height = Application.GetRealHeight(478);
+                frameBack.Width = Application.GetRealWidth(792);
+                frameBack.Y = Application.GetRealHeight(706);
+            }
+            MsgControlFrameLayout.AddChidren(frameBack);
+
+            //鏍囬
             var btnTitle = new NormalViewControl(frameBack.Width, Application.GetRealHeight(65), false);
             btnTitle.Y = Application.GetRealHeight(68);
             btnTitle.TextColor = 0xff333443;
@@ -148,7 +148,7 @@
             if (msgType == DoorLockMsgType.Confirm || msgType == DoorLockMsgType.DoorLockLogic || msgType == DoorLockMsgType.NomallyOpenMode || msgType == DoorLockMsgType.CancelNomallyOpenModeWithLogic)
             {
                 btnTitle.TextID = R.MyInternationalizationString.NormalTip;
-            }
+            }
             else if (msgType == DoorLockMsgType.InValid)
             {
                 btnTitle.TextID = R.MyInternationalizationString.DoorLockInValidSetting;
@@ -160,127 +160,147 @@
 
             if (msgType == DoorLockMsgType.InValid)
             {
-                InitInValidTimeDialog(frameBack);
-            }
-            else if (msgType == DoorLockMsgType.CancelNomallyOpenModeWithLogic)
-            {
-                CancelNormallyOpenModeWithLogicDialog(frameBack);
-            }
-            else
-            {
-                //娑堟伅
-                var btnMsg = new NormalViewControl(frameBack.Width - Application.GetRealWidth(55 * 2), Application.GetRealHeight(180), false);
-                btnMsg.Y = Application.GetRealHeight(141);
-                btnMsg.IsMoreLines = true;
-                btnMsg.TextAlignment = TextAlignment.Center;
-                btnMsg.TextColor = UserCenterColor.Current.TextGrayColor1;
-                btnMsg.Gravity = Gravity.CenterHorizontal;
-                frameBack.AddChidren(btnMsg);
-                btnMsg.Text = msgText;
+                InitInValidTimeDialog(frameBack);
+            }
+            else if (msgType == DoorLockMsgType.CancelNomallyOpenModeWithLogic)
+            {
+                CancelNormallyOpenModeWithLogicDialog(frameBack);
+            }
+            else
+            {
+                //娑堟伅
+                var btnMsg = new NormalViewControl(frameBack.Width - Application.GetRealWidth(55 * 2), Application.GetRealHeight(180), false);
+                btnMsg.Y = Application.GetRealHeight(141);
+                btnMsg.IsMoreLines = true;
+                btnMsg.TextAlignment = TextAlignment.Center;
+                btnMsg.TextColor = UserCenterColor.Current.TextGrayColor1;
+                btnMsg.Gravity = Gravity.CenterHorizontal;
+                frameBack.AddChidren(btnMsg);
+                btnMsg.Text = msgText;
             }
 
             if (msgType == DoorLockMsgType.Confirm || msgType == DoorLockMsgType.InValid || msgType == DoorLockMsgType.NomallyOpenMode || msgType == DoorLockMsgType.CancelNomallyOpenModeWithLogic)
             {
                 //鍒濆鍖栫‘璁ょ被鍨嬬殑搴曢儴鎸夐挳
                 this.InitBottomConfirmButton(MsgControlFrameLayout, frameBack);
-            }
+            }
             else if (msgType == DoorLockMsgType.DoorLockLogic)
             {
                 //澶辨晥璁剧疆鐨勫簳閮ㄦ寜閽�
                 this.InitBottomLogicButton(MsgControlFrameLayout, frameBack);
             }
-        }
-
+        }
+
         /// <summary>
         /// 鍙栨秷甯稿紑妯″紡甯︽湁鑷姩鍖栫殑寮圭獥鏄剧ず
         /// </summary>
         /// <param name="frameMain"></param>
         /// <param name="frameBack"></param>
         private void CancelNormallyOpenModeWithLogicDialog(FrameLayout frameBack)
-        {
-            //娑堟伅
-            var btnMsg = new NormalViewControl(frameBack.Width - Application.GetRealWidth(55 * 2), Application.GetRealHeight(63), false);
-            btnMsg.Y = Application.GetRealHeight(173);
-            btnMsg.IsMoreLines = true;
-            btnMsg.TextAlignment = TextAlignment.Center;
-            btnMsg.TextColor = UserCenterColor.Current.TextGrayColor1;
-            btnMsg.Gravity = Gravity.CenterHorizontal;
-            frameBack.AddChidren(btnMsg);
-            btnMsg.Text = msgText;
-
-            var alarmMsg = Language.StringByID(R.MyInternationalizationString.XingTip);//.Replace("{0}", "\r\n");
-            var btnAlarmMsg = new NormalViewControl(frameBack.Width - Application.GetRealWidth(55 * 2), Application.GetRealHeight(104), false);
-            btnAlarmMsg.Y = Application.GetRealHeight(259);
-            btnAlarmMsg.IsMoreLines = true;
-            btnAlarmMsg.TextAlignment = TextAlignment.Center;
-            btnAlarmMsg.TextColor = ZigbeeColor.Current.XMAlarmText;
-            btnAlarmMsg.Gravity = Gravity.CenterHorizontal;
-            frameBack.AddChidren(btnAlarmMsg);
-            btnAlarmMsg.Text = alarmMsg;
-        }
-
+        {
+            //娑堟伅
+            var btnMsg = new NormalViewControl(frameBack.Width - Application.GetRealWidth(55 * 2), Application.GetRealHeight(63), false);
+            btnMsg.Y = Application.GetRealHeight(173);
+            btnMsg.IsMoreLines = true;
+            btnMsg.TextAlignment = TextAlignment.Center;
+            btnMsg.TextColor = UserCenterColor.Current.TextGrayColor1;
+            btnMsg.Gravity = Gravity.CenterHorizontal;
+            frameBack.AddChidren(btnMsg);
+            btnMsg.Text = msgText;
+
+            var alarmMsg = Language.StringByID(R.MyInternationalizationString.XingTip);//.Replace("{0}", "\r\n");
+            var btnAlarmMsg = new NormalViewControl(frameBack.Width - Application.GetRealWidth(55 * 2), Application.GetRealHeight(104), false);
+            btnAlarmMsg.Y = Application.GetRealHeight(259);
+            btnAlarmMsg.IsMoreLines = true;
+            btnAlarmMsg.TextAlignment = TextAlignment.Center;
+            btnAlarmMsg.TextColor = ZigbeeColor.Current.XMAlarmText;
+            btnAlarmMsg.Gravity = Gravity.CenterHorizontal;
+            frameBack.AddChidren(btnAlarmMsg);
+            btnAlarmMsg.Text = alarmMsg;
+        }
+
         /// <summary>
         /// 澶辨晥鏃堕棿璁剧疆鐨勫脊绐楁樉绀�
         /// </summary>
         /// <param name="frameMain"></param>
         /// <param name="frameBack"></param>
         private void InitInValidTimeDialog(FrameLayout frameBack)
-        {
-            //娑堟伅 
-            string[] msgArray = msgText.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
-            var btnMsg1 = new Button()
-            {
-                Width = Application.GetRealWidth(389),
-                Height = Application.GetRealHeight(180),
-                Y = Application.GetRealHeight(141),
-                IsMoreLines = false,
-                TextColor = UserCenterColor.Current.TextGrayColor1,
-                TextAlignment = TextAlignment.CenterRight,
-                Text = msgArray[0],
-            };
-            frameBack.AddChidren(btnMsg1);
-
-            //澶辨晥鏃堕棿璁剧疆
-            var editTextFrameLayout = new FrameLayout()
-            {
-                Width = Application.GetRealWidth(132),
-                Height = Application.GetRealHeight(81 + 40 * 2),
-                Y = Application.GetRealHeight(184 - 40),
-                X = btnMsg1.Right,
-            };
-            frameBack.AddChidren(editTextFrameLayout);
-            editInvalidTime = new EditText()
-            {
-                Height = Application.GetRealHeight(81),
-                X = Application.GetRealWidth(132),
-                Y = Application.GetRealHeight(40),
-                Gravity = Gravity.Center,
-                Radius = (uint)Application.GetMinRealAverage(17),
-                BackgroundColor = ZigbeeColor.Current.XMPEditTextBackground,
-                TextColor = ZigbeeColor.Current.XMBlack,
-                TextAlignment = TextAlignment.Center,
-                TextSize = 14,
-                Text = DoorLockCommonInfo.NormallyOpenModeInvalidTime.ToString(),
-                PlaceholderTextColor = ZigbeeColor.Current.XMGray3,
-                IsNumberKeyboardType = true,
-            };
-            editTextFrameLayout.AddChidren(editInvalidTime);
-
-
-            var btnMsg2 = new Button()
-            {
-                Width = Application.GetRealWidth(271),
-                Height = Application.GetRealHeight(180),
-                Y = Application.GetRealHeight(141),
-                X = editTextFrameLayout.Right,
-                IsMoreLines = false,
-                TextColor = UserCenterColor.Current.TextGrayColor1,
-                TextAlignment = TextAlignment.CenterLeft,
-                Text = msgArray[1]
-            };
-            frameBack.AddChidren(btnMsg2);
-        }
-
+        {
+            //娑堟伅 
+            string[] msgArray = msgText.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
+            var btnMsg1 = new Button()
+            {
+                Width = Application.GetRealWidth(389),
+                Height = Application.GetRealHeight(180),
+                Y = Application.GetRealHeight(141),
+                IsMoreLines = false,
+                TextColor = UserCenterColor.Current.TextGrayColor1,
+                TextAlignment = TextAlignment.CenterRight,
+                Text = msgArray[0],
+            };
+            frameBack.AddChidren(btnMsg1);
+
+            //澶辨晥鏃堕棿璁剧疆
+            var editTextFrameLayout = new FrameLayout()
+            {
+                Width = Application.GetRealWidth(132),
+                Height = Application.GetRealHeight(81 + 40 * 2),
+                Y = Application.GetRealHeight(184 - 40),
+                X = btnMsg1.Right,
+            };
+            frameBack.AddChidren(editTextFrameLayout);
+            editInvalidTime = new EditText()
+            {
+                Height = Application.GetRealHeight(81),
+                X = Application.GetRealWidth(132),
+                Y = Application.GetRealHeight(40),
+                Gravity = Gravity.Center,
+                Radius = (uint)Application.GetMinRealAverage(17),
+                BackgroundColor = ZigbeeColor.Current.XMPEditTextBackground,
+                TextColor = ZigbeeColor.Current.XMBlack,
+                TextAlignment = TextAlignment.Center,
+                TextSize = 14,
+                Text = DoorLockCommonInfo.NormallyOpenModeInvalidTime.ToString(),
+                PlaceholderTextColor = ZigbeeColor.Current.XMGray3,
+                IsNumberKeyboardType = true,
+            };
+            editTextFrameLayout.AddChidren(editInvalidTime);
+            editInvalidTime.TextChangeEventHandler += (sender, e) =>
+            {
+                if (!string.IsNullOrEmpty((sender as EditText).Text))
+                {
+                    var textFir = (sender as EditText).Text.Substring(0, 1);
+                    if ((sender as EditText).Text.Length > 1)
+                    {
+                        if (textFir == "0")
+                        {
+                            editInvalidTime.Text = (sender as EditText).Text.Substring(1, 1);
+                        }
+                    }
+                    if (int.Parse((sender as EditText).Text) > 72)
+                    {
+                        string msg0 = Language.StringByID(R.MyInternationalizationString.InvalidTimeMoreThan72);
+                        var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal, msg0, Language.StringByID(R.MyInternationalizationString.confrim));
+                        alert.Show();
+                        editInvalidTime.Text = "72";
+                    }
+                }
+            };
+
+            var btnMsg2 = new Button()
+            {
+                Width = Application.GetRealWidth(271),
+                Height = Application.GetRealHeight(180),
+                Y = Application.GetRealHeight(141),
+                X = editTextFrameLayout.Right,
+                IsMoreLines = false,
+                TextColor = UserCenterColor.Current.TextGrayColor1,
+                TextAlignment = TextAlignment.CenterLeft,
+                Text = msgArray[1]
+            };
+            frameBack.AddChidren(btnMsg2);
+        }
+
         /// <summary>
         /// 澶辨晥璁剧疆鐨勫簳閮ㄦ寜閽�
         /// </summary>
@@ -295,8 +315,8 @@
             btnDoorLockLogic.ButtonClickEvent += (sender, e) =>
             {
                 //绉婚櫎鐣岄潰
-                frameMain.RemoveFromParent();
-                //鍥炶皟鍑芥暟
+                frameMain.RemoveFromParent();
+                //鍥炶皟鍑芥暟
                 this.LogicClickEvent?.Invoke();
                 this.LogicClickEvent = null;
             };
@@ -326,16 +346,16 @@
             var btnCancel = new BottomLeftClickButton(Application.GetRealWidth(396), Application.GetRealHeight(127));
             frameBack.AddChidren(btnCancel);
             var bottomLeftText = Language.StringByID(R.MyInternationalizationString.uCancel);
-            if (msgType == DoorLockMsgType.NomallyOpenMode || msgType == DoorLockMsgType.CancelNomallyOpenModeWithLogic)
-            {
-                bottomLeftText = Language.StringByID(R.MyInternationalizationString.KeepNomallyMode);
+            if (msgType == DoorLockMsgType.NomallyOpenMode || msgType == DoorLockMsgType.CancelNomallyOpenModeWithLogic)
+            {
+                bottomLeftText = Language.StringByID(R.MyInternationalizationString.KeepNomallyMode);
             }
             btnCancel.InitControl(bottomLeftText);
             btnCancel.ButtonClickEvent += (sender, e) =>
             {
                 //绉婚櫎鐣岄潰
-                frameMain.RemoveFromParent();
-                //鍥炶皟鍑芥暟
+                frameMain.RemoveFromParent();
+                //鍥炶皟鍑芥暟
                 this.CancelClickEvent?.Invoke();
                 this.CancelClickEvent = null;
             };
@@ -345,39 +365,39 @@
             frameBack.AddChidren(btnConfirm);
             btnConfirm.InitControl(buttonOkText);
             btnConfirm.ButtonClickEvent += (sender, e) =>
-            {
-                string textValue = string.Empty;
+            {
+                string textValue = string.Empty;
                 if (editInvalidTime != null)
                 {
                     textValue = editInvalidTime.Text.Trim();
                     if (this.CheckInvalidTime(textValue.TrimStart('0')) == false)
                     {
                         return;
-                    }
-                }
-                //绉婚櫎鐣岄潰
+                    }
+                }
+                //绉婚櫎鐣岄潰
                 frameMain.RemoveFromParent();
-                if (msgType == DoorLockMsgType.InValid)
-                {
-                    if (InvalidTimeAction != null)
-                    {
-                        InvalidTimeAction(textValue);
-                    }
-                }
-                else
-                {
-                    //鍥炶皟鍑芥暟
-                    this.ConfirmClickEvent?.Invoke();
-                    this.ConfirmClickEvent = null;
-                }
+                if (msgType == DoorLockMsgType.InValid)
+                {
+                    if (InvalidTimeAction != null)
+                    {
+                        InvalidTimeAction(textValue);
+                    }
+                }
+                else
+                {
+                    //鍥炶皟鍑芥暟
+                    this.ConfirmClickEvent?.Invoke();
+                    this.ConfirmClickEvent = null;
+                }
             };
-        }
-
+        }
+
         /// <summary>
         /// 妫�娴嬪け鏁堟椂闂�
         /// </summary>
         /// <param name="tetxValue"></param>
-        /// <returns></returns>
+        /// <returns></returns>
         private bool CheckInvalidTime(string tetxValue)
         {
             if (tetxValue == string.Empty)
@@ -418,35 +438,35 @@
                 return false;
             }
             return true;
-        }
-
+        }
+
         #endregion
-
+
         /// <summary>
         /// 淇℃伅鏄剧ず鐨勭被鍨�
         /// </summary>
-        public enum DoorLockMsgType
-        {
+        public enum DoorLockMsgType
+        {
             /// <summary>
             /// 纭绫诲瀷
             /// </summary>
-            Confirm = 1,
+            Confirm = 1,
             /// <summary>
             /// 澶辨晥璁剧疆
             /// </summary>
-            InValid = 2,
+            InValid = 2,
             /// <summary>
             /// 閫昏緫绫诲瀷
             /// </summary>
-            DoorLockLogic = 3,
+            DoorLockLogic = 3,
             /// <summary>
             /// 甯稿紑妯″紡
             /// </summary>
-            NomallyOpenMode = 4,
+            NomallyOpenMode = 4,
             /// <summary>
             /// 鍙栨秷甯︽湁閫昏緫鐨勫父寮�妯″紡
             /// </summary>
-            CancelNomallyOpenModeWithLogic = 5,
-        }
-    }
-}
+            CancelNomallyOpenModeWithLogic = 5,
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs
index dfa00d7..d259aeb 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs
@@ -628,6 +628,7 @@
                                      var localDoorLockObj = new ZigBee.Device.DoorLock.LocaDoorLockObj() { };
                                      localDoorLockObj.UserID = curDoorLockUser.UserID;
                                      localDoorLockObj.UnlockType = curDoorLockUser.UnlockType;
+                                     localDoorLockObj.PrimaryId = curDoorLockUser.PrimaryId;
                                      localDoorLockObj.EntryTime = curDoorLockUser.EntryTime;
                                      localDoorLockObj.UserName = refreshDoorLockData.UserIdRemarks;
                                      localDoorLockObj.ConnectedAccount = curAccountObj.SubAccountDistributedMark;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
index fdac3f9..6b5ed4f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -47,7 +47,7 @@
         /// </summary>
         bool canVolume = false;
         /// <summary>
-        /// 淇濈暀涓婁竴娆¢煶閲�
+        /// 鏄惁鏀寔甯稿紑
         /// </summary>
         bool canOpenNormallyMode = false;
         /// <summary>
@@ -685,12 +685,10 @@
                             {
                                 tempRes = false;
                             }
-
-                            NormallyOpenModeValue(tempRes);
-
+                            DoorLockCommonInfo.NormallyOpenModeValue(doorLock, tempRes);
                             Application.RunOnMainThread(async () =>
                             {
-                                var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist();
+                                var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist(2);
                                 if (resTemp == 1)
                                 {
                                     HaveLogicNormallyOpenMode = true;
@@ -790,8 +788,9 @@
             //璁剧疆
             EventHandler<MouseEventArgs> btnFuncSetHander = (sender, e) =>
             {
-                //鎵撳紑鍏朵粬鐣岄潰鏃跺墠绉婚櫎
-                RemoveFromParent();
+                //鎵撳紑鍏朵粬鐣岄潰鏃跺墠绉婚櫎銆愭殏鏃朵笉绉婚櫎銆�
+                //RemoveFromParent();
+
                 var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(currentRoom, doorLock);
                 Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting);
                 Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
@@ -1036,28 +1035,41 @@
         }
         #endregion
 
-        #region 甯稿紑妯″紡 
-        /// <summary>
-        /// 闂ㄩ攣甯稿紑妯″紡鍊�
-        /// </summary>
-        public void NormallyOpenModeValue(bool value)
-        {
-            string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
-            if (doorLock.IsDoorLockNormallyMode.ContainsKey(key))
-            {
-                doorLock.IsDoorLockNormallyMode[key] = value;
-            }
-            else
-            {
-                doorLock.IsDoorLockNormallyMode.Add(key, value);
-            }
-        }
-
+        #region 甯稿紑妯″紡  
         /// <summary>
         /// 甯稿紑妯″紡澶勭悊
         /// </summary>
         private async void NomallyOpenDialog()
         {
+            #region 鍚庣画鐗堟湰
+            //if (UserCenterResourse.UserInfo.AuthorityNo != 1)
+            //{
+            //    this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate));
+            //    return;
+            //}
+
+            //if (!UserCenterResourse.AccountOption.DoorUnLockByRemote)
+            //{
+            //    SystemSecondAuthentication();
+            //    return;
+            //}
+
+            //action = () =>
+            //{
+            //    //绯荤粺瀵嗙爜鏀寔鎿嶄綔闂ㄩ攣鍚庯紝璋冪敤娓╁眳鍩庣殑鐣岄潰銆愬父寮�鑷姩鍖栥��
+            //    var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(currentRoom, doorLock);
+            //    Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting);
+            //    Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+            //    functionSetting.Show();
+            //    functionSetting.aaaAction = () =>
+            //   {
+            //       UpdateNomallyOpenStatus();
+            //   };
+            //};
+            //HdlCheckLogic.Current.CheckSecondarySecurity(action);
+            #endregion 
+
+            #region 鏆傛椂鐗堟湰 (鏈�缁堝幓鎺夛級
             if (!btnNormallyOpen.IsSelected)
             {
                 if (UserCenterResourse.UserInfo.AuthorityNo != 1)
@@ -1074,6 +1086,12 @@
 
                 action = () =>
                 {
+                    //绯荤粺瀵嗙爜鏀寔鎿嶄綔闂ㄩ攣鍚庯紝璋冪敤闂俯灞呭煄鐨勭晫闈€�愬父寮�鑷姩鍖栥��
+                    //Action nomallyOpenModeStartAction = () =>
+                    //{
+                    //    UpdateNomallyOpenStatus();
+                    //};
+
                     string msg = Language.StringByID(R.MyInternationalizationString.SetDoorLockNomallyOpen).Replace("{0}", "\r\n");
                     var confirm = Language.StringByID(R.MyInternationalizationString.Confrim);
                     var alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.Confirm, msg, confirm);
@@ -1102,7 +1120,7 @@
 
                             //姣忔閲嶆柊璁剧疆甯稿紑锛岄粯璁ゆ椂闂撮兘鏄�12灏忔椂
                             DoorLockCommonInfo.NormallyOpenModeInvalidTime = 12;
-                            NormallyOpenModeValue(true);
+                            DoorLockCommonInfo.NormallyOpenModeValue(doorLock, true);
                             Application.RunOnMainThread(() =>
                             {
                                 UpdateNomallyOpenStatus();
@@ -1113,6 +1131,7 @@
                             AlreadyOpenNormallyMode();
                         }
                     };
+
                 };
                 HdlCheckLogic.Current.CheckSecondarySecurity(action);
             }
@@ -1120,6 +1139,8 @@
             {
                 NomallyOpenModeInvalidDialog();
             }
+
+            #endregion
         }
 
         /// <summary>
@@ -1146,8 +1167,8 @@
             {
                 if (IsFromReport)
                 {
-                    //涓婃姤鈥滃父寮�妯″紡鈥濆凡琚彇娑堬紝app榛樿浜嗏�滃父寮�妯″紡鈥濊鍙栨秷
-                    NormallyOpenModeValue(false);
+                    //涓婃姤鈥滃父寮�妯″紡鈥濆凡琚彇娑堬紝app榛樿浜嗏�滃父寮�妯″紡鈥濊鍙栨秷 
+                    DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
                     Application.RunOnMainThread(() =>
                     {
                         UpdateNomallyOpenStatus();
@@ -1165,8 +1186,8 @@
                 }
                 else
                 {
-                    //app榛樿鈥滃父寮�妯″紡鈥濊繕鏄紑鍚�
-                    NormallyOpenModeValue(true);
+                    //app榛樿鈥滃父寮�妯″紡鈥濊繕鏄紑鍚� 
+                    DoorLockCommonInfo.NormallyOpenModeValue(doorLock, true);
                     Application.RunOnMainThread(() =>
                     {
                         UpdateNomallyOpenStatus();
@@ -1195,11 +1216,11 @@
                     var result = await doorLock.SetNormallyOpenModeFuncAsync(true);
                     if (result == null || result.defaultControlResponseData == null)
                     {
-                        string msg0 = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime);
-                        this.ShowTipMsg(msg0);
-                        NormallyOpenModeValue(false);
                         Application.RunOnMainThread(() =>
                         {
+                            string msg0 = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime);
+                            this.ShowTipMsg(msg0);
+                            DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
                             UpdateNomallyOpenStatus();
                         });
                         return;
@@ -1208,7 +1229,7 @@
                     {
                         string msg1 = Language.StringByID(R.MyInternationalizationString.OpenNormallyOpenModeFailed);
                         this.ShowTipMsg(msg1);
-                        NormallyOpenModeValue(false);
+                        DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
                         Application.RunOnMainThread(() =>
                         {
                             UpdateNomallyOpenStatus();
@@ -1217,8 +1238,8 @@
                     }
                     else
                     {
-                        //淇濇寔鈥滃父寮�鎴愬姛鈥�
-                        NormallyOpenModeValue(true);
+                        //淇濇寔鈥滃父寮�鎴愬姛鈥� 
+                        DoorLockCommonInfo.NormallyOpenModeValue(doorLock, true);
                         Application.RunOnMainThread(() =>
                         {
                             UpdateNomallyOpenStatus();
@@ -1237,8 +1258,8 @@
                 }
                 else
                 {
-                    //app鎿嶄綔涓嶅彇娑堚�滃父寮�妯″紡鈥�
-                    NormallyOpenModeValue(true);
+                    //app鎿嶄綔涓嶅彇娑堚�滃父寮�妯″紡鈥� 
+                    DoorLockCommonInfo.NormallyOpenModeValue(doorLock, true);
                     Application.RunOnMainThread(() =>
                     {
                         UpdateNomallyOpenStatus();
@@ -1250,8 +1271,8 @@
             {
                 if (IsFromReport)
                 {
-                    //涓婃姤闂ㄩ攣鈥滃父寮�妯″紡鈥濆凡缁忓彇娑堬紝鐜板湪app纭鈥滃父寮�妯″紡鈥濆彇娑�
-                    NormallyOpenModeValue(false);
+                    //涓婃姤闂ㄩ攣鈥滃父寮�妯″紡鈥濆凡缁忓彇娑堬紝鐜板湪app纭鈥滃父寮�妯″紡鈥濆彇娑� 
+                    DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
                     Application.RunOnMainThread(() =>
                     {
                         UpdateNomallyOpenStatus();
@@ -1290,8 +1311,8 @@
                         //娣诲姞App寮�鍚父寮�妯″紡鐨勫巻鍙茶褰�
                         HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(this.doorLock, 9002, string.Empty);
 
-                        //app纭鍙栨秷鈥滃父寮�妯″紡鈥濇垚鍔�
-                        NormallyOpenModeValue(false);
+                        //app纭鍙栨秷鈥滃父寮�妯″紡鈥濇垚鍔� 
+                        DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
                         Application.RunOnMainThread(() =>
                         {
                             UpdateNomallyOpenStatus();
@@ -1367,19 +1388,6 @@
 
             alertTimeInValidSetting.InvalidTimeAction += async (obj) =>
              {
-                 Regex rg = new Regex("^[0-9]+$");
-                 if (!rg.IsMatch(obj))
-                 {
-                     //蹇呴』鏄暟瀛�
-                     string msg0 = Language.StringByID(R.MyInternationalizationString.NormallyOpenModeInvalidTimeTip);
-                     this.ShowTipMsg(msg0);
-
-                     string msgTimeInValidSetting2 = Language.StringByID(R.MyInternationalizationString.DoorLockOpenAllTheTime);
-                     var timeConfrim2 = Language.StringByID(R.MyInternationalizationString.Confrim);
-                     var alertTimeInValidSetting2 = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.InValid, msgTimeInValidSetting2, timeConfrim2);
-                     alertTimeInValidSetting2.Show();
-                     return;
-                 }
                  //甯稿紑妯″紡澶辨晥鏃堕棿璁剧疆鎴愬姛
                  var temp = int.Parse(obj);
                  DoorLockCommonInfo.NormallyOpenModeInvalidTime = temp;
@@ -1389,8 +1397,8 @@
                  {
                      //榛樿鍒涘缓甯稿紑妯″紡澶辫触
                      string msg0 = Language.StringByID(R.MyInternationalizationString.AddLogicNormallyModeFailed);
-                     this.ShowTipMsg(msg0);
-
+                     var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal, msg0, Language.StringByID(R.MyInternationalizationString.confrim));
+                     alert.Show();
                      //浜屾鍔犺浇寮圭獥 甯稿紑妯″紡寮�鍚彁绀�
                      NomallyOpenModeInvalidTimeDialog();
                  }
@@ -1407,7 +1415,11 @@
                 btnNormallyOpenFrameLayout.Width = Application.GetRealWidth(0);
                 return;
             }
-            string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
+            string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
+            if (!doorLock.IsDoorLockNormallyMode.ContainsKey(key))
+            {
+                return;
+            }
             if (doorLock.IsDoorLockNormallyMode[key] == true)
             {
                 btnNormallyOpen.IsSelected = true;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs
index ce52da1..c6d8d0a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs
@@ -60,9 +60,9 @@
 
             //鍥炬爣
             var picGwImage = new FrameLayout();
-            picGwImage.Width = Application.GetMinRealAverage(861);
-            picGwImage.Height = Application.GetMinRealAverage(478);
-            picGwImage.Y = Application.GetRealWidth(251);
+            picGwImage.Width = this.GetPictrueRealSize(861);
+            picGwImage.Height = this.GetPictrueRealSize(478);
+            picGwImage.Y = Application.GetRealHeight(251);
             picGwImage.Gravity = Gravity.CenterHorizontal;
             picGwImage.BackgroundImagePath = "Gateway/WiredGatewaySearching.png";
             bodyFrameLayout.AddChidren(picGwImage);
@@ -89,8 +89,8 @@
 
             //鍥炬爣
             var picGwImage = new FrameLayout();
-            picGwImage.Width = Application.GetMinRealAverage(861);
-            picGwImage.Height = Application.GetMinRealAverage(478);
+            picGwImage.Width = this.GetPictrueRealSize(861);
+            picGwImage.Height = this.GetPictrueRealSize(478);
             picGwImage.Y = Application.GetRealWidth(158);
             picGwImage.Gravity = Gravity.CenterHorizontal;
             picGwImage.BackgroundImagePath = "Gateway/WiredGatewaySearching.png";
@@ -98,12 +98,12 @@
             var btnFailIcon = new PicViewControl(66, 66);
             btnFailIcon.UnSelectedImagePath = "Item/FailIcon.png";
             btnFailIcon.Gravity = Gravity.CenterHorizontal;
-            btnFailIcon.Y = Application.GetMinRealAverage(181);
+            btnFailIcon.Y = this.GetPictrueRealSize(181);
             picGwImage.AddChidren(btnFailIcon);
             //鎼滅储澶辫触
             var btnFailView = new NormalViewControl(300, 60, true);
             btnFailView.TextAlignment = TextAlignment.Center;
-            btnFailView.Y = Application.GetMinRealAverage(305);
+            btnFailView.Y = this.GetPictrueRealSize(305);
             btnFailView.Gravity = Gravity.CenterHorizontal;
             btnFailView.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnFailView.TextID = R.MyInternationalizationString.uSearchFail;
@@ -151,7 +151,7 @@
             bodyFrameLayout.AddChidren(btnMsg5);
 
             //閲嶈瘯
-            var frameback = new FrameLayoutControl();
+            var frameback = new FrameLayoutStatuControl();
             frameback.UseClickStatu = false;
             frameback.Y = Application.GetRealHeight(1259);
             frameback.Gravity = Gravity.CenterHorizontal;
@@ -202,11 +202,11 @@
         private void InitConcetionAnimete(FrameLayout picGwImage, NormalViewControl btnMsg)
         {
             //棣栨牸鐨刋杞�
-            int firstPoint = Application.GetMinRealAverage(288);
+            int firstPoint = this.GetPictrueRealSize(288);
             //涓�鏍肩殑瀹藉害
-            int width = Application.GetMinRealAverage(22);
+            int width = this.GetPictrueRealSize(22);
             //闂磋窛澶у皬
-            int space = Application.GetMinRealAverage(12);
+            int space = this.GetPictrueRealSize(12);
 
             //鐢熸垚鏍煎瓙鍧愭爣
             var listPoint = new List<int>();
@@ -219,7 +219,7 @@
             var btnRound = new PicViewControl(width, width, false);
             btnRound.Radius = (uint)width / 2;
             btnRound.BackgroundColor = UserCenterColor.Current.ConcetionRoundColor;
-            btnRound.Y = Application.GetMinRealAverage(202);
+            btnRound.Y = this.GetPictrueRealSize(202);
             btnRound.X = listPoint[0];
             picGwImage.AddChidren(btnRound);
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection1Form.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection1Form.cs
index 467eb3d..22423a0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection1Form.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection1Form.cs
@@ -33,8 +33,8 @@
 
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(392);
-            framePic.Height = Application.GetMinRealAverage(259);
+            framePic.Width = this.GetPictrueRealSize(392);
+            framePic.Height = this.GetPictrueRealSize(259);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(426);
             framePic.BackgroundImagePath = "Gateway/WirelessApDirection.png";
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs
index dee86aa..840b0f4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs
@@ -62,8 +62,8 @@
 
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(852);
-            framePic.Height = Application.GetMinRealAverage(478);
+            framePic.Width = this.GetPictrueRealSize(852);
+            framePic.Height = this.GetPictrueRealSize(478);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(285);
             framePic.BackgroundImagePath = "Gateway/WirelessGatewaySearching.png";
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection3Form.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection3Form.cs
index aa16a54..69bdde4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection3Form.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection3Form.cs
@@ -63,8 +63,8 @@
 
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(861);
-            framePic.Height = Application.GetMinRealAverage(245);
+            framePic.Width = this.GetPictrueRealSize(861);
+            framePic.Height = this.GetPictrueRealSize(245);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(363);
             framePic.BackgroundImagePath = "Gateway/WirelessApGatewaySearching.png";
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApSearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApSearchForm.cs
index b2414b7..b721d1b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApSearchForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApSearchForm.cs
@@ -82,8 +82,8 @@
 
             //鍥炬爣
             var picGwImage = new FrameLayout();
-            picGwImage.Width = Application.GetMinRealAverage(861);
-            picGwImage.Height = Application.GetMinRealAverage(245);
+            picGwImage.Width = this.GetPictrueRealSize(861);
+            picGwImage.Height = this.GetPictrueRealSize(245);
             picGwImage.Y = Application.GetRealWidth(223);
             picGwImage.Gravity = Gravity.CenterHorizontal;
             picGwImage.BackgroundImagePath = "Gateway/WirelessApGatewaySearching.png";
@@ -91,7 +91,7 @@
             var btnFailIcon = new PicViewControl(66, 66);
             btnFailIcon.UnSelectedImagePath = "Item/FailIcon.png";
             btnFailIcon.Gravity = Gravity.CenterHorizontal;
-            btnFailIcon.Y = Application.GetMinRealAverage(110);
+            btnFailIcon.Y = this.GetPictrueRealSize(110);
             picGwImage.AddChidren(btnFailIcon);
             //鎼滅储澶辫触
             var btnFailView = new NormalViewControl(300, 60, true);
@@ -144,7 +144,7 @@
             bodyFrameLayout.AddChidren(btnMsg5);
 
             //閲嶈瘯
-            var frameback = new FrameLayoutControl();
+            var frameback = new FrameLayoutStatuControl();
             frameback.UseClickStatu = false;
             frameback.Y = Application.GetRealHeight(1259);
             frameback.Gravity = Gravity.CenterHorizontal;
@@ -196,8 +196,8 @@
         {
             //鍥炬爣
             var btnGwImage = new FrameLayout();
-            btnGwImage.Width = Application.GetMinRealAverage(861);
-            btnGwImage.Height = Application.GetMinRealAverage(245);
+            btnGwImage.Width = this.GetPictrueRealSize(861);
+            btnGwImage.Height = this.GetPictrueRealSize(245);
             btnGwImage.Y = Application.GetRealHeight(360);
             btnGwImage.Gravity = Gravity.CenterHorizontal;
             btnGwImage.BackgroundImagePath = "Gateway/WirelessApGatewaySearching.png";
@@ -212,11 +212,11 @@
             bodyFrameLayout.AddChidren(btnMsg);
 
             //棣栨牸鐨刋杞�
-            int firstPoint = Application.GetMinRealAverage(275);
+            int firstPoint = this.GetPictrueRealSize(275);
             //涓�鏍肩殑瀹藉害
-            int width = Application.GetMinRealAverage(22);
+            int width = this.GetPictrueRealSize(22);
             //闂磋窛澶у皬
-            int space = Application.GetMinRealAverage(12);
+            int space = this.GetPictrueRealSize(12);
 
             //鐢熸垚鏍煎瓙鍧愭爣
             var listPoint = new List<int>();
@@ -229,7 +229,7 @@
             var btnRound = new PicViewControl(width, width, false);
             btnRound.Radius = (uint)width / 2;
             btnRound.BackgroundColor = UserCenterColor.Current.ConcetionRoundColor;
-            btnRound.Y = Application.GetMinRealAverage(135);
+            btnRound.Y = this.GetPictrueRealSize(135);
             btnRound.X = listPoint[0];
             btnGwImage.AddChidren(btnRound);
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpDirectionForm.cs
index 013dee5..90d4b15 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpDirectionForm.cs
@@ -33,8 +33,8 @@
 
             //鍥剧墖
             var framePic = new FrameLayout();
-            framePic.Width = Application.GetMinRealAverage(852);
-            framePic.Height = Application.GetMinRealAverage(478);
+            framePic.Width = this.GetPictrueRealSize(852);
+            framePic.Height = this.GetPictrueRealSize(478);
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(251);
             framePic.BackgroundImagePath = "Gateway/WirelessGatewaySearching.png";
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpSearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpSearchForm.cs
index 5a3c676..9b41e07 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpSearchForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpSearchForm.cs
@@ -82,8 +82,8 @@
 
             //鍥炬爣
             var picGwImage = new FrameLayout();
-            picGwImage.Width = Application.GetMinRealAverage(852);
-            picGwImage.Height = Application.GetMinRealAverage(478);
+            picGwImage.Width = this.GetPictrueRealSize(852);
+            picGwImage.Height = this.GetPictrueRealSize(478);
             picGwImage.Y = Application.GetRealWidth(158);
             picGwImage.Gravity = Gravity.CenterHorizontal;
             picGwImage.BackgroundImagePath = "Gateway/WirelessGatewaySearching.png";
@@ -91,12 +91,12 @@
             var btnFailIcon = new PicViewControl(66, 66);
             btnFailIcon.UnSelectedImagePath = "Item/FailIcon.png";
             btnFailIcon.Gravity = Gravity.CenterHorizontal;
-            btnFailIcon.Y = Application.GetMinRealAverage(200);
+            btnFailIcon.Y = this.GetPictrueRealSize(200);
             picGwImage.AddChidren(btnFailIcon);
             //鎼滅储澶辫触
             var btnFailView = new NormalViewControl(300, 60, true);
             btnFailView.TextAlignment = TextAlignment.Center;
-            btnFailView.Y = Application.GetMinRealAverage(305);
+            btnFailView.Y = this.GetPictrueRealSize(305);
             btnFailView.Gravity = Gravity.CenterHorizontal;
             btnFailView.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnFailView.TextID = R.MyInternationalizationString.uSearchFail;
@@ -144,7 +144,7 @@
             bodyFrameLayout.AddChidren(btnMsg5);
 
             //閲嶈瘯
-            var frameback = new FrameLayoutControl();
+            var frameback = new FrameLayoutStatuControl();
             frameback.UseClickStatu = false;
             frameback.Y = Application.GetRealHeight(1259);
             frameback.Gravity = Gravity.CenterHorizontal;
@@ -196,8 +196,8 @@
         {
             //鍥炬爣
             var btnGwImage = new FrameLayout();
-            btnGwImage.Width = Application.GetMinRealAverage(852);
-            btnGwImage.Height = Application.GetMinRealAverage(478);
+            btnGwImage.Width = this.GetPictrueRealSize(852);
+            btnGwImage.Height = this.GetPictrueRealSize(478);
             btnGwImage.Y = Application.GetRealHeight(193);
             btnGwImage.Gravity = Gravity.CenterHorizontal;
             btnGwImage.BackgroundImagePath = "Gateway/WirelessGatewaySearching.png";
@@ -212,11 +212,11 @@
             bodyFrameLayout.AddChidren(btnMsg);
 
             //棣栨牸鐨刋杞�
-            int firstPoint = Application.GetMinRealAverage(280);
+            int firstPoint = this.GetPictrueRealSize(280);
             //涓�鏍肩殑瀹藉害
-            int width = Application.GetMinRealAverage(22);
+            int width = this.GetPictrueRealSize(22);
             //闂磋窛澶у皬
-            int space = Application.GetMinRealAverage(12);
+            int space = this.GetPictrueRealSize(12);
 
             //鐢熸垚鏍煎瓙鍧愭爣
             var listPoint = new List<int>();
@@ -229,7 +229,7 @@
             var btnRound = new PicViewControl(width, width, false);
             btnRound.Radius = (uint)width / 2;
             btnRound.BackgroundColor = UserCenterColor.Current.ConcetionRoundColor;
-            btnRound.Y = Application.GetMinRealAverage(225);
+            btnRound.Y = this.GetPictrueRealSize(225);
             btnRound.X = listPoint[0];
             btnGwImage.AddChidren(btnRound);
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayAddSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayAddSuccessForm.cs
index be082e4..de5e249 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayAddSuccessForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayAddSuccessForm.cs
@@ -59,7 +59,7 @@
             bodyFrameLayout.AddChidren(btnMsg);
 
             //缁х画娣诲姞缃戝叧
-            var frameAdd = new FrameLayoutControl();
+            var frameAdd = new FrameLayoutStatuControl();
             frameAdd.UseClickStatu = false;
             frameAdd.Y = Application.GetRealHeight(1224);
             frameAdd.Gravity = Gravity.CenterHorizontal;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs
index c8523c8..e334f30 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayBackUpListForm.cs
@@ -238,20 +238,20 @@
                     //鏄剧ず缂栬緫澶囪�冨悕鐢婚潰
                     this.ShowEditorBackupForm(fileInfo);
                 };
-            }
 
-            //鍒犻櫎
-            var btnDelete = rowLayout.AddDeleteControl();
-            btnDelete.ButtonClickEvent += (sender, e) =>
-            {
-                //纭鍒犻櫎璇ュ浠芥暟鎹�?
-                string msg = Language.StringByID(R.MyInternationalizationString.uDoDeleteBackupMsg);
-                this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+                //鍒犻櫎
+                var btnDelete = rowLayout.AddDeleteControl();
+                btnDelete.ButtonClickEvent += (sender, e) =>
                 {
-                    //鍒犻櫎澶囦唤鏂囨。
-                    this.DeleteBackInfo(fileInfo.Id);
-                });
-            };
+                    //纭鍒犻櫎璇ュ浠芥暟鎹�?
+                    string msg = Language.StringByID(R.MyInternationalizationString.uDoDeleteBackupMsg);
+                    this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+                    {
+                        //鍒犻櫎澶囦唤鏂囨。
+                        this.DeleteBackInfo(fileInfo.Id);
+                    });
+                };
+            }
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs
index 83e6910..04abc3d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs
@@ -7,7 +7,7 @@
     /// <summary>
     /// 寮曞鐣岄潰鐨勫叡閫氱晫闈�
     /// </summary>
-    public class GuideCommonForm : FrameLayout
+    public class GuideCommonForm : FrameLayoutBase
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
@@ -243,8 +243,8 @@
             //涓婚〉
             var btnMenuHome = new IconViewControl(10, false);
             btnMenuHome.X = Application.GetRealWidth(109);
-            btnMenuHome.Width = Application.GetMinRealAverage(138);
-            btnMenuHome.Height = Application.GetMinRealAverage(98);
+            btnMenuHome.Width = this.GetPictrueRealSize(138);
+            btnMenuHome.Height = this.GetPictrueRealSize(98);
             btnMenuHome.UnSelectedImagePath = "Navigation/HomeSelected.png";
             frameMenu.AddChidren(btnMenuHome);
             var btnMenuHomeName = new NormalViewControl(btnMenuHome.Width, Application.GetRealHeight(40), false);
@@ -259,8 +259,8 @@
             //鍒嗙被
             var btnFenlei = new IconViewControl(10, false);
             btnFenlei.X = Application.GetRealWidth(469);
-            btnFenlei.Width = Application.GetMinRealAverage(138);
-            btnFenlei.Height = Application.GetMinRealAverage(98);
+            btnFenlei.Width = this.GetPictrueRealSize(138);
+            btnFenlei.Height = this.GetPictrueRealSize(98);
             btnFenlei.UnSelectedImagePath = "Navigation/Category.png";
             frameMenu.AddChidren(btnFenlei);
             var btnFenleiName = new NormalViewControl(btnFenlei.Width, Application.GetRealHeight(40), false);
@@ -275,8 +275,8 @@
             //鎴戠殑
             var btnMy = new IconViewControl(10, false);
             btnMy.X = Application.GetRealWidth(832);
-            btnMy.Width = Application.GetMinRealAverage(138);
-            btnMy.Height = Application.GetMinRealAverage(98);
+            btnMy.Width = this.GetPictrueRealSize(138);
+            btnMy.Height = this.GetPictrueRealSize(98);
             btnMy.UnSelectedImagePath = "Navigation/Setting.png";
             frameMenu.AddChidren(btnMy);
             var btnMyName = new NormalViewControl(btnMy.Width, Application.GetRealHeight(40), false);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupForm.cs
index 266fc22..2d30198 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupForm.cs
@@ -60,7 +60,7 @@
             bodyFrameLayout.AddChidren(btnMsg);
 
             //绔嬪嵆澶囦唤(鎺ㄨ崘)
-            var frameback = new FrameLayoutControl();
+            var frameback = new FrameLayoutStatuControl();
             frameback.UseClickStatu = false;
             frameback.Y = Application.GetRealHeight(1201);
             frameback.Gravity = Gravity.CenterHorizontal;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs
index 8f53bac..b2c2409 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs
@@ -219,20 +219,20 @@
                     //鏄剧ず缂栬緫澶囪�冨悕鐢婚潰
                     this.ShowEditorBackupForm(fileInfo);
                 };
-            }
 
-            //鍒犻櫎
-            var btnDelete = rowLayout.AddDeleteControl();
-            btnDelete.ButtonClickEvent += (sender, e) =>
-            {
-                //纭鍒犻櫎璇ュ浠芥暟鎹�?
-                string msg = Language.StringByID(R.MyInternationalizationString.uDoDeleteBackupMsg);
-                this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+                //鍒犻櫎
+                var btnDelete = rowLayout.AddDeleteControl();
+                btnDelete.ButtonClickEvent += (sender, e) =>
                 {
-                    //鍒犻櫎澶囦唤鏂囨。
-                    this.DeleteBackInfo(fileInfo.Id, ShowErrorMode.YES);
-                });
-            };
+                    //纭鍒犻櫎璇ュ浠芥暟鎹�?
+                    string msg = Language.StringByID(R.MyInternationalizationString.uDoDeleteBackupMsg);
+                    this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+                    {
+                        //鍒犻櫎澶囦唤鏂囨。
+                        this.DeleteBackInfo(fileInfo.Id, ShowErrorMode.YES);
+                    });
+                };
+            }
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionDirectoryListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionDirectoryListForm.cs
index cfdeb44..43f19bc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionDirectoryListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionDirectoryListForm.cs
@@ -60,13 +60,25 @@
             listView.AddChidren(row1);
             row1.AddLeftCaption("鏍圭洰褰曟枃浠�", 800);
             row1.AddRightArrow();
-
+            row1.AddBottomLine();
             row1.ButtonClickEvent += (sender, e) =>
             {
                 var form = new HideOptionFileListForm();
                 form.AddForm(UserCenterLogic.CombinePath());
             };
 
+            //鏌ョ湅鍏ㄩ儴鏂囦欢
+            var row2 = new FrameRowControl(listView.rowSpace / 2);
+            listView.AddChidren(row2);
+            row2.AddLeftCaption("鏌ョ湅鍏ㄩ儴鏂囦欢", 800);
+            row2.AddRightArrow();
+
+            row2.ButtonClickEvent += (sender, e) =>
+            {
+                var form = new HideOptionSearchAllFile();
+                form.AddForm(Shared.IO.FileUtils.RootPath);
+            };
+
             listView.AdjustRealHeight(Application.GetRealHeight(23));
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs
index 2eda89e..dd5e4ed 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileContentForm.cs
@@ -36,8 +36,8 @@
             {
                 var btnPic = new ImageView();
                 btnPic.Y = Application.GetRealHeight(60);
-                btnPic.Width = Application.GetMinRealAverage(887);
-                btnPic.Height = Application.GetMinRealAverage(444);
+                btnPic.Width = this.GetPictrueRealSize(887);
+                btnPic.Height = this.GetPictrueRealSize(444);
                 btnPic.Gravity = Gravity.CenterHorizontal;
                 btnPic.Radius= (uint)Application.GetRealHeight(17);
                 btnPic.ImageBytes = Shared.IO.FileUtils.ReadFile(i_file);
@@ -62,7 +62,6 @@
                 btnText.TextAlignment = TextAlignment.TopLeft;
                 btnText.TextColor = UserCenterColor.Current.TextColor1;
                 btnText.Text = textValue;
-                btnText.Enable = false;
                 bodyFrameLayout.AddChidren(btnText);
             }
         }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileListForm.cs
index d712c7c..0f19b03 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionFileListForm.cs
@@ -34,7 +34,7 @@
             btnButton.TextColor = UserCenterColor.Current.TopLayoutTitleText;
             btnButton.TextAlignment = TextAlignment.BottomRight;
             btnButton.TextSize = 17;
-            btnButton.Text = "瑙e瘑";
+            btnButton.Text = "缈昏瘧";
             topFrameLayout.AddChidren(btnButton);
             btnButton.ButtonClickEvent += (sender, e) =>
             {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs
index 16c2cb3..1b5698f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs
@@ -55,7 +55,7 @@
 
             this.AddTopButtomRowControl("浣忓畢ID", 400, Common.Config.Instance.Home.Id, 900);
 
-            this.AddTopButtomRowControl("璐﹀彿GUID", 400, Common.Config.Instance.Home.MainUserDistributedMark, 900);
+            this.AddTopButtomRowControl("璐﹀彿GUID", 400, string.IsNullOrEmpty(Common.Config.Instance.Guid) == true ? Common.Config.Instance.Home.MainUserDistributedMark : Common.Config.Instance.Guid, 900);
 
             this.AddNormalRowControl("浣忓畢鍒嗕韩", 400, Common.Config.Instance.Home.IsOthreShare == true ? "鏄�" : "鍚�", 400);
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs
new file mode 100755
index 0000000..4e4a511
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionSearchAllFile.cs
@@ -0,0 +1,220 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter.HideOption
+{
+    /// <summary>
+    /// 鏌ョ湅鍏ㄩ儴鏂囦欢
+    /// </summary>
+    public class HideOptionSearchAllFile : EditorCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 瑙e瘑
+        /// </summary>
+        private bool decryptPassword = false;
+        private string nowDirectory = string.Empty;
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        public void ShowForm(string directory)
+        {
+            this.nowDirectory = directory;
+            //璁剧疆澶撮儴淇℃伅
+            base.SetTitleText("鏂囦欢鍒楄〃");
+
+            var btnButton = new NormalViewControl(200, 69, true);
+            btnButton.Gravity = Gravity.CenterVertical;
+            btnButton.X = bodyFrameLayout.Width - Application.GetRealWidth(200) - ControlCommonResourse.XXLeft;
+            btnButton.TextColor = UserCenterColor.Current.TopLayoutTitleText;
+            btnButton.TextAlignment = TextAlignment.BottomRight;
+            btnButton.TextSize = 17;
+            btnButton.Text = "缈昏瘧";
+            topFrameLayout.AddChidren(btnButton);
+            btnButton.ButtonClickEvent += (sender, e) =>
+            {
+                if (this.decryptPassword == false)
+                {
+                    this.decryptPassword = true;
+                    //鍒濆鍖栦腑閮ㄤ俊鎭�
+                    this.InitMiddleFrame(nowDirectory);
+                }
+            };
+
+            //鍒濆鍖栦腑閮ㄤ俊鎭�
+            this.InitMiddleFrame(nowDirectory);
+
+            this.BackButtonClickEvent += (btnContr) =>
+            {
+                string rootPath = Shared.IO.FileUtils.RootPath.Trim('/');
+                if (this.nowDirectory.Trim('/') == rootPath)
+                {
+                    this.CloseForm();
+                    return;
+                }
+                string[] Arry = this.nowDirectory.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
+                string nextDir = string.Empty;
+                for (int i = 0; i < Arry.Length - 1; i++)
+                {
+                    nextDir += Arry[i] + "/";
+                }
+                //鍒濆鍖栦腑閮ㄤ俊鎭�
+                this.InitMiddleFrame(nextDir);
+            };
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+        /// </summary>
+        private void InitMiddleFrame(string directory)
+        {
+            this.nowDirectory = directory;
+            this.ClearBodyFrame();
+
+            var listDirectory = new List<string>();
+            var listAllFile = new List<string>();
+
+            string rootPath = Shared.IO.FileUtils.RootPath.Trim('/');
+            if (this.nowDirectory.Trim('/') == rootPath)
+            {
+                //鏍圭洰褰曞彧瑕佷袱涓氨鍙互浜�
+                listDirectory.Add(Common.Config.Instance.Guid);
+                listDirectory.Add(Application.Skin != null ? Application.Skin : "Phone");
+            }
+            else
+            {
+                var files = System.IO.Directory.GetDirectories(directory);
+                foreach (var file in files)
+                {
+                    string[] arry = file.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
+                    listDirectory.Add(arry[arry.Length - 1]);
+                }
+                listDirectory.Sort();
+
+                listAllFile = HdlAutoBackupLogic.GetFileFromDirectory(directory.TrimEnd('/'));
+                listAllFile.Sort();
+            }
+
+            var listView = new VerticalListControl(23);
+            listView.BackgroundColor = UserCenterColor.Current.White;
+            listView.Height = bodyFrameLayout.Height;
+            bodyFrameLayout.AddChidren(listView);
+
+            if (listDirectory.Count > 0)
+            {
+                var row1 = new RowLayoutControl(listView.rowSpace / 2);
+                listView.AddChidren(row1);
+                row1.frameTable.UseClickStatu = false;
+                row1.frameTable.AddLeftCaption("銆愭枃浠跺す鍒楄〃銆�", 800);
+
+                for (int i = 0; i < listDirectory.Count; i++)
+                {
+                    this.AddDirectoryRowControl(listView, listDirectory[i], directory, i != listDirectory.Count - 1);
+                }
+            }
+
+            if (listAllFile.Count > 0)
+            {
+                var row1 = new RowLayoutControl(listView.rowSpace / 2);
+                listView.AddChidren(row1);
+                row1.frameTable.UseClickStatu = false;
+                row1.frameTable.AddLeftCaption("銆愭枃浠跺垪琛ㄣ��", 800);
+                for (int i = 0; i < listAllFile.Count; i++)
+                {
+                    this.AddFileRowControl(listView, listAllFile[i], directory, i != listAllFile.Count - 1);
+                }
+            }
+            listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(50));
+        }
+
+        private void AddDirectoryRowControl(VerticalListControl listView, string directoryName, string directory, bool addLine)
+        {
+            string dirNewName = directoryName;
+            if (decryptPassword == true)
+            {
+                try
+                {
+                    dirNewName = UserCenterLogic.DecryptPassword(UserCenterResourse.FileEncryptKey, directoryName);
+                }
+                catch { dirNewName = directoryName; }
+            }
+
+            var row1 = new RowLayoutControl(listView.rowSpace / 2);
+            listView.AddChidren(row1);
+            var btnName = row1.frameTable.AddLeftCaption(dirNewName, 800);
+            btnName.IsMoreLines = true;
+            if (addLine == true)
+            {
+                row1.frameTable.AddBottomLine();
+            }
+            row1.frameTable.AddRightArrow();
+
+            row1.frameTable.ButtonClickEvent += (sender, e) =>
+            {
+                //鍒濆鍖栦腑閮ㄤ俊鎭�
+                this.decryptPassword = false;
+                this.InitMiddleFrame(System.IO.Path.Combine(directory, directoryName));
+            };
+        }
+
+        private void AddFileRowControl(VerticalListControl listView, string fileName, string directory, bool addLine)
+        {
+            string fileNewName = fileName;
+            if (decryptPassword == true && fileName.StartsWith("Device_") == false)
+            {
+                try
+                {
+                    fileNewName = UserCenterLogic.DecryptPassword(UserCenterResourse.FileEncryptKey, fileName);
+                }
+                catch { fileNewName = fileName; }
+            }
+
+            var row1 = new RowLayoutControl(listView.rowSpace / 2);
+            listView.AddChidren(row1);
+            var btnName = row1.frameTable.AddLeftCaption(fileNewName, 800);
+            btnName.IsMoreLines = true;
+            if (addLine == true)
+            {
+                row1.frameTable.AddBottomLine();
+            }
+            row1.frameTable.AddRightArrow();
+
+            var btnDelete = row1.AddDeleteControl();
+            btnDelete.ButtonClickEvent += (sender, e) =>
+            {
+                this.ShowMassage(ShowMsgType.Confirm, "鏄惁娓呴櫎璇ョ紦瀛樻枃浠�", () =>
+                {
+                    var myFile = System.IO.Path.Combine(directory, fileName);
+                    try
+                    {
+                        System.IO.File.Delete(myFile);
+                        row1.RemoveFromParent();
+                    }
+                    catch (Exception ex)
+                    {
+                        this.ShowMassage(ShowMsgType.Error, "娓呴櫎缂撳瓨鏂囦欢寮傚父");
+                        HdlLogLogic.Current.WriteLog(ex, "娓呴櫎缂撳瓨鏂囦欢寮傚父");
+                    }
+                });
+            };
+
+            row1.frameTable.ButtonClickEvent += (sender, e) =>
+            {
+                var form = new HideOptionFileContentForm();
+                form.AddForm(System.IO.Path.Combine(directory, fileName));
+            };
+        }
+
+        #endregion
+
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
index 749b70d..f013a0f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
@@ -45,9 +45,9 @@
 
             //澶村儚
             var btnUserIcon = new ImageView();
-            btnUserIcon.Height = Application.GetMinRealAverage(207);
-            btnUserIcon.Width = Application.GetMinRealAverage(207);
-            btnUserIcon.Radius = (uint)Application.GetMinRealAverage(207) / 2;
+            btnUserIcon.Height = this.GetPictrueRealSize(207);
+            btnUserIcon.Width = this.GetPictrueRealSize(207);
+            btnUserIcon.Radius = (uint)this.GetPictrueRealSize(207) / 2;
             if (memberResult.HeadImage != null)
             {
                 btnUserIcon.ImageBytes = memberResult.HeadImage;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs
index f6661fe..ecdad76 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs
@@ -59,9 +59,9 @@
             //鐢ㄦ埛鍥炬爣
             string iconPath = System.IO.Path.Combine(UserCenterResourse.AccountOption.UserPictruePath, i_iconMark + ".png");
             var btnUserIcon = new ImageView();
-            btnUserIcon.Height = Application.GetMinRealAverage(207);
-            btnUserIcon.Width = Application.GetMinRealAverage(207);
-            btnUserIcon.Radius = (uint)Application.GetMinRealAverage(207) / 2;
+            btnUserIcon.Height = this.GetPictrueRealSize(207);
+            btnUserIcon.Width = this.GetPictrueRealSize(207);
+            btnUserIcon.Radius = (uint)this.GetPictrueRealSize(207) / 2;
             btnUserIcon.Y = Application.GetRealHeight(104);
             btnUserIcon.Gravity = Gravity.CenterHorizontal;
             if (System.IO.File.Exists(iconPath) == true)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
index 72b2353..d5b2cbd 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
@@ -105,9 +105,9 @@
 
             //鐢ㄦ埛鍥炬爣
             var btnUserIcon = new ImageView();
-            btnUserIcon.Height = Application.GetMinRealAverage(207);
-            btnUserIcon.Width = Application.GetMinRealAverage(207);
-            btnUserIcon.Radius = (uint)Application.GetMinRealAverage(207) / 2;
+            btnUserIcon.Height = this.GetPictrueRealSize(207);
+            btnUserIcon.Width = this.GetPictrueRealSize(207);
+            btnUserIcon.Radius = (uint)this.GetPictrueRealSize(207) / 2;
             btnUserIcon.ImagePath = UserCenterResourse.UserInfo.UserIconFile;
             btnUserIcon.Y = Application.GetRealHeight(46);
             btnUserIcon.Gravity = Gravity.CenterHorizontal;
@@ -285,9 +285,9 @@
             var btnIcon = new ImageView();
             btnIcon.X = ControlCommonResourse.XXLeft;
             btnIcon.Gravity = Gravity.CenterVertical;
-            btnIcon.Height = Application.GetMinRealAverage(115);
-            btnIcon.Width = Application.GetMinRealAverage(115);
-            btnIcon.Radius = (uint)Application.GetMinRealAverage(115) / 2;
+            btnIcon.Height = this.GetPictrueRealSize(115);
+            btnIcon.Width = this.GetPictrueRealSize(115);
+            btnIcon.Radius = (uint)this.GetPictrueRealSize(115) / 2;
             if (System.IO.File.Exists(iconPath) == true)
             {
                 btnIcon.ImagePath = iconPath;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
index f5ddef9..658ee39 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
@@ -116,9 +116,9 @@
             //鐢ㄦ埛鍥炬爣
             string iconPath = System.IO.Path.Combine(UserCenterResourse.AccountOption.UserPictruePath, memberInfo.DistributedMark + ".png");
             var btnUserIcon = new ImageView();
-            btnUserIcon.Height = Application.GetMinRealAverage(207);
-            btnUserIcon.Width = Application.GetMinRealAverage(207);
-            btnUserIcon.Radius = (uint)Application.GetMinRealAverage(207) / 2;
+            btnUserIcon.Height = this.GetPictrueRealSize(207);
+            btnUserIcon.Width = this.GetPictrueRealSize(207);
+            btnUserIcon.Radius = (uint)this.GetPictrueRealSize(207) / 2;
             if (System.IO.File.Exists(iconPath) == true)
             {
                 btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(iconPath);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs
index 99c148a..06f7bcc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/SubAccountLevelUpSuccessForm.cs
@@ -13,7 +13,7 @@
 
         /// <summary>
         /// 鎴愬憳鐨勪俊鎭�
-        /// </summary>
+        /// </summary>
         private MemberInfoRes memberInfo = null;
 
         #endregion
@@ -23,19 +23,19 @@
         /// <summary>
         /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
         /// </summary>
-        /// <param name="info">鎴愬憳淇℃伅</param>
-        public void ShowForm(MemberInfoRes info)
-        {
-            this.memberInfo = info;
-
-            //鍒濆鍖栦腑閮ㄦ帶浠�
-            this.InitMiddleFrame();
+        /// <param name="info">鎴愬憳淇℃伅</param>
+        public void ShowForm(MemberInfoRes info)
+        {
+            this.memberInfo = info;
+
+            //鍒濆鍖栦腑閮ㄦ帶浠�
+            this.InitMiddleFrame();
         }
 
-        /// <summary>
-        /// 鍒濆鍖栦腑閮ㄦ帶浠�
-        /// </summary>
-        private void InitMiddleFrame()
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄦ帶浠�
+        /// </summary>
+        private void InitMiddleFrame()
         {
             //鑳屾櫙妗�
             var frame = new FrameLayout();
@@ -49,10 +49,10 @@
             //鐢ㄦ埛鍥炬爣
             string iconPath = System.IO.Path.Combine(UserCenterResourse.AccountOption.UserPictruePath, memberInfo.DistributedMark + ".png");
             var btnUserIcon = new ImageView();
-            btnUserIcon.Height = Application.GetMinRealAverage(207);
-            btnUserIcon.Width = Application.GetMinRealAverage(207);
-            btnUserIcon.Radius = (uint)Application.GetMinRealAverage(207) / 2;
-            btnUserIcon.Y = Application.GetRealHeight(104);
+            btnUserIcon.Height = this.GetPictrueRealSize(207);
+            btnUserIcon.Width = this.GetPictrueRealSize(207);
+            btnUserIcon.Radius = (uint)this.GetPictrueRealSize(207) / 2;
+            btnUserIcon.Y = Application.GetRealHeight(104);
             btnUserIcon.Gravity = Gravity.CenterHorizontal;
             if (System.IO.File.Exists(iconPath) == true)
             {
@@ -61,17 +61,17 @@
             else
             {
                 btnUserIcon.ImagePath = "Center/Admin.png";
-            }
+            }
             frame.AddChidren(btnUserIcon);
 
             //鏄电О
             var btnName = new NormalViewControl(frame.Width, Application.GetRealHeight(55), false);
-            btnName.IsBold = true;
-            btnName.TextAlignment = TextAlignment.Center;
-            btnName.Y = Application.GetRealHeight(334);
-            btnName.TextColor = UserCenterColor.Current.TextColor2;
-            btnName.TextSize = 16;
-            btnName.Text = memberInfo.UserName;
+            btnName.IsBold = true;
+            btnName.TextAlignment = TextAlignment.Center;
+            btnName.Y = Application.GetRealHeight(334);
+            btnName.TextColor = UserCenterColor.Current.TextColor2;
+            btnName.TextSize = 16;
+            btnName.Text = memberInfo.UserName;
             if (string.IsNullOrEmpty(memberInfo.UserName) == true)
             {
                 btnName.Text = memberInfo.Account;
@@ -80,8 +80,8 @@
 
             //鏉冮檺
             var btnAuthority = new NormalViewControl(frame.Width, Application.GetRealHeight(50), false);
-            btnAuthority.TextAlignment = TextAlignment.Center;
-            btnAuthority.Y = Application.GetRealHeight(400);
+            btnAuthority.TextAlignment = TextAlignment.Center;
+            btnAuthority.Y = Application.GetRealHeight(400);
             btnAuthority.TextColor = UserCenterColor.Current.TextGrayColor1;
             if (memberInfo.AccountType == 1)
             {
@@ -128,7 +128,7 @@
             btnView.TextColor = UserCenterColor.Current.TextGrayColor1;
             btnView.IsMoreLines = true;
             btnView.TextSize = 12;
-            frame.AddChidren(btnView);
+            frame.AddChidren(btnView);
 
             //瀹屾垚
             var btnFinish = new BottomClickButton(688);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs
index b58e19e..980c379 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs
@@ -57,7 +57,7 @@
             //鍙宠竟鍋忕Щ閲�->澧炲姞瀹藉害
             rowPhone.RightOffset = -ControlCommonResourse.XXLeft;
             rowPhone.Y = Application.GetRealHeight(23);
-            rowPhone.Width = Application.GetMinRealAverage(628);
+            rowPhone.Width = this.GetPictrueRealSize(628);
             bodyFrameLayout.AddChidren(rowPhone);
             //璇疯緭鍏ラ偖绠辨垨鎵嬫満鍙�
             string phoneValue = string.IsNullOrEmpty(UserCenterResourse.UserInfo.Phone) == true ? string.Empty : "+" + UserCenterResourse.UserInfo.AreaCode + " " + UserCenterResourse.UserInfo.Phone;
@@ -70,7 +70,7 @@
 
             var rowCode = new FrameRowControl();
             rowCode.Y = rowPhone.Bottom + Application.GetRealHeight(20);
-            rowCode.Width = Application.GetMinRealAverage(628);
+            rowCode.Width = this.GetPictrueRealSize(628);
             bodyFrameLayout.AddChidren(rowCode);
             //璇疯緭鍏ラ獙璇佺爜
             var txtCode = rowCode.AddLeftInput("", 600);
@@ -110,7 +110,7 @@
             }
 
             //鏄剧ず鍙互鍒囨崲閭->涓�涓彲浠ラ伄浣廈ody鐨勪笢瑗�
-            var frameTran = new FrameLayoutControl();
+            var frameTran = new FrameLayoutStatuControl();
             frameTran.UseClickStatu = false;
             frameTran.BackgroundColor = UserCenterColor.Current.Transparent;
             bodyFrameLayout.AddChidren(frameTran);
@@ -122,11 +122,11 @@
             var frameList = new FrameLayout();
             frameList.X = ControlCommonResourse.XXLeft - Application.GetRealWidth(17);
             frameList.Y = rowPhone.Bottom - ControlCommonResourse.BottomLineHeight - 1;
-            frameList.Width = Application.GetMinRealAverage(628);
-            frameList.Height = Application.GetMinRealAverage(176);
+            frameList.Width = this.GetPictrueRealSize(628);
+            frameList.Height = this.GetPictrueRealSize(176);
             frameTran.AddChidren(frameList);
             //鍔ㄧ敾鐢�
-            var frameAnimate = new FrameLayoutControl();
+            var frameAnimate = new FrameLayoutStatuControl();
             frameAnimate.UseClickStatu = false;
             frameList.AddChidren(frameAnimate);
 
@@ -134,8 +134,8 @@
             btnPic.UnSelectedImagePath = "Item/ForgotPswList.png";
             frameAnimate.AddChidren(btnPic);
             var btnEmail = new NormalViewControl(450, 58, true);
-            btnEmail.X = Application.GetMinRealAverage(46);
-            btnEmail.Y = Application.GetMinRealAverage(32);
+            btnEmail.X = this.GetPictrueRealSize(46);
+            btnEmail.Y = this.GetPictrueRealSize(32);
             btnEmail.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnEmail.Text = UserCenterResourse.UserInfo.Email;
             frameAnimate.AddChidren(btnEmail);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs
index 983b93d..7d9474b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs
@@ -57,7 +57,7 @@
             //鍙宠竟鍋忕Щ閲�->澧炲姞瀹藉害
             rowPhone.RightOffset = -ControlCommonResourse.XXLeft;
             rowPhone.Y = Application.GetRealHeight(23);
-            rowPhone.Width = Application.GetMinRealAverage(628);
+            rowPhone.Width = this.GetPictrueRealSize(628);
             bodyFrameLayout.AddChidren(rowPhone);
             //璇疯緭鍏ラ偖绠辨垨鎵嬫満鍙�
             string phoneValue = string.IsNullOrEmpty(UserCenterResourse.UserInfo.Phone) == true ? string.Empty : "+" + UserCenterResourse.UserInfo.AreaCode + " " + UserCenterResourse.UserInfo.Phone;
@@ -70,7 +70,7 @@
 
             var rowCode = new FrameRowControl();
             rowCode.Y = rowPhone.Bottom + Application.GetRealHeight(20);
-            rowCode.Width = Application.GetMinRealAverage(628);
+            rowCode.Width = this.GetPictrueRealSize(628);
             bodyFrameLayout.AddChidren(rowCode);
             //璇疯緭鍏ラ獙璇佺爜
             var txtCode = rowCode.AddLeftInput("", 600);
@@ -110,7 +110,7 @@
             }
 
             //鏄剧ず鍙互鍒囨崲閭->涓�涓彲浠ラ伄浣廈ody鐨勪笢瑗�
-            var frameTran = new FrameLayoutControl();
+            var frameTran = new FrameLayoutStatuControl();
             frameTran.UseClickStatu = false;
             frameTran.BackgroundColor = UserCenterColor.Current.Transparent;
             bodyFrameLayout.AddChidren(frameTran);
@@ -122,11 +122,11 @@
             var frameList = new FrameLayout();
             frameList.X = ControlCommonResourse.XXLeft - Application.GetRealWidth(17);
             frameList.Y = rowPhone.Bottom - ControlCommonResourse.BottomLineHeight - 1;
-            frameList.Width = Application.GetMinRealAverage(628);
-            frameList.Height = Application.GetMinRealAverage(176);
+            frameList.Width = this.GetPictrueRealSize(628);
+            frameList.Height = this.GetPictrueRealSize(176);
             frameTran.AddChidren(frameList);
             //鍔ㄧ敾鐢�
-            var frameAnimate = new FrameLayoutControl();
+            var frameAnimate = new FrameLayoutStatuControl();
             frameAnimate.UseClickStatu = false;
             frameList.AddChidren(frameAnimate);
 
@@ -134,8 +134,8 @@
             btnPic.UnSelectedImagePath = "Item/ForgotPswList.png";
             frameAnimate.AddChidren(btnPic);
             var btnEmail = new NormalViewControl(450, 58, true);
-            btnEmail.X = Application.GetMinRealAverage(46);
-            btnEmail.Y = Application.GetMinRealAverage(32);
+            btnEmail.X = this.GetPictrueRealSize(46);
+            btnEmail.Y = this.GetPictrueRealSize(32);
             btnEmail.TextColor = UserCenterColor.Current.TextGrayColor3;
             btnEmail.Text = UserCenterResourse.UserInfo.Email;
             frameAnimate.AddChidren(btnEmail);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
index 5687b9e..79e3f4f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
@@ -195,8 +195,8 @@
             var btnTemper = rowTemperature.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uNothing), 300);
             //搴曠嚎
             rowTemperature.AddBottomLine();
-            //鍒嗕韩鐨勬埧闂翠笉鑳戒慨鏀�
-            if (this.editorRoom.IsSharedRoom == false)
+            //鍒嗕韩鐨勬埧闂翠笉鑳戒慨鏀� 鎴栬�呭綋鍓嶄綇瀹呬笉鏄櫄鎷熺殑
+            if (this.editorRoom.IsSharedRoom == false && Common.Config.Instance.Home.IsVirtually == false)
             {
                 rowTemperature.ButtonClickEvent += (sender, e) =>
                 {
@@ -219,8 +219,8 @@
             var btnHumi = rowHumidity.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uNothing), 300);
             //搴曠嚎
             rowHumidity.AddBottomLine();
-            //鍒嗕韩鐨勬埧闂翠笉鑳戒慨鏀�
-            if (this.editorRoom.IsSharedRoom == false)
+            //鍒嗕韩鐨勬埧闂翠笉鑳戒慨鏀� 鎴栬�呭綋鍓嶄綇瀹呬笉鏄櫄鎷熺殑
+            if (this.editorRoom.IsSharedRoom == false && Common.Config.Instance.Home.IsVirtually == false)
             {
                 rowHumidity.ButtonClickEvent += (sender, e) =>
                 {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs
index 422c4c5..194c955 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs
@@ -179,8 +179,12 @@
                     }
                 }
                 listView.AdjustRealHeight(Application.GetRealHeight(23));
-                //寮�鍚澶囧湪绾跨洃娴�
-                this.StartCheckDeviceOnline(listView, listGwId, dicData);
+                //濡傛灉涓嶆槸铏氭嫙浣忓畢
+                if (Common.Config.Instance.Home.IsVirtually == false)
+                {
+                    //寮�鍚澶囧湪绾跨洃娴�
+                    this.StartCheckDeviceOnline(listView, listGwId, dicData);
+                }
             });
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs
index 393b9e2..0dd08fd 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs
@@ -16,9 +16,13 @@
         /// </summary>
         private VerticalListControl listView = null;
         /// <summary>
-        /// 浣忓畢鏁版嵁
+        /// 浣忓畢鏁版嵁(鏈夌綉鏃朵娇鐢�)
         /// </summary>
         private Dictionary<string, Common.ResponseEntity.ResidenceObj> dicResidenceData = null;
+        /// <summary>
+        /// 浣忓畢鏁版嵁(鏃犵綉鏃朵娇鐢�)
+        /// </summary>
+        private List<House> listLocalHouse = null;
         /// <summary>
         /// 浣忓畢椤哄簭
         /// </summary>
@@ -36,16 +40,20 @@
             //璁剧疆鏍囬淇℃伅
             base.SetTitleText(Language.StringByID(R.MyInternationalizationString.ResidenceManagement));
 
-            //鍙充笂娣诲姞鎸夐挳
-            var btnTopIcon = new MostRightIconControl(69, 69);
-            btnTopIcon.UnSelectedImagePath = "Item/Add.png";
-            topFrameLayout.AddChidren(btnTopIcon);
-            btnTopIcon.InitControl();
-            btnTopIcon.ButtonClickEvent += (sender, e) =>
+            //铏氭嫙浣忓畢鏃犳硶鏂板缓浣忓畢
+            if (Common.Config.Instance.Home.IsVirtually == false)
             {
-                //鏄剧ず娣诲姞浣忓畢鍚嶇О鐨勭敾闈�
-                this.ShowAddNameForm();
-            };
+                //鍙充笂娣诲姞鎸夐挳
+                var btnTopIcon = new MostRightIconControl(69, 69);
+                btnTopIcon.UnSelectedImagePath = "Item/Add.png";
+                topFrameLayout.AddChidren(btnTopIcon);
+                btnTopIcon.InitControl();
+                btnTopIcon.ButtonClickEvent += (sender, e) =>
+                {
+                    //鏄剧ず娣诲姞浣忓畢鍚嶇О鐨勭敾闈�
+                    this.ShowAddNameForm();
+                };
+            }
 
             //鍒濆鍖栦腑閮ㄦ帶浠�
             this.InitMiddleFrame();
@@ -64,7 +72,6 @@
             if (strData != null)
             {
                 listResidenceSort = Newtonsoft.Json.JsonConvert.DeserializeObject<List<string>>(strData);
-                strData = null;
             }
 
             listView = new VerticalListControl(29);
@@ -72,37 +79,68 @@
             listView.BackgroundColor = UserCenterColor.Current.White;
             bodyFrameLayout.AddChidren(listView);
 
-            HdlThreadLogic.Current.RunThread(() =>
+            //璁剧疆浣忓畢淇℃伅
+            this.SetResidenceInfo(1);
+        }
+
+        /// <summary>
+        /// 璁剧疆浣忓畢淇℃伅(1:鍏堣鍙栦簯绔�,鏃犳硶鑱旂綉,鍐嶈鍙栨湰鍦�  2:鍙浜戠  3:鍙鏈湴)
+        /// </summary>
+        /// <param name="div">1:鍏堣鍙栦簯绔�,鏃犳硶鑱旂綉,鍐嶈鍙栨湰鍦�  2:鍙浜戠  3:鍙鏈湴</param>
+        private void SetResidenceInfo(int div)
+        {
+            HdlThreadLogic.Current.RunThread(async () =>
             {
-                //璁剧疆浣忓畢淇℃伅
-                this.SetResidenceInfo();
+                //铏氭嫙浣忓畢鐨勮瘽,鍙鏈湴
+                if (div == 3 || Config.Instance.Home.IsVirtually == true)
+                {
+                    //鍙鏈湴
+                    this.SetResidenceInfoByOffline();
+                }
+                else
+                {
+                    //寮�鍚繘搴︽潯
+                    this.ShowProgressBar();
+                    //璁剧疆浣忓畢淇℃伅(鏈夌綉鎯呭喌)
+                    var result = await this.SetResidenceInfoByOnline();
+                    if (result == true)
+                    {
+                        //浜戠璇诲彇鎴愬姛
+                        this.CloseProgressBar();
+                        return;
+                    }
+                    if (div == 2)
+                    {
+                        //濡傛灉鍙浜戠 鍏抽棴杩涘害鏉�
+                        this.CloseProgressBar(ShowReLoadMode.YES);
+                        return;
+                    }
+                    //濡傛灉鍦ㄦ病缃戠殑鎯呭喌涓�,浠庢枃浠跺す璺緞涓幏鍙栧叏閮ㄤ綇瀹�,鐒跺悗鏄剧ず
+                    this.SetResidenceInfoByOffline();
+
+                    //鍏抽棴杩涘害鏉�
+                    this.CloseProgressBar();
+                }
             });
         }
 
         #endregion
 
-        #region 鈻� 璁剧疆浣忓畢淇℃伅_______________________
+        #region 鈻� 璁剧疆浣忓畢淇℃伅(鏈夌綉鎯呭喌)_____________
 
         /// <summary>
-        /// 璁剧疆浣忓畢淇℃伅
+        /// 璁剧疆浣忓畢淇℃伅(鏈夌綉鎯呭喌)
         /// </summary>
-        private async void SetResidenceInfo()
+        private async System.Threading.Tasks.Task<bool> SetResidenceInfoByOnline()
         {
-            //寮�鍚繘搴︽潯
-            this.ShowProgressBar();
-
             //鑾峰彇浣忓畢淇℃伅
             var Pra = new GetResidenceInfoPra();
-            string resultData = await UserCenterLogic.GetResponseDataByRequestHttps("App/GetHomePager", false, Pra);
+            var listNotCheck = new List<string>() { "NotSetAgain" };
+            string resultData = await UserCenterLogic.GetResponseDataByRequestHttps("App/GetHomePager", false, Pra, listNotCheck);
             if (resultData == null)
             {
-                //鍏抽棴杩涘害鏉�
-                this.CloseProgressBar(ShowReLoadMode.YES);
-                return;
+                return false;
             }
-            //鍏抽棴杩涘害鏉�
-            this.CloseProgressBar();
-
             var pageData = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResidenceRes>(resultData);
 
             //鏆傛椂瀛樺偍鏁版嵁
@@ -135,7 +173,7 @@
                 {
                     return;
                 }
-                listView.Height = bodyFrameLayout.Height + Application.GetRealHeight(6);
+                listView.Height = bodyFrameLayout.Height;
 
                 this.dicResidenceData = new Dictionary<string, Common.ResponseEntity.ResidenceObj>();
                 for (int i = 0; i < listResidenceSort.Count; i++)
@@ -148,22 +186,20 @@
 
                     //鏀堕泦璇ヨ处鍙蜂綇瀹呯殑鏁版嵁
                     this.dicResidenceData[info.Id] = info;
-                    this.AddRowLayout(info, i != listResidenceSort.Count - 1);
+                    //娣诲姞浣忓畢鐨勮(鏈夌綉鎯呭喌)
+                    this.AddRowLayoutByOnline(info, i != listResidenceSort.Count - 1);
                 }
                 //璋冩暣鍒楄〃鎺т欢鐨勯珮搴�
                 this.listView.AdjustRealHeight(Application.GetRealHeight(23));
             });
+            return true;
         }
 
-        #endregion
-
-        #region 鈻� 娣诲姞浣忓畢鐨勮_______________________
-
         /// <summary>
-        /// 娣诲姞浣忓畢鐨勮
+        /// 娣诲姞浣忓畢鐨勮(鏈夌綉鎯呭喌)
         /// </summary>
         /// <param name="info"></param>
-        private void AddRowLayout(Common.ResponseEntity.ResidenceObj info, bool addLine)
+        private void AddRowLayoutByOnline(Common.ResponseEntity.ResidenceObj info, bool addLine)
         {
             var rowLayout = new RowLayoutControl(listView.rowSpace / 2);
             this.listView.AddChidren(rowLayout);
@@ -216,6 +252,7 @@
                     {
                         HdlThreadLogic.Current.RunThread(async () =>
                         {
+                            //寮�鍚繘搴︽潯
                             this.ShowProgressBar();
 
                             //妫�娴嬫湰鍦版湁娌℃湁杩欎釜浣忓畢
@@ -228,13 +265,13 @@
                             //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
                             await UserCenterLogic.InitUserCenterMenmoryAndThread(false);
 
-                            HdlRoomLogic.Current.InitAllRoom();
-
                             HdlThreadLogic.Current.RunMain(() =>
                             {
                                 //閲嶆柊鍒锋柊鍒楄〃
                                 this.listView.RemoveAll();
-                                this.SetResidenceInfo();
+                                this.SetResidenceInfo(2);
+                                //鍏抽棴杩涘害鏉�
+                                this.CloseProgressBar();
                             });
                         });
                     });
@@ -259,7 +296,132 @@
             btnChanged.ButtonClickEvent += (sender, e) =>
             {
                 //鏄剧ず缂栬緫鍚嶇О鐣岄潰
-                this.ShowEditorNameForm(info, btnHome);
+                this.ShowEditorNameForm(info, null, btnHome);
+            };
+        }
+
+        #endregion
+
+        #region 鈻� 璁剧疆浣忓畢淇℃伅(鏃犵綉鎯呭喌)_____________
+
+        /// <summary>
+        /// 璁剧疆浣忓畢淇℃伅(鏃犵綉鎯呭喌)
+        /// </summary>
+        private void SetResidenceInfoByOffline()
+        {
+            //浠庢枃浠跺す涓幏鍙栧叏閮ㄧ殑浣忓畢瀵硅薄
+            this.listLocalHouse = HdlResidenceLogic.Current.GetAllLocalResidenceListByDirectory();
+            if (listLocalHouse.Count == 0)
+            {
+                return;
+            }
+
+            HdlThreadLogic.Current.RunMain(() =>
+            {
+                listView.Height = bodyFrameLayout.Height;
+
+                for (int i = 0; i < listLocalHouse.Count; i++)
+                {
+                    //娣诲姞浣忓畢鐨勮(鏃犵綉鎯呭喌)
+                    this.AddRowLayoutByOffline(listLocalHouse[i], i != listLocalHouse.Count - 1);
+                }
+                //璋冩暣鍒楄〃鎺т欢鐨勯珮搴�
+                this.listView.AdjustRealHeight(Application.GetRealHeight(23));
+            });
+        }
+
+        /// <summary>
+        /// 娣诲姞浣忓畢鐨勮(鏃犵綉鎯呭喌)
+        /// </summary>
+        /// <param name="i_home"></param>
+        private void AddRowLayoutByOffline(House i_home, bool addLine)
+        {
+            var rowLayout = new RowLayoutControl(listView.rowSpace / 2);
+            this.listView.AddChidren(rowLayout);
+
+            //鍥炬爣
+            var btnIcon = rowLayout.frameTable.AddLeftIcon(81);
+            btnIcon.UnSelectedImagePath = "Item/ResidenceIcon.png";
+            //褰撳墠浣忓畢
+            NormalViewControl btnHome = null;
+            if (i_home.Id == Config.Instance.Home.Id)
+            {
+                //浣忓畢鍚嶇О
+                btnHome = rowLayout.frameTable.AddLeftCaption(i_home.Name, 800, 60, true);
+                btnHome.TextSize = 15;
+                btnHome.Y = Application.GetRealHeight(12) + rowLayout.chidrenYaxis;
+                rowLayout.frameTable.AddChidren(btnHome, ChidrenBindMode.BindEventOnly);
+
+                //褰撳墠浣忓畢
+                var btnNowView = rowLayout.frameTable.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uNowResidence), 800, 49, true);
+                btnNowView.Y = Application.GetRealHeight(72) + rowLayout.chidrenYaxis;
+                btnNowView.TextSize = 12;
+                btnNowView.TextColor = UserCenterColor.Current.TextGrayColor1;
+                rowLayout.frameTable.AddChidren(btnNowView, ChidrenBindMode.BindEventOnly);
+            }
+            else
+            {
+                //浣忓畢鍚嶇О
+                btnHome = rowLayout.frameTable.AddLeftCaption(i_home.Name, 800, true);
+                btnHome.TextSize = 15;
+            }
+            //鍙崇澶�
+            rowLayout.frameTable.AddRightArrow();
+            if (addLine == true)
+            {
+                //搴曠嚎
+                rowLayout.frameTable.AddBottomLine();
+            }
+
+            rowLayout.frameTable.ButtonClickEvent += (sender, e) =>
+            {
+                if (i_home.Id != Config.Instance.Home.Id)
+                {
+                    //纭鍒囨崲褰撳墠浣忓畢鍒般�屻��?
+                    string msg = Language.StringByID(R.MyInternationalizationString.uSwitchResidenceMsg);
+                    if (msg.Contains("{0}") == true)
+                    {
+                        msg = string.Format(msg, i_home.Name);
+                    }
+                    this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+                    {
+                        HdlThreadLogic.Current.RunThread(async () =>
+                        {
+                            this.ShowProgressBar();
+
+                            Config.Instance.HomeId = i_home.Id;
+                            //閲嶆柊鍒濆鍖栦綇瀹呭璞�
+                            Config.Instance.Home = House.GetHouseByHouseId(i_home.Id);
+                            Config.Instance.Save();
+                            //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
+                            await UserCenterLogic.InitUserCenterMenmoryAndThread(false);
+
+                            HdlThreadLogic.Current.RunMain(() =>
+                            {
+                                //閲嶆柊鍒锋柊鍒楄〃
+                                this.listView.RemoveAll();
+                                this.SetResidenceInfo(3);
+                                //鍏抽棴杩涘害鏉�
+                                this.CloseProgressBar();
+                            });
+                        });
+                    });
+                }
+                else
+                {
+                    //妫�娴嬭兘鍚﹀垹闄や綇瀹�
+                    bool flage = this.CheckIsCanDeleteResidence(i_home);
+                    var form = new ResidenceManagementForm();
+                    form.AddForm(flage);
+                }
+            };
+            //鏇存敼
+            var btnChanged = rowLayout.AddEditorControl();
+            btnChanged.TextID = R.MyInternationalizationString.uChanged1;
+            btnChanged.ButtonClickEvent += (sender, e) =>
+            {
+                //鏄剧ず缂栬緫鍚嶇О鐣岄潰
+                this.ShowEditorNameForm(null, i_home, btnHome);
             };
         }
 
@@ -270,16 +432,18 @@
         /// <summary>
         /// 鏄剧ず缂栬緫浣忓畢鍚嶇О鐣岄潰
         /// </summary>
-        /// <param name="info"></param>
-        private void ShowEditorNameForm(Common.ResponseEntity.ResidenceObj info, NormalViewControl btnHome)
+        /// <param name="info">鏈夌綉鏃朵娇鐢�</param>
+        /// <param name="i_house">鏃犵綉鏃堕�傜敤</param>
+        private void ShowEditorNameForm(Common.ResponseEntity.ResidenceObj info, House i_house, NormalViewControl btnHome)
         {
+            string oldName = info != null ? info.Name : i_house.Name;
             //鐢熸垚涓�涓脊绐楃敾闈�
             var dialogForm = new DialogInputControl();
             //缂栬緫浣忓畢
             dialogForm.SetTitleText(Language.StringByID(R.MyInternationalizationString.uChangedName));
             //璇疯緭鍏ヤ綇瀹呭悕绉�
             dialogForm.SetTipText(Language.StringByID(R.MyInternationalizationString.uPleaseInputResidenceName));
-            dialogForm.Text = info.Name;
+            dialogForm.Text = oldName;
 
             //鎸変笅纭鎸夐挳
             dialogForm.ComfirmClickEvent += ((textValue) =>
@@ -293,11 +457,25 @@
                 }
                 //鐢婚潰鍏抽棴
                 dialogForm.CloseDialog();
-
-                if (info.Name != textValue)
+                if (oldName != textValue)
                 {
-                    //缂栬緫浜戠鐨勪綇瀹呭悕绉�
-                    this.EditorResidenceName(textValue, info);
+                    if (info != null)
+                    {
+                        //缂栬緫浜戠鐨勪綇瀹呭悕绉�
+                        this.EditorResidenceName(textValue, info, btnHome);
+                    }
+                    else
+                    {
+                        //鐩存帴缂栬緫浣忓畢缂撳瓨
+                        if (this.CheckIsCanSaveResidence(i_house.Id, textValue, true) == false)
+                        {
+                            return;
+                        }
+                        //鍒锋柊鍐呭瓨鐨勪綇瀹呭悕
+                        House.EditorHouseByHouseId(i_house.Id, textValue);
+                        //鏇存敼鏄剧ず鐨勫悕瀛�
+                        btnHome.Text = textValue;
+                    }
                 }
             });
         }
@@ -308,7 +486,7 @@
         /// <param name="ResidenceName"></param>
         /// <param name="info"></param>
         /// <returns></returns>
-        private async void EditorResidenceName(string ResidenceName, Common.ResponseEntity.ResidenceObj info)
+        private async void EditorResidenceName(string ResidenceName, Common.ResponseEntity.ResidenceObj info, NormalViewControl btnHome)
         {
             //妫�娴嬭兘鍚︿繚瀛樹綇瀹�
             if (this.CheckIsCanSaveResidence(info.Id, ResidenceName, true) == false)
@@ -321,23 +499,21 @@
             var Pra = new EditorResidencePra();
             Pra.HomeId = info.Id;
             Pra.Name = ResidenceName;
-            if (info.IsOthreShare == true)
-            {
-                Pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
-            }
+            Pra.IsOtherAccountCtrl = false;
+            Pra.LoginAccessToken = Config.Instance.Token;
+
             //缂栬緫浣忓畢
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", info.IsOthreShare, Pra);
-            if (flage == false)
+            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", false, Pra);
+            //鍏抽棴杩涘害鏉�
+            this.CloseProgressBar();
+
+            if (flage == true)
             {
-                //鍏抽棴杩涘害鏉�
-                this.CloseProgressBar();
-                return;
+                //鍒锋柊鍐呭瓨鐨勪綇瀹呭悕
+                House.EditorHouseByHouseId(info.Id, ResidenceName);
+                //鏇存敼鏄剧ず鐨勫悕瀛�
+                btnHome.Text = ResidenceName;
             }
-            //鍒锋柊鍐呭瓨鐨勪綇瀹呭悕
-            House.EditorHouseByHouseId(info.Id, ResidenceName);
-            //閲嶆柊鍒锋柊鍒楄〃
-            this.listView.RemoveAll();
-            this.SetResidenceInfo();
         }
 
         #endregion
@@ -404,7 +580,7 @@
             House.AddHouse(newInfo[0].Id, ResidenceName, 0);
             //閲嶆柊鍒锋柊鍒楄〃
             this.listView.RemoveAll();
-            this.SetResidenceInfo();
+            this.SetResidenceInfo(2);
         }
 
         #endregion
@@ -442,7 +618,7 @@
         }
 
         /// <summary>
-        /// 妫�娴嬭兘鍚﹀垹闄や綇瀹�
+        /// 妫�娴嬭兘鍚﹀垹闄や綇瀹�(鏈夌綉浣跨敤)
         /// </summary>
         /// <param name="info"></param>
         /// <returns></returns>
@@ -468,6 +644,36 @@
         }
 
         /// <summary>
+        /// 妫�娴嬭兘鍚﹀垹闄や綇瀹�(鏃犵綉浣跨敤)
+        /// </summary>
+        /// <param name="info"></param>
+        /// <returns></returns>
+        private bool CheckIsCanDeleteResidence(House i_house)
+        {
+            if (i_house.IsVirtually == false)
+            {
+                //闈炶櫄鎷熶綇瀹呴兘涓嶅厑璁稿垹闄�,鍙湁鍦ㄨ兘鑱旂綉鐨勬椂鍊�,鎵嶈兘鍒犻櫎
+                return false;
+            }
+
+            int myCount = 0;
+            foreach (var data in this.listLocalHouse)
+            {
+                if (data.IsVirtually == true)
+                {
+                    myCount++;
+                }
+            }
+            //濡傛灉姝よ处鍙蜂笅鍙墿涓嬪敮涓�涓�涓櫄鎷熺殑浣忓畢锛屽垯涓嶈兘鍐嶅垹闄�
+            if (myCount == 1)
+            {
+                return false;
+            }
+
+            return true;
+        }
+
+        /// <summary>
         /// 妫�娴嬭兘鍚︿繚瀛樹綇瀹�
         /// </summary>
         /// <param name="residenceId">浣忓畢ID</param>
@@ -476,21 +682,43 @@
         /// <returns></returns>
         private bool CheckIsCanSaveResidence(string residenceId, string residenceName, bool isEditor)
         {
-            //浣忓畢鍚嶅瓧閲嶅妫�娴�
-            foreach (string strId in this.dicResidenceData.Keys)
+            if (this.dicResidenceData != null)
             {
-                if (this.dicResidenceData[strId].IsOthreShare == true)
+                //浣忓畢鍚嶅瓧閲嶅妫�娴�
+                foreach (string strId in this.dicResidenceData.Keys)
                 {
-                    //鍒嗕韩鐨勪綇瀹呬笉鑰冭檻
-                    continue;
+                    if (this.dicResidenceData[strId].IsOthreShare == true)
+                    {
+                        //鍒嗕韩鐨勪綇瀹呬笉鑰冭檻
+                        continue;
+                    }
+                    if (residenceId != strId && residenceName == this.dicResidenceData[strId].Name)
+                    {
+                        //浣忓畢鍚嶅瓧宸茬粡瀛樺湪
+                        int msgId = isEditor == true ? R.MyInternationalizationString.EditZigbeeHome_Exist : R.MyInternationalizationString.AddZigbeeHome_Exist;
+                        string msg = Language.StringByID(msgId);
+                        this.ShowMassage(ShowMsgType.Error, msg);
+                        return false;
+                    }
                 }
-                if (residenceId != strId && residenceName == this.dicResidenceData[strId].Name)
+            }
+            else
+            {
+                foreach (var myHouse in this.listLocalHouse)
                 {
-                    //浣忓畢鍚嶅瓧宸茬粡瀛樺湪
-                    int msgId = isEditor == true ? R.MyInternationalizationString.EditZigbeeHome_Exist : R.MyInternationalizationString.AddZigbeeHome_Exist;
-                    string msg = Language.StringByID(msgId);
-                    this.ShowMassage(ShowMsgType.Error, msg);
-                    return false;
+                    if (myHouse.IsOthreShare == true)
+                    {
+                        //鍒嗕韩鐨勪綇瀹呬笉鑰冭檻
+                        continue;
+                    }
+                    if (residenceId != myHouse.Id && residenceName == myHouse.Name)
+                    {
+                        //浣忓畢鍚嶅瓧宸茬粡瀛樺湪
+                        int msgId = isEditor == true ? R.MyInternationalizationString.EditZigbeeHome_Exist : R.MyInternationalizationString.AddZigbeeHome_Exist;
+                        string msg = Language.StringByID(msgId);
+                        this.ShowMassage(ShowMsgType.Error, msg);
+                        return false;
+                    }
                 }
             }
             return true;
@@ -505,22 +733,38 @@
         /// </summary>
         public override int FormActionAgainEvent()
         {
-            foreach (string keys in dicResidenceData.Keys)
+            if (dicResidenceData != null)
             {
-                if (Config.Instance.HomeFilePathList.Contains($"House_{keys}.json") == false)
+                foreach (string keys in dicResidenceData.Keys)
                 {
-                    //淇濆瓨椤哄簭
-                    listResidenceSort.Remove(keys);
-                    HdlRoomLogic.Current.SaveFloorSort(listResidenceSort);
-
-                    this.listView.RemoveAll();
-                    //鏁版嵁宸茬粡鍙樻洿
-                    HdlThreadLogic.Current.RunThread(() =>
+                    if (Config.Instance.HomeFilePathList.Contains($"House_{keys}.json") == false)
                     {
-                        //閲嶆柊璁剧疆浣忓畢淇℃伅
-                        this.SetResidenceInfo();
-                    });
-                    break;
+                        //淇濆瓨椤哄簭
+                        listResidenceSort.Remove(keys);
+                        HdlRoomLogic.Current.SaveFloorSort(listResidenceSort);
+
+                        this.listView.RemoveAll();
+                        //鏁版嵁宸茬粡鍙樻洿 閲嶆柊璁剧疆浣忓畢淇℃伅
+                        this.SetResidenceInfo(2);
+                        break;
+                    }
+                }
+            }
+            else
+            {
+                //妫�娴嬭繕鏈夎繖涓綇瀹呮枃浠跺悧
+                var strPath = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid);
+                foreach (var myHouse in this.listLocalHouse)
+                {
+                    string fullName = System.IO.Path.Combine(strPath, myHouse.FileName);
+                    //濡傛灉涓嶅瓨鍦ㄤ簡鐨勮瘽
+                    if (System.IO.File.Exists(fullName) == false)
+                    {
+                        //鏁版嵁宸茬粡鍙樻洿 閲嶆柊璁剧疆浣忓畢淇℃伅
+                        this.listView.RemoveAll();
+                        this.SetResidenceInfo(3);
+                        return 1;
+                    }
                 }
             }
             return 1;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
index b36ff40..8682058 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
@@ -728,7 +728,6 @@
 
             //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
             await UserCenterLogic.InitUserCenterMenmoryAndThread(false);
-            HdlRoomLogic.Current.InitAllRoom();
 
             //鍒犻櫎浣忓畢
             Common.House.DeleteHouseByHouseId(deleteId);
@@ -753,45 +752,49 @@
         /// <param name="addresName">浣嶇疆鍚嶇О</param>
         private async void SaveResidenceAdrress(NormalViewControl btnLocation, double latitude, double longitude, string addresName)
         {
-            //寮�鍚繘搴︽潯
-            this.ShowProgressBar();
-
-            var Pra = new EditorResidencePra();
-            Pra.HomeId = Common.Config.Instance.Home.Id;
-            Pra.Name = Common.Config.Instance.Home.Name;
-            Pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
-            Pra.Latitude = latitude;
-            Pra.Longitude = longitude;
-
-            //缂栬緫浣忓畢
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", true, Pra);
-            if (flage == false)
+            //濡傛灉涓嶆槸铏氭嫙浣忓畢,鎵嶆洿鏂颁簯绔�
+            if (Common.Config.Instance.Home.IsVirtually == false)
             {
-                //鍏抽棴杩涘害鏉�
-                this.CloseProgressBar();
-                return;
-            }
-            //璁剧疆鍏ㄩ儴缃戝叧鐨勪綇瀹呭湴鍧�
-            var listGateway = HdlGatewayLogic.Current.GetAllLocalGateway();
-            foreach (var gateway in listGateway)
-            {
-                ZigBee.Device.ZbGateway realWay = null;
-                if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, gateway) == false)
-                {
-                    //閿欒:缃戝叧瀵硅薄涓㈠け
-                    continue;
-                }
-                var result = HdlGatewayLogic.Current.SetGatewaySite(gateway, longitude, latitude, ShowErrorMode.YES);
-                if (result == false)
+                //寮�鍚繘搴︽潯
+                this.ShowProgressBar();
+
+                var Pra = new EditorResidencePra();
+                Pra.HomeId = Common.Config.Instance.Home.Id;
+                Pra.Name = Common.Config.Instance.Home.Name;
+                Pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
+                Pra.Latitude = latitude;
+                Pra.Longitude = longitude;
+
+                //缂栬緫浣忓畢
+                bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", true, Pra);
+                if (flage == false)
                 {
                     //鍏抽棴杩涘害鏉�
                     this.CloseProgressBar();
                     return;
                 }
+                //璁剧疆鍏ㄩ儴缃戝叧鐨勪綇瀹呭湴鍧�
+                var listGateway = HdlGatewayLogic.Current.GetAllLocalGateway();
+                foreach (var gateway in listGateway)
+                {
+                    ZigBee.Device.ZbGateway realWay = null;
+                    if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, gateway) == false)
+                    {
+                        //閿欒:缃戝叧瀵硅薄涓㈠け
+                        continue;
+                    }
+                    var result = HdlGatewayLogic.Current.SetGatewaySite(gateway, longitude, latitude, ShowErrorMode.YES);
+                    if (result == false)
+                    {
+                        //鍏抽棴杩涘害鏉�
+                        this.CloseProgressBar();
+                        return;
+                    }
+                }
+                //鍏抽棴杩涘害鏉�
+                this.CloseProgressBar();
             }
 
-            //鍏抽棴杩涘害鏉�
-            this.CloseProgressBar();
             //淇濆瓨缂撳瓨
             Common.Config.Instance.Home.Longitude = longitude;
             Common.Config.Instance.Home.Latitude = latitude;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
index 76d6357..6bafbed 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
@@ -79,7 +79,7 @@
             frameBack.AddChidren(frameLayoutDraw);
 
             //瀹夐槻璁板綍(鐐瑰嚮鑼冨洿鏈夌偣灏忥紝闇�瑕佹墿澶у畠鐨勭偣鍑昏寖鍥�)
-            var frameLog = new FrameLayoutControl();
+            var frameLog = new FrameLayoutStatuControl();
             frameLog.UseClickStatu = false;
             frameLog.Height = Application.GetRealHeight(123);
             frameLog.Width = Application.GetRealWidth(273);
@@ -103,7 +103,7 @@
             btnLogLine.Visible = false;
 
             //浼犳劅鍣ㄧ姸鎬�(鐐瑰嚮鑼冨洿鏈夌偣灏忥紝闇�瑕佹墿澶у畠鐨勭偣鍑昏寖鍥�)
-            var frameSensor = new FrameLayoutControl();
+            var frameSensor = new FrameLayoutStatuControl();
             frameSensor.UseClickStatu = false;
             frameSensor.Height = frameLog.Height;
             frameSensor.Width = frameLog.Width;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs
index 443db44..0087924 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs
@@ -116,7 +116,7 @@
             btnType.TextID = R.MyInternationalizationString.uSuggestionType;
             framType.AddChidren(btnType);
             //Bug
-            var frameBug = new FrameLayoutControl();
+            var frameBug = new FrameLayoutStatuControl();
             frameBug.UseClickStatu = false;
             frameBug.Width = Application.GetRealWidth(200);
             frameBug.X = Application.GetRealWidth(314);
@@ -144,7 +144,7 @@
                 }
             };
             //浼樺寲
-            var frameOptimization = new FrameLayoutControl();
+            var frameOptimization = new FrameLayoutStatuControl();
             frameOptimization.UseClickStatu = false;
             frameOptimization.Width = Application.GetRealWidth(200);
             frameOptimization.X = Application.GetRealWidth(524);
@@ -172,7 +172,7 @@
                 }
             };
             //鏂伴渶姹�
-            var frameDemand = new FrameLayoutControl();
+            var frameDemand = new FrameLayoutStatuControl();
             frameDemand.UseClickStatu = false;
             frameDemand.Width = Application.GetRealWidth(200);
             frameDemand.X = Application.GetRealWidth(734);
@@ -224,6 +224,11 @@
             btnSubmit.CanClick = false;
             btnSubmit.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉鏄櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    return;
+                }
                 //涓婁紶鎰忚
                 this.UploadSuggestion(txtInput.Text, txtEmail.Text);
             };
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs
index ef86018..ce92e3e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/QRCodeForm.cs
@@ -13,17 +13,17 @@
 
         /// <summary>
         /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
-        /// </summary>
-        public void ShowForm()
-        {
-            //鍒濆鍖栦腑閮ㄦ帶浠�
-            this.InitMiddleFrame();
+        /// </summary>
+        public void ShowForm()
+        {
+            //鍒濆鍖栦腑閮ㄦ帶浠�
+            this.InitMiddleFrame();
         }
 
-        /// <summary>
-        /// 鍒濆鍖栦腑閮ㄦ帶浠�
-        /// </summary>
-        private void InitMiddleFrame()
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄦ帶浠�
+        /// </summary>
+        private void InitMiddleFrame()
         {
             uint roundHeigth = (uint)Application.GetRealHeight(17);
 
@@ -64,9 +64,9 @@
 
             //鐢ㄦ埛澶村儚
             var btnIcon = new ImageView();
-            btnIcon.Height = Application.GetMinRealAverage(294);
-            btnIcon.Width = Application.GetMinRealAverage(294);
-            btnIcon.Radius = (uint)Application.GetMinRealAverage(294) / 2;
+            btnIcon.Height = this.GetPictrueRealSize(294);
+            btnIcon.Width = this.GetPictrueRealSize(294);
+            btnIcon.Radius = (uint)this.GetPictrueRealSize(294) / 2;
             btnIcon.Y = Application.GetRealHeight(121);
             btnIcon.Gravity = Gravity.CenterHorizontal;
             btnIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
@@ -81,7 +81,7 @@
             frameDetail.AddChidren(btnUser);
             //浜岀淮鐮�
             var btnQrCode = new PicViewControl(236, 236);
-            btnQrCode.ImageBytes = QRCode.BytesFromText(UserCenterResourse.UserInfo.Account, Application.GetMinRealAverage(236), Application.GetMinRealAverage(236));
+            btnQrCode.ImageBytes = QRCode.BytesFromText(UserCenterResourse.UserInfo.Account, this.GetPictrueRealSize(236), this.GetPictrueRealSize(236));
             btnQrCode.Gravity = Gravity.CenterHorizontal;
             btnQrCode.Y = Application.GetRealHeight(262);
             frameDetail.AddChidren(btnQrCode);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
index c1f5955..c94de76 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
@@ -392,12 +392,30 @@
             dialogForm.ComfirmClickEvent += ((textValue) =>
             {
                 dialogForm.CloseDialog();
-                if (textValue == "2887")
+                if (textValue.StartsWith("2887") == true)
                 {
-                    //寮�鍚殣钘忚彍鍗�
-                    UserCenterResourse.HideOption.CenterHideMenu = 1;
+                    var myTime = DateTime.Now;
+                    string strTime1 = myTime.ToString("HHmm");
+                    int value1 = Convert.ToInt32(strTime1.Substring(3, 1));
+                    string check1 = "2887" + strTime1 + (7 + value1).ToString();
+
+                    myTime = myTime.AddMinutes(-1);
+                    string strTime2 = myTime.ToString("HHmm");
+                    int value2 = Convert.ToInt32(strTime2.Substring(3, 1));
+                    string check2 = "2887" + strTime2 + (7 + value2).ToString();
+
+                    myTime = myTime.AddMinutes(2);
+                    string strTime3 = myTime.ToString("HHmm");
+                    int value3 = Convert.ToInt32(strTime3.Substring(3, 1));
+                    string check3 = "2887" + strTime3 + (7 + value3).ToString();
+
+                    if (textValue == check1 || textValue == check2 || textValue == check3)
+                    {
+                        //寮�鍚殣钘忚彍鍗�
+                        UserCenterResourse.HideOption.CenterHideMenu = 1;
+                    }
                 }
-                if (textValue == "0001")
+                if (textValue == "0001a")
                 {
                     var form = new Guide.GuideHouseForm();
                     form.ShowFrom();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
index 5ad03f1..a51af14 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
@@ -55,9 +55,9 @@
 
             //鐢ㄦ埛鍥炬爣
             var btnUserIcon = new ImageView();
-            btnUserIcon.Height = Application.GetMinRealAverage(251);
-            btnUserIcon.Width = Application.GetMinRealAverage(251);
-            btnUserIcon.Radius = (uint)Application.GetMinRealAverage(251) / 2;
+            btnUserIcon.Height = this.GetPictrueRealSize(251);
+            btnUserIcon.Width = this.GetPictrueRealSize(251);
+            btnUserIcon.Radius = (uint)this.GetPictrueRealSize(251) / 2;
             btnUserIcon.Y = Application.GetRealHeight(46);
             btnUserIcon.Gravity = Gravity.CenterHorizontal;
             btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
index a19f778..ee92d35 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
@@ -132,18 +132,31 @@
         {
             //鐢ㄦ埛澶村儚
             this.btnUserIcon = new ImageView();
-            btnUserIcon.Height = Application.GetMinRealAverage(280);
-            btnUserIcon.Width = Application.GetMinRealAverage(280);
-            btnUserIcon.Radius = (uint)Application.GetMinRealAverage(280) / 2;
+            btnUserIcon.Height = this.GetPictrueRealSize(280);
+            btnUserIcon.Width = this.GetPictrueRealSize(280);
+            btnUserIcon.Radius = (uint)this.GetPictrueRealSize(280) / 2;
             btnUserIcon.X = Application.GetRealWidth(121);
-            btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
+            if (Common.Config.Instance.Home.IsVirtually == false)
+            {
+                btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
+            }
+            else
+            {
+                btnUserIcon.ImagePath = "Account/Cat.png";
+            }
             bodyFrameLayout.AddChidren(btnUserIcon);
             btnUserIcon.Y = frameWhite.Y - Application.GetRealHeight(109);
             btnUserIcon.MouseUpEventHandler += (sender, e) =>
             {
                 if (Common.Config.Instance.Home.IsVirtually == true)
                 {
-                    //濡傛灉鏀逛綇瀹呬负铏氭嫙浣忓畢,鍒欐鍔熻兘鏃犳晥
+                    //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欑洿鎺ユ彁绀�:纭畾閫�鍑哄綋鍓嶈处鍙凤紵
+                    string msg = Language.StringByID(R.MyInternationalizationString.uLogoutAccountMsg);
+                    this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+                    {
+                        //閫�鍑鸿处鍙�
+                        UserCenterLogic.ReLoginAgain(Common.Config.Instance.Account);
+                    });
                     return;
                 }
                 var form = new UserInformationForm();
@@ -254,7 +267,7 @@
                 {
                     if (Common.Config.Instance.Home.IsVirtually == true)
                     {
-                        //濡傛灉鏀逛綇瀹呬负铏氭嫙浣忓畢,鍒欐鍔熻兘鏃犳晥
+                        //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
                         return;
                     }
                     var form = new Member.MemberListForm();
@@ -272,13 +285,16 @@
                 frame.ButtonClickEvent += (sender, e) =>
                 {
                     HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
-                    if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == false)
+                    //鎷ユ湁缃戝叧,鎴栬�呮槸铏氭嫙浣忓畢,鍒欒繘鍏ヨ澶囧垪琛ㄧ晫闈�
+                    if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == false
+                    || Common.Config.Instance.Home.IsVirtually == true)
                     {
                         var form = new Device.DeviceListMainForm();
                         form.AddForm();
                     }
                     else
                     {
+                        //娌℃湁缃戝叧,鍒欒繘鍏ョ綉鍏冲垪琛ㄧ晫闈�
                         var form = new GatewayManage.GatewayListForm();
                         form.AddForm();
                     }
@@ -312,7 +328,7 @@
                 {
                     if (Common.Config.Instance.Home.IsVirtually == true)
                     {
-                        //濡傛灉鏀逛綇瀹呬负铏氭嫙浣忓畢,鍒欐鍔熻兘鏃犳晥
+                        //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
                         return;
                     }
                     var form = new Safety.SafetyManagementMainForm();
@@ -405,7 +421,7 @@
                 {
                     if (Common.Config.Instance.Home.IsVirtually == true)
                     {
-                        //濡傛灉鏀逛綇瀹呬负铏氭嫙浣忓畢,鍒欐鍔熻兘鏃犳晥
+                        //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
                         return;
                     }
                     var form = new HdlBackup.HdlBackupListForm();
@@ -455,7 +471,7 @@
             {
                 if (Common.Config.Instance.Home.IsVirtually == true)
                 {
-                    //濡傛灉鏀逛綇瀹呬负铏氭嫙浣忓畢,鍒欐鍔熻兘鏃犳晥
+                    //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
                     return;
                 }
                 var form = new Abount.AbountForm();
@@ -497,6 +513,11 @@
         /// </summary>
         public override int FormActionAgainEvent()
         {
+            //铏氭嫙浣忓畢涓嶉渶瑕佸埛鏂�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                return -1;
+            }
             //鐢ㄦ埛澶村儚
             if (UserCenterResourse.UserInfo.UserIconFileChanged == true)
             {
diff --git a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs
index 32f75f3..5b29ee7 100755
--- a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs
@@ -49,82 +49,47 @@
                 }
             };
 
+            //鐩存帴鐧诲綍
             if (Config.Instance.IsLogin)
             {
-                ShowLoginLoadView();
+                //鏄剧ず鍚姩椤�
+                this.ShowLoginLoadView();
                 CommonPage.Loading.Start();
-                Action action = async () =>
-                {
-                    //CommonPage.Loading.Start(Language.StringByID(R.MyInternationalizationString.Logining));
-                    var loginSuccess = await LoginByPWDResultAsync(Config.Instance.Account, Config.Instance.Password);
-                    if (loginSuccess == 1)
-                    {
-                        new System.Threading.Thread(async () =>
-                        {
-                            //鐧诲綍鎴愬姛
-                            var homes = await House.GetHomeLists();
-                            //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                            await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-                            //鍚姩ZigBee
-                            ZigBee.Common.Application.Init();
 
-                            UserCenter.HdlRoomLogic.Current.InitAllRoom();
-
-                            Application.RunOnMainThread(() =>
-                            {
-                                CommonPage.Instance.RemoveViewByTag("Login");
-                                UserPage.Instance.Fresh(); 
-                                CommonPage.Loading.Hide();
-                            });
-                        })
-                        { IsBackground = true }.Start();
-                    }
-                    else
-                    {
-                        //鏈櫥褰曟垚鍔熷脊鍑虹櫥褰曠晫闈� 鍚屾椂闇�瑕佹爣璁颁负鏈櫥褰曠姸鎬�
-                        //Config.Instance.LoginDateTime = new DateTime(1970, 1, 1);
-                        //Config.Instance.Save();
-                        //var accountLogin = new Device.Account.AccountLogin { };
-                        //CommonPage.Instance.AddChidren(accountLogin);
-                        //accountLogin.Show();
-                        //CommonPage.Loading.Hide();
-
-                        //鐧诲綍澶辫触锛屼篃鐩存帴杩涘叆涓婚〉
-                        new System.Threading.Thread(async () =>
-                        {
-                            //鐧诲綍鎴愬姛
-                            var homes = await House.GetHomeLists();
-                            //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                            await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-                            //鍚姩ZigBee
-                            ZigBee.Common.Application.Init();
-
-                            UserCenter.HdlRoomLogic.Current.InitAllRoom();
-
-                            Application.RunOnMainThread(() =>
-                            {
-                                CommonPage.Instance.RemoveViewByTag("Login");
-                                UserPage.Instance.Fresh();
-                                CommonPage.Loading.Hide();
-                            });
-                        })
-                        { IsBackground = true }.Start();
-                    }
-                };
-                //鐧诲綍杩囩洿鎺ュ悗鍙扮櫥褰�
-                action();
+                UserCenter.HdlThreadLogic.Current.RunThread(async () =>
+                {
+                    //鐧诲綍
+                    var loginSuccess = await LoginByPWDAsync(Config.Instance.Account, Config.Instance.Password);
+                    //鐧诲綍鎴愬姛,鎴栬�呮病鏈夌綉缁滈兘鍙互鐧诲綍
+                    if (loginSuccess == 1 || loginSuccess == 2)
+                    {
+                        var homes = await House.GetHomeLists();
+                        //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
+                        await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
+                        //鍚姩ZigBee
+                        ZigBee.Common.Application.Init();
+
+                        UserCenter.HdlThreadLogic.Current.RunMain(() =>
+                        {
+                            CommonPage.Instance.RemoveViewByTag("Login");
+                            UserPage.Instance.Fresh();
+                            CommonPage.Loading.Hide();
+                        });
+                    }
+                });
             }
             else
             {
                 //鏈櫥褰曞脊鍑虹櫥褰曠晫闈�
                 var accountLogin = new Login.AccountLogin { };
                 Shared.Common.CommonPage.Instance.AddChidren(accountLogin);
-                accountLogin.Show();
-                //accountLogin.ShowForm();
+                accountLogin.ShowForm();
             }
         }
 
-
+        /// <summary>
+        /// 鏄剧ず鍚姩椤�
+        /// </summary>
         public void ShowLoginLoadView()
         {
             var loginLoad = new LoginLoading { };
@@ -133,7 +98,7 @@
         }
 
         /// <summary>
-        /// Logins the by PWDA sync.
+        /// 1:鐧诲綍鎴愬姛 0:瀵嗙爜閿欒 -1:鍏朵粬寮傚父 2:鏃犳硶鑱旂綉
         /// </summary>
         /// <returns>The by PWDA sync.</returns>
         /// <param name="account">Account.</param>
@@ -142,81 +107,68 @@
         /// <param name="company">Company.</param>
         public async System.Threading.Tasks.Task<int> LoginByPWDAsync(string account, string password, string source = "", int company = 0)
         {
-            var isLoginSuccess = -1;
-            try
-            {
-                var requestObj = new SendDataToServer.LoginObj
-                {
-                    Account = account,
-                    Password = password,
-                    Source = source,
-                    Company = company
-                };
-                var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj);
-                var revertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/Login", System.Text.Encoding.UTF8.GetBytes(requestJson));
-                if (revertObj == null)
-                {
-                    isLoginSuccess = -1;
-                    return isLoginSuccess;
-                }
-                var stateCodeStr = revertObj.StateCode.ToUpper();
-                //Error 涓嶈兘鐩存帴浠庢湇鍔″櫒鍙栵紝鍙兘鏍规嵁鐘舵�佺爜閫愪竴鍒ゆ柇
-                if (stateCodeStr == "SUCCESS")
-                {
-                    if (revertObj.ResponseData == null)
-                    {
-                        return -1;
-                    }
-
-                    var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
-                    var revertData = responseDataObj;
-                    //鏍囪涓婁竴娆℃槸涓嶆槸鍚屼竴涓处鍙风櫥闄�
-                    UserCenter.UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
-                    Config.Instance.Account = revertData.Account;
-                    Config.Instance.Password = password;
-                    Config.Instance.MD5PWD = revertData.MD5PWD;
-                    Config.Instance.Guid = revertData.Guid;
-                    Config.Instance.LoginDateTime = DateTime.Now;
-                    Config.Instance.LoginToken = revertData.Token;
-                    isLoginSuccess = 1;
-                    var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
-                    System.Console.WriteLine($"鍚庡彴鐧诲綍鎴愬姛--{Config.Instance.LoginDateTime}");
-                }
-                else if (stateCodeStr == "YOUDATANOISLOCALREGION")
-                {
-                    isLoginSuccess = -1;
-                    //涓嶅湪鏈尯鍩燂紝闇�瑕侀噸瀹氬悜鍖哄煙鍚庡啀娆¤姹傜櫥褰�
-                    if (revertObj.ResponseData == null)
-                    {
-                        return isLoginSuccess;
-                    }
-                    var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginLocalRegionRes>(revertObj.ResponseData.ToString());
-                    CommonPage.RequestHttpsHost = responseDataObj.RegionServer;
-                }
-                else
-                {
-                    isLoginSuccess = -1;
-                }
+            var isLoginSuccess = -1;
+            var requestObj = new SendDataToServer.LoginObj
+            {
+                Account = account,
+                Password = password,
+                Source = source,
+                Company = company
+            };
+            var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj);
+            var revertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/Login", System.Text.Encoding.UTF8.GetBytes(requestJson));
+            if (revertObj == null)
+            {
+                return 2;
+            }
+            var stateCodeStr = revertObj.StateCode.ToUpper();
+            //Error 涓嶈兘鐩存帴浠庢湇鍔″櫒鍙栵紝鍙兘鏍规嵁鐘舵�佺爜閫愪竴鍒ゆ柇
+            if (stateCodeStr == "SUCCESS")
+            {
+                var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
+                var revertData = responseDataObj;
+                //鏍囪涓婁竴娆℃槸涓嶆槸鍚屼竴涓处鍙风櫥闄�
+                UserCenter.UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
+                Config.Instance.Account = revertData.Account;
+                Config.Instance.Password = password;
+                Config.Instance.MD5PWD = revertData.MD5PWD;
+                Config.Instance.Guid = revertData.Guid;
+                Config.Instance.LoginDateTime = DateTime.Now;
+                Config.Instance.LoginToken = revertData.Token;
+                //涓婃姤璁惧ID
+                await CommonPage.Instance.PushRegID();
+                isLoginSuccess = 1;
+            }
+            else if (stateCodeStr == "YOUDATANOISLOCALREGION")
+            {
+                //涓嶅湪鏈尯鍩燂紝闇�瑕侀噸瀹氬悜鍖哄煙鍚庡啀娆¤姹傜櫥褰�
+                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);
+            }
+            if (stateCodeStr == "NOTVERIFY")
+            {
+                //鏈縺娲�
+            }
+            else if (stateCodeStr == "NOTENABLE")
+            {
+                //璇ョ敤鎴峰睘浜庤皟璇曡处鍙凤紝骞舵湭鍚敤
+            }
+            else if (stateCodeStr == "PARAMETEROREMPTY")
+            {
+                //鎻愪緵鐨勫弬鏁伴敊璇�
+            }
+            else if (stateCodeStr == "USERNAMEORPWDERROR")
+            {
+                //璐﹀彿鎴栧瘑鐮侀敊璇�
+                isLoginSuccess = 0;
+            }
+            else if (stateCodeStr == "ACCOUNTNOEXISTS")
+            {
+                //璐﹀彿涓嶅瓨鍦�
+                isLoginSuccess = 0;
             }
-            catch
-            {
-                isLoginSuccess = -1;
-            }
-            return isLoginSuccess;
-        }
-
-        /// <summary>
-        /// 鍚庡彴鐧诲綍
-        /// -1 澶辫触  1 鎴愬姛
-        /// </summary>
-        /// <returns>The by PWDA sync.</returns>
-        /// <param name="account">Account.</param>
-        /// <param name="password">Password.</param>
-        /// <param name="source">Source.</param>
-        /// <param name="company">Company.</param>
-        public async System.Threading.Tasks.Task<int> LoginByPWDResultAsync(string account, string password, string source = "", int company = 0)
-        {
-            var isLoginSuccess = await LoginByPWDAsync(account, password, source, company);
             return isLoginSuccess;
         }
     }
diff --git a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
index 8df13b5..f391d26 100755
--- a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
@@ -2,7 +2,7 @@
 using System.Collections.Generic;
 using Shared.Common;
 using System.Text;
-
+
 namespace Shared.Phone.UserView
 {
     /// <summary>
@@ -113,8 +113,8 @@
         public Button homePageIMG = new Button
         {
             Y = Application.GetRealHeight(tabBarEnumIMG_Y),
-            Height = Application.GetMinRealAverage(tabBarEnumIMG_Height),
-            Width = Application.GetMinRealAverage(tabBarEnumIMG_Width),
+            Height = UserCenter.HdlControlLogic.Current.GetPictrueRealSize(tabBarEnumIMG_Height),
+            Width = UserCenter.HdlControlLogic.Current.GetPictrueRealSize(tabBarEnumIMG_Width),
             UnSelectedImagePath = "Navigation/Home.png",
             SelectedImagePath = "Navigation/HomeSelected.png",
             Gravity = Gravity.CenterHorizontal
@@ -150,8 +150,8 @@
         public Button categoryIMG = new Button
         {
             Y = Application.GetRealHeight(tabBarEnumIMG_Y),
-            Height = Application.GetMinRealAverage(tabBarEnumIMG_Height),
-            Width = Application.GetMinRealAverage(tabBarEnumIMG_Width),
+            Height = UserCenter.HdlControlLogic.Current.GetPictrueRealSize(tabBarEnumIMG_Height),
+            Width = UserCenter.HdlControlLogic.Current.GetPictrueRealSize(tabBarEnumIMG_Width),
             UnSelectedImagePath = "Navigation/Category.png",
             SelectedImagePath = "Navigation/CategorySelected.png",
             Gravity = Gravity.CenterHorizontal
@@ -187,8 +187,8 @@
         public Button settingIMG = new Button
         {
             Y = Application.GetRealHeight(tabBarEnumIMG_Y),
-            Height = Application.GetMinRealAverage(tabBarEnumIMG_Height),
-            Width = Application.GetMinRealAverage(tabBarEnumIMG_Width),
+            Height = UserCenter.HdlControlLogic.Current.GetPictrueRealSize(tabBarEnumIMG_Height),
+            Width = UserCenter.HdlControlLogic.Current.GetPictrueRealSize(tabBarEnumIMG_Width),
             UnSelectedImagePath = "Navigation/Setting.png",
             SelectedImagePath = "Navigation/SettingSelected.png",
             Gravity = Gravity.CenterHorizontal
@@ -205,44 +205,44 @@
             SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2,
             Gravity = Gravity.CenterHorizontal,
             TextSize = 10
-        };
+        };
         #endregion
-
+
         #region 寮哄埗鏄剧ず鑷姩鍖栫晫闈�
 
-        /// <summary>
-        /// 寮哄埗鏄剧ず鑷姩鍖栧垪琛ㄧ晫闈�
+        /// <summary>
+        /// 寮哄埗鏄剧ず鑷姩鍖栧垪琛ㄧ晫闈�
         /// </summary>
-        public void ShowCategoryAutoListForm()
-        {
-            //鍏抽棴鍏ㄩ儴鐣岄潰,鐩村埌涓婚〉涓烘
-            UserCenter.UserCenterLogic.CloseAllOpenForm();
-            //寮哄埗鏄剧ず鑷姩鍖栧垪琛ㄧ晫闈�
-            UserCenter.UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex = 2;
-            BottomEventHandler(Instance.categoryIMG, null);
+        public void ShowCategoryAutoListForm()
+        {
+            //鍏抽棴鍏ㄩ儴鐣岄潰,鐩村埌涓婚〉涓烘
+            UserCenter.UserCenterLogic.CloseAllOpenForm();
+            //寮哄埗鏄剧ず鑷姩鍖栧垪琛ㄧ晫闈�
+            UserCenter.UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex = 2;
+            BottomEventHandler(Instance.categoryIMG, null);
         }
 
         #endregion
-
+
         EventHandler<MouseEventArgs> BottomEventHandler = (sender, e) =>
         {
             if (sender == Instance.homePageIMG || sender == Instance.homePageName)
-            {
-                if (Instance.homePageName.IsSelected == true && e != null)
-                {
-                    //鍙湁鏄墜鍔ㄧ偣鍑荤殑鏃跺�欐墠澶勭悊
-                    return;
-                }
+            {
+                if (Instance.homePageName.IsSelected == true && e != null)
+                {
+                    //鍙湁鏄墜鍔ㄧ偣鍑荤殑鏃跺�欐墠澶勭悊
+                    return;
+                }
                 Instance.BodyView.RemoveAll();
                 //涓婚〉
                 CommonPage.Instance.IsDrawerLockMode = false;
                 Instance.homePageName.IsSelected = true;
-                Instance.homePageIMG.IsSelected = true;
-
-                Instance.categoryName.IsSelected = false;
-                Instance.categoryIMG.IsSelected = false;
-
-                Instance.settingName.IsSelected = false;
+                Instance.homePageIMG.IsSelected = true;
+
+                Instance.categoryName.IsSelected = false;
+                Instance.categoryIMG.IsSelected = false;
+
+                Instance.settingName.IsSelected = false;
                 Instance.settingIMG.IsSelected = false;
 
                 var home = new MainPage.HomeMainPageForm();
@@ -251,23 +251,23 @@
 
             }
             else if (sender == Instance.categoryIMG || sender == Instance.categoryName)
-            {
-                if (Instance.categoryName.IsSelected == true && e != null)
-                {
-                    //鍙湁鏄墜鍔ㄧ偣鍑荤殑鏃跺�欐墠澶勭悊
-                    return;
-                }
-
+            {
+                if (Instance.categoryName.IsSelected == true && e != null)
+                {
+                    //鍙湁鏄墜鍔ㄧ偣鍑荤殑鏃跺�欐墠澶勭悊
+                    return;
+                }
+
                 Instance.BodyView.RemoveAll();
                 //鍒嗙被
                 CommonPage.Instance.IsDrawerLockMode = true;
                 Instance.categoryName.IsSelected = true;
-                Instance.categoryIMG.IsSelected = true;
-
-                Instance.homePageName.IsSelected = false;
-                Instance.homePageIMG.IsSelected = false;
-
-                Instance.settingName.IsSelected = false;
+                Instance.categoryIMG.IsSelected = true;
+
+                Instance.homePageName.IsSelected = false;
+                Instance.homePageIMG.IsSelected = false;
+
+                Instance.settingName.IsSelected = false;
                 Instance.settingIMG.IsSelected = false;
 
                 var category = new Category.CategoryMainForm { };
@@ -275,21 +275,21 @@
                 category.ShowForm();
             }
             else if (sender == Instance.settingIMG || sender == Instance.settingName)
-            {
-                if (Instance.settingName.IsSelected == true && e != null)
-                {
-                    return;
-                }
+            {
+                if (Instance.settingName.IsSelected == true && e != null)
+                {
+                    return;
+                }
                 Instance.BodyView.RemoveAll();
                 //涓汉涓績
                 CommonPage.Instance.IsDrawerLockMode = true;
                 Instance.settingName.IsSelected = true;
-                Instance.settingIMG.IsSelected = true;
-
-                Instance.homePageName.IsSelected = false;
-                Instance.homePageIMG.IsSelected = false;
-
-                Instance.categoryName.IsSelected = false;
+                Instance.settingIMG.IsSelected = true;
+
+                Instance.homePageName.IsSelected = false;
+                Instance.homePageIMG.IsSelected = false;
+
+                Instance.categoryName.IsSelected = false;
                 Instance.categoryIMG.IsSelected = false;
 
                 var form = new UserCenter.UserMain.UserMainForm();
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
index f73ef01..f2e05ad 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
@@ -238,12 +238,16 @@
                     //缁х數鍣�
                     IconPath = "Device/RelayEpoint.png";
                 }
-                else if (this.Type == DeviceType.Thermostat || this.Type == DeviceType.FreshAir)
+                else if (this.Type == DeviceType.Thermostat)
                 {
-                    //绌鸿皟
-                    //鏂伴鍜岀┖璋冨浘鏍囩浉鍚�
+                    //绌鸿皟 
                     IconPath = "Device/AirConditionerEpoint.png";
                 }
+                else if (this.Type == DeviceType.FreshAir)
+                {
+                    //鏂伴 
+                    IconPath = "Device/FreshAirEpoint.png";
+                }
                 else if (this.Type == DeviceType.FreshAirHumiditySensor)
                 {
                     //婀垮害浼犳劅鍣�
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs
index 7e3f7f7..6928ccf 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs
@@ -79,7 +79,7 @@
         FreshAir = 0xD100,
         /// <summary>
         /// <para>鏂伴婀垮害浼犳劅鍣�</para>
-        /// <para>璁惧ID涓�0xD200</para>
+        /// <para>璁惧ID涓�53760</para>
         /// <para>瀹氫箟瀵硅薄锛歍emperatureSensor</para>
         /// </summary>
         FreshAirHumiditySensor = 0xD200,
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
index 0735d15..944cd49 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
@@ -36,7 +36,8 @@
         //鏈湴鎵�鏈夎处鎴峰垪琛�
         public List<Shared.Phone.UserCenter.MemberInfoRes> localAllAccountList = new List<Shared.Phone.UserCenter.MemberInfoRes> { };
         /// <summary>
-        /// 鏄惁甯稿紑妯″紡[褰撴暟鎹幏鍙栧け璐ワ紝杩斿洖绌篯 
+        /// 鏄惁甯稿紑妯″紡銆恔ey = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint銆�
+        /// ture:甯稿紑锛� false:鍏抽棴
         /// </summary>
         public Dictionary<string, bool> IsDoorLockNormallyMode = new Dictionary<string, bool> { };//鏄惁鍐荤粨瀛愯处鎴�
         public string LocalTempPassword = string.Empty;//鏈湴鐢熸垚鐨勪复鏃跺瘑鐮�
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs
index 4a9954a..cc6989d 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs
@@ -15,24 +15,85 @@
         }
 
         /// <summary>
-        /// 鎭掓俯璁惧褰撳墠妯″紡
-        /// <para>鎭掓俯璁惧鍏峰鍔熻兘锛孲ystemMode Attribute Values濡備笅</para>
-        /// <para>0:Off </para>
-        /// <para>1:Auto </para>
-        /// <para>3:Cool </para>
-        /// <para>4:Heat </para>
-        /// <para>5:Emergency heating </para>
-        /// <para>6:Precooling</para>
-        /// <para>7:Fan only </para>
-        /// <para>8:Dry </para>
-        /// <para>9:Sleep</para>
+        /// 椋庨�熸ā寮� 
+        /// <para>5:鑷姩</para>
+        /// <para>6:Smart</para>
+        /// <para>7:鎵嬪姩</para> 
         /// </summary>
-        public int currentSystemMode = 0;
+        public int currentFanMode = 0;
+        /// <summary>
+        /// 椋庨�熸。浣� 
+        /// <para>1:浣庨</para>
+        /// <para>2:涓</para>
+        /// <para>3:楂橀 </para> 
+        /// </summary>
+        public int currentFanSpeed = 0;
+        /// <summary>
+        /// 椋庢墖鐘舵��
+        /// <para>0:鍏抽棴 </para> 
+        /// <para>4:鎵撳紑 </para> 
+        /// </summary>
+        public int currentFanStatus = 0;
+
+        /// <summary>
+        /// 鍏抽棴
+        /// </summary>
+        /// <returns>The close.</returns>
+        public async System.Threading.Tasks.Task<SetWritableValueResponAllData> Close()
+        {
+            return await SetFanModeAsync(FanMode.Off);
+        }
+
+        /// <summary>
+        /// 寮�鍚�
+        /// </summary>
+        /// <returns>The open.</returns>
+        public async System.Threading.Tasks.Task<SetWritableValueResponAllData> Open()
+        {
+            return await SetFanModeAsync(FanMode.On);
+        }
+
+        /// <summary>
+        /// 楂橀
+        /// </summary>
+        /// <returns>The close.</returns>
+        public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetHighSpeed()
+        {
+            return await SetFanModeAsync(FanMode.High);
+        }
+
+        /// <summary>
+        /// 浣庨
+        /// </summary>
+        /// <returns>The open.</returns>
+        public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetLowSpeed()
+        {
+            return await SetFanModeAsync(FanMode.Low);
+        }
+
+
+        /// <summary>
+        /// 鎵嬪姩
+        /// </summary>
+        /// <returns>The close.</returns>
+        public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetManual()
+        {
+            return await SetFanModeAsync(FanMode.Manual);
+        }
+
+        /// <summary>
+        /// 鑷姩
+        /// </summary>
+        /// <returns>The open.</returns>
+        public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetAuto()
+        {
+            return await SetFanModeAsync(FanMode.Auto);
+        }
 
         ///<summary >
-        ///璁剧疆鎭掓俯鍣ㄨ澶囧綋鍓嶅伐浣滄ā寮�.
+        ///璁剧疆鎭掓俯鍣ㄨ澶囧綋鍓嶉閫�.
         /// </summary>
-        public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetSystemModeAsync(AcMode acMode)
+        public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetFanModeAsync(FanMode fanMode)
         {
             if (Gateway == null)
             {
@@ -81,8 +142,8 @@
                 DebugPrintLog("SetWritableValue_Actions 鍚姩" + "_" + System.DateTime.Now.ToString());
                 try
                 {
-                    var jObject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", DeviceEpoint }, { "Cluster_ID", 513 }, { "Command", 120 } };
-                    var data = new JObject { { "Undivided", 0 }, { "AttributeId", 28 }, { "AttributeDataType", 48 }, { "AttributeData", (int)acMode } };
+                    var jObject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", DeviceEpoint }, { "Cluster_ID", 514 }, { "Command", 120 } };
+                    var data = new JObject { { "Undivided", 0 }, { "AttributeId", 0 }, { "AttributeDataType", 48 }, { "AttributeData", (int)fanMode } };
                     jObject.Add("Data", data);
                     Gateway.Send("SetWritableValue", jObject.ToString());
                 }
@@ -107,63 +168,63 @@
             });
         }
 
-        public enum AcMode
+
+        #region 鈼� 褰撳墠鏂伴寮�鍏崇姸鎬乢___________________
+
+        /// <summary>
+        /// 褰撳墠鏂伴寮�鍏崇姸鎬�
+        /// </summary>
+        /// <param name="freshAir"></param>
+        /// <returns></returns>
+        public bool IsOpen(FreshAir freshAir)
+        {
+            if (freshAir.currentFanStatus == 4)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        #endregion
+
+
+        /// <summary>
+        /// 椋庨�熸。浣�
+        /// </summary>
+        public enum FanMode
         {
             /// <summary>
-            /// 鍏抽棴妯″紡锛堟祴璇曟亽娓╅潰鏉挎椂鍙戠幇锛�2锛�5锛�6锛�7锛�8锛�9閮芥槸鍙互鎵撳紑鐨勶級
+            /// 鍏抽棴
             /// </summary>
             Off = 0,
             /// <summary>
-            /// 鑷姩妯″紡
+            /// 浣庨
             /// </summary>
-            Auto = 1,
+            Low = 1,
             /// <summary>
-            /// 鍒跺喎妯″紡
+            /// 涓
             /// </summary>
-            Cool = 3,
+            Medium = 2,
             /// <summary>
-            /// 鍒剁儹妯″紡
+            /// 楂橀
             /// </summary>
-            Heat = 4,
+            High = 3,
             /// <summary>
-            /// 绱ф�ュ埗鐑ā寮�
+            /// 鎵撳紑
             /// </summary>
-            EmergencyHeating = 5,
+            On = 4,
             /// <summary>
-            /// 棰勫喎妯″紡
+            /// 鑷姩
             /// </summary>
-            Precooling = 6,
+            Auto = 5,
             /// <summary>
-            /// 鍙湁椋庨�熸ā寮�
+            /// Smart
             /// </summary>
-            FanOnly = 7,
+            Smart = 6,
             /// <summary>
-            /// 骞茬嚗妯″紡
+            /// 鎵嬪姩
             /// </summary>
-            Dry = 8,
-            /// <summary>
-            /// 鐫$湢妯″紡
-            /// </summary>
-            Sleep = 9
-        }
-
-        /// <summary>
-        /// 鍏抽棴
-        /// </summary>
-        /// <returns>The close.</returns>
-        public async System.Threading.Tasks.Task<SetWritableValueResponAllData> Close()
-        {
-            return await SetSystemModeAsync(AcMode.Off);
+            Manual = 7,
         }
-
-        /// <summary>
-        /// 寮�鍚�
-        /// </summary>
-        /// <returns>The open.</returns>
-        /// <param name="acMode">Ac mode.</param>
-        public async System.Threading.Tasks.Task<SetWritableValueResponAllData> Open(AcMode acMode = AcMode.Cool)
-        {
-            return await SetSystemModeAsync(acMode);
-        }
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/HumiditySensor.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/HumiditySensor.cs
index d982539..3646638 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/HumiditySensor.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/HumiditySensor.cs
@@ -8,6 +8,7 @@
     {
         public HumiditySensor()
         {
+            this.Type = DeviceType.FreshAirHumiditySensor;
         }
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
index 4de23e1..2ac732f 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
@@ -155,6 +155,7 @@
         /// <para>304:CurtainDownstop,绐楀笜涓嬮檷鍋�</para>
         /// </summary>
         public List<int> privateFuncThirdLevelList = new List<int>();
+
         #region 鑾峰彇闈㈡澘鐨勭鏈変俊鎭�.
         /// <summary>
         ///鑾峰彇闈㈡澘鐨勭鏈変俊鎭�
@@ -1402,7 +1403,7 @@
         ///<summary >
         /// 閰嶇疆鎸夐敭鎸囩ず鐏潰鏉胯妭鑳芥ā寮�
         /// <para>modeEnable:鑺傝兘妯″紡浣胯兘</para>
-        /// <para>modeTime:鏃犳搷浣滆繘鍏ヨ妭鑳芥ā寮忔椂闂� 0-ff</para>
+        /// <para>modeTime:鏃犳搷浣滆繘鍏ヨ妭鑳芥ā寮忔椂闂� 0-ffff</para>
         /// <para>鑺傝兘妯″紡浜害:0-100</para>
         /// </summary>
         public async System.Threading.Tasks.Task<ResponseAllData> SetKeyModeAsync(bool modeEnable, int modeTime, int level)
@@ -1509,11 +1510,11 @@
         string SetPanelModeModeData(bool modeEnable, int modeTime, int modelevel)
         {
             string data = "";
-            string dataLength = "07";
+            string dataLength = "08";
             string dataComand1 = "03";
             string dataComand2 = "04";
             string dataSerialNum = "01";
-            string addDataLength = "03";
+            string addDataLength = "04";
             string mode = "";
             string time = "";
             string level = "";
@@ -1527,17 +1528,30 @@
                 {
                     mode = "00";
                 }
-                var sbString1 = new System.Text.StringBuilder();
-                string temp = Convert.ToString(modeTime, 16);
-                switch (temp.Length)
+
+                if (modeTime == -1)
                 {
-                    case 1:
-                        time = "0" + temp;
-                        break;
-                    case 2:
-                        time = temp;
-                        break;
+                    //褰撹妭鑳芥ā寮忔病鏈夌粰鏃堕棿锛岄粯璁ょ粰60绉�
+                    modeTime = 60;
                 }
+
+                var tempBytes = new byte[2];
+                for (int i = 0; i < 2; i++)
+                {
+                    tempBytes[i] = (byte)(modeTime >> (i * 8) & 0xff);
+                }
+                var time1 = Convert.ToString(tempBytes[0], 16);
+                var time2 = Convert.ToString(tempBytes[1], 16);
+                if (time1.Length == 1)
+                {
+                    time1 = "0" + time1;
+                }
+                if (time2.Length == 1)
+                {
+                    time2 = "0" + time2;
+                }
+
+                time = (time1 + time2).ToUpper();
 
                 var sbString2 = new System.Text.StringBuilder();
                 string temp2 = Convert.ToString(modelevel, 16);
@@ -1551,10 +1565,9 @@
                         break;
                 }
 
-                sbString1.Append(time.ToUpper());
                 sbString2.Append(level.ToUpper());
                 data = dataLength + dataComand1 + dataComand2 + dataSerialNum + addDataLength +
-                   mode + sbString1 + sbString2;
+                   mode + time + sbString2;
             }
             catch { };
 
@@ -2153,7 +2166,7 @@
                             if (gatewayTemp.clientDataPassthroughResponseData?.PassData != null)
                             {
                                 var data = gatewayTemp.clientDataPassthroughResponseData.PassData;
-                                if (data.Length == 16)
+                                if (data.Length == 18)
                                 {
                                     var command = data[4].ToString() + data[5].ToString() + data[2].ToString() + data[3].ToString();
                                     if (command == "0409")
@@ -2167,8 +2180,8 @@
                                         {
                                             tempR.enable = false;
                                         }
-                                        tempR.time = Convert.ToInt32(data[12].ToString() + data[13].ToString(), 16);
-                                        tempR.level = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16);
+                                        tempR.time = Convert.ToInt32(data[14].ToString() + data[15].ToString() + data[12].ToString() + data[13].ToString(), 16);
+                                        tempR.level = Convert.ToInt32(data[16].ToString() + data[17].ToString(), 16);
                                         panelSaveEnergyModeInfo = tempR;
                                         result = new PanelSwitchLevelResponInfo { panelSaveEnergyModeInfo = tempR };
                                         System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0408_{ topic}");
diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs
index 5171c94..49e7bfe 100755
--- a/ZigbeeApp/Shared/R.cs
+++ b/ZigbeeApp/Shared/R.cs
@@ -550,6 +550,14 @@
         /// 鏃舵晥鎬у父寮�鍒犻櫎澶辫触锛岀户缁�滃父寮�妯″紡鈥濊鍓嶅線闂ㄩ攣鐢ㄦ埛鐣岄潰璁剧疆
         /// </summary>
         public const int CancelLogicNormallyModeFailed2 = 309;
+        /// <summary>
+        /// 璇疯緭鍏ュ悎娉曠殑鏁板瓧
+        /// </summary>
+        public const int IllegalNumber = 310;
+        /// <summary>
+        /// 鎵嬪姩
+        /// </summary>
+        public const int Manual = 311;
 
         public readonly static int cancel = 5097;
         public readonly static int confrim = 5098;
@@ -807,6 +815,14 @@
         public readonly static int openmode = 5380;
         public readonly static int addnull = 5381;
         public readonly static int look = 5382;
+        public readonly static int closeUp = 5383;
+        public readonly static int yearSone = 5384;
+        public readonly static int monthSone = 5385;
+        public readonly static int daySone = 5386;
+        public readonly static int numberSone = 5387;
+        public readonly static int openAutomationSone = 5388;
+        public readonly static int timeSetSone= 5389;
+
 
         #region 鐧诲綍娉ㄥ唽
         /// <summary>
@@ -1133,9 +1149,9 @@
 		/// </summary>
 		public const int BelongZone = 11015;
 		/// <summary>
-		/// 鎵�灞炴ā鍧�
+		/// 鎵�灞炶澶�
 		/// </summary>
-		public const int BelongModel = 11016;
+		public const int BelongDevice = 11016;
 		/// <summary>
 		/// 鏈煡
 		/// </summary>
@@ -5666,7 +5682,50 @@
         /// 闂ㄩ攣鎶ヨ淇℃伅14锛氫复鏃跺瘑鐮佸紑閿佸け璐�
         /// </summary>
         public const int uDoorLockAlarmMsg14 = 16103;
-
+        /// <summary>
+        /// 鐢垫満绌鸿皟妯″潡
+        /// </summary>
+        public const int uSaecAirConditioningModule = 16104;
+        /// <summary>
+        /// 涓滆姖绌鸿皟妯″潡
+        /// </summary>
+        public const int uToshibaAirConditioningModule = 16105;
+        /// <summary>
+        /// 鏍煎姏绌鸿皟妯″潡
+        /// </summary>
+        public const int uGreeAirConditioningModule = 16106;
+        /// <summary>
+        /// 缇庣殑绌鸿皟妯″潡
+        /// </summary>
+        public const int uMideaAirConditioningModule = 16107;
+        /// <summary>
+        /// 铏氭嫙缃戝叧
+        /// </summary>
+        public const int uVirtualGateway = 16108;
+        /// <summary>
+        /// 鐜勫叧
+        /// </summary>
+        public const int uVestibule = 16109;
+        /// <summary>
+        /// 鍘ㄦ埧
+        /// </summary>
+        public const int uKitchen = 16110;
+        /// <summary>
+        /// 璧板粖
+        /// </summary>
+        public const int uCorridor = 16111;
+        /// <summary>
+        /// 铏氭嫙璐﹀彿
+        /// </summary>
+        public const int uVirtualAccount = 16112;
+        /// <summary>
+        /// 鐏叏寮�
+        /// </summary>
+        public const int uAllLightOpen = 16113;
+        /// <summary>
+        /// 鐏叏鍏�
+        /// </summary>
+        public const int uAllLightClose = 16114;
 
         //鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
         /// <summary>
@@ -6055,7 +6114,7 @@
         /// <summary>
         /// 闀滃儚ID涓�2310鐨勮澶囩殑榛樿鍚嶅瓧锛氭柟鎮︽柊椋庡皬妯″潡
         /// </summary>
-        public const int DeviceModelId2310 = 30038;
+        public const int uDeviceModelId2310 = 30038;
 
         //鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄澶囨墍灞炵绫荤殑缈昏瘧鍚嶅瓧,浠�40000寮�濮嬧槄鈽呪槄鈽�
         /// <summary>
diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems
index f631be9..6c3a1c5 100755
--- a/ZigbeeApp/Shared/Shared.projitems
+++ b/ZigbeeApp/Shared/Shared.projitems
@@ -28,6 +28,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\Controls\DeviceRow\DeviceColorLightRowControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\Controls\DeviceRow\DeviceCurtainRowControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\Controls\DeviceRow\DeviceDoorLockRowControl.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\Controls\DeviceRow\DeviceFreshAirRowControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\Controls\DeviceRow\DeviceRelayRowControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\Controls\DeviceRow\DeviceSensorRowControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\Controls\DeviceRow\DeviceTemperatureRowControl.cs" />
@@ -48,6 +49,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\OneTimePoint.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\RoomAndDeviceView.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SkipView.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SoneLogicList.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountForgetPWD.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountLogic.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountRegister.cs" />
@@ -61,9 +63,6 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\SelectHouseForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\CommonEnum.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\CommonFormResouce.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\DeviceIconSelectedIMGByLocal.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\DeviceInfoRow.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\FunctionIconButton.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\LeftIconButtonRow.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\RoomView.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SceneCategoryView.cs" />
@@ -95,10 +94,11 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceAcDetailCardForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceColorLightDetailCardForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceCurtainDetailCardForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceFreshAirDetailCardForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceRelayDetailCardForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceFunctionUnallocatedControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceSelectUnallocatedControl.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\SelectLocalDeviceImageForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\SelectLocalDeviceImageForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\DeviceDetailInfoForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\UnallocatedRoomForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\Base\DeviceCardCommon.cs" />
@@ -118,6 +118,8 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Abount\SLAForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Common\AccountOption.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Common\ResidenceOption.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\BaseCommonControl\Base\FrameLayoutBase.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\BaseCommonControl\Base\RowLayoutBase.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\ClickButtonControls\BottomLeftClickButton.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\ClickButtonControls\BottomRightClickButton.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\BelongAreaControl.cs" />
@@ -135,6 +137,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\NormalControls\IconBigViewControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\NormalControls\LoadingControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\NormalControls\MessageManagementControl.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\RowLayoutControls\DeviceFunctionTypeRowControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\SceneControls\ScenePictrueControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Form\BottomMenuSelectForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Form\NumberPswInputDialogForm.cs" />
@@ -147,6 +150,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlDeviceCurtainLogic.cs" />
     <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\HdlGatewayBackupLogic.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlGatewayUpdateLogic.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlLogLogic.cs" />
@@ -246,6 +250,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\HideOption\HideOptionFileListForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\HideOption\HideOptionGatewayListForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\HideOption\HideOptionMainForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\HideOption\HideOptionSearchAllFile.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Member\MemberNotEsixtForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\CheckNewPhoneForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\CheckOldPhoneForm.cs" />
@@ -284,7 +289,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\DeviceControls\GatewayRowControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\FrameLayoutControls\FrameListControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\ClickButtonControls\BottomClickButton.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\FrameLayoutControls\FrameLayoutControl.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\FrameLayoutControls\FrameLayoutStatuControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\ListViewLayoutControls\VerticalFrameControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\ListViewLayoutControls\VerticalListControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\NormalControls\NormalViewControl.cs" />
@@ -413,7 +418,6 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\WiredGatewaySearchForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Manage\GatewayInfoEditorForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountLogin.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountLoginByCode.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Common\CommonPage.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\GetAreaCode.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\ResidenceRes.cs" />

--
Gitblit v1.8.0