From 2ed75b8b337048e5d75e6d9ec8307633134f02fd Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 10 十月 2019 11:33:04 +0800
Subject: [PATCH] 个人中心添加楼层和创建房间,实装二级验证

---
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_HeatSelected.png                                       |    0 
 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectDeviceByRoom.cs                           |   21 
 ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs                                                    |    2 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/16Icon.png                                        |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayFirmwareInfoForm.cs                         |    5 
 ZigbeeApp/Shared/Phone/UserCenter/Safety/AddDeviceAlarmTargetListForm.cs                            |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/17IconSelected.png                                |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSafeguardLogic.cs                             |    6 
 ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/4.png                                                |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Safety/AddSceneAlarmTargetListForm.cs                             |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/11IconSelected.png                                |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/14IconSelected.png                                |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Safety/AddAlarmTargetTypeListForm.cs                              |   11 
 ZigbeeApp/Shared/Phone/Device/Logic/SetDeviceState.cs                                               |    6 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs                                 |  103 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/VirtualFrame.png                                          |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/GatewayFirmwareUpdateControl.cs               |   20 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SelectFloor_Left.png                                      |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs     |   73 
 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs                                     |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r13.png                                                   |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r6.png                                                    |    0 
 ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs                                        |  469 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayThreeLoadBackLightSettionForm.cs                |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Home.png                                            |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs          |   80 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Fan.png                                                |    0 
 ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs                                                |   98 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/FloorListRoomForm.cs                                    |  192 
 ZigbeeApp/Shared/Phone/Device/Account/AccountLoginByCode.cs                                         | 1199 +-
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r17.png                                                   |    0 
 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDelayTime.cs                            |  128 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r21.png                                                   |    0 
 ZigbeeApp/Shared/Phone/ZigBee/Device/AC.cs                                                          |   93 
 ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs                                              |   18 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Auto.png                                               |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs                              |  819 +-
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/20IconSelected.png                                |    0 
 ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs                                           |  118 
 ZigbeeApp/Shared/Phone/Device/Room/AddRoomSelectPicByLocal.cs                                       |    6 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/OpenOrCloseSelected.png                                     |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs                                 |    8 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch.png                                                |    0 
 ZigbeeApp/Shared/Phone/Device/Room/AddRoomContent.cs                                                |   21 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/CategorySelected.png                                |    0 
 ZigbeeApp/Shared/Phone/Device/Account/AccountRegister.cs                                            |  464 +
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Add.png                                                   |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs                             |   10 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Account.png                                            |    0 
 ZigbeeApp/Shared/Phone/Device/Logic/CyclicCycle.cs                                                  |    2 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Group.png                                                   |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_Low.png                                                 |    0 
 ZigbeeApp/Shared/Phone/Device/Account/AccountRegisterSuccess.cs                                     |  161 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/19Icon.png                                        |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r10.png                                                   |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_Middle.png                                              |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorTemperature.png                                   |    0 
 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectCurtainSetting.cs                         |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/SelectDeviceForm.cs                             |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/3Icon.png                                         |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/HomeSelected.png                                    |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/1.png                                                |    0 
 ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackUpForm.cs                                    |   15 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SearchEditText.cs            |    5 
 ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs                           |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r2.png                                                    |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/11Icon.png                                        |    0 
 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectRoomList.cs                               |   21 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SceneFunctionBG.png                                       |    0 
 ZigbeeApp/Shared/Phone/Device/Room/AddDeviceList.cs                                                 |   21 
 ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs                                               |  440 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/20Icon.png                                        |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r9.png                                                    |    0 
 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectDevice.cs                                 |   21 
 ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionIconButton.cs                                      |   92 
 ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs                                         |  282 
 ZigbeeApp/Shared/Phone/Device/Room/AddRoom.cs                                                       |    9 
 ZigbeeApp/Shared/Phone/UserCenter/Safety/SectorsSettionMenuForm.cs                                  |    4 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs                             |    2 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Floor/FloorSelected.png                                        |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ResidenceIcon.png                                         |    0 
 ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs                                                     | 3469 +++++----
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/2IconSelected.png                                 |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs                            |    8 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/18Icon.png                                        |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r14.png                                                   |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs                                    |    5 
 ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs                                                    |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/5IconSelected.png                                 |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs                                     |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/CollectionSelected.png                                    |    0 
 ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj                                                        |  390 +
 ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Password.png                                           |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessGatewaySearchForm.cs                          |   10 
 ZigbeeApp/Shared/Common/CommonPage.cs                                                               |   25 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs |   23 
 ZigbeeApp/Shared/Phone/Device/Logic/Send.cs                                                         |  274 
 ZigbeeApp/Shared/Phone/Device/CommonForm/CustomAlert.cs                                             |  124 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/10Icon.png                                        |    0 
 ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs                                                       |  270 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Code.png                                               |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/6Icon.png                                         |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/DeviceTypePictrueImageEnum.cs                   |   26 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r20.png                                                   |    0 
 ZigbeeApp/Shared/Phone/Device/CommonForm/RowLayoutEditButton.cs                                     |    4 
 ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionRow.cs                                             |  157 
 ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetSettionForm.cs                                  |   11 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_MiddleSelected.png                                      |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/9Icon.png                                         |    0 
 ZigbeeApp/Shared/Phone/Device/Room/AddDevieDetailFromAddFunction.cs                                 |    2 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r5.png                                                    |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/8IconSelected.png                                 |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Safety/SensorDeviceSettionListForm.cs                             |    5 
 ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionButton.cs                                          |  126 
 ZigbeeApp/Shared/Phone/UserView/HomePage.cs                                                         |   13 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Cancle.png                                             |    0 
 ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayBackUpForm.cs                                 |   17 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Setting.png                                         |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_DrySelected.png                                        |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs                                    |   31 
 ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs                                         |   55 
 ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayListBackUpForm.cs                             |   10 
 ZigbeeApp/Shared/Phone/Device/AirSwitch/AirSwitchControl.cs                                         |    3 
 ZigbeeApp/Shared/Phone/Device/Room/AddRoomScene.cs                                                  |   65 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/IconControlCommon.cs |    5 
 ZigbeeApp/Shared/Phone/Device/CommonForm/ACLeftIconButtonRowLayout.cs                               |  116 
 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedListRoomForm.cs                |   12 
 ZigbeeApp/Shared/R.cs                                                                               |  460 +
 ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs                                                 |    2 
 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedScene.cs                                |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_Height.png                                              |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/13Icon.png                                        |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r18.png                                                   |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs                                   |   91 
 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedMainForm.cs                       |   12 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/SettingSelected.png                                 |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceHistoryFirmwareVersionForm.cs                        |    5 
 ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs                                          |  473 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Category.png                                        |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Add_GW.png                                                |    0 
 ZigbeeApp/Shared/Phone/Device/CommonForm/CommonFormResouce.cs                                       |  174 
 ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs                                          |    4 
 ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs                                          |   47 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r1.png                                                    |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r24.png                                                   |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/1Icon.png                                         |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_FanSelected.png                                        |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs                          |   80 
 ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs                                |   18 
 ZigbeeApp/Shared/Common/House.cs                                                                    |   53 
 ZigbeeApp/Shared/Phone/Device/CommonForm/CompleteButton.cs                                          |   38 
 ZigbeeApp/Shared/Common/Room.cs                                                                     |  325 
 ZigbeeApp/GateWay.Droid/Assets/Language.ini                                                         |  122 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r8.png                                                    |    0 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs                                          |   19 
 ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlManualBackUpForm.cs                                  |   48 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs             |    3 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Account/HidePwd.png                                            |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r23.png                                                   |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Category_FunctionBG.png                                   |    0 
 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectLightSetting.cs                           |   23 
 ZigbeeApp/Shared/Phone/Device/Category/Category.cs                                                  | 1189 +--
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/12Icon.png                                        |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/4Icon.png                                         |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_HeightSelected.png                                      |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs                                     |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/9IconSelected.png                                 |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Logo/Logo.png                                                  |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs                  |   16 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Collection.png                                            |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch2Selected.png                                       |    0 
 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectAirSwitchSetting.cs                       |    6 
 ZigbeeApp/Shared/Phone/UserView/UserPage.cs                                                         |   90 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_LowSelected.png                                         |    0 
 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs                             |  153 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs                         |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Floor/Floor.png                                                |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/7Icon.png                                         |    0 
 ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs                                                 |    6 
 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedListRoomForm.cs                   |   12 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Category_FunctionBGSelected.png                           |    0 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs                              |   38 
 ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetForm.cs                       |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NoFunction.png                                            |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/HouseSelected.png                                         |    0 
 ZigbeeApp/Shared/Common/ZigbeeColor.cs                                                              |  179 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r15.png                                                   |    0 
 ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoEditRow.cs                                       |  121 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r4.png                                                    |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs                               |   35 
 ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs                                                  |    6 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r19.png                                                   |    0 
 ZigbeeApp/Shared/Phone/Device/Account/AccountResetPWDSuccess.cs                                     |  105 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DialogInputFrameControl.cs                    |  120 
 ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs                                            |  301 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/15Icon.png                                        |    0 
 ZigbeeApp/Shared/Phone/Device/Room/AddDevicesSameTypeList.cs                                        |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Add.png                                                     |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/BelongAreaControl.cs         |  223 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/AreaCodeSelectForm.cs                             |   10 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Heat.png                                               |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/House.png                                                 |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/TemperatrueHumiditySensorSelectForm.cs                  |   10 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch2.png                                               |    0 
 ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs                                          |  102 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs                                      |   26 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/6IconSelected.png                                 |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/3IconSelected.png                                 |    0 
 ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs                                           |  456 +
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r12.png                                                   |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/InformationEditorControl.cs  |   78 
 ZigbeeApp/Shared/Phone/UserCenter/Safety/CoerceContactSettionForm.cs                                |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Cool.png                                               |    0 
 ZigbeeApp/Shared/Phone/Device/AC/ACControlBase.cs                                                   |   33 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Dry.png                                                |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/CommonFormBase.cs                            |   36 
 ZigbeeApp/Shared/Phone/Device/Account/PhoneEmailForm.cs                                             | 1105 +++
 ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs                                       |  130 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/SelectRoomForm.cs                               |    5 
 ZigbeeApp/Shared/Shared.projitems                                                                   |   38 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/16IconSelected.png                                |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/3.png                                                |    0 
 ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupSettionForm.cs                             |    7 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Account/UnhidePwd.png                                          |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r0.png                                                    |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/10IconSelected.png                                |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/19IconSelected.png                                |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/13IconSelected.png                                |    0 
 ZigbeeApp/Shared/Common/SendDataToServer.cs                                                         |    2 
 ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/CommonDevice.png                                    |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Reduce.png                                                  |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Cat.png                                                |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r7.png                                                    |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs                          |   12 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Account/ChangeSuccess.png                                      |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/2Icon.png                                         |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceUpdateLogic.cs                          |   20 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/14Icon.png                                        |    0 
 ZigbeeApp/Shared/Phone/Device/CommonForm/Line.cs                                                    |   34 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Floor.png                                                 |    0 
 ZigbeeApp/Shared/Phone/Device/Logic/EverymonthPage.cs                                               |  152 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs                                        |   25 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r22.png                                                   |    0 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs                                |  103 
 ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs                                               |  113 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_AutoSelected.png                                       |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/18IconSelected.png                                |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs                             |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/SelectedFanModeBG.png                                       |    0 
 ZigbeeApp/Shared/Phone/Device/CommonForm/SelectedStatuButton.cs                                     |   13 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/15IconSelected.png                                |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/BottomShadow.png                                          |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayHistoryFirmwareVersionForm.cs               |    5 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs                         |    5 
 ZigbeeApp/Shared/Phone/UserCenter/Safety/PasswordRefreshMsgForm.cs                                  |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NoBindGW.png                                              |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Logo_White.png                                         |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/OpenOrClose.png                                             |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs                             |   80 
 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs                                     |    5 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs                                   |    4 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r16.png                                                   |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Add_Category.png                                          |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs                                       |  225 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/17Icon.png                                        |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/RoomIcon.png                                              |    0 
 ZigbeeApp/Shared/Phone/ZigBee/Device/Enum.cs                                                        |    5 
 ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs                                         |   18 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Logo_loginBG.png                                       |    0 
 ZigbeeApp/Shared/Phone/Device/Account/PhoneZone.cs                                                  |  280 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/7IconSelected.png                                 |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Drop_Down.png                                             |    0 
 ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs                                           |   74 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r3.png                                                    |    0 
 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDimmableLightSetting.cs                 |    2 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/12IconSelected.png                                |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/SelectedModeBG.png                                          |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/5Icon.png                                         |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs                            |   80 
 ZigbeeApp/Shared/Common/Device.cs                                                                   |   76 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SelectHouse.png                                           |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/2.png                                                |    0 
 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedMainForm.cs                    |    7 
 ZigbeeApp/Shared/Common/ResponseEntity/UserLoginRes.cs                                              |    2 
 ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceIconSelectedIMGByLocal.cs                            |  141 
 ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs                                                 |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs                               |  107 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Path.png                                                    |    0 
 ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs                                                 |    4 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SwitchSelected.png                                        |    0 
 ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_CoolSelected.png                                       |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs                               |   80 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs        |   18 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/8Icon.png                                         |    0 
 ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs                                                 |  110 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/4IconSelected.png                                 |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs                                    |  572 +
 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorHumidity.png                                      |    0 
 /dev/null                                                                                           |   84 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/ClickButtonCommon.cs |    5 
 ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/1IconSelected.png                                 |    0 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs                                  |  219 
 ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs                                                |   21 
 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r11.png                                                   |    0 
 304 files changed, 13,344 insertions(+), 6,377 deletions(-)

diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
index d3acaa0..c39f87a 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini
+++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -520,14 +520,79 @@
 5304=鏄惁瑕佸垹闄�?
 
 
-10000=鍠滅埍
-10003=璇锋眰鏈嶅姟鍣ㄥけ璐�
-10005=OK
-10006=璐﹀彿鎴栬�呭瘑鐮佷笉鑳戒负绌�
-10007=璐﹀彿宸茬粡娉ㄥ唽
-10008=閭鏍煎紡涓嶆纭�
-10009=瀵嗙爜闀垮害灏忎簬鍏�
-10010=涓ゆ瀵嗙爜杈撳叆涓嶄竴鑷�
+
+
+10000=HDL Home
+
+10100=鎵嬫満鍙�
+10101=閭
+10102=璇疯緭鍏ユ墜鏈哄彿
+10103=璇疯緭鍏ヤ笉灏戜簬6浣嶇殑瀵嗙爜
+10104=鐧诲綍
+10105=楠岃瘉鐮佺櫥褰�
+10106=娉ㄥ唽鐢ㄦ埛
+10107=璇疯緭鍏ラ偖绠�
+10108=鎼滅储
+10109=纭畾
+10110=璐﹀彿鐧诲綍
+10111=鍙戦�侀獙璇佺爜
+10112=鍚庨噸鍙�
+10113=璇峰啀娆¤緭鍏ュ瘑鐮�
+10114=鍙戦�侀獙璇佺爜鎴愬姛锛岃娉ㄦ剰鏌ユ敹
+10115=纭畾
+10116=璇ヨ处鍙峰凡娉ㄥ唽锛屽彲鐩存帴鐧诲綍
+10117=鎻愪緵鐨勫弬鏁伴敊璇�
+10118=涓ゆ瀵嗙爜涓嶄竴鑷�
+10119=楠岃瘉鐮侀敊璇�
+10120=璇锋眰鏈嶅姟鍣ㄥけ璐�
+10121=鎭枩娉ㄥ唽鎴愬姛锛�
+10122=鍗冲皢鑷姩鐧诲綍
+10123=蹇樿瀵嗙爜
+10124=纭閲嶇疆
+10125=淇敼鎴愬姛
+10126=浣犵殑瀵嗙爜淇敼鎴愬姛锛岃閲嶆柊鐧诲綍
+
+11000=鍔熻兘
+11001=鍦烘櫙
+11002=鑷姩鍖�
+
+11010=娌℃湁鍔熻兘 \n 璇峰湪涓汉涓績涓�--璁惧绠$悊澶勬坊鍔�
+11011=缂栬緫
+11012=璁剧疆鍔熻兘
+11013=淇℃伅缂栬緫
+11014=鍔熻兘鍚嶇О
+11015=鎵�灞炲尯鍩�
+11016=鎵�灞炴ā鍧�
+11017=鏈煡
+11018=鍒嗕韩
+11019=鍒嗕韩鐨�
+11020=閫夋嫨鍥炬爣
+11021=淇濆瓨
+11022=鎻愮ず
+11023=鍙栨秷
+11024=娌℃湁鍦烘櫙 \n 璇风偣鍑诲彸涓婅娣诲姞
+11025=璁剧疆
+11026=瀹氭椂
+11027=纭畾鍒犻櫎鍚楋紵
+11028=娣诲姞鍦烘櫙
+11029=鍦烘櫙鍚嶇О
+11030=璇疯緭鍏ュ満鏅悕绉�
+11031=娣诲姞鎵ц鐩爣
+11032=閫夋嫨鍖哄煙
+11033=閫夋嫨鍦烘櫙鍥剧墖
+
+
+13100=鎴块棿鍒楄〃
+13101=閫夋嫨妤煎眰
+13102=閫夋嫨浣忓畢
+13103=鏂扮敤鎴风櫥褰曪紝璇峰厛缁戝畾缃戝叧
+13104=娣诲姞鏅鸿兘缃戝叧
+
+
+
+
+
+
 
 10011=瀵嗙爜涓嶈兘涓虹┖锛�
 10012=璇峰幓閭婵�娲昏处鍙�
@@ -539,6 +604,8 @@
 10018=楠岃瘉鐮侀敊璇�
 10019=璇ョ敤鎴峰睘浜庤皟璇曡处鍙凤紝骞舵湭鍚敤
 10020=璇峰幓閭纭淇敼瀵嗙爜
+
+
 
 10021=閭欢鍙戦�佸け璐ワ紝璇烽噸璇�
 10022=璇ヨ处鍙锋棤鏉冮檺
@@ -563,7 +630,7 @@
 11007=閭娉ㄥ唽
 11008=宸叉湁璐﹀彿锛熺櫥褰�
 11009=璇疯緭鍏ユ墜鏈哄彿
-11010=璇峰啀娆$‘璁ゅ瘑鐮�
+
 11011=璇疯緭鍏ラ獙璇佺爜
 11012=鍙戦�侀獙璇佺爜
 11013=鎻愮ず
@@ -614,11 +681,15 @@
 11058=娣诲姞璁惧鎴愬姛
 11059=鍏抽棴
 11060=璁惧
-11061=杩樻病娣诲姞鍔熻兘
+
 11062=纭畾鍒犻櫎璇ユ埧闂村悧锛�
 11063=纭畾鍒犻櫎鍚楋紵
 11064=杩樻病娣诲姞鍦烘櫙
 11065=鑷姩鍖�
+
+
+
+
 
 
 
@@ -726,8 +797,8 @@
 12109=涓户鍣�
 
 12500=褰撳墠鎴块棿娌℃湁璁惧鍙互娣诲姞鍒板満鏅�
-12501=寰�涓婄Щ鍔ㄩ檺浣�
-12502=寰�涓嬬Щ鍔ㄩ檺浣�
+12501=寰�涓婄Щ鍔�
+12502=寰�涓嬬Щ鍔�
 
 
 
@@ -925,7 +996,7 @@
 15197=纭畾瑕佺Щ闄よ瀹跺涵鎴愬憳鍚楋紵
 15198=鍒锋柊
 15199=鏈垎閰嶅尯鍩�
-15200=娣诲姞浣忓畢
+15200=鍒涘缓浣忓畢
 15201=缂栬緫浣忓畢
 15202=璇疯緭鍏ヤ綇瀹呭悕绉�
 15203=涓嶈兘鍒犻櫎鏈�鍚庡敮涓�鐨勪綇瀹�
@@ -1417,6 +1488,26 @@
 15749=淇敼瀵嗙爜锛岃杈撳叆鏂板瘑鐮�
 15750=纭瀵嗙爜閿欒锛岃閲嶆柊璁剧疆
 15751=娌℃湁璁剧疆瀵嗙爜楠岃瘉
+15752=褰撳墠浣忓畢
+15753=鍒囨崲
+15754=鏇存敼
+15755=鏇存敼鍚嶇О
+15756=纭鍒囨崲褰撳墠浣忓畢鍒般�寋0}銆�?
+15757=妤煎眰
+15758=鍒涘缓妤煎眰
+15759=璇疯緭鍏ユゼ灞傚悕绉�
+15760=妤煎眰鍚嶇О宸茬粡瀛樺湪
+15761=纭鍒犻櫎妤煎眰鍙婂叾鎵�鏈夋埧闂�?
+15762=鍒犻櫎浣忓畢
+15763=纭鍒犻櫎浣忓畢鍙婃墍鏈夋ゼ灞傘�佹埧闂�?
+15764=纭鍒犻櫎鎴块棿?
+15765=鍒涘缓鎴块棿
+15766=鎴块棿鍚嶇О
+15767=鎵�灞炴ゼ灞�
+15768=娓╁害
+15769=婀垮害
+15770=璇疯緭鍏ユ埧闂村悕绉�
+15771=缂栬緫鎴块棿
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
 18004=鎸囧畾缃戝叧宸茬粡琚粦瀹�
@@ -1506,4 +1597,7 @@
 40007=涓户鍣�
 40008=鏅鸿兘绌烘皵寮�鍏�
 40009=杞崲鍣�
-40010=褰╃伅
\ No newline at end of file
+40010=褰╃伅
+40011=娓╂箍搴︿紶鎰熷櫒
+40012=娓╁害浼犳劅鍣�
+40013=婀垮害浼犳劅鍣�
\ No newline at end of file
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Add.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Add.png
new file mode 100755
index 0000000..c596b06
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Add.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_Height.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_Height.png
new file mode 100755
index 0000000..6b09160
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_Height.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_HeightSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_HeightSelected.png
new file mode 100755
index 0000000..dd66ddc
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_HeightSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_Low.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_Low.png
new file mode 100755
index 0000000..a7ae468
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_Low.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_LowSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_LowSelected.png
new file mode 100755
index 0000000..a585d48
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_LowSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_Middle.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_Middle.png
new file mode 100755
index 0000000..5d5529d
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_Middle.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_MiddleSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_MiddleSelected.png
new file mode 100755
index 0000000..96d4996
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Fan_MiddleSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Group.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Group.png
new file mode 100755
index 0000000..2a6f496
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Group.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Auto.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Auto.png
new file mode 100755
index 0000000..4a17ddf
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Auto.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_AutoSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_AutoSelected.png
new file mode 100755
index 0000000..9a59143
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_AutoSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Cool.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Cool.png
new file mode 100755
index 0000000..e04029d
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Cool.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_CoolSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_CoolSelected.png
new file mode 100755
index 0000000..d711092
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_CoolSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Dry.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Dry.png
new file mode 100755
index 0000000..cd3fb43
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Dry.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_DrySelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_DrySelected.png
new file mode 100755
index 0000000..bd97d12
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_DrySelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Fan.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Fan.png
new file mode 100755
index 0000000..3b73991
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Fan.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_FanSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_FanSelected.png
new file mode 100755
index 0000000..bea1abe
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_FanSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Heat.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Heat.png
new file mode 100755
index 0000000..4dd5e84
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_Heat.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_HeatSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_HeatSelected.png
new file mode 100755
index 0000000..b5a6bec
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Mode_HeatSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/OpenOrClose.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/OpenOrClose.png
new file mode 100755
index 0000000..39f3349
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/OpenOrClose.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/OpenOrCloseSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/OpenOrCloseSelected.png
new file mode 100755
index 0000000..c5a8f2e
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/OpenOrCloseSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Path.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Path.png
new file mode 100755
index 0000000..a6fa10d
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Path.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Reduce.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Reduce.png
new file mode 100755
index 0000000..65025e5
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/Reduce.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/SelectedFanModeBG.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/SelectedFanModeBG.png
new file mode 100755
index 0000000..a38f491
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/SelectedFanModeBG.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/SelectedModeBG.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/SelectedModeBG.png
new file mode 100755
index 0000000..5331bb2
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/AC/SelectedModeBG.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Account.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Account.png
new file mode 100755
index 0000000..3bdf8ff
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Account.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Cancle.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Cancle.png
new file mode 100755
index 0000000..12cf4e6
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Cancle.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Cat.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Cat.png
new file mode 100755
index 0000000..6102e6d
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Cat.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/ChangeSuccess.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/ChangeSuccess.png
new file mode 100755
index 0000000..3ca69c5
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/ChangeSuccess.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Code.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Code.png
new file mode 100755
index 0000000..8cc4084
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Code.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/HidePwd.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/HidePwd.png
new file mode 100755
index 0000000..151240e
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/HidePwd.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Logo_White.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Logo_White.png
new file mode 100755
index 0000000..c3e55ce
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Logo_White.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Logo_loginBG.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Logo_loginBG.png
new file mode 100755
index 0000000..8ae797d
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Logo_loginBG.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Password.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Password.png
new file mode 100755
index 0000000..188d771
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/Password.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/UnhidePwd.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/UnhidePwd.png
new file mode 100755
index 0000000..83c9817
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Account/UnhidePwd.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorHumidity.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorHumidity.png
new file mode 100755
index 0000000..6a57353
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorHumidity.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorTemperature.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorTemperature.png
new file mode 100755
index 0000000..dc6aba3
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorTemperature.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Floor/Floor.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Floor/Floor.png
new file mode 100755
index 0000000..4cba57b
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Floor/Floor.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Floor/FloorSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Floor/FloorSelected.png
new file mode 100755
index 0000000..73c8ef7
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Floor/FloorSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/10Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/10Icon.png
new file mode 100755
index 0000000..31b4257
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/10Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/10IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/10IconSelected.png
new file mode 100755
index 0000000..8430524
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/10IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/11Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/11Icon.png
new file mode 100755
index 0000000..0c0b4ee
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/11Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/11IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/11IconSelected.png
new file mode 100755
index 0000000..2d565dc
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/11IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/12Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/12Icon.png
new file mode 100755
index 0000000..841ed27
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/12Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/12IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/12IconSelected.png
new file mode 100755
index 0000000..f0abca5
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/12IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/13Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/13Icon.png
new file mode 100755
index 0000000..f2b75da
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/13Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/13IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/13IconSelected.png
new file mode 100755
index 0000000..2228105
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/13IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/14Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/14Icon.png
new file mode 100755
index 0000000..94450ff
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/14Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/14IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/14IconSelected.png
new file mode 100755
index 0000000..e2bd3c4
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/14IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/15Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/15Icon.png
new file mode 100755
index 0000000..a749360
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/15Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/15IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/15IconSelected.png
new file mode 100755
index 0000000..4faa3e1
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/15IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/16Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/16Icon.png
new file mode 100755
index 0000000..e652a11
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/16Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/16IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/16IconSelected.png
new file mode 100755
index 0000000..01699e8
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/16IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/17Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/17Icon.png
new file mode 100755
index 0000000..b20c8b8
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/17Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/17IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/17IconSelected.png
new file mode 100755
index 0000000..5dcb7f2
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/17IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/18Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/18Icon.png
new file mode 100755
index 0000000..39a1287
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/18Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/18IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/18IconSelected.png
new file mode 100755
index 0000000..4ea13da
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/18IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/19Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/19Icon.png
new file mode 100755
index 0000000..c6dad69
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/19Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/19IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/19IconSelected.png
new file mode 100755
index 0000000..208edca
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/19IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/1Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/1Icon.png
new file mode 100755
index 0000000..28ac0a9
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/1Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/1IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/1IconSelected.png
new file mode 100755
index 0000000..ac6ce6c
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/1IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/20Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/20Icon.png
new file mode 100755
index 0000000..d18c088
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/20Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/20IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/20IconSelected.png
new file mode 100755
index 0000000..e9d54d9
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/20IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/2Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/2Icon.png
new file mode 100755
index 0000000..59a5ad9
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/2Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/2IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/2IconSelected.png
new file mode 100755
index 0000000..2228105
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/2IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/3Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/3Icon.png
new file mode 100755
index 0000000..e19bb68
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/3Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/3IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/3IconSelected.png
new file mode 100755
index 0000000..9be55b9
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/3IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/4Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/4Icon.png
new file mode 100755
index 0000000..7d4c142
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/4Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/4IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/4IconSelected.png
new file mode 100755
index 0000000..bd02961
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/4IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/5Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/5Icon.png
new file mode 100755
index 0000000..aa55690
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/5Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/5IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/5IconSelected.png
new file mode 100755
index 0000000..3f9b64a
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/5IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/6Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/6Icon.png
new file mode 100755
index 0000000..92c63e4
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/6Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/6IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/6IconSelected.png
new file mode 100755
index 0000000..b48c0fd
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/6IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/7Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/7Icon.png
new file mode 100755
index 0000000..48a6e27
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/7Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/7IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/7IconSelected.png
new file mode 100755
index 0000000..2a26207
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/7IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/8Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/8Icon.png
new file mode 100755
index 0000000..4a3bbef
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/8Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/8IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/8IconSelected.png
new file mode 100755
index 0000000..d11557c
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/8IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/9Icon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/9Icon.png
new file mode 100755
index 0000000..f178284
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/9Icon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/9IconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/9IconSelected.png
new file mode 100755
index 0000000..f095bfb
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/FunctionIcon/9IconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Add.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Add.png
index d5e7020..f0015f4 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Add.png
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Add.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Add_Category.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Add_Category.png
new file mode 100755
index 0000000..5f4ee2b
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Add_Category.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Add_GW.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Add_GW.png
new file mode 100755
index 0000000..bb9f0ce
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Add_GW.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/BottomShadow.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/BottomShadow.png
new file mode 100755
index 0000000..324b82b
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/BottomShadow.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Category_FunctionBG.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Category_FunctionBG.png
new file mode 100755
index 0000000..7536d05
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Category_FunctionBG.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Category_FunctionBGSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Category_FunctionBGSelected.png
new file mode 100755
index 0000000..99f144c
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Category_FunctionBGSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Collection.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Collection.png
new file mode 100755
index 0000000..6db1698
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Collection.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/CollectionSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/CollectionSelected.png
new file mode 100755
index 0000000..a824a59
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/CollectionSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Drop_Down.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Drop_Down.png
new file mode 100755
index 0000000..f63c83d
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Drop_Down.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Floor.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Floor.png
new file mode 100755
index 0000000..ca17beb
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Floor.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/House.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/House.png
new file mode 100755
index 0000000..672e29e
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/House.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/HouseSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/HouseSelected.png
new file mode 100755
index 0000000..17166f3
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/HouseSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NoBindGW.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NoBindGW.png
new file mode 100755
index 0000000..88471d6
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NoBindGW.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NoFunction.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NoFunction.png
new file mode 100755
index 0000000..a753c6e
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NoFunction.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ResidenceIcon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ResidenceIcon.png
new file mode 100755
index 0000000..4a04aff
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ResidenceIcon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/RoomIcon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/RoomIcon.png
new file mode 100755
index 0000000..c107a1e
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/RoomIcon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SceneFunctionBG.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SceneFunctionBG.png
new file mode 100755
index 0000000..1e84a9f
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SceneFunctionBG.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SelectFloor_Left.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SelectFloor_Left.png
new file mode 100755
index 0000000..423eaa1
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SelectFloor_Left.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SelectHouse.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SelectHouse.png
new file mode 100755
index 0000000..044b782
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SelectHouse.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch.png
index 7193bd2..39f3349 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch.png
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch2.png
new file mode 100755
index 0000000..7193bd2
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch2.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch2Selected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch2Selected.png
new file mode 100755
index 0000000..04e4419
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch2Selected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SwitchSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SwitchSelected.png
index 04e4419..c5a8f2e 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SwitchSelected.png
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SwitchSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/VirtualFrame.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/VirtualFrame.png
new file mode 100755
index 0000000..70c76a3
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/VirtualFrame.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Logo/Logo.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Logo/Logo.png
new file mode 100755
index 0000000..232eeea
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Logo/Logo.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Category.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Category.png
index b97b8bc..c2b849e 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Category.png
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Category.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/CategorySelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/CategorySelected.png
index 5d3db54..af4059d 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/CategorySelected.png
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/CategorySelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Home.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Home.png
index 775ac06..c50a0ab 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Home.png
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Home.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/HomeSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/HomeSelected.png
index 15999ad..b4f3f86 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/HomeSelected.png
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/HomeSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Setting.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Setting.png
index 3f4e259..ceb5bd0 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Setting.png
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/Setting.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/SettingSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/SettingSelected.png
index f9fd0c3..5c87920 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/SettingSelected.png
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Navigation/SettingSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/CommonDevice.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/CommonDevice.png
new file mode 100755
index 0000000..c812167
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/CommonDevice.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r0.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r0.png
new file mode 100755
index 0000000..48934fc
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r0.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r1.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r1.png
new file mode 100755
index 0000000..a2de21f
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r1.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r10.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r10.png
new file mode 100755
index 0000000..d413f1a
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r10.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r11.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r11.png
new file mode 100755
index 0000000..4dbf445
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r11.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r12.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r12.png
new file mode 100755
index 0000000..462e0c8
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r12.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r13.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r13.png
new file mode 100755
index 0000000..9bdc9aa
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r13.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r14.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r14.png
new file mode 100755
index 0000000..dbfdb30
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r14.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r15.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r15.png
new file mode 100755
index 0000000..0b447de
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r15.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r16.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r16.png
new file mode 100755
index 0000000..de1c4ed
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r16.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r17.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r17.png
new file mode 100755
index 0000000..a541cd1
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r17.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r18.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r18.png
new file mode 100755
index 0000000..f7cffea
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r18.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r19.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r19.png
new file mode 100755
index 0000000..de439f4
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r19.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r2.png
new file mode 100755
index 0000000..8d6c085
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r2.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r20.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r20.png
new file mode 100755
index 0000000..c3fa6b9
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r20.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r21.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r21.png
new file mode 100755
index 0000000..7a93d5b
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r21.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r22.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r22.png
new file mode 100755
index 0000000..25f6057
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r22.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r23.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r23.png
new file mode 100755
index 0000000..7e3e441
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r23.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r24.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r24.png
new file mode 100755
index 0000000..af9d1d8
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r24.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r3.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r3.png
new file mode 100755
index 0000000..5386ba8
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r3.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r4.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r4.png
new file mode 100755
index 0000000..32fabae
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r4.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r5.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r5.png
new file mode 100755
index 0000000..346bde6
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r5.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r6.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r6.png
new file mode 100755
index 0000000..d16c81c
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r6.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r7.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r7.png
new file mode 100755
index 0000000..cccf7ac
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r7.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r8.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r8.png
new file mode 100755
index 0000000..24ea738
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r8.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r9.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r9.png
new file mode 100755
index 0000000..53a4c4d
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r9.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/1.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/1.png
new file mode 100755
index 0000000..bde3463
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/1.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/2.png
new file mode 100755
index 0000000..e40bf4f
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/2.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/3.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/3.png
new file mode 100755
index 0000000..928aa7c
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/3.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/4.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/4.png
new file mode 100755
index 0000000..f495627
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/SceneIcon/4.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
index 9e15316..4de6488 100755
--- a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
+++ b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
@@ -743,6 +743,396 @@
   <ItemGroup>
     <AndroidAsset Include="Assets\Phone\DoorLock\VisitorIcon.png" />
   </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\ResidenceIcon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Add.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Fan_Height.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Fan_HeightSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Fan_Low.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Fan_LowSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Fan_Middle.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Fan_MiddleSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Group.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Mode_Auto.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Mode_AutoSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Mode_Cool.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Mode_CoolSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Mode_Dry.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Mode_DrySelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Mode_Fan.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Mode_FanSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Mode_Heat.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Mode_HeatSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\OpenOrClose.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\OpenOrCloseSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Path.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\Reduce.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\SelectedFanModeBG.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\AC\SelectedModeBG.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Account\Account.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Account\Cancle.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Account\Cat.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Account\ChangeSuccess.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Account\Code.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Account\HidePwd.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Account\Logo_loginBG.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Account\Logo_White.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Account\Password.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Account\UnhidePwd.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Floor\Floor.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Floor\FloorSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\10Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\10IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\11Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\11IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\12Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\12IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\13Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\13IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\14Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\14IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\15Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\15IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\16Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\16IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\17Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\17IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\18Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\18IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\19Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\19IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\1Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\1IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\20Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\20IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\2Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\2IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\3Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\3IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\4Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\4IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\5Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\5IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\6Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\6IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\7Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\7IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\8Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\8IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\9Icon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\9IconSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Logo\Logo.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\Add_Category.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\Add_GW.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\Category_FunctionBG.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\Category_FunctionBGSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\Collection.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\CollectionSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\Drop_Down.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\Floor.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\House.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\HouseSelected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\NoBindGW.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\NoFunction.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\SceneFunctionBG.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\SelectFloor_Left.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\SelectHouse.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\Switch2.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\Switch2Selected.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\VirtualFrame.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\SceneIcon\1.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\SceneIcon\2.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\SceneIcon\3.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\SceneIcon\4.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\RoomIcon.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Item\BottomShadow.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r0.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r1.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r10.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r11.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r12.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r13.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r14.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r15.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r16.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r17.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r18.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r19.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r2.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r20.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r21.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r22.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r23.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r24.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r3.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r4.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r5.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r6.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r7.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r8.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Room\r9.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Device\SensorHumidity.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\Device\SensorTemperature.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="Assets\Phone\RealDevice\CommonDevice.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/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs
index bf1c822..0179b96 100755
--- a/ZigbeeApp/Shared/Common/CommonPage.cs
+++ b/ZigbeeApp/Shared/Common/CommonPage.cs
@@ -53,11 +53,11 @@
         public static string LogoString = @"Logo/Logo.png";
         public static string RegisterLogoString = @"Logo/Register_logo.png";
         public static string RequestHttpsHost = "https://global.hdlcontrol.com/HangZhouHdlCloudApi";
-        //public static string RequestHttpsHost = "http://172.16.2.225:13061";
+        //public static string RequestHttpsHost = "http://172.16.2.192:13061";
         /// <summary>
         /// 鐗堟湰鍙�
         /// </summary>
-        public static string CodeIDString = "1.0.19071501";
+        public static string CodeIDString = "1.0.19080501";
         /// <summary>
         /// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee)
         /// </summary>
@@ -76,9 +76,9 @@
         /// </summary>
         public static string RequestVersion = "1.0";
         /// <summary>
-        /// 宸﹁竟璺濈灞忓箷鐨勫搴�--50
+        /// 宸﹁竟璺濈灞忓箷鐨勫搴�--58
         /// </summary>
-        public static int XLeft = 50;
+        public static int XLeft = 58;
         /// <summary>
         /// button楂樺害--110
         /// </summary>
@@ -130,9 +130,9 @@
         /// </summary>
         public static int Navigation_Height = 220;
         /// <summary>
-        /// 搴曡竟鏍忛珮搴� 160
+        /// 搴曡竟鏍忛珮搴�
         /// </summary>
-        public static int TabbarHeight = 160;
+        public const int TabbarHeight = 141;
         /// <summary>
         /// 绾挎潯鐨勯珮搴�--瀹為檯鍍忕礌3
         /// </summary>
@@ -177,7 +177,11 @@
         /// 褰撳墠缃戠粶杩炴帴鐨勬ā寮�  0:娌℃湁缃戠粶  1锛氳繙绋嬭繛鎺ワ紝涔熷彨3G,4G  2锛歐IFI
         /// </summary>
         public static int nowNetworkMode = 0;
-
+        /// <summary>
+        /// 鍗犱綅瀛椾綋澶у皬
+        /// 11
+        /// </summary>
+        public static int PlaceHolderTextSize = 11;
 
 
         /// <summary>
@@ -378,13 +382,14 @@
                         return null;
                     }
                     int MaxIndex = 0;
-                    int NewID = 0;
+                    int NewVersion = 0;
                     for (int i = 0; i < responeData.pageData.Count; i++)
                     {
                         var apkInfo = responeData.pageData[i];
-                        if (int.Parse(apkInfo.Id) > NewID)
+                        var version = int.Parse(apkInfo.FirmwareVersion.Replace(".", ""));
+                        if (version > NewVersion)
                         {
-                            NewID = int.Parse(apkInfo.Id);
+                            NewVersion = version;
                             MaxIndex = i;
                         }
                     }
diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
index 3453f98..7b123ae 100755
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -279,11 +279,10 @@
                         dName += "(" + device.DeviceEpoint + Language.StringByID(R.MyInternationalizationString.uDeviceCircuit) + ")";
                     }
 
-                    new System.Threading.Thread(async () =>
-                    { 
+                    HdlThreadLogic.Current.RunThread(async () =>
+                    {
                         await this.ReName(device, dName, ShowErrorMode.NO);
-                    })
-                    { IsBackground = true }.Start();
+                    });
                 }
             }
 
@@ -996,6 +995,11 @@
                     return;
                 }
                 imageFilePath = "RealDevice/" + arry[0] + ".png";
+                //濡傛灉瀹冭嚜宸辩殑鍏遍�氬浘鐗囪繕鏄笉瀛樺湪鐨勮瘽,鍒欑洿鎺ヤ娇鐢ㄦ墍鏈夎澶囩殑鍏遍�氬浘鐗�
+                if (string.IsNullOrEmpty(IO.FileUtils.GetImageFilePath(imageFilePath)) == true)
+                {
+                    imageFilePath = "RealDevice/CommonDevice.png";
+                }
             }
             btnIcon.UnSelectedImagePath = imageFilePath;
         }
@@ -1319,13 +1323,57 @@
                 info.BeloneType = DeviceBeloneType.A鏅鸿兘闂ㄩ攣;
                 info.ConcreteType = DeviceConcreteType.IntelligentLocks;
             }
-            //2鍖呭惈浼犳劅鍣ㄧ殑璇�,褰撲紶鎰熷櫒澶勭悊
+            //12鍖呭惈浼犳劅鍣ㄧ殑璇�,褰撲紶鎰熷櫒澶勭悊
             else if (dicType.ContainsKey(DeviceType.IASZone) == true)
             {
                 //璁剧疆浼犳劅鍣ㄥ叿浣撶殑绫诲瀷
                 info.BeloneType = DeviceBeloneType.A浼犳劅鍣�;
                 this.SetSensorDeviceSpecificType(ref info, listdevice);
             }
+            //13鍖呭惈娓╁害浼犳劅鍣ㄧ殑璇�
+            else if (dicType.ContainsKey(DeviceType.TemperatureSensor) == true)
+            {
+                bool temperatrue = false;
+                bool humidity = false;
+                foreach (var device in listdevice)
+                {
+                    if (device is TemperatureSensor)
+                    {
+                        //娓╁害浼犳劅鍣�
+                        if (((TemperatureSensor)device).SensorDiv == 1)
+                        {
+                            temperatrue = true;
+                        }
+                        //婀垮害浼犳劅鍣�
+                        else if(((TemperatureSensor)device).SensorDiv == 2)
+                        {
+                            humidity = true;
+                        }
+                    }
+                }
+                if (temperatrue == true && humidity == true)
+                {
+                    //璁剧疆浼犳劅鍣ㄥ叿浣撶殑绫诲瀷
+                    info.BeloneType = DeviceBeloneType.A娓╂箍搴︿紶鎰熷櫒;
+                    info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId10;
+                    info.ConcreteType = DeviceConcreteType.Sensor_TemperatrueHumidity;
+                }
+                else if (temperatrue == true && humidity == false)
+                {
+                    //璁剧疆浼犳劅鍣ㄥ叿浣撶殑绫诲瀷
+                    info.BeloneType = DeviceBeloneType.A娓╁害浼犳劅鍣�;
+                    info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId11;
+                    info.ConcreteType = DeviceConcreteType.Sensor_Temperatrue;
+                }
+                else if (temperatrue == false && humidity == true)
+                {
+                    //璁剧疆浼犳劅鍣ㄥ叿浣撶殑绫诲瀷
+                    info.BeloneType = DeviceBeloneType.A婀垮害浼犳劅鍣�;
+                    info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId12;
+                    info.ConcreteType = DeviceConcreteType.Sensor_Humidity;
+                }
+            }
+
             int value = (int)info.BeloneType;
             if (dicDeviceDefultNameID.ContainsKey("uDeviceBelongId" + value) == true)
             {
@@ -1809,6 +1857,23 @@
             mainDevice.OutClusterList.AddRange(device.DeviceInfo.OutClusterList);
             mainDevice.AttributeStatus.Clear();
             mainDevice.AttributeStatus.AddRange(device.DeviceInfo.AttributeStatus);
+            
+            //濡傛灉鏄俯搴︿紶鎰熷櫒
+            if (mainDevice is TemperatureSensor)
+            {
+                //杈撳嚭鏃� 1026:娓╁害浼犳劅鍣� 1029:婀垮害浼犳劅鍣�
+                foreach (var data in mainDevice.OutClusterList)
+                {
+                    if (data.OutCluster == 1029)
+                    {
+                        ((TemperatureSensor)mainDevice).SensorDiv = 2;
+                    }
+                    else if (data.OutCluster == 1026)
+                    {
+                        ((TemperatureSensor)mainDevice).SensorDiv = 1;
+                    }
+                }
+            }
         }
 
         /// <summary>
@@ -1831,6 +1896,7 @@
             else if (deviceType == DeviceType.Repeater) { device = new Repeater(); }
             else if (deviceType == DeviceType.Thermostat) { device = new AC(); }
             else if (deviceType == DeviceType.DoorLock) { device = new DoorLock(); }
+            else if (deviceType == DeviceType.TemperatureSensor) { device = new TemperatureSensor(); }
             else if (deviceType == DeviceType.OtaDevice || deviceType == DeviceType.OtaPanelDevice) { device = new OTADevice(); }
             else { return null; }
 
diff --git a/ZigbeeApp/Shared/Common/House.cs b/ZigbeeApp/Shared/Common/House.cs
index 29609c6..1d6815e 100755
--- a/ZigbeeApp/Shared/Common/House.cs
+++ b/ZigbeeApp/Shared/Common/House.cs
@@ -54,6 +54,17 @@
         public List<string> RoomFilePathList = new List<string> { };
 
         /// <summary>
+        /// 妤煎眰瀛楀吀
+        /// key:FloorId
+        /// value:FloorName
+        /// </summary>
+        public Dictionary<string,string> FloorDics = new Dictionary<string,string> { };
+        /// <summary>
+        /// 褰撳墠妤煎眰
+        /// </summary>
+        public string CurrentFloorId;
+
+        /// <summary>
         /// 鍏ㄥ眬鍦烘櫙璺緞鍒楄〃---澶囩敤
         /// </summary>
         public List<string> SceneFilePathList = new List<string> { };
@@ -170,6 +181,7 @@
             }
             home.Name = houseName;
             home.Save();
+            Config.Instance.Save();
         }
 
         #endregion
@@ -258,6 +270,11 @@
                     }
                     else
                     {
+                        if (Config.Instance.HomeId == string.Empty && responseDataObj.PageData.Count > 0)
+                        {
+                            //璧嬩竴涓垵濮嬪��
+                            Config.Instance.HomeId = responseDataObj.PageData[0].Id;
+                        }
                         foreach (var residence in responseDataObj.PageData)
                         {
                             Config.Instance.HomeFilePathList.Add($"House_{residence.Id}.json");
@@ -379,6 +396,38 @@
 
         #endregion
 
+        #region 鈼� 妤煎眰____________________________
+
+        /// <summary>
+        /// GetCurrentFloorName
+        /// </summary>
+        /// <returns></returns>
+        public string GetCurrentFloorName()
+        {
+            return GetFloorName(CurrentFloorId);
+        }
+
+        /// <summary>
+        /// GetFloorName
+        /// </summary>
+        /// <param name="floorId"></param>
+        /// <returns></returns>
+        public string GetFloorName(string floorId)
+        {
+            if (string.IsNullOrEmpty(floorId))
+            {
+                return null;
+            }
+            if (Config.Instance.Home.FloorDics.Count == 0 || Config.Instance.Home.FloorDics.ContainsKey(floorId) == false)
+            {
+                return null;
+            }
+            return Config.Instance.Home.FloorDics[floorId];
+        }
+
+
+        #endregion
+
         #region 鈼� 鎴块棿____________________________
 
         #region 鈼� 娣诲姞鎴块棿璺緞_________________________
@@ -439,6 +488,10 @@
             }
             path = System.IO.Path.Combine(path, FileName);
             Shared.IO.FileUtils.WriteFileByBytes(path, System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)));
+            if (autoBackup == true && Id == Config.Instance.HomeId)
+            {
+                HdlAutoBackupLogic.AddOrEditorFile(FileName);
+            }
         }
         #endregion
     }
diff --git a/ZigbeeApp/Shared/Common/ResponseEntity/UserLoginRes.cs b/ZigbeeApp/Shared/Common/ResponseEntity/UserLoginRes.cs
index 7433f59..0cde86f 100755
--- a/ZigbeeApp/Shared/Common/ResponseEntity/UserLoginRes.cs
+++ b/ZigbeeApp/Shared/Common/ResponseEntity/UserLoginRes.cs
@@ -15,8 +15,6 @@
         /// App鍦∕QTT鏈嶅姟鍣ㄤ笂瀵圭О鍔犲瘑鐨凨ey
         /// </summary>
         public string MqttKey;
-        public int UserType;
-        public int MainUserID;
         //public string Password;
         /// <summary>
         /// 鐭俊鐧诲綍杩斿洖鐨刴d5鍚庣殑瀵嗙爜
diff --git a/ZigbeeApp/Shared/Common/Room.cs b/ZigbeeApp/Shared/Common/Room.cs
index c9ca441..e3440a1 100755
--- a/ZigbeeApp/Shared/Common/Room.cs
+++ b/ZigbeeApp/Shared/Common/Room.cs
@@ -32,7 +32,11 @@
         /// Guid.NewGuid().ToString()
         /// </summary>
         public string Id = Guid.NewGuid().ToString();
-
+        /// <summary>
+        /// 妤煎眰Id
+        /// 鏂板鏃朵娇鐢℅uid
+        /// </summary>
+        public string FloorId = string.Empty;
         /// <summary>
         /// 鎴块棿鍚�
         /// </summary>
@@ -91,7 +95,7 @@
         /// 鏄惁鍙互鍒锋柊鎴块棿鏁版嵁浜�
         /// 闇�瑕佺瓑鍒濆鍖栨湰鍦拌澶囨暟鎹悗鍦ㄥ彲浠ュ垵濮嬪寲鎴块棿鏁版嵁
         /// </summary>
-        public static bool canInitAllRoom;
+        public static bool CanInitAllRoom;
 
         /// <summary>
         /// 鑾峰彇鍠滅埍鎴块棿鐨勬墍鏈夎澶囪矾寰�
@@ -192,7 +196,7 @@
         /// </summary>
         public static void InitAllRoom()
         {
-            if (canInitAllRoom == false)
+            if (CanInitAllRoom == false)
             {
                 return;
             }
@@ -249,7 +253,7 @@
                 }
             }
             homeTemp.Save(false);
-            canInitAllRoom = true;
+            CanInitAllRoom = true;
             InitAllRoom();
         }
 
@@ -417,71 +421,48 @@
         }
 
         /// <summary>
-        /// 鏍规嵁鎴块棿鍚嶅瓧锛岃幏鍙栨埧闂村璞�
+        /// 鏍规嵁鎴块棿Id锛岃幏鍙栨埧闂村璞�
         /// </summary>
         /// <returns>The room by name.</returns>
-        /// <param name="roomName">鎴块棿鍚�</param>
-        public Room GetRoomByName(string roomName)
+        /// <param name="roomId">鎴块棿ID</param>
+        public Room GetRoomById(string roomId)
         {
-            return Lists.Find((obj) => obj.Name == roomName);
+            return Lists.Find((obj) => obj.Id == roomId);
         }
 
         /// <summary>
-        /// 鏍规嵁璁惧鑾峰彇鎴块棿鍚嶅瓧
-        /// </summary>
-        /// <returns>鎴块棿鍚�</returns>
-        /// <param name="device">璁惧瀵硅薄</param>
-        public List<string> GetRoomListNameByDevice(CommonDevice device)
-        {
-            var listName = new List<string>();
-            var listroom = this.GetRoomByDevice(device);
-            foreach (var room in listroom)
-            {
-                listName.Add(room.Name);
-            }
-
-            return listName;
-        }
-
-        /// <summary>
-        /// 鏍规嵁璁惧鑾峰彇鎴块棿鍚嶅瓧(澶氫釜鎴块棿鐨勬椂鍊欙紝鐢ㄢ��,鈥濆垎鍓�)
+        /// 鏍规嵁璁惧鑾峰彇鎴块棿鍚嶅瓧(妤煎眰+鎴块棿鍚�)
         /// </summary>
         /// <returns>鎴块棿鍚�</returns>
         /// <param name="device">璁惧瀵硅薄</param>
         public string GetRoomNameByDevice(CommonDevice device)
         {
-            var listName = this.GetRoomListNameByDevice(device);
-
-            return this.GetRoomName(listName);
-        }
-
-        /// <summary>
-        /// 鑾峰彇澶氫釜鎴块棿鐨勮繛鎺ヨ捣鏉ョ殑鍚嶅瓧
-        /// </summary>
-        /// <param name="listName"></param>
-        /// <returns></returns>
-        public string GetRoomName(List<string> listName)
-        {
-            if (listName.Count == 0)
-            {
-                //鏈垎閰嶅尯鍩�
-                return Language.StringByID(R.MyInternationalizationString.uDeviceNotAssignedRoom);
+            var room = this.GetRoomByDevice(device);
+            if (room == null)
+            {
+                //鏈垎閰嶅尯鍩�
+                return Language.StringByID(R.MyInternationalizationString.uDeviceNotAssignedRoom);
             }
-            return string.Join(",", listName);
+            if (Config.Instance.Home.FloorDics.ContainsKey(room.FloorId) == true)
+            {
+                //(妤煎眰+鎴块棿鍚�)
+                return Config.Instance.Home.FloorDics[room.FloorId] + " " + room.Name;
+            }
+            return room.Name;
         }
 
         /// <summary>
-        /// 鑾峰彇鎵�鏈夋埧闂寸殑鎵�鏈夎澶�
+        /// 鑾峰彇璁惧鎵�鍦ㄧ殑鎴块棿
         /// </summary>
         /// <returns>The room by device.</returns>
         /// <param name="device">璁惧瀵硅薄</param>
-        public List<Room> GetRoomByDevice(CommonDevice device)
+        public Room GetRoomByDevice(CommonDevice device)
         {
             var deviceUI = new DeviceUI { };
             deviceUI.DeviceAddr = device.DeviceAddr;
             deviceUI.DeviceEpoint = device.DeviceEpoint;
 
-            return Lists.FindAll((obj) => obj.DeviceUIFilePathList.Contains(deviceUI.FileName));
+            return Lists.Find((obj) => obj.DeviceUIFilePathList.Contains(deviceUI.FileName));
         }
 
         /// <summary>
@@ -528,52 +509,37 @@
         /// 璁惧鐨勬埧闂村彉鏇�
         /// </summary>
         /// <param name="device">璁惧瀵硅薄</param>
-        /// <param name="listnewName">鏂版埧闂村悕瀛楀垪琛�</param>
-        public void ChangedRoom(CommonDevice device, List<string> listnewName)
+        /// <param name="roomId">鏂版埧闂碔d</param>
+        public void ChangedRoom(CommonDevice device, string roomId)
         {
             //鎴块棿鏄惁淇敼
-            if (this.IsRoomChanged(device, listnewName) == false)
+            if (this.IsRoomChanged(device, roomId) == false)
             {
                 return;
             }
-            var list = new List<string>();
-            list.AddRange(listnewName);
-
-            //浠庡師鏉ョ殑鎴块棿绉婚櫎璁惧,浣嗘槸涓嶅垹闄I鏂囦欢
-            this.DeleteDevice(device, ref list, false);
+            //浠庡師鏉ョ殑鎴块棿绉婚櫎璁惧
+            this.DeleteDevice(device);
 
             //娣诲姞鍒版柊鐨勬埧闂�
-            foreach (string newRoom in list)
-            {
-                var room = this.GetRoomByName(newRoom);
-                if (room != null)
-                {
-                    //涓嶈鐩朥I鏂囦欢
-                    room.AddDevice(device, false);
-                }
+            var room = this.GetRoomById(roomId);
+            if (room != null)
+            {
+                room.AddDevice(device);
             }
-        }
-
+        }
+
         /// <summary>
         /// 鎴块棿鍚嶅瓧鏄惁鏈変慨鏀�
         /// </summary>
         /// <param name="device">璁惧瀵硅薄</param>
-        /// <param name="listnewName">鏂版埧闂村悕瀛楀垪琛�</param>
+        /// <param name="roomId">鏂版埧闂碔d</param>
         /// <returns></returns>
-        public bool IsRoomChanged(CommonDevice device, List<string> listnewName)
+        public bool IsRoomChanged(CommonDevice device, string roomId)
         {
-            var listOld = this.GetRoomListNameByDevice(device);
-            if (listOld.Count != listnewName.Count)
-            {
-                return true;
-            }
-            //涓暟涓�鏍锋椂锛屾瘮杈冨唴瀹�
-            foreach (string newstring in listnewName)
-            {
-                if (listOld.Contains(newstring) == false)
-                {
-                    return true;
-                }
+            var room = this.GetRoomByDevice(device);
+            if (room == null || room.Id != roomId)
+            {
+                return true;
             }
             return false;
         }
@@ -676,8 +642,7 @@
         /// 娣诲姞璁惧
         /// </summary>
         /// <param name="device">瑕佹坊鍔犵殑璁惧瀵硅薄</param>
-        /// <param name="backUpUI">鏄惁瑕佽鐩朥I鏂囦欢</param>
-        public void AddDevice(CommonDevice device, bool backUpUI = true)
+        public void AddDevice(CommonDevice device)
         {
             if (device == null)
             {
@@ -726,21 +691,7 @@
         /// 鍒犻櫎璁惧
         /// </summary>
         /// <param name="device">瑕佸垹闄ょ殑璁惧瀵硅薄</param>
-        /// <param name="DeleteUi">鏄惁鍒犻櫎UI鏂囦欢</param>
-        public void DeleteDevice(CommonDevice device, bool DeleteUi = true)
-        {
-            List<string> listNotDelRoom = new List<string>();
-            //鍒犻櫎璁惧
-            this.DeleteDevice(device, ref listNotDelRoom, DeleteUi);
-        }
-
-        /// <summary>
-        /// 鍒犻櫎璁惧(鐗规畩鍑芥暟,鐜伴樁娈垫槸缁欒澶囧彉鏇存埧闂翠娇鐢ㄧ殑)
-        /// </summary>
-        /// <param name="device">瑕佸垹闄ょ殑璁惧瀵硅薄</param>
-        /// <param name="listNotDelRoom">涓嶆墽琛屽垹闄ょ殑鎴块棿,褰撴寚瀹氱殑涓嶈兘鍒犻櫎鐨勬埧闂村瓨鍦ㄦ椂锛屼細浠庤繖涓垪琛ㄤ腑绉婚櫎锛屾渶缁堝彧鍓╀笅鏂扮殑鎴块棿</param>
-        /// <param name="DeleteUi">鏄惁鍒犻櫎UI鏂囦欢</param>
-        public void DeleteDevice(CommonDevice device, ref List<string> listNotDelRoom, bool DeleteUi)
+        public void DeleteDevice(CommonDevice device)
         {
             if (device == null)
             {
@@ -750,36 +701,23 @@
             deviceUI.DeviceAddr = device.DeviceAddr;
             deviceUI.DeviceEpoint = device.DeviceEpoint;
 
-            //鏍规嵁璁惧锛岃幏鍙栨墍鍦ㄧ殑鎴块棿锛屽洜涓哄畠鍒犵殑涓嶄竴瀹氭槸褰撳墠鎴块棿
-            List<Room> listroom = this.GetRoomByDevice(device);
-
-            //鍒犻櫎UI鏂囦欢
-            if (DeleteUi == true && Global.IsExistsByHomeId(deviceUI.FileName) == true)
-            {
-                Global.DeleteFilebyHomeId(deviceUI.FileName);
-                //鍒犻櫎鑷姩澶囦唤
-                Phone.UserCenter.HdlAutoBackupLogic.DeleteFile(deviceUI.FileName);
-            }
-
-            foreach (Room room in listroom)
-            {
-                if (listNotDelRoom.Contains(room.Name) == true)
-                {
-                    listNotDelRoom.Remove(room.Name);
-                    continue;
-                }
-                //绉婚櫎缂撳瓨
-                if (room.DeviceUIFilePathList.Contains(deviceUI.FileName) == false)
-                {
-                    return;
-                }
-                room.DeviceUIFilePathList.Remove(deviceUI.FileName);
-
-                room.DeviceUIList.RemoveAll((obj) => obj.FileName == deviceUI.FileName);
-                room.Save();
-                //鏇存敼鑷姩澶囦唤
-                Phone.UserCenter.HdlAutoBackupLogic.AddOrEditorFile(room.FileName);
-            }
+            //鏍规嵁璁惧锛岃幏鍙栨墍鍦ㄧ殑鎴块棿
+            var room = this.GetRoomByDevice(device);
+            if (room == null)
+            {
+                return;
+            }
+            //绉婚櫎缂撳瓨
+            if (room.DeviceUIFilePathList.Contains(deviceUI.FileName) == false)
+            {
+                return;
+            }
+            room.DeviceUIFilePathList.Remove(deviceUI.FileName);
+
+            room.DeviceUIList.RemoveAll((obj) => obj.FileName == deviceUI.FileName);
+            room.Save();
+            //鏇存敼鑷姩澶囦唤
+            HdlAutoBackupLogic.AddOrEditorFile(room.FileName);
         }
 
         #endregion
@@ -1151,6 +1089,142 @@
 
         #endregion
 
+        #region 鈼� 妤煎眰鍜屾埧闂撮『搴忕浉鍏砡______________
+
+        /// <summary>
+        /// 鏍规嵁妤煎眰鐨勪富閿幏鍙栨帓搴忓悗鐨勬埧闂村垪琛�
+        /// </summary>
+        /// <param name="i_floorKeys">妤煎眰鐨勪富閿�</param>
+        /// <param name="getShard">鍒嗕韩鐨勬埧闂存槸鍚︿篃鑾峰彇</param>
+        /// <returns></returns>
+        public List<Room> GetFloorSortRoom(string i_floorKeys, bool getShard = true)
+        {
+            Dictionary<string, List<string>> dicAllSort = new Dictionary<string, List<string>>();
+            //璇诲彇鎴块棿椤哄簭
+            string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.RoomSortFile);
+            var strData = UserCenterLogic.LoadFileContent(fullName);
+            if (strData != null)
+            {
+                dicAllSort = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, List<string>>>(strData);
+            }
+
+            var listRoomSort = new List<string>();
+            if (dicAllSort.ContainsKey(i_floorKeys) == true)
+            {
+                listRoomSort = dicAllSort[i_floorKeys];
+            }
+            else
+            {
+                dicAllSort[i_floorKeys] = listRoomSort;
+            }
+
+            var dicRoom = new Dictionary<string, Common.Room>();
+            foreach (var room in Common.Room.Lists)
+            {
+                if (room.FloorId != i_floorKeys)
+                {
+                    //涓嶆槸鍚屼竴涓ゼ灞�
+                    continue;
+                }
+                if (listRoomSort.Contains(room.Id) == false)
+                {
+                    //鏂版坊鍔犵殑鎴块棿
+                    listRoomSort.Add(room.Id);
+                }
+                if (getShard == false && room.IsSharedRoom == true)
+                {
+                    //涓嶈鍒嗕韩鐨勬埧闂�
+                    continue;
+                }
+                dicRoom[room.Id] = room;
+            }
+
+            var listSortRoom = new List<Room>();
+            for (int i = 0; i < listRoomSort.Count; i++)
+            {
+                if (dicRoom.ContainsKey(listRoomSort[i]) == true)
+                {
+                    listSortRoom.Add(dicRoom[listRoomSort[i]]);
+                }
+            }
+
+            //淇濆瓨椤哄簭
+            UserCenterLogic.SaveFileContent(fullName, dicAllSort);
+            return listSortRoom;
+        }
+
+        /// <summary>
+        /// 淇濆瓨鎴块棿鐨勯『搴�
+        /// </summary>
+        /// <param name="i_floorKeys">妤煎眰涓婚敭</param>
+        /// <param name="listSort">鎴块棿椤哄簭(鎴块棿鐨勪富閿�)</param>
+        public void SaveRoomSort(string i_floorKeys, List<string> listSort)
+        {
+            Dictionary<string, List<string>> dicAllSort = new Dictionary<string, List<string>>();
+            //璇诲彇鎴块棿椤哄簭
+            string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.RoomSortFile);
+            var strData = UserCenterLogic.LoadFileContent(fullName);
+            if (strData != null)
+            {
+                dicAllSort = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, List<string>>>(strData);
+            }
+
+            //淇濆瓨椤哄簭
+            dicAllSort[i_floorKeys] = listSort;
+            UserCenterLogic.SaveFileContent(fullName, dicAllSort);
+            dicAllSort.Clear();
+        }
+
+        /// <summary>
+        /// 鑾峰彇鎺掑簭鍚庣殑妤煎眰
+        /// </summary>
+        /// <returns></returns>
+        public Dictionary<string, string> GetFloorSortList()
+        {
+            //璇诲彇妤煎眰椤哄簭
+            var listFloorSort = new List<string>();
+            string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.FloorSortFile);
+            var strData = UserCenterLogic.LoadFileContent(fullName);
+            if (strData != null)
+            {
+                listFloorSort = Newtonsoft.Json.JsonConvert.DeserializeObject<List<string>>(strData);
+            }
+            foreach (string keys in Common.Config.Instance.Home.FloorDics.Keys)
+            {
+                if (listFloorSort.Contains(keys) == false)
+                {
+                    //鏂版坊鍔犵殑妤煎眰
+                    listFloorSort.Add(keys);
+                }
+            }
+
+            var dic = new Dictionary<string, string>();
+            for (int i = 0; i < listFloorSort.Count; i++)
+            {
+                if (Config.Instance.Home.FloorDics.ContainsKey(listFloorSort[i]) == true)
+                {
+                    dic[listFloorSort[i]] = Config.Instance.Home.FloorDics[listFloorSort[i]];
+                }
+            }
+
+            //淇濆瓨椤哄簭
+            UserCenterLogic.SaveFileContent(fullName, listFloorSort);
+            return dic;
+        }
+
+        /// <summary>
+        /// 淇濆瓨妤煎眰鐨勯『搴�
+        /// </summary>
+        /// <param name="listSort">妤煎眰鐨勪富閿�</param>
+        public void SaveFloorSort(List<string> listSort)
+        {
+            string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.FloorSortFile);
+            //淇濆瓨椤哄簭
+            UserCenterLogic.SaveFileContent(fullName, listSort);
+        }
+
+        #endregion
+
         #region 鈼� 鍏嬮殕鎴块棿瀵硅薄_____________________
 
         /// <summary>
@@ -1162,6 +1236,7 @@
             var newRoom = new Room();
             //鍏嬮殕灞炴��
             newRoom.Id = this.Id;
+            newRoom.FloorId = this.FloorId;
             newRoom.Name = this.Name;
             newRoom.BackgroundImage = this.BackgroundImage;
             newRoom.BackgroundImageType = this.BackgroundImageType;
diff --git a/ZigbeeApp/Shared/Common/SendDataToServer.cs b/ZigbeeApp/Shared/Common/SendDataToServer.cs
index bdd92c0..b4c0f6a 100755
--- a/ZigbeeApp/Shared/Common/SendDataToServer.cs
+++ b/ZigbeeApp/Shared/Common/SendDataToServer.cs
@@ -118,7 +118,7 @@
             /// <summary>
             /// 楠岃瘉鐮�
             /// </summary>
-            public int Code;
+            public string Code;
             /// <summary>
             /// 浣跨敤鐨勮瑷�
             /// </summary>
diff --git a/ZigbeeApp/Shared/Common/ZigbeeColor.cs b/ZigbeeApp/Shared/Common/ZigbeeColor.cs
index 4e7de1e..41288ba 100755
--- a/ZigbeeApp/Shared/Common/ZigbeeColor.cs
+++ b/ZigbeeApp/Shared/Common/ZigbeeColor.cs
@@ -96,28 +96,181 @@
         public uint HorizontalSeekBarThumbColor = 0xFFFFFFFF;
         public uint TimeVerticalScrolViewLayout = 0xff121212;
         #endregion
- 
+
 
         #region --閮洩鍩庡畾涔夌殑棰滆壊--
-        public uint GXCBackgroundColor = 0xFFFFFFFF;
-        public uint GXCTopViewBackgroundColor = 0xFFF2F4F5;
-        public uint GXCTextBlueColor = 0xFF00AAF0;
-        public uint GXCTextBlackColor = 0xFF333333;
+        /// <summary>
+        /// 鐧借壊瀛椾綋 0xFFFFFFFF
+        /// </summary>
         public uint GXCTextWhiteColor = 0xFFFFFFFF;
-        public uint GXCBorderColor = 0xFF333333;
+        /// <summary>
+        /// 瀛椾綋棰滆壊 0xFF666666
+        /// </summary>
+        public uint GXCTextColor = 0xFF666666;
+        /// <summary>
+        /// 瀛椾綋棰滆壊 0xFF000000
+        /// </summary>
+        public uint GXCTextDeepBlackColor = 0xFF000000;
+        /// <summary>
+        /// 瀛椾綋绾㈣壊 0xFFF75858
+        /// </summary>
+        public uint GXCTextRed = 0xFFF75858;
+        /// <summary>
+        /// 瀛椾綋榛戣壊 0xFF333333
+        /// </summary>
+        public uint GXCTextBlackColor = 0xFF333333;
+        /// <summary>
+        /// 瀛椾綋榛戣壊 0xFF232323
+        /// </summary>
+        public uint GXCTextBlackColor2 = 0xFF232323;
+        /// <summary>
+        /// 瀛椾綋娴呰壊 0xFF999999
+        /// </summary>
+        public uint GXCTextGrayColor = 0xFF999999;
+        /// <summary>
+        /// 瀛椾綋娴呰壊 0xFFCCCCCC
+        /// </summary>
+        public uint GXCTextGrayColor2 = 0xFFCCCCCC;
+        /// <summary>
+        /// 瀛椾綋娴呰壊 0xFFCBCACA
+        /// </summary>
+        public uint GXCTextGrayColor3 = 0xFFCBCACA;
+        /// <summary>
+        /// 瀛椾綋閫変腑棰滆壊 0xFFFC744B
+        /// </summary>
+        public uint GXCTextSelectedColor = 0xFFFC744B;
+        /// <summary>
+        /// 搴曢儴鏈�変腑棰滆壊 0xFF8E8E93
+        /// </summary>
+        public uint GXCTextBottomUnSelectedColor = 0xFF8E8E93;
+        /// <summary>
+        /// 鐧借壊鑳屾櫙 0xFFFFFFFF
+        /// </summary>
+        public uint GXCBackgroundColor = 0xFFFFFFFF;
+        /// <summary>
+        /// 娴呯櫧鑳屾櫙 0xFFF5F6FA
+        /// </summary>
+        public uint GXCGrayBackgroundColor = 0xFFF5F6FA;
+        /// <summary>
+        /// 榛戣壊鑳屾櫙 0xFF232323
+        /// </summary>
+        public uint GXCBlackBackgroundColor = 0xFF232323;
+        /// <summary>
+        /// 榛戣壊鑳屾櫙 0xFF333333
+        /// </summary>
+        public uint GXCBlackBackgroundColor2 = 0xFF333333;
+        /// <summary>
+        /// 0xFFFEF1ED
+        /// </summary>
+        public uint GXCSelectedBackgroundColor = 0xFFFEF1ED;
+        /// <summary>
+        /// 缂栬緫鑳屾櫙鑹� 0xFF4A4A4A
+        /// </summary>
+        public uint GXCEditBackGroundColor = 0xFF4A4A4A;
+        /// <summary>
+        /// 鎸夐挳閫変腑棰滆壊 0xFFFC744B
+        /// </summary>
+        public uint GXCButtonSelectedColor = 0xFFFC744B;
+        /// <summary>
+        /// 鏈�変腑棰滆壊 0xFFF5F6FA
+        /// </summary>
+        public uint GXCButtonUnSelectedColor3 = 0xFFF5F6FA;
+        /// <summary>
+        /// 閫変腑棰滆壊 0xFF232323
+        /// </summary>
+        public uint GXCButtonBlackSelectedColor = 0xFF232323;
+        /// <summary>
+        /// red 0xFFF75858
+        /// </summary>
+        public uint GXCRedColor = 0xFFF75858;
+        /// <summary>
+        /// 鍗犱綅瀛椾綋棰滆壊 0xFFCCCCCC
+        /// </summary>
+        public uint GXCPlaceHolderTextColor = 0xFFCCCCCC;
+        /// <summary>
+        /// 鍗犱綅瀛椾綋棰滆壊 0xFF999999
+        /// </summary>
+        public uint GXCPlaceHolderTextColor2 = 0xFF999999;
+        /// <summary>
+        /// 绾挎潯棰滆壊 0xFF979797
+        /// </summary>
+        public uint GXCLineColor = 0xFF979797;
+        /// <summary>
+        /// 绾挎潯棰滆壊 0xFFFC744B
+        /// </summary>
+        public uint GXCSelectedLineColor = 0xFFFC744B;
+        /// <summary>
+        /// 娴呰壊绾挎潯 0xFFF5F6FA;
+        /// </summary>
+        public uint GXCGrayLineColor = 0xFFF5F6FA;
+        /// <summary>
+        /// 娴呰壊绾挎潯 0x66CCCCCC
+        /// </summary>
+        public uint GXCGrayLineColor2 = 0x66CCCCCC;
+        /// <summary>
+        /// 鎸夐挳鏈�変腑鐘舵�� 0xFF656565;
+        /// </summary>
+        public uint GXCButtonUnSelectedColor = 0xFF656565;
+        /// <summary>
+        /// 鎸夐挳鏈�変腑鐘舵�� 0x80FFFFFF
+        /// </summary>
+        public uint GXCButtonDisableColor = 0xFFFEBCA9;
+        /// <summary>
+        /// 杈规棰滆壊 0xFFBFC1C2
+        /// </summary>
+        public uint GXCBorderColor = 0xFFBFC1C2;
+        /// <summary>
+        /// 鏈�変腑棰滆壊 0xFFFFA184
+        /// </summary>
+        public uint GXCBorderUnSelectedColor = 0xFFFFA184;
+        /// <summary>
+        /// 琛岄�変腑棰滆壊 0xFFFC744B
+        /// </summary>
+        public uint GXCRowSelectedColor = 0x0FFC744B;
+        /// <summary>
+        /// 寮瑰嚭妗嗚儗鏅壊.0x80000000
+        /// </summary>
+        public uint GXCDailogBackGroundColor = 0x80000000;
+        /// <summary>
+        /// topview color 0xD1F8F8F8
+        /// </summary>
+        public uint GXCTopViewBackgroundColor = 0xD1F8F8F8;
+        /// <summary>
+        /// title color 0xFF030303
+        /// </summary>
+        public uint GXCTitleBlackTitle = 0xFF030303;
+        /// <summary>
+        /// 閫忔槑
+        /// </summary>
+        public uint GXCClearColor = 0x00FFFFFF;
+        /// <summary>
+        /// 搴曢儴棰滆壊 0xE6FAFAFA
+        /// </summary>
+        public uint GXCBottomColor = 0xE6FAFAFA;
+        /// <summary>
+        /// 搴曢儴绾挎潯棰滆壊 0xFFBABABA
+        /// </summary>
+        public uint GXCBottomLineColor = 0xFFBABABA;
+
+
+
+
+
+        public uint GXCTextBlueColor = 0xFF00AAF0;
+        
+       
+        
         public uint GXCBorderRedColor = 0xFFF44D4D;
-        public uint GXCPlaceHolderTextColor = 0xffadadad;
+
+
         public uint GXCButtonBlueColor = 0xFF00AAF0;
         public uint GXCButtonUnselectedColor = 0xFFAAAAAA;
         public uint GXCTextUnselectedColor= 0xFFD5D6D7;
-        public uint GXCLineColor = 0xFFD5D6D7;
-        /// <summary>
-        /// 寮瑰嚭妗嗚儗鏅壊.
-        /// </summary>
-        public uint GXCDailogBackGroundColor = 0x33333333;
+       
+  
         public uint GXCSelectedColor = 0xFFFE5E00;//閫変腑棰滆壊
         public uint GXCButtonhardWhiteColor = 0xFFE0E0E0;//鎴块棿btn鍗婇�忔槑鑳屾櫙鑹�
-        public uint GXCRedColor = 0xFFFF0000;
+       
         /// <summary>
         /// 30%閫忔槑搴﹂粦鑹�
         /// </summary>
diff --git a/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs b/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs
index 6b7666b..5d34e1f 100755
--- a/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs
@@ -14,7 +14,7 @@
         ///// <summary>
         ///// The top view.
         ///// </summary>
-        private CommonForm.TopFrameLayout topFL;
+        private CommonForm.TopFrameLayout top;
         /// <summary>
         /// 鏇村璁剧疆
         /// </summary>
@@ -153,21 +153,27 @@
                                 {
                                     case 0:
                                         //姝ゅ睘鎬ц〃鏄庡鍐呭綋鍓嶇殑娓╁害 * 100锛屽疄闄呮俯搴︿负鈥淟ocalTemperature / 100鈥濓紝鍗曚綅锛氣剝
-                                        ac.currentLocalTemperature = attriButeList[0].AttriButeData/100;
+                                        ac.currentLocalTemperature = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
                                         ac.LastDateTime = DateTime.Now;
                                         indoorTemperatureBtn.Text = $"{Language.StringByID(R.MyInternationalizationString.IndoorTemperature)} {ac.currentLocalTemperature} 鈩�";
-                                        currentTemperatureBtn.Text = $"{ac.currentLocalTemperature} 鈩�";
+                                        //currentTemperatureBtn.Text = $"{ac.currentLocalTemperature} 鈩�";
                                         break;
 
                                     case 17:
                                         //姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勫埗鍐锋俯搴︼紝瀹為檯娓╁害涓衡�淐oolingSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
-                                        ac.currentCoolingSetpoint = attriButeList[0].AttriButeData/100;
+                                        ac.currentCoolingSetpoint = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
                                         ac.LastDateTime = DateTime.Now;
                                         break;
 
                                     case 18:
                                         //姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勫埗鐑俯搴︼紝瀹為檯娓╁害涓衡�淗eatingSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
-                                        ac.currentHeatingSetpoint = attriButeList[0].AttriButeData/100;
+                                        ac.currentHeatingSetpoint = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
+                                        ac.LastDateTime = DateTime.Now;
+                                        break;
+
+                                    case 4096:
+                                        //姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勮嚜鍔ㄦ俯搴︼紝瀹為檯娓╁害涓衡�淎utoSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
+                                        ac.currentAutoSetpoint = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
                                         ac.LastDateTime = DateTime.Now;
                                         break;
 
@@ -191,6 +197,8 @@
                                             modeBtn.SelectedImagePath = ACControlBase.GetModeSelectedImagePathByModeId(ac.currentSystemMode);
                                             modeBtn.UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByModeId(ac.currentSystemMode);
                                             currentModeBtn.Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode);
+
+                                            currentTemperatureBtn.Text = $"{ACControlBase.GetCurrentModeTemperature(ac)} 鈩�";
                                         }
                                         break;
                                 }
@@ -255,7 +263,6 @@
                         {
                             ac = deviceUI.CommonDevice as ZigBee.Device.AC;
                             ac.IsOnline = (common as DimmableLight).IsOnline;
-                            //deviceIMG.IsSelected = light.IsOnline == 1;
                             ac.LastDateTime = DateTime.Now;
                         }
                     }
@@ -323,11 +330,12 @@
                 UserView.UserHomeView.ReadStatus(ac, () =>
                 {
                     ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                    ac.ReadFanMode();
-                    ac.ReadSystemMode();
                     ac.ReadLocalTemperature();
                     ac.ReadCoolingSetpoint();
                     ac.ReadHeatingSetpoint();
+                    ac.ReadAutoSetpoint();
+                    ac.ReadFanMode();
+                    ac.ReadSystemMode();
                 });
             }
             else
@@ -336,11 +344,12 @@
                 if ((DateTime.Now - ac.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
                 {
                     ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                    ac.ReadFanMode();
-                    ac.ReadSystemMode();
                     ac.ReadLocalTemperature();
                     ac.ReadCoolingSetpoint();
                     ac.ReadHeatingSetpoint();
+                    ac.ReadAutoSetpoint();
+                    ac.ReadFanMode();
+                    ac.ReadSystemMode();
                 }
             }
 
@@ -385,8 +394,13 @@
         /// </summary>
         private void AddTopView()
         {
-            topFL = new CommonForm.TopFrameLayout(this) { };
-            AddChidren(topFL);
+            top = new CommonForm.TopFrameLayout();
+            AddChidren(top);
+            top.InitTopview();
+            top.backButton.MouseUpEventHandler += (sender, e) =>
+            {
+                RemoveFromParent();
+            };
 
             AddMoreview();
         }
@@ -405,8 +419,7 @@
                 UnSelectedImagePath = "Item/More.png",
                 SelectedImagePath = "Item/MoreSelected.png",
             };
-            topFL.topView.AddChidren(moreBtn);
-            moreBtn.MouseUpEventHandler += MoreEvent;
+            top.topView.AddChidren(moreBtn);
         }
 
         /// <summary>
@@ -438,7 +451,7 @@
             midFL = new FrameLayout()
             {
                 Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.Navigation_Height),
-                Y = topFL.Bottom,
+                Y = top.Bottom,
                 BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
             };
             AddChidren(midFL);
@@ -490,7 +503,7 @@
             {
                 Y = Application.GetRealHeight(50),
                 Height = Application.GetRealHeight(80),
-                Width = Application.GetRealWidth(300),
+                Width = Application.GetRealWidth(600),
                 Gravity = Gravity.CenterHorizontal,
                 Text=device.CommonDevice.DeviceEpointName,
                 TextSize=15,
@@ -664,42 +677,31 @@
                 fanModeDialog.Close();
             };
 
-            //var downTriangleBtn = new Button()
-            //{
-            //    X = Application.GetRealWidth(20) + fanModeBtn.X,
-            //    Y = fanModeBtn.Y-Application.GetRealHeight(217),
-            //    Width = Application.GetMinRealAverage(30),
-            //    Height = Application.GetMinRealAverage(15),
-            //    UnSelectedImagePath = "Item/UpperTriangle.png"
-            //};
-            //closeBGview.AddChidren(downTriangleBtn);
-
-            //var changeFanModeBG = new Button()
-            //{
-            //    X = Application.GetRealWidth(553),
-            //    Y = Application.GetRealHeight(605),
-            //    Height = Application.GetRealHeight(625),
-            //    Width = Application.GetRealWidth(fanItem_Width),
-            //    SelectedImagePath="AC/SelectedFanModeBG.png"
-            //};
-            //closeBGview.AddChidren(changeFanModeBG);
+            var changeFanModeBG = new Button()
+            {
+                X = Application.GetRealWidth(553),
+                Y = Application.GetRealHeight(655),
+                Height = Application.GetRealHeight(625),
+                Width = Application.GetRealWidth(fanItem_Width),
+                UnSelectedImagePath = "AC/SelectedFanModeBG.png"
+            };
+            closeBGview.AddChidren(changeFanModeBG);
 
             var changeFanModeFL = new FrameLayout()
             {
                 X = Application.GetRealWidth(553),
-                Y = Application.GetRealHeight(605),
-                Height = Application.GetRealHeight(625),
+                Y = Application.GetRealHeight(655),
+                Height = Application.GetRealHeight(600),
                 Width = Application.GetRealWidth(fanItem_Width),
                 Radius = CommonPage.BigFormRadius,
                 BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                //BackgroundImagePath="AC/SelectedFanModeBG.png"
             };
             closeBGview.AddChidren(changeFanModeFL);
 
             var changeFanBtn = new Button()
             {
                 X = Application.GetRealWidth(fanItem_X),
-                Width = Application.GetRealWidth(fanItem_Width- fanItem_X),
+                Width = Application.GetRealWidth(fanItem_Width - fanItem_X),
                 Height = Application.GetRealHeight(fanItem_Height),
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                 TextID = R.MyInternationalizationString.SelectFanMode,
@@ -707,17 +709,17 @@
             };
             changeFanModeFL.AddChidren(changeFanBtn);
 
-            var fan_Low = new CommonForm.LeftIconButtonRowLayout()
+            var fan_Low = new CommonForm.ACLeftIconButtonRowLayout()
             {
-                Y=changeFanBtn.Bottom,
+                Y = changeFanBtn.Bottom,
                 Width = Application.GetRealWidth(fanItem_Width),
                 Height = Application.GetRealHeight(fanItem_Height),
-                Tag=ZigBee.Device.AC.FanMode.Low
+                Tag = ZigBee.Device.AC.FanMode.Low
             };
             changeFanModeFL.AddChidren(fan_Low);
             fan_Low.Init("AC/Fan_Low.png", "AC/Fan_LowSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Low));
 
-            var fan_Middle = new CommonForm.LeftIconButtonRowLayout()
+            var fan_Middle = new CommonForm.ACLeftIconButtonRowLayout()
             {
                 Y = fan_Low.Bottom,
                 Width = Application.GetRealWidth(fanItem_Width),
@@ -727,7 +729,7 @@
             changeFanModeFL.AddChidren(fan_Middle);
             fan_Middle.Init("AC/Fan_Middle.png", "AC/Fan_MiddleSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Middle));
 
-            var fan_Height = new CommonForm.LeftIconButtonRowLayout()
+            var fan_Height = new CommonForm.ACLeftIconButtonRowLayout()
             {
                 Y = fan_Middle.Bottom,
                 Width = Application.GetRealWidth(fanItem_Width),
@@ -735,17 +737,32 @@
                 Tag = ZigBee.Device.AC.FanMode.High
             };
             changeFanModeFL.AddChidren(fan_Height);
-            fan_Height.Init("AC/Fan_Height.png", "AC/Fan_HeightSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Height));
+            fan_Height.Init("AC/Fan_Height.png", "AC/Fan_HeightSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Height), false);
 
-            //fan_Low.MouseUpEventHandler += ChangeFan_MouseUpEvent;
-            fan_Low.titleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
-            fan_Low.iconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+            fan_Low.TitleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+            fan_Low.IconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
 
-            fan_Middle.titleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
-            fan_Middle.iconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+            fan_Middle.TitleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+            fan_Middle.IconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
 
-            fan_Height.titleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
-            fan_Height.iconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+            fan_Height.TitleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+            fan_Height.IconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+
+            if (ACControlBase.IsOpen(ac))
+            {
+                if (ac.currentFanMode == 1)
+                {
+                    fan_Low.SetSelectedStatu();
+                }
+                else if (ac.currentFanMode == 2)
+                {
+                    fan_Middle.SetSelectedStatu();
+                }
+                else if (ac.currentFanMode == 3)
+                {
+                    fan_Height.SetSelectedStatu();
+                }
+            }
         }
 
         /// <summary>
@@ -816,38 +833,27 @@
                 acModeDialog.Close();
             };
 
-            //var changeModeBG = new Button()
-            //{
-            //    X = Application.GetRealWidth(80),
-            //    Y = Application.GetRealHeight(360),
-            //    Height = Application.GetRealHeight(933),
-            //    Width = Application.GetRealWidth(modeItem_Width),
-            //    //Radius = CommonPage.BigFormRadius,
-            //    SelectedImagePath = "AC/SelectedModeBG.png"
-            //};
-            //closeBGview.AddChidren(changeModeBG);
-
-            var changeModeFL = new FrameLayout()
+            var changeModeBG = new Button()
             {
                 X = Application.GetRealWidth(80),
                 Y = Application.GetRealHeight(360),
                 Height = Application.GetRealHeight(933),
                 Width = Application.GetRealWidth(modeItem_Width),
+                UnSelectedImagePath = "AC/SelectedModeBG.png"
+            };
+            closeBGview.AddChidren(changeModeBG);
+
+            var changeModeFL = new FrameLayout()
+            {
+                X = Application.GetRealWidth(80),
+                Y = Application.GetRealHeight(360),
+                Height = Application.GetRealHeight(900),
+                Width = Application.GetRealWidth(modeItem_Width),
                 Radius = CommonPage.BigFormRadius,
                 BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                //BackgroundImagePath="AC/SelectedModeBG.png"
+                //BackgroundIagePath="AC/SelectedModeBG.png"
             };
             closeBGview.AddChidren(changeModeFL);
-
-            var changeModeBG = new Button()
-            {
-                Height = Application.GetRealHeight(933),
-                Width = Application.GetRealWidth(modeItem_Width),
-                //Radius = CommonPage.BigFormRadius,
-                SelectedImagePath = "AC/SelectedModeBG.png"
-            };
-            changeModeFL.AddChidren(changeModeBG);
-
 
             var changeModeBtn = new Button()
             {
@@ -860,7 +866,7 @@
             };
             changeModeFL.AddChidren(changeModeBtn);
 
-            var mode_Auto = new CommonForm.LeftIconButtonRowLayout()
+            var mode_Auto = new CommonForm.ACLeftIconButtonRowLayout()
             {
                 Y = changeModeBtn.Bottom,
                 Width = Application.GetRealWidth(modeItem_Width),
@@ -870,7 +876,7 @@
             changeModeFL.AddChidren(mode_Auto);
             mode_Auto.Init("AC/Mode_Auto.png", "AC/Mode_AutoSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Auto));
 
-            var mode_Cool = new CommonForm.LeftIconButtonRowLayout()
+            var mode_Cool = new CommonForm.ACLeftIconButtonRowLayout()
             {
                 Y = mode_Auto.Bottom,
                 Width = Application.GetRealWidth(modeItem_Width),
@@ -880,7 +886,7 @@
             changeModeFL.AddChidren(mode_Cool);
             mode_Cool.Init("AC/Mode_Cool.png", "AC/Mode_CoolSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Cool));
 
-            var mode_Heat = new CommonForm.LeftIconButtonRowLayout()
+            var mode_Heat = new CommonForm.ACLeftIconButtonRowLayout()
             {
                 Y = mode_Cool.Bottom,
                 Width = Application.GetRealWidth(modeItem_Width),
@@ -890,7 +896,7 @@
             changeModeFL.AddChidren(mode_Heat);
             mode_Heat.Init("AC/Mode_Heat.png", "AC/Mode_HeatSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Heat));
 
-            var mode_Dry = new CommonForm.LeftIconButtonRowLayout()
+            var mode_Dry = new CommonForm.ACLeftIconButtonRowLayout()
             {
                 Y = mode_Heat.Bottom,
                 Width = Application.GetRealWidth(modeItem_Width),
@@ -900,7 +906,7 @@
             changeModeFL.AddChidren(mode_Dry);
             mode_Dry.Init("AC/Mode_Dry.png", "AC/Mode_DrySelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Dry));
 
-            var mode_Fan = new CommonForm.LeftIconButtonRowLayout()
+            var mode_Fan = new CommonForm.ACLeftIconButtonRowLayout()
             {
                 Y = mode_Dry.Bottom,
                 Width = Application.GetRealWidth(modeItem_Width),
@@ -908,23 +914,46 @@
                 Tag = ZigBee.Device.AC.AcMode.FanOnly
             };
             changeModeFL.AddChidren(mode_Fan);
-            mode_Fan.Init("AC/Mode_Fan.png", "AC/Mode_FanSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_FanOnly));
+            mode_Fan.Init("AC/Mode_Fan.png", "AC/Mode_FanSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_FanOnly), false);
 
-            mode_Auto.titleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
-            mode_Auto.iconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+            mode_Auto.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+            mode_Auto.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
 
-            mode_Cool.titleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
-            mode_Cool.iconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+            mode_Cool.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+            mode_Cool.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
 
-            mode_Heat.titleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
-            mode_Heat.iconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+            mode_Heat.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+            mode_Heat.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
 
-            mode_Dry.titleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
-            mode_Dry.iconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+            mode_Dry.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+            mode_Dry.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
 
-            mode_Fan.titleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
-            mode_Fan.iconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+            mode_Fan.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+            mode_Fan.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
 
+            if (ACControlBase.IsOpen(ac))
+            {
+                if (ac.currentSystemMode == 1)
+                {
+                    mode_Auto.SetSelectedStatu();
+                }
+                else if (ac.currentSystemMode == 3)
+                {
+                    mode_Cool.SetSelectedStatu();
+                }
+                else if (ac.currentSystemMode == 4)
+                {
+                    mode_Heat.SetSelectedStatu();
+                }
+                else if (ac.currentSystemMode == 8)
+                {
+                    mode_Dry.SetSelectedStatu();
+                }
+                else if (ac.currentSystemMode == 7)
+                {
+                    mode_Fan.SetSelectedStatu();
+                }
+            }
         }
 
         /// <summary>
@@ -1023,22 +1052,41 @@
                 ACControlBase.ShowACIsCloseTip();
                 return;
             }
-            //cool
-            if (ac.currentSystemMode == 3)
+            //cool  //dry
+            if (ac.currentSystemMode == 3 || ac.currentSystemMode==8)
             {
+                if(ac.currentCoolingSetpoint>=ACControlBase.Temperature_High)
+                {
+                    return;
+                }
                 ac.currentCoolingSetpoint += 1;
-                ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint);
+                ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint*100);
                 currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} 掳C";
             }
             //heat
             else if (ac.currentSystemMode == 4)
             {
+                if(ac.currentHeatingSetpoint>=ACControlBase.Temperature_High)
+                {
+                    return;
+                }
                 ac.currentHeatingSetpoint += 1;
-                ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint);
+                ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint*100);
                 currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} 掳C";
             }
             //auto
-            //dry
+            else if (ac.currentSystemMode == 1)
+            {
+                if (ac.currentAutoSetpoint >= ACControlBase.Temperature_High)
+                {
+                    return;
+                }
+                ac.currentAutoSetpoint += 1;
+                ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint*100);
+                currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} 掳C";
+            }
+
+
         }
 
         #endregion
@@ -1057,24 +1105,43 @@
                 ACControlBase.ShowACIsCloseTip();
                 return;
             }
-            //cool
-            if (ac.currentSystemMode == 3)
+            //cool //dry
+            if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8)
             {
+                if (ac.currentCoolingSetpoint <= ACControlBase.Temperature_Low)
+                {
+                    return;
+                }
                 ac.currentCoolingSetpoint -= 1;
-                ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint);
+                ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint*100);
 
                 currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} 掳C";
             }
             //heat
             else if (ac.currentSystemMode == 4)
             {
+                if (ac.currentHeatingSetpoint <= ACControlBase.Temperature_Low)
+                {
+                    return;
+                }
                 ac.currentHeatingSetpoint -= 1;
-                ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint);
+                ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint*100);
 
                 currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} 掳C";
             }
             //auto
-            //dry
+            else if (ac.currentSystemMode == 1)
+            {
+                if (ac.currentAutoSetpoint <= ACControlBase.Temperature_Low)
+                {
+                    return;
+                }
+                ac.currentAutoSetpoint -= 1;
+                ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint*100);
+
+                currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} 掳C";
+            }
+
         }
 
         #endregion
@@ -1098,7 +1165,6 @@
                 Shared.Common.Room.Lists[0].AddDevice(device.FileName);
                 collectionBtn.IsSelected = true;
             }
-            action?.Invoke();
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/Device/AC/ACControlBase.cs b/ZigbeeApp/Shared/Phone/Device/AC/ACControlBase.cs
index b39f5c0..5ffc2d2 100755
--- a/ZigbeeApp/Shared/Phone/Device/AC/ACControlBase.cs
+++ b/ZigbeeApp/Shared/Phone/Device/AC/ACControlBase.cs
@@ -3,6 +3,21 @@
 {
     public class ACControlBase
     {
+        #region 鈼� 鍙橀噺_____________________________
+        /// <summary>
+        /// 鏈�浣庢俯搴� 16
+        /// </summary>
+        public const int Temperature_Low=16;
+        /// <summary>
+        /// 鏈�楂樻俯搴� 32氓
+        /// </summary>
+        public const int Temperature_High = 32;
+        /// <summary>
+        /// 榛樿娓╁害
+        /// </summary>
+        public const int Temperature_Default = 26;
+
+        #endregion
 
         #region 鈼� 鑾峰彇妯″紡鍚嶇О_______________________
         /// <summary>
@@ -321,7 +336,7 @@
 
         //public static ZigBee.Device.AC.AcMode GetModeByModeId(int modeId)
         //{
-            //if(modeId==)
+        //if(modeId==)
         //}
 
         #endregion
@@ -329,15 +344,19 @@
         #region 鈼� 鑾峰彇娓╁害__________________________
 
         public static int GetCurrentModeTemperature(ZigBee.Device.AC ac)
-        { 
-        
-            if(ac.currentSystemMode==3)
+        {
+
+            if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8)
             {
                 return ac.currentCoolingSetpoint;
             }
-            else if(ac.currentSystemMode==4)
+            else if (ac.currentSystemMode == 4)
             {
                 return ac.currentHeatingSetpoint;
+            }
+            else if (ac.currentSystemMode == 1)
+            {
+                return ac.currentAutoSetpoint;
             }
             return ac.currentLocalTemperature;
         }
@@ -390,8 +409,8 @@
             Application.RunOnMainThread(() =>
             {
                 string msg = Language.StringByID(R.MyInternationalizationString.TheACIsClose);
-                var tip = new Phone.UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Tip, msg);
-                tip.Show();
+                //var tip = new Phone.UserCenter.TipViewControl(msg, 1000, 1);
+                //tip.ShowView();
             });
         }
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs
new file mode 100755
index 0000000..60a77c2
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs
@@ -0,0 +1,456 @@
+锘縰sing System;
+using Shared.Common;
+using Shared.Phone.Device.CommonForm;
+
+namespace Shared.Phone.Device.Account
+{
+    public class AccountForgetPWD : FrameLayout
+    {
+        #region 鈼� 鍙橀噺____________________________
+        /// <summary>
+        /// 鎵嬫満閭
+        /// </summary>
+        private PhoneEmailForm phoneEmailForm;
+        /// <summary>
+        /// phoneRowForm
+        /// </summary>
+        private PhoneRowForm phoneRow;
+        /// <summary>
+        /// emailRow
+        /// </summary>
+        private EmailForgotRowForm emailRow;
+        /// <summary>
+        /// pwdRow
+        /// </summary>
+        private PwdForForgetRowForm pwdRow;
+        /// <summary>
+        /// pwdComfireRow
+        /// </summary>
+        private PwdForForgetRowForm pwdComfireRow;
+        /// <summary>
+        /// CodeForRegisterRowForm
+        /// </summary>
+        private CodeForForgetRowForm codeRow;
+        /// <summary>
+        /// bodyFrameLayout
+        /// </summary>
+        private FrameLayout bodyFrameLayout;
+        /// <summary>
+        /// 璐﹀彿楠岃瘉鐮乫l
+        /// </summary>
+        private FrameLayout accountCodeFL;
+        /// <summary>
+        /// 鐧诲綍閿欒鎻愮ず鎸夐挳
+        /// </summary>
+        private Button errorBtn;
+        /// <summary>
+        /// 纭閲嶇疆
+        /// </summary>
+        private Button resetBtn;
+        /// <summary>
+        /// 璐﹀彿
+        /// </summary>
+        private string account;
+
+
+        #endregion
+
+        #region 鈼� 鏋勯�犳柟娉昣________________________
+        /// <summary>
+        /// AccountForgetPWD
+        /// </summary>
+        public AccountForgetPWD()
+        {
+            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
+            Tag = "Forgot";
+        }
+        #endregion
+
+        #region 鈼� 鏄剧ず鐣岄潰_________________________
+        /// <summary>
+        /// show
+        /// </summary>
+        public void Show()
+        {
+            //AddTop
+            AddTopFL();
+            //AddBody
+            AddBodyView();
+
+            //bind
+            BindEvent();
+        }
+
+        #endregion
+
+        #region 鈼� 娣诲姞____________________________
+        /// <summary>
+        /// AddTop
+        /// </summary>
+        private void AddTopFL()
+        {
+            var top = new CommonForm.TopFrameLayout();
+            AddChidren(top);
+            top.InitTopview();
+            top.SetTopTitle(Language.StringByID(R.MyInternationalizationString.ForgotPWD));
+            top.backButton.MouseUpEventHandler += (sender, e) =>
+            {
+                RemoveFromParent();
+            };
+
+        }
+        /// <summary>
+        /// AddBodyView
+        /// </summary>
+        private void AddBodyView()
+        {
+            bodyFrameLayout = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(184),
+                Height = Application.GetRealHeight(1737),
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
+            };
+            AddChidren(bodyFrameLayout);
+
+            phoneEmailForm = new PhoneEmailForm();
+            phoneEmailForm.Init(bodyFrameLayout, 127);
+            phoneEmailForm.SetSelectedColor(ZigbeeColor.Current.GXCButtonBlackSelectedColor);
+
+            accountCodeFL = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(334),
+                Height = Application.GetRealHeight(852),
+                Width = Application.GetRealWidth(942),
+                Gravity = Gravity.CenterHorizontal,
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(30)
+            };
+            bodyFrameLayout.AddChidren(accountCodeFL);
+
+            AddPhoneOrEmailFL(accountCodeFL, "Phone");
+
+            //閿欒鎻愮ずBtn
+            errorBtn = new Button()
+            {
+                X = Application.GetRealWidth(127),
+                Y = Application.GetRealHeight(1060),
+                Width = Application.GetRealWidth(700),
+                Height = Application.GetRealHeight(58),
+                TextColor = ZigbeeColor.Current.GXCTextRed,
+                TextAlignment = TextAlignment.CenterLeft,
+            };
+            bodyFrameLayout.AddChidren(errorBtn);
+
+            resetBtn = new Button()
+            {
+                Y = Application.GetRealHeight(1281),
+                Width = Application.GetRealWidth(688),
+                Height = Application.GetRealHeight(127),
+                Gravity = Gravity.CenterHorizontal,
+                TextID = R.MyInternationalizationString.ComfirmReset,
+                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)
+            };
+            bodyFrameLayout.AddChidren(resetBtn);
+        }
+
+        #endregion
+
+        #region 鈼� 閫夋嫨浜嬩欢_________________________
+        /// <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;
+            resetBtn.Enable = resetBtn.IsSelected = false;
+            (sender as Button).IsSelected = 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();
+
+            if (phoneOrEmail == "Phone")
+            {
+                phoneRow = new PhoneRowForm();
+                phoneRow.Init(accountCodeFrameLayout, this, this.account, 29, 29);
+                phoneRow.AccountET.TextChangeEventHandler += Account_TextChange;
+            }
+            else
+            {
+                emailRow = new EmailForgotRowForm();
+                emailRow.Init(accountCodeFrameLayout, this.account, 29, 29);
+                emailRow.AccountET.TextChangeEventHandler += Account_TextChange;
+            }
+
+            codeRow = new CodeForForgetRowForm();
+            codeRow.Init(accountCodeFrameLayout, 29, 196);
+            codeRow.VerificationCodeET.TextChangeEventHandler += Code_TextChange;
+            codeRow.SendCodeBtn.MouseUpEventHandler += SendCode_MouseUpEventAsync;
+
+            pwdRow = new PwdForForgetRowForm();
+            pwdRow.Init(accountCodeFrameLayout, 29, 363);
+
+            pwdComfireRow = new PwdForForgetRowForm();
+            pwdComfireRow.Init(accountCodeFrameLayout, 29, 530);
+            pwdComfireRow.SetPlaceholdText(Language.StringByID(R.MyInternationalizationString.PleaseComfirePWD));
+        }
+        #endregion
+
+        #region 鈼� 缁戝畾浜嬩欢_________________________
+
+        /// <summary>
+        /// 缁戝畾鎸夐挳浜嬩欢
+        /// </summary>
+        private void BindEvent()
+        {
+            //閫夋嫨鎵嬫満閭
+            phoneEmailForm.SelectedPhone.MouseUpEventHandler += SelectPhoneOrEmail_MouseUpEvent;
+            phoneEmailForm.SelectedEmail.MouseUpEventHandler += SelectPhoneOrEmail_MouseUpEvent;
+            resetBtn.MouseUpEventHandler += Reset;
+        }
+        #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)
+        {
+            errorBtn.Text = "";
+            if ((sender as EditText).Text.Trim().Length > 0)
+            {
+                codeRow.SendCodeBtn.Enable = codeRow.SendCodeBtn.IsSelected = true;
+            }
+            else
+            {
+                codeRow.SendCodeBtn.Enable = codeRow.SendCodeBtn.IsSelected = false;
+            }
+            account = (sender as EditText).Text.Trim();
+        }
+
+        /// <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)
+        {
+            errorBtn.Text = "";
+            if ((sender as EditText).Text.Trim().Length > 0)
+            {
+                resetBtn.Enable = resetBtn.IsSelected = true;
+            }
+            else
+            {
+                resetBtn.Enable = resetBtn.IsSelected = false;
+            }
+        }
+
+        #endregion
+
+        #region 鈼� 鍙戦�侀獙璇佺爜________________________
+        /// <summary>
+        /// 鍙戦�侀獙璇佺爜
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="mouseEventArgs"></param>
+        private async void SendCode_MouseUpEventAsync(object sender, MouseEventArgs mouseEventArgs)
+        {
+            (sender as Button).Enable = (sender as Button).IsSelected = false;
+            CommonPage.Loading.Start();
+            try
+            {
+                int companyInt = 0;
+                if (CommonPage.PhoneZoneStr == "86")
+                {
+                    companyInt = CommonPage.Company;
+                }
+                else
+                {
+                    companyInt = CommonPage.CompanyForINTERNETION;
+                }
+                var reqDto = new SendDataToServer.LoginSendVerCodeObj()
+                {
+                    Account = account,
+                    Company = companyInt,
+                    AreaCode = int.Parse(CommonPage.PhoneZoneStr),
+                    Language = CommonPage.ZigBeeLanguage
+                };
+                var requestRevertObj = await CommonFormResouce.LoginSendVerCode(reqDto);
+                if (requestRevertObj == null)
+                {
+                    errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
+                    return;
+                }
+                var stateCodeStr = requestRevertObj.StateCode.ToUpper();
+                if (stateCodeStr == "SUCCESS")
+                {
+                    codeRow.TimeBegin();
+                }
+                else if (stateCodeStr == "PARAMETEROREMPTY")
+                {
+                    //鎻愪緵鐨勫弬鏁伴敊璇�
+                    errorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
+                    (sender as Button).Enable = (sender as Button).IsSelected = true;
+                }
+                else if (stateCodeStr == "SENDFAIL")
+                {
+                    //楠岃瘉鐮佸彂閫佸け璐�
+                    errorBtn.TextID = R.MyInternationalizationString.SENDFAIL;
+                    (sender as Button).Enable = (sender as Button).IsSelected = true;
+                }
+                else if (stateCodeStr == "EXIST")
+                {
+                    //璐﹀彿瀛樺湪
+                    errorBtn.TextID = R.MyInternationalizationString.AccountHasBeenRegistered;
+                    (sender as Button).Enable = (sender as Button).IsSelected = true;
+                }
+                else
+                {
+                    errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
+                    (sender as Button).Enable = (sender as Button).IsSelected = true;
+                }
+            }
+            catch
+            {
+                errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
+                (sender as Button).Enable = (sender as Button).IsSelected = true;
+            }
+            finally
+            {
+                CommonPage.Loading.Hide();
+            }
+        }
+        #endregion
+
+        #region 鈼� 纭淇敼__________________________
+
+        /// <summary>
+        /// Reset
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="mouseEventArgs"></param>
+        private async void Reset(object sender,MouseEventArgs mouseEventArgs)
+        {
+            //鍏堝垽鏂�2娆″瘑鐮佽緭鍏ユ槸鍚︿竴鑷�
+            if (pwdRow.PasswrodET.Text.Trim() != pwdComfireRow.PasswrodET.Text.Trim())
+            {
+                var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.TwoPasswordInconsistency), Language.StringByID(R.MyInternationalizationString.Confrim));
+                alert.Show();
+                return;
+            }
+            CommonPage.Loading.Start();
+            try
+            {
+                var reqDto = new SendDataToServer.ValidatorCodeObj()
+                {
+                    Account = account,
+                    Code = codeRow.VerificationCodeET.Text.Trim(),
+                    AreaCode = int.Parse(CommonPage.PhoneZoneStr),
+                    Language = CommonPage.ZigBeeLanguage
+                };
+                //楠岃瘉楠岃瘉鐮�
+                var requestRevertObj = await CommonFormResouce.ValidatorCode(reqDto);
+                if (requestRevertObj == null)
+                {
+                    CommonPage.Instance.FailureToServer();
+                    return;
+                }
+                var stateCodeStr = requestRevertObj.StateCode.ToUpper();
+                if (stateCodeStr == "SUCCESS")
+                {
+                    //閲嶇疆瀵嗙爜
+                    var reqREPWD = new SendDataToServer.ResetPasswordObj()
+                    {
+                        Account = account,
+                        Password = pwdRow.PasswrodET.Text.Trim(),
+                        AreaCode = int.Parse(CommonPage.PhoneZoneStr),
+                        AgainPassword = pwdComfireRow.PasswrodET.Text.Trim()
+                    };
+                    var revertObj = await CommonFormResouce.ResetPassword(reqREPWD);
+                    if (revertObj == null)
+                    {
+                        CommonPage.Instance.FailureToServer();
+                        return;
+                    }
+                    var stateStr = revertObj.StateCode.ToUpper();
+                    if (stateStr == "SUCCESS")
+                    {
+                        var success = new AccountResetPWDSuccess();
+                        CommonPage.Instance.AddChidren(success);
+                        success.Show();
+                    }
+                    else if (stateStr == "PARAMETEROREMPTY")
+                    {
+                        //鎻愪緵鐨勫弬鏁伴敊璇�
+                        errorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
+                    }
+                    else if (stateStr == "ACCOUNTNOEXISTS")
+                    {
+                        //璐﹀彿涓嶅瓨鍦�
+                        errorBtn.TextID = R.MyInternationalizationString.ACCOUNTNOEXISTS;
+                    }
+                    else if (stateStr == "FAIL")
+                    {
+                        //鎿嶄綔澶辫触
+                        errorBtn.TextID = R.MyInternationalizationString.FAIL;
+                    }
+                    else
+                    {
+                        errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
+                    }
+
+                }
+                else if (stateCodeStr == "PARAMETEROREMPTY")
+                {
+                    //鎻愪緵鐨勫弬鏁伴敊璇�
+                    errorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
+                }
+                else if (stateCodeStr == "VALIDCODEANDPHONENOEQUAL")
+                {
+                    //楠岃瘉鐮侀敊璇�
+                    errorBtn.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL;
+                }
+                else
+                {
+                    errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
+                }
+            }
+            catch
+            {
+                errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
+            }
+            finally
+            {
+                CommonPage.Loading.Hide();
+            }
+
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
index 6287edc..145ef10 100755
--- a/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
@@ -7,6 +7,7 @@
 using Shared.IO;
 using Shared.Phone.UserView;
 using System.Net.Http;
+using Shared.Phone.Device.CommonForm;
 
 namespace Shared.Phone.Device.Account
 {
@@ -21,25 +22,26 @@
         /// </summary>
         private FrameLayout midFrameLayout;
         /// <summary>
-        /// 娉ㄥ唽鎸夐挳
+        /// 鎵嬫満閭
         /// </summary>
-        private Button registerBtn;
+        private PhoneEmailForm phoneEmailForm;
         /// <summary>
-        /// 璐﹀彿杈撳叆鎺т欢
+        /// phoneRowForm
         /// </summary>
-        private EditText accountET;
+        private PhoneLoginRowForm phoneRow;
         /// <summary>
-        /// 瀵嗙爜杈撳叆鎺т欢
+        /// emailRow
         /// </summary>
-        private EditText passwrodET;
+        private EmailLoginRowForm emailRow;
         /// <summary>
-        /// 鐧诲綍鎸夐挳
+        /// pwdRow
         /// </summary>
-        private Button loginBtn;
+        private PwdLoginRowForm pwdRow;
+
         /// <summary>
-        /// 闅愯棌瀵嗙爜
+        /// 璐﹀彿瀵嗙爜fl
         /// </summary>
-        private Button hidenPWDbtn;
+        private FrameLayout accountPwdFL;
         /// <summary>
         /// 鐧诲綍閿欒鎻愮ず鎸夐挳
         /// </summary>
@@ -49,9 +51,26 @@
         /// </summary>
         private Button forgotPasswordBtn;
         /// <summary>
+        /// 鐧诲綍鎸夐挳
+        /// </summary>
+        private Button loginBtn;
+        /// <summary>
         /// 楠岃瘉鐮佺櫥褰曟寜閽�
         /// </summary>
         private Button loginByCodeBtn;
+        /// <summary>
+        /// 娉ㄥ唽鎸夐挳
+        /// </summary>
+        private Button registerBtn;
+        /// <summary>
+        /// 璐﹀彿
+        /// </summary>
+        private string account;
+        /// <summary>
+        /// 瀵嗙爜
+        /// </summary>
+        private string password;
+
 
         #endregion
 
@@ -62,7 +81,13 @@
         /// </summary>
         public AccountLogin()
         {
-             BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
+            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
+            Tag = "Login";
+        }
+
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
         }
 
         #endregion
@@ -93,165 +118,144 @@
         /// <param name="password">Password.</param>
         public void LoginViewShow(string account = "", string password = "")
         {
+            this.account = account;
+            this.password = password;
             #region midFrameLayout
             midFrameLayout = new FrameLayout()
             {
                 Width = LayoutParams.MatchParent,
                 Height = Application.GetRealHeight(CommonPage.AppRealHeight),
-                //Y = Application.GetRealHeight(36),
                 BackgroundColor =ZigbeeColor.Current.GXCBackgroundColor
             };
             AddChidren(midFrameLayout);
             #endregion
 
             #region 甯冨眬璐︽埛锛屽瘑鐮侊紝蹇樿瀵嗙爜锛屾敞鍐�  鎵嬫満楠岃瘉鐮佺櫥褰�
-            registerBtn = new Button()
-            {
-                Width = Application.GetRealWidth(250),
-                Height = Application.GetRealHeight(80),
-                X = Application.GetRealWidth(CommonPage.AppRealWidth-250-50),
-                Y = Application.GetRealHeight(100),
-                TextID = R.MyInternationalizationString.Register,
-                TextSize = 15,
-                TextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                TextAlignment = TextAlignment.CenterRight
-            };
-            midFrameLayout.AddChidren(registerBtn);
 
-             var logoBtn = new Button()
+            var logoBG = new Button()
             {
-                Width = Application.GetMinRealAverage(270),
-                Height = Application.GetMinRealAverage(270),
-                Y = Application.GetRealHeight(150)+registerBtn.Bottom,
-                UnSelectedImagePath = "Logo/Logo.png",
-                Gravity=Gravity.CenterHorizontal
+                Height = Application.GetRealHeight(619),
+                UnSelectedImagePath = "Account/Logo_loginBG.png"
             };
-            midFrameLayout.AddChidren(logoBtn);
+            midFrameLayout.AddChidren(logoBG);
 
-            var accountFL = new FrameLayout()
+            var phoneEmailBGFL = new FrameLayout()
             {
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                Y = Application.GetRealHeight(200) + logoBtn.Bottom,
-                Radius = (uint)Application.GetRealHeight(55),
-                BorderColor = ZigbeeColor.Current.GXCBorderColor,
-                BorderWidth = 1,
+                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(accountFL);
+            midFrameLayout.AddChidren(logo);
 
-            accountET = new EditText()
+            var logoName = new Button()
             {
-                X=Application.GetRealWidth(20),
-                Width = Application.GetRealWidth(660),
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPhoneNumberOrEmail),
-                TextAlignment = TextAlignment.Center,
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Text=account
+                Y = logo.Bottom,
+                Height = Application.GetRealHeight(69),
+                Width = Application.GetRealWidth(300),
+                Gravity = Gravity.CenterHorizontal,
+                TextID = R.MyInternationalizationString.AppName,
+                TextColor = ZigbeeColor.Current.GXCTextWhiteColor
             };
-            accountFL.AddChidren(accountET);
+            midFrameLayout.AddChidren(logoName);
 
-            var passwordFL = new FrameLayout()
+            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(110),
-                Y = accountFL.Bottom + Application.GetRealHeight(100),
-                Radius = (uint)Application.GetRealHeight(55),
-                BorderColor = ZigbeeColor.Current.GXCBorderColor,
-                BorderWidth = 1,
-                Gravity = Gravity.CenterHorizontal
+                Height = Application.GetRealHeight(58),
+                TextColor = ZigbeeColor.Current.GXCTextRed,
+                TextAlignment = TextAlignment.CenterLeft,
             };
-            midFrameLayout.AddChidren(passwordFL);
+            midFrameLayout.AddChidren(loginErrorBtn);
 
-            passwrodET = new EditText()
+            accountPwdFL = new FrameLayout()
             {
-                Width = Application.GetRealWidth(450),
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPWD),
-                TextAlignment = TextAlignment.Center,
-                SecureTextEntry = true,
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Text=password,
-                Gravity=Gravity.CenterHorizontal
+                Y = Application.GetRealHeight(801),
+                Height = Application.GetRealHeight(553),
+                Width = Application.GetRealWidth(942),
+                Gravity = Gravity.CenterHorizontal,
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(30)
             };
-            passwordFL.AddChidren(passwrodET);
+            midFrameLayout.AddChidren(accountPwdFL);
 
-            hidenPWDbtn = new Button()
-            {
-                X = passwrodET.Right + Application.GetRealWidth(20),
-                Width = Application.GetMinReal(72),
-                Height = Application.GetMinReal(72),
-                UnSelectedImagePath = "Account/HidenPWD.png",
-                SelectedImagePath = "Account/UnHidenPWD.png",
-                Gravity=Gravity.CenterVertical
-            };
-            passwordFL.AddChidren(hidenPWDbtn);
+            AddPhoneOrEmailFL(accountPwdFL, "Phone");
 
             forgotPasswordBtn = new Button()
             {
-                Width = Application.GetRealWidth(400),
-                Height = Application.GetRealHeight(110),
-                Y = passwordFL.Bottom + Application.GetRealHeight(100),
-                TextID = R.MyInternationalizationString.ForgotPassword,
-                TextSize = 15,
-                TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor,
-                TextAlignment = TextAlignment.Center,
-                Gravity=Gravity.CenterHorizontal
+                X = Application.GetRealWidth(CommonPage.AppRealWidth - 115 - 250),
+                Y = Application.GetRealHeight(1198),
+                Width = Application.GetRealWidth(250),
+                Height = Application.GetRealHeight(58),
+                TextID = R.MyInternationalizationString.ForgotPWD,
+                TextSize = CommonFormResouce.loginTextSize,
+                TextColor = Shared.Common.ZigbeeColor.Current.GXCTextGrayColor,
+                TextAlignment = TextAlignment.CenterRight
             };
             midFrameLayout.AddChidren(forgotPasswordBtn);
 
             loginBtn = new Button()
             {
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                Y = Application.GetRealHeight(100) + forgotPasswordBtn.Bottom,
+                Y = Application.GetRealHeight(1293),
+                Width = Application.GetRealWidth(688),
+                Height = Application.GetRealHeight(127),
+                Gravity = Gravity.CenterHorizontal,
                 TextID = R.MyInternationalizationString.Login,
                 TextSize = 15,
-                TextColor = Shared.Common.ZigbeeColor.Current.GXCTextWhiteColor,
-                Radius = (uint)Application.GetRealHeight(55),
-                BorderWidth = 0,
-                BackgroundColor = ZigbeeColor.Current.GXCButtonUnselectedColor,
-                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                Gravity = Gravity.CenterHorizontal,
-                Enable = !string.IsNullOrEmpty(passwrodET.Text),
-                IsSelected = !string.IsNullOrEmpty(passwrodET.Text)
+                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(pwdRow.PasswrodET?.Text),
+                IsSelected = !string.IsNullOrEmpty(pwdRow.PasswrodET?.Text)
             };
             midFrameLayout.AddChidren(loginBtn);
 
-            //閿欒鎻愮ずBtn
-            loginErrorBtn = new Button()
-            {
-                Y=loginBtn.Bottom+Application.GetRealHeight(50),
-                Width=Application.GetRealWidth(1080-100),
-                Height=Application.GetRealHeight(110),
-                TextColor=ZigbeeColor.Current.GXCRedColor,
-                Gravity=Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(loginErrorBtn);
-
             loginByCodeBtn = new Button()
             {
+                X=Application.GetRealWidth(98),
+                Y = Application.GetRealHeight(1431),
                 Width = Application.GetRealWidth(300),
-                Height = Application.GetRealHeight(110),
-                Y = midFrameLayout.Bottom - Application.GetRealHeight(100+110),
+                Height = Application.GetRealHeight(49),
                 TextID = R.MyInternationalizationString.LoginByCode,
-                TextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                TextAlignment = TextAlignment.Center,
-                TextSize = 15,
-                Gravity = Gravity.CenterHorizontal
+                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = CommonFormResouce.loginTextSize
             };
             midFrameLayout.AddChidren(loginByCodeBtn);
-            #endregion
 
-            #region event
-            passwrodET.EditorEnterAction = (ae) =>
+            registerBtn = new Button()
             {
-                Application.HideSoftInput();
+                X = Application.GetRealWidth(738),
+                Y = Application.GetRealHeight(1431),
+                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);
+
+            #endregion
 
             BindEvent();
-            #endregion
         }
 
         #endregion
@@ -263,20 +267,17 @@
         /// </summary>
         private void BindEvent()
         {
+            //閫夋嫨鎵嬫満閭
+            phoneEmailForm.SelectedPhone.MouseUpEventHandler += SelectPhoneOrEmail_MouseUpEvent;
+            phoneEmailForm.SelectedEmail.MouseUpEventHandler += SelectPhoneOrEmail_MouseUpEvent;
             //鐧诲綍浜嬩欢
             loginBtn.MouseUpEventHandler += LoginBtnEvent;
             //鐭俊鐧诲綍
             loginByCodeBtn.MouseUpEventHandler += LoginByCode;
-            //蹇樿瀵嗙爜
-            forgotPasswordBtn.MouseUpEventHandler += ForgetPWD;
             //娉ㄥ唽浜嬩欢
             registerBtn.MouseUpEventHandler += Register;
-            //璐﹀彿鐩戝惉
-            accountET.TextChangeEventHandler += Account_TextChange;
-            //瀵嗙爜鐩戝惉浜嬩欢
-            passwrodET.TextChangeEventHandler += Pwd_TextChange;
-            //闅愯棌瀵嗙爜
-            hidenPWDbtn.MouseUpEventHandler += HidePWD;
+            //蹇樿瀵嗙爜
+            forgotPasswordBtn.MouseUpEventHandler += ForgetPWD_MouseUpEvent;
 
         }
 
@@ -291,15 +292,23 @@
         /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
         private void LoginBtnEvent(object sender,MouseEventArgs mouseEventArgs)
         {
-            Login(accountET.Text.Trim(), passwrodET.Text.Trim());
+            if (phoneEmailForm.SelectedPhone.IsSelected)
+            {
+                Login(phoneRow.AccountET.Text.Trim(), pwdRow.PasswrodET.Text.Trim());
+            }
+            else
+            {
+                Login(phoneRow.AccountET.Text.Trim(), pwdRow.PasswrodET.Text.Trim());
+            }
+
         }
 
         /// <summary>
         /// 鐧诲綍
         /// </summary>
-        /// <param name="account">Account.</param>
-        /// <param name="password">Password.</param>
-        private void Login(string account, string password)
+        /// <param name="accountStr">Account.</param>
+        /// <param name="passwordStr">Password.</param>
+        private void Login(string accountStr, string passwordStr)
         {
             //Application.RunOnMainThread( () =>
             //{
@@ -311,8 +320,8 @@
 
                     var requestObj = new SendDataToServer.LoginObj
                     {
-                        Account = account,
-                        Password = password,
+                        Account = accountStr,
+                        Password = passwordStr,
                         Source = CommonPage.Source,
                         Company = CommonPage.Company
                     };
@@ -321,6 +330,7 @@
                     if (revertObj == null)
                     {
                         CommonPage.Instance.FailureToServer();
+                        CommonPage.Loading.Hide();
                         return;
                     }
                     var stateCodeStr = revertObj.StateCode.ToUpper();
@@ -343,12 +353,10 @@
                             var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
                             var revertData = responseDataObj;
                             Config.ReFresh();
-                            Config.Instance.UserID = revertData.UserID;
-                            Config.Instance.MasterID = revertData.MainUserID;
-                            Config.Instance.AccountType = revertData.UserType;
                             Config.Instance.Account = revertData.Account;
                             Config.Instance.MqttKey = revertData.MqttKey;
-                            Config.Instance.Password = password;
+                            Config.Instance.Password = passwordStr;
+                            Config.Instance.MD5PWD = revertData.MD5PWD;
                             Config.Instance.Guid = revertData.Guid;
                             Config.Instance.LoginDateTime = DateTime.Now;
                             Config.Instance.ConnectZigbeeMqttBrokerPwd = revertData.ConnectZigbeeMqttBrokerPwd;
@@ -364,7 +372,7 @@
                             var homes = await House.GetHomeLists();
                             //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
                             await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-                            Shared.Common.Room.canInitAllRoom = true;
+                            Shared.Common.Room.CanInitAllRoom = true;
                             Shared.Common.Room.InitAllRoom();
                             Application.RunOnMainThread(() =>
                             {
@@ -379,28 +387,24 @@
                         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;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.NOTENABLE);
                     }
                     else if (stateCodeStr == "USERNAMEORPWDERROR")
                     {
                         CommonPage.Loading.Hide();
                         //璐﹀彿鎴栧瘑鐮侀敊璇�
                         loginErrorBtn.TextID = R.MyInternationalizationString.USERNAMEORPWDERROR;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.USERNAMEORPWDERROR);
                     }
                     else if (stateCodeStr == "ACCOUNTNOEXISTS")
                     {
                         CommonPage.Loading.Hide();
                         //璐﹀彿涓嶅瓨鍦�
                         loginErrorBtn.TextID = R.MyInternationalizationString.ACCOUNTNOEXISTS;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.ACCOUNTNOEXISTS);
                     }
                     else if (stateCodeStr == "YOUDATANOISLOCALREGION")
                     {
@@ -413,12 +417,11 @@
                         var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginLocalRegionRes>(revertObj.ResponseData.ToString());
                         CommonPage.RequestHttpsHost = responseDataObj.RegionServer;
                         //鍐嶆鐧诲綍
-                        Login(account, password);
+                        Login(accountStr, passwordStr);
                     }
                     else
                     {
                         loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.RequestServerFailed);
                     }
                 }
                 catch (Exception ex)
@@ -449,91 +452,65 @@
             loginByCodePage.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;
+            loginBtn.Enable = loginBtn.IsSelected = false;
+            (sender as Button).IsSelected = 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)
+        {
+            accountPwdFrameLayout.RemoveAll();
+
+            if (phoneOrEmail == "Phone")
+            {
+                phoneRow = new PhoneLoginRowForm();
+                phoneRow.Init(accountPwdFrameLayout, this, this.account, 29, 29);
+                phoneRow.AccountET.TextChangeEventHandler += Account_TextChange;
+            }
+            else
+            {
+                emailRow = new EmailLoginRowForm();
+                emailRow.Init(accountPwdFrameLayout, this.account, 29, 29);
+                emailRow.AccountET.TextChangeEventHandler += Account_TextChange;
+            }
+
+            pwdRow = new PwdLoginRowForm();
+            pwdRow.Init(accountPwdFrameLayout, 29, 225);
+            pwdRow.PasswrodET.TextChangeEventHandler += Pwd_TextChange;
+
+
+        }
         #endregion
+
 
         #region 鈼� 蹇樿瀵嗙爜________________________
         /// <summary>
         /// 蹇樿瀵嗙爜
         /// </summary>
-        private void ForgetPWD(object sender, MouseEventArgs mouseEventArgs)
+        private void ForgetPWD_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
         {
-            var forgetWPDDialog = new Dialog()
-            {
-                BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
-            };
-            forgetWPDDialog.Show();
-            var forgetSelectedView = new FrameLayout()
-            {
-                BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                Gravity = Gravity.Center,
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(700),
-                Radius = (uint)Application.GetRealHeight(30),
-            };
-            forgetWPDDialog.AddChidren(forgetSelectedView);
-
-            var forgetByPhone = new Button()
-            {
-                Y = Application.GetRealHeight(100),
-                Width = Application.GetRealWidth(600),
-                Height = Application.GetRealHeight(100),
-                TextID = R.MyInternationalizationString.FindPWDByPhone,
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                TextAlignment = TextAlignment.Center,
-                BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                Radius = (uint)Application.GetRealHeight(50),
-                Gravity = Gravity.CenterHorizontal
-            };
-            forgetSelectedView.AddChidren(forgetByPhone);
-
-            var forgetByEmail = new Button()
-            {
-                Y = Application.GetRealHeight(100) + forgetByPhone.Bottom,
-                Width = Application.GetRealWidth(600),
-                Height = Application.GetRealHeight(100),
-                TextID = R.MyInternationalizationString.FindPWDByEmail,
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                TextAlignment = TextAlignment.Center,
-                BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                Radius = (uint)Application.GetRealHeight(50),
-                Gravity = Gravity.CenterHorizontal
-            };
-            forgetSelectedView.AddChidren(forgetByEmail);
-
-            var cancleBtn = new Button()
-            {
-                Y = Application.GetRealHeight(100) + forgetByEmail.Bottom,
-                Width = Application.GetRealWidth(300),
-                Height = Application.GetRealHeight(100),
-                TextID = R.MyInternationalizationString.Cancel,
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                TextAlignment = TextAlignment.Center,
-                BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                Radius = (uint)Application.GetRealHeight(50),
-                Gravity = Gravity.CenterHorizontal
-            };
-            forgetSelectedView.AddChidren(cancleBtn);
-
-            forgetByPhone.MouseUpEventHandler += (sender1, e1) =>
-            {
-                forgetWPDDialog.Close();
-                this.RemoveFromParent();
-                var forgot = new Account.ForgotPasswordByPhone();
-                CommonPage.Instance.AddChidren(forgot);
-                forgot.Show();
-            };
-            forgetByEmail.MouseUpEventHandler += (sender1, e1) =>
-            {
-                forgetWPDDialog.Close();
-                this.RemoveFromParent();
-                var forgot = new Account.ForgotPasswordByEmail();
-                CommonPage.Instance.AddChidren(forgot);
-                forgot.Show();
-            };
-            cancleBtn.MouseUpEventHandler += (sender1, e1) =>
-            {
-                forgetWPDDialog.Close();
-            };
+            var forgot = new AccountForgetPWD();
+            CommonPage.Instance.AddChidren(forgot);
+            forgot.Show();
         }
 
         #endregion
@@ -547,8 +524,7 @@
         /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
         private void Register(object sender,MouseEventArgs mouseEventArgs)
         {
-            this.RemoveFromParent();
-            var registerPage = new RegistrationPhoneOREmail();
+            var registerPage = new AccountRegister();
             Shared.Common.CommonPage.Instance.AddChidren(registerPage);
             registerPage.Show();
         }
@@ -574,18 +550,18 @@
         private void Pwd_TextChange(object sender,string mouseEventArgs)
         {
             loginErrorBtn.Text = "";
-            if (1 <= passwrodET.Text.Trim().Length && passwrodET.Text.Trim().Length <= 16 && accountET.Text.Trim().Length > 0)
+            if (1 <= pwdRow.PasswrodET.Text.Trim().Length && pwdRow.PasswrodET.Text.Trim().Length <= 16 && phoneRow.AccountET.Text.Trim().Length > 0)
             {
                 loginBtn.Enable = loginBtn.IsSelected = true;
             }
-            else if (passwrodET.Text.Trim().Length > 16)
+            else if (pwdRow.PasswrodET.Text.Trim().Length > 16)
             {
-                passwrodET.Text = mouseEventArgs.Remove(16);
+                pwdRow.PasswrodET.Text = mouseEventArgs.Remove(16);
             }
-            else if (passwrodET.Text.Trim().Length > 16 && accountET.Text.Trim().Length > 0)
+            else if (pwdRow.PasswrodET.Text.Trim().Length > 16 && phoneRow.AccountET.Text.Trim().Length > 0)
             {
                 loginBtn.Enable = loginBtn.IsSelected = true;
-                passwrodET.Text = mouseEventArgs.Remove(16);
+                pwdRow.PasswrodET.Text = mouseEventArgs.Remove(16);
             }
             else
             {
@@ -594,17 +570,7 @@
         }
 
 
-
         #endregion
 
-        #region 鈼� 瀵嗙爜闅愯棌__________________________
-
-        private void HidePWD(object sender, MouseEventArgs mouseEventArgs)
-        {
-            passwrodET.SecureTextEntry = !passwrodET.SecureTextEntry;
-            hidenPWDbtn.IsSelected = !hidenPWDbtn.IsSelected;
-        }
-
-        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountLoginByCode.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountLoginByCode.cs
index f9536ee..a7232bc 100755
--- a/ZigbeeApp/Shared/Phone/Device/Account/AccountLoginByCode.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountLoginByCode.cs
@@ -4,29 +4,84 @@
 using System.Collections.Generic;
 using System.Timers;
 using Shared.Phone.UserView;
+using Shared.Phone.Device.CommonForm;
 
 namespace Shared.Phone.Device.Account
 {
     /// <summary>
     /// 楠岃瘉鐮佺櫥褰�
     /// </summary>
-    public class AccountLoginByCode: FrameLayout
+    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;
+
+        private Timer t;
+        private DateTime dateBegin;
+
+        #endregion
+
+
         /// <summary>
         /// The phone string.
         /// </summary>
-        public string phoneStr = "";
+        //public string phoneStr = "";
         /// <summary>
         /// 鎵嬫満鍙疯緭鍏ユ槸鍚︾鍚堣鍒�
         /// </summary>
         public bool IsRightAccount = false;
-        /// <summary>
-        /// *****鍗囩骇鍒嗗竷寮忓悗锛孉ccount 浠呭寘鍚墜鏈哄彿锛屼笉鍐嶅寘鍚�00鍖哄彿銆傚瘑鐮佷笉鍐嶉渶瑕丮D5鍔犲瘑銆俵anguage涓篈PP璇�
-        /// 涓嬫潵閫夋嫨鎵嬫満鍖哄彿 榛樿涓浗澶ч檰涓�86
-        ///鍙戦�佸浗闄� / 娓境鍙版秷鎭椂锛屾帴鏀跺彿鐮佹牸寮忎负00 + 鍥介檯鍖哄彿 + 鍙风爜锛屽鈥�008615899998888鈥�   璋冪敤API鏃讹紝Company瀛楁璇蜂紶鍏ユ暣鍨嬪�硷細4銆� 銆�
-        ///鍥藉唴  璋冪敤API鏃讹紝Company瀛楁璇蜂紶鍏ユ暣鍨嬪�硷細0銆�
-        /// </summary>
-        public List<Common.ResponseEntity.AreaCodeOBJ> areaCodeList = new List<Common.ResponseEntity.AreaCodeOBJ>();
         /// <summary>
         /// Initializes a new instance of the <see cref="T:Shared.Phone.Device.Account.AccountLoginByCode"/> class.
         /// </summary>
@@ -34,700 +89,566 @@
         {
             Tag = "Login";
             BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
+            t = new Timer();
+            dateBegin = new DateTime();
+        }
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
         }
         /// <summary>
         /// Show this instance.
         /// </summary>
-        public async void Show()
+        public void Show()
         {
-            CommonPage.Loading.Start();
-            try
-            {
-                var requestOBJ = new SendDataToServer.GetAreaCodeOBJ()
-                {
-                    RequestVersion = CommonPage.RequestVersion
-                };
-                var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestOBJ);
-                var revertOBJ = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/GetAreaCode", System.Text.Encoding.UTF8.GetBytes(requestJson));
-                if (revertOBJ == null)
-                {
-                    return;
-                }
-                if (revertOBJ.StateCode.ToUpper() == "SUCCESS")
-                {
-                    var responseData = revertOBJ.ResponseData;
-                    areaCodeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Common.ResponseEntity.AreaCodeOBJ>>(responseData.ToString());
-                }
-            }
-            catch { }
-            finally
-            {
-                CommonPage.Loading.Hide();
-                ShowLoginByCodeView();
-            }
-
+            ShowLoginByCodeView();
         }
         /// <summary>
         /// Shows the login by code view.
         /// </summary>
         public void ShowLoginByCodeView()
         {
-            var t = new Timer();
-            var dateBegin = new DateTime();
-
             #region midFrameLayout
-            var midFrameLayout = new FrameLayout()
+            midFrameLayout = new FrameLayout()
             {
                 Width = LayoutParams.MatchParent,
-                Height = Application.GetRealHeight(1920),
+                Height = Application.GetRealHeight(CommonPage.AppRealHeight),
                 BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
             };
             AddChidren(midFrameLayout);
             #endregion
 
-            #region 甯冨眬璐︽埛 娉ㄥ唽  鎵嬫満楠岃瘉鐮佺櫥褰�
-
-            var registerBtn = new Button()
+            var logoBG = new Button()
             {
-                Width = Application.GetRealWidth(250),
-                Height = Application.GetRealHeight(80),
-                X = Application.GetRealWidth(1080 - 250 - 50),
-                Y = Application.GetRealHeight(100),
-                TextID = R.MyInternationalizationString.Register,
-                TextSize = 15,
-                TextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                TextAlignment = TextAlignment.CenterRight
+                Height = Application.GetRealHeight(619),
+                UnSelectedImagePath = "Account/Logo_loginBG.png"
             };
-            midFrameLayout.AddChidren(registerBtn);
+            midFrameLayout.AddChidren(logoBG);
 
-            var logoBtn = new Button()
+            var phoneEmailBGFL = new FrameLayout()
             {
-                Width = Application.GetMinRealAverage(270),
-                Height = Application.GetMinRealAverage(270),
-                Y = Application.GetRealHeight(150) + registerBtn.Bottom,
-                UnSelectedImagePath = "Logo/Logo.png",
+                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(logoBtn);
+            midFrameLayout.AddChidren(logo);
 
-            var accountFL = new FrameLayout()
+            var logoName = new Button()
             {
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                Y = Application.GetRealHeight(200) + logoBtn.Bottom,
-                Radius = (uint)Application.GetRealHeight(55),
-                BorderColor = ZigbeeColor.Current.GXCBorderColor,
-                BorderWidth = 1,
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(accountFL);
-            var accountZoneBtn = new Button()
-            {
-                Width = Application.GetRealWidth(200),
-                X = Application.GetRealWidth(20),
-                Text = "+" + CommonPage.PhoneZoneStr,
-                TextAlignment = TextAlignment.Center,
-                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor
-            };
-            accountFL.AddChidren(accountZoneBtn);
-            var accountZoneLine = new Button()
-            {
-                X = Application.GetRealWidth(10) + accountZoneBtn.Right,
-                Width = 1,
-                Height = Application.GetRealHeight(60),
-                Gravity=Gravity.CenterVertical,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            accountFL.AddChidren(accountZoneLine);
-            var accountET = new EditText()
-            {
-                X = accountZoneLine.Right + Application.GetRealWidth(20),
-                Width = Application.GetRealWidth(400),
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPhoneNum),
-                TextAlignment = TextAlignment.Center,
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor
-            };
-            accountFL.AddChidren(accountET);
-
-            var verificationCodeFL = new FrameLayout()
-            {
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                Y = accountFL.Bottom + Application.GetRealHeight(100),
-                Radius = (uint)Application.GetRealHeight(55),
-                BorderColor = ZigbeeColor.Current.GXCBorderColor,
-                BorderWidth = 1,
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(verificationCodeFL);
-            var verificationCodeET = new EditText()
-            {
-                X = Application.GetRealWidth(20),
-                Width = Application.GetRealWidth(350),
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputVerificationCode),
-                TextAlignment = TextAlignment.Center,
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor
-            };
-            verificationCodeFL.AddChidren(verificationCodeET);
-
-            var sendCodeLine = new Button()
-            {
-                X = Application.GetRealWidth(10) + verificationCodeET.Right,
-                Width = 1,
-                Height = Application.GetRealHeight(60),
-                Gravity=Gravity.CenterVertical,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            verificationCodeFL.AddChidren(sendCodeLine);
-
-            var sendCodeBtn = new Button()
-            {
-                X = sendCodeLine.Right + Application.GetRealWidth(20),
-                Width = Application.GetRealWidth(250),
-                TextID = R.MyInternationalizationString.SendVerificationCode,
-                TextColor = ZigbeeColor.Current.GXCTextUnselectedColor,
-                SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                TextAlignment = TextAlignment.Center,
-                Enable = false,
-                IsSelected=false
-            };
-            verificationCodeFL.AddChidren(sendCodeBtn);
-
-            var loginBtn = new Button()
-            {
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                Y = Application.GetRealHeight(200) + verificationCodeFL.Bottom,
-                TextID = R.MyInternationalizationString.Login,
-                TextSize = 15,
-                TextColor = Shared.Common.ZigbeeColor.Current.GXCTextWhiteColor,
-                Radius = (uint)Application.GetRealHeight(55),
-                BorderWidth = 0,
-                BackgroundColor = ZigbeeColor.Current.GXCButtonUnselectedColor,
-                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
+                Y = logo.Bottom,
+                Height = Application.GetRealHeight(69),
+                Width = Application.GetRealWidth(300),
                 Gravity = Gravity.CenterHorizontal,
-                Enable = false,
-                IsSelected=false
+                TextID = R.MyInternationalizationString.AppName,
+                TextColor = ZigbeeColor.Current.GXCTextWhiteColor
             };
-            midFrameLayout.AddChidren(loginBtn);
+            midFrameLayout.AddChidren(logoName);
+
+            phoneEmailForm = new PhoneEmailForm();
+            phoneEmailForm.Init(midFrameLayout);
 
             //閿欒鎻愮ずBtn
-            var loginErrorBtn = new Button()
+            loginErrorBtn = new Button()
             {
-                Y = loginBtn.Bottom + Application.GetRealHeight(50),
-                Width = Application.GetRealWidth(1080 - 100),
-                Height = Application.GetRealHeight(110),
-                TextColor = ZigbeeColor.Current.GXCRedColor,
-                Gravity = Gravity.CenterHorizontal
+                X = Application.GetRealWidth(242),
+                Y = Application.GetRealHeight(740),
+                Width = Application.GetRealWidth(700),
+                Height = Application.GetRealHeight(58),
+                TextColor = ZigbeeColor.Current.GXCTextRed,
+                TextAlignment = TextAlignment.CenterLeft,
             };
             midFrameLayout.AddChidren(loginErrorBtn);
 
-            var LoginByAccountPWDBtn = new Button()
+            accountCodeFL = new FrameLayout()
             {
-                Width = Application.GetRealWidth(500),
-                Height = Application.GetRealHeight(110),
-                Y = midFrameLayout.Bottom - Application.GetRealHeight(100 + 110),
-                TextID = R.MyInternationalizationString.LoginByAccountPWD,
-                TextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                TextAlignment = TextAlignment.Center,
+                Y = Application.GetRealHeight(801),
+                Height = Application.GetRealHeight(553),
+                Width = Application.GetRealWidth(942),
                 Gravity = Gravity.CenterHorizontal,
-                TextSize = 15
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(30)
+            };
+            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,
+                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 = 15,
+                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(1446),
+                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);
-            #endregion
 
-            #region event
-            accountET.TextChangeEventHandler += (sender, e) =>
+            registerBtn = new Button()
             {
-                loginErrorBtn.Text = "";
-                //鏍¢獙鎵嬫満鍙�
-                if (CommonPage.PhoneZoneStr != "86")
-                {
-                    var reg = new Regex(CommonPage.PhoneForForeignRegexStr);
-                    var mFalg = reg.Match(accountET.Text.Trim());
-                    if (!mFalg.Success)
-                    {
-                        var aler = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.PleaseInputTheCorrectCellPhoneNumber), Language.StringByID(R.MyInternationalizationString.Confrim));
-                        aler.Show();
-                        sendCodeBtn.Enable =sendCodeBtn.IsSelected= false;
-                        IsRightAccount = false;
-                    }
-                    else
-                    {
-                        sendCodeBtn.Enable = sendCodeBtn.IsSelected= true;
-                        IsRightAccount = true;
-                    }
-                }
-                else
-                {
-                    if (accountET.Text.Trim().Length == 11)
-                    {
-                        var reg = new Regex(CommonPage.PhoneRegexStr);
-                        var mFalg = reg.Match(accountET.Text.Trim());
-                        if (!mFalg.Success)
-                        {
-                            sendCodeBtn.Enable =sendCodeBtn.IsSelected= false;
-                            IsRightAccount = false;
-                            var aler = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.PleaseInputTheCorrectCellPhoneNumber), Language.StringByID(R.MyInternationalizationString.OK));
-                            aler.Show();
-                        }
-                        else
-                        {
-                            sendCodeBtn.Enable = sendCodeBtn.IsSelected= true;
-                            IsRightAccount = true;
-                        }
-                    }
-                    else if (accountET.Text.Trim().Length > 11)
-                    {
-                        accountET.Text = e.Remove(11);
-                    }
-                    else
-                    {
-                        sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                        IsRightAccount = false;
-                        //姝e垯琛ㄨ揪寮忓垽鏂槸鍚︽暟瀛�
-                        var reg = new Regex("^[0-9]*$");
-                        if (!reg.IsMatch(accountET.Text))
-                        {
-                            var aler = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.PleaseInputTheCorrectCellPhoneNumber), Language.StringByID(R.MyInternationalizationString.Confrim));
-                            aler.Show();
-                            accountET.Text = "";
-                        }
+                X = Application.GetRealWidth(738),
+                Y = Application.GetRealHeight(1446),
+                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);
 
-                    }
-                }
-            };
-            verificationCodeET.TextChangeEventHandler += (sender, e) =>
+            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;
+
+        }
+
+        #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
             {
-                loginErrorBtn.Text = "";
-                if (verificationCodeET.Text.Trim().Length > 0 && IsRightAccount)
+                var reqLoginByCode = new SendDataToServer.LoginValidCodeOBJ()
                 {
-                    loginBtn.IsSelected = loginBtn.Enable = true;
+                    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;
                 }
-                else
+                var stateCodeStr = requestRevetLoginCodeOBJ.StateCode.ToUpper();
+                if (stateCodeStr == "SUCCESS")
                 {
-                    loginBtn.IsSelected = loginBtn.Enable = false;
-                }
-            };
-            sendCodeBtn.MouseUpEventHandler += async (sender, e) =>
-            {
-                string phoneNum = accountET.Text.Trim();
-                CommonPage.Loading.Start();
-                try
-                {
-                    int companyInt = 0;
-                    if (CommonPage.PhoneZoneStr == "86")
+                    if (requestRevetLoginCodeOBJ.ResponseData == null)
                     {
-                        companyInt = CommonPage.Company;
-                        phoneStr = phoneNum;
-                    }
-                    else
-                    {
-                        companyInt = CommonPage.CompanyForINTERNETION;
-                        phoneStr = phoneNum;
-                    }
-                    var reqDtoSignPhone = new SendDataToServer.LoginSendVerCodeObj()
-                    {
-                        Account = phoneStr,
-                        Company = companyInt,
-                        AreaCode = int.Parse(CommonPage.PhoneZoneStr),
-                        Language = CommonPage.ZigBeeLanguage
-                    };
-                    var requesetJson = Newtonsoft.Json.JsonConvert.SerializeObject(reqDtoSignPhone);
-                    var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/LoginSendVerCode", System.Text.Encoding.UTF8.GetBytes(requesetJson));
-                    if (requestRevertObj == null)
-                    {
-                        CommonPage.Instance.FailureToServer();
                         return;
                     }
-                    var stateCodeStr = requestRevertObj.StateCode.ToUpper();
-                    if (stateCodeStr == "SUCCESS")
+                    this.RemoveFromParent();
+                    Application.MainPage?.RemoveViewByTag("Login");
+
+                    UserPage.Instance.Fresh();
+
+                    new System.Threading.Thread(async () =>
                     {
-                        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;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.PARAMETEROREMPTY);
-                    }
-                    else if (stateCodeStr == "ACCOUNTNOEXISTS")
-                    {
-                        //璐﹀彿涓嶅瓨鍦�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.ACCOUNTNOEXISTS;
-                        accountET.Text = "";
-                        IsRightAccount = false;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.ACCOUNTNOEXISTS);
-                    }
-                    else if (stateCodeStr == "SENDFAIL")
-                    {
-                        //楠岃瘉鐮佸彂閫佸け璐�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.SENDFAIL;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.SENDFAIL);
-                    }
-                    else
-                    {
-                        loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.RequestServerFailed);
-                    }
+                        //鍚姩ZigBee
+                        ZigBee.Common.Application.Init();
+                        var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(requestRevetLoginCodeOBJ.ResponseData.ToString());
+                        var revertData = responseDataObj;
+                        Config.ReFresh();
+                        Config.Instance.Account = revertData.Account;
+                        Config.Instance.MqttKey = revertData.MqttKey;
+                        Config.Instance.Guid = revertData.Guid;
+                        Config.Instance.MD5PWD = revertData.MD5PWD;
+                        Config.Instance.LoginDateTime = DateTime.Now;
+                        Config.Instance.ConnectZigbeeMqttBrokerPwd = revertData.ConnectZigbeeMqttBrokerPwd;
+                        Config.Instance.ConnectZigbeeMqttClientId = revertData.ConnectZigbeeMqttClientId;
+                        Config.Instance.ZigbeeMqttBrokerLoadSubDomain = revertData.ZigbeeMqttBrokerLoadSubDomain;
+                        if (Config.Instance.AccountList.Find((obj) => obj == revertData.Account) == null)
+                        {
+                            Config.Instance.AccountList.Add(revertData.Account);
+                        }
+                        //闇�瑕佹妸鐧诲綍鍚庤繑鍥炵殑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();
+
+                        Shared.Common.Room.CanInitAllRoom = true;
+                        Shared.Common.Room.InitAllRoom();
+                        Application.RunOnMainThread(() =>
+                        {
+                            UserPage.Instance.Fresh();
+                            CommonPage.Loading.Hide();
+                        });
+                    })
+                    { IsBackground = true }.Start();
                 }
-                catch
-                {
-                    loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                }
-                finally
+                else if (stateCodeStr == "NOTVERIFY")
                 {
                     CommonPage.Loading.Hide();
+                    //鏈縺娲�
+                    loginErrorBtn.TextID = R.MyInternationalizationString.NOTVERIFY;
+                    CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.NOTVERIFY);
                 }
-            };
-
-            loginBtn.MouseDownEventHandler += (sender, e) =>
-            {
-                loginBtn.IsSelected = true;
-            };
-            //login
-            loginBtn.MouseUpEventHandler +=  (sender, e) =>
-             {
-                  loginByCode();
-             };
-            void loginByCode()
-            {
-                Action action = async () =>
+                else if (stateCodeStr == "NOTENABLE")
                 {
-                    CommonPage.Loading.Start(Language.StringByID(R.MyInternationalizationString.Logining));
-                    try
-                    {
-                        var reqLoginByCode = new SendDataToServer.LoginValidCodeOBJ()
-                        {
-                            Account = accountET.Text.Trim(),
-                            Code = verificationCodeET.Text.Trim(),
-                            Language = CommonPage.ZigBeeLanguage,
-                            AreaCode = int.Parse(CommonPage.PhoneZoneStr)
-                        };
-                        var requesLoginCodeJson = Newtonsoft.Json.JsonConvert.SerializeObject(reqLoginByCode);
-
-                        var requestRevetLoginCodeOBJ = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/LoginValidCode", System.Text.Encoding.UTF8.GetBytes(requesLoginCodeJson));
-                        if (requestRevetLoginCodeOBJ == null)
-                        {
-                            CommonPage.Instance.FailureToServer();
-                            return;
-                        }
-                        var stateCodeStr = requestRevetLoginCodeOBJ.StateCode.ToUpper();
-                        if (stateCodeStr == "SUCCESS")
-                        {
-                            if (requestRevetLoginCodeOBJ.ResponseData == null)
-                            {
-                                return;
-                            }
-                            this.RemoveFromParent();
-                            Application.MainPage?.RemoveViewByTag("Login");
-
-                            UserPage.Instance.Fresh();
-
-                            new System.Threading.Thread(async () =>
-                            {
-                                var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(requestRevetLoginCodeOBJ.ResponseData.ToString());
-                                var revertData = responseDataObj;
-                                Config.ReFresh();
-                                Config.Instance.UserID = revertData.UserID;
-                                Config.Instance.MasterID = revertData.MainUserID;
-                                Config.Instance.AccountType = revertData.UserType;
-                                Config.Instance.Account = revertData.Account;
-                                Config.Instance.MqttKey = revertData.MqttKey;
-                                Config.Instance.Guid = revertData.Guid;
-                                Config.Instance.LoginDateTime = DateTime.Now;
-                                Config.Instance.ConnectZigbeeMqttBrokerPwd = revertData.ConnectZigbeeMqttBrokerPwd;
-                                Config.Instance.ConnectZigbeeMqttClientId = revertData.ConnectZigbeeMqttClientId;
-                                Config.Instance.ZigbeeMqttBrokerLoadSubDomain = revertData.ZigbeeMqttBrokerLoadSubDomain;
-                                if (Config.Instance.AccountList.Find((obj) => obj == revertData.Account) == null)
-                                {
-                                    Config.Instance.AccountList.Add(revertData.Account);
-                                }
-                                //闇�瑕佹妸鐧诲綍鍚庤繑鍥炵殑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();
-
-                                Shared.Common.Room.canInitAllRoom = true;
-                                Shared.Common.Room.InitAllRoom();
-                                Application.RunOnMainThread(() =>
-                                {
-                                    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;
-                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.NOTENABLE);
-                        }
-                        else if (stateCodeStr == "PARAMETEROREMPTY")
-                        {
-                            CommonPage.Loading.Hide();
-                            //鎻愪緵鐨勫弬鏁伴敊璇�
-                            loginErrorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
-                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.PARAMETEROREMPTY);
-                        }
-                        else if (stateCodeStr == "VALIDCODEANDPHONENOEQUAL")
-                        {
-                            CommonPage.Loading.Hide();
-                            //楠岃瘉鐮侀敊璇�
-                            loginErrorBtn.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL;
-                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL);
-                        }
-                        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;
-                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.RequestServerFailed);
-                        }
-                    }
-                    catch
-                    {
-                        CommonPage.Loading.Hide();
-                        CommonPage.Instance.FailureToServer();
-                    }
-                    finally
-                    {
-                        //CommonPage.Loading.Hide();
-                    }
-                };
-                action();
-            }
-
-            //娉ㄥ唽浜嬩欢
-            registerBtn.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-                var registerPage = new RegistrationPhoneOREmail();
-                Shared.Common.CommonPage.Instance.AddChidren(registerPage);
-                registerPage.Show();
-            };
-            //璐﹀彿瀵嗙爜鐧诲綍
-            LoginByAccountPWDBtn.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-                var login = new AccountLogin();
-                Shared.Common.CommonPage.Instance.AddChidren(login);
-                login.Show();
-            };
-
-            void TimeBegin()
-            {
-                t.Interval = 1000;
-                t.AutoReset = true;
-                t.Enabled = true;
-                t.Elapsed += TimeOut;
-                //鍚姩璁℃椂鍣ㄥ�掕鏃�-60s
-                t.Start();
-                dateBegin = DateTime.Now;
-            }
-
-            void TimeOut(object source, System.Timers.ElapsedEventArgs e)
-            {
-                var span = DateTime.Now - dateBegin;
-                if (span.TotalSeconds <= 61)
+                    CommonPage.Loading.Hide();
+                    //璇ョ敤鎴峰睘浜庤皟璇曡处鍙凤紝骞舵湭鍚敤
+                    loginErrorBtn.TextID = R.MyInternationalizationString.NOTENABLE;
+                }
+                else if (stateCodeStr == "PARAMETEROREMPTY")
                 {
-                    Application.RunOnMainThread(() =>
+                    CommonPage.Loading.Hide();
+                    //鎻愪緵鐨勫弬鏁伴敊璇�
+                    loginErrorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
+                }
+                else if (stateCodeStr == "VALIDCODEANDPHONENOEQUAL")
+                {
+                    CommonPage.Loading.Hide();
+                    //楠岃瘉鐮侀敊璇�
+                    loginErrorBtn.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL;
+                }
+                else if (stateCodeStr == "YOUDATANOISLOCALREGION")
+                {
+                    CommonPage.Loading.Hide();
+                    //涓嶅湪鏈尯鍩燂紝闇�瑕侀噸瀹氬悜鍖哄煙鍚庡啀娆¤姹傜櫥褰�
+                    if (requestRevetLoginCodeOBJ.ResponseData == null)
                     {
-                        sendCodeBtn.Text = Convert.ToInt16((60 - span.TotalSeconds)) + "s" + Language.StringByID(R.MyInternationalizationString.SendVerificationCode);
-                        sendCodeBtn.Enable = false;
-                    });
+                        return;
+                    }
+                    var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginLocalRegionRes>(requestRevetLoginCodeOBJ.ResponseData.ToString());
+                    CommonPage.RequestHttpsHost = responseDataObj.RegionServer;
+                    //鍐嶆鐧诲綍
+                    //loginByCode();
                 }
                 else
                 {
-                    Application.RunOnMainThread(() =>
-                    {
-                        sendCodeBtn.Enable = true;
-                        sendCodeBtn.TextID = R.MyInternationalizationString.SendVerificationCode;
-                        t.Stop();
-                        t.Close();
-                    });
+                    CommonPage.Loading.Hide();
+                    loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
                 }
             }
-
-            Button tempClickZoneImgBtn = new Button();
-            Button tempClickZoneNameBtn = new Button();
-            EventHandler<MouseEventArgs> phoneZoneHandler = (senderZone, eZone) =>
+            catch
             {
-                //ZoneListView
-                var phoneZoneSelectedShowView = new Dialog()
-                {
-                    Height = Application.GetRealHeight(1000),
-                    Width = Application.GetRealWidth(700),
-                    BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                    Radius=(uint)Application.GetRealHeight(30)
-                };
-                phoneZoneSelectedShowView.Show();
+                CommonPage.Loading.Hide();
+                CommonPage.Instance.FailureToServer();
+            }
+            finally
+            {
+                CommonPage.Loading.Hide();
+            }
 
-                var phoneZoneTitle = new Button()
-                {
-                    Height = Application.GetRealHeight(110),
-                    TextID = R.MyInternationalizationString.PleaseSelectAreaCode,
-                    TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                    TextSize = 15,
-                    BackgroundColor=ZigbeeColor.Current.GXCButtonBlueColor
-                };
-                phoneZoneSelectedShowView.AddChidren(phoneZoneTitle);
-
-                var phoneZoneSelectedListView = new VerticalScrolViewLayout()
-                {
-                    Y = phoneZoneTitle.Bottom,
-                    Height = Application.GetRealHeight(1000-110*2),
-                    BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor
-                };
-                phoneZoneSelectedShowView.AddChidren(phoneZoneSelectedListView);
-
-                for (int i = 0; i < areaCodeList.Count; i++)
-                {
-                    var zoneItemLName = areaCodeList[i].Name;
-                    var zoneItemLCode = areaCodeList[i].Code;
-                    var zoneItemFL = new FrameLayout()
-                    {
-                        Width = phoneZoneSelectedListView.Width,
-                        Height = Application.GetRealHeight(110),
-                        Tag = i + 10086
-                    };
-                    phoneZoneSelectedListView.AddChidren(zoneItemFL);
-
-                    var zoneIsSelectedBtn = new Button()
-                    {
-                        Width = Application.GetMinReal(80),
-                        Height = Application.GetMinReal(80),
-                        UnSelectedImagePath = "Account/Check.png",
-                        SelectedImagePath = "Account/CheckSelected.png",
-                        Tag = i + 10086,
-                        Gravity=Gravity.CenterVertical
-                    };
-                    zoneItemFL.AddChidren(zoneIsSelectedBtn);
-
-                    var zoneItemNameBtn = new Button()
-                    {
-                        X = Application.GetRealWidth(20)+zoneIsSelectedBtn.Right,
-                        Width = zoneItemFL.Width - Application.GetRealWidth(100),
-                        Height = Application.GetRealHeight(110)-1,
-                        Text = zoneItemLName,
-                        TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                        SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                        TextAlignment = TextAlignment.CenterLeft,
-                        Tag = i + 10000
-                    };
-                    zoneItemFL.AddChidren(zoneItemNameBtn);
-
-                    var zoneLine = new Button()
-                    {
-                        Y = zoneItemFL.Height - 1,
-                        Width = zoneItemFL.Width,
-                        Height = 1,
-                        BackgroundColor = ZigbeeColor.Current.GXCPlaceHolderTextColor
-                    };
-                    zoneItemFL.AddChidren(zoneLine);
-
-                    EventHandler<MouseEventArgs> selectedZone = (sender, e) =>
-                    {
-                        tempClickZoneImgBtn.IsSelected = false;
-                        tempClickZoneNameBtn.IsSelected = false;
-                        zoneItemNameBtn.IsSelected = true;
-                        zoneIsSelectedBtn.IsSelected = true;
-                        tempClickZoneImgBtn = zoneIsSelectedBtn;
-                        tempClickZoneNameBtn = zoneItemNameBtn;
-                        CommonPage.PhoneZoneStr = zoneItemLCode;
-                    };
-                    zoneIsSelectedBtn.MouseUpEventHandler += selectedZone;
-                    zoneItemNameBtn.MouseUpEventHandler += selectedZone;
-                    //榛樿
-                    if(zoneItemLCode==CommonPage.PhoneZoneStr)
-                    {
-                        zoneItemNameBtn.IsSelected = true;
-                        zoneIsSelectedBtn.IsSelected = true;
-                        tempClickZoneImgBtn = zoneIsSelectedBtn;
-                        tempClickZoneNameBtn = zoneItemNameBtn;
-                    }
-                }
-                var cancleBtn = new Button()
-                {
-                    Y = phoneZoneSelectedListView.Bottom,
-                    Height = Application.GetRealHeight(110),
-                    Width = Application.GetRealWidth(700 / 2),
-                    BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                    TextID = R.MyInternationalizationString.Cancel,
-                    TextSize = 15
-                };
-                phoneZoneSelectedShowView.AddChidren(cancleBtn);
-                cancleBtn.MouseUpEventHandler += (sender, e) =>
-                {
-                    phoneZoneSelectedShowView.Close();
-                };
-                cancleBtn.MouseDownEventHandler += (sender, e) =>
-                {
-                    cancleBtn.IsSelected = true;
-                };
-
-                var lineCancleOK = new Button()
-                {
-                    X = cancleBtn.Right,
-                    Y = phoneZoneSelectedListView.Bottom,
-                    Height = Application.GetRealHeight(110),
-                    Width = 1,
-                    BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor
-                };
-                phoneZoneSelectedShowView.AddChidren(lineCancleOK);
-
-                var okBtn = new Button()
-                {
-                    X = lineCancleOK.Right+1,
-                    Y = phoneZoneSelectedListView.Bottom,
-                    Height = Application.GetRealHeight(110),
-                    Width = Application.GetRealWidth(700 / 2)-1,
-                    BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                    TextID = R.MyInternationalizationString.Confrim,
-                    TextSize = 15
-                };
-                phoneZoneSelectedShowView.AddChidren(okBtn);
-                okBtn.MouseUpEventHandler += (sender, e) =>
-                {
-                    accountZoneBtn.Text = "+" + CommonPage.PhoneZoneStr;
-                    phoneZoneSelectedShowView.Close();
-                };
-                okBtn.MouseDownEventHandler += (sender, e) =>
-                {
-                    okBtn.IsSelected = true;
-                };
-            };
-            accountZoneBtn.MouseUpEventHandler += phoneZoneHandler;
-            #endregion
         }
+
+        /// <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;
+            loginBtn.Enable = loginBtn.IsSelected = false;
+            (sender as Button).IsSelected = 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();
+
+            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;
+        }
+        #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 = "";
+            if ((sender as EditText).Text.Trim().Length > 0)
+            {
+                IsRightAccount = true;
+                codeRow.SendCodeBtn.Enable = codeRow.SendCodeBtn.IsSelected = true;
+            }
+            else
+            {
+                IsRightAccount = false;
+                codeRow.SendCodeBtn.Enable = codeRow.SendCodeBtn.IsSelected = false;
+            }
+            account = (sender as EditText).Text.Trim();
+        }
+
+        /// <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 login = new AccountLogin();
+            CommonPage.Instance.AddChidren(login);
+            login.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)
+        {
+            (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();
+            }
+        }
+        #endregion
+
+        #region 鈼� 楠岃瘉楠岃瘉鐮乢_______________________
+
+
+
+        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountRegister.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountRegister.cs
new file mode 100755
index 0000000..b8d089e
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountRegister.cs
@@ -0,0 +1,464 @@
+锘縰sing System;
+using Shared.Common;
+using Shared.Phone.Device.CommonForm;
+
+namespace Shared.Phone.Device.Account
+{
+    public class AccountRegister : FrameLayout
+    {
+        #region 鈼� 鍙橀噺____________________________
+        /// <summary>
+        /// 鎵嬫満閭
+        /// </summary>
+        private PhoneEmailForm phoneEmailForm;
+        /// <summary>
+        /// phoneRowForm
+        /// </summary>
+        private PhoneRowForm phoneRow;
+        /// <summary>
+        /// emailRow
+        /// </summary>
+        private EmailRowForm emailRow;
+        /// <summary>
+        /// pwdRow
+        /// </summary>
+        private PwdRowForm pwdRow;
+        /// <summary>
+        /// pwdComfireRow
+        /// </summary>
+        private PwdRowForm pwdComfireRow;
+        /// <summary>
+        /// CodeForRegisterRowForm
+        /// </summary>
+        private CodeForRegisterRowForm codeRow;
+        /// <summary>
+        /// bodyFrameLayout
+        /// </summary>
+        private FrameLayout bodyFrameLayout;
+        /// <summary>
+        /// 璐﹀彿楠岃瘉鐮乫l
+        /// </summary>
+        private FrameLayout accountCodeFL;
+        /// <summary>
+        /// 娉ㄥ唽
+        /// </summary>
+        private Button registerBtn;
+        /// <summary>
+        /// 璐﹀彿鐧诲綍
+        /// </summary>
+        private Button loginByAccountPWDBtn;
+        /// <summary>
+        /// 鐧诲綍閿欒鎻愮ず鎸夐挳
+        /// </summary>
+        private Button errorBtn;
+        /// <summary>
+        /// 璐﹀彿
+        /// </summary>
+        private string account;
+
+        #endregion
+
+        #region 鈼� 鏋勯�犳柟娉昣________________________
+        public AccountRegister()
+        {
+            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
+            Tag = "Register";
+        }
+        #endregion
+
+        #region 鈼� 鏄剧ず鐣岄潰_________________________
+        /// <summary>
+        /// show
+        /// </summary>
+        public void Show()
+        {
+            //AddTop
+            AddTopFL();
+            //AddBody
+            AddBodyView();
+
+
+            //bind
+            BindEvent();
+        }
+
+        #endregion
+
+        #region 鈼� 娣诲姞____________________________
+        /// <summary>
+        /// AddTop
+        /// </summary>
+        private void AddTopFL()
+        {
+            var top = new CommonForm.TopFrameLayout();
+            AddChidren(top);
+            top.InitTopview();
+            top.SetTopTitle(Language.StringByID(R.MyInternationalizationString.Register));
+            top.backButton.MouseUpEventHandler += (sender, e) =>
+            {
+                RemoveFromParent();
+            };
+
+        }
+        /// <summary>
+        /// AddBodyView
+        /// </summary>
+        private void AddBodyView()
+        {
+            bodyFrameLayout = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(184),
+                Height = Application.GetRealHeight(1737),
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
+            };
+            AddChidren(bodyFrameLayout);
+
+            phoneEmailForm = new PhoneEmailForm();
+            phoneEmailForm.Init(bodyFrameLayout, 127);
+            phoneEmailForm.SetSelectedColor(ZigbeeColor.Current.GXCButtonBlackSelectedColor);
+
+            accountCodeFL = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(334),
+                Height = Application.GetRealHeight(852),
+                Width = Application.GetRealWidth(942),
+                Gravity = Gravity.CenterHorizontal,
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(30)
+            };
+            bodyFrameLayout.AddChidren(accountCodeFL);
+
+            AddPhoneOrEmailFL(accountCodeFL, "Phone");
+
+            //閿欒鎻愮ずBtn
+            errorBtn = new Button()
+            {
+                X = Application.GetRealWidth(127),
+                Y = Application.GetRealHeight(1060),
+                Width = Application.GetRealWidth(700),
+                Height = Application.GetRealHeight(58),
+                TextColor = ZigbeeColor.Current.GXCTextRed,
+                TextAlignment = TextAlignment.CenterLeft,
+            };
+            bodyFrameLayout.AddChidren(errorBtn);
+
+            registerBtn = new Button()
+            {
+                Y = Application.GetRealHeight(1281),
+                Width = Application.GetRealWidth(688),
+                Height = Application.GetRealHeight(127),
+                Gravity = Gravity.CenterHorizontal,
+                TextID = R.MyInternationalizationString.Register,
+                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)
+            };
+            bodyFrameLayout.AddChidren(registerBtn);
+
+            loginByAccountPWDBtn = new Button()
+            {
+                Y = registerBtn.Bottom + Application.GetRealHeight(50),
+                Width = Application.GetRealWidth(400),
+                Height = Application.GetRealHeight(58),
+                TextID = R.MyInternationalizationString.LoginByAccountPWD,
+                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+                TextSize = CommonFormResouce.loginTextSize,
+                Gravity=Gravity.CenterHorizontal
+            };
+            bodyFrameLayout.AddChidren(loginByAccountPWDBtn);
+
+        }
+
+        #endregion
+
+        #region 鈼� 閫夋嫨浜嬩欢_________________________
+        /// <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;
+            registerBtn.Enable = registerBtn.IsSelected = false;
+            (sender as Button).IsSelected = 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();
+
+            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;
+            }
+            pwdRow = new PwdRowForm();
+            pwdRow.Init(accountCodeFrameLayout, 29, 196);
+            //pwdRow.PasswrodET.TextChangeEventHandler += Account_TextChange;
+
+            pwdComfireRow = new PwdRowForm();
+            pwdComfireRow.Init(accountCodeFrameLayout, 29, 363);
+            //pwdComfireRow.PasswrodET.TextChangeEventHandler += Account_TextChange;
+            pwdComfireRow.SetPlaceholdText(Language.StringByID(R.MyInternationalizationString.PleaseComfirePWD));
+
+            codeRow = new CodeForRegisterRowForm();
+            codeRow.Init(accountCodeFrameLayout, 29, 530);
+            codeRow.VerificationCodeET.TextChangeEventHandler += Code_TextChange;
+            codeRow.SendCodeBtn.MouseUpEventHandler += SendCode_MouseUpEventAsync;
+        }
+        #endregion
+
+        #region 鈼� 缁戝畾浜嬩欢_________________________
+
+        /// <summary>
+        /// 缁戝畾鎸夐挳浜嬩欢
+        /// </summary>
+        private void BindEvent()
+        {
+            //閫夋嫨鎵嬫満閭
+            phoneEmailForm.SelectedPhone.MouseUpEventHandler += SelectPhoneOrEmail_MouseUpEvent;
+            phoneEmailForm.SelectedEmail.MouseUpEventHandler += SelectPhoneOrEmail_MouseUpEvent;
+            registerBtn.MouseUpEventHandler += Register;
+            loginByAccountPWDBtn.MouseUpEventHandler += LoginByPWD;
+        }
+        #endregion
+
+        #region 鈼� 娉ㄥ唽浜嬩欢_________________________
+        //// <summary>
+        ///  娉ㄥ唽
+        ///  </summary>
+        /// <param name="sender">Sender.</param>
+        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
+        private async void Register(object sender, MouseEventArgs mouseEventArgs)
+        {
+            CommonPage.Loading.Start();
+            try
+            {
+                var reqDto = new SendDataToServer.RegisterAccountObj()
+                {
+                    Account = account,
+                    Password = pwdRow.PasswrodET.Text.Trim(),
+                    EnterPassword = pwdComfireRow.PasswrodET.Text.Trim(),
+                    Language = CommonPage.ZigBeeLanguage,
+                    Code = codeRow.VerificationCodeET.Text.Trim(),
+                    RegisterSoruce = CommonPage.RegisterSoruceFromZIGBEE,
+                    AreaCode = int.Parse(CommonPage.PhoneZoneStr)
+                };
+                //楠岃瘉楠岃瘉鐮�
+                var requestRevertObj = await CommonFormResouce.Register(reqDto);
+                if (requestRevertObj == null)
+                {
+                    CommonPage.Instance.FailureToServer();
+                    return;
+                }
+                var stateCodeStr = requestRevertObj.StateCode.ToUpper();
+                if (stateCodeStr == "SUCCESS")
+                {
+                    var registerSuccess = new Account.AccountRegisterSuccess();
+                    CommonPage.Instance.AddChidren(registerSuccess);
+                    registerSuccess.Show(account, pwdRow.PasswrodET.Text.Trim());
+                }
+                else if (stateCodeStr == "EXIST")
+                {
+                    //宸叉敞鍐�
+                    errorBtn.TextID = R.MyInternationalizationString.AccountHasBeenRegistered;
+                }
+                else if (stateCodeStr == "PARAMETEROREMPTY")
+                {
+                    //鎻愪緵鐨勫弬鏁伴敊璇�
+                    errorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
+                }
+                else if (stateCodeStr == "PWDNOCONFIRM")
+                {
+                    //涓ゆ瀵嗙爜涓嶄竴鏍�
+                    errorBtn.TextID = R.MyInternationalizationString.TwoPasswordInconsistency;
+                }
+                else if (stateCodeStr == "VALIDCODEANDPHONENOEQUAL")
+                {
+                    //楠岃瘉鐮侀敊璇�
+                    errorBtn.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL;
+                }
+                else
+                {
+                    errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
+                }
+            }
+            catch
+            {
+                errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
+            }
+            finally
+            {
+                CommonPage.Loading.Hide();
+            }
+        }
+
+        #endregion
+
+        #region 鈼� 瀵嗙爜鐧诲綍_________________________
+        /// <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();
+        }
+
+        #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)
+        {
+            errorBtn.Text = "";
+            if ((sender as EditText).Text.Trim().Length > 0)
+            {
+                //IsRightAccount = true;
+                codeRow.SendCodeBtn.Enable = codeRow.SendCodeBtn.IsSelected = true;
+            }
+            else
+            {
+                //IsRightAccount = false;
+                codeRow.SendCodeBtn.Enable = codeRow.SendCodeBtn.IsSelected = false;
+            }
+            account = (sender as EditText).Text.Trim();
+        }
+
+        /// <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)
+        {
+            errorBtn.Text = "";
+            if ((sender as EditText).Text.Trim().Length > 0)
+            {
+                registerBtn.Enable = registerBtn.IsSelected = true;
+            }
+            else
+            {
+                registerBtn.Enable = registerBtn.IsSelected = false;
+            }
+        }
+
+        #endregion
+
+        #region 鈼� 鍙戦�侀獙璇佺爜________________________
+        /// <summary>
+        /// 鍙戦�侀獙璇佺爜
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="mouseEventArgs"></param>
+        private async void SendCode_MouseUpEventAsync(object sender, MouseEventArgs mouseEventArgs)
+        {
+            (sender as Button).Enable = (sender as Button).IsSelected = false;
+            //鍏堝垽鏂�2娆″瘑鐮佽緭鍏ユ槸鍚︿竴鑷�
+            if (pwdRow.PasswrodET.Text.Trim() != pwdComfireRow.PasswrodET.Text.Trim())
+            { 
+                var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.TwoPasswordInconsistency), Language.StringByID(R.MyInternationalizationString.Confrim));
+                alert.Show();
+                codeRow.SendCodeBtn.Enable = codeRow.SendCodeBtn.IsSelected = false;
+                return;
+            }
+            CommonPage.Loading.Start();
+            (sender as Button).Enable = (sender as Button).IsSelected = false;
+            try
+            {
+                int companyInt = 0;
+                if (CommonPage.PhoneZoneStr == "86")
+                {
+                    companyInt = CommonPage.Company;
+                }
+                else
+                {
+                    companyInt = CommonPage.CompanyForINTERNETION;
+                }
+                var reqDto = new SendDataToServer.RegisterSendVerCodeObj()
+                {
+                    Account = account,
+                    Company = companyInt,
+                    AreaCode = int.Parse(CommonPage.PhoneZoneStr),
+                    Language = CommonPage.ZigBeeLanguage
+                };
+                var requestRevertObj = await CommonFormResouce.RegisterSendVerCode(reqDto);
+                if (requestRevertObj == null)
+                {
+                    CommonPage.Instance.FailureToServer();
+                    return;
+                }
+                var stateCodeStr = requestRevertObj.StateCode.ToUpper();
+                if (stateCodeStr == "SUCCESS")
+                {
+                    codeRow.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")
+                {
+                    //鎻愪緵鐨勫弬鏁伴敊璇�
+                    errorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
+                    (sender as Button).Enable = (sender as Button).IsSelected = true;
+                }
+                else if (stateCodeStr == "SENDFAIL")
+                {
+                    //楠岃瘉鐮佸彂閫佸け璐�
+                    errorBtn.TextID = R.MyInternationalizationString.SENDFAIL;
+                    (sender as Button).Enable = (sender as Button).IsSelected = true;
+                }
+                else if (stateCodeStr == "EXIST")
+                {
+                    //璐﹀彿瀛樺湪
+                    errorBtn.TextID = R.MyInternationalizationString.AccountHasBeenRegistered;
+                    (sender as Button).Enable = (sender as Button).IsSelected = true;
+                }
+                else
+                {
+                    errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
+                    (sender as Button).Enable = (sender as Button).IsSelected = true;
+                }
+            }
+            catch
+            {
+                errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
+                (sender as Button).Enable = (sender as Button).IsSelected = true;
+            }
+            finally
+            {
+                CommonPage.Loading.Hide();
+            }
+        }
+        #endregion
+    }
+}
\ No newline at end of file
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountRegisterSuccess.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountRegisterSuccess.cs
new file mode 100755
index 0000000..d94509b
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountRegisterSuccess.cs
@@ -0,0 +1,161 @@
+锘縰sing System;
+using Shared.Common;
+using Shared.Phone.UserView;
+
+namespace Shared.Phone.Device.Account
+{
+    public class AccountRegisterSuccess : FrameLayout
+    {
+        /// <summary>
+        /// registerSuccess
+        /// </summary>
+        /// <param name="account"></param>
+        /// <param name="password"></param>
+        public void Show(string account, string password)
+        {
+            var dialog = new FrameLayout()
+            {
+                BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
+            };
+            AddChidren(dialog);
+
+            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);
+        }
+
+        /// <summary>
+        /// AutoLogin
+        /// </summary>
+        /// <param name="account"></param>
+        /// <param name="password"></param>
+        private void AutoLogin(string account, string password)
+        {
+            new System.Threading.Thread(() =>
+            {
+                System.Threading.Thread.Sleep(1500);
+                Application.RunOnMainThread(() =>
+                {
+                    try
+                    {
+                        UserPage.Instance.Fresh();
+                        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 () =>
+                                {
+                                    ZigBee.Common.Application.Init();
+
+                                    //鐧诲綍鎴愬姛
+                                    var homes = await House.GetHomeLists();
+
+                                    //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
+                                    await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
+
+                                    Shared.Common.Room.CanInitAllRoom = true;
+                                    Shared.Common.Room.InitAllRoom();
+
+                                    Application.RunOnMainThread(() =>
+                                    {
+                                        UserPage.Instance.Fresh();
+                                        CommonPage.Loading.Hide();
+                                    });
+                                })
+                                { IsBackground = true }.Start();
+
+                            }
+                            else
+                            {
+                                //鏈櫥褰曟垚鍔熷脊鍑虹櫥褰曠晫闈� 鍚屾椂闇�瑕佹爣璁颁负鏈櫥褰曠姸鎬�
+                                Config.Instance.LoginDateTime = new DateTime(1970, 1, 1);
+                                Config.Instance.Save();
+                                var login = new Device.Account.AccountLogin { };
+                                CommonPage.Instance.AddChidren(login);
+                                login.Show(account, password);
+                            }
+                        };
+                        action();
+                    }
+                    catch (Exception ex)
+                    {
+                        var errMsg = ex.Message;
+                    }
+                    finally
+                    {
+                        CommonPage.Loading.Hide();
+                        this.RemoveFromParent();
+                        CommonPage.Instance.RemoveViewByTag("Register");
+                        CommonPage.Instance.RemoveViewByTag("Login");
+                    }
+                });
+            })
+            { IsBackground = true }.Start();
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountResetPWDSuccess.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountResetPWDSuccess.cs
new file mode 100755
index 0000000..621f3af
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountResetPWDSuccess.cs
@@ -0,0 +1,105 @@
+锘縰sing System;
+using Shared.Common;
+
+namespace Shared.Phone.Device.Account
+{
+    public class AccountResetPWDSuccess : FrameLayout
+    {
+        public AccountResetPWDSuccess()
+        {
+            Tag = "Forgot";
+        }
+        /// <summary>
+        /// Show
+        /// </summary>
+        public void Show()
+        {
+            var dialog = new FrameLayout()
+            {
+                BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
+            };
+            AddChidren(dialog);
+
+            var blackBG = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(576),
+                Width = Application.GetRealWidth(827),
+                Height = Application.GetRealHeight(904),
+                Gravity = Gravity.CenterHorizontal,
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                Radius=(uint)Application.GetRealHeight(20)
+            };
+            AddChidren(blackBG);
+
+            var sucBtn = new Button()
+            {
+                Y = Application.GetRealHeight(657),
+                Width = Application.GetMinReal(346),
+                Height = Application.GetMinReal(346),
+                Gravity = Gravity.CenterHorizontal,
+                UnSelectedImagePath = "Account/ChangeSuccess.png"
+            };
+            AddChidren(sucBtn);
+
+            var tipBtn = new Button()
+            {
+                Y = sucBtn.Bottom+Application.GetRealHeight(35),
+                Width = Application.GetRealWidth(500),
+                Height = Application.GetRealHeight(80),
+                Gravity = Gravity.CenterHorizontal,
+                TextID = R.MyInternationalizationString.ResetSuccess,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                TextSize = 16
+            };
+            AddChidren(tipBtn);
+
+            var tip = new Button()
+            {
+                Y = tipBtn.Bottom+ Application.GetRealHeight(15),
+                Width = Application.GetRealWidth(700),
+                Height = Application.GetRealHeight(80),
+                Gravity = Gravity.CenterHorizontal,
+                TextID = R.MyInternationalizationString.ResetScucessPleaseLogin,
+                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+                TextSize = 14,
+            };
+            AddChidren(tip);
+
+            var loginBtn = new Button()
+            {
+                Y = Application.GetRealHeight(1284),
+                Width = Application.GetRealWidth(688),
+                Height = Application.GetRealHeight(127),
+                Gravity = Gravity.CenterHorizontal,
+                TextID = R.MyInternationalizationString.Login,
+                TextSize = 15,
+                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+                SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor,
+                BackgroundColor = ZigbeeColor.Current.GXCButtonUnSelectedColor,
+                Radius = (uint)Application.GetRealHeight(127 / 2),
+                IsSelected = true
+            };
+            AddChidren(loginBtn);
+
+            loginBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                try
+                {
+                    CommonPage.Instance.RemoveViewByTag("Forgot");
+                    CommonPage.Instance.RemoveViewByTag("Login");
+                }
+                catch
+                {
+
+                }
+                finally
+                {
+                    var login = new AccountLogin();
+                    CommonPage.Instance.AddChidren(login);
+                    login.Show();
+                }
+            };
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/ForgotPasswordByEmail.cs b/ZigbeeApp/Shared/Phone/Device/Account/ForgotPasswordByEmail.cs
deleted file mode 100755
index 6c8e5d7..0000000
--- a/ZigbeeApp/Shared/Phone/Device/Account/ForgotPasswordByEmail.cs
+++ /dev/null
@@ -1,389 +0,0 @@
-锘縰sing System;
-using Shared.Common;
-using System.Timers;
-using System.Text.RegularExpressions;
-
-namespace Shared.Phone.Device.Account
-{
-    public class ForgotPasswordByEmail:FrameLayout
-    {
-        public ForgotPasswordByEmail()
-        {
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
-            Tag = "Forgot";
-        }
-        public void Show()
-        {
-            ShowForgotPWD();
-        }
-        void ShowForgotPWD()
-        {
-            var t = new Timer();
-            var dateBegin = new DateTime();
-
-            #region --topview--
-            var topBGView = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(220),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
-            };
-            AddChidren(topBGView);
-            var topView = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
-                Height = Application.GetRealHeight(220 - CommonPage.NavigationTitle_Y),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-            };
-            AddChidren(topView);
-
-            var titleName = new Button()
-            {
-                TextAlignment = TextAlignment.Center,
-                TextID = R.MyInternationalizationString.ForgotPassword,
-                TextSize = 19,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Width=Application.GetRealWidth(600),
-                Gravity=Gravity.CenterHorizontal
-            };
-            topView.AddChidren(titleName);
-
-            var back = new Button()
-            {
-                X = Application.GetRealWidth(CommonPage.Navigation_X),
-                Height = Application.GetMinRealAverage(110),
-                Width = Application.GetMinRealAverage(110),
-                UnSelectedImagePath = "Item/Back.png",
-                SelectedImagePath = "Item/BackSelected.png",
-                Gravity = Gravity.CenterVertical
-            };
-            topView.AddChidren(back);
-
-            back.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-                var login = new AccountLogin();
-                Shared.Common.CommonPage.Instance.AddChidren(login);
-                login.Show();
-            };
-            #endregion
-
-            #region --midFL--
-            var midFL = new FrameLayout()
-            {
-                Y = topView.Bottom,
-                Height = Application.GetRealHeight(1920 - 220),
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-            };
-            AddChidren(midFL);
-
-            var accountTIPS = new Button()
-            {
-                Width = Application.GetRealWidth(1080 - CommonPage.XLeft * 2),
-                Height = Application.GetRealHeight(100),
-                TextAlignment = TextAlignment.CenterLeft,
-                Gravity = Gravity.CenterHorizontal,
-                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextID = R.MyInternationalizationString.PleaseInputTheEmailAndYouWillHaveVerificatoinCode
-            };
-            midFL.AddChidren(accountTIPS);
-
-            var accountFL = new FrameLayout()
-            {
-                Y = accountTIPS.Bottom + Application.GetRealHeight(100),
-                Height = Application.GetRealHeight(100)
-            };
-            midFL.AddChidren(accountFL);
-
-            var accountET = new EditText()
-            {
-                X = Application.GetRealWidth(CommonPage.XLeft),
-                Width = Application.GetRealWidth(800),
-                Height = Application.GetRealHeight(100)-1,
-                Gravity=Gravity.CenterVertical,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputEmail),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor
-            };
-            accountFL.AddChidren(accountET);
-
-            var accountLine = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(100)-1,
-                Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            accountFL.AddChidren(accountLine);
-
-            var verificationCodeFL = new FrameLayout()
-            {
-                Y = accountFL.Bottom + Application.GetRealHeight(100),
-                Height = Application.GetRealHeight(100)
-            };
-            midFL.AddChidren(verificationCodeFL);
-
-            var verificationCodeET = new EditText()
-            {
-                X = Application.GetRealWidth(CommonPage.XLeft),
-                Width = Application.GetRealWidth(500),
-                Height = Application.GetRealHeight(100) - 1,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputVerificationCode),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor
-            };
-            verificationCodeFL.AddChidren(verificationCodeET);
-
-            var verificationCodeLine = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(100) - 1,
-                Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            verificationCodeFL.AddChidren(verificationCodeLine);
-
-            var sendCodeBtn = new Button()
-            {
-                X = Application.GetRealWidth(1080 - 400 - CommonPage.XLeft),
-                Width = Application.GetRealWidth(400),
-                Y = Application.GetRealHeight(100) + verificationCodeFL.Bottom,
-                Height = Application.GetRealHeight(100),
-                TextID = R.MyInternationalizationString.SendVerificationCode,
-                TextColor = ZigbeeColor.Current.GXCButtonUnselectedColor,
-                SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                TextAlignment = TextAlignment.CenterRight,
-                Enable = false,
-                IsSelected = false,
-            };
-            midFL.AddChidren(sendCodeBtn);
-
-            var resetPWDBtn = new Button()
-            {
-                Width = Application.GetRealWidth(700),
-                Y = Application.GetRealHeight(1920 - 220 - 400),
-                Height = Application.GetRealHeight(110),
-                Radius = (uint)Application.GetRealHeight(55),
-                TextID = R.MyInternationalizationString.ResetPWD,
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                TextAlignment = TextAlignment.Center,
-                TextSize = 15,
-                BackgroundColor = ZigbeeColor.Current.GXCButtonUnselectedColor,
-                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                Gravity = Gravity.CenterHorizontal,
-                Enable = false,
-                IsSelected = false
-            };
-            midFL.AddChidren(resetPWDBtn);
-            //閿欒鎻愮ずBtn
-            var loginErrorBtn = new Button()
-            {
-                Y = resetPWDBtn.Bottom + Application.GetRealHeight(50),
-                Width = Application.GetRealWidth(1080 - 100),
-                Height = Application.GetRealHeight(110),
-                TextColor = ZigbeeColor.Current.GXCRedColor,
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFL.AddChidren(loginErrorBtn);
-            #endregion
-
-            #region --event--
-            accountET.TextChangeEventHandler += (sender, e) =>
-            {
-                loginErrorBtn.Text = "";
-                if (accountET.Text.Trim().Length>0)
-                {
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = true;
-                }
-                else
-                {
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                }
-            };
-            verificationCodeET.TextChangeEventHandler += (sender, e) =>
-            {
-                loginErrorBtn.Text = "";
-                if (verificationCodeET.Text.Trim().Length > 0)
-                {
-                    resetPWDBtn.Enable = resetPWDBtn.IsSelected = true;
-                }
-                else
-                {
-                    resetPWDBtn.Enable = resetPWDBtn.IsSelected = false;
-                }
-            };
-
-            sendCodeBtn.MouseUpEventHandler += async (sender, e) =>
-            {
-                var reg = new Regex(CommonPage.EmailRegexStr);
-                var ss = reg.Match(accountET.Text.Trim());
-                //鏍¢獙閭
-                if (!ss.Success)
-                {
-                    var aler = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.PleaseInputTheCorrectEmail), Language.StringByID(R.MyInternationalizationString.Confrim));
-                    aler.Show();
-                    accountET.Text = "";
-                }
-                else
-                {
-                    string phoneNum = accountET.Text.Trim();
-                    CommonPage.Loading.Start();
-                    try
-                    {
-                        var reqDtoSignPhone = new SendDataToServer.LoginSendVerCodeObj()
-                        {
-                            Account = phoneNum,
-                            Company = 0,
-                            AreaCode = 0,
-                            Language = CommonPage.ZigBeeLanguage
-                        };
-                        var requesetJson = Newtonsoft.Json.JsonConvert.SerializeObject(reqDtoSignPhone);
-                        var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/LoginSendVerCode", System.Text.Encoding.UTF8.GetBytes(requesetJson));
-                        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;
-                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.PARAMETEROREMPTY);
-                        }
-                        else if (stateCodeStr == "ACCOUNTNOEXISTS")
-                        {
-                            //璐﹀彿涓嶅瓨鍦�
-                            loginErrorBtn.TextID = R.MyInternationalizationString.ACCOUNTNOEXISTS;
-                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.ACCOUNTNOEXISTS);
-                        }
-                        else
-                        {
-                            loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.RequestServerFailed);
-                        }
-                    }
-                    catch
-                    {
-                        loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                    }
-                    finally
-                    {
-                        CommonPage.Loading.Hide();
-                    }
-                }
-            };
-
-            resetPWDBtn.MouseUpEventHandler += async (sender, e) =>
-            {
-                var vCode = verificationCodeET.Text.Trim();
-                var vPhone = accountET.Text.Trim();
-                CommonPage.Loading.Start();
-                try
-                {
-                    var reqDto = new SendDataToServer.ValidatorCodeObj()
-                    {
-                        Account = vPhone,
-                        Code = int.Parse(vCode),
-                        AreaCode = 0,
-                        Language = CommonPage.ZigBeeLanguage
-                    };
-                    var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(reqDto);
-                    //楠岃瘉楠岃瘉鐮�
-                    var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ValidatorCode", System.Text.Encoding.UTF8.GetBytes(requestJson));
-                    if (requestRevertObj == null)
-                    {
-                        CommonPage.Instance.FailureToServer();
-                        return;
-                    }
-                    var stateCodeStr = requestRevertObj.StateCode.ToUpper();
-                    if (stateCodeStr == "SUCCESS")
-                    {
-                        ModifyPWD(vPhone);
-                    }
-                    else if (stateCodeStr == "VALIDCODEANDPHONENOEQUAL")
-                    {
-                        //楠岃瘉鐮侀敊璇�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL);
-                    }
-                    else if (stateCodeStr == "SENDFAIL")
-                    {
-                        //楠岃瘉鐮佸彂閫佸け璐�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.SENDFAIL;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.SENDFAIL);
-                    }
-                    else if (stateCodeStr == "ACCOUNTNOEXISTS")
-                    {
-                        //璐﹀彿涓嶅瓨鍦�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.ACCOUNTNOEXISTS;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.ACCOUNTNOEXISTS);
-                    }
-                    else if (stateCodeStr == "PARAMETEROREMPTY")
-                    {
-                        //鎻愪緵鐨勫弬鏁伴敊璇�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.PARAMETEROREMPTY);
-                    }
-                    else
-                    {
-                        loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.RequestServerFailed);
-                    }
-                }
-                catch
-                {
-                    loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                }
-                finally
-                {
-                    CommonPage.Loading.Hide();
-                }
-            };
-            void ModifyPWD(string account)
-            {
-                var newPWD = new ForgotPasswordSetNewPWD();
-                AddChidren(newPWD);
-                newPWD.Show(account,"email");
-            }
-            void TimeBegin()
-            {
-                t.Interval = 1000;
-                t.AutoReset = true;
-                t.Enabled = true;
-                t.Elapsed += new ElapsedEventHandler(TimeOut);
-                //鍚姩璁℃椂鍣ㄥ�掕鏃�-60s
-                t.Start();
-                dateBegin = DateTime.Now;
-            }
-            void TimeOut(object source, System.Timers.ElapsedEventArgs e)
-            {
-                var span = DateTime.Now - dateBegin;
-                if (span.TotalSeconds <= 61)
-                {
-                    Application.RunOnMainThread(() =>
-                    {
-                        sendCodeBtn.Text = Convert.ToInt16((60 - span.TotalSeconds)) + "s" + Language.StringByID(R.MyInternationalizationString.SendVerificationCode);
-                        sendCodeBtn.Enable = false;
-                    });
-                }
-                else
-                {
-                    Application.RunOnMainThread(() =>
-                    {
-                        sendCodeBtn.Enable = true;
-                        sendCodeBtn.TextID = R.MyInternationalizationString.SendVerificationCode;
-                        t.Stop();
-                        t.Close();
-                    });
-                }
-            }
-            #endregion
-        }
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/ForgotPasswordByPhone.cs b/ZigbeeApp/Shared/Phone/Device/Account/ForgotPasswordByPhone.cs
deleted file mode 100755
index a2f72e5..0000000
--- a/ZigbeeApp/Shared/Phone/Device/Account/ForgotPasswordByPhone.cs
+++ /dev/null
@@ -1,638 +0,0 @@
-锘縰sing System;
-using Shared.Common;
-using System.Collections.Generic;
-using System.Timers;
-using System.Text.RegularExpressions;
-
-namespace Shared.Phone.Device.Account
-{
-    public class ForgotPasswordByPhone:FrameLayout
-    {
-        public string phoneStr = "";
-        /// <summary>
-        /// 鎵嬫満鍙疯緭鍏ユ槸鍚︾鍚堣鍒�
-        /// </summary>
-        public bool IsRightAccount = false;
-        /// <summary>
-        /// 涓嬫潵閫夋嫨鎵嬫満鍖哄彿 榛樿涓浗澶ч檰涓�86
-        ///鍙戦�佸浗闄� / 娓境鍙版秷鎭椂锛屾帴鏀跺彿鐮佹牸寮忎负00 + 鍥介檯鍖哄彿 + 鍙风爜锛屽鈥�008615899998888鈥�   璋冪敤API鏃讹紝Company瀛楁璇蜂紶鍏ユ暣鍨嬪�硷細4銆� 銆�
-        ///鍥藉唴  璋冪敤API鏃讹紝Company瀛楁璇蜂紶鍏ユ暣鍨嬪�硷細0銆�
-        /// </summary>
-        public  List<Common.ResponseEntity.AreaCodeOBJ> areaCodeList = new List<Common.ResponseEntity.AreaCodeOBJ>();
-        public ForgotPasswordByPhone()
-        {
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
-            Tag = "Forgot";
-        }
-        public async void Show()
-        {
-            ShowForgotPWD();
-            CommonPage.Loading.Start();
-            try
-            {
-                var requestOBJ = new SendDataToServer.GetAreaCodeOBJ()
-                {
-                    RequestVersion = CommonPage.RequestVersion
-                };
-                var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestOBJ);
-                var revertOBJ = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/GetAreaCode", System.Text.Encoding.UTF8.GetBytes(requestJson));
-                if (revertOBJ == null)
-                {
-                    return;
-                }
-                if (revertOBJ.StateCode.ToUpper() == "SUCCESS")
-                {
-                    var responseData = revertOBJ.ResponseData;
-                    areaCodeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Common.ResponseEntity.AreaCodeOBJ>>(responseData.ToString());
-                }
-            }
-            catch { }
-            finally
-            {
-                CommonPage.Loading.Hide();
-            }
-        }
-
-        void ShowForgotPWD()
-        {
-            var t = new Timer();
-            var dateBegin = new DateTime();
-
-            #region --topview--
-            var topBGView = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(220),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
-            };
-            AddChidren(topBGView);
-            var topView = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
-                Height = Application.GetRealHeight(220 - CommonPage.NavigationTitle_Y),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-            };
-            AddChidren(topView);
-            var titleName = new Button()
-            {
-                TextAlignment = TextAlignment.Center,
-                TextID = R.MyInternationalizationString.ForgotPassword,
-                TextSize = 19,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Width=Application.GetRealWidth(600),
-                Gravity=Gravity.CenterHorizontal
-            };
-            topView.AddChidren(titleName);
-            var back = new Button()
-            {
-                X = Application.GetRealWidth(CommonPage.Navigation_X),
-                Height = Application.GetMinRealAverage(110),
-                Width = Application.GetMinRealAverage(110),
-                UnSelectedImagePath = "Item/Back.png",
-                SelectedImagePath = "Item/BackSelected.png",
-                Gravity = Gravity.CenterVertical
-            };
-            topView.AddChidren(back);
-            back.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-                var login = new AccountLogin();
-                Shared.Common.CommonPage.Instance.AddChidren(login);
-                login.Show();
-            };
-            #endregion
-
-            #region --midFL--
-            var midFL = new FrameLayout()
-            {
-                Y = topView.Bottom,
-                Height = Application.GetRealHeight(1920 - 220),
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-            };
-            AddChidren(midFL);
-
-            var accountTIPS = new Button()
-            {
-                Width = Application.GetRealWidth(1080 - CommonPage.XLeft*2),
-                Height = Application.GetRealHeight(100),
-                TextAlignment = TextAlignment.CenterLeft,
-                Gravity=Gravity.CenterHorizontal,
-                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextID = R.MyInternationalizationString.PleaseInputThePhoneAndYouWillHaveVerificationCode
-            };
-            midFL.AddChidren(accountTIPS);
-
-            var accountFL = new FrameLayout()
-            {
-                Y = accountTIPS.Bottom + Application.GetRealHeight(100),
-                Height = Application.GetRealHeight(100)
-            };
-            midFL.AddChidren(accountFL);
-            var accountZoneBtn = new Button()
-            {
-                Height = Application.GetRealHeight(100)-1,
-                Width = Application.GetRealWidth(200),
-                X = Application.GetRealWidth(CommonPage.XLeft),
-                Text = "+" + CommonPage.PhoneZoneStr,
-                TextAlignment = TextAlignment.Center,
-                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor
-            };
-            accountFL.AddChidren(accountZoneBtn);
-
-            var accountZoneLine = new Button()
-            {
-                X = Application.GetRealWidth(10) + accountZoneBtn.Right,
-                Width = 1,
-                Height = Application.GetRealHeight(50),
-                Gravity=Gravity.CenterVertical,
-                BackgroundColor = ZigbeeColor.Current.GXCTextBlackColor
-            };
-            accountFL.AddChidren(accountZoneLine);
-
-            var accountET = new EditText()
-            {
-                X = Application.GetRealWidth(50) + accountZoneLine.Right,
-                Width = Application.GetRealWidth(1080 - 100) - accountZoneLine.X,
-                Height = Application.GetRealHeight(100)-1,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPhoneNum),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor
-            };
-            accountFL.AddChidren(accountET);
-
-            var accountLine = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(100)-1,
-                Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            accountFL.AddChidren(accountLine);
-
-            var verificationCodeFL = new FrameLayout()
-            {
-                Y = accountFL.Bottom + Application.GetRealHeight(100),
-                Height = Application.GetRealHeight(100)
-            };
-            midFL.AddChidren(verificationCodeFL);
-
-            var verificationCodeET = new EditText()
-            {
-                X = Application.GetRealWidth(CommonPage.XLeft),
-                Width = Application.GetRealWidth(500),
-                Height = Application.GetRealHeight(100)-1,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputVerificationCode),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor
-            };
-            verificationCodeFL.AddChidren(verificationCodeET);
-
-            var verificationCodeLine = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(100)-1,
-                Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            verificationCodeFL.AddChidren(verificationCodeLine);
-
-            var sendCodeBtn = new Button()
-            {
-                X = Application.GetRealWidth(1080 - 400-CommonPage.XLeft),
-                Width = Application.GetRealWidth(400),
-                Y = Application.GetRealHeight(100) + verificationCodeFL.Bottom,
-                Height = Application.GetRealHeight(100),
-                TextID = R.MyInternationalizationString.SendVerificationCode,
-                TextColor = ZigbeeColor.Current.GXCButtonUnselectedColor,
-                SelectedTextColor=ZigbeeColor.Current.GXCTextBlueColor,
-                TextAlignment = TextAlignment.CenterRight,
-                Enable=false,
-                IsSelected=false,
-            };
-            midFL.AddChidren(sendCodeBtn);
-
-            var resetPWDBtn = new Button()
-            {
-                Width = Application.GetRealWidth(700),
-                Y = Application.GetRealHeight(1920-220 - 400),
-                Height = Application.GetRealHeight(110),
-                Radius = (uint)Application.GetRealHeight(55),
-                TextID = R.MyInternationalizationString.ResetPWD,
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                TextAlignment = TextAlignment.Center,
-                TextSize = 15,
-                BackgroundColor = ZigbeeColor.Current.GXCButtonUnselectedColor,
-                SelectedBackgroundColor=ZigbeeColor.Current.GXCButtonBlueColor,
-                Gravity = Gravity.CenterHorizontal,
-                Enable=false,
-                IsSelected=false
-            };
-            midFL.AddChidren(resetPWDBtn);
-
-            //閿欒鎻愮ずBtn
-            var loginErrorBtn = new Button()
-            {
-                Y = resetPWDBtn.Bottom + Application.GetRealHeight(50),
-                Width = Application.GetRealWidth(1080 - 100),
-                Height = Application.GetRealHeight(110),
-                TextColor = ZigbeeColor.Current.GXCRedColor,
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFL.AddChidren(loginErrorBtn);
-            #endregion
-
-            #region --event--
-            accountET.TextChangeEventHandler += (sender, e) =>
-            {
-                loginErrorBtn.Text = "";
-                //鏍¢獙鎵嬫満鍙�
-                if (CommonPage.PhoneZoneStr != "86")
-                {
-                    var reg = new Regex(CommonPage.PhoneForForeignRegexStr);
-                    var mFalg = reg.Match(accountET.Text.Trim());
-                    if (!mFalg.Success)
-                    {
-                        var aler = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.PleaseInputTheCorrectCellPhoneNumber), Language.StringByID(R.MyInternationalizationString.Confrim));
-                        aler.Show();
-                        sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                        IsRightAccount = false;
-                        accountET.Text = "";
-                    }
-                    else
-                    {
-                        sendCodeBtn.Enable = sendCodeBtn.IsSelected =  true;
-                        IsRightAccount = true;
-                    }
-                }
-                else
-                {
-                    if (accountET.Text.Trim().Length == 11)
-                    {
-                        var reg = new Regex(CommonPage.PhoneRegexStr);
-                        var mFalg = reg.Match(accountET.Text.Trim());
-                        if (!mFalg.Success)
-                        {
-                            sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                            var aler = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.PleaseInputTheCorrectCellPhoneNumber), Language.StringByID(R.MyInternationalizationString.OK));
-                            aler.Show();
-                            accountET.Text = "";
-                            IsRightAccount = false;
-                        }
-                        else
-                        {
-                            sendCodeBtn.Enable = sendCodeBtn.IsSelected = true;
-                            IsRightAccount = true;
-                        }
-                    }
-                    else if (accountET.Text.Trim().Length > 11)
-                    {
-                        accountET.Text = e.Remove(11);
-                    }
-                    else
-                    {
-                        sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                        IsRightAccount = false;
-                        //姝e垯琛ㄨ揪寮忓垽鏂槸鍚︽暟瀛�
-                        var reg = new Regex("^[0-9]*$");
-                        if (!reg.IsMatch(accountET.Text))
-                        {
-                            var aler = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.PleaseInputTheCorrectCellPhoneNumber), Language.StringByID(R.MyInternationalizationString.Confrim));
-                            aler.Show();
-                            accountET.Text = "";
-                        }
-                    }
-                }
-            };
-            verificationCodeET.TextChangeEventHandler += (sender, e) =>
-            {
-                loginErrorBtn.Text = "";
-                if (verificationCodeET.Text.Trim().Length>0 && IsRightAccount)
-                {
-                    resetPWDBtn.Enable = resetPWDBtn.IsSelected = true;
-                }
-                else
-                {
-                    resetPWDBtn.Enable = resetPWDBtn.IsSelected = false;
-                }
-            };
-
-            Button tempClickZoneImgBtn = new Button();
-            Button tempClickZoneNameBtn = new Button();
-            EventHandler<MouseEventArgs> phoneZoneHandler = (senderZone, eZone) =>
-            {
-                //ZoneListView
-                var phoneZoneSelectedShowView = new Dialog()
-                {
-                    Height = Application.GetRealHeight(1000),
-                    Width = Application.GetRealWidth(700),
-                    BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                    Radius = (uint)Application.GetRealHeight(30)
-                };
-                phoneZoneSelectedShowView.Show();
-
-                var phoneZoneTitle = new Button()
-                {
-                    Height = Application.GetRealHeight(110),
-                    TextID = R.MyInternationalizationString.PleaseSelectAreaCode,
-                    TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                    TextSize = 15,
-                    BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor
-                };
-                phoneZoneSelectedShowView.AddChidren(phoneZoneTitle);
-
-                var phoneZoneSelectedListView = new VerticalScrolViewLayout()
-                {
-                    Y = phoneZoneTitle.Bottom,
-                    Height = Application.GetRealHeight(1000 - 110 * 2),
-                    BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor
-                };
-                phoneZoneSelectedShowView.AddChidren(phoneZoneSelectedListView);
-
-                for (int i = 0; i < areaCodeList.Count; i++)
-                {
-                    var zoneItemLName = areaCodeList[i].Name;
-                    var zoneItemLCode = areaCodeList[i].Code;
-                    var zoneItemFL = new FrameLayout()
-                    {
-                        Width = phoneZoneSelectedListView.Width,
-                        Height = Application.GetRealHeight(110),
-                        Tag = i + 10086
-                    };
-                    phoneZoneSelectedListView.AddChidren(zoneItemFL);
-
-                    var zoneIsSelectedBtn = new Button()
-                    {
-                        Width = Application.GetMinReal(80),
-                        Height = Application.GetMinReal(80),
-                        UnSelectedImagePath = "Account/Check.png",
-                        SelectedImagePath = "Account/CheckSelected.png",
-                        Tag = i + 10086,
-                        Gravity = Gravity.CenterVertical
-                    };
-                    zoneItemFL.AddChidren(zoneIsSelectedBtn);
-
-                    var zoneItemNameBtn = new Button()
-                    {
-                        X = Application.GetRealWidth(20) + zoneIsSelectedBtn.Right,
-                        Width = zoneItemFL.Width - Application.GetRealWidth(100),
-                        Height = Application.GetRealHeight(110) - 1,
-                        Text = zoneItemLName,
-                        TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                        SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                        TextAlignment = TextAlignment.CenterLeft,
-                        Tag = i + 10000
-                    };
-                    zoneItemFL.AddChidren(zoneItemNameBtn);
-
-                    var zoneLine = new Button()
-                    {
-                        Y = zoneItemFL.Height - 1,
-                        Width = zoneItemFL.Width,
-                        Height = 1,
-                        BackgroundColor = ZigbeeColor.Current.GXCPlaceHolderTextColor
-                    };
-                    zoneItemFL.AddChidren(zoneLine);
-
-                    EventHandler<MouseEventArgs> selectedZone = (sender, e) =>
-                    {
-                        tempClickZoneImgBtn.IsSelected = false;
-                        tempClickZoneNameBtn.IsSelected = false;
-                        zoneItemNameBtn.IsSelected = true;
-                        zoneIsSelectedBtn.IsSelected = true;
-                        tempClickZoneImgBtn = zoneIsSelectedBtn;
-                        tempClickZoneNameBtn = zoneItemNameBtn;
-                        CommonPage.PhoneZoneStr = zoneItemLCode;
-                    };
-                    zoneIsSelectedBtn.MouseUpEventHandler += selectedZone;
-                    zoneItemNameBtn.MouseUpEventHandler += selectedZone;
-                    //榛樿
-                    if (zoneItemLCode == CommonPage.PhoneZoneStr)
-                    {
-                        zoneItemNameBtn.IsSelected = true;
-                        zoneIsSelectedBtn.IsSelected = true;
-                        tempClickZoneImgBtn = zoneIsSelectedBtn;
-                        tempClickZoneNameBtn = zoneItemNameBtn;
-                    }
-                }
-                var cancleBtn = new Button()
-                {
-                    Y = phoneZoneSelectedListView.Bottom,
-                    Height = Application.GetRealHeight(110),
-                    Width = Application.GetRealWidth(700 / 2),
-                    BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                    TextID = R.MyInternationalizationString.Cancel,
-                    TextSize = 15
-                };
-                phoneZoneSelectedShowView.AddChidren(cancleBtn);
-                cancleBtn.MouseUpEventHandler += (sender, e) =>
-                {
-                    phoneZoneSelectedShowView.Close();
-                };
-                cancleBtn.MouseDownEventHandler += (sender, e) =>
-                {
-                    cancleBtn.IsSelected = true;
-                };
-
-                var lineCancleOK = new Button()
-                {
-                    X = cancleBtn.Right,
-                    Y = phoneZoneSelectedListView.Bottom,
-                    Height = Application.GetRealHeight(110),
-                    Width = 1,
-                    BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor
-                };
-                phoneZoneSelectedShowView.AddChidren(lineCancleOK);
-
-                var okBtn = new Button()
-                {
-                    X = lineCancleOK.Right + 1,
-                    Y = phoneZoneSelectedListView.Bottom,
-                    Height = Application.GetRealHeight(110),
-                    Width = Application.GetRealWidth(700 / 2) - 1,
-                    BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                    TextID = R.MyInternationalizationString.Confrim,
-                    TextSize = 15
-                };
-                phoneZoneSelectedShowView.AddChidren(okBtn);
-                okBtn.MouseUpEventHandler += (sender, e) =>
-                {
-                    accountZoneBtn.Text = "+" + CommonPage.PhoneZoneStr;
-                    phoneZoneSelectedShowView.Close();
-                };
-                okBtn.MouseDownEventHandler += (sender, e) =>
-                {
-                    okBtn.IsSelected = true;
-                };
-            };
-            accountZoneBtn.MouseUpEventHandler += phoneZoneHandler;
-
-            sendCodeBtn.MouseUpEventHandler += async (sender, e) =>
-            {
-                string phoneNum = accountET.Text.Trim();
-                CommonPage.Loading.Start();
-                try
-                {
-                    int companyInt = 0;
-                    if (CommonPage.PhoneZoneStr == "86")
-                    {
-                        companyInt = CommonPage.Company;
-                        phoneStr = phoneNum;
-                    }
-                    else
-                    {
-                        companyInt = CommonPage.CompanyForINTERNETION;
-                        phoneStr = phoneNum;
-                    }
-                    var reqDtoSignPhone = new SendDataToServer.LoginSendVerCodeObj()
-                    {
-                        Account = phoneStr,
-                        Company = companyInt,
-                        AreaCode = int.Parse(CommonPage.PhoneZoneStr),
-                        Language = CommonPage.ZigBeeLanguage
-                    };
-                    var requesetJson = Newtonsoft.Json.JsonConvert.SerializeObject(reqDtoSignPhone);
-                    var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/LoginSendVerCode", System.Text.Encoding.UTF8.GetBytes(requesetJson));
-                    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;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.PARAMETEROREMPTY);
-                    }
-                    else if (stateCodeStr == "ACCOUNTNOEXISTS")
-                    {
-                        //璐﹀彿涓嶅瓨鍦�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.ACCOUNTNOEXISTS;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.ACCOUNTNOEXISTS);
-                    }
-                    else if(stateCodeStr == "SENDFAIL")
-                    {
-                        //楠岃瘉鐮佸彂閫佸け璐�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.SENDFAIL;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.SENDFAIL);
-                    }
-                    else
-                    {
-                        loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.RequestServerFailed);
-                    }
-                }
-                catch
-                {
-                    loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                }
-                finally
-                {
-                    CommonPage.Loading.Hide();
-                }
-            };
-
-            resetPWDBtn.MouseUpEventHandler += async (sender, e) =>
-             {
-                 var vCode = verificationCodeET.Text.Trim();
-                 var vPhone = accountET.Text.Trim();
-                 CommonPage.Loading.Start();
-                 try
-                 {
-                     var reqDto = new SendDataToServer.ValidatorCodeObj()
-                     {
-                         Account = vPhone,
-                         Code = int.Parse(vCode),
-                         AreaCode = int.Parse(CommonPage.PhoneZoneStr),
-                         Language = CommonPage.ZigBeeLanguage
-                     };
-                     var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(reqDto);
-                    //楠岃瘉楠岃瘉鐮�
-                     var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ValidatorCode", System.Text.Encoding.UTF8.GetBytes(requestJson));
-                     if (requestRevertObj == null)
-                     {
-                         CommonPage.Instance.FailureToServer();
-                         return;
-                     }
-                     var stateCodeStr = requestRevertObj.StateCode.ToUpper();
-                     if (stateCodeStr == "SUCCESS")
-                     {
-                         ModifyPWD(vPhone);
-                     }
-                     else if (stateCodeStr == "PARAMETEROREMPTY")
-                     {
-                         //鎻愪緵鐨勫弬鏁伴敊璇�
-                         loginErrorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
-                         CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.PARAMETEROREMPTY);
-                     }
-                     else if (stateCodeStr == "VALIDCODEANDPHONENOEQUAL")
-                     {
-                         //楠岃瘉鐮侀敊璇�
-                         loginErrorBtn.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL;
-                         CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL);
-                     }
-                     else
-                     {
-                         loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                         CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.RequestServerFailed);
-                     }
-                 }
-                 catch
-                 {
-                     loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                 }
-                 finally
-                 {
-                     CommonPage.Loading.Hide();
-                 }
-             };
-
-            void ModifyPWD(string account)
-            {
-                var newPWD = new ForgotPasswordSetNewPWD();
-                AddChidren(newPWD);
-                newPWD.Show(account,"phone",CommonPage.PhoneZoneStr);
-            }
-
-            void TimeBegin()
-            {
-                t.Interval = 1000;
-                t.AutoReset = true;
-                t.Enabled = true;
-                t.Elapsed += new ElapsedEventHandler(TimeOut);
-                //鍚姩璁℃椂鍣ㄥ�掕鏃�-60s
-                t.Start();
-                dateBegin = DateTime.Now;
-            }
-
-            void TimeOut(object source, System.Timers.ElapsedEventArgs e)
-            {
-                var span = DateTime.Now - dateBegin;
-                if (span.TotalSeconds <= 61)
-                {
-                    Application.RunOnMainThread(() =>
-                    {
-                        sendCodeBtn.Text = Convert.ToInt16((60 - span.TotalSeconds)) + "s" + Language.StringByID(R.MyInternationalizationString.SendVerificationCode);
-                        sendCodeBtn.Enable = false;
-                    });
-                }
-                else
-                {
-                    Application.RunOnMainThread(() =>
-                    {
-                        sendCodeBtn.Enable = true;
-                        sendCodeBtn.TextID = R.MyInternationalizationString.SendVerificationCode;
-                        t.Stop();
-                        t.Close();
-                    });
-                }
-            }
-            #endregion
-        }
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/ForgotPasswordSetNewPWD.cs b/ZigbeeApp/Shared/Phone/Device/Account/ForgotPasswordSetNewPWD.cs
deleted file mode 100755
index eda9a19..0000000
--- a/ZigbeeApp/Shared/Phone/Device/Account/ForgotPasswordSetNewPWD.cs
+++ /dev/null
@@ -1,435 +0,0 @@
-锘縰sing System;
-using Shared.Common;
-using System.Text.RegularExpressions;
-namespace Shared.Phone.Device.Account
-{
-    public class ForgotPasswordSetNewPWD:FrameLayout
-    {
-        public ForgotPasswordSetNewPWD()
-        {
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
-        }
-
-        /// <summary>
-        /// 閲嶇疆瀵嗙爜 areaCode鍦ㄩ偖绠变腑涓嶉渶瑕�
-        /// </summary>
-        /// <param name="account">Account.</param>
-        /// <param name="phoneOrEmail">Phone or email.</param>
-        /// <param name="areaCode">Area code.</param>
-        public void Show(string account ,string phoneOrEmail, string areaCode = "")
-        {
-            ShowSetNewPWD(account,phoneOrEmail,areaCode);
-        }
-        void ShowSetNewPWD(string account, string phoneOrEmail,string areaCode="")
-        {
-            #region --topview--
-            var topBGView = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(220),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
-            };
-            AddChidren(topBGView);
-            var topView = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
-                Height = Application.GetRealHeight(220 - CommonPage.NavigationTitle_Y),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-            };
-            AddChidren(topView);
-
-            var titleName = new Button()
-            {
-                TextAlignment = TextAlignment.Center,
-                TextID = R.MyInternationalizationString.ForgotPassword,
-                TextSize = 19,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Width=Application.GetRealWidth(600),
-                Gravity=Gravity.CenterHorizontal
-            };
-            topView.AddChidren(titleName);
-
-            var back = new Button()
-            {
-                X = Application.GetRealWidth(CommonPage.Navigation_X),
-                Height = Application.GetMinRealAverage(110),
-                Width = Application.GetMinRealAverage(110),
-                UnSelectedImagePath = "Item/Back.png",
-                SelectedImagePath = "Item/BackSelected.png",
-                Gravity = Gravity.CenterVertical
-            };
-            topView.AddChidren(back);
-
-            back.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-            };
-            #endregion
-
-            #region --midFL--
-            var midFL = new FrameLayout()
-            {
-                Y = topView.Bottom,
-                Height = Application.GetRealHeight(1920 - 220),
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-            };
-            AddChidren(midFL);
-
-            var passwordFL = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(100),
-                Height = Application.GetRealHeight(100)
-            };
-            midFL.AddChidren(passwordFL);
-
-            var password = new EditText()
-            {
-                X = Application.GetRealWidth(CommonPage.XLeft),
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(100)-1,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.InputNewPWD),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                SecureTextEntry = true
-            };
-            passwordFL.AddChidren(password);
-            var hidenPWDbtn = new Button()
-            {
-                X = passwordFL.Width - Application.GetRealWidth(CommonPage.XLeft+100),
-                Width = Application.GetMinRealAverage(72),
-                Height = Application.GetMinRealAverage(72),
-                Gravity=Gravity.CenterVertical,
-                UnSelectedImagePath = "Account/HidenPWD.png",
-                SelectedImagePath = "Account/UnHidenPWD.png"
-            };
-            passwordFL.AddChidren(hidenPWDbtn);
-            var accountLine = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(100)-1,
-                Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            passwordFL.AddChidren(accountLine);
-
-            var passwordConfirmFL = new FrameLayout()
-            {
-                Y = passwordFL.Bottom + Application.GetRealHeight(100),
-                Height = Application.GetRealHeight(100)
-            };
-            midFL.AddChidren(passwordConfirmFL);
-
-            var passwordConfirm = new EditText()
-            {
-                X = Application.GetRealWidth(CommonPage.XLeft),
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(100) - 1,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseConfirmNewPassword),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                SecureTextEntry = true
-            };
-            passwordConfirmFL.AddChidren(passwordConfirm);
-            var hidenPWDComfirmbtn = new Button()
-            {
-                X = passwordFL.Width - Application.GetRealWidth(CommonPage.XLeft+100),
-                Width = Application.GetMinRealAverage(72),
-                Height = Application.GetMinRealAverage(72),
-                Gravity = Gravity.CenterVertical,
-                UnSelectedImagePath = "Account/HidenPWD.png",
-                SelectedImagePath = "Account/UnHidenPWD.png"
-            };
-            passwordConfirmFL.AddChidren(hidenPWDComfirmbtn);
-            var passwordConfirmLine = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(100)-1,
-                Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            passwordConfirmFL.AddChidren(passwordConfirmLine);
-
-            var resetPWDBtn = new Button()
-            {
-                Width = Application.GetRealWidth(700),
-                Y = Application.GetRealHeight(1920 - 220 - 400),
-                Height = Application.GetRealHeight(110),
-                Radius = (uint)Application.GetRealHeight(55),
-                TextID = R.MyInternationalizationString.ResetPWD,
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                TextAlignment = TextAlignment.Center,
-                TextSize = 15,
-                BackgroundColor = ZigbeeColor.Current.GXCButtonUnselectedColor,
-                SelectedBackgroundColor=ZigbeeColor.Current.GXCButtonBlueColor,
-                Gravity = Gravity.CenterHorizontal,
-                Enable = false,
-                IsSelected=false
-            };
-            midFL.AddChidren(resetPWDBtn);
-
-            //閿欒鎻愮ずBtn
-            var loginErrorBtn = new Button()
-            {
-                Y = resetPWDBtn.Bottom + Application.GetRealHeight(50),
-                Width = Application.GetRealWidth(1080 - 100),
-                Height = Application.GetRealHeight(110),
-                TextColor = ZigbeeColor.Current.GXCRedColor,
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFL.AddChidren(loginErrorBtn);
-
-            FrameLayout pwdStrengthFL = new FrameLayout()
-            {
-                Y = passwordFL.Bottom + Application.GetRealHeight(10),
-                Height = Application.GetRealHeight(60),
-            };
-
-            #endregion
-
-            #region event
-            FrameLayout addPWDStrengthFL()
-            {
-                passwordConfirmFL.Y = pwdStrengthFL.Bottom;
-
-                var pwdLength = new Button()
-                {
-                    X = Application.GetRealWidth(100),
-                    Height = Application.GetRealHeight(60),
-                    TextID = R.MyInternationalizationString.YourPWDIsTooSample,
-                    TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                    TextAlignment = TextAlignment.CenterLeft,
-                    SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor
-                };
-                pwdStrengthFL.AddChidren(pwdLength);
-                return pwdStrengthFL;
-            };
-            /// <summary>
-            ///瀵嗙爜涓� 鏁板瓧閫掑
-            /// </summary>
-            /// <returns><c>true</c>, if number add was pwded, <c>false</c> otherwise.</returns>
-            /// <param name="pwd">Pwd.</param>
-            bool pwdNumAdd(string pwd)
-            {
-                if (pwd.Length < 6) return true;
-                for (int i = 1; i < pwd.Length-1;i++)
-                {
-                    if(pwd[i]!=pwd[i+1]-1) return false;
-                }
-                return true;
-            }
-            /// <summary>
-            /// 瀵嗙爜涓哄悓涓�瀛楃
-            /// </summary>
-            /// <returns><c>true</c>, if same was pwded, <c>false</c> otherwise.</returns>
-            /// <param name="pwd">Pwd.</param>
-            bool pwdSame(string pwd)
-            {
-                if (pwd.Length < 6) return true;
-                for (int i = 1; i < pwd.Length - 1; i++)
-                {
-                    if (pwd[i] != pwd[i + 1]) return false;
-                }
-                return true;
-            }
-
-            password.TextChangeEventHandler += (sender, e) =>
-            {
-                loginErrorBtn.Text = "";
-                if (pwdNumAdd(password.Text.Trim()) || pwdSame(password.Text.Trim()))
-                {
-                    midFL.AddChidren(addPWDStrengthFL());
-                    passwordConfirmFL.Y = addPWDStrengthFL().Bottom + Application.GetRealHeight(50);
-                }
-                else
-                {
-                    addPWDStrengthFL().RemoveFromParent();
-                    passwordConfirmFL.Y = passwordFL.Bottom + Application.GetRealHeight(100);
-                }
-
-                if (passwordConfirm.Text.Trim().Length >= 6 && passwordConfirm.Text.Trim().Length <= 16 && password.Text.Trim().Length >= 6 && password.Text.Trim().Length <= 16)
-                {
-                    resetPWDBtn.Enable = resetPWDBtn.IsSelected = true;
-                }
-                else if(password.Text.Trim().Length>16)
-                {
-                    password.Text = e.Remove(16);
-                }
-                else
-                {
-                    resetPWDBtn.Enable = resetPWDBtn.IsSelected = false;
-                }
-            };
-            password.FoucsChanged += (sender, e) =>
-            {
-                addPWDStrengthFL().RemoveFromParent();
-                passwordConfirmFL.Y = passwordFL.Bottom + Application.GetRealHeight(100);
-            };
-            passwordConfirm.TextChangeEventHandler += (sender, e) =>
-            {
-                loginErrorBtn.Text = "";
-                if (passwordConfirm.Text.Trim().Length >= 6 && passwordConfirm.Text.Trim().Length<=16 && password.Text.Trim().Length >= 6 && password.Text.Trim().Length <= 16)
-                {
-                    resetPWDBtn.Enable = resetPWDBtn.IsSelected = true;
-                }
-                else if(passwordConfirm.Text.Trim().Length>16)
-                {
-                    passwordConfirm.Text = e.Remove(16);
-                }
-                else
-                {
-                    resetPWDBtn.Enable = resetPWDBtn.IsSelected = false;
-                }
-            };
-
-            hidenPWDbtn.MouseUpEventHandler += (sender, e) =>
-            {
-                password.SecureTextEntry = !password.SecureTextEntry;
-                hidenPWDbtn.IsSelected = !hidenPWDbtn.IsSelected;
-            };
-            hidenPWDComfirmbtn.MouseUpEventHandler += (sender, e) =>
-            {
-                hidenPWDComfirmbtn.IsSelected = !hidenPWDComfirmbtn.IsSelected;
-                passwordConfirm.SecureTextEntry = !passwordConfirm.SecureTextEntry;
-            };
-            resetPWDBtn.MouseUpEventHandler += async (sender, e) =>
-            {
-                //鍏堝垽鏂�2娆″瘑鐮佽緭鍏ユ槸鍚︿竴鑷�
-                if (password.Text.Trim() != passwordConfirm.Text.Trim())
-                {
-                    var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.TwoPasswordInconsistency), Language.StringByID(R.MyInternationalizationString.Confrim));
-                    alert.Show();
-                    password.Text = "";
-                    passwordConfirm.Text = "";
-                    return;
-                }
-                CommonPage.Loading.Start();
-                string passwordText = password.Text.Trim();
-                try
-                {
-                    string requestJson;
-                    if (areaCode=="")
-                    {
-                        var reqDto = new SendDataToServer.ResetPasswordObj()
-                        {
-                            Account = account,
-                            Password = password.Text,
-                            AgainPassword = passwordConfirm.Text
-                        };
-                        requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(reqDto);
-                    }
-                    else
-                    {
-                        var reqDto = new SendDataToServer.ResetPasswordObj()
-                        {
-                            Account = account,
-                            Password = password.Text.Trim(),
-                            AreaCode=int.Parse(areaCode),
-                            AgainPassword = passwordConfirm.Text.Trim()
-                        };
-                        requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(reqDto);
-                    }
-                    var revertObj =await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ResetPassword", System.Text.Encoding.UTF8.GetBytes(requestJson));
-                    if(revertObj==null)
-                    {
-                        CommonPage.Instance.FailureToServer();
-                        return;
-                    }
-                    var stateCodeStr = revertObj.StateCode.ToUpper();
-                    if (stateCodeStr == "SUCCESS")
-                    {
-                        var forgetWPDSuccessDialog = new Dialog();
-                        forgetWPDSuccessDialog.Show();
-                        var forgetSuccessView = new FrameLayout()
-                        {
-                            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                            Gravity = Gravity.Center,
-                            Width = Application.GetRealWidth(700),
-                            Height = Application.GetRealHeight(550),
-                            Radius =(uint)Application.GetRealHeight(30)
-                        };
-                        forgetWPDSuccessDialog.AddChidren(forgetSuccessView);
-
-                        var forgetSuccessTip = new Button()
-                        {
-                            Y = Application.GetRealHeight(50),
-                            Height = Application.GetRealHeight(100),
-                            TextID = R.MyInternationalizationString.TIP,
-                            TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                            TextAlignment = TextAlignment.Center,
-                            TextSize = 18,
-                            Gravity = Gravity.CenterHorizontal
-                        };
-                        forgetSuccessView.AddChidren(forgetSuccessTip);
-
-                        var forgetSuccessContents = new Button()
-                        {
-                            Y = Application.GetRealHeight(50) + forgetSuccessTip.Bottom,
-                            Height = Application.GetRealHeight(100),
-                            TextID = R.MyInternationalizationString.ResetPWDSuccessPleaseLoginAgain,
-                            TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                            TextAlignment = TextAlignment.Center,
-                            Gravity = Gravity.CenterHorizontal
-                        };
-                        forgetSuccessView.AddChidren(forgetSuccessContents);
-
-                        var confirmBtn = new Button()
-                        {
-                            Y = Application.GetRealHeight(100) + forgetSuccessContents.Bottom,
-                            Width = Application.GetRealWidth(300),
-                            Height = Application.GetRealHeight(100),
-                            TextID = R.MyInternationalizationString.Confrim,
-                            TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                            TextAlignment = TextAlignment.Center,
-                            TextSize = 18,
-                            BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                            Gravity = Gravity.CenterHorizontal,
-                            Radius =(uint)Application.GetRealHeight(50)
-                        };
-                        forgetSuccessView.AddChidren(confirmBtn);
-                        //閲嶇疆瀵嗙爜鎴愬姛鍥炲埌鐧诲綍鐣岄潰
-                        confirmBtn.MouseUpEventHandler += (sender1, e1) =>
-                        {
-                            forgetWPDSuccessDialog.Close();
-                            this.RemoveFromParent();
-                            Shared.Common.CommonPage.Instance.RemoveViewByTag("Forgot");
-                            var login = new AccountLogin();
-                            Shared.Common.CommonPage.Instance.AddChidren(login);
-                            login.Show();
-                        };
-                    }
-                    else if (stateCodeStr == "PARAMETEROREMPTY")
-                    {
-                        //鎻愪緵鐨勫弬鏁伴敊璇�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.PARAMETEROREMPTY);
-                    }
-                    else if (stateCodeStr == "ACCOUNTNOEXISTS")
-                    {
-                        //璐﹀彿涓嶅瓨鍦�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.ACCOUNTNOEXISTS;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.ACCOUNTNOEXISTS);
-                    }
-                    else if(stateCodeStr == "FAIL")
-                    {
-                        //鎿嶄綔澶辫触
-                        loginErrorBtn.TextID = R.MyInternationalizationString.FAIL;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FAIL);
-                    }
-                    else
-                    {
-                        loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.RequestServerFailed);
-                    }
-                }
-                catch
-                {
-                    loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                }
-                finally
-                {
-                    CommonPage.Loading.Hide();
-                }
-            };
-            #endregion
-        }
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/PhoneEmailForm.cs b/ZigbeeApp/Shared/Phone/Device/Account/PhoneEmailForm.cs
new file mode 100755
index 0000000..07a7ced
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Account/PhoneEmailForm.cs
@@ -0,0 +1,1105 @@
+锘縰sing System;
+using System.Timers;
+using Shared.Common;
+using Shared.Phone.Device.CommonForm;
+
+namespace Shared.Phone.Device.Account
+{
+    public class PhoneEmailForm : FrameLayout
+    {
+        /// <summary>
+        /// 閫夋嫨鎵嬫満
+        /// </summary>
+        public Button SelectedPhone;
+        /// <summary>
+        /// 閫夋嫨閭
+        /// </summary>
+        public Button SelectedEmail;
+        /// <summary>
+        /// 鎵嬫満閭
+        /// </summary>
+        private FrameLayout PhoneEmailFL;
+
+
+
+        public PhoneEmailForm()
+        {
+        }
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="frameLayout"></param>
+        public void Init(FrameLayout frameLayout, int y = 559, int width = 876, int height = 127)
+        {
+            PhoneEmailFL = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(y),
+                Height = Application.GetRealHeight(height),
+                Width = Application.GetRealWidth(width),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(height / 2),
+                Gravity = Gravity.CenterHorizontal
+            };
+            frameLayout.AddChidren(PhoneEmailFL);
+
+            SelectedPhone = new Button()
+            {
+                Width = Application.GetRealWidth(width / 2 + 20),
+                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor,
+                TextID = R.MyInternationalizationString.PhoneNum,
+                TextColor = ZigbeeColor.Current.GXCTextColor,
+                SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+                Radius = (uint)Application.GetRealHeight(height / 2),
+                IsSelected = true,
+                Tag = "Phone"
+            };
+            PhoneEmailFL.AddChidren(SelectedPhone);
+
+            SelectedEmail = new Button()
+            {
+                X = Application.GetRealWidth(width / 2 - 20),
+                Width = Application.GetRealWidth(width / 2 + 20),
+                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor,
+                TextID = R.MyInternationalizationString.Email,
+                TextColor = ZigbeeColor.Current.GXCTextColor,
+                SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+                Radius = (uint)Application.GetRealHeight(height / 2),
+                IsSelected = false,
+                Tag = "Email"
+            };
+            PhoneEmailFL.AddChidren(SelectedEmail);
+        }
+
+        /// <summary>
+        /// SetSelectedColor
+        /// </summary>
+        /// <param name="selectedColor"></param>
+        public void SetSelectedColor(uint selectedColor)
+        {
+            SelectedPhone.SelectedBackgroundColor = selectedColor;
+            SelectedEmail.SelectedBackgroundColor = selectedColor;
+            SelectedPhone.IsSelected = true;
+            SelectedEmail.IsSelected = false;
+        }
+    }
+
+    public class PhoneRowForm : FrameLayout
+    {
+        /// <summary>
+        /// 鎵嬫満鍖哄彿btn
+        /// </summary>
+        public Button PhoneZoneBtn;
+        /// <summary>
+        /// 璐﹀彿杈撳叆鎺т欢
+        /// </summary>
+        public EditText AccountET;
+        /// <summary>
+        /// Button_Height
+        /// </summary>
+        private int Button_Height = 92;
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="frameLayout"></param>
+        /// <param name="account"></param>
+        public void Init(FrameLayout frameLayout, FrameLayout parFL, string account, int x, int y)
+        {
+            var accountFL = new FrameLayout()
+            {
+                X = Application.GetRealWidth(x),
+                Y = Application.GetRealHeight(y),
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = Application.GetRealHeight(CommonFormResouce.Row_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+            };
+            frameLayout.AddChidren(accountFL);
+
+            PhoneZoneBtn = new Button()
+            {
+                X = Application.GetRealWidth(29),
+                Width = Application.GetRealWidth(150),
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                Text = $"+{CommonPage.PhoneZoneStr}",
+                TextAlignment = TextAlignment.Center,
+                TextSize = CommonFormResouce.loginTextSize
+            };
+            accountFL.AddChidren(PhoneZoneBtn);
+            PhoneZoneBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                var zoneListView = new PhoneZone { };
+                zoneListView.ActionSelectedZone += (zone) =>
+                {
+                    var t = CommonPage.PhoneZoneStr;
+                    (sender as Button).Text = "+" + zone;
+                };
+                parFL.AddChidren(zoneListView);
+                zoneListView.Show();
+            };
+
+            AccountET = new EditText()
+            {
+                X = Application.GetRealWidth(193),
+                Width = Application.GetRealWidth(600),
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPhoneNum),
+                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                Text = account,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = CommonFormResouce.loginTextSize
+            };
+            accountFL.AddChidren(AccountET);
+
+            var accountLine = new Button()
+            {
+                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
+            };
+            accountFL.AddChidren(accountLine);
+        }
+
+
+    }
+
+    public class PhoneLoginRowForm : FrameLayout
+    {
+        /// <summary>
+        /// 璐﹀彿杈撳叆鎺т欢
+        /// </summary>
+        public EditText AccountET;
+        /// <summary>
+        /// Button_Height
+        /// </summary>
+        private int Button_Height = 92;
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="frameLayout"></param>
+        /// <param name="account"></param>
+        public void Init(FrameLayout frameLayout, FrameLayout parFL, string account, int x, int y)
+        {
+            var accountFL = new FrameLayout()
+            {
+                X = Application.GetRealWidth(x),
+                Y = Application.GetRealHeight(y),
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = Application.GetRealHeight(CommonFormResouce.Row_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+            };
+            frameLayout.AddChidren(accountFL);
+
+            var accountBtn = new Button()
+            {
+                X = Application.GetRealWidth(69),
+                Width = Application.GetMinRealAverage(Button_Height),
+                Height = Application.GetMinRealAverage(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Account/Account.png"
+            };
+            accountFL.AddChidren(accountBtn);
+
+            AccountET = new EditText()
+            {
+                X = Application.GetRealWidth(193),
+                Width = Application.GetRealWidth(600),
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPhoneNum),
+                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                Text = account,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = CommonFormResouce.loginTextSize
+            };
+            accountFL.AddChidren(AccountET);
+
+            var accountLine = new Button()
+            {
+                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
+            };
+            accountFL.AddChidren(accountLine);
+        }
+
+
+    }
+
+    public class EmailRowForm : FrameLayout
+    {
+        /// <summary>
+        /// 璐﹀彿杈撳叆鎺т欢
+        /// </summary>
+        public EditText AccountET;
+        /// <summary>
+        /// Button_Height
+        /// </summary>
+        private int Button_Height = 92;
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="frameLayout"></param>
+        /// <param name="account"></param>
+        public void Init(FrameLayout frameLayout, string account, int x, int y)
+        {
+            var accountFL = new FrameLayout()
+            {
+                X = Application.GetRealWidth(x),
+                Y = Application.GetRealHeight(y),
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = Application.GetRealHeight(CommonFormResouce.Row_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+            };
+            frameLayout.AddChidren(accountFL);
+
+            var accountBtn = new Button()
+            {
+                X = Application.GetRealWidth(29),
+                Width = Application.GetMinRealAverage(Button_Height),
+                Height = Application.GetMinRealAverage(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Account/Account.png"
+            };
+            accountFL.AddChidren(accountBtn);
+
+            AccountET = new EditText()
+            {
+                X = Application.GetRealWidth(236),
+                Width = Application.GetRealWidth(700),
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputEmail),
+                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                Text = account,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = CommonFormResouce.loginTextSize
+            };
+            accountFL.AddChidren(AccountET);
+
+            var accountLine = new Button()
+            {
+                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
+            };
+            accountFL.AddChidren(accountLine);
+        }
+    }
+
+    public class EmailLoginRowForm : FrameLayout
+    {
+        /// <summary>
+        /// 璐﹀彿杈撳叆鎺т欢
+        /// </summary>
+        public EditText AccountET;
+        /// <summary>
+        /// Button_Height
+        /// </summary>
+        private int Button_Height = 92;
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="frameLayout"></param>
+        /// <param name="account"></param>
+        public void Init(FrameLayout frameLayout, string account, int x, int y)
+        {
+            var accountFL = new FrameLayout()
+            {
+                X = Application.GetRealWidth(x),
+                Y = Application.GetRealHeight(y),
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = Application.GetRealHeight(CommonFormResouce.Row_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+            };
+            frameLayout.AddChidren(accountFL);
+
+            var accountBtn = new Button()
+            {
+                X = Application.GetRealWidth(69),
+                Width = Application.GetMinRealAverage(Button_Height),
+                Height = Application.GetMinRealAverage(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Account/Account.png"
+            };
+            accountFL.AddChidren(accountBtn);
+
+            AccountET = new EditText()
+            {
+                X = Application.GetRealWidth(193),
+                Width = Application.GetRealWidth(700),
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputEmail),
+                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                Text = account,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = CommonFormResouce.loginTextSize
+            };
+            accountFL.AddChidren(AccountET);
+
+            var accountLine = new Button()
+            {
+                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
+            };
+            accountFL.AddChidren(accountLine);
+        }
+    }
+
+    public class EmailForgotRowForm : FrameLayout
+    {
+        /// <summary>
+        /// 璐﹀彿杈撳叆鎺т欢
+        /// </summary>
+        public EditText AccountET;
+        /// <summary>
+        /// Button_Height
+        /// </summary>
+        private int Button_Height = 92;
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="frameLayout"></param>
+        /// <param name="account"></param>
+        public void Init(FrameLayout frameLayout, string account, int x, int y)
+        {
+            var accountFL = new FrameLayout()
+            {
+                X = Application.GetRealWidth(x),
+                Y = Application.GetRealHeight(y),
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = Application.GetRealHeight(CommonFormResouce.Row_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+            };
+            frameLayout.AddChidren(accountFL);
+
+            AccountET = new EditText()
+            {
+                X = Application.GetRealWidth(CommonFormResouce.Row_X),
+                Width = Application.GetRealWidth(700),
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputEmail),
+                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                Text = account,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = CommonFormResouce.loginTextSize
+            };
+            accountFL.AddChidren(AccountET);
+
+            var accountLine = new Button()
+            {
+                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor
+            };
+            accountFL.AddChidren(accountLine);
+        }
+    }
+
+    public class VerificationCodeRowForm : FrameLayout
+    {
+        /// <summary>
+        /// Button_Height
+        /// </summary>
+        private int Button_Height = 92;
+        /// <summary>
+        /// codeBtn
+        /// </summary>
+        //public Button CodeBtn;
+        /// <summary>
+        /// sendCode
+        /// </summary>
+        public Button SendCodeBtn;
+        /// <summary>
+        /// VerificationCodeET
+        /// </summary>
+        public EditText VerificationCodeET;
+    
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="frameLayout"></param>
+        /// <param name="x"></param>
+        /// <param name="y"></param>
+        public void Init(FrameLayout frameLayout, int x, int y)
+        {
+            var codeFL = new FrameLayout()
+            {
+                X = Application.GetRealWidth(x),
+                Y = Application.GetRealHeight(y),
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = Application.GetRealHeight(CommonFormResouce.Row_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+            };
+            frameLayout.AddChidren(codeFL);
+
+            var codeBtn = new Button()
+            {
+                X = Application.GetRealWidth(29),
+                Width = Application.GetMinRealAverage(Button_Height),
+                Height = Application.GetMinRealAverage(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Account/Code.png"
+            };
+            codeFL.AddChidren(codeBtn);
+
+            VerificationCodeET = new EditText()
+            {
+                X = Application.GetRealWidth(236),
+                Width = Application.GetRealWidth(350),
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputVerificationCode),
+                TextAlignment = TextAlignment.CenterLeft,
+                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                TextSize = CommonFormResouce.PlaceHolderTextSize
+            };
+            codeFL.AddChidren(VerificationCodeET);
+
+            var sendCodeLine = new Button()
+            {
+                X = Application.GetRealWidth(611),
+                Width = 1,
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                BackgroundColor = ZigbeeColor.Current.GXCLineColor
+            };
+            codeFL.AddChidren(sendCodeLine);
+
+            SendCodeBtn = new Button()
+            {
+                X = sendCodeLine.Right + Application.GetRealWidth(20),
+                Width = Application.GetRealWidth(250),
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                TextID = R.MyInternationalizationString.SendVerificationCode,
+                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+                SelectedTextColor = ZigbeeColor.Current.GXCTextColor,
+                TextAlignment = TextAlignment.Center,
+                Enable = false,
+                IsSelected = false
+            };
+            codeFL.AddChidren(SendCodeBtn);
+
+            var pwdLine = new Button()
+            {
+                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor
+            };
+            codeFL.AddChidren(pwdLine);
+        }
+    }
+
+    public class PwdRowForm : FrameLayout
+    {
+        /// <summary>
+        /// PasswrodET
+        /// </summary>
+        public EditText PasswrodET;
+        /// <summary>
+        /// hidePWD
+        /// </summary>
+        private Button hidenPWDbtn;
+        /// <summary>
+        /// Button_Height
+        /// </summary>
+        private int Button_Height = 92;
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="frameLayout"></param>
+        /// <param name="password"></param>
+        /// <param name="x"></param>
+        /// <param name="y"></param>
+        public void Init(FrameLayout frameLayout ,int x,int y,string password="")
+        {
+            var pwdFL = new FrameLayout()
+            {
+                X = Application.GetRealWidth(x),
+                Y = Application.GetRealHeight(y),
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = Application.GetRealHeight(CommonFormResouce.Row_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+            };
+            frameLayout.AddChidren(pwdFL);
+
+            var passwordBtn = new Button()
+            {
+                X = Application.GetRealWidth(29),
+                Width = Application.GetMinRealAverage(Button_Height),
+                Height = Application.GetMinRealAverage(Button_Height),
+                Gravity=Gravity.CenterVertical,
+                UnSelectedImagePath = "Account/Password.png"
+            };
+            pwdFL.AddChidren(passwordBtn);
+
+            PasswrodET = new EditText()
+            {
+                X = Application.GetRealWidth(236),
+                Width = Application.GetRealWidth(550),
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPWD),
+                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                Text = password,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = CommonFormResouce.loginTextSize,
+                SecureTextEntry = true
+            };
+            pwdFL.AddChidren(PasswrodET);
+
+            hidenPWDbtn = new Button()
+            {
+                X = Application.GetRealWidth(775),
+                Width = Application.GetMinReal(Button_Height),
+                Height = Application.GetMinReal(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                SelectedImagePath = "Account/HidePwd.png",
+                UnSelectedImagePath = "Account/UnhidePwd.png",
+                IsSelected=true
+            };
+            pwdFL.AddChidren(hidenPWDbtn);
+
+            hidenPWDbtn.MouseUpEventHandler += (sender, e) =>
+            {
+                (sender as Button).IsSelected = !(sender as Button).IsSelected;
+                PasswrodET.SecureTextEntry = (sender as Button).IsSelected;
+            };
+
+            var pwdLine = new Button()
+            {
+                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
+            };
+            pwdFL.AddChidren(pwdLine);
+        }
+        /// <summary>
+        /// SetPlaceholdText
+        /// </summary>
+        /// <param name="holdText"></param>
+        public void SetPlaceholdText(string holdText)
+        {
+            PasswrodET.PlaceholderText = holdText;
+        }
+    }
+
+    public class PwdLoginRowForm : FrameLayout
+    {
+        /// <summary>
+        /// PasswrodET
+        /// </summary>
+        public EditText PasswrodET;
+        /// <summary>
+        /// hidePWD
+        /// </summary>
+        private Button hidenPWDbtn;
+        /// <summary>
+        /// Button_Height
+        /// </summary>
+        private int Button_Height = 92;
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="frameLayout"></param>
+        /// <param name="password"></param>
+        /// <param name="x"></param>
+        /// <param name="y"></param>
+        public void Init(FrameLayout frameLayout, int x, int y, string password = "")
+        {
+            var pwdFL = new FrameLayout()
+            {
+                X = Application.GetRealWidth(x),
+                Y = Application.GetRealHeight(y),
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = Application.GetRealHeight(CommonFormResouce.Row_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+            };
+            frameLayout.AddChidren(pwdFL);
+
+            var passwordBtn = new Button()
+            {
+                X = Application.GetRealWidth(69),
+                Width = Application.GetMinRealAverage(Button_Height),
+                Height = Application.GetMinRealAverage(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Account/Password.png"
+            };
+            pwdFL.AddChidren(passwordBtn);
+
+            PasswrodET = new EditText()
+            {
+                X = Application.GetRealWidth(193),
+                Width = Application.GetRealWidth(600),
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPWD),
+                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                Text = password,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = CommonFormResouce.loginTextSize,
+                SecureTextEntry = true
+            };
+            pwdFL.AddChidren(PasswrodET);
+
+            hidenPWDbtn = new Button()
+            {
+                X = Application.GetRealWidth(775),
+                Width = Application.GetMinReal(Button_Height),
+                Height = Application.GetMinReal(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                SelectedImagePath = "Account/HidePwd.png",
+                UnSelectedImagePath = "Account/UnhidePwd.png",
+                IsSelected = true
+            };
+            pwdFL.AddChidren(hidenPWDbtn);
+
+            hidenPWDbtn.MouseUpEventHandler += (sender, e) =>
+            {
+                (sender as Button).IsSelected = !(sender as Button).IsSelected;
+                PasswrodET.SecureTextEntry = (sender as Button).IsSelected;
+            };
+
+            var pwdLine = new Button()
+            {
+                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor
+            };
+            pwdFL.AddChidren(pwdLine);
+        }
+        /// <summary>
+        /// SetPlaceholdText
+        /// </summary>
+        /// <param name="holdText"></param>
+        public void SetPlaceholdText(string holdText)
+        {
+            PasswrodET.PlaceholderText = holdText;
+        }
+    }
+
+    public class PwdForForgetRowForm : FrameLayout
+    {
+        /// <summary>
+        /// PasswrodET
+        /// </summary>
+        public EditText PasswrodET;
+        /// <summary>
+        /// hidePWD
+        /// </summary>
+        private Button hidenPWDbtn;
+        /// <summary>
+        /// Button_Height
+        /// </summary>
+        private int Button_Height = 92;
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="frameLayout"></param>
+        /// <param name="password"></param>
+        /// <param name="x"></param>
+        /// <param name="y"></param>
+        public void Init(FrameLayout frameLayout, int x, int y, string password = "")
+        {
+            var pwdFL = new FrameLayout()
+            {
+                X = Application.GetRealWidth(x),
+                Y = Application.GetRealHeight(y),
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = Application.GetRealHeight(CommonFormResouce.Row_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+            };
+            frameLayout.AddChidren(pwdFL);
+
+            PasswrodET = new EditText()
+            {
+                X = Application.GetRealWidth(CommonFormResouce.Row_X),
+                Width = Application.GetRealWidth(700),
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPWD),
+                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                Text = password,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = CommonFormResouce.loginTextSize,
+                SecureTextEntry = true
+            };
+            pwdFL.AddChidren(PasswrodET);
+
+            hidenPWDbtn = new Button()
+            {
+                X = Application.GetRealWidth(775),
+                Width = Application.GetMinReal(Button_Height),
+                Height = Application.GetMinReal(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                SelectedImagePath = "Account/HidePwd.png",
+                UnSelectedImagePath = "Account/UnhidePwd.png",
+                IsSelected = true
+            };
+            pwdFL.AddChidren(hidenPWDbtn);
+
+            hidenPWDbtn.MouseUpEventHandler += (sender, e) =>
+            {
+                (sender as Button).IsSelected = !(sender as Button).IsSelected;
+                PasswrodET.SecureTextEntry = (sender as Button).IsSelected;
+            };
+
+            var pwdLine = new Button()
+            {
+                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
+            };
+            pwdFL.AddChidren(pwdLine);
+        }
+        /// <summary>
+        /// SetPlaceholdText
+        /// </summary>
+        /// <param name="holdText"></param>
+        public void SetPlaceholdText(string holdText)
+        {
+            PasswrodET.PlaceholderText = holdText;
+        }
+    }
+
+    public class CodeForRegisterRowForm : FrameLayout
+    {
+        /// <summary>
+        /// Button_Height
+        /// </summary>
+        private int Button_Height = 92;
+        /// <summary>
+        /// codeBtn
+        /// </summary>
+        //public Button CodeBtn;
+        /// <summary>
+        /// sendCode
+        /// </summary>
+        public Button SendCodeBtn;
+        /// <summary>
+        /// VerificationCodeET
+        /// </summary>
+        public EditText VerificationCodeET;
+        /// <summary>
+        /// sendCodeBG
+        /// </summary>
+        private FrameLayout SendCodeBG;
+        private Timer t;
+        private DateTime dateBegin;
+
+        public CodeForRegisterRowForm()
+        {
+            t = new Timer();
+            dateBegin = new DateTime();
+        }
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="frameLayout"></param>
+        /// <param name="x"></param>
+        /// <param name="y"></param>
+        public void Init(FrameLayout frameLayout, int x, int y)
+        {
+            var codeFL = new FrameLayout()
+            {
+                X = Application.GetRealWidth(x),
+                Y = Application.GetRealHeight(y),
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = Application.GetRealHeight(CommonFormResouce.Row_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+            };
+            frameLayout.AddChidren(codeFL);
+
+            var codeBtn = new Button()
+            {
+                X = Application.GetRealWidth(29),
+                Width = Application.GetMinRealAverage(Button_Height),
+                Height = Application.GetMinRealAverage(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Account/Code.png"
+            };
+            codeFL.AddChidren(codeBtn);
+
+            VerificationCodeET = new EditText()
+            {
+                X = Application.GetRealWidth(236),
+                Width = Application.GetRealWidth(300),
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputVerificationCode),
+                TextAlignment = TextAlignment.CenterLeft,
+                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                TextSize = CommonFormResouce.PlaceHolderTextSize
+            };
+            codeFL.AddChidren(VerificationCodeET);
+
+            SendCodeBtn = new Button()
+            {
+                X = Application.GetRealWidth(CommonFormResouce.Row_Width - 300),
+                Width = Application.GetRealWidth(300),
+                Height = Application.GetRealHeight(127),
+                Gravity = Gravity.CenterVertical,
+                TextID = R.MyInternationalizationString.SendVerificationCode,
+                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+                SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+                TextAlignment = TextAlignment.Center,
+                BackgroundColor = ZigbeeColor.Current.GXCButtonDisableColor,
+                SelectedBackgroundColor=ZigbeeColor.Current.GXCButtonSelectedColor,
+                Enable = false,
+                IsSelected = false,
+                Radius=(uint)Application.GetRealHeight(20)
+            };
+            codeFL.AddChidren(SendCodeBtn);
+
+        var pwdLine = new Button()
+            {
+                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
+                Width = Application.GetRealWidth(536),
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor
+            };
+            codeFL.AddChidren(pwdLine);
+        }
+
+        /// <summary>
+        /// TimeOut
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void TimeOut(object sender, System.Timers.ElapsedEventArgs e)
+        {
+            var span = DateTime.Now - dateBegin;
+            if (span.TotalSeconds <= 61)
+            {
+                Application.RunOnMainThread(() =>
+                {
+                    SendCodeBtn.Text = Convert.ToInt16(60 - span.TotalSeconds) + "s" + Language.StringByID(R.MyInternationalizationString.SendVerificationCodeAgain);
+                    SendCodeBtn.Enable = SendCodeBtn.IsSelected = false;
+                    SendCodeBtn.BackgroundColor = ZigbeeColor.Current.GXCClearColor;
+                    SendCodeBtn.SelectedBackgroundColor= ZigbeeColor.Current.GXCClearColor;
+                    SendCodeBtn.TextColor = ZigbeeColor.Current.GXCTextBlackColor;
+                });
+            }
+            else
+            {
+                Application.RunOnMainThread(() =>
+                {
+                    SendCodeBtn.TextID = R.MyInternationalizationString.SendVerificationCode;
+                    SendCodeBtn.BackgroundColor = ZigbeeColor.Current.GXCButtonDisableColor;
+                    SendCodeBtn.SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor;
+                    SendCodeBtn.TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
+                    SendCodeBtn.Enable = SendCodeBtn.IsSelected = true;
+                    t.Stop();
+                    t.Close();
+                });
+            }
+        }
+
+        /// <summary>
+        /// TimeBegin
+        /// </summary>
+        public void TimeBegin()
+        {
+            t.Interval = 1000;
+            t.AutoReset = true;
+            t.Enabled = true;
+            t.Elapsed += TimeOut;
+            //鍚姩璁℃椂鍣ㄥ�掕鏃�-60s
+            t.Start();
+            dateBegin = DateTime.Now;
+        }
+
+        /// <summary>
+        /// RemoveFromParent
+        /// </summary>
+        public override void RemoveFromParent()
+        {
+            t.Close();
+            t.Dispose();
+            base.RemoveFromParent();
+        }
+
+    }
+
+    public class CodeForForgetRowForm:FrameLayout
+    {
+        /// <summary>
+        /// Button_Height
+        /// </summary>
+        private int Button_Height = 92;
+        /// <summary>
+        /// sendCode
+        /// </summary>
+        public Button SendCodeBtn;
+        /// <summary>
+        /// VerificationCodeET
+        /// </summary>
+        public EditText VerificationCodeET;
+        /// <summary>
+        /// Timer
+        /// </summary>
+        private Timer t;
+        /// <summary>
+        /// dateBegin
+        /// </summary>
+        private DateTime dateBegin;
+
+        public CodeForForgetRowForm()
+        {
+            t = new Timer();
+            dateBegin = new DateTime();
+        }
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="frameLayout"></param>
+        /// <param name="x"></param>
+        /// <param name="y"></param>
+        public void Init(FrameLayout frameLayout, int x, int y)
+        {
+            var codeFL = new FrameLayout()
+            {
+                X = Application.GetRealWidth(x),
+                Y = Application.GetRealHeight(y),
+                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
+                Height = Application.GetRealHeight(CommonFormResouce.Row_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+            };
+            frameLayout.AddChidren(codeFL);
+
+            VerificationCodeET = new EditText()
+            {
+                X = Application.GetRealWidth(CommonFormResouce.Row_X),
+                Width = Application.GetRealWidth(536),
+                Height = Application.GetRealHeight(Button_Height),
+                Gravity = Gravity.CenterVertical,
+                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputVerificationCode),
+                TextAlignment = TextAlignment.CenterLeft,
+                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                TextSize = CommonFormResouce.PlaceHolderTextSize
+            };
+            codeFL.AddChidren(VerificationCodeET);
+
+            SendCodeBtn = new Button()
+            {
+                X = Application.GetRealWidth(CommonFormResouce.Row_Width - 300),
+                Width = Application.GetRealWidth(300),
+                Height = Application.GetRealHeight(127),
+                Gravity = Gravity.CenterVertical,
+                TextID = R.MyInternationalizationString.SendVerificationCode,
+                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+                SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+                TextAlignment = TextAlignment.Center,
+                BackgroundColor = ZigbeeColor.Current.GXCButtonDisableColor,
+                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor,
+                Enable = false,
+                IsSelected = false,
+                Radius = (uint)Application.GetRealHeight(20)
+            };
+            codeFL.AddChidren(SendCodeBtn);
+
+            var pwdLine = new Button()
+            {
+                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
+                Width = Application.GetRealWidth(536),
+                Height = 1,
+                BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor
+            };
+            codeFL.AddChidren(pwdLine);
+        }
+
+        /// <summary>
+        /// TimeOut
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void TimeOut(object sender, System.Timers.ElapsedEventArgs e)
+        {
+            var span = DateTime.Now - dateBegin;
+            if (span.TotalSeconds <= 61)
+            {
+                Application.RunOnMainThread(() =>
+                {
+                    SendCodeBtn.Text = Convert.ToInt16(60 - span.TotalSeconds) + "s" + Language.StringByID(R.MyInternationalizationString.SendVerificationCodeAgain);
+                    SendCodeBtn.Enable = SendCodeBtn.IsSelected = false;
+                    SendCodeBtn.BackgroundColor = ZigbeeColor.Current.GXCClearColor;
+                    SendCodeBtn.SelectedBackgroundColor = ZigbeeColor.Current.GXCClearColor;
+                    SendCodeBtn.TextColor = ZigbeeColor.Current.GXCTextBlackColor;
+                });
+            }
+            else
+            {
+                Application.RunOnMainThread(() =>
+                {
+                    SendCodeBtn.TextID = R.MyInternationalizationString.SendVerificationCode;
+                    SendCodeBtn.BackgroundColor = ZigbeeColor.Current.GXCButtonDisableColor;
+                    SendCodeBtn.SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor;
+                    SendCodeBtn.TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
+                    SendCodeBtn.Enable = SendCodeBtn.IsSelected = true;
+                    t.Stop();
+                    t.Close();
+                });
+            }
+        }
+
+        /// <summary>
+        /// TimeBegin
+        /// </summary>
+        public void TimeBegin()
+        {
+            t.Interval = 1000;
+            t.AutoReset = true;
+            t.Enabled = true;
+            t.Elapsed += TimeOut;
+            //鍚姩璁℃椂鍣ㄥ�掕鏃�-60s
+            t.Start();
+            dateBegin = DateTime.Now;
+        }
+
+        /// <summary>
+        /// RemoveFromParent
+        /// </summary>
+        public override void RemoveFromParent()
+        {
+            t.Close();
+            t.Dispose();
+            base.RemoveFromParent();
+        }
+
+    }
+
+
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/PhoneZone.cs b/ZigbeeApp/Shared/Phone/Device/Account/PhoneZone.cs
new file mode 100755
index 0000000..a3b4773
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Account/PhoneZone.cs
@@ -0,0 +1,280 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared.Common;
+
+namespace Shared.Phone.Device.Account
+{
+    public class PhoneZone : FrameLayout
+    {
+        #region 鈼� 鍙橀噺____________________________
+        /// <summary>
+        /// 閫夋嫨鐨勫尯鍙�
+        /// </summary>
+        public Action<string> ActionSelectedZone;
+        /// <summary>
+        /// *****鍗囩骇鍒嗗竷寮忓悗锛孉ccount 浠呭寘鍚墜鏈哄彿锛屼笉鍐嶅寘鍚�00鍖哄彿銆傚瘑鐮佷笉鍐嶉渶瑕丮D5鍔犲瘑銆俵anguage涓篈PP璇�
+        /// 涓嬫潵閫夋嫨鎵嬫満鍖哄彿 榛樿涓浗澶ч檰涓�86
+        ///鍙戦�佸浗闄� / 娓境鍙版秷鎭椂锛屾帴鏀跺彿鐮佹牸寮忎负00 + 鍥介檯鍖哄彿 + 鍙风爜锛屽鈥�008615899998888鈥�   璋冪敤API鏃讹紝Company瀛楁璇蜂紶鍏ユ暣鍨嬪�硷細4銆� 銆�
+        ///鍥藉唴  璋冪敤API鏃讹紝Company瀛楁璇蜂紶鍏ユ暣鍨嬪�硷細0銆�
+        /// </summary>
+        public List<Common.ResponseEntity.AreaCodeOBJ> areaCodeList = new List<Common.ResponseEntity.AreaCodeOBJ>();
+        /// <summary>
+        /// 閫夋嫨鍖哄彿瑙嗗浘
+        /// </summary>
+        private FrameLayout phoneZoneSelectedShowView;
+        /// <summary>
+        /// 鍖哄彿瑙嗗浘
+        /// </summary>
+        private VerticalScrolViewLayout phoneZoneListView;
+		/// <summary>
+		/// tempClickZoneCodeBtn
+		/// </summary>
+		Button tempClickZoneCodeBtn = new Button();
+		/// <summary>
+		/// tempClickZoneNameBtn
+		/// </summary>
+		Button tempClickZoneNameBtn = new Button();
+		/// <summary>
+		/// tempClickZoneItemFL
+		/// </summary>
+		FrameLayout tempClickZoneItemFL = new FrameLayout();
+        #endregion
+        /// <summary>
+        /// PhoneZone
+        /// </summary>
+        public PhoneZone()
+        {
+
+        }
+		/// <summary>
+		/// Show
+		/// </summary>
+		public void Show()
+        {
+            Init();
+        }
+		/// <summary>
+		/// Init
+		/// </summary>
+		private void Init()
+        {
+            CommonPage.Loading.Start();
+            ShowZoneList();
+			new System.Threading.Thread(async () =>
+			{
+				var zoneList = await GetZoneListAsync();
+				if (zoneList == null)
+				{
+					Application.RunOnMainThread(() =>
+					{
+						CommonPage.Loading.Hide();
+
+					});
+				}
+				else
+				{
+					Application.RunOnMainThread(() =>
+					{
+						foreach (var areaCode in zoneList)
+						{
+							AddZone(areaCode, phoneZoneListView);
+						}
+						CommonPage.Loading.Hide();
+					});
+				}
+			})
+			{ IsBackground = true }.Start();
+        }
+        /// <summary>
+        /// GetZoneListAsync
+        /// </summary>
+        /// <returns></returns>
+        private async System.Threading.Tasks.Task<List<Common.ResponseEntity.AreaCodeOBJ>> GetZoneListAsync()
+        {
+            try
+            {
+                var requestOBJ = new SendDataToServer.GetAreaCodeOBJ()
+                {
+                    RequestVersion = CommonPage.RequestVersion
+                };
+                var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestOBJ);
+                var revertOBJ = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/GetAreaCode", System.Text.Encoding.UTF8.GetBytes(requestJson));
+                if (revertOBJ == null)
+                {
+                    return null;
+                }
+                if (revertOBJ.StateCode.ToUpper() == "SUCCESS")
+                {
+
+                    var responseData = revertOBJ.ResponseData;
+                    return Newtonsoft.Json.JsonConvert.DeserializeObject<List<Common.ResponseEntity.AreaCodeOBJ>>(responseData.ToString());
+                }
+                else
+                {
+                    return null;
+                }
+            }
+            catch
+            {
+                return null;
+            }
+        }
+		/// <summary>
+		/// ShowZoneList
+		/// </summary>
+		private void ShowZoneList()
+        {
+            //ZoneListView
+            var phoneZoneDialog = new FrameLayout()
+            {
+                BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
+            };
+            AddChidren(phoneZoneDialog);
+
+            phoneZoneSelectedShowView = new FrameLayout()
+            {
+                Height = Application.GetRealHeight(1342),
+                Width = Application.GetRealWidth(850),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(30),
+                Gravity = Gravity.Center
+            };
+            phoneZoneDialog.AddChidren(phoneZoneSelectedShowView);
+
+            var phoneZoneTitle = new Button()
+            {
+                X = Application.GetRealWidth(CommonPage.XLeft),
+                Y = Application.GetRealHeight(69),
+                Height = Application.GetRealHeight(60),
+                Width = Application.GetRealWidth(250),
+                TextID = R.MyInternationalizationString.PleaseSelectAreaCode,
+                TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor,
+                TextAlignment = TextAlignment.CenterLeft
+            };
+            phoneZoneSelectedShowView.AddChidren(phoneZoneTitle);
+
+            var searchBorder = new FrameLayout()
+            {
+                X = phoneZoneTitle.Right + Application.GetRealWidth(CommonPage.XLeft),
+                Y = Application.GetRealHeight(46),
+                Height = Application.GetRealHeight(104),
+                Width = Application.GetRealWidth(400),
+                BorderWidth = 1,
+                BorderColor = ZigbeeColor.Current.GXCBorderColor,
+                Radius = (uint)Application.GetRealHeight(46 / 2)
+            };
+            phoneZoneSelectedShowView.AddChidren(searchBorder);
+
+            var phoneZoneSearch = new EditText()
+            {
+                X = phoneZoneTitle.Right + Application.GetRealWidth(CommonPage.XLeft + 10),
+                Y = Application.GetRealHeight(46),
+                Height = Application.GetRealHeight(104),
+                Width = Application.GetRealWidth(400),
+                PlaceholderText = Language.StringByID(R.MyInternationalizationString.Search),
+                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor
+            };
+            phoneZoneSelectedShowView.AddChidren(phoneZoneSearch);
+
+            phoneZoneListView = new VerticalScrolViewLayout()
+            {
+                Y = phoneZoneSearch.Bottom + Application.GetRealHeight(10),
+                Height = Application.GetRealHeight(986),
+            };
+            phoneZoneSelectedShowView.AddChidren(phoneZoneListView);
+
+            var okBtn = new CommonForm.CompleteButton(1166, 668, 127);
+            phoneZoneSelectedShowView.AddChidren(okBtn);
+            okBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                ActionSelectedZone?.Invoke(CommonPage.PhoneZoneStr);
+                ActionSelectedZone = null;
+                RemoveFromParent();
+            };
+            phoneZoneSelectedShowView.AddChidren(okBtn);
+            var cancleBtn = new Button()
+            {
+                Y = Application.GetRealHeight(1719),
+                Height = Application.GetMinRealAverage(86),
+                Width = Application.GetMinRealAverage(86),
+                UnSelectedImagePath = "Account/Cancle.png",
+                Gravity = Gravity.CenterHorizontal
+            };
+            phoneZoneDialog.AddChidren(cancleBtn);
+
+            cancleBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                this.RemoveFromParent();
+            };
+        }
+		/// <summary>
+		/// AddZone
+		/// </summary>
+		/// <param name="areaCode"></param>
+		/// <param name="phoneZoneSelectedListView"></param>
+		private void AddZone(Common.ResponseEntity.AreaCodeOBJ areaCode, VerticalScrolViewLayout phoneZoneSelectedListView)
+        {
+            var zoneItemLName = areaCode.Name;
+            var zoneItemLCode = areaCode.Code;
+            var zoneItemFL = new FrameLayout()
+            {
+                Width = phoneZoneSelectedListView.Width,
+                Height = Application.GetRealHeight(110),
+            };
+            phoneZoneSelectedListView.AddChidren(zoneItemFL);
+
+            var zoneItemNameBtn = new Button()
+            {
+                X = Application.GetRealWidth(58),
+                Width = zoneItemFL.Width - Application.GetRealWidth(300),
+                Height = Application.GetRealHeight(110) - 1,
+                Text = zoneItemLName,
+                TextColor = ZigbeeColor.Current.GXCTextColor,
+                SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                TextAlignment = TextAlignment.CenterLeft,
+            };
+            zoneItemFL.AddChidren(zoneItemNameBtn);
+
+            var zoneCode = new Button()
+            {
+                X = Application.GetRealWidth(58) + zoneItemNameBtn.Right,
+                Width = Application.GetRealWidth(150),
+                Height = Application.GetRealHeight(80),
+                Gravity = Gravity.CenterVertical,
+                Text = $"+{zoneItemLCode}",
+                TextAlignment = TextAlignment.CenterRight,
+                TextColor = ZigbeeColor.Current.GXCTextColor,
+                SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor,
+            };
+            zoneItemFL.AddChidren(zoneCode);
+
+            EventHandler<MouseEventArgs> selectedZone = (sender, e) =>
+            {
+                tempClickZoneCodeBtn.IsSelected = false;
+                tempClickZoneNameBtn.IsSelected = false;
+                tempClickZoneItemFL.BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
+                zoneItemNameBtn.IsSelected = true;
+                zoneCode.IsSelected = true;
+                tempClickZoneCodeBtn = zoneCode;
+                tempClickZoneNameBtn = zoneItemNameBtn;
+                tempClickZoneItemFL = zoneItemFL;
+                zoneItemFL.BackgroundColor = ZigbeeColor.Current.GXCRowSelectedColor;
+                CommonPage.PhoneZoneStr = zoneItemLCode;
+            };
+
+            zoneCode.MouseUpEventHandler += selectedZone;
+            zoneItemNameBtn.MouseUpEventHandler += selectedZone;
+            //榛樿
+            if (zoneItemLCode == CommonPage.PhoneZoneStr)
+            {
+                zoneItemNameBtn.IsSelected = true;
+                zoneCode.IsSelected = true;
+                zoneItemFL.BackgroundColor = ZigbeeColor.Current.GXCRowSelectedColor;
+                tempClickZoneCodeBtn = zoneCode;
+                tempClickZoneNameBtn = zoneItemNameBtn;
+                tempClickZoneItemFL = zoneItemFL;
+            }
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/RegisterSuccess.cs b/ZigbeeApp/Shared/Phone/Device/Account/RegisterSuccess.cs
deleted file mode 100755
index 2567311..0000000
--- a/ZigbeeApp/Shared/Phone/Device/Account/RegisterSuccess.cs
+++ /dev/null
@@ -1,142 +0,0 @@
-锘縰sing System;
-using Shared.Common;
-using Shared.Phone.UserView;
-
-namespace Shared.Phone.Device.Account
-{
-    /// <summary>
-    /// 娉ㄥ唽鎴愬姛
-    /// </summary>
-    public class RegisterSuccess:FrameLayout
-    {
-        /// <summary>
-        /// 鏋勯�犳柟娉�
-        /// </summary>
-        public RegisterSuccess()
-        {
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
-        }
-
-        /// <summary>
-        /// 鏄剧ず鐣岄潰
-        /// </summary>
-        /// <param name="name">Name.</param>
-        /// <param name="password">Password.</param>
-        public void Show(string name,string password)
-        {
-            var midFL = new FrameLayout()
-            {
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-            };
-            AddChidren(midFL);
-
-            var tip = new Button()
-            {
-                TextID = R.MyInternationalizationString.AccountRegisterSuccess,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                TextSize = 25,
-                TextAlignment = TextAlignment.Center,
-                Gravity=Gravity.CenterHorizontal,
-                Y=Application.GetRealHeight(300),
-                Height = Application.GetRealHeight(100),
-                Width=Application.GetRealWidth(700)
-            };
-            midFL.AddChidren(tip);
-
-            var logo = new Button()
-            {
-                Width = Application.GetMinRealAverage(210),
-                Height = Application.GetMinRealAverage(210),
-                Y = Application.GetRealHeight(200) + tip.Bottom,
-                UnSelectedImagePath = "Account/UserIMGSelected.png",
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFL.AddChidren(logo);
-
-            var account = new Button()
-            {
-                Text=name,
-                Gravity=Gravity.CenterHorizontal,
-                Width=Application.GetRealWidth(500),
-                Height=Application.GetRealHeight(80),
-                Y=logo.Bottom+Application.GetRealHeight(50),
-                TextColor=ZigbeeColor.Current.GXCTextBlackColor,
-                TextAlignment=TextAlignment.Center,
-                TextSize=10
-            };
-            midFL.AddChidren(account);
-
-            //瀹屾垚
-            //鐐瑰嚮鍚庣洿鎺ョ櫥褰曪紝涓嶉渶瑕佺敤鎴峰啀娆″洖鍒扮櫥褰曢〉闈㈢櫥褰曚簡
-            var backToLogin = new Button()
-            {
-                Y = Application.GetRealHeight(1920 - 400),
-                Height = Application.GetRealHeight(110),
-                Width = Application.GetRealWidth(700),
-                Gravity = Gravity.CenterHorizontal,
-                BackgroundColor = ZigbeeColor.Current.GXCTextBlueColor,
-                TextID = R.MyInternationalizationString.Complete,
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                Radius= (uint)Application.GetRealHeight(55)
-            };
-            midFL.AddChidren(backToLogin);
-
-            backToLogin.MouseUpEventHandler += (sender, e) =>
-            {
-                //娉ㄥ唽鎴愬姛锛岀洿鎺ュ悗鍙扮櫥褰曪紝涓嶉渶瑕佺敤鎴峰啀娆¤緭鍏ヨ处鍙峰瘑鐮佺‘璁ょ櫥褰�
-                this.RemoveFromParent();
-                CommonPage.Instance.RemoveViewByTag("Register");
-
-                try
-                {
-                    UserPage.Instance.Fresh();
-                    CommonPage.Loading.Start(Language.StringByID(R.MyInternationalizationString.Logining));
-                    Action action = async () => {
-                        var loginSuccess = await HomePage.Instance.LoginByPWDAsync(name, password);
-                        if (loginSuccess == 1)
-                        {
-                            new System.Threading.Thread(async () =>
-                            {
-                                ZigBee.Common.Application.Init();
-
-                                //鐧诲綍鎴愬姛
-                                var homes = await House.GetHomeLists();
-
-                                //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
-                                await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
-
-                                Shared.Common.Room.canInitAllRoom = true;
-                                Shared.Common.Room.InitAllRoom();
-
-                                Application.RunOnMainThread(() =>
-                                {
-                                    UserPage.Instance.Fresh();
-                                    CommonPage.Loading.Hide();
-                                });
-                            })
-                            { IsBackground = true }.Start();
-
-                        }
-                        else
-                        {
-                            //鏈櫥褰曟垚鍔熷脊鍑虹櫥褰曠晫闈� 鍚屾椂闇�瑕佹爣璁颁负鏈櫥褰曠姸鎬�
-                            Config.Instance.LoginDateTime = new DateTime(1970, 1, 1);
-                            Config.Instance.Save();
-                            var login = new Device.Account.AccountLogin { };
-                            CommonPage.Instance.AddChidren(login);
-                            login.Show(name, password);
-                        }
-                    };
-                    action();
-                }
-                catch
-                { }
-                finally
-                {
-                    CommonPage.Loading.Hide();
-                }
-
-            };
-        }
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/RegistrationByEmail.cs b/ZigbeeApp/Shared/Phone/Device/Account/RegistrationByEmail.cs
deleted file mode 100755
index 68ab9fd..0000000
--- a/ZigbeeApp/Shared/Phone/Device/Account/RegistrationByEmail.cs
+++ /dev/null
@@ -1,546 +0,0 @@
-锘縰sing System;
-using Shared.Common;
-using System.Text.RegularExpressions;
-using System.Collections.Generic;
-using System.Timers;
-namespace Shared.Phone.Device.Account
-{
-    public class RegistrationByEmail:FrameLayout
-    {
-        /// <summary>
-        /// 閭杈撳叆鏄惁绗﹀悎瑙勫垯
-        /// </summary>
-        public bool IsRightAccount = false;
-        public RegistrationByEmail()
-        {
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
-        }
-        public void Show()
-        {
-            ShowRegisterView();
-        }
-
-        public void ShowRegisterView()
-        {
-            #region topview
-            var topBGView = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(220),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
-            };
-            AddChidren(topBGView);
-            var topView = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
-                Height = Application.GetRealHeight(220 - CommonPage.NavigationTitle_Y),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-            };
-            AddChidren(topView);
-
-            var titleName = new Button()
-            {
-                TextAlignment = TextAlignment.Center,
-                TextID = R.MyInternationalizationString.RegisterByEmail,
-                TextSize = 19,
-                TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor,
-                Width = Application.GetRealWidth(600),
-                Gravity = Gravity.CenterHorizontal
-            };
-            topView.AddChidren(titleName);
-
-            var loginBtn = new Button()
-            {
-                X = Application.GetRealWidth(1080 - 250),
-                Width = Application.GetRealWidth(200),
-                Height = Application.GetRealHeight(100),
-                TextAlignment = TextAlignment.CenterRight,
-                Gravity = Gravity.CenterVertical,
-                TextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                TextID = R.MyInternationalizationString.Login,
-                TextSize=15
-            };
-            topView.AddChidren(loginBtn);
-
-            var back = new Button()
-            {
-                X = Application.GetRealWidth(CommonPage.Navigation_X),
-                Height = Application.GetMinRealAverage(110),
-                Width = Application.GetMinRealAverage(110),
-                UnSelectedImagePath = "Item/Back.png",
-                SelectedImagePath = "Item/BackSelected.png",
-                Gravity = Gravity.CenterVertical
-            };
-            topView.AddChidren(back);
-            back.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-            };
-            #endregion
-
-            #region ---midFrameLayout
-            var midFrameLayout = new FrameLayout()
-            {
-                Width = LayoutParams.MatchParent,
-                Height = Application.GetRealHeight(1920 - 220),
-                Y = topView.Bottom,
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-            };
-            this.AddChidren(midFrameLayout);
-
-            var accountFL = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(150),
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                BorderColor = ZigbeeColor.Current.GXCBorderColor,
-                BorderWidth = 1,
-                Radius = (uint)Application.GetRealHeight(55),
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(accountFL);
-
-            var accountET = new EditText()
-            {
-                Width = Application.GetRealWidth(700 - 100),
-                Gravity=Gravity.CenterHorizontal,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputEmail),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextAlignment = TextAlignment.Center
-            };
-            accountFL.AddChidren(accountET);
-
-            var pwdFL = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(80) + accountFL.Bottom,
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                BorderColor = ZigbeeColor.Current.GXCBorderColor,
-                BorderWidth = 1,
-                Radius = (uint)Application.GetRealHeight(55),
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(pwdFL);
-
-            var pwdET = new EditText()
-            {
-                Width = Application.GetRealWidth(500),
-                Gravity = Gravity.CenterHorizontal,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPWD),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextAlignment = TextAlignment.Center,
-                SecureTextEntry = true
-            };
-            pwdFL.AddChidren(pwdET);
-
-            var hidenPWDbtn = new Button()
-            {
-                X = pwdET.Right + Application.GetRealWidth(20),
-                Width = Application.GetMinReal(72),
-                Height = Application.GetMinReal(72),
-                UnSelectedImagePath = "Account/HidenPWD.png",
-                SelectedImagePath = "Account/UnHidenPWD.png",
-                Gravity = Gravity.CenterVertical
-            };
-            pwdFL.AddChidren(hidenPWDbtn);
-
-            var pwdComfirmFL = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(80) + pwdFL.Bottom,
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                BorderColor = ZigbeeColor.Current.GXCBorderColor,
-                BorderWidth = 1,
-                Gravity = Gravity.CenterHorizontal,
-                Radius = (uint)Application.GetRealHeight(55)
-            };
-            midFrameLayout.AddChidren(pwdComfirmFL);
-            var pwdComfirmET = new EditText()
-            {
-                Width = Application.GetRealWidth(500),
-                Gravity = Gravity.CenterHorizontal,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseComfirePWD),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextAlignment = TextAlignment.Center,
-                SecureTextEntry = true
-            };
-            pwdComfirmFL.AddChidren(pwdComfirmET);
-
-            var hidenPWDComfirmbtn = new Button()
-            {
-                X = pwdComfirmET.Right + Application.GetRealWidth(20),
-                Width = Application.GetMinReal(72),
-                Height = Application.GetMinReal(72),
-                UnSelectedImagePath = "Account/HidenPWD.png",
-                SelectedImagePath = "Account/UnHidenPWD.png",
-                Gravity = Gravity.CenterVertical
-            };
-            pwdComfirmFL.AddChidren(hidenPWDComfirmbtn);
-
-            var verificationCodeFL = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(80) + pwdComfirmFL.Bottom,
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                BorderColor = ZigbeeColor.Current.GXCBorderColor,
-                BorderWidth = 1,
-                Gravity = Gravity.CenterHorizontal,
-                Radius = (uint)Application.GetRealHeight(55)
-            };
-            midFrameLayout.AddChidren(verificationCodeFL);
-
-            var codeET = new EditText()
-            {
-                X = Application.GetRealWidth(20),
-                Width = Application.GetRealWidth(350),
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputVerificationCode),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextAlignment = TextAlignment.Center
-            };
-            verificationCodeFL.AddChidren(codeET);
-
-            var codeLine = new Button()
-            {
-                X = Application.GetRealWidth(10) + codeET.Right,
-                Width = 1,
-                Height = Application.GetRealHeight(60),
-                Gravity = Gravity.CenterVertical,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            verificationCodeFL.AddChidren(codeLine);
-
-            var sendCodeBtn = new Button()
-            {
-                X = codeET.Right + Application.GetRealWidth(20),
-                Width = Application.GetRealWidth(250),
-                TextColor = ZigbeeColor.Current.GXCTextUnselectedColor,
-                SelectedTextColor=ZigbeeColor.Current.GXCTextBlueColor,
-                TextID = R.MyInternationalizationString.SendVerificationCode,
-                TextAlignment = TextAlignment.Center,
-                Enable = false,
-                IsSelected = false
-            };
-            verificationCodeFL.AddChidren(sendCodeBtn);
-
-            var comfirmBtn = new Button()
-            {
-                Y = midFrameLayout.Height - Application.GetRealHeight(400),
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                TextID = R.MyInternationalizationString.Confrim,
-                BackgroundColor = ZigbeeColor.Current.GXCButtonUnselectedColor,
-                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                Radius = (uint)Application.GetRealHeight(55),
-                Gravity = Gravity.CenterHorizontal,
-                TextAlignment = TextAlignment.Center,
-                Enable = false,
-                IsSelected = false
-            };
-            midFrameLayout.AddChidren(comfirmBtn);
-
-            //閿欒鎻愮ずBtn
-            var loginErrorBtn = new Button()
-            {
-                Y = comfirmBtn.Bottom + Application.GetRealHeight(50),
-                Width = Application.GetRealWidth(1080 - 100),
-                Height = Application.GetRealHeight(110),
-                TextColor = ZigbeeColor.Current.GXCRedColor,
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(loginErrorBtn);
-
-            var t = new Timer();
-            var dateBegin = new DateTime();
-            #endregion
-
-            #region  --event--
-            void TimeBegin()
-            {
-                t.Interval = 1000;
-                t.AutoReset = true;
-                t.Enabled = true;
-                t.Elapsed += TimeOut;
-                //鍚姩璁℃椂鍣ㄥ�掕鏃�-60s
-                t.Start();
-                dateBegin = DateTime.Now;
-            }
-
-            void TimeOut(object source, System.Timers.ElapsedEventArgs e)
-            {
-                var span = DateTime.Now - dateBegin;
-                if (span.TotalSeconds <= 61)
-                {
-                    Application.RunOnMainThread(() =>
-                    {
-                        sendCodeBtn.Text = Convert.ToInt16((60 - span.TotalSeconds)) + "s" + Language.StringByID(R.MyInternationalizationString.SendVerificationCode);
-                        sendCodeBtn.Enable = false;
-                    });
-                }
-                else
-                {
-                    Application.RunOnMainThread(() =>
-                    {
-                        sendCodeBtn.Enable = true;
-                        sendCodeBtn.TextID = R.MyInternationalizationString.SendVerificationCode;
-                        t.Stop();
-                        t.Close();
-                    });
-                }
-            }
-
-            hidenPWDbtn.MouseUpEventHandler += (sender, e) =>
-            {
-                pwdET.SecureTextEntry = !pwdET.SecureTextEntry;
-                hidenPWDbtn.IsSelected = !hidenPWDbtn.IsSelected;
-            };
-
-            hidenPWDComfirmbtn.MouseUpEventHandler += (sender, e) =>
-            {
-                hidenPWDComfirmbtn.IsSelected = !hidenPWDComfirmbtn.IsSelected;
-                pwdComfirmET.SecureTextEntry = !pwdComfirmET.SecureTextEntry;
-            };
-
-            accountET.TextChangeEventHandler += (sender, e) =>
-            {
-                loginErrorBtn.Text = "";
-                var reg = new Regex(CommonPage.EmailRegexStr);
-                if (reg.IsMatch(accountET.Text.Trim()))
-                {
-                    IsRightAccount = true;
-                }
-                else
-                {
-                    IsRightAccount = false;
-                }
-                if (IsRightAccount && accountET.Text.Trim().Length>0 && pwdET.Text.Trim().Length >= 6 && pwdET.Text.Trim().Length <= 16 && pwdComfirmET.Text.Trim().Length >= 6 && pwdComfirmET.Text.Trim().Length <= 16)
-                {
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = true;
-                }
-                else
-                {
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                }
-            };
-
-            pwdET.TextChangeEventHandler += (sender, e) =>
-            {
-                loginErrorBtn.Text = "";
-                if (IsRightAccount && accountET.Text.Trim().Length > 0 && pwdET.Text.Trim().Length >= 6  && pwdET.Text.Trim().Length <= 16 &&  pwdComfirmET.Text.Trim().Length >= 6 && pwdComfirmET.Text.Trim().Length <= 16)
-                {
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = true;
-                }
-                else if(pwdET.Text.Trim().Length>16)
-                {
-                    pwdET.Text = e.Remove(16);
-                }
-                else
-                {
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                }
-            };
-
-            pwdComfirmET.TextChangeEventHandler += (sender, e) =>
-            {
-                loginErrorBtn.Text = "";
-                if (IsRightAccount && accountET.Text.Trim().Length > 0 && pwdET.Text.Trim().Length >= 6 && pwdET.Text.Trim().Length <= 16 && pwdComfirmET.Text.Trim().Length >= 6 && pwdComfirmET.Text.Trim().Length <= 16)
-                {
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = true;
-                }
-                else if(pwdComfirmET.Text.Trim().Length>16)
-                {
-                    pwdComfirmET.Text = e.Remove(16);
-                }
-                else
-                {
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                }
-            };
-
-            codeET.TextChangeEventHandler += (send, e) =>
-            {
-                loginErrorBtn.Text = "";
-                if (e.Trim().Length > 0  && IsRightAccount && pwdET.Text.Trim().Length >= 6 && pwdET.Text.Trim().Length <= 16 && pwdComfirmET.Text.Trim().Length >= 6 && pwdComfirmET.Text.Trim().Length <= 16)
-                {
-                    comfirmBtn.Enable = comfirmBtn.IsSelected = true;
-                }
-                else
-                {
-                    comfirmBtn.Enable = comfirmBtn.IsSelected = false;
-                }
-            };
-
-            //鍙戦�侀獙璇佺爜
-            sendCodeBtn.MouseUpEventHandler += async (sender, e) =>
-            {
-                //鍏堝垽鏂�2娆″瘑鐮佽緭鍏ユ槸鍚︿竴鑷�
-                if (pwdET.Text.Trim() != pwdComfirmET.Text.Trim())
-                {
-                    var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.TwoPasswordInconsistency), Language.StringByID(R.MyInternationalizationString.Confrim));
-                    alert.Show();
-                    pwdET.Text = "";
-                    pwdComfirmET.Text = "";
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                    return;
-                }
-                var reg = new Regex(CommonPage.EmailRegexStr);
-                var ss = reg.Match(accountET.Text.Trim());
-                //鏍¢獙閭
-                if (!ss.Success)
-                {
-                    var aler = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.PleaseInputTheCorrectEmail), Language.StringByID(R.MyInternationalizationString.Confrim));
-                    aler.Show();
-                    accountET.Text = "";
-                    IsRightAccount = false;
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                }
-                else
-                {
-                    CommonPage.Loading.Start();
-                    try
-                    {
-                        var reqDtoSignPhone = new SendDataToServer.RegisterSendVerCodeObj()
-                        {
-                            Account = accountET.Text.Trim(),
-                            Company = 0,
-                            AreaCode = 0,
-                            Language = CommonPage.ZigBeeLanguage
-                        };
-                        var requesetJson = Newtonsoft.Json.JsonConvert.SerializeObject(reqDtoSignPhone);
-                        var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/RegisterSendVerCode", System.Text.Encoding.UTF8.GetBytes(requesetJson));
-                        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;
-                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.PARAMETEROREMPTY);
-                        }
-                        else if (stateCodeStr == "SENDFAIL")
-                        {
-                            //楠岃瘉鐮佸彂閫佸け璐�
-                            loginErrorBtn.TextID = R.MyInternationalizationString.SENDFAIL;
-                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.SENDFAIL);
-                        }
-                        else if (stateCodeStr == "EXIST")
-                        {
-                            //璐﹀彿瀛樺湪
-                            loginErrorBtn.TextID = R.MyInternationalizationString.AccountHasBeenRegistered;
-                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.AccountHasBeenRegistered);
-                            //sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                            //accountET.Text = "";
-                            //IsRightAccount = false;
-                        }
-                        else
-                        {
-                            loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.RequestServerFailed);
-                        }
-                    }
-                    catch
-                    {
-                        loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                    }
-                    finally
-                    {
-                        CommonPage.Loading.Hide();
-                    }
-                }
-            };
-
-            //login
-            loginBtn.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-                Shared.Common.CommonPage.Instance.RemoveViewByTag("Register");
-                var accountLogin = new Device.Account.AccountLogin { };
-                Shared.Common.CommonPage.Instance.AddChidren(accountLogin);
-                accountLogin.Show();
-            };
-            //娉ㄥ唽-****涓嶉渶瑕佸厛楠岃瘉楠岃瘉鐮�
-            comfirmBtn.MouseUpEventHandler += async (sender, e) =>
-            {
-                CommonPage.Loading.Start();
-                try
-                {
-                    var reqDto = new SendDataToServer.RegisterAccountObj()
-                    {
-                        Account = accountET.Text.Trim(),
-                        Password = pwdET.Text.Trim(),
-                        EnterPassword = pwdComfirmET.Text.Trim(),
-                        Language = CommonPage.ZigBeeLanguage,
-                        Code = codeET.Text.Trim(),
-                        RegisterSoruce = CommonPage.RegisterSoruceFromZIGBEE,
-                        AreaCode = 0
-                    };
-                    var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(reqDto);
-                    //楠岃瘉楠岃瘉鐮�
-                    var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ValidataCodeAndRegisterAccount", System.Text.Encoding.UTF8.GetBytes(requestJson));
-                    if (requestRevertObj == null)
-                    {
-                        CommonPage.Instance.FailureToServer();
-                        return;
-                    }
-                    var stateCodeStr = requestRevertObj.StateCode.ToUpper();
-                    if (stateCodeStr == "SUCCESS")
-                    {
-                        var registerSuccess = new Account.RegisterSuccess();
-                        this.AddChidren(registerSuccess);
-                        registerSuccess.Show(accountET.Text.Trim(),pwdET.Text.Trim());
-                    }
-                    else if (stateCodeStr == "EXIST")
-                    {
-                        //宸叉敞鍐�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.TheResidenceNameHasExist;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheResidenceNameHasExist);
-                    }
-                    else if (stateCodeStr == "PARAMETEROREMPTY")
-                    {
-                        //鎻愪緵鐨勫弬鏁伴敊璇�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.PARAMETEROREMPTY);
-                    }
-                    else if (stateCodeStr == "PWDNOCONFIRM")
-                    {
-                        //涓ゆ瀵嗙爜涓嶄竴鏍�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.TwoPasswordInconsistency;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TwoPasswordInconsistency);
-                    }
-                    else if (stateCodeStr == "VALIDCODEANDPHONENOEQUAL")
-                    {
-                        //楠岃瘉鐮侀敊璇�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL);
-                    }
-                    else
-                    {
-                        loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.RequestServerFailed);
-                    }
-                }
-                catch
-                {
-                    loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                }
-                finally
-                {
-                    CommonPage.Loading.Hide();
-                }
-            };
-            #endregion
-        }
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/RegistrationByPhone.cs b/ZigbeeApp/Shared/Phone/Device/Account/RegistrationByPhone.cs
deleted file mode 100755
index 94c882e..0000000
--- a/ZigbeeApp/Shared/Phone/Device/Account/RegistrationByPhone.cs
+++ /dev/null
@@ -1,807 +0,0 @@
-锘縰sing System;
-using Shared.Common;
-using System.Text.RegularExpressions;
-using System.Collections.Generic;
-using System.Timers;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-namespace Shared.Phone.Device.Account
-{
-    public class RegistrationByPhone:FrameLayout
-    {
-        public  string phoneStr = "";
-        /// <summary>
-        /// 鎵嬫満鍙疯緭鍏ユ槸鍚︾鍚堣鍒�
-        /// </summary>
-        public bool IsRightAccount = false;
-        /// <summary>
-        /// 涓嬫潵閫夋嫨鎵嬫満鍖哄彿 榛樿涓浗澶ч檰涓�86
-        ///鍙戦�佸浗闄� / 娓境鍙版秷鎭椂锛屾帴鏀跺彿鐮佹牸寮忎负00 + 鍥介檯鍖哄彿 + 鍙风爜锛屽鈥�008615899998888鈥�   璋冪敤API鏃讹紝Company瀛楁璇蜂紶鍏ユ暣鍨嬪�硷細4銆� 銆�
-        ///鍥藉唴  璋冪敤API鏃讹紝Company瀛楁璇蜂紶鍏ユ暣鍨嬪�硷細0銆�
-        /// </summary>
-        public  List<Common.ResponseEntity.AreaCodeOBJ> areaCodeList = new List<Common.ResponseEntity.AreaCodeOBJ>();
-        public RegistrationByPhone()
-        {
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
-        }
-        public async void Show()
-        {
-            ShowRegisterView();
-            CommonPage.Loading.Start();
-            try
-            {
-                var requestOBJ = new SendDataToServer.GetAreaCodeOBJ()
-                {
-                    RequestVersion = CommonPage.RequestVersion
-                };
-                var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestOBJ);
-                var revertOBJ = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/GetAreaCode", System.Text.Encoding.UTF8.GetBytes(requestJson));
-                if (revertOBJ == null)
-                {
-                    return;
-                }
-                if (revertOBJ.StateCode.ToUpper() == "SUCCESS")
-                {
-                    var responseData = revertOBJ.ResponseData;
-                    areaCodeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Common.ResponseEntity.AreaCodeOBJ>>(responseData.ToString());
-                }
-            }
-            catch { }
-            finally
-            {
-                CommonPage.Loading.Hide();
-            }
-        }
-        public void ShowRegisterView()
-        {
-            #region topview
-            var topBGView = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(220),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
-            };
-            AddChidren(topBGView);
-            var topView = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
-                Height = Application.GetRealHeight(220 - CommonPage.NavigationTitle_Y),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-            };
-            AddChidren(topView);
-
-            var titleName = new Button()
-            {
-                TextAlignment = TextAlignment.Center,
-                TextID = R.MyInternationalizationString.RegisterByPhone,
-                TextSize = 19,
-                TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor,
-                Width=Application.GetRealWidth(600),
-                Gravity=Gravity.CenterHorizontal
-            };
-            topView.AddChidren(titleName);
-
-            var loginBtn = new Button()
-            {
-                X = Application.GetRealWidth(1080 - 250),
-                Width = Application.GetRealWidth(200),
-                Height = Application.GetRealHeight(100),
-                TextAlignment=TextAlignment.CenterRight,
-                Gravity = Gravity.CenterVertical,
-                TextColor=ZigbeeColor.Current.GXCTextBlueColor,
-                TextID=R.MyInternationalizationString.Login,
-                TextSize=15
-            };
-            topView.AddChidren(loginBtn);
-
-            var back = new Button()
-            {
-                X = Application.GetRealWidth(CommonPage.Navigation_X),
-                Height = Application.GetMinRealAverage(110),
-                Width = Application.GetMinRealAverage(110),
-                UnSelectedImagePath = "Item/Back.png",
-                SelectedImagePath = "Item/BackSelected.png",
-                Gravity = Gravity.CenterVertical
-            };
-            topView.AddChidren(back);
-            back.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-            };
-            #endregion
-
-            #region ---midFrameLayout
-            var midFrameLayout = new FrameLayout()
-            {
-                Width = LayoutParams.MatchParent,
-                Height = Application.GetRealHeight(1920 - 220),
-                Y = topView.Bottom,
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-            };
-            this.AddChidren(midFrameLayout);
-
-            var accountFL = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(150),
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                BorderColor = ZigbeeColor.Current.GXCBorderColor,
-                BorderWidth = 1,
-                Radius =(uint)Application.GetRealHeight(55),
-                Gravity=Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(accountFL);
-
-            var accountZoneBtn = new Button()
-            {
-                Width = Application.GetRealWidth(180),
-                Text = "+" + CommonPage.PhoneZoneStr,
-                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextAlignment = TextAlignment.Center
-            };
-            accountFL.AddChidren(accountZoneBtn);
-
-            var accountZoneLine = new Button()
-            {
-                X = Application.GetRealWidth(10) + accountZoneBtn.Right,
-                Width = 1,
-                Height = Application.GetRealHeight(60),
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor,
-                Gravity=Gravity.CenterVertical
-            };
-            accountFL.AddChidren(accountZoneLine);
-
-            var phoneET = new EditText()
-            {
-                X = Application.GetRealWidth(40) + accountZoneLine.Right,
-                Width = Application.GetRealWidth(700-300),
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText=Language.StringByID(R.MyInternationalizationString.PleaseInputPhoneNum),
-                PlaceholderTextColor=ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextAlignment = TextAlignment.Center
-            };
-            accountFL.AddChidren(phoneET);
-
-            var pwdFL = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(80) + accountFL.Bottom,
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                BorderColor = ZigbeeColor.Current.GXCBorderColor,
-                BorderWidth = 1,
-                Radius = (uint)Application.GetRealHeight(55),
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(pwdFL);
-
-            var pwdET = new EditText()
-            {
-                Width = Application.GetRealWidth(500),
-                Gravity=Gravity.CenterHorizontal,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPWD),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextAlignment = TextAlignment.Center,
-                SecureTextEntry=true
-            };
-            pwdFL.AddChidren(pwdET);
-
-            var hidenPWDbtn = new Button()
-            {
-                X = pwdET.Right + Application.GetRealWidth(20),
-                Width = Application.GetMinReal(72),
-                Height = Application.GetMinReal(72),
-                UnSelectedImagePath = "Account/HidenPWD.png",
-                SelectedImagePath = "Account/UnHidenPWD.png",
-                Gravity=Gravity.CenterVertical
-            };
-            pwdFL.AddChidren(hidenPWDbtn);
-
-            var pwdComfirmFL = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(80) + pwdFL.Bottom,
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                BorderColor = ZigbeeColor.Current.GXCBorderColor,
-                BorderWidth = 1,
-                Gravity = Gravity.CenterHorizontal,
-                Radius = (uint)Application.GetRealHeight(55)
-            };
-            midFrameLayout.AddChidren(pwdComfirmFL);
-            var pwdComfirmET = new EditText()
-            {
-                Width = Application.GetRealWidth(500),
-                Gravity=Gravity.CenterHorizontal,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseComfirePWD),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextAlignment = TextAlignment.Center,
-                SecureTextEntry=true
-            };
-            pwdComfirmFL.AddChidren(pwdComfirmET);
-
-            var hidenPWDComfirmbtn = new Button()
-            {
-                X = pwdComfirmET.Right + Application.GetRealWidth(20),
-                Width = Application.GetMinReal(72),
-                Height = Application.GetMinReal(72),
-                UnSelectedImagePath = "Account/HidenPWD.png",
-                SelectedImagePath = "Account/UnHidenPWD.png",
-                Gravity = Gravity.CenterVertical
-            };
-            pwdComfirmFL.AddChidren(hidenPWDComfirmbtn);
-
-            var verificationCodeFL = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(80) + pwdComfirmFL.Bottom,
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                BorderColor = ZigbeeColor.Current.GXCBorderColor,
-                BorderWidth = 1,
-                Gravity = Gravity.CenterHorizontal,
-                Radius = (uint)Application.GetRealHeight(55)
-            };
-            midFrameLayout.AddChidren(verificationCodeFL);
-
-            var codeET = new EditText()
-            {
-                X= Application.GetRealWidth(20),
-                Width = Application.GetRealWidth(350),
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputVerificationCode),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextAlignment = TextAlignment.Center
-            };
-            verificationCodeFL.AddChidren(codeET);
-
-            var codeLine = new Button()
-            {
-                X = Application.GetRealWidth(10) + codeET.Right,
-                Width = 1,
-                Height = Application.GetRealHeight(60),
-                Gravity=Gravity.CenterVertical,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            verificationCodeFL.AddChidren(codeLine);
-
-            var sendCodeBtn = new Button()
-            {
-                X = codeET.Right+Application.GetRealWidth(20),
-                Width = Application.GetRealWidth(250),
-                TextColor = ZigbeeColor.Current.GXCTextUnselectedColor,
-                SelectedTextColor=ZigbeeColor.Current.GXCTextBlueColor,
-                TextID =R.MyInternationalizationString.SendVerificationCode,
-                TextAlignment=TextAlignment.Center,
-                Enable=false,
-                IsSelected=false
-            };
-            verificationCodeFL.AddChidren(sendCodeBtn);
-
-            var comfirmBtn = new Button()
-            {
-                Y = midFrameLayout.Height-Application.GetRealHeight(400),
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                TextID = R.MyInternationalizationString.Confrim,
-                BackgroundColor = ZigbeeColor.Current.GXCButtonUnselectedColor,
-                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                Radius =(uint)Application.GetRealHeight(55),
-                Gravity=Gravity.CenterHorizontal,
-                TextAlignment=TextAlignment.Center,
-                Enable=false,
-                IsSelected=false
-            };
-            midFrameLayout.AddChidren(comfirmBtn);
-
-            //閿欒鎻愮ずBtn
-            var loginErrorBtn = new Button()
-            {
-                Y = comfirmBtn.Bottom + Application.GetRealHeight(50),
-                Width = Application.GetRealWidth(1080 - 100),
-                Height = Application.GetRealHeight(110),
-                TextColor = ZigbeeColor.Current.GXCRedColor,
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(loginErrorBtn);
-
-            var t = new Timer();
-            var dateBegin = new DateTime();
-
-            #endregion
-
-            #region  --event--
-
-            void TimeBegin()
-            {
-                t.Interval = 1000;
-                t.AutoReset = true;
-                t.Enabled = true;
-                t.Elapsed += TimeOut;
-                //鍚姩璁℃椂鍣ㄥ�掕鏃�-60s
-                t.Start();
-                dateBegin = DateTime.Now;
-            }
-
-            void TimeOut(object source, System.Timers.ElapsedEventArgs e){
-                var span = DateTime.Now - dateBegin;
-                if(span.TotalSeconds<=61)
-                {
-                    Application.RunOnMainThread(() =>
-                    {
-                        sendCodeBtn.Text = Convert.ToInt16((60-span.TotalSeconds))+ "s"+Language.StringByID(R.MyInternationalizationString.SendVerificationCode);
-                        sendCodeBtn.Enable = false;
-                    });
-                }
-                else
-                {
-                    Application.RunOnMainThread(() =>
-                    {
-                        sendCodeBtn.Enable = true;
-                        sendCodeBtn.TextID = R.MyInternationalizationString.SendVerificationCode;
-                        t.Stop();
-                        t.Close();
-                    });
-                }
-            }
-
-            hidenPWDbtn.MouseUpEventHandler += (sender, e) =>
-            {
-                pwdET.SecureTextEntry = !pwdET.SecureTextEntry;
-                hidenPWDbtn.IsSelected = !hidenPWDbtn.IsSelected;
-            };
-
-            hidenPWDComfirmbtn.MouseUpEventHandler += (sender, e) =>
-            {
-                hidenPWDComfirmbtn.IsSelected = !hidenPWDComfirmbtn.IsSelected;
-                pwdComfirmET.SecureTextEntry = !pwdComfirmET.SecureTextEntry;
-            };
-            //鎵嬫満鍙风洃鍚�
-            phoneET.TextChangeEventHandler += (sender, e) =>
-            {
-                loginErrorBtn.Text = "";
-                //鏍¢獙鎵嬫満鍙�
-                if (CommonPage.PhoneZoneStr != "86")
-                {
-                    var reg = new Regex(CommonPage.PhoneForForeignRegexStr);
-                    var mFalg = reg.Match(phoneET.Text.Trim());
-                    if (!mFalg.Success)
-                    {
-                        var aler = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.PleaseInputTheCorrectCellPhoneNumber), Language.StringByID(R.MyInternationalizationString.Confrim));
-                        aler.Show();
-                        sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                        phoneET.Text = "";
-                        IsRightAccount = false;
-                    }
-                    else
-                    {
-                        sendCodeBtn.Enable = sendCodeBtn.IsSelected = true;
-                        IsRightAccount = true;
-                    }
-                }
-                else
-                {
-                    if (phoneET.Text.Trim().Length == 11)
-                    {
-                        var reg = new Regex(CommonPage.PhoneRegexStr);
-                        var mFalg = reg.Match(phoneET.Text.Trim());
-                        if (!mFalg.Success)
-                        {
-                            var aler = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.PleaseInputTheCorrectCellPhoneNumber), Language.StringByID(R.MyInternationalizationString.Confrim));
-                            aler.Show();
-                            phoneET.Text = "";
-                            sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                            IsRightAccount = false;
-                        }
-                        else
-                        {
-                            if(pwdComfirmET.Text.Trim().Length >= 6 && pwdComfirmET.Text.Trim().Length <= 16 && pwdET.Text.Trim().Length >= 6 && pwdET.Text.Trim().Length <= 16 && IsRightAccount)
-                            {
-                                sendCodeBtn.Enable = sendCodeBtn.IsSelected = true;
-                            }
-                            else
-                            {
-                                sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                            }
-                            IsRightAccount = true;
-                        }
-                    }
-                    else if (phoneET.Text.Trim().Length > 11)
-                    {
-                        phoneET.Text = e.Remove(11);
-                    }
-                    else
-                    {
-                        //姝e垯琛ㄨ揪寮忓垽鏂槸鍚︽暟瀛�
-                        var reg = new Regex("^[0-9]*$");
-                        if(!reg.IsMatch(phoneET.Text))
-                        {
-                            var aler = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.PleaseInputTheCorrectCellPhoneNumber), Language.StringByID(R.MyInternationalizationString.Confrim));
-                            aler.Show();
-                            phoneET.Text = "";
-                        }
-                        sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                        IsRightAccount = false;
-                    }
-                }
-
-                if (pwdComfirmET.Text.Trim().Length >= 6 && pwdComfirmET.Text.Trim().Length <= 16 && pwdET.Text.Trim().Length >= 6 && pwdET.Text.Trim().Length <= 16 && IsRightAccount)
-                {
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = true;
-                    IsRightAccount = true;
-                }
-            };
-            //瀵嗙爜鐩戝惉
-            pwdET.TextChangeEventHandler += (sender, e) =>
-            {
-                loginErrorBtn.Text = "";
-                if (pwdComfirmET.Text.Trim().Length >= 6 && pwdComfirmET.Text.Trim().Length <= 16 && pwdET.Text.Trim().Length >= 6 && pwdET.Text.Trim().Length <= 16 && IsRightAccount)
-                {
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = true;
-                }
-                else if (pwdET.Text.Trim().Length > 16)
-                {
-                    //sendCodeBtn.Enable = sendCodeBtn.IsSelected = true;
-                    pwdET.Text = e.Trim().Remove(16);
-                }
-                else
-                {
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                }
-            };
-            //纭瀵嗙爜鐩戝惉
-            pwdComfirmET.TextChangeEventHandler += (sender, e) =>
-            {
-                loginErrorBtn.Text = "";
-                if (pwdComfirmET.Text.Trim().Length >= 6 &&  pwdComfirmET.Text.Trim().Length <=16 && pwdET.Text.Trim().Length >= 6 && pwdET.Text.Trim().Length <= 16 && IsRightAccount)
-                {
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = true;
-                }
-                else if(pwdComfirmET.Text.Trim().Length>16)
-                {
-                    //sendCodeBtn.Enable = sendCodeBtn.IsSelected = true;
-                    pwdComfirmET.Text = e.Trim().Remove(16);
-                }
-                else
-                {
-                    sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                }
-            };
-           
-            codeET.TextChangeEventHandler += (send, e) =>
-            {
-                loginErrorBtn.Text = "";
-                if (e.Trim().Length > 0 && IsRightAccount &&  pwdComfirmET.Text.Trim().Length >= 6 &&  pwdComfirmET.Text .Trim().Length <=16 && pwdET.Text.Trim().Length >= 6 && pwdET.Text.Trim().Length <= 16)
-                {
-                    comfirmBtn.Enable = comfirmBtn.IsSelected= true;
-                }
-                else
-                {
-                    comfirmBtn.Enable = comfirmBtn.IsSelected = false;
-                }
-            };
-
-            Button tempClickZoneImgBtn = new Button();
-            Button tempClickZoneNameBtn = new Button();
-            EventHandler<MouseEventArgs> phoneZoneHandler = (senderZone, eZone) =>
-            {
-                //ZoneListView
-                var phoneZoneSelectedShowView = new Dialog()
-                {
-                    Height = Application.GetRealHeight(1000),
-                    Width = Application.GetRealWidth(700),
-                    BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                    Radius = (uint)Application.GetRealHeight(30)
-                };
-                phoneZoneSelectedShowView.Show();
-
-                var phoneZoneTitle = new Button()
-                {
-                    Height = Application.GetRealHeight(110),
-                    TextID = R.MyInternationalizationString.PleaseSelectAreaCode,
-                    TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                    TextSize = 15,
-                    BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor
-                };
-                phoneZoneSelectedShowView.AddChidren(phoneZoneTitle);
-
-                var phoneZoneSelectedListView = new VerticalScrolViewLayout()
-                {
-                    Y = phoneZoneTitle.Bottom,
-                    Height = Application.GetRealHeight(1000 - 110 * 2),
-                    BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor
-                };
-                phoneZoneSelectedShowView.AddChidren(phoneZoneSelectedListView);
-
-                for (int i = 0; i < areaCodeList.Count; i++)
-                {
-                    var zoneItemLName = areaCodeList[i].Name;
-                    var zoneItemLCode = areaCodeList[i].Code;
-                    var zoneItemFL = new FrameLayout()
-                    {
-                        Width = phoneZoneSelectedListView.Width,
-                        Height = Application.GetRealHeight(110),
-                        Tag = i + 10086
-                    };
-                    phoneZoneSelectedListView.AddChidren(zoneItemFL);
-
-                    var zoneIsSelectedBtn = new Button()
-                    {
-                        Width = Application.GetMinReal(80),
-                        Height = Application.GetMinReal(80),
-                        UnSelectedImagePath = "Account/Check.png",
-                        SelectedImagePath = "Account/CheckSelected.png",
-                        Tag = i + 10086,
-                        Gravity = Gravity.CenterVertical
-                    };
-                    zoneItemFL.AddChidren(zoneIsSelectedBtn);
-
-                    var zoneItemNameBtn = new Button()
-                    {
-                        X = Application.GetRealWidth(20) + zoneIsSelectedBtn.Right,
-                        Width = zoneItemFL.Width - Application.GetRealWidth(100),
-                        Height = Application.GetRealHeight(110) - 1,
-                        Text = zoneItemLName,
-                        TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                        SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                        TextAlignment = TextAlignment.CenterLeft,
-                        Tag = i + 10000
-                    };
-                    zoneItemFL.AddChidren(zoneItemNameBtn);
-
-                    var zoneLine = new Button()
-                    {
-                        Y = zoneItemFL.Height - 1,
-                        Width = zoneItemFL.Width,
-                        Height = 1,
-                        BackgroundColor = ZigbeeColor.Current.GXCPlaceHolderTextColor
-                    };
-                    zoneItemFL.AddChidren(zoneLine);
-
-                    EventHandler<MouseEventArgs> selectedZone = (sender, e) =>
-                    {
-                        tempClickZoneImgBtn.IsSelected = false;
-                        tempClickZoneNameBtn.IsSelected = false;
-                        zoneItemNameBtn.IsSelected = true;
-                        zoneIsSelectedBtn.IsSelected = true;
-                        tempClickZoneImgBtn = zoneIsSelectedBtn;
-                        tempClickZoneNameBtn = zoneItemNameBtn;
-                        CommonPage.PhoneZoneStr = zoneItemLCode;
-                    };
-                    zoneIsSelectedBtn.MouseUpEventHandler += selectedZone;
-                    zoneItemNameBtn.MouseUpEventHandler += selectedZone;
-                    //榛樿
-                    if (zoneItemLCode == CommonPage.PhoneZoneStr)
-                    {
-                        zoneItemNameBtn.IsSelected = true;
-                        zoneIsSelectedBtn.IsSelected = true;
-                        tempClickZoneImgBtn = zoneIsSelectedBtn;
-                        tempClickZoneNameBtn = zoneItemNameBtn;
-                    }
-                }
-                var cancleBtn = new Button()
-                {
-                    Y = phoneZoneSelectedListView.Bottom,
-                    Height = Application.GetRealHeight(110),
-                    Width = Application.GetRealWidth(700 / 2),
-                    BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                    TextID = R.MyInternationalizationString.Cancel,
-                    TextSize = 15
-                };
-                phoneZoneSelectedShowView.AddChidren(cancleBtn);
-                cancleBtn.MouseUpEventHandler += (sender, e) =>
-                {
-                    phoneZoneSelectedShowView.Close();
-                };
-                cancleBtn.MouseDownEventHandler += (sender, e) =>
-                {
-                    cancleBtn.IsSelected = true;
-                };
-
-                var lineCancleOK = new Button()
-                {
-                    X = cancleBtn.Right,
-                    Y = phoneZoneSelectedListView.Bottom,
-                    Height = Application.GetRealHeight(110),
-                    Width = 1,
-                    BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor
-                };
-                phoneZoneSelectedShowView.AddChidren(lineCancleOK);
-
-                var okBtn = new Button()
-                {
-                    X = lineCancleOK.Right + 1,
-                    Y = phoneZoneSelectedListView.Bottom,
-                    Height = Application.GetRealHeight(110),
-                    Width = Application.GetRealWidth(700 / 2) - 1,
-                    BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                    TextID = R.MyInternationalizationString.Confrim,
-                    TextSize = 15
-                };
-                phoneZoneSelectedShowView.AddChidren(okBtn);
-                okBtn.MouseUpEventHandler += (sender, e) =>
-                {
-                    accountZoneBtn.Text = "+" + CommonPage.PhoneZoneStr;
-                    phoneZoneSelectedShowView.Close();
-                };
-                okBtn.MouseDownEventHandler += (sender, e) =>
-                {
-                    okBtn.IsSelected = true;
-                };
-            };
-            accountZoneBtn.MouseUpEventHandler += phoneZoneHandler;
-
-            //鍙戦�侀獙璇佺爜
-            sendCodeBtn.MouseUpEventHandler += async (sender, e) =>
-             {
-                 //鍏堝垽鏂�2娆″瘑鐮佽緭鍏ユ槸鍚︿竴鑷�
-                 if(pwdET.Text.Trim()!=pwdComfirmET.Text.Trim())
-                 {
-                     var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.TwoPasswordInconsistency), Language.StringByID(R.MyInternationalizationString.Confrim));
-                     alert.Show();
-                     pwdET.Text = "";
-                     pwdComfirmET.Text = "";
-                     sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                     return;
-                 }
-                 string phoneNum = phoneET.Text.Trim();
-                 CommonPage.Loading.Start();
-                 try
-                 {
-                     int companyInt = 0;
-                     if (CommonPage.PhoneZoneStr == "86")
-                     {
-                         companyInt = CommonPage.Company;
-                         phoneStr = phoneNum;
-                     }
-                     else
-                     {
-                         companyInt = CommonPage.CompanyForINTERNETION;
-                         phoneStr = phoneNum;
-                     }
-                     var reqDtoSignPhone = new SendDataToServer.RegisterSendVerCodeObj()
-                     {
-                         Account = phoneStr,
-                         Company = companyInt,
-                         AreaCode = int.Parse(CommonPage.PhoneZoneStr),
-                         Language = CommonPage.ZigBeeLanguage
-                     };
-                     var requesetJson = Newtonsoft.Json.JsonConvert.SerializeObject(reqDtoSignPhone);
-                     var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/RegisterSendVerCode", System.Text.Encoding.UTF8.GetBytes(requesetJson));
-                     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;
-                         CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.PARAMETEROREMPTY);
-                     }
-                     else if (stateCodeStr == "SENDFAIL")
-                     {
-                         //楠岃瘉鐮佸彂閫佸け璐�
-                         loginErrorBtn.TextID = R.MyInternationalizationString.SENDFAIL;
-                         CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.SENDFAIL);
-                     }
-                     else if (stateCodeStr == "EXIST")
-                     {
-                         //璐﹀彿瀛樺湪
-                         loginErrorBtn.TextID = R.MyInternationalizationString.AccountHasBeenRegistered;
-                         CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.AccountHasBeenRegistered);
-                         //phoneET.Text = "";
-                         //IsRightAccount = false;
-                         //sendCodeBtn.Enable = sendCodeBtn.IsSelected = false;
-                     }
-                     else
-                     {
-                         loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                         CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.RequestServerFailed);
-                     }
-                 }
-                 catch
-                 {
-                     loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                 }
-                 finally
-                 {
-                     CommonPage.Loading.Hide();
-                 }
-             };
-
-            //login
-            loginBtn.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-                Shared.Common.CommonPage.Instance.RemoveViewByTag("Register");
-                var accountLogin = new Device.Account.AccountLogin { };
-                Shared.Common.CommonPage.Instance.AddChidren(accountLogin);
-                accountLogin.Show();
-            };
-            //娉ㄥ唽-****涓嶉渶瑕佸厛楠岃瘉楠岃瘉鐮�
-            comfirmBtn.MouseUpEventHandler +=async (sender, e) =>
-            {
-                CommonPage.Loading.Start();
-                try
-                {
-                    var reqDto = new SendDataToServer.RegisterAccountObj()
-                    {
-                        Account = phoneET.Text.Trim(),
-                        Password = pwdET.Text.Trim(),
-                        EnterPassword = pwdComfirmET.Text.Trim(),
-                        Language = CommonPage.ZigBeeLanguage,
-                        Code = codeET.Text.Trim(),
-                        RegisterSoruce = CommonPage.RegisterSoruceFromZIGBEE,
-                        AreaCode=int.Parse(CommonPage.PhoneZoneStr)
-                    };
-                    var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(reqDto);
-                    //楠岃瘉楠岃瘉鐮�
-                    var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ValidataCodeAndRegisterAccount", System.Text.Encoding.UTF8.GetBytes(requestJson));
-                    if (requestRevertObj == null)
-                    {
-                        CommonPage.Instance.FailureToServer();
-                        return;
-                    }
-                    var stateCodeStr = requestRevertObj.StateCode.ToUpper();
-                    if (stateCodeStr == "SUCCESS")
-                    {
-                        var registerSuccess = new Account.RegisterSuccess();
-                        this.AddChidren(registerSuccess);
-                        registerSuccess.Show(phoneET.Text.Trim(), pwdET.Text.Trim());
-                    }
-                    else if (stateCodeStr == "EXIST")
-                    {
-                        //宸叉敞鍐�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.AccountHasBeenRegistered;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.AccountHasBeenRegistered);
-                    }
-                    else if (stateCodeStr == "PARAMETEROREMPTY")
-                    {
-                        //鎻愪緵鐨勫弬鏁伴敊璇�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.PARAMETEROREMPTY);
-                    }
-                    else if (stateCodeStr == "PWDNOCONFIRM")
-                    {
-                        //涓ゆ瀵嗙爜涓嶄竴鏍�
-                        loginErrorBtn.TextID = R.MyInternationalizationString.TwoPasswordInconsistency;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TwoPasswordInconsistency);
-                    }
-                    else if (stateCodeStr == "VALIDCODEANDPHONENOEQUAL")
-                    {
-                        //楠岃瘉鐮侀敊璇�
-                        comfirmBtn.Enable = comfirmBtn.IsSelected = false;
-                        codeET.Text = "";
-                        loginErrorBtn.TextID = R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.VALIDCODEANDPHONENOEQUAL);
-                    }
-                    else
-                    {
-                        loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.RequestServerFailed);
-
-                    }
-                }
-                catch
-                {
-                    loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
-                }
-                finally
-                {
-                    CommonPage.Loading.Hide();
-                }
-            };
-            #endregion
-        }
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/RegistrationPhoneOREmail.cs b/ZigbeeApp/Shared/Phone/Device/Account/RegistrationPhoneOREmail.cs
deleted file mode 100755
index 9cf05d3..0000000
--- a/ZigbeeApp/Shared/Phone/Device/Account/RegistrationPhoneOREmail.cs
+++ /dev/null
@@ -1,132 +0,0 @@
-锘縰sing System;
-using Shared.Common;
-namespace Shared.Phone.Device.Account
-{
-    public class RegistrationPhoneOREmail:FrameLayout
-    {
-        public RegistrationPhoneOREmail()
-        {
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
-            Tag = "Register";
-        }
-        public void Show()
-        {
-            #region midFrameLayout
-            var midFrameLayout = new FrameLayout()
-            {
-                Width = LayoutParams.MatchParent,
-                Height = Application.GetRealHeight(1920),
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
-            };
-            AddChidren(midFrameLayout);
-            #endregion
-
-            #region 甯冨眬logo 鎵嬫満娉ㄥ唽  閭娉ㄥ唽 宸叉湁璐﹀彿锛熺櫥褰�
-
-            var logoBtn = new Button()
-            {
-                Width = Application.GetMinRealAverage(270),
-                Height = Application.GetMinRealAverage(270),
-                Y = Application.GetRealHeight(330),
-                UnSelectedImagePath = "Logo/Logo.png",
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(logoBtn);
-
-            var registerByPhoneFL = new FrameLayout()
-            {
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                Y = Application.GetRealHeight(200) + logoBtn.Bottom,
-                Radius = (uint)Application.GetRealHeight(55),
-                BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(registerByPhoneFL);
-            var registerByPhoneImg = new Button()
-            {
-                X = Application.GetRealWidth(150 - 70),
-                Width = Application.GetMinRealAverage(70),
-                Height = Application.GetMinRealAverage(70),
-                UnSelectedImagePath = "Account/Phone.png",
-                Gravity = Gravity.CenterVertical
-            };
-            registerByPhoneFL.AddChidren(registerByPhoneImg);
-            var registerByPhoneBtn = new Button()
-            {
-                Width = Application.GetRealWidth(350),
-                Gravity=Gravity.CenterHorizontal,
-                TextAlignment = TextAlignment.Center,
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                TextID = R.MyInternationalizationString.RegisterByPhone,
-            };
-            registerByPhoneFL.AddChidren(registerByPhoneBtn);
-
-            var registerByEmailFL = new FrameLayout()
-            {
-                Width = Application.GetRealWidth(700),
-                Height = Application.GetRealHeight(110),
-                Y = registerByPhoneFL.Bottom + Application.GetRealHeight(100),
-                Radius = (uint)Application.GetRealHeight(55),
-                BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(registerByEmailFL);
-            var registerByEmailPic = new Button()
-            {
-                X=Application.GetRealWidth(150-70),
-                Width = Application.GetMinRealAverage(70),
-                Height = Application.GetMinRealAverage(70),
-                UnSelectedImagePath = "Account/Email.png",
-                Gravity=Gravity.CenterVertical
-            };
-            registerByEmailFL.AddChidren(registerByEmailPic);
-            var registerByEmailBtn = new Button()
-            {
-                Width = Application.GetRealWidth(350),
-                TextAlignment = TextAlignment.Center,
-                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                TextID = R.MyInternationalizationString.RegisterByEmail,
-                Gravity = Gravity.CenterHorizontal
-            };
-            registerByEmailFL.AddChidren(registerByEmailBtn);
-            
-            var loginBtn = new Button()
-            {
-                Width = Application.GetRealWidth(500),
-                Height = Application.GetRealHeight(80),
-                Y = midFrameLayout.Bottom-Application.GetRealHeight(200) ,
-                TextID = R.MyInternationalizationString.LoginHadAccountPWD,
-                TextSize = 15,
-                TextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                Gravity = Gravity.CenterHorizontal
-            };
-            midFrameLayout.AddChidren(loginBtn);
-
-            registerByPhoneBtn.MouseUpEventHandler += (sender, e) =>
-            {
-                var registerPhone = new Account.RegistrationByPhone();
-                this.AddChidren(registerPhone);
-                registerPhone.Show();
-            };
-            EventHandler<MouseEventArgs> RegisiterByEmailHandler = (sender, e) =>
-            {
-                var registerEmail = new Account.RegistrationByEmail();
-                this.AddChidren(registerEmail);
-                registerEmail.Show();
-            };
-            registerByEmailBtn.MouseUpEventHandler += RegisiterByEmailHandler;
-            registerByEmailPic.MouseUpEventHandler += RegisiterByEmailHandler;
-
-            loginBtn.MouseDownEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-                var login = new AccountLogin();
-                Shared.Common.CommonPage.Instance.AddChidren(login);
-                login.Show();
-            };
-            #endregion
-        }
-
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/AirSwitch/AirSwitchControl.cs b/ZigbeeApp/Shared/Phone/Device/AirSwitch/AirSwitchControl.cs
index 3157a0d..2e777a0 100755
--- a/ZigbeeApp/Shared/Phone/Device/AirSwitch/AirSwitchControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/AirSwitch/AirSwitchControl.cs
@@ -204,7 +204,7 @@
         public override void RemoveFromParent()
         {
             ZbGateway.StatusList.Remove(this);
-            action();
+            action?.Invoke();
             RemoveUpdateControlDeviceStatuAction();
             base.RemoveFromParent();
         }
@@ -490,7 +490,6 @@
                 Shared.Common.Room.Lists[0].AddDevice(device.FileName);
                 collectionBtn.IsSelected = true;
             }
-            action?.Invoke();
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
index c41f1d2..14cb8c3 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -4,6 +4,7 @@
 using Shared.Phone.UserView;
 using Shared.R;
 using ZigBee.Device;
+using Shared.Phone.Device.CommonForm;
 
 namespace Shared.Phone.Device.Category
 {
@@ -19,17 +20,21 @@
         /// </summary>
         public static Category instance;
         /// <summary>
+        /// low_High
+        /// </summary>
+        private const int low_High= 127;
+        /// <summary>
         /// 鍔熻兘
         /// </summary>
-        public Button functionBtn;
+        private ButtonLineForm functionBtn;
         /// <summary>
         /// 鍦烘櫙
         /// </summary>
-        public Button sceneBtn;
+        private ButtonLineForm sceneBtn;
         /// <summary>
         /// 鑷姩鍖�
         /// </summary>
-        public Button automationBtn;
+        private ButtonLineForm automationBtn;
         /// <summary>
         /// 涓儴鑳屾櫙bodyView
         /// </summary>
@@ -51,10 +56,6 @@
         /// </summary>
         private Device.CommonForm.SelectedStatuButton addBtn;
         /// <summary>
-        /// 鍒嗘爮搴曢儴绾挎潯.
-        /// </summary>
-        private Button line;
-        /// <summary>
         /// 缃戝叧
         /// </summary>
         private ZbGateway zbGateway = null;
@@ -73,11 +74,11 @@
         /// <summary>
         /// 褰撳墠鍔熻兘绫诲瀷鎸夐挳
         /// </summary>
-        private Button tempFunctionTypeBtn;
+        private FunctionButton tempFunctionTypeBtn;
         /// <summary>
         /// 鍔熻兘绫诲瀷鎸夐挳
         /// </summary>
-        private Button functionTypeIMG;
+        private FunctionButton functionTypeIMG;
         /// <summary>
         /// 鍔熻兘绫诲瀷
         /// </summary>
@@ -86,6 +87,14 @@
         /// 璁惧绫诲瀷RowLayout
         /// </summary>
         private RowLayout typeRowLayout;
+        /// <summary>
+        /// 妤煎眰
+        /// </summary>
+        private Button floorBtn;
+        /// <summary>
+        /// 閫夋嫨妤煎眰
+        /// </summary>
+        private Button selectFloorBtn;
 
         #endregion
 
@@ -455,13 +464,13 @@
                                         }
                                     }
                                     break;
-                                case DeviceType.WindowCoveringDevice:
+                                case DeviceType.WindowCoveringDevice:
                                     var rollerShape = deviceUI.CommonDevice as Rollershade;
                                     //璁板綍鍥炲鏃堕棿
                                     rollerShape.LastDateTime = DateTime.Now;
                                     rollerShape.IsOnline = (common as Rollershade).IsOnline;
                                     for (int j = 0; j < rowLayout.ChildrenCount; j++)
-                                    {
+                                    {
                                         var tempView = rowLayout.GetChildren(j);
                                         if (tempView.Tag == null)
                                         {
@@ -520,8 +529,30 @@
         /// </summary>
         public Category()
         {
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
+            BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
             instance = this;
+        }
+
+        public void InitFloor()
+        {
+            Config.Instance.Home.FloorDics.Clear();
+            Config.Instance.Home.FloorDics.Add("Floor1", "涓�妤�");
+            Config.Instance.Home.FloorDics.Add("Floor2", "浜屾ゼ");
+            Config.Instance.Home.FloorDics.Add("Floor3", "涓夋ゼ");
+            Config.Instance.Home.FloorDics.Add("Floor4", "鍥涙ゼ");
+            Config.Instance.Home.FloorDics.Add("Floor5", "鈶ゆゼ");
+            if (string.IsNullOrEmpty(Config.Instance.Home.CurrentFloorId))
+            {
+                if (Config.Instance.Home.FloorDics.Count > 0)
+                {
+                    foreach (var floor in Config.Instance.Home.FloorDics)
+                    {
+                        Config.Instance.Home.CurrentFloorId=floor.Key;
+                        break;
+                    }
+                }
+            }
+            //Config.Instance.Save();
         }
 
         /// <summary>
@@ -530,133 +561,175 @@
         /// <param name="selectedBtn">閫変腑閭d釜鐣岄潰 0--鍔熻兘 1--鍦烘櫙 2--鑷姩鍖� </param>
         public void Show(int selectedBtn = 1)
         {
+            InitFloor();
             ZbGateway.StatusList.Add(this);
             RemoveAll();
+
             #region topview
             var topView = new FrameLayout()
             {
-                Height = Application.GetRealHeight(CommonPage.Navigation_Height),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+                Y = Application.GetRealHeight(104),
+                Height = Application.GetRealHeight(low_High),
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
             };
             this.AddChidren(topView);
 
             var title = new Button()
             {
-                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
-                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),
-                TextAlignment = TextAlignment.Center,
+                X = Application.GetRealWidth(CommonFormResouce.X_Left),
+                Height = Application.GetRealHeight(95),
+                Width = Application.GetRealWidth(CommonFormResouce.TopTitle_Width),
+                Gravity = Gravity.CenterVertical,
+                TextAlignment = TextAlignment.CenterLeft,
                 TextID = R.MyInternationalizationString.Category,
                 TextSize = 20,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Width = Application.GetRealWidth(CommonPage.AppRealWidth - 500),
-                Gravity = Gravity.CenterHorizontal
+                TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor,
             };
             topView.AddChidren(title);
 
-            addBtn = new Device.CommonForm.SelectedStatuButton()
+            addBtn = new SelectedStatuButton()
             {
-                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
-                Width = Application.GetMinRealAverage(100),
-                Height = Application.GetMinRealAverage(100),
-                UnSelectedImagePath = "Item/Add.png",
-                SelectedImagePath = "Item/AddSelected.png",
-                X = Application.GetRealWidth(CommonPage.AppRealWidth - 150),
+                X = Application.GetRealWidth(953),
+                Width = Application.GetMinRealAverage(104),
+                Height = Application.GetMinRealAverage(104),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Item/Add_Category.png",
+                SelectedImagePath = "Item/Add_Category.png"
             };
             topView.AddChidren(addBtn);
             #endregion
 
             #region midFL
-            int functionSceneAuto_width;
-            //鎴愬憳娌℃湁鏉冮檺灞曠ず鑷姩鍖栫晫闈�
-            if (UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 3)
-            {
-                functionSceneAuto_width = 1080 / 2;
-            }
-            else
-            {
-                functionSceneAuto_width = 1080 / 3;
-            }
-            var functionSceneAuto_height = 120;
             var midFL = new FrameLayout
             {
                 Y = topView.Bottom,
-                Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.TabbarHeight) - topView.Bottom
+                Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.TabbarHeight) - topView.Bottom,
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
             };
             AddChidren(midFL);
+
             var functionSceneAutoBG = new FrameLayout()
             {
-                Height = Application.GetRealHeight(functionSceneAuto_height),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
+                Height = Application.GetRealHeight(low_High),
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
             };
             midFL.AddChidren(functionSceneAutoBG);
             //鍔熻兘
-            functionBtn = new Button()
-            {
-                Width = Application.GetRealWidth(functionSceneAuto_width),
-                Height = Application.GetRealHeight(functionSceneAuto_height),
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                TextAlignment = TextAlignment.Center,
-                TextSize = 16,
-                TextID = R.MyInternationalizationString.Function,
-                IsSelected = false
-            };
-            midFL.AddChidren(functionBtn);
+            functionBtn = new ButtonLineForm(CommonFormResouce.X_Left, 34, 150, 68);
+            functionSceneAutoBG.AddChidren(functionBtn);
+            functionBtn.Init();
+            functionBtn.SetTitle(R.MyInternationalizationString.Function);
+
             //鍦烘櫙
-            sceneBtn = new Button()
-            {
-                X = functionBtn.Right,
-                Width = Application.GetRealWidth(functionSceneAuto_width),
-                Height = Application.GetRealHeight(functionSceneAuto_height),
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                TextAlignment = TextAlignment.Center,
-                TextSize = 16,
-                TextID = R.MyInternationalizationString.Scence,
-                IsSelected = false
-            };
-            midFL.AddChidren(sceneBtn);
+            sceneBtn = new ButtonLineForm(CommonFormResouce.X_Left + 150 + 20, 34, 150, 68);
+            functionSceneAutoBG.AddChidren(sceneBtn);
+            sceneBtn.Init();
+            sceneBtn.SetTitle(R.MyInternationalizationString.Scence);
+
             //鑷姩鍖�
-            automationBtn = new Button()
-            {
-                X = sceneBtn.Right,
-                Width = Application.GetRealWidth(functionSceneAuto_width),
-                Height = Application.GetRealHeight(functionSceneAuto_height),
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                TextAlignment = TextAlignment.Center,
-                TextSize = 16,
-                TextID = R.MyInternationalizationString.Automation,
-                IsSelected = false
-            };
+            automationBtn = new ButtonLineForm(CommonFormResouce.X_Left + 150 * 2 + 20, 34, 150, 68);
+            automationBtn.Init();
+            automationBtn.SetTitle(R.MyInternationalizationString.Automation);
             //闅愯棌鑷姩鍖�
             if (UserCenter.UserCenterResourse.UserInfo.AuthorityNo != 3)
             {
-                midFL.AddChidren(automationBtn);
+                functionSceneAutoBG.AddChidren(automationBtn);
             }
 
-            var functionSceneBottomLine = new Button()
+            floorBtn = new Button()
             {
-                Y = functionBtn.Bottom,
-                Height = CommonPage.LineHeight,
-                X = functionBtn.X,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
+                X = Application.GetRealWidth(750),
+                Width = Application.GetRealWidth(200),
+                Height = Application.GetRealHeight(60),
+                Gravity = Gravity.CenterVertical,
+                TextAlignment = TextAlignment.CenterRight,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
             };
-            midFL.AddChidren(functionSceneBottomLine);
-            line = new Button()
+
+            selectFloorBtn = new Button()
             {
-                Y = functionBtn.Bottom,
-                Height = CommonPage.LineHeight,
-                X = sceneBtn.X,
-                Width = Application.GetRealWidth(functionSceneAuto_width),
-                BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor
+                X = Application.GetRealWidth(950),
+                Width = Application.GetMinRealAverage(69),
+                Height = Application.GetMinRealAverage(69),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Item/Drop_Down.png"
             };
-            midFL.AddChidren(line);
+
+            if (Config.Instance.Home.FloorDics.Count > 0)
+            {
+                floorBtn.Text = Config.Instance.Home.GetCurrentFloorName();
+                functionSceneAutoBG.AddChidren(floorBtn);
+                functionSceneAutoBG.AddChidren(selectFloorBtn);
+            }
+
+            var roomFL = new HorizontalScrolViewLayout()
+            {
+                X= Application.GetRealWidth(CommonFormResouce.X_Left),
+                Y = functionSceneAutoBG.Bottom,
+                Height = Application.GetRealHeight(167),
+                Width=Application.GetRealWidth(CommonPage.AppRealWidth-CommonFormResouce.X_Left),
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
+            };
+            midFL.AddChidren(roomFL);
+
+            Button curBtn = new Button();
+            for(int i=0;i<Config.Instance.Home.RoomFilePathList.Count;i++)
+            {
+                var roomFilePath = Config.Instance.Home.RoomFilePathList[i];
+                var room = Shared.Common.Room.GetRoomByFilePath(roomFilePath);
+                if (room == null)
+                {
+                    continue;
+                }
+                var row = new RowLayout()
+                {
+                    Width = Application.GetRealWidth(187+50),
+                    Height = Application.GetRealHeight(167),
+                    LineColor= ZigbeeColor.Current.GXCGrayBackgroundColor
+                };
+                roomFL.AddChidren(row);
+
+                var roomBtn = new Button()
+                {
+                    Width = Application.GetRealWidth(187),
+                    Height = Application.GetRealHeight(78),
+                    Radius=(uint)Application.GetRealHeight(78/2),
+                    Gravity = Gravity.Center,
+                    Text=room.Name,
+                    TextColor=ZigbeeColor.Current.GXCTextGrayColor,
+                    SelectedTextColor=ZigbeeColor.Current.GXCTextWhiteColor,
+                    BackgroundColor=ZigbeeColor.Current.GXCButtonUnSelectedColor3,
+                    SelectedBackgroundColor=ZigbeeColor.Current.GXCButtonSelectedColor,
+                    BorderColor=ZigbeeColor.Current.GXCBorderUnSelectedColor,
+                    BorderWidth=1
+                };
+                row.AddChidren(roomBtn);
+                if(Shared.Common.Room.CurrentRoom.FileName==roomFilePath)
+                {
+                    roomBtn.IsSelected = true;
+                    curBtn = roomBtn;
+                }
+
+                roomBtn.MouseUpEventHandler += (sender, e) =>
+                {
+                    if ((sender as Button) == curBtn)
+                    {
+                        return;
+                    }
+                    (sender as Button).IsSelected = true;
+                    curBtn.IsSelected = false;
+                    curBtn = (sender as Button);
+                    Shared.Common.Room.CurrentRoom = room;
+                };
+            }
+            
+
             //鍔熻兘鍜屽満鏅痓odyView
             functionSceneBodyView = new FrameLayout()
             {
-                Y = line.Bottom,
-                Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.TabbarHeight) - functionBtn.Height - topView.Height - CommonPage.LineHeight,
+                Y = roomFL.Bottom,
+                Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.TabbarHeight) - functionBtn.Height - topView.Height - roomFL.Height - CommonPage.LineHeight,
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
             };
             midFL.AddChidren(functionSceneBodyView);
 
@@ -664,22 +737,18 @@
             {
                 addBtn.Visible = false;
                 functionBtn.IsSelected = true;
-                line.X = functionBtn.X;
             }
             else if (selectedBtn == 1)
             {
                 addBtn.Visible = true;
                 sceneBtn.IsSelected = true;
-                line.X = sceneBtn.X;
             }
             else if (selectedBtn == 2)
             {
                 addBtn.Visible = true;
                 automationBtn.IsSelected = true;
-                line.X = automationBtn.X;
             }
             RefreshBodyView();
-
 
             #endregion
             //缁戝畾鎸夐挳浜嬩欢
@@ -695,13 +764,33 @@
         private void BindEvent()
         {
             //閫夋嫨鍔熻兘鍒嗘爮
-            functionBtn.MouseUpEventHandler += FunctionBtn_MouseUpEventHandler;
+            functionBtn.NameBtn.MouseUpEventHandler += FunctionBtn_MouseUpEventHandler;
             //閫夋嫨鍦烘櫙鍒嗘爮
-            sceneBtn.MouseUpEventHandler += SceneBtn_MouseUpEventHandler;
+            sceneBtn.NameBtn.MouseUpEventHandler += SceneBtn_MouseUpEventHandler;
             //閫変腑鑷姩鍖�
-            automationBtn.MouseUpEventHandler += AutomationBtn_MouseUpEventHandler;
+            automationBtn.NameBtn.MouseUpEventHandler += AutomationBtn_MouseUpEventHandler;
             //鍙充笂瑙掓坊鍔犳寜閽�
             addBtn.MouseUpEventHandler += AddBtn_MouseUpEventHandler;
+
+            selectFloorBtn.MouseUpEventHandler += SelectedFloor_MouseUpEventHandler;
+            floorBtn.MouseUpEventHandler+= SelectedFloor_MouseUpEventHandler;
+
+        }
+
+        /// <summary>
+        /// 閫夋嫨妤煎眰
+        /// </summary>
+        /// <param name="sender">Sender.</param>
+        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
+        private void SelectedFloor_MouseUpEventHandler(object sender, MouseEventArgs mouseEventArgs)
+        {
+            var floors = new SelectFloor ();
+            AddChidren(floors);
+            floors.Init(599,357);
+            floors.FloorAction += (floorName) =>
+            {
+                floorBtn.Text = floorName;
+            };
         }
 
         /// <summary>
@@ -714,7 +803,6 @@
             functionBtn.IsSelected = true;
             sceneBtn.IsSelected = false;
             automationBtn.IsSelected = false;
-            line.X = functionBtn.X;
             addBtn.Visible = false;
             RefreshBodyView();
         }
@@ -729,7 +817,6 @@
             functionBtn.IsSelected = false;
             sceneBtn.IsSelected = true;
             automationBtn.IsSelected = false;
-            line.X = sceneBtn.X;
             addBtn.Visible = true;
             RefreshBodyView();
         }
@@ -744,7 +831,6 @@
             functionBtn.IsSelected = false;
             sceneBtn.IsSelected = false;
             automationBtn.IsSelected = true;
-            line.X = automationBtn.X;
             addBtn.Visible = true;
             RefreshBodyView();
         }
@@ -852,25 +938,25 @@
             {
                 functionTypeScrowView = new HorizontalScrolViewLayout
                 {
-                    Height = Application.GetRealHeight(CommonPage.RowHeight) - 1,
-                    Width = Application.GetRealWidth(CommonPage.AppRealWidth)
+                    X=Application.GetRealWidth(CommonFormResouce.X_Left),
+                    Height = Application.GetRealHeight(279),
+                    Width = Application.GetRealWidth(1028),
+                    BackgroundColor=ZigbeeColor.Current.GXCBackgroundColor
                 };
                 functionSceneBodyView.AddChidren(functionTypeScrowView);
-                var typeLine = new Button()
-                {
-                    Y = functionTypeScrowView.Bottom,
-                    Width = Application.GetRealWidth(CommonPage.AppRealWidth),
-                    Height = 1,
-                    BackgroundColor = ZigbeeColor.Current.GXCLineColor
-                };
-                functionSceneBodyView.AddChidren(typeLine);
+
                 deviceListScrolView = new VerticalScrolViewLayout
                 {
-                    Y = typeLine.Bottom,
-                    Height = functionSceneBodyView.Height - Application.GetRealHeight(CommonPage.RowHeight) - 1
+                    X = Application.GetRealWidth(CommonFormResouce.X_Left),
+                    Y = functionTypeScrowView.Bottom + Application.GetRealHeight(50),
+                    Width = Application.GetRealWidth(1028),
+                    Height = functionSceneBodyView.Height - Application.GetRealHeight(279+50) - 1,
+                    BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+
                 };
                 functionSceneBodyView.AddChidren(deviceListScrolView);
-                tempFunctionTypeBtn = new Button();
+                tempFunctionTypeBtn = new FunctionButton();
+                
                 foreach (var deviceType in Common.Room.AllRoomDeviceTypeList)
                 {
                     typeRowLayout = new RowLayout()
@@ -880,22 +966,23 @@
                         Tag = deviceType
                     };
                     functionTypeScrowView.AddChidren(typeRowLayout);
-                    functionTypeIMG = new Button()
+
+                    functionTypeIMG = new FunctionButton()
                     {
-                        Width = Application.GetMinRealAverage(110),
-                        Height = Application.GetMinRealAverage(110),
-                        Gravity = Gravity.Center,
-                        UnSelectedImagePath = DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType),
-                        SelectedImagePath = DeviceUI.GetDeviceTypeSelectedImagePath(deviceType),
                         Tag = deviceType
                     };
+                    functionTypeIMG.Init(DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType), DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType));
+                    functionTypeIMG.SetTitle(DeviceUI.GetDeviceTypeName(deviceType));
                     typeRowLayout.AddChidren(functionTypeIMG);
 
-                    functionTypeIMG.MouseUpEventHandler += ShowSameTypeFunction;
+
+                    functionTypeIMG.ImageBtn.MouseUpEventHandler += ShowSameTypeFunction;
+                    functionTypeIMG.NameBtn.MouseUpEventHandler += ShowSameTypeFunction;
+                    functionTypeIMG.ImageBG.MouseUpEventHandler += ShowSameTypeFunction;
 
                     if (deviceType == Shared.Common.Room.AllRoomDeviceUIList[0].CommonDevice.Type)
                     {
-                        ShowSameTypeFunction(functionTypeIMG, null);
+                        ShowSameTypeFunction(functionTypeIMG.ImageBtn, null);
                     }
                 }
             }
@@ -911,8 +998,9 @@
             //閫夋嫨鍔熻兘--鐩存帴浠庢埧闂寸殑devicelist涓幏鍙�
             Shared.Common.Room.GetAllRoomDeviceUIList();
             tempFunctionTypeBtn.IsSelected = false;
-            (typeSender as Button).IsSelected = true;
-            tempFunctionTypeBtn = (typeSender as Button);
+            tempFunctionTypeBtn = (typeSender as Button).Parent as FunctionButton;
+            ((typeSender as Button).Parent as FunctionButton).IsSelected = true;
+          
             deviceListScrolView.RemoveAll();
 
             var sameTypeList = new List<DeviceUI> { };
@@ -935,13 +1023,14 @@
                 //鍒犻櫎璁惧
                 EventHandler<MouseEventArgs> delEvent = (delSender, delE) =>
                 {
-                    var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ConfirmDelete), Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim));
-                    alert.Show();
-                    alert.ResultEventHandler += (send1, e2) =>
+                    var alert = new CustomAlert();
+                    AddChidren(alert);
+                    alert.Show(Language.StringByID(R.MyInternationalizationString.ConfirmDelete));
+                    alert.ResultEventHandler += (e2) =>
                     {
                         if (e2)
                         {
-                            Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.CommonDevice, false);
+                            Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.CommonDevice);
                             deviceListScrolView.RemoveViewByTag((delSender as Button).Tag);
                             sameTypeList.Remove(deviceUI);
                             if (sameTypeList.Count == 0)
@@ -963,11 +1052,11 @@
                 if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.OnOffOutput)
                 {
                     //鐏�
-                    var light = deviceUI.CommonDevice as ZigBee.Device.ToggleLight;
-                    //琛ヤ笂闈炶繙绋�
-                    if (light.Gateway == null)
-                    {
-                        continue;
+                    var light = deviceUI.CommonDevice as ZigBee.Device.ToggleLight;
+                    //琛ヤ笂闈炶繙绋�
+                    if (light.Gateway == null)
+                    {
+                        continue;
                     }
                     if (light.Gateway.IsVirtual)
                     {
@@ -989,53 +1078,27 @@
 
                     var deviceTypeRowLayout = new RowLayout()
                     {
-                        Height = Application.GetRealHeight(CommonPage.RowHeight),
-                        LineColor = ZigbeeColor.Current.GXCLineColor,
+                        Height = Application.GetRealHeight(127+35),
+                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                         Tag = deviceUI
                     };
                     deviceListScrolView.AddChidren(deviceTypeRowLayout);
-                    var deviceIMG = new Button()
-                    {
-                        X = Application.GetRealWidth(CommonPage.XLeft),
-                        Width = Application.GetMinRealAverage(110),
-                        Height = Application.GetMinRealAverage(110),
-                        UnSelectedImagePath = deviceUI.IconPath,
-                        SelectedImagePath = deviceUI.OnlineIconPath,
-                        Gravity = Gravity.CenterVertical,
-                        IsSelected = light.IsOnline == 1,
-                        Tag = deviceStatus_Online
-                    };
-                    deviceTypeRowLayout.AddChidren(deviceIMG);
-                    var deviceNameBtn = new Button()
-                    {
-                        X = Application.GetRealWidth(50) + deviceIMG.Right,
-                        Width = Application.GetRealWidth(500),
-                        Text = deviceUI.CommonDevice.DeviceEpointName,
-                        TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                        TextAlignment = TextAlignment.CenterLeft
-                    };
-                    deviceTypeRowLayout.AddChidren(deviceNameBtn);
-                    var switchBtn = new Button
-                    {
-                        X = deviceTypeRowLayout.Right - Application.GetRealWidth(200),
-                        Width = Application.GetMinRealAverage(183),
-                        Height = Application.GetMinRealAverage(123),
-                        UnSelectedImagePath = "Item/Switch.png",
-                        SelectedImagePath = "Item/SwitchSelected.png",
-                        IsSelected = light.OnOffStatus == 1,
-                        Tag = deviceStatus_OnOffStatus,
-                        Gravity = Gravity.CenterVertical
-                    };
-                    deviceTypeRowLayout.AddChidren(switchBtn);
 
-                    switchBtn.MouseUpEventHandler += (send2, e2) =>
+                    var deviceRow = new FunctionRow(0, 35);
+                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
+                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
+                    deviceRow.SetStatu(light.IsOnline == 1);
+                    deviceTypeRowLayout.AddChidren(deviceRow);
+
+
+                    deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) =>
                     {
                         zbGateway = deviceUI.CommonDevice.Gateway;
                         sendedControlCommand = false;
                         zbGateway.ReportAction += UpdateDeviceControllStatu;
                         AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, deviceUI.CommonDevice);
-                        switchBtn.IsSelected = !switchBtn.IsSelected;
-                        if (switchBtn.IsSelected == true)
+                        (send2 as CommonForm.SelectedStatuButton).IsSelected = !(send2 as CommonForm.SelectedStatuButton).IsSelected;
+                        if ((send2 as CommonForm.SelectedStatuButton).IsSelected)
                         {
                             light.SwitchControl(1);
                         }
@@ -1058,6 +1121,14 @@
                         });
                     };
 
+                    var editBtn = new CommonForm.RowLayoutEditButton()
+                    {
+                        Tag = deviceUI,
+                        Radius = 0
+                    };
+                    deviceTypeRowLayout.AddRightView(editBtn);
+                    editBtn.MouseUpEventHandler += deviceDetailHandler;
+
                     var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                     {
                         Tag = deviceUI,
@@ -1065,10 +1136,6 @@
                     };
                     deviceTypeRowLayout.AddRightView(delBtn);
                     delBtn.MouseUpEventHandler += delEvent;
-
-                    deviceTypeRowLayout.MouseUpEventHandler += deviceDetailHandler;
-                    deviceIMG.MouseUpEventHandler += deviceDetailHandler;
-                    deviceNameBtn.MouseUpEventHandler += deviceDetailHandler;
                 }
                 else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.AirSwitch)
                 {
@@ -1098,53 +1165,27 @@
 
                     var deviceTypeRowLayout = new RowLayout()
                     {
-                        Height = Application.GetRealHeight(CommonPage.RowHeight),
-                        LineColor = ZigbeeColor.Current.GXCLineColor,
+                        Height = Application.GetRealHeight(127 + 35),
+                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                         Tag = deviceUI
                     };
                     deviceListScrolView.AddChidren(deviceTypeRowLayout);
-                    var deviceIMG = new Button()
-                    {
-                        X = Application.GetRealWidth(CommonPage.XLeft),
-                        Width = Application.GetMinRealAverage(110),
-                        Height = Application.GetMinRealAverage(110),
-                        UnSelectedImagePath = deviceUI.IconPath,
-                        SelectedImagePath = deviceUI.OnlineIconPath,
-                        Gravity = Gravity.CenterVertical,
-                        IsSelected = airSwitch.IsOnline == 1,
-                        Tag = deviceStatus_Online
-                    };
-                    deviceTypeRowLayout.AddChidren(deviceIMG);
-                    var deviceNameBtn = new Button()
-                    {
-                        X = Application.GetRealWidth(50) + deviceIMG.Right,
-                        Width = Application.GetRealWidth(500),
-                        Text = deviceUI.CommonDevice.DeviceEpointName,
-                        TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                        TextAlignment = TextAlignment.CenterLeft
-                    };
-                    deviceTypeRowLayout.AddChidren(deviceNameBtn);
-                    var switchBtn = new Button
-                    {
-                        X = deviceTypeRowLayout.Right - Application.GetRealWidth(200),
-                        Width = Application.GetMinRealAverage(183),
-                        Height = Application.GetMinRealAverage(123),
-                        UnSelectedImagePath = "Item/Switch.png",
-                        SelectedImagePath = "Item/SwitchSelected.png",
-                        IsSelected = airSwitch.OnOffStatus == 1,
-                        Tag = deviceStatus_OnOffStatus,
-                        Gravity = Gravity.CenterVertical
-                    };
-                    deviceTypeRowLayout.AddChidren(switchBtn);
-                    switchBtn.MouseUpEventHandler += (send2, e2) =>
+
+                    var deviceRow = new FunctionRow(0, 35);
+                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
+                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
+                    deviceRow.SetStatu(airSwitch.IsOnline == 1);
+                    deviceTypeRowLayout.AddChidren(deviceRow);
+
+                    deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) =>
                     {
                         zbGateway = deviceUI.CommonDevice.Gateway;
                         sendedControlCommand = false;
                         zbGateway.ReportAction += UpdateDeviceControllStatu;
                         AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, deviceUI.CommonDevice);
 
-                        switchBtn.IsSelected = !switchBtn.IsSelected;
-                        if (switchBtn.IsSelected == true)
+                        (send2 as CommonForm.SelectedStatuButton).IsSelected = !(send2 as CommonForm.SelectedStatuButton).IsSelected;
+                        if ((send2 as CommonForm.SelectedStatuButton).IsSelected)
                         {
                             airSwitch.SwitchControl(1);
                         }
@@ -1166,6 +1207,15 @@
                             }
                         });
                     };
+
+                    var editBtn = new CommonForm.RowLayoutEditButton()
+                    {
+                        Tag = deviceUI,
+                        Radius = 0
+                    };
+                    deviceTypeRowLayout.AddRightView(editBtn);
+                    editBtn.MouseUpEventHandler += deviceDetailHandler;
+
                     var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                     {
                         Tag = deviceUI,
@@ -1173,10 +1223,6 @@
                     };
                     deviceTypeRowLayout.AddRightView(delBtn);
                     delBtn.MouseUpEventHandler += delEvent;
-
-                    deviceTypeRowLayout.MouseUpEventHandler += deviceDetailHandler;
-                    deviceIMG.MouseUpEventHandler += deviceDetailHandler;
-                    deviceNameBtn.MouseUpEventHandler += deviceDetailHandler;
                 }
                 else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.DimmableLight)
                 {
@@ -1208,53 +1254,27 @@
 
                     var deviceTypeRowLayout = new RowLayout()
                     {
-                        Height = Application.GetRealHeight(CommonPage.RowHeight),
-                        LineColor = ZigbeeColor.Current.GXCLineColor,
+                        Height = Application.GetRealHeight(127 + 35),
+                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                         Tag = deviceUI
                     };
                     deviceListScrolView.AddChidren(deviceTypeRowLayout);
-                    var deviceIMG = new Button()
-                    {
-                        X = Application.GetRealWidth(CommonPage.XLeft),
-                        Width = Application.GetMinRealAverage(110),
-                        Height = Application.GetMinRealAverage(110),
-                        UnSelectedImagePath = deviceUI.IconPath,
-                        SelectedImagePath = deviceUI.OnlineIconPath,
-                        Gravity = Gravity.CenterVertical,
-                        IsSelected = dimmableLight.IsOnline == 1,
-                        Tag = deviceStatus_Online
-                    };
-                    deviceTypeRowLayout.AddChidren(deviceIMG);
-                    var deviceNameBtn = new Button()
-                    {
-                        X = Application.GetRealWidth(50) + deviceIMG.Right,
-                        Width = Application.GetRealWidth(500),
-                        Text = deviceUI.CommonDevice.DeviceEpointName,
-                        TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                        TextAlignment = TextAlignment.CenterLeft
-                    };
-                    deviceTypeRowLayout.AddChidren(deviceNameBtn);
-                    var switchBtn = new Button
-                    {
-                        X = deviceTypeRowLayout.Right - Application.GetRealWidth(200),
-                        Width = Application.GetMinRealAverage(183),
-                        Height = Application.GetMinRealAverage(123),
-                        UnSelectedImagePath = "Item/Switch.png",
-                        SelectedImagePath = "Item/SwitchSelected.png",
-                        IsSelected = dimmableLight.OnOffStatus == 1,
-                        Tag = deviceStatus_OnOffStatus,
-                        Gravity = Gravity.CenterVertical
-                    };
-                    deviceTypeRowLayout.AddChidren(switchBtn);
-                    switchBtn.MouseUpEventHandler += (send2, e2) =>
+
+                    var deviceRow = new FunctionRow(0, 35);
+                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
+                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
+                    deviceRow.SetStatu(dimmableLight.IsOnline == 1);
+                    deviceTypeRowLayout.AddChidren(deviceRow);
+
+                    deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) =>
                     {
                         zbGateway = deviceUI.CommonDevice.Gateway;
                         sendedControlCommand = false;
                         zbGateway.ReportAction += UpdateDeviceControllStatu;
                         AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, deviceUI.CommonDevice);
 
-                        switchBtn.IsSelected = !switchBtn.IsSelected;
-                        if (switchBtn.IsSelected == true)
+                        (send2 as CommonForm.SelectedStatuButton).IsSelected = !(send2 as CommonForm.SelectedStatuButton).IsSelected;
+                        if ((send2 as CommonForm.SelectedStatuButton).IsSelected)
                         {
                             dimmableLight.SwitchControl(1);
                         }
@@ -1276,6 +1296,15 @@
                             }
                         });
                     };
+
+                    var editBtn = new CommonForm.RowLayoutEditButton()
+                    {
+                        Tag = deviceUI,
+                        Radius = 0
+                    };
+                    deviceTypeRowLayout.AddRightView(editBtn);
+                    editBtn.MouseUpEventHandler += deviceDetailHandler;
+
                     var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                     {
                         Tag = deviceUI,
@@ -1283,10 +1312,7 @@
                     };
                     deviceTypeRowLayout.AddRightView(delBtn);
                     delBtn.MouseUpEventHandler += delEvent;
-
-                    deviceTypeRowLayout.MouseUpEventHandler += deviceDetailHandler;
-                    deviceIMG.MouseUpEventHandler += deviceDetailHandler;
-                    deviceNameBtn.MouseUpEventHandler += deviceDetailHandler;
+                   
                 }
                 else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.Thermostat)
                 {
@@ -1326,53 +1352,27 @@
 
                     var deviceTypeRowLayout = new RowLayout()
                     {
-                        Height = Application.GetRealHeight(CommonPage.RowHeight),
-                        LineColor = ZigbeeColor.Current.GXCLineColor,
+                        Height = Application.GetRealHeight(127 + 35),
+                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                         Tag = deviceUI
                     };
                     deviceListScrolView.AddChidren(deviceTypeRowLayout);
-                    var deviceIMG = new Button()
-                    {
-                        X = Application.GetRealWidth(CommonPage.XLeft),
-                        Width = Application.GetMinRealAverage(110),
-                        Height = Application.GetMinRealAverage(110),
-                        UnSelectedImagePath = deviceUI.IconPath,
-                        SelectedImagePath = deviceUI.OnlineIconPath,
-                        Gravity = Gravity.CenterVertical,
-                        IsSelected = ac.IsOnline == 1,
-                        Tag = deviceStatus_Online
-                    };
-                    deviceTypeRowLayout.AddChidren(deviceIMG);
-                    var deviceNameBtn = new Button()
-                    {
-                        X = Application.GetRealWidth(50) + deviceIMG.Right,
-                        Width = Application.GetRealWidth(500),
-                        Text = deviceUI.CommonDevice.DeviceEpointName,
-                        TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                        TextAlignment = TextAlignment.CenterLeft
-                    };
-                    deviceTypeRowLayout.AddChidren(deviceNameBtn);
-                    var switchBtn = new Button
-                    {
-                        X = deviceTypeRowLayout.Right - Application.GetRealWidth(200),
-                        Width = Application.GetMinRealAverage(183),
-                        Height = Application.GetMinRealAverage(123),
-                        UnSelectedImagePath = "Item/Switch.png",
-                        SelectedImagePath = "Item/SwitchSelected.png",
-                        IsSelected = Device.AC.ACControlBase.IsOpen(ac),
-                        Tag = deviceStatus_OnOffStatus,
-                        Gravity = Gravity.CenterVertical
-                    };
-                    deviceTypeRowLayout.AddChidren(switchBtn);
-                    switchBtn.MouseUpEventHandler += (send2, e2) =>
+
+                    var deviceRow = new FunctionRow(0, 35);
+                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
+                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
+                    deviceRow.SetStatu(ac.IsOnline == 1);
+                    deviceTypeRowLayout.AddChidren(deviceRow);
+
+                    deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) =>
                     {
                         zbGateway = deviceUI.CommonDevice.Gateway;
                         sendedControlCommand = false;
                         zbGateway.ReportAction += UpdateDeviceControllStatu;
                         AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, deviceUI.CommonDevice);
 
-                        switchBtn.IsSelected = !switchBtn.IsSelected;
-                        if (switchBtn.IsSelected == true)
+                        (send2 as CommonForm.SelectedStatuButton).IsSelected = !(send2 as CommonForm.SelectedStatuButton).IsSelected;
+                        if ((send2 as CommonForm.SelectedStatuButton).IsSelected)
                         {
                             ac.Open();
                         }
@@ -1394,6 +1394,15 @@
                             }
                         });
                     };
+
+                    var editBtn = new CommonForm.RowLayoutEditButton()
+                    {
+                        Tag = deviceUI,
+                        Radius = 0
+                    };
+                    deviceTypeRowLayout.AddRightView(editBtn);
+                    editBtn.MouseUpEventHandler += deviceDetailHandler;
+
                     var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                     {
                         Tag = deviceUI,
@@ -1401,10 +1410,6 @@
                     };
                     deviceTypeRowLayout.AddRightView(delBtn);
                     delBtn.MouseUpEventHandler += delEvent;
-
-                    deviceTypeRowLayout.MouseUpEventHandler += deviceDetailHandler;
-                    deviceIMG.MouseUpEventHandler += deviceDetailHandler;
-                    deviceNameBtn.MouseUpEventHandler += deviceDetailHandler;
                 }
                 else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.WindowCoveringDevice)
                 {
@@ -1434,63 +1439,25 @@
 
                     var deviceTypeRowLayout = new RowLayout()
                     {
-                        Height = Application.GetRealHeight(CommonPage.RowHeight),
+                        Height = Application.GetRealHeight(127 + 35),
                         LineColor = ZigbeeColor.Current.GXCLineColor,
                         Tag = deviceUI
                     };
                     deviceListScrolView.AddChidren(deviceTypeRowLayout);
-                    var deviceIMG = new Button()
-                    {
-                        X = Application.GetRealWidth(CommonPage.XLeft),
-                        Width = Application.GetMinRealAverage(110),
-                        Height = Application.GetMinRealAverage(110),
-                        UnSelectedImagePath = deviceUI.IconPath,
-                        SelectedImagePath = deviceUI.OnlineIconPath,
-                        Gravity = Gravity.CenterVertical,
-                        IsSelected = rollerShade.IsOnline == 1,
-                        Tag = deviceStatus_Online
-                    };
-                    deviceTypeRowLayout.AddChidren(deviceIMG);
-                    var deviceNameBtn = new Button()
-                    {
-                        X = Application.GetRealWidth(50) + deviceIMG.Right,
-                        Width = Application.GetRealWidth(350),
-                        Text = deviceUI.CommonDevice.DeviceEpointName,
-                        TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                        TextAlignment = TextAlignment.CenterLeft
-                    };
-                    deviceTypeRowLayout.AddChidren(deviceNameBtn);
 
-                    var closeBtn = new Device.CommonForm.SelectedStatuButton()
+                    var deviceRow = new FunctionRow(0, 35);
+                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
+                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
+                    deviceRow.SetStatu(rollerShade.IsOnline == 1);
+                    deviceTypeRowLayout.AddChidren(deviceRow);
+
+                    var editBtn = new CommonForm.RowLayoutEditButton()
                     {
-                        X = Application.GetRealWidth(50) + deviceNameBtn.Right,
-                        Width = Application.GetMinRealAverage(110),
-                        Height = Application.GetMinRealAverage(110),
-                        Gravity = Gravity.CenterVertical,
-                        UnSelectedImagePath = "WindowCovering/RollerShadeClose.png",
-                        SelectedImagePath = "WindowCovering/RollerShadeCloseSelected.png",
+                        Tag = deviceUI,
+                        Radius = 0
                     };
-                    deviceTypeRowLayout.AddChidren(closeBtn);
-                    var stopBtn = new Device.CommonForm.SelectedStatuButton()
-                    {
-                        X = Application.GetRealWidth(50) + closeBtn.Right,
-                        Width = Application.GetMinRealAverage(110),
-                        Height = Application.GetMinRealAverage(110),
-                        Gravity = Gravity.CenterVertical,
-                        UnSelectedImagePath = "WindowCovering/RollerShadeStop.png",
-                        SelectedImagePath = "WindowCovering/RollerShadeStopSelected.png",
-                    };
-                    deviceTypeRowLayout.AddChidren(stopBtn);
-                    var openBtn = new Device.CommonForm.SelectedStatuButton()
-                    {
-                        X = Application.GetRealWidth(50) + stopBtn.Right,
-                        Width = Application.GetMinRealAverage(110),
-                        Height = Application.GetMinRealAverage(110),
-                        Gravity = Gravity.CenterVertical,
-                        UnSelectedImagePath = "WindowCovering/RollerShadeOpen.png",
-                        SelectedImagePath = "WindowCovering/RollerShadeOpenSelected.png",
-                    };
-                    deviceTypeRowLayout.AddChidren(openBtn);
+                    deviceTypeRowLayout.AddRightView(editBtn);
+                    editBtn.MouseUpEventHandler += deviceDetailHandler;
 
                     var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                     {
@@ -1500,15 +1467,23 @@
                     deviceTypeRowLayout.AddRightView(delBtn);
                     delBtn.MouseUpEventHandler += delEvent;
 
-                    //绐楀笜鍏�
-                    closeBtn.MouseUpEventHandler += (sender, e) =>
+                  
+                    deviceRow.SwitchBtn.MouseUpEventHandler += (sender, e) =>
                     {
                         zbGateway = deviceUI.CommonDevice.Gateway;
                         sendedControlCommand = false;
                         zbGateway.ReportAction += UpdateDeviceControllStatu;
                         AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, deviceUI.CommonDevice);
 
-                        rollerShade.CurtainUpDownStopControl(1);
+                        (sender as CommonForm.SelectedStatuButton).IsSelected = !(sender as CommonForm.SelectedStatuButton).IsSelected;
+                        if ((sender as CommonForm.SelectedStatuButton).IsSelected)
+                        {
+                            rollerShade.CurtainUpDownStopControl(0);
+                        }
+                        else
+                        {
+                            rollerShade.CurtainUpDownStopControl(1);
+                        }
 
                         //鎺у埗寤舵椂鍥炶皟
                         DeviceUI.SendCommandDelayAction(deviceUI.CommonDevice, () =>
@@ -1524,98 +1499,10 @@
                             }
                         });
                     };
-                    //绐楀笜鍋�
-                    stopBtn.MouseUpEventHandler += (sender, e) =>
-                    {
-                        zbGateway = deviceUI.CommonDevice.Gateway;
-                        sendedControlCommand = false;
-                        zbGateway.ReportAction += UpdateDeviceControllStatu;
-                        AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, deviceUI.CommonDevice);
-
-                        rollerShade.CurtainUpDownStopControl(2);
-
-                        //鎺у埗寤舵椂鍥炶皟
-                        DeviceUI.SendCommandDelayAction(deviceUI.CommonDevice, () =>
-                        {
-                            if (Parent == null)
-                            {
-                                return;
-                            }
-                            RemoveUpdateControlDeviceStatuAction(zbGateway);
-                            if (sendedControlCommand == false)
-                            {
-                                DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
-                            }
-                        });
-                    };
-                    //绐楀笜寮�
-                    openBtn.MouseUpEventHandler += (sender, e) =>
-                    {
-                        zbGateway = deviceUI.CommonDevice.Gateway;
-                        sendedControlCommand = false;
-                        zbGateway.ReportAction += UpdateDeviceControllStatu;
-                        AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, deviceUI.CommonDevice);
-
-                        rollerShade.CurtainUpDownStopControl(0);
-
-                        //鎺у埗寤舵椂鍥炶皟
-                        DeviceUI.SendCommandDelayAction(deviceUI.CommonDevice, () =>
-                        {
-                            if (Parent == null)
-                            {
-                                return;
-                            }
-                            RemoveUpdateControlDeviceStatuAction(zbGateway);
-                            if (sendedControlCommand == false)
-                            {
-                                DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
-                            }
-                        });
-                    };
-                    deviceTypeRowLayout.MouseUpEventHandler += deviceDetailHandler;
-                    deviceIMG.MouseUpEventHandler += deviceDetailHandler;
-                    deviceNameBtn.MouseUpEventHandler += deviceDetailHandler;
                 }
                 else
                 {
-                    var deviceTypeRowLayout = new RowLayout()
-                    {
-                        Height = Application.GetRealHeight(CommonPage.RowHeight),
-                        LineColor = ZigbeeColor.Current.GXCLineColor,
-                        Tag = deviceUI
-                    };
-                    deviceListScrolView.AddChidren(deviceTypeRowLayout);
-                    var deviceIMG = new Button()
-                    {
-                        X = Application.GetRealWidth(CommonPage.XLeft),
-                        Width = Application.GetMinRealAverage(110),
-                        Height = Application.GetMinRealAverage(110),
-                        UnSelectedImagePath = deviceUI.IconPath,
-                        SelectedImagePath = deviceUI.OnlineIconPath,
-                        Gravity = Gravity.CenterVertical,
-                        Tag = deviceStatus_Online
-                    };
-                    deviceTypeRowLayout.AddChidren(deviceIMG);
-                    var deviceNameBtn = new Button()
-                    {
-                        X = Application.GetRealWidth(50) + deviceIMG.Right,
-                        Width = Application.GetRealWidth(500),
-                        Text = deviceUI.CommonDevice.DeviceEpointName,
-                        TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                        TextAlignment = TextAlignment.CenterLeft
-                    };
-                    deviceTypeRowLayout.AddChidren(deviceNameBtn);
-                    var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
-                    {
-                        Tag = deviceUI,
-                        Radius = 0
-                    };
-                    deviceTypeRowLayout.AddRightView(delBtn);
-                    delBtn.MouseUpEventHandler += delEvent;
-
-                    deviceTypeRowLayout.MouseUpEventHandler += deviceDetailHandler;
-                    deviceIMG.MouseUpEventHandler += deviceDetailHandler;
-                    deviceNameBtn.MouseUpEventHandler += deviceDetailHandler;
+                    
                 }
             }
         }
@@ -1625,13 +1512,27 @@
         /// </summary>
         private void ShowNoFunctionTip()
         {
+            var noFunction = new Button()
+            {
+                Y=Application.GetRealHeight(320),
+                Width=Application.GetMinRealAverage(757),
+                Height = Application.GetMinRealAverage(435),
+                UnSelectedImagePath="Item/NoFunction.png",
+                Gravity = Gravity.CenterHorizontal
+            };
+            functionSceneBodyView.AddChidren(noFunction);
+
             var noFunctionTip = new Button()
             {
-                Height = Application.GetMinRealAverage(200),
+                Y = noFunction.Bottom + Application.GetRealHeight(32),
+                Height = Application.GetRealHeight(200),
+                Width = Application.GetRealWidth(700),
+                Gravity = Gravity.CenterHorizontal,
                 TextID = R.MyInternationalizationString.NoFunction,
+                //Text = "娌℃湁鍔熻兘 \n 璇峰湪涓汉涓績涓�--璁惧绠$悊澶勬坊鍔�",
                 TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                 TextAlignment = TextAlignment.Center,
-                Gravity = Gravity.CenterVertical
+                IsMoreLines=true
             };
             functionSceneBodyView.AddChidren(noFunctionTip);
         }
@@ -1659,114 +1560,104 @@
             }
             else
             {
-                var sceneScrolView = new VerticalScrolViewLayout { };
+                var sceneScrolView = new VerticalScrolViewLayout
+                {
+                    Y=Application.GetRealHeight(58)
+                };
                 functionSceneBodyView.AddChidren(sceneScrolView);
                 foreach (var sceneRoomUI in sceneList)
                 {
                     var sceneFL = new FrameLayout()
                     {
-                        Width = Application.GetRealWidth(CommonPage.AppRealWidth - 100),
-                        Height = Application.GetRealHeight(400),
+                        Height = Application.GetRealHeight(446),
                         Gravity = Gravity.CenterHorizontal,
-                        BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                        BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
                         Tag = sceneRoomUI
                     };
                     sceneScrolView.AddChidren(sceneFL);
                     var sceneRowLayout = new RowLayout()
                     {
-                        Y = Application.GetRealHeight(30),
-                        Height = Application.GetRealHeight(400 - 30 - 10),
+                        Y = Application.GetRealHeight(46),
+                        Height = Application.GetRealHeight(446 - 46),
                         Gravity = Gravity.CenterHorizontal,
-                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
+                        LineColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
                         Radius = CommonPage.BigFormRadius
                     };
                     sceneFL.AddChidren(sceneRowLayout);
-                    var sceneItemFL = new FrameLayout()
-                    {
-                        BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                        Radius = CommonPage.BigFormRadius
-                    };
-                    sceneRowLayout.AddChidren(sceneItemFL);
+
                     var sceneImg = new Button()
                     {
+                        X=Application.GetRealWidth(179),
+                        Width=Application.GetMinReal(844),
+                        Height=Application.GetMinReal(400),
+                        Gravity = Gravity.CenterVertical,
                         UnSelectedImagePath = sceneRoomUI.sceneUI.IconPath,
-                        Radius = CommonPage.BigFormRadius
+                        Radius = (uint)Application.GetRealHeight(CommonFormResouce.BigFormRadius)
                     };
                     sceneRowLayout.AddChidren(sceneImg);
 
-                    var sceneBGBtn = new Button()
+                    var leftFL = new FrameLayout
                     {
-                        BackgroundColor = ZigbeeColor.Current.GXCBlack70Color,
-                        SelectedBackgroundColor = ZigbeeColor.Current.GXCBlack80Color,
-                        Radius = CommonPage.BigFormRadius
+                        X=Application.GetRealWidth(CommonFormResouce.X_Left),
+                        Width = Application.GetRealWidth(251),
+                        Height = Application.GetRealHeight(282),
+                        Gravity=Gravity.CenterVertical,
+                        BackgroundColor = ZigbeeColor.Current.GXCBlackBackgroundColor2
                     };
-                    sceneRowLayout.AddChidren(sceneBGBtn);
-                    var roomNameBtn = new Button()
+                    sceneRowLayout.AddChidren(leftFL);
+
+                    var collectionBtn = new Button
                     {
-                        X = Application.GetRealWidth(30),
-                        Y = Application.GetRealHeight(1),
-                        Width = Application.GetRealWidth(600),
-                        Height = Application.GetRealHeight(110),
-                        Text = $"{sceneRoomUI.room.Name}",
-                        TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                        TextSize = 12,
-                        TextAlignment = TextAlignment.CenterLeft
+                        X=Application.GetRealWidth(23),
+                        Y=Application.GetRealHeight(23),
+                        Width=Application.GetMinRealAverage(65),
+                        Height=Application.GetMinRealAverage(65),
+                        UnSelectedImagePath="Item/Collection.png",
+                        SelectedImagePath="Item/CollectionSelected.png"
                     };
-                    sceneRowLayout.AddChidren(roomNameBtn);
+                    leftFL.AddChidren(collectionBtn);
 
                     var sceneNameBtn = new Button()
                     {
-                        Width = Application.GetRealWidth(700),
+                        Width = Application.GetRealWidth(176),
                         Height = Application.GetRealHeight(200),
                         TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                        TextSize = 20,
                         Text = sceneRoomUI.sceneUI.Name,
-                        Gravity = Gravity.Center
+                        Gravity = Gravity.Center,
+                        IsMoreLines=true
                     };
-                    sceneRowLayout.AddChidren(sceneNameBtn);
-                    var moreBtn = new Device.CommonForm.SelectedStatuButton()
-                    {
-                        Y = Application.GetRealHeight(1),
-                        X = sceneRowLayout.Width - Application.GetRealWidth(150),
-                        Width = Application.GetMinRealAverage(110),
-                        Height = Application.GetMinRealAverage(110),
-                        UnSelectedImagePath = "Item/MoreWhite.png",
-                        SelectedImagePath = "Item/MoreSelected.png"
-                    };
-                    sceneRowLayout.AddChidren(moreBtn);
+                    leftFL.AddChidren(sceneNameBtn);
 
-                    //缂栬緫寤舵椂
-                    var leftDelayTimeBtn = new Device.CommonForm.RowLayoutEditButton()
+                    //瀹氭椂
+                    var delayBtn = new RowLayoutDeleteButton
                     {
+                        TextID = R.MyInternationalizationString.Delay,
                         Tag = sceneRoomUI.sceneUI.SceneDelayTime
                     };
+                    sceneRowLayout.AddLeftView(delayBtn);
 
+                    //缂栬緫
+                    var settingBtn = new Device.CommonForm.RowLayoutEditButton()
+                    {
+                        TextID=R.MyInternationalizationString.Setting,
+                        Tag = sceneRoomUI.sceneUI.SceneDelayTime
+                    };
                     //鍒犻櫎
                     var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
                     {
                         Tag = sceneRoomUI
                     };
 
-                    if(!sceneRoomUI.room.IsSharedRoom)
+                    if (!sceneRoomUI.room.IsSharedRoom)
                     {
-                        sceneRowLayout.AddRightView(leftDelayTimeBtn);
+                        sceneRowLayout.AddRightView(settingBtn);
                         sceneRowLayout.AddRightView(deleteBtn);
                     }
 
                     //璋冪敤鍦烘櫙
-                    EventHandler<MouseEventArgs> sceneDownHandler = (sender, e) =>
-                    {
-                        sceneBGBtn.IsSelected = true;
-                    };
-                    sceneBGBtn.MouseDownEventHandler += sceneDownHandler;
-                    sceneImg.MouseDownEventHandler += sceneDownHandler;
-                    sceneRowLayout.MouseDownEventHandler += sceneDownHandler;
-                    sceneNameBtn.MouseDownEventHandler += sceneDownHandler;
-                    sceneFL.MouseDownEventHandler += sceneDownHandler;
 
                     EventHandler<MouseEventArgs> sceneUpHandler = async (sender, e) =>
                     {
-                        sceneBGBtn.IsSelected = false;
                         //1鎴愬姛 0澶辫触
                         //鍚庨潰琛ヤ笂鐩稿叧鎻愮ず
                         //瑕佸厛浠庣綉鍏宠鍙栧欢鏃舵槸鍚︽鍦ㄦ墽琛岋紝濡傛灉鏄繘琛屽�掕鏃讹紝涓嶅厑璁稿湪鐐瑰嚮
@@ -1795,17 +1686,17 @@
                             return;
                         }
                     };
-                    sceneBGBtn.MouseUpEventHandler += sceneUpHandler;
                     sceneImg.MouseUpEventHandler += sceneUpHandler;
-                    sceneRowLayout.MouseUpEventHandler += sceneUpHandler;
-                    sceneFL.MouseUpEventHandler += sceneUpHandler;
-                    sceneNameBtn.MouseUpEventHandler += sceneUpHandler;
                     //鍒犻櫎鍦烘櫙
                     EventHandler<MouseEventArgs> delEvent = (sender, e) =>
                     {
-                        var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ConfirmDelete), Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim));
-                        alert.Show();
-                        alert.ResultEventHandler += async (send1, e1) =>
+                        var tip = new CustomAlert { };
+                        AddChidren(tip);
+                        tip.Show(Language.StringByID(R.MyInternationalizationString.ConfirmDelete));
+                        
+                        //var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ConfirmDelete), Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim));
+                        //alert.Show();
+                        tip.ResultEventHandler += async (e1) =>
                         {
                             if (e1)
                             {
@@ -1844,12 +1735,12 @@
                     };
                     deleteBtn.MouseUpEventHandler += delEvent;
                     //缂栬緫鍦烘櫙
-                    moreBtn.MouseUpEventHandler += (sender, e) =>
+                    settingBtn.MouseUpEventHandler += (sender, e) =>
                     {
                         SceneRoomUI.EditScene(sceneRoomUI.sceneUI, sceneRoomUI.room);
                     };
                     //缂栬緫寤舵椂
-                    leftDelayTimeBtn.MouseUpEventHandler += (sender, e) =>
+                    delayBtn.MouseUpEventHandler += (sender, e) =>
                     {
                         var tList = new List<string>() { };
 
@@ -1858,24 +1749,24 @@
                             tList.Add($"{i} {Language.StringByID(R.MyInternationalizationString.Second)}");
                         }
                         //int beforeIndex = (int)(sender as CommonForm.RowLayoutEditButton).Tag;
-                        PickerView.Show(tList, (obj) =>
-                        {
-                            var tempRoom = Shared.Common.Room.GetRoomByFilePath(sceneRoomUI.room.FileName);
-                            if (tempRoom == null)
-                            {
-                                return;
-                            }
-                            foreach (var ss in tempRoom.SceneUIList)
-                            {
-                                if (ss.Id == sceneRoomUI.sceneUI.Id)
-                                {
-                                    ss.SceneDelayTime = int.Parse(tList[obj].Split(' ')[0]);
-                                    sceneRoomUI.room.Save();
-                                    RefreshBodyView();
-                                    return;
-                                }
-                            }
-                        },0,"", Language.StringByID(R.MyInternationalizationString.Confrim), tList[(int)(sender as CommonForm.RowLayoutEditButton).Tag]);
+                        //PickerView.Show(tList, (obj) =>
+                        //{
+                        //    var tempRoom = Shared.Common.Room.GetRoomByFilePath(sceneRoomUI.room.FileName);
+                        //    if (tempRoom == null)
+                        //    {
+                        //        return;
+                        //    }
+                        //    foreach (var ss in tempRoom.SceneUIList)
+                        //    {
+                        //        if (ss.Id == sceneRoomUI.sceneUI.Id)
+                        //        {
+                        //            ss.SceneDelayTime = int.Parse(obj.Split(' ')[0]);
+                        //            sceneRoomUI.room.Save();
+                        //            RefreshBodyView();
+                        //            return;
+                        //        }
+                        //    }
+                        //}, Language.StringByID(R.MyInternationalizationString.Confrim), tList[(int)(sender as CommonForm.RowLayoutEditButton).Tag]);
                     };
                 }
             }
@@ -1886,13 +1777,26 @@
         /// </summary>
         private void ShowNoSceneTip()
         {
+            var noFunction = new Button()
+            {
+                Y = Application.GetRealHeight(320),
+                Width = Application.GetMinRealAverage(757),
+                Height = Application.GetMinRealAverage(435),
+                UnSelectedImagePath = "Item/NoFunction.png",
+                Gravity = Gravity.CenterHorizontal
+            };
+            functionSceneBodyView.AddChidren(noFunction);
+
             var noScenceTip = new Button()
             {
-                Height = Application.GetMinRealAverage(200),
+                Y = noFunction.Bottom + Application.GetRealHeight(32),
+                Height = Application.GetRealHeight(200),
+                Width = Application.GetRealWidth(700),
+                Gravity = Gravity.CenterHorizontal,
                 TextID = R.MyInternationalizationString.NoScene,
                 TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                 TextAlignment = TextAlignment.Center,
-                Gravity = Gravity.CenterVertical
+                IsMoreLines = true
             };
             functionSceneBodyView.AddChidren(noScenceTip);
         }
@@ -1909,49 +1813,38 @@
         {
             var logicScrolView = new VerticalScrolViewLayout { };
             functionSceneBodyView.AddChidren(logicScrolView);
-
-            //Shared.Common.ResponseEntity.Logic.LogicDviceList = await gateway.GetGwDeviceList();
-            // gateway.DeviceList.Clear();
-            ////// Shared.Common.ResponseEntity.Logic.LogicDviceList = LocalDevice.Current.GetDeviceByGatewayID(gateway.getGatewayBaseInfo.gwID);
-            //if (gateway.DeviceList.Count != 0)
-            //{
-            //    Shared.IO.FileUtils.WriteFileByBytes("ZigbeeDeviceListFilePath", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(gateway.DeviceList)));
-            //}
-            //else
-            //{//涓存椂淇濆瓨璁惧鍒楄〃鏁版嵁缁欓�昏緫寮�鍙�
-            //    var devicestring = System.Text.Encoding.UTF8.GetString(Shared.IO.FileUtils.ReadFile("ZigbeeDeviceListFilePath"));
-            //    gateway.DeviceList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<CommonDevice>>(devicestring);
-            //}
-
             CommonPage.Loading.Start();
-            //if (Common.Logic.LogicDviceList.Count != 0)
-            //{
-            //    foreach (var gateway in ZbGateway.GateWayList)
-            //    {
-            //        if (gateway.IsMainGateWay)
-            //        {
-            //            Common.Logic.LogicDviceList = LocalDevice.Current.GetDeviceByGatewayID(gateway.getGatewayBaseInfo.gwID);
-            //        }
-            //    }
-            //}
-
-
-            //CommonPage.Loading.Start();
             if (Common.Logic.LogicList.Count == 0)
             {
+                //var Idlist = await Logic.Send.GetLogicId();
+                //if (Idlist.Count != 0)
+                //{
+                //    foreach (var LogicId in Idlist)
+                //    {
+                //        var logic = await Logic.Send.GetLogic(LogicId);
+                //        if (logic != null)
+                //        {
+                //            Common.Logic.LogicList.Add(logic);
+                //        }
+                //    }
+                //}
                 var Idlist = await Logic.Send.GetLogicId();
                 if (Idlist.Count != 0)
                 {
+                    var listlogic = await Logic.Send.ReadList(Idlist.Count);
                     foreach (var LogicId in Idlist)
                     {
-                        var logic = await Logic.Send.GetLogic(LogicId);
-                        if (logic != null)
+                        foreach (var logic in listlogic)
                         {
-                            Common.Logic.LogicList.Add(logic);
+                            if (logic.LogicId == LogicId)
+                            {
+                                Common.Logic.LogicList.Add(logic);
+                            }
                         }
                     }
                 }
             }
+
             //鑷姩鍖�
             Automationview(logicScrolView);
             CommonPage.Loading.Hide();
@@ -2008,7 +1901,8 @@
                         //閫昏緫鍏�
                         logic.IsEnable = 0;
                     }
-                    Logic.Send.AddModifyLogic(logic);
+                    Logic.Send.LogicControlSwitch(logic);
+                    //Logic.Send.AddModifyLogic(logic);
                 };
                 if (logic.IsEnable == 1)
                 {
@@ -2039,171 +1933,6 @@
                     UserView.HomePage.Instance.AddChidren(logicCommunalPage);
                     UserView.HomePage.Instance.PageIndex += 1;
                     logicCommunalPage.Show(() => { btnname.Text = logic.LogicName; Automationview(refresview); });
-
-                };
-
-
-                var btndelay = new Button
-                {
-                    Width = Application.GetRealWidth(150),
-                    Height = Application.GetRealHeight(50),
-                    X = Application.GetRealWidth(300),
-                    Y = Application.GetRealHeight(25),
-                    TextAlignment = TextAlignment.Center,
-                    TextColor = 0xffcccccc,
-                };
-                logicrowlayout.AddChidren(btndelay);
-
-                ///寤舵椂鎺т欢
-                var btndelaytext = new Button
-                {
-                    BackgroundColor = 0xff676767,
-                    Text = Language.StringByID(R.MyInternationalizationString.delayed),
-                };
-                //logicrowlayout.AddRightView(btndelaytext);
-
-                //if (logic.param.ContainsKey ("delay")) {
-                //    var delayvalue = logic.param ["delay"]?.ToString ();
-                //    if (delayvalue != "" && delayvalue != "0") {
-                //        var l = int.Parse (delayvalue) / 10;
-                //        btndelay.Text = l.ToString () + "s";
-                //    }
-                //}
-
-                btndelaytext.MouseUpEventHandler += (sender, e) =>
-                {
-
-                    Dialog window = new Dialog();
-                    window.Show();
-
-                    var frameLayout = new FrameLayout
-                    {
-                        Width = Application.GetRealWidth(580),
-                        Height = Application.GetRealHeight(300),
-                        X = Application.GetRealWidth(30),
-                        Y = Application.GetRealHeight(330),
-                        BackgroundColor = 0xffffffff,
-                    };
-                    window.AddChidren(frameLayout);
-
-                    var Modifyname = new Button
-                    {
-                        Width = Application.GetRealWidth(580),
-                        Height = Application.GetRealHeight(80),
-                        TextID = R.MyInternationalizationString.devicedelaytime,
-                        //Text = "璇疯緭鍏ヨ澶囧欢鏃剁殑鏃堕棿(鍗曚綅/s)",
-                        Y = Application.GetRealHeight(10),
-                        TextSize = 16,
-                        TextColor = ZigbeeColor.Current.MusicTipTextColor,
-                    };
-                    frameLayout.AddChidren(Modifyname);
-
-                    var delaytext = new EditText
-                    {
-                        Width = Application.GetRealWidth(540),
-                        Height = Application.GetRealHeight(80),
-                        Y = Application.GetRealHeight(80),
-                        X = Application.GetRealWidth(20),
-                        Gravity = Gravity.CenterVertical,
-                        // BackgroundColor = SkinStyle.Current.MusicTipBackgroundColor,
-                        //TextColor = 0xff000000,
-                        Radius = 1,
-                        BorderWidth = 1,
-                        //BorderColor = SkinStyle.Current.MusicEditBorderColor,
-                        //TextColor = SkinStyle.Current.MusicTextColor,
-                    };
-                    frameLayout.AddChidren(delaytext);
-
-                    var line = new Button
-                    {
-                        Height = Application.GetRealHeight(2),
-                        Y = Application.GetRealHeight(218),
-                        BackgroundColor = 0xff666666,
-                    };
-                    frameLayout.AddChidren(line);
-
-                    var cancelrow = new RowLayout
-                    {
-                        Y = Application.GetRealHeight(220),
-                        Height = Application.GetRealHeight(80),
-                        Width = Application.GetRealWidth(289),
-                        BackgroundColor = 0xffcccccc,
-                    };
-                    frameLayout.AddChidren(cancelrow);
-
-                    var cancel = new Button
-                    {
-                        TextID = R.MyInternationalizationString.cancel,
-                        //TextColor = 0xff000000,
-                        TextSize = 18,
-                        //TextColor = SkinStyle.Current.MusicTextColor,
-                    };
-                    cancelrow.AddChidren(cancel);
-                    cancel.MouseUpEventHandler += (sender1, e1) =>
-                    {
-                        window.Close();
-                    };
-
-                    var ther = new Button
-                    {
-                        Y = Application.GetRealHeight(220),
-                        Height = Application.GetRealHeight(80),
-                        Width = Application.GetRealWidth(2),
-                        X = Application.GetRealHeight(289),
-                        BackgroundColor = 0xff666666,
-                    };
-                    frameLayout.AddChidren(ther);
-
-                    var confirmrow = new RowLayout
-                    {
-                        Y = Application.GetRealHeight(220),
-                        X = Application.GetRealWidth(291),
-                        Height = Application.GetRealHeight(80),
-                        Width = Application.GetRealWidth(289),
-                        BackgroundColor = 0xffcccccc,
-                    };
-                    frameLayout.AddChidren(confirmrow);
-
-                    var confirm = new Button
-                    {
-                        TextID = R.MyInternationalizationString.confrim,
-                        //TextColor = 0xff000000,
-                        TextSize = 18,
-                        // TextColor = SkinStyle.Current.MusicTextColor,
-                    };
-                    confirmrow.AddChidren(confirm);
-                    //if (logic.param.ContainsKey ("delay")) {
-                    //    var delayvalue = logic.param ["delay"]?.ToString ();
-                    //    if (delayvalue != "" && delayvalue != "0") {
-                    //        var l = int.Parse (delayvalue) / 10;
-                    //        delaytext.Text = l.ToString () + "s";
-                    //    }
-                    //}
-
-                    confirm.MouseUpEventHandler += (sender1, e1) =>
-                    {
-                        var isNumber = delaytext.Text.Trim();
-                        if (!int.TryParse(isNumber, out int number) || isNumber == "")
-                        {
-                            new Alert(Language.StringByID(R.MyInternationalizationString.Tip),
-                                       Language.StringByID(R.MyInternationalizationString.inputnumber),
-                                     Language.StringByID(R.MyInternationalizationString.Close)).Show();
-                            return;
-                        }
-
-                        var vel = int.Parse(isNumber);
-                        //if (logic.param.ContainsKey ("delay")) {
-                        //    logic.param.Remove ("delay");
-                        //    logic.param.Add ("delay", vel * 10);
-                        //} else {
-                        //    logic.param.Add ("delay", vel * 10);
-                        //}
-                        //btndelay.Text = isNumber + "s";
-                        window.Close();
-                        Automationview(refresview);
-
-
-                    };
 
                 };
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
index 15df16b..7ccbe78 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
@@ -2,17 +2,28 @@
 using System.Collections.Generic;
 using System.Globalization;
 using Shared.Common;
+using Shared.Phone.Device.CommonForm;
 using Shared.Phone.Device.Room;
 using static ZigBee.Device.Scene;
 
 namespace Shared.Phone.Device.Category
 {
-    public class CategoryAddScene:FrameLayout
+    public class CategoryAddScene : FrameLayout
     {
+        #region 鈼� 鍙橀噺____________________________
+        /// <summary>
+        /// bodyFrameLayout
+        /// </summary>
+        private FrameLayout bodyFrameLayout;
+
+        #endregion
+
         public static string ImagePath;
         public static string SceneText;
+
         public static Shared.Common.Room CurrentRoom;
-        public static List<SceneTargetDeviceUI> sceneTargetDevicesList=new List<SceneTargetDeviceUI>{};
+
+        public static List<SceneTargetDeviceUI> sceneTargetDevicesList = new List<SceneTargetDeviceUI> { };
         /// <summary>
         /// 璁板綍缂栬緫鍓嶇殑璁惧鍒楄〃
         /// </summary>
@@ -23,6 +34,7 @@
         /// 鍥剧墖鏉ユ簮 0--鏈湴鍥惧簱 1--鎷嶇収 2--绯荤粺鍥惧簱
         /// </summary>
         public static int IconType = 0;
+
         /// <summary>
         /// 娣诲姞鐩爣鍚庣殑灞曠ず鍒楄〃
         /// </summary>
@@ -81,18 +93,18 @@
                 {
                     string devImgPath = string.Empty;
                     string devNameText = string.Empty;
-                    if (targetDevice.Type==0)
+                    if (targetDevice.Type == 0)
                     {
                         if (targetDevice.DeviceUI == null || targetDevice.DeviceUI.CommonDevice == null) continue;
                         devImgPath = targetDevice.DeviceUI.IconPath;
                         devNameText = targetDevice.DeviceUI.CommonDevice.DeviceEpointName;
                     }
-                    else if(targetDevice.Type==1)
+                    else if (targetDevice.Type == 1)
                     {
                         devImgPath = "Item/Timer.png";
                         devNameText = $"{targetDevice.DelayTime} {Language.StringByID(R.MyInternationalizationString.Second)}";
                     }
-                    else if(targetDevice.Type==2)
+                    else if (targetDevice.Type == 2)
                     {
                         devImgPath = "Item/Scene.png";
                         devNameText = targetDevice.SceneName;
@@ -152,15 +164,15 @@
                     {
                         /////******鏆傛椂鍏堜笉鍔犲欢鏃讹紝瀹夊崜鎺т欢鏈夐棶棰�*******////
                         var tList = new List<string> { };
-                        for(int i=1;i<=60;i++)
+                        for (int i = 1; i <= 60; i++)
                         {
                             tList.Add($"{i} {Language.StringByID(R.MyInternationalizationString.Second)}");
                         }
                         //1-60绉�
-                        PickerView.Show(tList, (obj) =>
-                         {
-                             targetDevice.DelayTime =int.Parse(tList[obj].Split(' ')[0]);
-                         },0,"",Language.StringByID(R.MyInternationalizationString.Confrim));
+                        //PickerView.Show(tList, (obj) =>
+                        // {
+                        //     targetDevice.DelayTime = int.Parse(obj.Split(' ')[0]);
+                        // }, Language.StringByID(R.MyInternationalizationString.Confrim));
                     };
                     //鍒犻櫎璁惧
                     devRight.MouseUpEventHandler += (sender, e) =>
@@ -190,7 +202,7 @@
                                 var detail = new CategorySceneSelectLightSetting();
                                 UserView.HomePage.Instance.AddChidren(detail);
                                 UserView.HomePage.Instance.PageIndex += 1;
-                                detail.Show(targetDevice.DeviceUI,targetDevice.SceneTargetDeviceUIID, taskList[0].Data1);
+                                detail.Show(targetDevice.DeviceUI, targetDevice.SceneTargetDeviceUIID, taskList[0].Data1);
                             }
                             else if (targetDevice.DeviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.AirSwitch)
                             {
@@ -231,11 +243,11 @@
                                 UserView.HomePage.Instance.AddChidren(detail);
                                 UserView.HomePage.Instance.PageIndex += 1;
                                 UserView.HomePage.Instance.ScrollEnabled = false;
-                                if(taskList[0].TaskType==1)
+                                if (taskList[0].TaskType == 1)
                                 {
                                     detail.Show(targetDevice.DeviceUI, targetDevice.SceneTargetDeviceUIID, taskList[0].Data1, taskList[0].Data2);
                                 }
-                                else if(taskList[0].TaskType==3)
+                                else if (taskList[0].TaskType == 3)
                                 {
                                     detail.Show(targetDevice.DeviceUI, targetDevice.SceneTargetDeviceUIID, taskList[0].TaskType, taskList[0].Data1);
 
@@ -251,7 +263,7 @@
                             var delayTimeView = new CategorySceneSelectedDelayTime();
                             UserView.HomePage.Instance.AddChidren(delayTimeView);
                             UserView.HomePage.Instance.PageIndex += 1;
-                            delayTimeView.Show(1,targetDevice.SceneTargetDeviceUIID);
+                            delayTimeView.Show(1, targetDevice.SceneTargetDeviceUIID);
                         }
                         //鍦烘櫙
                         else if (targetDevice.Type == 2)
@@ -259,7 +271,7 @@
                             var sceneView = new CategorySceneSelectedScene();
                             UserView.HomePage.Instance.AddChidren(sceneView);
                             UserView.HomePage.Instance.PageIndex += 1;
-                            sceneView.Show(sceneTargetDevicesList,1,targetDevice.SceneTargetDeviceUIID);
+                            sceneView.Show(sceneTargetDevicesList, 1, targetDevice.SceneTargetDeviceUIID);
                         }
                     }
                     devIMG.MouseUpEventHandler += detailMouseUpEventHandler;
@@ -274,217 +286,184 @@
         /// </summary>
         public void Show()
         {
-            #region topview
-            var topBGView = new FrameLayout()鈥�            {鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor鈥�            };鈥�            AddChidren(topBGView);鈥�            var topView = new FrameLayout()鈥�            {鈥�                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,鈥�            };鈥�            AddChidren(topView);
-            var title = new Button()
-            {
-                TextAlignment = TextAlignment.Center,
-                TextID = R.MyInternationalizationString.AddScence,
-                TextSize = 20,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Width = Application.GetRealWidth(CommonPage.AppRealWidth - 500),
-                Gravity = Gravity.CenterHorizontal
-            };
-            topView.AddChidren(title);
-            var back = new Device.CommonForm.BackButton() { };鈥�            topView.AddChidren(back);
-            back.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-            };
-            #endregion
+            AddTop();
 
-            #region midFL
-            var midFL = new FrameLayout()
+            AddBodyView();
+
+        }
+
+        #region Add____________________________________
+
+        /// <summary>
+        /// AddTop
+        /// </summary>
+        public void AddTop()
+        {
+            var top = new TopFrameLayout();
+            AddChidren(top);
+            top.InitTopview();
+            top.SetTopTitle(R.MyInternationalizationString.AddScence);
+            top.backButton.MouseUpEventHandler += (sender, e) =>
             {
-                Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.Navigation_Height),
-                Y = topView.Bottom,
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                RemoveFromParent();
             };
-            this.AddChidren(midFL);
-            #endregion
-            #region 鑳屾櫙鍥� 鍚嶇О 鍖哄煙 鎵ц鐩爣
+
+        }
+
+        /// <summary>
+        /// AddBodyView
+        /// </summary>
+        public void AddBodyView()
+        {
+            bodyFrameLayout = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(184),
+                Height = Application.GetRealHeight(1737),
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
+            };
+            AddChidren(bodyFrameLayout);
+
+            var imgFL = new FrameLayout
+            {
+                Height = Application.GetRealHeight(556),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+            };
+            bodyFrameLayout.AddChidren(imgFL);
 
             var backGround = new Button()
             {
-                Y = Application.GetRealHeight(50),
-                Width = Application.GetRealWidth(980),
-                Height = Application.GetRealHeight(350),
-                Gravity = Gravity.CenterHorizontal,
-                Radius = CommonPage.BigFormRadius,
+                Width = Application.GetRealWidth(930),
+                Height = Application.GetRealHeight(464),
+                Gravity = Gravity.Center,
+                Radius = (uint)Application.GetRealHeight(CommonFormResouce.BigFormRadius),
                 UnSelectedImagePath = ImagePath
             };
-            midFL.AddChidren(backGround);
-            //--鍦烘櫙鍚�
-            var sceneNameFL = new FrameLayout()
+            imgFL.AddChidren(backGround);
+
+            var infoFL = new FrameLayout
             {
-                Y = backGround.Bottom + Application.GetRealHeight(100),
-                Height = Application.GetRealHeight(170),
+                Y = imgFL.Bottom + Application.GetRealHeight(23),
+                Height = Application.GetRealHeight(418),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
             };
-            midFL.AddChidren(sceneNameFL);
-            var sceneNameTip = new Button()
+            bodyFrameLayout.AddChidren(infoFL);
+
+            var infoEdit = new Button
             {
-                X = Application.GetRealWidth(50),
-                Height = Application.GetRealHeight(70),
-                Width = Application.GetRealWidth(300),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 12,
-                TextColor = ZigbeeColor.Current.GXCButtonTipColor,
-                TextID = R.MyInternationalizationString.SceneName,
+                X=Application.GetRealWidth(CommonFormResouce.X_Left),
+                Height = Application.GetRealHeight(130),
+                Width=Application.GetRealWidth(700),
+                TextID = R.MyInternationalizationString.EditInfo,
+                TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor,
+                TextAlignment=TextAlignment.CenterLeft,
+                TextSize=14
             };
-            sceneNameFL.AddChidren(sceneNameTip);
-            var sceneNameET = new EditText()
-            {
-                X = Application.GetRealWidth(50),
-                Y = sceneNameTip.Bottom,
-                Height = Application.GetRealHeight(100) - 1,
-                Width = Application.GetRealWidth(700),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 20,
-                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputSceneName),
-                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-            };
-            sceneNameFL.AddChidren(sceneNameET);
-            var sceneNameLine = new Button()
-            {
-                Y = sceneNameET.Bottom,
-                Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            sceneNameFL.AddChidren(sceneNameLine);
-            //zone
-            var zoneFL = new FrameLayout()
-            {
-                Y = sceneNameFL.Bottom,
-                Height = Application.GetRealHeight(170),
-            };
-            midFL.AddChidren(zoneFL);
-            var zoneTip = new Button()
-            {
-                X = Application.GetRealWidth(50),
-                Height = Application.GetRealHeight(70),
-                Width = Application.GetRealWidth(300),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 12,
-                TextColor = ZigbeeColor.Current.GXCButtonTipColor,
-                TextID = R.MyInternationalizationString.BelongZone,
-            };
-            zoneFL.AddChidren(zoneTip);
-            var zone = new Button()
-            {
-                X = Application.GetRealWidth(50),
-                Y = sceneNameTip.Bottom,
-                Height = Application.GetRealHeight(100) - 1,
-                Width = Application.GetRealWidth(500),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 20,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Text = CurrentRoom.Name
-            };
-            zoneFL.AddChidren(zone);
-            var zoneRight = new Device.CommonForm.SelectedStatuButton()
-            {
-                X = Application.GetRealWidth(1080 - 150),
-                Width = Application.GetMinRealAverage(110),
-                Height = Application.GetMinRealAverage(110),
-                UnSelectedImagePath = "Item/Next.png",
-                SelectedImagePath="Item/NextSelected.png",
-                Gravity = Gravity.CenterVertical
-            };
-            zoneFL.AddChidren(zoneRight);
-            var zoneLine = new Button()
-            {
-                Y = zone.Bottom,
-                Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            zoneFL.AddChidren(zoneLine);
-            //娣诲姞鎵ц鐩爣
+            infoFL.AddChidren(infoEdit);
+
+
+            var nameRow = new DeviceInfoEditRow(130);
+            nameRow.Init();
+            nameRow.SetTipTitle(R.MyInternationalizationString.SceneName);
+            nameRow.SetPlaceHoldText(R.MyInternationalizationString.PleaseInputSceneName);
+            infoFL.AddChidren(nameRow);
+
+            var zoneRow = new DeviceInfoRow(257);
+            zoneRow.Init();
+            zoneRow.SetTipTitle(R.MyInternationalizationString.BelongZone);
+            zoneRow.SetTitle(CurrentRoom.Name);
+            infoFL.AddChidren(zoneRow);
+
             var targetFL = new FrameLayout()
             {
-                Y = zoneFL.Bottom,
-                Height = Application.GetRealHeight(170),
+                Y = infoFL.Bottom + Application.GetRealHeight(23),
+                Height = Application.GetRealHeight(334),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
             };
-            midFL.AddChidren(targetFL);
+            bodyFrameLayout.AddChidren(targetFL);
+
             var target = new Button()
             {
-                X = Application.GetRealWidth(50),
-                Y = sceneNameTip.Bottom,
-                Height = Application.GetRealHeight(170) - 1,
-                Width = Application.GetRealWidth(500),
+                X = Application.GetRealWidth(CommonFormResouce.X_Left),
+                Y = Application.GetRealHeight(46),
+                Height = Application.GetRealHeight(127) - 1,
+                Width = Application.GetRealWidth(600),
                 TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 20,
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                TextID = R.MyInternationalizationString.AddRoomScentTargetAction,
-                Gravity = Gravity.CenterVertical
+                TextID = R.MyInternationalizationString.AddScentTargetAction,
             };
             targetFL.AddChidren(target);
-            var targetAdd = new Device.CommonForm.SelectedStatuButton()
+
+            var targetAdd = new SelectedStatuButton()
             {
-                X = Application.GetRealWidth(1080 - 150),
-                Width = Application.GetMinRealAverage(110),
-                Height = Application.GetMinRealAverage(110),
+                X = Application.GetRealWidth(950),
+                Y = Application.GetRealHeight(46),
+                Width = Application.GetMinRealAverage(72),
+                Height = Application.GetMinRealAverage(72),
                 UnSelectedImagePath = "Item/Add.png",
-                SelectedImagePath="Item/AddSelected.png",
-                Gravity = Gravity.CenterVertical
+                SelectedImagePath = "Item/AddSelected.png",
             };
             targetFL.AddChidren(targetAdd);
             var targetLine = new Button()
             {
                 Y = target.Bottom,
                 Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
+                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2
             };
             targetFL.AddChidren(targetLine);
+
             //娣诲姞鐩爣鍚庣殑灞曠ず鍒楄〃
             TargetListScrolView = new VerticalScrolViewLayout()
             {
-                Y = targetFL.Bottom,
-                Height = Application.GetRealHeight(340+170),
+                Y = targetLine.Bottom,
+                Height = Application.GetRealHeight(173),
                 BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
             };
-            midFL.AddChidren(TargetListScrolView);
-            confirmBtn = new CommonForm.CompleteButton()
-            {
-                TextID = R.MyInternationalizationString.NextStep,
-            };
+            targetFL.AddChidren(TargetListScrolView);
+
+            confirmBtn = new CommonForm.CompleteButton(1656, 907, 127);
             AddChidren(confirmBtn);
 
             RefreshTargetListView();
+
+            #region 鑳屾櫙鍥� 鍚嶇О 鍖哄煙 鎵ц鐩爣
+
+
+
             if (!string.IsNullOrEmpty(SceneText))
             {
-                sceneNameET.Text = SceneText;
+                nameRow.NameText.Text = SceneText;
             }
-            if(CurrentRoom!=null)
+            if (CurrentRoom != null)
             {
 
             }
-            if(Modify)
+            if (Modify)
             {
-                title.TextID = R.MyInternationalizationString.ModifyScene;
+                //title.TextID = R.MyInternationalizationString.ModifyScene;
                 oldRoom = CurrentRoom;
                 if (ModifySceneUI != null && ModifySceneUI.IsSharedScene)
                 {
-                    sceneNameET.Enable = false;
+                    nameRow.NameText.Enable = false;
                 }
             }
             #endregion
+
             #region event
             //璁板綍杈撳叆鍦烘櫙鍚�
-            sceneNameET.TextChangeEventHandler += (sender, e) =>
+            nameRow.NameText.TextChangeEventHandler += (sender, e) =>
             {
-                SceneText = sceneNameET.Text.Trim();
+                SceneText = nameRow.NameText.Text.Trim();
             };
-
+            
             //閫夋嫨鑳屾櫙鍥�
             EventHandler<MouseEventArgs> backGroundIMGHander = (sender, e) =>
             {
-                if(CurrentRoom.IsSharedRoom)
+                if (CurrentRoom.IsSharedRoom)
                 {
                     RoomCommon.ShowTipRoomIsShared();
                     return;
                 }
-
+                
                 var localPic = new CategorySceneSelectImgByLocal();
                 Shared.Phone.UserView.HomePage.Instance.AddChidren(localPic);
                 Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
@@ -495,130 +474,7 @@
                     IconType = 0;
                 };
 
-                //var selectDialog = new Dialog()
-                //{
-                //};
-                //selectDialog.Show();
-
-                //var itemFL = new FrameLayout()
-                //{
-                //    Y = Application.GetRealHeight(1920 - 600),
-                //    Width = Application.GetRealWidth(900),
-                //    Height = Application.GetRealHeight(550),
-                //    Radius = CommonPage.BigFormRadius,
-                //    //BackgroundColor=ZigbeeColor.Current.GXCBackgroundColor,
-                //    Gravity = Gravity.CenterHorizontal
-                //};
-                //selectDialog.AddChidren(itemFL);
-
-                //var localPicBtn = new Button()
-                //{
-                //    Height = Application.GetRealHeight(130) - 1,
-                //    TextID = R.MyInternationalizationString.LocalPic,
-                //    TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                //    TextAlignment = TextAlignment.Center,
-                //    BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor
-                //};
-                //itemFL.AddChidren(localPicBtn);
-                //var localPicLine = new Button()
-                //{
-                //    Y = localPicBtn.Bottom,
-                //    Height = 1,
-                //    BackgroundColor = ZigbeeColor.Current.GXCLineColor,
-                //};
-                //itemFL.AddChidren(localPicLine);
-
-                //var takePhotoBtn = new Button()
-                //{
-                //    Y = localPicLine.Bottom,
-                //    Height = Application.GetRealHeight(130) - 1,
-                //    TextID = R.MyInternationalizationString.TakePhoto,
-                //    TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                //    TextAlignment = TextAlignment.Center,
-                //    BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor
-                //};
-                //itemFL.AddChidren(takePhotoBtn);
-                //var takePhotoLine = new Button()
-                //{
-                //    Y = takePhotoBtn.Bottom,
-                //    Height = 1,
-                //    BackgroundColor = ZigbeeColor.Current.GXCLineColor,
-                //};
-                //itemFL.AddChidren(takePhotoLine);
-
-                //var systemPicBtn = new Button()
-                //{
-                //    Y = takePhotoLine.Bottom,
-                //    Height = Application.GetRealHeight(130),
-                //    TextID = R.MyInternationalizationString.SystemPic,
-                //    TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                //    TextAlignment = TextAlignment.Center,
-                //    BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor
-                //};
-                //itemFL.AddChidren(systemPicBtn);
-
-
-                //var cancelBtn = new Button()
-                //{
-                //    Y = systemPicBtn.Bottom + Application.GetRealHeight(30),
-                //    Height = Application.GetRealHeight(150),
-                //    TextID = R.MyInternationalizationString.Cancel,
-                //    TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                //    BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                //    TextAlignment = TextAlignment.Center,
-                //};
-                //itemFL.AddChidren(cancelBtn);
-
-                ////鏈湴鍥惧簱
-                //localPicBtn.MouseUpEventHandler += (send, ee) =>
-                //{
-                //    selectDialog.Close();
-                //    var localPic = new CategorySceneSelectImgByLocal();
-                //    Shared.Phone.UserView.HomePage.Instance.AddChidren(localPic);
-                //    Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
-                //    localPic.Show();
-                //    localPic.action = () =>
-                //    {
-                //        backGround.UnSelectedImagePath = ImagePath;
-                //        IconType = 0;
-                //    };
-                //};
-                ////鎷嶇収
-                //takePhotoBtn.MouseUpEventHandler += (send, ee) =>
-                //{
-                //    var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo);
-                //    selectDialog.Close();
-                //    Camera.TakePicture((obj) =>
-                //    {
-                //        if (obj == null)
-                //        {
-                //            return;
-                //        }
-                //        backGround.UnSelectedImagePath = $"ScenePicture{tradeTime}.png";
-                //        ImagePath = $"{Config.Instance.HomeId}/{backGround.UnSelectedImagePath}";
-                //        IconType = 1;
-                //    }, $"ScenePicture{tradeTime}.png");
-                //};
-                ////绯荤粺鍥惧簱
-                //systemPicBtn.MouseUpEventHandler += (send, ee) =>
-                //{
-                //    var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo);
-                //    selectDialog.Close();
-                //    Camera.SelectPicture((obj) =>
-                //    {
-                //        if (obj == null)
-                //        {
-                //            return;
-                //        }
-                //        backGround.UnSelectedImagePath = $"ScenePicture{tradeTime}.png";
-                //        ImagePath = $"{Config.Instance.HomeId}/{backGround.UnSelectedImagePath}";
-                //        IconType = 2;
-                //    }, $"ScenePicture{tradeTime}.png");
-                //};
-                //cancelBtn.MouseUpEventHandler += (send, ee) =>
-                //{
-                //    selectDialog.Close();
-                //};
+                
             };
             backGround.MouseUpEventHandler += backGroundIMGHander;
             //鍖哄煙
@@ -635,13 +491,13 @@
                 selectRoom.SelectedRoomAction = (room) =>
                 {
                     CurrentRoom = room;
-                    zone.Text = CurrentRoom.Name;
+                    zoneRow.NameText.Text = CurrentRoom.Name;
                 };
                 selectRoom.Show();
             };
-            zoneRight.MouseUpEventHandler += zoneHander;
-            zoneFL.MouseUpEventHandler += zoneHander;
-            zone.MouseUpEventHandler += zoneHander;
+            zoneRow.NextBtn.MouseUpEventHandler += zoneHander;
+            zoneRow.TipBtn.MouseUpEventHandler += zoneHander;
+            zoneRow.MouseUpEventHandler += zoneHander;
             //鎵ц鐩爣-娣诲姞鎵ц璁惧
             EventHandler<MouseEventArgs> targetAddHander = (sender, e) =>
             {
@@ -704,7 +560,7 @@
                 var selectedTimerBtn = new Device.CommonForm.SelectedStatuButton()
                 {
                     Y = selectedSceneLine.Bottom,
-                    Height = Application.GetRealHeight(selectRow_Height)-1,
+                    Height = Application.GetRealHeight(selectRow_Height) - 1,
                     TextID = R.MyInternationalizationString.TimeSpan,
                     TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                     BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor,
@@ -740,9 +596,9 @@
                     var sceneView = new CategorySceneSelectedScene();
                     UserView.HomePage.Instance.AddChidren(sceneView);
                     UserView.HomePage.Instance.PageIndex += 1;
-                    if(Modify)
+                    if (Modify)
                     {
-                        sceneView.Show(sceneTargetDevicesList,-1, "", false, ModifySceneUI.Id);
+                        sceneView.Show(sceneTargetDevicesList, -1, "", false, ModifySceneUI.Id);
                     }
                     else
                     {
@@ -785,15 +641,15 @@
                         CommonPage.Loading.Start();
                         //淇敼--鍏堝垽鏂満鏅悕鏄惁鏀瑰彉锛屽啀绉婚櫎璁惧锛屽啀娣诲姞璁惧
                         ModifySceneUI.IconPath = ImagePath;
-                        if (ModifySceneUI.Name != sceneNameET.Text.Trim())
+                        if (ModifySceneUI.Name != nameRow.NameText.Text.Trim())
                         {
-                            if (Shared.Common.Room.AllRoomSceneUIList.Find(s => s.Name == sceneNameET.Text.Trim()) != null)
+                            if (Shared.Common.Room.AllRoomSceneUIList.Find(s => s.Name == nameRow.NameText.Text.Trim()) != null)
                             {
                                 Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist);
                                 return;
                             }
                             //淇敼鍚嶅瓧
-                            var r = await ZigBee.Device.Scene.RenameSceneAsync(ModifySceneUI.Id, sceneNameET.Text.Trim());
+                            var r = await ZigBee.Device.Scene.RenameSceneAsync(ModifySceneUI.Id, nameRow.NameText.Text.Trim());
                             var reName = r.sceneRenameResponseData.Result;
                             if (reName == 0)
                             {
@@ -803,7 +659,7 @@
                             else if (reName == 1)
                             {
                                 //鎴愬姛
-                                ModifySceneUI.Name = sceneNameET.Text.Trim();
+                                ModifySceneUI.Name = nameRow.NameText.Text.Trim();
 
                             }
                             else if (reName == 2)
@@ -913,10 +769,10 @@
                         }
                         sceneRemoveMemberData.DeviceList = removeSceneDeviceListInfoList;
                         sceneRemoveMemberData.ScenesId = ModifySceneUI.Id;
-                        var result = await CurrentRoom.ModifyScene(ModifySceneUI,sceneRemoveMemberData, memberDataList);
+                        var result = await CurrentRoom.ModifyScene(ModifySceneUI, sceneRemoveMemberData, memberDataList);
                         if (result == 1)
                         {
-                            if(oldRoom!=CurrentRoom)
+                            if (oldRoom != CurrentRoom)
                             {
                                 oldRoom.SceneUIList.Remove(ModifySceneUI);
                                 oldRoom.SceneUIFilePathList.Remove(ModifySceneUI.FileName);
@@ -951,7 +807,7 @@
                 //鏂板
                 else
                 {
-                    if (string.IsNullOrEmpty(sceneNameET.Text))
+                    if (string.IsNullOrEmpty(nameRow.NameText.Text))
                     {
                         var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.SceneNameCannotBeNull), Language.StringByID(R.MyInternationalizationString.Close));
                         alert.Show();
@@ -964,7 +820,7 @@
                     {
                         try
                         {
-                            if (Shared.Common.Room.AllRoomSceneUIList.Find(s => s.Name == sceneNameET.Text.Trim()) != null)
+                            if (Shared.Common.Room.AllRoomSceneUIList.Find(s => s.Name == nameRow.NameText.Text.Trim()) != null)
                             {
                                 Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist);
                                 return;
@@ -972,7 +828,7 @@
                             CommonPage.Loading.Start();
                             var memberDataList = new List<ZigBee.Device.Scene.AddSceneMemberData>();
                             //绱姞寤舵椂
-                            int  AddedDelayTime = 0;
+                            int AddedDelayTime = 0;
                             for (int i = 0; i < sceneTargetDevicesList.Count; i++)
                             {
                                 var sceneTarget = sceneTargetDevicesList[i];
@@ -990,11 +846,11 @@
 
                                     if (beforeSceneTarget != null && beforeSceneTarget.Type == 1)
                                     {
-                                        if(i-1>=0)
+                                        if (i - 1 >= 0)
                                         {
-                                            for(int k=i-1;k>=0;k--)
+                                            for (int k = i - 1; k >= 0; k--)
                                             {
-                                                if(sceneTargetDevicesList[k] == null || sceneTargetDevicesList[k].Type != 1)
+                                                if (sceneTargetDevicesList[k] == null || sceneTargetDevicesList[k].Type != 1)
                                                 {
                                                     break;
                                                 }
@@ -1041,7 +897,7 @@
                                 }
                             }
 
-                            var result = await CurrentRoom.AddScene(sceneNameET.Text, backGround.UnSelectedImagePath, memberDataList);
+                            var result = await CurrentRoom.AddScene(nameRow.NameText.Text, backGround.UnSelectedImagePath, memberDataList);
                             if (result == 1)
                             {
                                 RemoveFromParent();
@@ -1070,6 +926,9 @@
                 }
             };
             #endregion
+
         }
+
+        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectAirSwitchSetting.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectAirSwitchSetting.cs
index 8d7afb9..f707f22 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectAirSwitchSetting.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectAirSwitchSetting.cs
@@ -14,6 +14,10 @@
             BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor;
             Tag = "categoryAddScene";
         }
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
+        }
         /// <summary>
         /// 鏄剧ずAirSwitch鐨勮缁嗚缃晫闈�  榛樿-1(鏂板-榛樿寮�)锛�0鍏� 锛�1寮�
         /// </summary>
@@ -171,7 +175,7 @@
             };
             dimmingRowView.AddChidren(dimmingNextBtn);
 
-            var confirmBtn = new CommonForm.CompleteButton() { };
+            var confirmBtn = new CommonForm.CompleteButton(1,2,3);
             AddChidren(confirmBtn);
             if (state == -1)
             {
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectCurtainSetting.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectCurtainSetting.cs
index 4441f5d..b868a4f 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectCurtainSetting.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectCurtainSetting.cs
@@ -213,7 +213,7 @@
             };
             percentSliderRowView.AddChidren(seekBarTitle);
 
-            var confirmBtn = new Device.CommonForm.CompleteButton() { };
+            var confirmBtn = new Device.CommonForm.CompleteButton(1,2,3);
             AddChidren(confirmBtn);
 
             if (state == -1)
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectDevice.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectDevice.cs
index bf7b3f1..c0a516c 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectDevice.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectDevice.cs
@@ -10,10 +10,26 @@
             BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor;
             Tag = "categoryAddScene";
         }
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
+        }
         public void Show(List<SceneTargetDeviceUI> sceneTargetDevicesList, bool isFromRoom = false)
         {
             #region topview
-            var topBGView = new FrameLayout()鈥�            {鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor鈥�            };鈥�            AddChidren(topBGView);鈥�            var topView = new FrameLayout()鈥�            {鈥�                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,鈥�            };鈥�            AddChidren(topView);
+            var topBGView = new FrameLayout()
+            {
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
+            };
+            AddChidren(topBGView);
+            var topView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+            };
+            AddChidren(topView);
 
             var title = new Button()
             {
@@ -26,7 +42,8 @@
             };
             topView.AddChidren(title);
 
-            var back = new Device.CommonForm.BackButton() { };鈥�            topView.AddChidren(back);
+            var back = new Device.CommonForm.BackButton() { };
+            topView.AddChidren(back);
             back.MouseUpEventHandler += (sender, e) =>
             {
                 this.RemoveFromParent();
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectDeviceByRoom.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectDeviceByRoom.cs
index c96fd03..33b3474 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectDeviceByRoom.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectDeviceByRoom.cs
@@ -10,10 +10,26 @@
             BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor;
             Tag = "categoryAddScene";
         }
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
+        }
         public void Show(List<SceneTargetDeviceUI> sceneTargetDevicesList, ZigBee.Device.DeviceType deviceType, bool isFromRoom = false)
         {
             #region topview
-            var topBGView = new FrameLayout()鈥�            {鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor鈥�            };鈥�            AddChidren(topBGView);鈥�            var topView = new FrameLayout()鈥�            {鈥�                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,鈥�            };鈥�            AddChidren(topView);
+            var topBGView = new FrameLayout()
+            {
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
+            };
+            AddChidren(topBGView);
+            var topView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+            };
+            AddChidren(topView);
 
             var title = new Button()
             {
@@ -24,7 +40,8 @@
                 Gravity = Gravity.CenterHorizontal
             };
             topView.AddChidren(title);
-            var back = new Device.CommonForm.BackButton() { };鈥�            topView.AddChidren(back);
+            var back = new Device.CommonForm.BackButton() { };
+            topView.AddChidren(back);
             back.MouseUpEventHandler += (sender, e) =>
             {
                 this.RemoveFromParent();
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs
index 5a10b1d..5388d58 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs
@@ -1,78 +1,111 @@
 锘縰sing System;
 using Shared.Common;
+using Shared.Phone.Device.CommonForm;
+
 namespace Shared.Phone.Device.Category
 {
     public class CategorySceneSelectImgByLocal:FrameLayout
     {
+
+        /// <summary>
+        /// bodyFrameLayout
+        /// </summary>
+        private FrameLayout bodyFrameLayout;
+
+
         public  Action action;
+
         public CategorySceneSelectImgByLocal()
         {
             BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
         }
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
+        }
+
         public void Show()
         {
-            #region topview
-            var topBGView = new FrameLayout()鈥�            {鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor鈥�            };鈥�            AddChidren(topBGView);鈥�            var topView = new FrameLayout()鈥�            {鈥�                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,鈥�            };鈥�            AddChidren(topView);
 
-            var title = new Button()
-            {
-                TextAlignment = TextAlignment.Center,
-                TextID = R.MyInternationalizationString.SelectPic,
-                TextSize = 20,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Width = Application.GetRealWidth(CommonPage.AppRealWidth - 500),
-                Gravity = Gravity.CenterHorizontal
-            };
-            topView.AddChidren(title);
+            AddTop();
 
-            var back = new Device.CommonForm.BackButton() { };鈥�            topView.AddChidren(back);
-
-            back.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-            };
-            #endregion
-
-            #region midFL
-            var midFl = new VerticalScrolViewLayout()
-            {
-                Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.Navigation_Height),
-                Y = topView.Bottom,
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-            };
-            this.AddChidren(midFl);
-
-            for (int i = 0; i < 17; i++)
-            {
-                var RoomRowView = new FrameLayout()
-                {
-                    Y=midFl.Bottom,
-                    Height = Application.GetRealHeight(430),
-                    BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
-                };
-                midFl.AddChidren(RoomRowView);
-
-                var backGroundBtn = new Button()
-                {
-
-                    Y = Application.GetRealHeight(30),
-                    Width = Application.GetMinRealAverage(CommonPage.AppRealWidth - CommonPage.XLeft * 2),
-                    Height = Application.GetMinRealAverage(400),
-                    Gravity=Gravity.CenterHorizontal,
-                    UnSelectedImagePath = "Scene/Scene" + i.ToString() + ".png",
-                    Radius = CommonPage.BigFormRadius
-                };
-                RoomRowView.AddChidren(backGroundBtn);
-
-                backGroundBtn.MouseUpEventHandler += (sender, e) =>
-                {
-                    CategoryAddScene.ImagePath = backGroundBtn.UnSelectedImagePath;
-                    Room.AddRoomScene.ImagePath = backGroundBtn.UnSelectedImagePath;
-                    action?.Invoke();
-                    this.RemoveFromParent();
-                };
-            }
-            #endregion
+            AddBodyView();
         }
+
+
+        #region Add____________________________________
+
+        /// <summary>
+        /// AddTop
+        /// </summary>
+        public void AddTop()
+        {
+            var top = new TopFrameLayout();
+            AddChidren(top);
+            top.InitTopview();
+            top.SetTopTitle(R.MyInternationalizationString.SelectScenePic);
+            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(1737),
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
+            };
+            bodyFrameLayout.AddChidren(scrollView);
+
+            int k = 1;
+            for (int j = 0; j < 2; j++)
+            {
+                var itemView = new FrameLayout()
+                {
+                    Height = Application.GetRealHeight(311 + CommonPage.XLeft)
+                };
+                scrollView.AddChidren(itemView);
+                for (int i = 0; i < 2; i++)
+                {
+                    var icon = new Button()
+                    {
+                        X=Application.GetRealWidth(CommonPage.XLeft+i*(467+32)),
+                        Width=Application.GetMinRealAverage(467),
+                        Height=Application.GetMinRealAverage(311),
+                        Gravity=Gravity.CenterVertical,
+                        UnSelectedImagePath = $"SceneIcon/{k}.png",
+                    };
+                    itemView.AddChidren(icon);
+                    k++;
+
+                    EventHandler<MouseEventArgs> selectIcon = (sender, e) =>
+                    {
+                        CategoryAddScene.ImagePath = icon.UnSelectedImagePath;
+                        Room.AddRoomScene.ImagePath = icon.UnSelectedImagePath;
+                        action?.Invoke();
+                        action = null;
+                        this.RemoveFromParent();
+
+                    };
+                    icon.MouseUpEventHandler += selectIcon;
+                }
+            }
+
+        }
+        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectLightSetting.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectLightSetting.cs
index c3ba396..bf0f7cd 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectLightSetting.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectLightSetting.cs
@@ -17,6 +17,10 @@
             BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor;
             Tag = "categoryAddScene";
         }
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
+        }
         /// <summary>
         /// 鏄剧ず鐏厜鐨勮缁嗚缃晫闈�  榛樿-1(鏂板-榛樿寮�)锛�0鍏� 锛�1寮�
         /// </summary>
@@ -27,7 +31,19 @@
         public void Show(DeviceUI device, string targetDeviceID="", int state=-1, bool isFromRoom = false)
         {
             #region topview
-            var topBGView = new FrameLayout()鈥�            {鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor鈥�            };鈥�            AddChidren(topBGView);鈥�            var topView = new FrameLayout()鈥�            {鈥�                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,鈥�            };鈥�            AddChidren(topView);
+            var topBGView = new FrameLayout()
+            {
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
+            };
+            AddChidren(topBGView);
+            var topView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+            };
+            AddChidren(topView);
 
             var title = new Button()
             {
@@ -38,7 +54,8 @@
                 Gravity = Gravity.CenterHorizontal
             };
             topView.AddChidren(title);
-            var back = new Device.CommonForm.BackButton() { };鈥�            topView.AddChidren(back);
+            var back = new Device.CommonForm.BackButton() { };
+            topView.AddChidren(back);
             back.MouseUpEventHandler += (sender, e) =>
             {
                 this.RemoveFromParent();
@@ -163,7 +180,7 @@
             };
             dimmingRowView.AddChidren(dimmingNextBtn);
 
-            var confirmBtn = new CommonForm.CompleteButton() { };
+            var confirmBtn = new CommonForm.CompleteButton(1,2,3);
             AddChidren(confirmBtn);
             if (state == -1)
             {
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectRoomList.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectRoomList.cs
index a67e1b4..ef55886 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectRoomList.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectRoomList.cs
@@ -9,10 +9,26 @@
         {
             BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor;
         }
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
+        }
         public void Show()
         {
             #region topview
-            var topBGView = new FrameLayout()鈥�            {鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor鈥�            };鈥�            AddChidren(topBGView);鈥�            var topView = new FrameLayout()鈥�            {鈥�                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,鈥�            };鈥�            AddChidren(topView);
+            var topBGView = new FrameLayout()
+            {
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
+            };
+            AddChidren(topBGView);
+            var topView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+            };
+            AddChidren(topView);
 
             var title = new Button()
             {
@@ -24,7 +40,8 @@
             };
             topView.AddChidren(title);
 
-            var back = new Device.CommonForm.BackButton() { };鈥�            topView.AddChidren(back);
+            var back = new Device.CommonForm.BackButton() { };
+            topView.AddChidren(back);
 
             back.MouseUpEventHandler += (sender, e) =>
             {
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDelayTime.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDelayTime.cs
index 8c942c3..6c6ed15 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDelayTime.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDelayTime.cs
@@ -11,6 +11,10 @@
             BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor;
             Tag = "categoryAddScene";
         }
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
+        }
         public Button customBtn;
         public SceneTargetDeviceUI SceneTargetDevice = new SceneTargetDeviceUI { Type = 1 };
         public List<string> TimeList = new List<string> { "1_绉抇1", "5_绉抇5", "10_绉抇10", "1_鍒嗛挓_60" };
@@ -261,69 +265,69 @@
                     tList.Add($"{i} {Language.StringByID(R.MyInternationalizationString.Second)}");
                 }
                 //1-60绉�
-                PickerView.Show(tList, (obj) =>
-                {
-                    SceneTargetDevice.DelayTime = int.Parse(tList[obj].Split(' ')[0]);
+                //PickerView.Show(tList, (obj) =>
+                //{
+                //    SceneTargetDevice.DelayTime = int.Parse(obj.Split(' ')[0]);
 
-                    if (state == -1)
-                    {
-                        if (isFromRoom)
-                        {
-                            Room.AddRoomScene.sceneTargetDevicesList.Add(SceneTargetDevice);
-                            UserView.HomePage.Instance.RemoveViewByTag("categoryAddScene");
-                            var roomAddScene = new Room.AddRoomScene();
-                            UserView.HomePage.Instance.AddChidren(roomAddScene);
-                            UserView.HomePage.Instance.PageIndex += 1;
-                            roomAddScene.Show(Room.AddRoomScene.CurrentRoom);
-                        }
-                        else
-                        {
-                            CategoryAddScene.sceneTargetDevicesList.Add(SceneTargetDevice);
-                            UserView.HomePage.Instance.RemoveViewByTag("categoryAddScene");
-                            var categoryAddScene = new CategoryAddScene();
-                            UserView.HomePage.Instance.AddChidren(categoryAddScene);
-                            UserView.HomePage.Instance.PageIndex += 1;
-                            categoryAddScene.Show();
-                        }
-                    }
-                    else
-                    {
-                        if (isFromRoom)
-                        {
-                            if (!string.IsNullOrEmpty(targetDeviceID))
-                            {
-                                var targetDeviceUI = Room.AddRoomScene.sceneTargetDevicesList.Find((obj1) => obj1.SceneTargetDeviceUIID == targetDeviceID);
-                                if (targetDeviceUI != null)
-                                {
-                                    targetDeviceUI.DelayTime = SceneTargetDevice.DelayTime;
-                                    targetDeviceUI.Type = SceneTargetDevice.Type;
-                                }
-                            }
-                            UserView.HomePage.Instance.RemoveViewByTag("categoryAddScene");
-                            var roomAddScene = new Room.AddRoomScene();
-                            UserView.HomePage.Instance.AddChidren(roomAddScene);
-                            UserView.HomePage.Instance.PageIndex += 1;
-                            roomAddScene.Show(Room.AddRoomScene.CurrentRoom);
-                        }
-                        else
-                        {
-                            if (!string.IsNullOrEmpty(targetDeviceID))
-                            {
-                                var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj1) => obj1.SceneTargetDeviceUIID == targetDeviceID);
-                                if (targetDeviceUI != null)
-                                {
-                                    targetDeviceUI.DelayTime = SceneTargetDevice.DelayTime;
-                                    targetDeviceUI.Type = SceneTargetDevice.Type;
-                                }
-                            }
-                            UserView.HomePage.Instance.RemoveViewByTag("categoryAddScene");
-                            var categoryAddScene = new CategoryAddScene();
-                            UserView.HomePage.Instance.AddChidren(categoryAddScene);
-                            UserView.HomePage.Instance.PageIndex += 1;
-                            categoryAddScene.Show();
-                        }
-                    }
-                },0,"", Language.StringByID(R.MyInternationalizationString.Confrim));
+                //    if (state == -1)
+                //    {
+                //        if (isFromRoom)
+                //        {
+                //            Room.AddRoomScene.sceneTargetDevicesList.Add(SceneTargetDevice);
+                //            UserView.HomePage.Instance.RemoveViewByTag("categoryAddScene");
+                //            var roomAddScene = new Room.AddRoomScene();
+                //            UserView.HomePage.Instance.AddChidren(roomAddScene);
+                //            UserView.HomePage.Instance.PageIndex += 1;
+                //            roomAddScene.Show(Room.AddRoomScene.CurrentRoom);
+                //        }
+                //        else
+                //        {
+                //            CategoryAddScene.sceneTargetDevicesList.Add(SceneTargetDevice);
+                //            UserView.HomePage.Instance.RemoveViewByTag("categoryAddScene");
+                //            var categoryAddScene = new CategoryAddScene();
+                //            UserView.HomePage.Instance.AddChidren(categoryAddScene);
+                //            UserView.HomePage.Instance.PageIndex += 1;
+                //            categoryAddScene.Show();
+                //        }
+                //    }
+                //    else
+                //    {
+                //        if (isFromRoom)
+                //        {
+                //            if (!string.IsNullOrEmpty(targetDeviceID))
+                //            {
+                //                var targetDeviceUI = Room.AddRoomScene.sceneTargetDevicesList.Find((obj1) => obj1.SceneTargetDeviceUIID == targetDeviceID);
+                //                if (targetDeviceUI != null)
+                //                {
+                //                    targetDeviceUI.DelayTime = SceneTargetDevice.DelayTime;
+                //                    targetDeviceUI.Type = SceneTargetDevice.Type;
+                //                }
+                //            }
+                //            UserView.HomePage.Instance.RemoveViewByTag("categoryAddScene");
+                //            var roomAddScene = new Room.AddRoomScene();
+                //            UserView.HomePage.Instance.AddChidren(roomAddScene);
+                //            UserView.HomePage.Instance.PageIndex += 1;
+                //            roomAddScene.Show(Room.AddRoomScene.CurrentRoom);
+                //        }
+                //        else
+                //        {
+                //            if (!string.IsNullOrEmpty(targetDeviceID))
+                //            {
+                //                var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj1) => obj1.SceneTargetDeviceUIID == targetDeviceID);
+                //                if (targetDeviceUI != null)
+                //                {
+                //                    targetDeviceUI.DelayTime = SceneTargetDevice.DelayTime;
+                //                    targetDeviceUI.Type = SceneTargetDevice.Type;
+                //                }
+                //            }
+                //            UserView.HomePage.Instance.RemoveViewByTag("categoryAddScene");
+                //            var categoryAddScene = new CategoryAddScene();
+                //            UserView.HomePage.Instance.AddChidren(categoryAddScene);
+                //            UserView.HomePage.Instance.PageIndex += 1;
+                //            categoryAddScene.Show();
+                //        }
+                //    }
+                //}, Language.StringByID(R.MyInternationalizationString.Confrim));
             }
             customBtn.MouseDownEventHandler += customMouseUpEvent;
             customRowView.MouseDownEventHandler += customMouseUpEvent;
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDimmableLightSetting.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDimmableLightSetting.cs
index d41a636..ec76115 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDimmableLightSetting.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDimmableLightSetting.cs
@@ -212,7 +212,7 @@
             };
             percentSliderRowView.AddChidren(seekBarTitle);
 
-            var confirmBtn = new Device.CommonForm.CompleteButton() { };
+            var confirmBtn = new Device.CommonForm.CompleteButton(1,2,3);
             AddChidren(confirmBtn);
 
             if (state == -1)
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedScene.cs
index 35cd3d5..52a4935 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedScene.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedScene.cs
@@ -11,7 +11,10 @@
             BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor;
             Tag = "categoryAddScene";
         }
-
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
+        }
         /// <summary>
         /// 娣诲姞鍦烘櫙涓烘墽琛岀洰鏍� state = -1 涓嶉�夋嫨锛屼唬琛ㄦ柊澧炪�俿tate=1 鏃讹紝targetDeviceID浠h〃浼犺繘鏉ョ殑鐩爣id,
         /// </summary>
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs
new file mode 100755
index 0000000..53cd5e5
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs
@@ -0,0 +1,113 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared.Common;
+
+namespace Shared.Phone.Device.Category
+{
+    public class SelectFloor : FrameLayout
+    {
+
+        public Action<string> FloorAction;
+
+
+        /// <summary>
+		/// Init
+		/// </summary>
+		public void Init(int x,int y,CommonForm.Direction direction=CommonForm.Direction.Left)
+        {
+            var dialog = new FrameLayout()
+            {
+                BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
+            };
+            AddChidren(dialog);
+
+            dialog.MouseUpEventHandler += (sender, e) =>
+            {
+                RemoveFromParent();
+            };
+
+            var bg = new Button
+            {
+                X = Application.GetRealWidth(x),
+                Y = Application.GetRealHeight(y),
+                Width = Application.GetMinRealAverage(449),
+                Height = Application.GetMinRealAverage(783),
+                UnSelectedImagePath="Item/SelectFloor_Left.png"
+            };
+            dialog.AddChidren(bg);
+            if(direction==CommonForm.Direction.Right)
+            {
+                bg.UnSelectedImagePath = "";
+            }
+
+            var backgroundFL = new FrameLayout
+            {
+                X = Application.GetRealWidth(x+10),
+                Y = Application.GetRealHeight(y+23),
+                Width = Application.GetMinRealAverage(449-20),
+                Height = Application.GetMinRealAverage(783-23-10),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+            };
+            dialog.AddChidren(backgroundFL);
+
+            var tip = new Button
+            {
+                X = Application.GetRealWidth(80),
+                Width = Application.GetRealWidth(350),
+                Height = Application.GetRealHeight(150),
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextID = R.MyInternationalizationString.SelectFloor
+            };
+            backgroundFL.AddChidren(tip);
+            tip.MouseUpEventHandler += (sender, e) =>
+            {
+                BackgroundColor = ZigbeeColor.Current.GXCRedColor;
+            };
+
+            var floorLayout = new VerticalScrolViewLayout
+            {
+                Y = tip.Bottom,
+                Width = Application.GetMinRealAverage(449),
+                Height = Application.GetMinRealAverage(600)
+            };
+            backgroundFL.AddChidren(floorLayout);
+
+            if (Config.Instance.Home.FloorDics.Count > 0)
+            {
+                foreach (var floor in Config.Instance.Home.FloorDics)
+                {
+                    AddFloor(floorLayout, floor);
+                }
+            }
+        }
+
+        /// <summary>
+        /// AddFloor
+        /// </summary>
+        /// <param name="verticalScrolView"></param>
+        private void AddFloor(VerticalScrolViewLayout verticalScrolView, KeyValuePair<string, string> floor)
+        {
+            var frow = new CommonForm.LeftIconButtonRow(449, 150);
+            frow.Tag = floor.Key;
+            frow.Init("Floor/Floor.png", "Floor/FloorSelected.png", floor.Value);
+            verticalScrolView.AddChidren(frow);
+            if (Config.Instance.Home.CurrentFloorId == floor.Key)
+            {
+                frow.IsSelected = true;
+            }
+
+            frow.IconButton.MouseUpEventHandler += SelectFloor_MouseUpEvent;
+            frow.TitleButton.MouseUpEventHandler += SelectFloor_MouseUpEvent;
+        }
+
+        private void SelectFloor_MouseUpEvent(object sender,MouseEventArgs mouseEventArgs)
+        {
+            ((sender as Button).Parent as CommonForm.LeftIconButtonRow).IsSelected = true;
+            Config.Instance.Home.CurrentFloorId = (sender as Button).Tag.ToString();
+            FloorAction?.Invoke(Config.Instance.Home.GetCurrentFloorName());
+            RemoveFromParent();
+        }
+    }
+
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/ACLeftIconButtonRowLayout.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/ACLeftIconButtonRowLayout.cs
new file mode 100755
index 0000000..1a789a2
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/ACLeftIconButtonRowLayout.cs
@@ -0,0 +1,116 @@
+锘縰sing System;
+namespace Shared.Phone.Device.CommonForm
+{
+    /// <summary>
+    /// 鍥剧墖鍦ㄥ乏杈癸紝鏂囧瓧鍦ㄥ彸杈�,甯︿笅鍒掔嚎鐨勮鎺т欢
+    /// </summary>
+    public class ACLeftIconButtonRowLayout : FrameLayout
+    {
+        #region 鈼� 鍙橀噺__________________________
+        /// <summary>
+        /// 鍥剧墖
+        /// </summary>
+        public Button IconButton;
+        /// <summary>
+        /// 鏍囬
+        /// </summary>
+        public Button TitleButton;
+        /// <summary>
+        /// 涓嬪垝绾�
+        /// </summary>
+        public FrameLayout lineFrameLayout;
+
+        #endregion
+
+        #region 鈼� 鏋勯�犳柟娉昣______________________
+
+        public ACLeftIconButtonRowLayout()
+        {
+
+        }
+
+        #endregion
+
+        #region 鈼� 鍒濆鍖朹_________________________
+
+        /// <summary>
+        /// 鍒濆鍖�--閮ㄥ垎鍙傛暟鍏堝啓姝诲惂
+        /// </summary>
+        /// <param name="iconPath">Icon path.</param>
+        /// <param name="iconSelectedPath">Icon selected path.</param>
+        /// <param name="title">Title.</param>
+        public void Init(string iconPath, string iconSelectedPath, string title, bool hadLine = true)
+        {
+            IconButton = new Button()
+            {
+                X = Application.GetRealWidth(80),
+                Height = Application.GetMinRealAverage(80),
+                Width = Application.GetMinRealAverage(80),
+                UnSelectedImagePath = iconPath,
+                SelectedImagePath = iconSelectedPath,
+                Gravity = Gravity.CenterVertical,
+                Tag = this.Tag
+            };
+            AddChidren(IconButton);
+
+            TitleButton = new Button()
+            {
+                X = IconButton.Right + Application.GetRealWidth(30),
+                Height = Application.GetRealHeight(80),
+                Width = this.Width - Application.GetRealWidth(80 + 80 + 30),
+                TextColor = Shared.Common.ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                SelectedTextColor = Common.ZigbeeColor.Current.GXCACSelectedTextColor,
+                Text = title,
+                TextAlignment = TextAlignment.CenterLeft,
+                Gravity = Gravity.CenterVertical,
+                Tag = this.Tag
+            };
+            AddChidren(TitleButton);
+
+            lineFrameLayout = new FrameLayout()
+            {
+                X = IconButton.X,
+                Y = this.Height - 1,
+                Width = this.Width - IconButton.X,
+                Height = 1,
+                BackgroundColor = Common.ZigbeeColor.Current.GXCPlaceHolderTextColor
+            };
+            if (hadLine)
+            {
+                AddChidren(lineFrameLayout);
+            }
+        }
+        #endregion
+
+        #region 鈼� 閫変腑鐘舵�乢_________________________
+
+        /// <summary>
+        /// 璁剧疆鐘舵��
+        /// </summary>
+        /// <param name="statu"></param>
+        public void SetStatu(bool statu)
+        {
+            IconButton.IsSelected = statu;
+            TitleButton.IsSelected = statu;
+        }
+        /// <summary>
+        /// 閫変腑
+        /// </summary>
+        public void SetSelectedStatu()
+        {
+            IconButton.IsSelected = true;
+            TitleButton.IsSelected = true;
+        }
+        /// <summary>
+        /// 涓嶉�変腑
+        /// </summary>
+        public void SetUnSelectedStatu()
+        {
+            IconButton.IsSelected = false;
+            TitleButton.IsSelected = false;
+        }
+        #endregion
+    }
+
+}
+
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs
new file mode 100755
index 0000000..34c6509
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs
@@ -0,0 +1,102 @@
+锘縰sing System;
+using Shared.Common;
+
+namespace Shared.Phone.Device.CommonForm
+{
+    public class ButtonLineForm:FrameLayout
+    {
+        /// <summary>
+        /// name
+        /// </summary>
+        public Button NameBtn;
+        /// <summary>
+        /// line
+        /// </summary>
+        public Line Line;
+        /// <summary>
+        /// isSelected
+        /// </summary>
+        private bool v_Selected;
+        /// <summary>
+        /// IsSelected
+        /// </summary>
+        public bool IsSelected
+        {
+            set
+            {
+                try
+                {
+                    v_Selected = value;
+                    SetStatu(v_Selected);
+                }
+                catch
+                {
+                    v_Selected = false;
+                    SetStatu(v_Selected);
+                }
+            }
+            get
+            {
+                return v_Selected;
+            }
+        }
+
+        /// <summary>
+        /// ButtonLineForm
+        /// </summary>
+        /// <param name="x"></param>
+        /// <param name="y"></param>
+        /// <param name="width"></param>
+        /// <param name="height"></param>
+        public ButtonLineForm(int x, int y, int width, int height)
+        {
+            X = Application.GetRealWidth(x);
+            Y = Application.GetRealHeight(y);
+            Width = Application.GetRealWidth(width);
+            Height = Application.GetRealHeight(height);
+        }
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        public void Init()
+        {
+            NameBtn = new SelectedStatuButton()
+            {
+                Width = Width,
+                Height = Height - 3
+            };
+            AddChidren(NameBtn);
+
+            Line = new Line(Height,Width/2,2);
+            AddChidren(Line);
+        }
+
+        /// <summary>
+        /// SetTitle
+        /// </summary>
+        /// <param name="title"></param>
+        public void SetTitle(string title)
+        {
+            NameBtn.Text = title;
+        }
+
+        /// <summary>
+        /// SetTitle
+        /// </summary>
+        /// <param name="title"></param>
+        public void SetTitle(int title)
+        {
+            SetTitle(Language.StringByID(title));
+        }
+
+        /// <summary>
+        /// SetStatu
+        /// </summary>
+        /// <param name="statu"></param>
+        public void SetStatu(bool statu)
+        {
+            NameBtn.IsSelected = Line.IsSelected = statu;
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/CommonFormResouce.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/CommonFormResouce.cs
new file mode 100755
index 0000000..92785ff
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/CommonFormResouce.cs
@@ -0,0 +1,174 @@
+锘縰sing System;
+using Shared.Common;
+
+namespace Shared.Phone.Device.CommonForm
+{
+    public class CommonFormResouce
+    {
+        /// <summary>
+        /// 瀛椾綋12
+        /// </summary>
+        public const int loginTextSize = 12;
+        /// <summary>
+        /// 鍗犱綅瀛椾綋澶у皬
+        /// 12
+        /// </summary>
+        public const int PlaceHolderTextSize = 12;
+
+        /// <summary>
+        /// Row_Height
+        /// </summary>
+        public const int Row_Height = 138;
+        /// <summary>
+        /// Row_Width
+        /// </summary>
+        public const int Row_Width = 884;
+        /// <summary>
+        /// Row_X
+        /// </summary>
+        public const int Row_X = 29;
+        /// <summary>
+        /// 璺濈宸﹁竟鐨勮窛绂�
+        /// </summary>
+        public const int X_Left = 58;
+        /// <summary>
+        /// BigFormRadius
+        /// </summary>
+        public const int BigFormRadius = 17;
+        /// <summary>
+        ///  楂樺害 184
+        /// </summary>
+        public const int TopFrameLayout_Height = 184;
+        /// <summary>
+        /// topview 鐘舵�佹爮楂樺害 60
+        /// </summary>
+        public const int TopStatuFrameLayout_Height = 60;
+        /// <summary>
+        /// topview 鐘舵�佹爮楂樺害 124
+        /// </summary>
+        public const int Topview_Height = 124;
+
+        /// <summary>
+        /// 鏍囬澶у皬 17
+        /// </summary>
+        public const int TopTitle_TextSize = 17;
+        /// <summary>
+        /// 鏍囬瀹藉害 1080 - 500
+        /// </summary>
+        public const int TopTitle_Width = 1080 - 500;
+
+        /// <summary>
+        /// 鍙戦�侀獙璇佺爜
+        /// </summary>
+        /// <param name="loginSendVerCodeObj"></param>
+        /// <returns></returns>
+        public static async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> LoginSendVerCode(SendDataToServer.LoginSendVerCodeObj loginSendVerCodeObj)
+        {
+            try
+            {
+                var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/LoginSendVerCode", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(loginSendVerCodeObj)));
+                return requestRevertObj;
+            }
+            catch
+            {
+                return null;
+            }
+        }
+
+        /// <summary>
+        /// 楠岃瘉鐮佺櫥褰�
+        /// </summary>
+        /// <param name="loginValidCodeOBJ"></param>
+        /// <returns></returns>
+        public static async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> LoginByCode(SendDataToServer.LoginValidCodeOBJ loginValidCodeOBJ)
+        {
+            try
+            {
+                var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/LoginValidCode", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(loginValidCodeOBJ)));
+                return requestRevertObj;
+            }
+            catch
+            {
+                return null;
+            }
+        }
+
+        /// <summary>
+        /// 娉ㄥ唽鍙戦�侀獙璇佺爜
+        /// </summary>
+        /// <param name="registerAccountObj"></param>
+        /// <returns></returns>
+        public static async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> RegisterSendVerCode(SendDataToServer.RegisterSendVerCodeObj registerAccountObj)
+        {
+            try
+            {
+                var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/RegisterSendVerCode", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(registerAccountObj)));
+                return requestRevertObj;
+            }
+            catch
+            {
+                return null;
+            }
+        }
+
+        /// <summary>
+        /// 娉ㄥ唽
+        /// </summary>
+        /// <param name="registerAccountObj"></param>
+        /// <returns></returns>
+        public static async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> Register(SendDataToServer.RegisterAccountObj registerAccountObj)
+        {
+            try
+            {
+                var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ValidataCodeAndRegisterAccount", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(registerAccountObj)));
+                return requestRevertObj;
+            }
+            catch
+            {
+                return null;
+            }
+        }
+
+        /// <summary>
+        /// 閲嶇疆瀵嗙爜
+        /// </summary>
+        /// <param name="resetPasswordObj"></param>
+        /// <returns></returns>
+        public static async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> ResetPassword(SendDataToServer.ResetPasswordObj resetPasswordObj)
+        {
+            try
+            {
+                var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ResetPassword", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(resetPasswordObj)));
+                return requestRevertObj;
+            }
+            catch
+            {
+                return null;
+            }
+        }
+
+        /// <summary>
+        /// 楠岃瘉楠岃瘉鐮�
+        /// </summary>
+        /// <param name="validatorCodeObj"></param>
+        /// <returns></returns>
+        public static async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> ValidatorCode(SendDataToServer.ValidatorCodeObj validatorCodeObj)
+        {
+            try
+            {
+                var requestRevertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/ValidatorCode", System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(validatorCodeObj)));
+                return requestRevertObj;
+            }
+            catch
+            {
+                return null;
+            }
+        }
+    }
+
+    public enum Direction
+    {
+        Left=1,
+        Right=2
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/CommonFormResourse.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/CommonFormResourse.cs
deleted file mode 100755
index 415cec6..0000000
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/CommonFormResourse.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-锘縰sing System;
-namespace Shared.Phone.Device.CommonForm
-{
-    public class CommonFormRrsouce
-    {
-        /// <summary>
-        ///  楂樺害 220
-        /// </summary>
-        public static readonly int TopFrameLayout_Height=220;
-        /// <summary>
-        /// topview 鐘舵�佹爮楂樺害 80
-        /// </summary>
-        public static readonly int TopStatuFrameLayout_Height = 80;
-        /// <summary>
-        /// topview 鐘舵�佹爮楂樺害 140
-        /// </summary>
-        public static readonly int Topview_Height = 140;
-
-        /// <summary>
-        /// 鏍囬澶у皬 20
-        /// </summary>
-        public static readonly int TopTitle_TextSize = 20;
-        /// <summary>
-        /// 鏍囬瀹藉害 1080 - 500
-        /// </summary>
-        public static readonly int TopTitle_Width = 1080 - 500;
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/CompleteButton.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/CompleteButton.cs
index fd894fd..1745281 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/CompleteButton.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/CompleteButton.cs
@@ -6,28 +6,44 @@
     /// Complete button.
     /// <para>榛樿鏂囧瓧锛� 瀹屾垚 </para>
     /// <para>鐧借壊瀛椾綋</para>
-    /// <para>钃濊壊鑳屾櫙</para>
+    /// <para>榛戣壊鑳屾櫙</para>
     /// <para>鏂囧瓧灞呬腑</para>
     /// <para>榛樿瀛楀彿澶у皬</para>
     /// </summary>
     public class CompleteButton:Button
     {
-        private readonly int Button_Height = 110;
-        private readonly int Button_Width = 750;
-        private readonly int Button_Y = CommonPage.AppRealHeight - 300;
         /// <summary>
-        /// Initializes a new instance of the <see cref="T:Shared.Phone.Device.CommonForm.CompleteButton"/> class.
+        /// CompleteButton
         /// </summary>
-        public CompleteButton()
+        /// <param name="y"></param>
+        /// <param name="width"></param>
+        /// <param name="height"></param>
+        public CompleteButton(int y, int width, int height)
         {
+            this.Y = Application.GetRealHeight(y);
+            this.Width = Application.GetRealWidth(width);
+            this.Height = Application.GetRealHeight(height);
             TextID = R.MyInternationalizationString.Complete;
-            BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor;
+            BackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor;
             TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
-            Height = Application.GetRealHeight(Button_Height);
-            Width = Application.GetRealWidth(Button_Width);
             Gravity = Gravity.CenterHorizontal;
-            Radius = (uint)Application.GetRealHeight(Button_Height/2);
-            Y = Application.GetRealHeight(Button_Y);
+            Radius = (uint)Application.GetRealHeight(height / 2);
+        }
+        /// <summary>
+        /// SetTitle
+        /// </summary>
+        /// <param name="title"></param>
+        public void SetTitle(string title)
+        {
+            Text = title;
+        }
+        /// <summary>
+        /// SetTitle
+        /// </summary>
+        /// <param name="title"></param>
+        public void SetTitle(int title)
+        {
+            SetTitle(Language.StringByID(title));
         }
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/CustomAlert.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/CustomAlert.cs
new file mode 100755
index 0000000..23f0c78
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/CustomAlert.cs
@@ -0,0 +1,124 @@
+锘縰sing System;
+using Shared.Common;
+
+namespace Shared.Phone.Device.CommonForm
+{
+    public class CustomAlert : FrameLayout
+    {
+        /// <summary>
+        /// CancleBtn
+        /// </summary>
+        public Button CancleBtn;
+        /// <summary>
+        /// ComfrimBtn
+        /// </summary>
+        public Button ComfrimBtn;
+        /// <summary>
+        /// ResultEventHandler
+        /// </summary>
+        public Action<bool> ResultEventHandler;
+
+        public CustomAlert()
+        {
+            Width = Application.GetRealWidth(1080);
+            Height = Application.GetRealHeight(1920);
+        }
+
+        /// <summary>
+        /// Show
+        /// </summary>
+        /// <param name="tip"></param>
+        /// <param name="message"></param>
+        /// <param name="cancle"></param>
+        /// <param name="comfirm"></param>
+        public void Show(string tip,string message,string cancle,string comfirm)
+        {
+            var tipBackGround = new FrameLayout
+            {
+                BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
+            };
+            AddChidren(tipBackGround);
+
+            var tipView = new FrameLayout
+            {
+                Height = Application.GetRealHeight(478),
+                Width = Application.GetRealWidth(792),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(30),
+                Gravity = Gravity.Center
+            };
+            tipBackGround.AddChidren(tipView);
+
+            var tipBtn = new Button
+            {
+                Y=Application.GetRealHeight(69),
+                Width=Application.GetRealWidth(500),
+                Height=Application.GetRealHeight(63),
+                Gravity=Gravity.CenterHorizontal,
+                TextColor=ZigbeeColor.Current.GXCTextBlackColor,
+                TextSize=15,
+                Text=tip
+            };
+            tipView.AddChidren(tipBtn);
+
+            var messageBtn = new Button
+            {
+                Y = Application.GetRealHeight(180),
+                Width = Application.GetRealWidth(674),
+                Height = Application.GetRealHeight(140),
+                Gravity = Gravity.CenterHorizontal,
+                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+                TextSize = 15,
+                Text = message,
+                IsMoreLines=true
+            };
+            tipView.AddChidren(messageBtn);
+
+            CancleBtn = new Button
+            {
+                Y = Application.GetRealHeight(351),
+                Width = Application.GetRealWidth(396),
+                Height = Application.GetRealHeight(127),
+                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+                TextSize = 15,
+                BackgroundColor=ZigbeeColor.Current.GXCButtonUnSelectedColor3,
+                Text = cancle
+            };
+            tipView.AddChidren(CancleBtn);
+
+            ComfrimBtn = new Button
+            {
+                X = Application.GetRealWidth(396),
+                Y = Application.GetRealHeight(351),
+                Width = Application.GetRealWidth(396),
+                Height = Application.GetRealHeight(127),
+                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+                TextSize = 15,
+                BackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor,
+                Text = comfirm
+            };
+            tipView.AddChidren(ComfrimBtn);
+
+            CancleBtn.MouseUpEventHandler = (sender, e) =>
+            {
+                RemoveFromParent();
+                ResultEventHandler?.Invoke(false);
+            };
+
+            ComfrimBtn.MouseUpEventHandler = (sender, e) =>
+            {
+                RemoveFromParent();
+                ResultEventHandler?.Invoke(true);
+            };
+        }
+        /// <summary>
+        /// Show
+        /// </summary>
+        /// <param name="message"></param>
+        public void Show(string message)
+        {
+            Show(Language.StringByID(R.MyInternationalizationString.TIP), message, Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim));
+        }
+
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs
index 384e134..51e053c 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs
@@ -7,333 +7,256 @@
 {
     public class DeviceDetailInfo : FrameLayout
     {
-        public List<string> RoomNameList;
-        public string BelongZoneStr;
+        #region 鈼� 鍙橀噺____________________________
+        /// <summary>
+        /// bodyFrameLayout
+        /// </summary>
+        private FrameLayout bodyFrameLayout;
+        /// <summary>
+        /// 鎵�灞炲尯鍩�
+        /// </summary>
+        private string roomName;
+        /// <summary>
+        /// action
+        /// </summary>
         public Action action;
+
+        #endregion
+
+        #region 鈼� 绉婚櫎____________________________
+        /// <summary>
+        /// RemoveFromParent
+        /// </summary>
         public override void RemoveFromParent()
         {
             action();
             base.RemoveFromParent();
         }
+        #endregion
+
+        #region 鈼� 鏋勯�犳柟娉昣________________________
+        /// <summary>
+        /// DeviceDetailInfo
+        /// </summary>
         public DeviceDetailInfo()
         {
             BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
         }
+
+        #endregion
+
+        #region 鈼� 鏄剧ず鐣岄潰_________________________
+        /// <summary>
+        /// Show
+        /// </summary>
+        /// <param name="device"></param>
+        /// <param name="room"></param>
         public void Show(DeviceUI device, Common.Room room)
         {
-            RoomNameList = new List<string> { };
-            RoomNameList = Common.Room.CurrentRoom.GetRoomListNameByDevice(device.CommonDevice);
-            #region topview
-            var topBGView = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(CommonPage.Navigation_Height),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
-            };
-            AddChidren(topBGView);
-            var topView = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
-                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-            };
-            AddChidren(topView);
+            Init(device);
 
-            var title = new Button()
-            {
-                TextAlignment = TextAlignment.Center,
-                TextID = R.MyInternationalizationString.ChangeDeviceInfo,
-                TextSize = 20,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Width = Application.GetRealWidth(CommonPage.AppRealWidth - 500),
-                Gravity = Gravity.CenterHorizontal
-            };
-            topView.AddChidren(title);
+            AddTop();
 
-            var back = new BackButton() { };
-            topView.AddChidren(back);
-            back.MouseUpEventHandler += (sender, e) =>
-            {
-                this.RemoveFromParent();
-            };
-            #endregion
+            AddBodyView(device);
 
-            #region midFL
-            var midFL = new FrameLayout()
+        }
+
+        #endregion
+
+        #region Add____________________________________
+
+        /// <summary>
+        /// AddTop
+        /// </summary>
+        public void AddTop()
+        {
+            var top = new TopFrameLayout();
+            AddChidren(top);
+            top.InitTopview();
+            top.SetTopTitle(R.MyInternationalizationString.FunctionSetting);
+            top.backButton.MouseUpEventHandler += (sender, e) =>
             {
-                Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.Navigation_Height),
-                Y = topView.Bottom,
+                RemoveFromParent();
+            };
+
+        }
+        /// <summary>
+        /// AddBodyView
+        /// </summary>
+        public void AddBodyView(DeviceUI device)
+        {
+            bodyFrameLayout = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(184),
+                Height = Application.GetRealHeight(1737),
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
+            };
+            AddChidren(bodyFrameLayout);
+
+            var deviceBG = new Button()
+            {
+                Y = Application.GetRealHeight(118),
+                Width = Application.GetMinRealAverage(207),
+                Height = Application.GetMinRealAverage(207),
+                Gravity = Gravity.CenterHorizontal,
                 BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                Radius=(uint)Application.GetMinRealAverage(207)
             };
-            this.AddChidren(midFL);
-            var r = new R.MyInternationalizationString();
-            object t;
-            try
+            bodyFrameLayout.AddChidren(deviceBG);
+
+            var deviceBG2 = new Button()
             {
-                t = r.GetType().InvokeMember(device.CommonDevice.Type.ToString(), System.Reflection.BindingFlags.GetField, null, r, null);
-            }
-            catch
-            {
-                t = 11070;
-            }
+                Y = Application.GetRealHeight(130),
+                Width = Application.GetMinRealAverage(184),
+                Height = Application.GetMinRealAverage(184),
+                Gravity = Gravity.CenterHorizontal,
+                BackgroundColor = ZigbeeColor.Current.GXCSelectedBackgroundColor,
+                Radius = (uint)Application.GetMinRealAverage(184)
+            };
+            bodyFrameLayout.AddChidren(deviceBG2);
+
             var deviceIMG = new Button()
             {
-                Y = Application.GetRealHeight(30),
-                Width = Application.GetMinRealAverage(320),
-                Height = Application.GetMinRealAverage(320),
+                Y = Application.GetRealHeight(161),
+                Width = Application.GetMinRealAverage(124),
+                Height = Application.GetMinRealAverage(124),
                 UnSelectedImagePath = device.IconPath,
-                SelectedImagePath = device.OnlineIconPath,
-                IsSelected=device.CommonDevice.IsOnline==1,
                 Gravity = Gravity.CenterHorizontal
             };
-            midFL.AddChidren(deviceIMG);
+            bodyFrameLayout.AddChidren(deviceIMG);
+
             var deviceTypeName = new Button()
             {
-                Y = deviceIMG.Bottom,
+                Y = Application.GetRealHeight(360),
                 Width = Application.GetRealWidth(900),
-                Height = Application.GetRealHeight(100),
+                Height = Application.GetRealHeight(80),
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                TextID = (int)t,
+                Text = DeviceUI.GetDeviceTypeName(device.CommonDevice.Type),
                 Gravity = Gravity.CenterHorizontal
             };
-            midFL.AddChidren(deviceTypeName);
+            bodyFrameLayout.AddChidren(deviceTypeName);
 
-            var deviceNameFL = new FrameLayout()
-            {
-                Y = deviceTypeName.Bottom,
-                Height = Application.GetRealHeight(170),
-            };
-            midFL.AddChidren(deviceNameFL);
-            var deviceNameTip = new Button()
-            {
-                X = Application.GetRealWidth(50),
-                Height = Application.GetRealHeight(70),
-                Width = Application.GetRealWidth(900),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 12,
-                TextColor = ZigbeeColor.Current.GXCButtonTipColor,
-                TextID = R.MyInternationalizationString.DeviceName,
-            };
-            deviceNameFL.AddChidren(deviceNameTip);
-            var deviceName = new EditText()
-            {
-                X = Application.GetRealWidth(50),
-                Y = deviceNameTip.Bottom,
-                Height = Application.GetRealHeight(100) - 1,
-                Width = Application.GetRealWidth(900),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 20,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Text = device.CommonDevice.DeviceEpointName,
-            };
-            deviceNameFL.AddChidren(deviceName);
-            var deviceNameLine = new Button()
-            {
-                Y = deviceName.Bottom,
-                Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            deviceNameFL.AddChidren(deviceNameLine);
 
-            var zoneFL = new FrameLayout()
+            var infoFL = new FrameLayout
             {
-                Y = deviceNameFL.Bottom,
-                Height = Application.GetRealHeight(170),
+                Y = Application.GetRealHeight(540),
+                Height = Application.GetRealHeight(1195),
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
             };
-            midFL.AddChidren(zoneFL);
-            var zoneTip = new Button()
-            {
-                X = Application.GetRealWidth(50),
-                Height = Application.GetRealHeight(70),
-                Width = Application.GetRealWidth(900),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 12,
-                TextColor = ZigbeeColor.Current.GXCButtonTipColor,
-                TextID = R.MyInternationalizationString.BelongZone,
-            };
-            zoneFL.AddChidren(zoneTip);
-            var zone = new Button()
-            {
-                X = Application.GetRealWidth(50),
-                Y = deviceNameTip.Bottom,
-                Height = Application.GetRealHeight(100) - 1,
-                Width = Application.GetRealWidth(900),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 20,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Text = Common.Room.CurrentRoom.GetRoomName(RoomNameList),
-            };
-            zoneFL.AddChidren(zone);
-            var zoneRight = new SelectedStatuButton()
-            {
-                X = Application.GetRealWidth(1080 - 150),
-                Width = Application.GetMinRealAverage(110),
-                Height = Application.GetMinRealAverage(110),
-                UnSelectedImagePath = "Item/Next.png",
-                SelectedImagePath="Item/NextSelected.png",
-                Gravity = Gravity.CenterVertical
-            };
-            zoneFL.AddChidren(zoneRight);
-            var zoneLine = new Button()
-            {
-                Y = zone.Bottom,
-                Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            zoneFL.AddChidren(zoneLine);
+            bodyFrameLayout.AddChidren(infoFL);
 
-            var modelFL = new FrameLayout()
+            var tipBtn = new Button
             {
-                Y = zoneFL.Bottom,
-                Height = Application.GetRealHeight(170),
-            };
-            midFL.AddChidren(modelFL);
-            var modelTip = new Button()
-            {
-                X = Application.GetRealWidth(50),
-                Height = Application.GetRealHeight(70),
-                Width = Application.GetRealWidth(900),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 12,
-                TextColor = ZigbeeColor.Current.GXCButtonTipColor,
-                TextID = R.MyInternationalizationString.BelongModel,
-            };
-            modelFL.AddChidren(modelTip);
-            var model = new Button()
-            {
-                X = Application.GetRealWidth(50),
-                Y = deviceNameTip.Bottom,
-                Height = Application.GetRealHeight(100) - 1,
-                Width = Application.GetRealWidth(900),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 20,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Text = device.CommonDevice.DeviceName==""?Language.StringByID(R.MyInternationalizationString.UNKnown):device.CommonDevice.DeviceName
-            };
-            modelFL.AddChidren(model);
-            var modelLine = new Button()
-            {
-                Y = model.Bottom,
-                Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            modelFL.AddChidren(modelLine);
-
-            var sharedFL = new FrameLayout()
-            {
-                Y = modelFL.Bottom,
-                Height = Application.GetRealHeight(170),
-            };
-            //midFL.AddChidren(sharedFL);
-            var sharedBtn = new Button()
-            {
-                X = Application.GetRealWidth(50),
-                Y = Application.GetRealHeight(70),
-                Height = Application.GetRealHeight(100) - 1,
+                X = Application.GetRealWidth(CommonFormResouce.X_Left),
+                Y = Application.GetRealHeight(81),
                 Width = Application.GetRealWidth(500),
+                Height = Application.GetRealHeight(60),
+                TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor,
                 TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 20,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                TextID = R.MyInternationalizationString.Shared
+                TextSize = 15,
+                TextID = R.MyInternationalizationString.EditInfo
             };
-            sharedFL.AddChidren(sharedBtn);
+            infoFL.AddChidren(tipBtn);
 
-            var sharedRight = new Button()
-            {
-                X = Application.GetRealWidth(1080 - 150),
-                Width = Application.GetMinRealAverage(110),
-                Height = Application.GetMinRealAverage(110),
-                UnSelectedImagePath = "Item/Next.png",
-                Gravity = Gravity.CenterVertical
-            };
-            sharedFL.AddChidren(sharedRight);
+            var nameRow = new DeviceInfoEditRow(170);
+            nameRow.Init();
+            nameRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.FunctionName)} : ");
+            nameRow.SetTitle(string.IsNullOrEmpty(device.CommonDevice.DeviceEpointName) ? Language.StringByID(R.MyInternationalizationString.UNKnown) : device.CommonDevice.DeviceName);
+            infoFL.AddChidren(nameRow);
 
-            var sharedNum = new Button()
-            {
-                X = Application.GetRealWidth(1080 - 150 - 110),
-                Width = Application.GetRealWidth(110),
-                Height = Application.GetRealHeight(110),
-                TextAlignment = TextAlignment.CenterRight,
-                TextSize = 12,
-                TextColor = ZigbeeColor.Current.GXCButtonTipColor,
-                Text = "1浜�",
-                Gravity = Gravity.CenterVertical
-            };
-            sharedFL.AddChidren(sharedNum);
+            var zoneRow = new DeviceInfoRow(308);
+            zoneRow.Init();
+            zoneRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.BelongZone)} : ");
+            zoneRow.SetTitle(roomName);
+            infoFL.AddChidren(zoneRow);
 
-            var sharedLine = new Button()
-            {
-                Y = sharedBtn.Bottom,
-                Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            sharedFL.AddChidren(sharedLine);
+            var modelRow = new DeviceInfoRow(446);
+            modelRow.Init();
+            modelRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.BelongModel)} : ");
+            modelRow.SetTitle(string.IsNullOrEmpty(device.CommonDevice.DeviceName) ? Language.StringByID(R.MyInternationalizationString.UNKnown) : device.CommonDevice.DeviceName);
+            infoFL.AddChidren(modelRow);
 
-            var confirmBtn = new CommonForm.CompleteButton()
-            {
-            };
-            AddChidren(confirmBtn);
+            var sharedRow = new DeviceInfoRow(585);
+            sharedRow.Init();
+            sharedRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.Share)} : ");
+            sharedRow.SetTitle("2浜�");
+            infoFL.AddChidren(sharedRow);
 
-            confirmBtn.MouseUpEventHandler += async (sender, e) =>
-            {
-                if (device.CommonDevice == null)
-                {
-                    CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain);
-                    return;
-                }
-                var result = await Shared.Common.LocalDevice.Current.ReName(device.CommonDevice, deviceName.Text.Trim());
-                if (result)
-                {
-                    var alertSuccess = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.Success), Language.StringByID(R.MyInternationalizationString.Confrim));
-                    alertSuccess.Show();
-                    alertSuccess.ResultEventHandler += (senderSuccess, eSuccess) =>
-                    {
-                        //鏀瑰浘鐗�
-                        device.CommonDevice.IconPath = deviceIMG.UnSelectedImagePath;
-                        device.CommonDevice.IsCustomizeImage = true;
-                        device.CommonDevice.ReSave();
-                        //鏀规埧闂�
-                        Shared.Common.Room.CurrentRoom.ChangedRoom(device.CommonDevice, RoomNameList);
-                        RemoveFromParent();
-                    };
-                }
-                else
-                {
-                    return;
-                    //CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain);
-                }
-            };
-            #endregion
+
+            var confirmBtn = new CommonForm.CompleteButton(962, 907, 127);
+            confirmBtn.SetTitle(R.MyInternationalizationString.Confrim);
+            infoFL.AddChidren(confirmBtn);
 
             #region event
             EventHandler<MouseEventArgs> selectZoneEvent = (sender, e) =>
             {
-                UserCenter.SelectRoomForm selectedRoom = new UserCenter.SelectRoomForm();
-                selectedRoom.AddForm(selectedRoom, RoomNameList);
-                selectedRoom.ActionSelectRoom += ((rList) =>
-                {
-                    RoomNameList = rList;
-                    zone.Text = Shared.Common.Room.CurrentRoom.GetRoomName(RoomNameList);
-                });
+                //UserCenter.SelectRoomForm selectedRoom = new UserCenter.SelectRoomForm();
+                //selectedRoom.AddForm(selectedRoom, roomNameList);
+                //selectedRoom.ActionSelectRoom += ((rList) =>
+                //{
+                //    roomNameList = rList;
+                //    zone.Text = Shared.Common.Room.CurrentRoom.GetRoomName(roomNameList);
+                //});
             };
-            zoneRight.MouseUpEventHandler += selectZoneEvent;
-            zoneFL.MouseUpEventHandler += selectZoneEvent;
-            zone.MouseUpEventHandler += selectZoneEvent;
+            //zoneRight.MouseUpEventHandler += selectZoneEvent;
+            //zoneFL.MouseUpEventHandler += selectZoneEvent;
+            //zone.MouseUpEventHandler += selectZoneEvent;
 
             EventHandler<MouseEventArgs> selectDeviceIconEvent = (sender, e) =>
-             {
-                 var localPic = new DeviceIconSelectedIMGByLocal();
-                 UserView.HomePage.Instance.AddChidren(localPic);
-                 UserView.HomePage.Instance.PageIndex += 1;
-                 localPic.Show();
-                 localPic.action = (unSelectedImagePath,selectedImagePath) =>
-                 {
-                     deviceIMG.UnSelectedImagePath = unSelectedImagePath;
-                     deviceIMG.SelectedImagePath = selectedImagePath;
-                 };
-             };
+            {
+                var localPic = new DeviceIconSelectedIMGByLocal();
+                UserView.HomePage.Instance.AddChidren(localPic);
+                UserView.HomePage.Instance.PageIndex += 1;
+                localPic.Show();
+                localPic.action = (unSelectedImagePath, selectedImagePath) =>
+                {
+                    deviceIMG.UnSelectedImagePath = unSelectedImagePath;
+                    deviceIMG.SelectedImagePath = selectedImagePath;
+                };
+            };
             deviceIMG.MouseUpEventHandler += selectDeviceIconEvent;
+
+            confirmBtn.MouseUpEventHandler += async (sender, e) =>
+            {
+                //if (device.CommonDevice == null)
+                //{
+                //    CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain);
+                //    return;
+                //}
+                //var result = await Shared.Common.LocalDevice.Current.ReName(device.CommonDevice, deviceName.Text.Trim());
+                //if (result)
+                //{
+                //    var alertSuccess = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.Success), Language.StringByID(R.MyInternationalizationString.Confrim));
+                //    alertSuccess.Show();
+                //    alertSuccess.ResultEventHandler += (senderSuccess, eSuccess) =>
+                //    {
+                //        //鏀瑰浘鐗�
+                //        device.IconPath = deviceIMG.UnSelectedImagePath;
+                //        device.IsCustomizeImage = true;
+                //        device.ReSave();
+                //        //鏀规埧闂�
+                //        Shared.Common.Room.CurrentRoom.ChangedRoom(device.CommonDevice, roomNameList);
+                //        RemoveFromParent();
+                //    };
+                //}
+                //else
+                //{
+                //    return;
+                //    //CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain);
+                //}
+            };
 
             #endregion
         }
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="device"></param>
+        public void Init(DeviceUI device)
+        {
+            roomName = Common.Room.CurrentRoom.GetRoomNameByDevice(device.CommonDevice);
+        }
+        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceIconSelectedIMGByLocal.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceIconSelectedIMGByLocal.cs
index 1daf1f3..5ce4579 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceIconSelectedIMGByLocal.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceIconSelectedIMGByLocal.cs
@@ -5,86 +5,119 @@
 {
     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()
         {
-            #region topview
-            var topBGView = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(CommonPage.Navigation_Height),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
-            };
-            AddChidren(topBGView);
-            var topView = new FrameLayout()
-            {
-                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
-                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),
-                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-            };
-            AddChidren(topView);
+            AddTop();
 
-            var title = new Button()
-            {
-                TextAlignment = TextAlignment.Center,
-                TextID = R.MyInternationalizationString.ChangeDeviceInfo,
-                TextSize = 20,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Width = Application.GetRealWidth(CommonPage.AppRealWidth - 500),
-                Gravity = Gravity.CenterHorizontal
-            };
-            topView.AddChidren(title);
+            AddBodyView();
+        }
 
-            var back = new BackButton { };
-            topView.AddChidren(back);
-            back.MouseUpEventHandler += (sender, e) =>
+        #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) =>
             {
-                this.RemoveFromParent();
+                RemoveFromParent();
             };
-            #endregion
-            #region 閫夋嫨鍥剧墖
+        }
+        /// <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()
             {
-                Y=topBGView.Bottom,
-                Height=Application.GetRealHeight(CommonPage.AppRealHeight-CommonPage.Navigation_Height),
-                Width=Application.GetRealWidth(CommonPage.AppRealWidth-CommonPage.XLeft*2),
-                Gravity=Gravity.CenterHorizontal
+                Height = Application.GetRealHeight(1450),
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
             };
-            AddChidren(scrollView);
-            int xWidth = (int)((CommonPage.AppRealWidth - CommonPage.XLeft * 2 - 100) / 3.0);
+            bodyFrameLayout.AddChidren(scrollView);
 
-            int k= 0;
-            for (int j = 0; j < 8; j++)
+            int k = 1;
+            tempIcon = new FunctionIconButton();
+            for (int j = 0; j < 5; j++)
             {
                 var itemView = new FrameLayout()
                 {
-                    Height = Application.GetRealHeight(xWidth + 50)
+                    Height = Application.GetRealHeight(207 + CommonPage.XLeft)
                 };
                 scrollView.AddChidren(itemView);
-                for (int i = 1; i <= 3; i++)
+                for (int i = 0; i < 4; i++)
                 {
-                    var icon = new Device.CommonForm.SelectedStatuButton
-                    {
-                        X = Application.GetRealWidth((xWidth + 50) * (i-1)),
-                        Y = Application.GetRealHeight(50),
-                        Width = Application.GetMinRealAverage(xWidth),
-                        Height = Application.GetMinRealAverage(xWidth),
-                        UnSelectedImagePath = $"DeviceIcon/{k}.png",
-                        SelectedImagePath = $"DeviceIcon/{k}Selected.png"
-                    };
-                    k++;
+                    var icon = new FunctionIconButton(58+ i*(207+46), 58);
+                    icon.Init($"FunctionIcon/{k}Icon.png", $"FunctionIcon/{k}IconSelected.png");
                     itemView.AddChidren(icon);
-                    icon.MouseUpEventHandler += (sender, e) =>
+                    k++;
+
+                    EventHandler<MouseEventArgs> selectIcon = (sender, e) =>
                     {
-                        action(icon.UnSelectedImagePath,icon.SelectedImagePath);
-                        RemoveFromParent();
+                        ((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;
                 }
             }
-            #endregion
+
+            var confirmBtn = new CommonForm.CompleteButton(1472, 907, 127);
+            confirmBtn.SetTitle(R.MyInternationalizationString.Save);
+            bodyFrameLayout.AddChidren(confirmBtn);
+            confirmBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                action(tempIcon.ImageBtn.UnSelectedImagePath, tempIcon.ImageBtn.SelectedImagePath);
+                RemoveFromParent();
+            };
         }
+
+        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoEditRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoEditRow.cs
new file mode 100755
index 0000000..7a7cda9
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoEditRow.cs
@@ -0,0 +1,121 @@
+锘縰sing System;
+using Shared.Common;
+
+namespace Shared.Phone.Device.CommonForm
+{
+    public class DeviceInfoEditRow:FrameLayout
+    {
+        /// <summary>
+        /// TipBtn
+        /// </summary>
+        public Button TipBtn;
+        /// <summary>
+        /// NameText
+        /// </summary>
+        public EditText NameText;
+
+        /// <summary>
+        /// DeviceInfoEditRow
+        /// </summary>
+        public DeviceInfoEditRow(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
+            };
+            AddChidren(TipBtn);
+
+            NameText = new EditText
+            {
+                X = Application.GetRealWidth(300),
+                Width = Application.GetRealWidth(600),
+                Height = Application.GetRealHeight(80),
+                Gravity = Gravity.CenterVertical,
+                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2,
+                PlaceholderTextColor=ZigbeeColor.Current.GXCPlaceHolderTextColor2,
+                TextAlignment = TextAlignment.CenterLeft,
+            };
+            AddChidren(NameText);
+
+            var line = new Button()
+            {
+                X = Application.GetRealWidth(CommonFormResouce.X_Left),
+                Y = Height - 2,
+                Width = Application.GetRealWidth(965),
+                Height = 2,
+                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2,
+            };
+            AddChidren(line);
+        }
+
+        /// <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>
+        /// SetPlaceHoldText
+        /// </summary>
+        /// <param name="holdText"></param>
+        public void SetPlaceHoldText(string holdText)
+        {
+            NameText.PlaceholderText = holdText;
+        }
+        /// <summary>
+        /// SetPlaceHoldText
+        /// </summary>
+        /// <param name="holdText"></param>
+        public void SetPlaceHoldText(int holdText)
+        {
+            SetPlaceHoldText(Language.StringByID(holdText));
+        }
+
+        /// <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));
+        }
+        
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs
new file mode 100755
index 0000000..f335c58
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs
@@ -0,0 +1,118 @@
+锘縰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>
+        /// 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
+            };
+            AddChidren(TipBtn);
+
+            NameText = new Button
+            {
+                X = Application.GetRealWidth(300),
+                Width = Application.GetRealWidth(600),
+                Height = Application.GetRealHeight(80),
+                Gravity = Gravity.CenterVertical,
+                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2,
+                TextAlignment = TextAlignment.CenterLeft
+            };
+            AddChidren(NameText);
+
+            NextBtn = new Button
+            {
+                X = Application.GetRealWidth(910),
+                Width = Application.GetMinRealAverage(100),
+                Height = Application.GetMinRealAverage(100),
+                Gravity = Gravity.CenterVertical,
+                SelectedImagePath="Item/Next.png",
+                UnSelectedImagePath= "Item/NextSelected.png"
+            };
+            AddChidren(NextBtn);
+
+            var line = new Button()
+            {
+                X = Application.GetRealWidth(CommonFormResouce.X_Left),
+                Y = Height - 2,
+                Width = Application.GetRealWidth(965),
+                Height = 2,
+                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2,
+            };
+            AddChidren(line);
+        }
+
+        /// <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>
+        /// 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));
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionButton.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionButton.cs
new file mode 100755
index 0000000..ca424b1
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionButton.cs
@@ -0,0 +1,126 @@
+锘縰sing System;
+using Shared.Common;
+namespace Shared.Phone.Device.CommonForm
+{
+    public class FunctionButton:FrameLayout
+    {
+        /// <summary>
+        /// name
+        /// </summary>
+        public Button NameBtn;
+        /// <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>
+        /// FunctionButton
+        /// </summary>
+        /// <param name="x"></param>
+        /// <param name="y"></param>
+        public FunctionButton(int x = 0, int y = 0)
+        {
+            X = Application.GetRealWidth(x);
+            Y = Application.GetRealHeight(y);
+            Width = Application.GetRealWidth(220);
+            Height = Application.GetRealHeight(279);
+        }
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="imagePath"></param>
+        public void Init(string imagePath,string selectedImagePath)
+        {
+            ImageBG = new Button()
+            {
+                Y = Application.GetRealHeight(35),
+                Width = Application.GetMinRealAverage(150),
+                Height = Application.GetMinRealAverage(173),
+                Gravity=Gravity.CenterHorizontal,
+                UnSelectedImagePath = "Item/Category_FunctionBG.png",
+                SelectedImagePath = "Item/Category_FunctionBGSelected.png",
+                Tag=Tag
+            };
+            AddChidren(ImageBG);
+
+            ImageBtn = new Button()
+            {
+                Y = Application.GetRealHeight(63),
+                Width = Application.GetMinRealAverage(84),
+                Height = Application.GetMinRealAverage(84),
+                Gravity = Gravity.CenterHorizontal,
+                UnSelectedImagePath = imagePath,
+                SelectedImagePath = selectedImagePath,
+                Tag = Tag
+            };
+            AddChidren(ImageBtn);
+
+            NameBtn = new Button()
+            {
+                Y = Application.GetRealHeight(200),
+                Width = Application.GetRealWidth(160),
+                Height = Application.GetRealHeight(60),
+                Gravity = Gravity.CenterHorizontal,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                SelectedTextColor = ZigbeeColor.Current.GXCTextSelectedColor,
+                Tag = Tag
+            };
+            AddChidren(NameBtn);
+        }
+
+
+        /// <summary>
+        /// SetTitle
+        /// </summary>
+        /// <param name="title"></param>
+        public void SetTitle(string title)
+        {
+            NameBtn.Text = title;
+        }
+        /// <summary>
+        /// SetTitle
+        /// </summary>
+        /// <param name="title"></param>
+        public void SetTitle(int title)
+        {
+            SetTitle(Language.StringByID(title));
+        }
+
+        /// <summary>
+        /// SetStatu
+        /// </summary>
+        /// <param name="statu"></param>
+        public void SetStatu(bool statu)
+        {
+            ImageBG.IsSelected = NameBtn.IsSelected = statu;
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionIconButton.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionIconButton.cs
new file mode 100755
index 0000000..5fda24c
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionIconButton.cs
@@ -0,0 +1,92 @@
+锘縰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.GetMinRealAverage(207),
+                Height = Application.GetMinRealAverage(207),
+                Gravity = Gravity.Center,
+                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                SelectedBackgroundColor = ZigbeeColor.Current.GXCSelectedBackgroundColor,
+                Radius = (uint)Application.GetMinRealAverage(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/FunctionRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionRow.cs
new file mode 100755
index 0000000..9865c24
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionRow.cs
@@ -0,0 +1,157 @@
+锘縰sing System;
+using Shared.Common;
+namespace Shared.Phone.Device.CommonForm
+{
+    public class FunctionRow : FrameLayout
+    {
+        /// <summary>
+        /// name
+        /// </summary>
+        public Button NameBtn;
+        /// <summary>
+        /// Image
+        /// </summary>
+        public Button ImageBtn;
+        /// <summary>
+        /// ImageBG
+        /// </summary>
+        public Button ImageBG;
+        /// <summary>
+        /// SwitchBtn
+        /// </summary>
+        public CommonForm.SelectedStatuButton SwitchBtn;
+        /// <summary>
+        /// v_Selected
+        /// </summary>
+        private bool v_Selected;
+        /// <summary>
+        /// IsSelected
+        /// </summary>
+        public bool IsSelected
+        {
+            set
+            {
+                v_Selected = value;
+                try
+                {
+                    SetStatu(v_Selected);
+                }
+                catch
+                {
+
+                }
+            }
+            get
+            {
+                return v_Selected;
+            }
+        }
+
+        /// <summary>
+        /// FunctionRow
+        /// </summary>
+        /// <param name="x"></param>
+        /// <param name="y"></param>
+        public FunctionRow(int x = 0, int y = 0)
+        {
+            X = Application.GetRealWidth(x);
+            Y = Application.GetRealHeight(y);
+            Width = Application.GetRealWidth(1022);
+            Height = Application.GetRealHeight(127);
+        }
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="imagePath"></param>
+        /// <param name="selectedImagePath"></param>
+        public void Init(string imagePath, string selectedImagePath)
+        {
+            ImageBG = new Button()
+            {
+                X = Application.GetRealWidth(45),
+                Width = Application.GetMinRealAverage(112),
+                Height = Application.GetMinRealAverage(112),
+                Gravity = Gravity.CenterVertical,
+                Radius=(uint)Application.GetMinRealAverage(112/2),
+                BackgroundColor=ZigbeeColor.Current.GXCGrayBackgroundColor,
+                SelectedBackgroundColor=ZigbeeColor.Current.GXCSelectedBackgroundColor,
+                Tag = Tag
+            };
+            AddChidren(ImageBG);
+
+            ImageBtn = new Button()
+            {
+                X = Application.GetRealWidth(63),
+                Width = Application.GetMinRealAverage(78),
+                Height = Application.GetMinRealAverage(78),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = imagePath,
+                SelectedImagePath = selectedImagePath,
+                Tag = Tag
+            };
+            AddChidren(ImageBtn);
+
+            NameBtn = new Button()
+            {
+                X = Application.GetRealWidth(181),
+                Width = Application.GetRealWidth(500),
+                Height = Application.GetRealHeight(80),
+                Gravity = Gravity.CenterVertical,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                SelectedTextColor = ZigbeeColor.Current.GXCTextSelectedColor,
+                TextAlignment = TextAlignment.CenterLeft,
+                Tag = Tag
+            };
+            AddChidren(NameBtn);
+
+            SwitchBtn = new SelectedStatuButton()
+            {
+                X = Application.GetRealWidth(896),
+                Width = Application.GetMinRealAverage(78),
+                Height = Application.GetMinRealAverage(78),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Item/Switch.png",
+                SelectedImagePath = "Item/SwitchSelected.png",
+                Tag = Tag
+            };
+            AddChidren(SwitchBtn);
+
+            var line = new Button()
+            {
+                X = Application.GetRealWidth(180),
+                Y = Height - 2,
+                Width = Application.GetRealWidth(841),
+                Height = 2,
+                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor,
+                Tag = Tag
+            };
+            AddChidren(line);
+        }
+
+        /// <summary>
+        /// SetTitle
+        /// </summary>
+        /// <param name="title"></param>
+        public void SetTitle(string title)
+        {
+            NameBtn.Text = title;
+        }
+        /// <summary>
+        /// SetTitle
+        /// </summary>
+        /// <param name="title"></param>
+        public void SetTitle(int title)
+        {
+            SetTitle(Language.StringByID(title));
+        }
+        /// <summary>
+        /// SetStatu
+        /// </summary>
+        /// <param name="statu"></param>
+        public void SetStatu(bool statu)
+        {
+            NameBtn.IsSelected = ImageBG.IsSelected = ImageBtn.IsSelected = SwitchBtn.IsSelected = statu;
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs
new file mode 100755
index 0000000..15e1e78
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs
@@ -0,0 +1,130 @@
+锘縰sing System;
+using Shared.Common;
+namespace Shared.Phone.Device.CommonForm
+{
+    public class LeftIconButtonRow:FrameLayout
+    {
+        #region 鈼� 鍙橀噺__________________________
+        /// <summary>
+        /// 鍥剧墖
+        /// </summary>
+        public Button IconButton;
+        /// <summary>
+        /// 鏍囬
+        /// </summary>
+        public Button TitleButton;
+        /// <summary>
+        /// 涓嬪垝绾�
+        /// </summary>
+        public FrameLayout Line;
+        /// <summary>
+        /// v_Selected
+        /// </summary>
+        private bool v_Selected;
+
+        public bool IsSelected
+        {
+            set
+            {
+                v_Selected = value;
+                try
+                {
+                    SetStatu(v_Selected);
+                }
+                catch { };
+            }
+            get
+            {
+                return v_Selected;
+            }
+        }
+
+        #endregion
+
+        public LeftIconButtonRow(int width,int height)
+        {
+            Width = Application.GetRealWidth(width);
+            Height = Application.GetRealHeight(height);
+        }
+
+        #region 鈼� 鍒濆鍖朹_________________________
+
+        /// <summary>
+        /// Init
+        /// </summary>
+        /// <param name="iconPath">Icon path.</param>
+        /// <param name="iconSelectedPath">Icon selected path.</param>
+        /// <param name="title">Title.</param>
+        public void Init(string iconPath, string iconSelectedPath, string title, bool hadLine = true)
+        {
+            IconButton = new Button()
+            {
+                X = Application.GetRealWidth(80),
+                Height = Application.GetMinRealAverage(80),
+                Width = Application.GetMinRealAverage(80),
+                UnSelectedImagePath = iconPath,
+                SelectedImagePath = iconSelectedPath,
+                Gravity = Gravity.CenterVertical,
+                Tag = this.Tag
+            };
+            AddChidren(IconButton);
+
+            TitleButton = new Button()
+            {
+                X = Application.GetRealWidth(173),
+                Height = Application.GetRealHeight(80),
+                Width = Application.GetRealWidth(220),
+                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                Text = title,
+                TextAlignment = TextAlignment.CenterLeft,
+                Gravity = Gravity.CenterVertical,
+                Tag = this.Tag
+            };
+            AddChidren(TitleButton);
+
+            Line = new FrameLayout()
+            {
+                X = Application.GetRealWidth(80),
+                Y = this.Height - 1,
+                Width = Application.GetRealWidth(369),
+                Height = 1,
+                BackgroundColor = Common.ZigbeeColor.Current.GXCGrayLineColor2
+            };
+            if (hadLine)
+            {
+                AddChidren(Line);
+            }
+        }
+        #endregion
+
+        #region 鈼� 閫変腑鐘舵�乢_________________________
+
+        /// <summary>
+        /// 璁剧疆鐘舵��
+        /// </summary>
+        /// <param name="statu"></param>
+        public void SetStatu(bool statu)
+        {
+            IconButton.IsSelected = statu;
+            TitleButton.IsSelected = statu;
+        }
+        /// <summary>
+        /// 閫変腑
+        /// </summary>
+        public void SetSelectedStatu()
+        {
+            IconButton.IsSelected = true;
+            TitleButton.IsSelected = true;
+        }
+        /// <summary>
+        /// 涓嶉�変腑
+        /// </summary>
+        public void SetUnSelectedStatu()
+        {
+            IconButton.IsSelected = false;
+            TitleButton.IsSelected = false;
+        }
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRowLayout.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRowLayout.cs
deleted file mode 100755
index 15c4ce0..0000000
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRowLayout.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-锘縰sing System;
-namespace Shared.Phone.Device.CommonForm
-{
-    /// <summary>
-    /// 鍥剧墖鍦ㄥ乏杈癸紝鏂囧瓧鍦ㄥ彸杈�,甯︿笅鍒掔嚎鐨勮鎺т欢
-    /// </summary>
-    public class LeftIconButtonRowLayout:FrameLayout
-    {
-        #region 鈼� 鍙橀噺__________________________
-        /// <summary>
-        /// 鍥剧墖
-        /// </summary>
-        public Button iconButton;
-        /// <summary>
-        /// 鏍囬
-        /// </summary>
-        public Button titleButton;
-        /// <summary>
-        /// 涓嬪垝绾�
-        /// </summary>
-        public FrameLayout lineFrameLayout;
-
-        #endregion
-
-        #region 鈼� 鏋勯�犳柟娉昣______________________
-
-        public LeftIconButtonRowLayout()
-        {
-
-        }
-
-        #endregion
-
-        #region 鈼� 鍒濆鍖朹_________________________
-
-        /// <summary>
-        /// 鍒濆鍖�--閮ㄥ垎鍙傛暟鍏堝啓姝诲惂
-        /// </summary>
-        /// <param name="iconPath">Icon path.</param>
-        /// <param name="iconSelectedPath">Icon selected path.</param>
-        /// <param name="title">Title.</param>
-        public void Init(string iconPath, string iconSelectedPath, string title)
-        {
-            iconButton = new Button()
-            {
-                X = Application.GetRealWidth(80),
-                Height = Application.GetMinRealAverage(80),
-                Width = Application.GetMinRealAverage(80),
-                UnSelectedImagePath = iconPath,
-                SelectedImagePath = iconSelectedPath,
-                Gravity = Gravity.CenterVertical,
-                Tag = this.Tag
-            };
-            AddChidren(iconButton);
-
-            titleButton = new Button()
-            {
-                X = iconButton.Right+Application.GetRealWidth(30),
-                Height = Application.GetRealHeight(80),
-                Width = this.Width - Application.GetRealWidth(80+80+30),
-                TextColor=Shared.Common.ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                SelectedTextColor=Common.ZigbeeColor.Current.GXCACSelectedTextColor,
-                Text=title,
-                TextAlignment=TextAlignment.CenterLeft,
-                Gravity = Gravity.CenterVertical,
-                Tag = this.Tag
-            };
-            AddChidren(titleButton);
-
-            lineFrameLayout = new FrameLayout()
-            {
-                X = iconButton.X,
-                Y = this.Height - 1,
-                Width = this.Width - iconButton.X,
-                Height = 1,
-                BackgroundColor = Common.ZigbeeColor.Current.GXCPlaceHolderTextColor
-            };
-            AddChidren(lineFrameLayout);
-
-        }
-        #endregion
-        
-    }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/Line.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/Line.cs
new file mode 100755
index 0000000..a913ff4
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/Line.cs
@@ -0,0 +1,34 @@
+锘縰sing System;
+using Shared.Common;
+
+namespace Shared.Phone.Device.CommonForm
+{
+    public class Line : SelectedStatuButton
+    {
+        /// <summary>
+        /// Line
+        /// </summary>
+        /// <param name="y"></param>
+        /// <param name="width"></param>
+        /// <param name="height"></param>
+        public Line(int y, int width, int height)
+        {
+            Y = y-2;
+            Width = width;
+            Height = height;
+            Radius = (uint)(height / 2);
+            SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor;
+            //BackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor;
+            Gravity = Gravity.CenterHorizontal;
+        }
+
+        /// <summary>
+        /// SetStatu
+        /// </summary>
+        /// <param name="statu"></param>
+        public void SetStatu(bool statu)
+        {
+            IsSelected = statu;
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/RowLayoutEditButton.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/RowLayoutEditButton.cs
index 33be5f0..109c961 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/RowLayoutEditButton.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/RowLayoutEditButton.cs
@@ -14,8 +14,8 @@
         /// </summary>
         public RowLayoutEditButton()
         {
-            BackgroundColor = ZigbeeColor.Current.GXCEditorBGColor;
-            TextID = R.MyInternationalizationString.Delay;
+            BackgroundColor = ZigbeeColor.Current.GXCEditBackGroundColor;
+            TextID = R.MyInternationalizationString.Edit;
             TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
             TextAlignment = TextAlignment.Center;
             Radius = CommonPage.BigFormRadius;
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectedStatuButton.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectedStatuButton.cs
index a536580..a7d91f8 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectedStatuButton.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectedStatuButton.cs
@@ -15,11 +15,14 @@
         /// <summary>
         /// Initializes a new instance of the <see cref="T:Shared.SelectedStatuButton"/> class.
         /// </summary>
-        public SelectedStatuButton()
+        public SelectedStatuButton(uint textColor = 0xFF666666, uint selectedTextColor = 0xFF000000)
         {
             MouseDownEventHandler += Button_MouseDownEvent;
-            SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor;
+            TextColor = textColor;
+            SelectedTextColor = selectedTextColor;
         }
+
+        
         /// <summary>
         /// 鍗曞嚮鎸変笅锛屽疄鐜扮煭鏆傜偣浜�変腑鏁堟灉
         /// </summary>
@@ -27,13 +30,19 @@
         /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
         private void Button_MouseDownEvent(object sender, MouseEventArgs mouseEventArgs)
         {
+            bool statu = IsSelected;
             SetSeletedStatu();
             new System.Threading.Thread(() =>
             {
                 System.Threading.Thread.Sleep(SelectedStatuTime);
                 SetUnSelectedStatu();
+                Application.RunOnMainThread(() =>
+                {
+                    IsSelected = statu;
+                });
             })
             { IsBackground = true }.Start();
+
         }
         /// <summary>
         /// 璁剧疆閫変腑鐘舵��
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs
index 049f2e9..8448127 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs
@@ -30,29 +30,25 @@
         /// <summary>
         /// 鏋勯�犳柟娉�
         /// </summary>
-        public TopFrameLayout(FrameLayout parentFrameLayout)
+        public TopFrameLayout()
         {
             BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor;
-            Width = Application.GetRealWidth(1080);
-            Height = Application.GetRealHeight(CommonFormRrsouce.TopFrameLayout_Height);
-            //鍏堝姞杞藉埌鐖跺鍣紝鍚﹀垯瀛愭帶浠跺竷灞�鏈夐棶棰�
-            parentFrameLayout.AddChidren(this);
-            //鍒濆鍖�
-            InitTopview(parentFrameLayout);
+            Width = Application.GetRealWidth(CommonPage.AppRealWidth);
+            Height = Application.GetRealHeight(CommonFormResouce.TopFrameLayout_Height);
         }
 
         #endregion
 
         #region 鈼� 鍒濆鍖朹_________________________
 
-        private void InitTopview(FrameLayout parentFrameLayout)
+        public void InitTopview()
         {
             //鐘舵�佹爮
             AddTopStatuFrame();
             //topview
             AddTopview();
             //娣诲姞杩斿洖閿�
-            AddBackBtn(parentFrameLayout);
+            AddBackBtn();
             //鏍囬
             AddTitle();
         }
@@ -67,9 +63,9 @@
         {
             topView = new FrameLayout
             {
-                Y = Application.GetRealHeight(CommonFormRrsouce.TopStatuFrameLayout_Height),
-                Height = Application.GetRealHeight(CommonFormRrsouce.Topview_Height),
-                Width = Application.GetRealWidth(1080)
+                Y = Application.GetRealHeight(CommonFormResouce.TopStatuFrameLayout_Height),
+                Height = Application.GetRealHeight(CommonFormResouce.Topview_Height),
+                Width = Application.GetRealWidth(CommonPage.AppRealWidth)
             };
             AddChidren(topView);
         }
@@ -81,15 +77,10 @@
         /// 杩斿洖閿�
         /// </summary>
         /// <returns>The back button.</returns>
-        private void AddBackBtn(FrameLayout parentFrameLayout)
+        private void AddBackBtn()
         {
             backButton = new BackButton { };
             topView.AddChidren(backButton);
-
-            backButton.MouseUpEventHandler += (sender, e) =>
-            {
-                parentFrameLayout.RemoveFromParent();
-            };
         }
 
         #endregion
@@ -103,8 +94,8 @@
         {
             topStatuFrameLayout = new FrameLayout
             {
-                Height = Application.GetRealHeight(CommonFormRrsouce.TopStatuFrameLayout_Height),
-                Width = Application.GetRealWidth(1080)
+                Height = Application.GetRealHeight(CommonFormResouce.TopStatuFrameLayout_Height),
+                Width = Application.GetRealWidth(CommonPage.AppRealWidth)
             };
             AddChidren(topStatuFrameLayout);
         }
@@ -119,10 +110,10 @@
         {
             topTitle = new Button
             {
-                Height = Application.GetRealHeight(CommonFormRrsouce.TopFrameLayout_Height - CommonFormRrsouce.TopStatuFrameLayout_Height),
-                Width = Application.GetRealWidth(CommonFormRrsouce.TopTitle_Width),
-                TextSize = CommonFormRrsouce.TopTitle_TextSize,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                Height = Application.GetRealHeight(CommonFormResouce.TopFrameLayout_Height - CommonFormResouce.TopStatuFrameLayout_Height),
+                Width = Application.GetRealWidth(CommonFormResouce.TopTitle_Width),
+                TextSize = CommonFormResouce.TopTitle_TextSize,
+                TextColor = ZigbeeColor.Current.GXCTitleBlackTitle,
                 Gravity = Gravity.CenterHorizontal,
             };
             topView.AddChidren(topTitle);
@@ -135,6 +126,14 @@
         {
             topTitle.Text = title;
         }
+        /// <summary>
+        /// 璁剧疆鏍囬
+        /// </summary>
+        /// <param name="title"></param>
+        public void SetTopTitle(int title)
+        {
+            SetTopTitle(Language.StringByID(title));
+        }
 
         #endregion
     }
diff --git a/ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs b/ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs
index adb30ba..28f9330 100755
--- a/ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs
@@ -119,6 +119,14 @@
                                 seekBarTitle.Text = $"{SeekBar.Progress} %";
                                 rollerShade.LastDateTime = DateTime.Now;
                             }
+                            else if ((common as Rollershade).DeviceStatusReport.AttriBute[0].AttributeId == 0)
+                            {
+                                //绐楀笜绫诲瀷
+                                var rollerShade = deviceUI.CommonDevice as Rollershade;
+                                rollerShade.DeviceStatusReport = (common as Rollershade).DeviceStatusReport;
+                                rollerShade.WcdType = (common as Rollershade).DeviceStatusReport.AttriBute[0].AttriButeData;
+                                rollerShade.LastDateTime = DateTime.Now;
+                            }
                         }
                         //***鏂版敼***璁惧鐘舵�佷笂鎶ヤ腑锛屽綋CluterID=3,璇佹槑璁惧鍦ㄧ嚎锛岀洿鎺ユ爣璁�
                         else if ((common as Rollershade).DeviceStatusReport.CluterID == 3)
@@ -205,6 +213,7 @@
             UserView.HomePage.Instance.ScrollEnabled = true;
             ZigBee.Device.ZbGateway.StatusList.Remove(this);
             action();
+            action = null;
             RemoveUpdateControlDeviceStatuAction();
             base.RemoveFromParent();
         }
@@ -433,7 +442,52 @@
             {
                 collectionBtn.IsSelected = true;
             }
+
+            if (rollerShade.WcdType == -1)
+            {
+                CommonPage.Loading.Start();
+                new System.Threading.Thread(() =>
+                {
+                    ZigBee.Device.Rollershade.ReadWcdTypeAction(rollerShade, () =>
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            if (rollerShade.WcdType == 0)
+                            {
+                                downBtn.UnSelectedImagePath = "WindowCovering/RollerShadeDown.png";
+                                downBtn.SelectedImagePath = "WindowCovering/RollerShadeDownSelected.png";
+                                upBtn.UnSelectedImagePath = "WindowCovering/RollerShadeUp.png";
+                                upBtn.SelectedImagePath = "WindowCovering/RollerShadeUpSelected.png";
+                            }
+                            else
+                            {
+                                downBtn.UnSelectedImagePath = "WindowCovering/RollerShadeClose.png";
+                                downBtn.SelectedImagePath = "WindowCovering/RollerShadeCloseSelected.png";
+                                upBtn.UnSelectedImagePath = "WindowCovering/RollerShadeOpen.png";
+                                upBtn.SelectedImagePath = "WindowCovering/RollerShadeOpenSelected.png";
+                            }
+                            CommonPage.Loading.Hide();
+                        });
+                    });
+                })
+                { IsBackground = true }.Start();
+            }
+            else if(rollerShade.WcdType == 0)
+            {
+                downBtn.UnSelectedImagePath = "WindowCovering/RollerShadeDown.png";
+                downBtn.SelectedImagePath = "WindowCovering/RollerShadeDownSelected.png";
+                upBtn.UnSelectedImagePath = "WindowCovering/RollerShadeUp.png";
+                upBtn.SelectedImagePath = "WindowCovering/RollerShadeUpSelected.png";
+            }
+            else
+            {
+                downBtn.UnSelectedImagePath = "WindowCovering/RollerShadeClose.png";
+                downBtn.SelectedImagePath = "WindowCovering/RollerShadeCloseSelected.png";
+                upBtn.UnSelectedImagePath = "WindowCovering/RollerShadeOpen.png";
+                upBtn.SelectedImagePath = "WindowCovering/RollerShadeOpenSelected.png";
+            }
             #endregion
+
 
             BindEvent();
         }
@@ -630,7 +684,6 @@
                 Shared.Common.Room.Lists[0].AddDevice(device.FileName);
                 collectionBtn.IsSelected = true;
             }
-            action?.Invoke();
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs
index 8c802bc..06a43b9 100755
--- a/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs
@@ -15,7 +15,7 @@
         ///// <summary>
         ///// The top view.
         ///// </summary>
-        private CommonForm.TopFrameLayout topFL;
+        private CommonForm.TopFrameLayout top;
         /// <summary>
         /// 鏇村璁剧疆
         /// </summary>
@@ -217,6 +217,8 @@
         {
             ZbGateway.StatusList.Remove(this);
             UserView.HomePage.Instance.ScrollEnabled = true;
+            action();
+            action = null;
             base.RemoveFromParent();
         }
 
@@ -286,8 +288,13 @@
         /// </summary>
         private void AddTopView()
         {
-            topFL = new CommonForm.TopFrameLayout(this) { };
-            AddChidren(topFL);
+            top = new CommonForm.TopFrameLayout();
+            AddChidren(top);
+            top.InitTopview();
+            top.backButton.MouseUpEventHandler += (sender, e) =>
+            {
+                RemoveFromParent();
+            };
 
             AddMoreview();
         }
@@ -306,7 +313,7 @@
                 UnSelectedImagePath = "Item/More.png",
                 SelectedImagePath = "Item/MoreSelected.png",
             };
-            topFL.topView.AddChidren(moreBtn);
+            top.topView.AddChidren(moreBtn);
             moreBtn.MouseUpEventHandler += MoreEvent;
         }
 
@@ -339,7 +346,7 @@
             midFL = new FrameLayout()
             {
                 Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.Navigation_Height),
-                Y = topFL.Bottom,
+                Y = top.Bottom,
                 BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
             };
             AddChidren(midFL);
@@ -541,7 +548,6 @@
                 Shared.Common.Room.Lists[0].AddDevice(device.FileName);
                 collectionBtn.IsSelected = true;
             }
-            action?.Invoke();
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs
index d586038..fc3c116 100755
--- a/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs
@@ -175,14 +175,14 @@
                         }
                         if (deviceUI.CommonDevice.Type == DeviceType.OnOffOutput)
                         {
-                            var light = deviceUI.CommonDevice as ToggleLight;
+                            var light = deviceUI.CommonDevice as ToggleLight;
                             light.IsOnline = (common as ToggleLight).IsOnline;
                             deviceIMG.IsSelected = light.IsOnline == 1;
                             light.LastDateTime = DateTime.Now;
                         }
                     }
                     catch (Exception ex)
-                    {
+                    {
                         System.Console.WriteLine($"Error:{ex.Message}");
                     }
                 });
@@ -383,6 +383,7 @@
         {
             ZbGateway.StatusList.Remove(this);
             action();
+            action = null;
             RemoveUpdateControlDeviceStatuAction();
             base.RemoveFromParent();
         }
@@ -489,7 +490,6 @@
                 Shared.Common.Room.Lists[0].AddDevice(device.FileName);
                 collectionBtn.IsSelected = true;
             }
-            action?.Invoke();
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
index 467f613..2e14c60 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
@@ -98,7 +98,7 @@
             ///璁惧鐘舵�佹潯浠�
             var btndevice = new Button {
                 //Text = "璁惧鐘舵�佹潯浠�",
-                TextID = MyInternationalizationString.devicestate,
+                TextID = MyInternationalizationString.device,
                 TextAlignment = TextAlignment.CenterLeft,
                 X = Application.GetRealWidth (60),
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
@@ -145,7 +145,7 @@
                 //Text = "瀹夐槻鏉′欢",
                 TextAlignment = TextAlignment.CenterLeft,
                 X = Application.GetRealWidth(60),
-                TextID = MyInternationalizationString.securityconditions,
+                TextID = MyInternationalizationString.security,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
             };
             securityrowlayout.AddChidren(btnsecurity);
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
index 0a8c985..5009ebd 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
@@ -35,6 +35,8 @@
                 TextID = MyInternationalizationString.addscene,
                 TextSize = 17,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                TextAlignment = TextAlignment.CenterLeft,
+                X = Application.GetRealWidth(150),
             };
             topFrameLayout.AddChidren(titleName);
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/CyclicCycle.cs b/ZigbeeApp/Shared/Phone/Device/Logic/CyclicCycle.cs
index d73adfc..547865c 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/CyclicCycle.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/CyclicCycle.cs
@@ -36,6 +36,8 @@
                 TextID = MyInternationalizationString.cycle,
                 TextSize = 17,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                TextAlignment = TextAlignment.CenterLeft,
+                X = Application.GetRealWidth(150),
             };
             topFrameLayout.AddChidren(titleName);
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
index 18a0ee5..13af081 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
@@ -96,12 +96,14 @@
             middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
             this.AddChidren(middle);
 
-            ///杩囨护鎺夌殑璁惧
+            ///鐩墠鏀寔鐨勮澶�
             List<DeviceType> deviceTypeList = new List<DeviceType> {
-                DeviceType.ColorDimmableLight,
-                 DeviceType.OnOffOutput,
-                  DeviceType.WindowCoveringDevice,
-                   DeviceType.AirSwitch,
+                DeviceType.IASZone,
+                DeviceType.OnOffSwitch,
+                //DeviceType.ColorDimmableLight,
+                // DeviceType.OnOffOutput,
+                //  DeviceType.WindowCoveringDevice,
+                //   DeviceType.AirSwitch,
             };
             ///鎴块棿鐐瑰嚮浜嬩欢
             roomname.MouseUpEventHandler += (sender, e) =>
@@ -168,8 +170,9 @@
                         {
                             if (!deviceTypeList.Contains(device.CommonDevice.Type))
                             {
-                                list.Add(device);
+                                continue;
                             }
+                            list.Add(device);
                         }
                         AllDeviceTypeView(list);
                     };
@@ -183,7 +186,7 @@
             foreach (var device in Common.Logic.LogicDviceList)
             {
                                
-                if (deviceTypeList.Contains(device.Type))
+                if (!deviceTypeList.Contains(device.Type))
                 {
                     continue;
                 }
@@ -961,6 +964,12 @@
                                     iASZonedevicefra.AddChidren(openrowlayout);
                                 }
                                 break;
+                            default:
+                                {
+                                    btnopen.TextID = MyInternationalizationString.callthepolice;
+                                    iASZonedevicefra.AddChidren(openrowlayout);
+                                }
+                                break;
                         }
                         if (edit && devices != null)
                         {
@@ -1061,250 +1070,7 @@
                         {
                             buttonSelected.Visible = true;
                         }
-
-                        /*
-                        #region  鎸夐敭View
-                       #region ---button1---
-                        devicefra.Y = Application.GetRealHeight(1920 - 30 - 720 - 360);
-                        devicefra.Height = Application.GetRealHeight(720 + 360);
-                        var OnOffOutputfra = new FrameLayout
-                        {
-                            Y = Application.GetRealHeight(180),
-                            Height = Application.GetRealHeight(180 * 4 + 30),
-                        };
-                        devicefra.AddChidren(OnOffOutputfra);
-
-                        var button1Row = new RowLayout
-                        {
-                            Height = Application.GetRealHeight(180),
-                        };
-                        OnOffOutputfra.AddChidren(button1Row);
-
-                        var button1 = new Button
-                        {
-                            TextID = MyInternationalizationString.button1,
-                            TextAlignment = TextAlignment.CenterLeft,
-                            X = Application.GetRealWidth(40),
-                            Width = Application.GetRealWidth(300),
-                            Height = Application.GetRealHeight(180),
-                            //SelectedBackgroundColor = 0xfffe5e00,
-                            TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                        };
-                        button1Row.AddChidren(button1);
-
-                        var button1Selected = new Button
-                        {
-                            X = Application.GetRealWidth(1000 - 150),
-                            Width = Application.GetMinRealAverage(110),
-                            Height = Application.GetMinRealAverage(110),
-                            UnSelectedImagePath = "Item/YesSelected.png",
-                            Visible = false,
-                            Gravity = Gravity.CenterVertical
-                        };
-                        button1Row.AddChidren(button1Selected);
-                        #endregion
-
-                        #region ---button2---
-                        var button2Row = new RowLayout
-                        {
-                            Y = button1Row.Bottom,
-                            Height = Application.GetRealHeight(180),
-                        };
-                        OnOffOutputfra.AddChidren(button2Row);
-
-                        var button2 = new Button
-                        {
-                            TextID = MyInternationalizationString.button2,
-                            TextAlignment = TextAlignment.CenterLeft,
-                            X = Application.GetRealWidth(40),
-                            Width = Application.GetRealWidth(300),
-                            Height = Application.GetRealHeight(180),
-                            TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                        };
-                        button2Row.AddChidren(button2);
-
-                        var button2Selected = new Button
-                        {
-                            X = Application.GetRealWidth(1000 - 150),
-                            Width = Application.GetMinRealAverage(110),
-                            Height = Application.GetMinRealAverage(110),
-                            UnSelectedImagePath = "Item/YesSelected.png",
-                            Visible = false,
-                            Gravity = Gravity.CenterVertical,
-                        };
-                        button2Row.AddChidren(button2Selected);
-                        #endregion
-
-                        #region ---button3---
-                        var button3Row = new RowLayout
-                        {
-                            Y = button2Row.Bottom,
-                            Height = Application.GetRealHeight(180),
-                        };
-                        OnOffOutputfra.AddChidren(button3Row);
-
-                        var button3 = new Button
-                        {
-                            TextID = MyInternationalizationString.button3,
-                            TextAlignment = TextAlignment.CenterLeft,
-                            X = Application.GetRealWidth(40),
-                            Width = Application.GetRealWidth(300),
-                            Height = Application.GetRealHeight(180),
-                            //SelectedBackgroundColor = 0xfffe5e00,
-                            TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                        };
-                        button3Row.AddChidren(button3);
-
-                        var button3Selected = new Button
-                        {
-                            X = Application.GetRealWidth(1000 - 150),
-                            Width = Application.GetMinRealAverage(110),
-                            Height = Application.GetMinRealAverage(110),
-                            UnSelectedImagePath = "Item/YesSelected.png",
-                            Visible = false,
-                            Gravity = Gravity.CenterVertical
-                        };
-                        button3Row.AddChidren(button3Selected);
-                        #endregion
-
-                        #region ---button4---
-
-                        var button4Row = new RowLayout
-                        {
-                            Height = Application.GetRealHeight(180),
-                            Y = button3Row.Bottom,
-                        };
-                        OnOffOutputfra.AddChidren(button4Row);
-
-                        var button4 = new Button
-                        {
-                            TextID = MyInternationalizationString.button4,
-                            TextAlignment = TextAlignment.CenterLeft,
-                            X = Application.GetRealWidth(40),
-                            Width = Application.GetRealWidth(300),
-                            Height = Application.GetRealHeight(180),
-                            //SelectedBackgroundColor = 0xfffe5e00,
-                            TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                        };
-                        button4Row.AddChidren(button4);
-
-                        var button4Selected = new Button
-                        {
-                            X = Application.GetRealWidth(1000 - 150),
-                            Width = Application.GetMinRealAverage(110),
-                            Height = Application.GetMinRealAverage(110),
-                            UnSelectedImagePath = "Item/YesSelected.png",
-                            Visible = false,
-                            Gravity = Gravity.CenterVertical
-                        };
-                        button4Row.AddChidren(button4Selected);
-                        #endregion
-                        #endregion
-
-                        EventHandler<MouseEventArgs> button1click = (sender, e) =>
-                        {
-                            button1Selected.Visible = true;
-                            button2Selected.Visible = false;
-                            button3Selected.Visible = false;
-                            button4Selected.Visible = false;
-                            SelectedDeviceStatuscondition = "yes";
-                            //榛樿鍊�
-                            if (deviceConditionsInfo.ContainsKey("Epoint"))
-                            {
-                                deviceConditionsInfo.Remove("Epoint");
-                            }
-                            deviceConditionsInfo.Add("Epoint", "1");
-
-                        };
-                        button1Row.MouseUpEventHandler += button1click;
-                        button1.MouseUpEventHandler += button1click;
-                        button1Selected.MouseUpEventHandler += button1click;
-                        EventHandler<MouseEventArgs> button2click = (sender, e) =>
-                        {
-                            button1Selected.Visible = false;
-                            button2Selected.Visible = true;
-                            button3Selected.Visible = false;
-                            button4Selected.Visible = false;
-                            SelectedDeviceStatuscondition = "yes";
-                            if (deviceConditionsInfo.ContainsKey("Epoint"))
-                            {
-                                deviceConditionsInfo.Remove("Epoint");
-                            }
-                            deviceConditionsInfo.Add("Epoint", "2");//榛樿鍊�
-
-                        };
-                        button2Row.MouseUpEventHandler += button2click;
-                        button2.MouseUpEventHandler += button2click;
-                        button2Selected.MouseUpEventHandler += button2click;
-                        EventHandler<MouseEventArgs> button3click = (sender, e) =>
-                        {
-                            button1Selected.Visible = false;
-                            button2Selected.Visible = false;
-                            button3Selected.Visible = true;
-                            button4Selected.Visible = false;
-                            SelectedDeviceStatuscondition = "yes";
-                            if (deviceConditionsInfo.ContainsKey("Epoint"))
-                            {
-                                deviceConditionsInfo.Remove("Epoint");
-                            }
-                            deviceConditionsInfo.Add("Epoint", "3");//榛樿鍊�
-
-                        };
-                        button3Row.MouseUpEventHandler += button3click;
-                        button3.MouseUpEventHandler += button3click;
-                        button3Selected.MouseUpEventHandler += button3click;
-                        EventHandler<MouseEventArgs> button4click = (sender, e) =>
-                        {
-                            button1Selected.Visible = false;
-                            button2Selected.Visible = false;
-                            button3Selected.Visible = false;
-                            button4Selected.Visible = true;
-                            SelectedDeviceStatuscondition = "yes";
-                            if (deviceConditionsInfo.ContainsKey("Epoint"))
-                            {
-                                deviceConditionsInfo.Remove("Epoint");
-                            }
-                            deviceConditionsInfo.Add("Epoint", "4");//榛樿鍊�
-
-                        };
-                        button4Row.MouseUpEventHandler += button4click;
-                        button4.MouseUpEventHandler += button4click;
-                        button4Selected.MouseUpEventHandler += button4click;
-                        if (edit && devices != null)
-                        {
-                            if (devices["Epoint"] == "1")
-                            {
-                                button1Selected.Visible = true;
-                                button2Selected.Visible = false;
-                                button3Selected.Visible = false;
-                                button4Selected.Visible = false;
-                            }
-                            else if (devices["Epoint"] == "2")
-                            {
-                                button1Selected.Visible = false;
-                                button2Selected.Visible = true;
-                                button3Selected.Visible = false;
-                                button4Selected.Visible = false;
-
-                            }
-                            else if (devices["Epoint"] == "3")
-                            {
-                                button1Selected.Visible = false;
-                                button2Selected.Visible = false;
-                                button3Selected.Visible = true;
-                                button4Selected.Visible = false;
-
-                            }
-                            else if (devices["Epoint"] == "4")
-                            {
-                                button1Selected.Visible = false;
-                                button2Selected.Visible = false;
-                                button3Selected.Visible = false;
-                                button4Selected.Visible = true;
-                            }
-
-                        }
-                        */
+                                            
                     }
                     break;
 
@@ -1348,12 +1114,14 @@
                 }
                 else
                 {
-
-                    var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
-                                           Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
-                                           Language.StringByID(MyInternationalizationString.complete));
-                    alert.Show();
-                    return;
+                    if (!edit)
+                    {
+                        var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+                                               Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
+                                               Language.StringByID(MyInternationalizationString.complete));
+                        alert.Show();
+                        return;
+                    }
 
                 }
                 flMain.RemoveFromParent();
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs
index 9d85f19..d40a92b 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs
@@ -29,10 +29,11 @@
 
 
             var titleName = new Button {
-                //Text = "娣诲姞鎵ц鐩爣",
-                //TextID = MyInternationalizationString.addImplementationgoals,
+                TextID = MyInternationalizationString.addaction,
                 TextSize = 17,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                TextAlignment = TextAlignment.CenterLeft,
+                X = Application.GetRealWidth(150),
             };
             topFrameLayout.AddChidren (titleName);
 
@@ -55,6 +56,7 @@
             middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
             this.AddChidren(middle);
 
+            #region ----- 璁惧------    
             var deviceRowLayout = new RowLayout
             {
                 Height = Application.GetRealHeight(180),
@@ -98,7 +100,9 @@
              deviceRowLayout.MouseUpEventHandler += deviceclick;
              device.MouseUpEventHandler += deviceclick;
              btndeviceback.MouseUpEventHandler += deviceclick;
+#endregion
 
+            #region ----- 鍦烘櫙------        
             var sceneRowLayout = new RowLayout {
                 Height = Application.GetRealHeight (180),
                 //BackgroundColor = 0xff323232,
@@ -143,16 +147,63 @@
              sceneRowLayout.MouseUpEventHandler += sceneclick;
              scene.MouseUpEventHandler += sceneclick;
              btnsceneback.MouseUpEventHandler += sceneclick;
+#endregion
 
+            #region ----- 瀹夐槻妯″紡------        
+            ///瀹夐槻妯″紡
+            var securityRowLayout = new RowLayout
+            {
+                Height = Application.GetRealHeight(180),
+                //BackgroundColor = 0xff323232,
+                Y = sceneRowLayout.Bottom,
+            };
+            middle.AddChidren(securityRowLayout);
+
+            var security = new Button
+            {
+                Width = Application.GetRealWidth(400),
+                TextID = MyInternationalizationString.securitymode,
+                //Text = "瀹夐槻妯″紡",
+                TextSize = 16,
+                TextAlignment = TextAlignment.CenterLeft,
+                X = Application.GetRealWidth(40),
+                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+            };
+            securityRowLayout.AddChidren(security);
+
+            var btnsecurityback = new Button
+            {
+                Width = Application.GetRealWidth(110),
+                Height = Application.GetRealHeight(110),
+                UnSelectedImagePath = "ZigeeLogic/next.png",
+                SelectedImagePath = "ZigeeLogic/NextSelecte.png",
+                X = Application.GetRealWidth(1080 - 140),//550
+                Gravity = Gravity.CenterVertical,
+            };
+            securityRowLayout.AddChidren(btnsecurityback);
+
+            EventHandler<MouseEventArgs> securityclick = (sender, e) => {
+                var securityMode = new SecurityMode();
+                UserView.HomePage.Instance.AddChidren(securityMode);
+                UserView.HomePage.Instance.PageIndex += 1;
+                securityMode.Show();
+            };
+
+            securityRowLayout.MouseUpEventHandler += securityclick;
+            security.MouseUpEventHandler += securityclick;
+            btnsecurityback.MouseUpEventHandler += securityclick;
+            #endregion
+
+            #region ----- 宸叉湁鑷姩鍖�------      
 
             ///宸叉湁鑷姩鍖�
             var existenceRowLayout = new RowLayout
             {
                 Height = Application.GetRealHeight(180),
                 //BackgroundColor = 0xff323232,
-                Y = sceneRowLayout.Bottom,
+                Y = securityRowLayout.Bottom,
             };
-            middle.AddChidren(existenceRowLayout);
+            //middle.AddChidren(existenceRowLayout);
 
             var existence = new Button
             {
@@ -187,59 +238,16 @@
             existenceRowLayout.MouseUpEventHandler += existenceclick;
             existence.MouseUpEventHandler += existenceclick;
             btnexistenceback.MouseUpEventHandler += existenceclick;
+            #endregion
 
-            ///瀹夐槻妯″紡
-            var securityRowLayout = new RowLayout
-            {
-                Height = Application.GetRealHeight(180),
-                //BackgroundColor = 0xff323232,
-                Y = existenceRowLayout.Bottom,
-            };
-            middle.AddChidren(securityRowLayout);
-
-            var security = new Button
-            {
-                Width = Application.GetRealWidth(400),
-                TextID = MyInternationalizationString.securitymode,
-                //Text = "瀹夐槻妯″紡",
-                TextSize = 16,
-                TextAlignment = TextAlignment.CenterLeft,
-                X = Application.GetRealWidth(40),
-                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-            };
-            securityRowLayout.AddChidren(security);
-
-            var btnsecurityback = new Button
-            {
-                Width = Application.GetRealWidth(110),
-                Height = Application.GetRealHeight(110),
-                UnSelectedImagePath = "ZigeeLogic/next.png",
-                SelectedImagePath = "ZigeeLogic/NextSelecte.png",
-                X = Application.GetRealWidth(1080 - 140),//550
-                Gravity = Gravity.CenterVertical,
-            };
-            securityRowLayout.AddChidren(btnsecurityback);
-
-            EventHandler<MouseEventArgs>securityclick = (sender, e) => {
-                var securityMode = new SecurityMode();
-                UserView.HomePage.Instance.AddChidren(securityMode);
-                UserView.HomePage.Instance.PageIndex += 1;
-                securityMode.Show();
-            };
-
-            securityRowLayout.MouseUpEventHandler += securityclick;
-            security.MouseUpEventHandler += securityclick;
-            btnsecurityback.MouseUpEventHandler += securityclick;
-
-
-
+            #region ----- 寤舵椂------        
             var delayedRowLayout = new RowLayout
             {
                 Height = Application.GetRealHeight(180),
                 //BackgroundColor = 0xff323232,
                 Y=securityRowLayout.Bottom,
             };
-           middle.AddChidren(delayedRowLayout);
+           //middle.AddChidren(delayedRowLayout);
 
             var delayed = new Button
             {
@@ -276,7 +284,7 @@
             delayedRowLayout.MouseUpEventHandler += delayedclick;
             delayed.MouseUpEventHandler += delayedclick;
             btndelayedback.MouseUpEventHandler += delayedclick;
-
+#endregion
         }
 
         public static  void DelayTimeView(Dictionary<string, object> delayactionsInfo=null)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/EverymonthPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/EverymonthPage.cs
index be9e233..b5394a8 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/EverymonthPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/EverymonthPage.cs
@@ -163,44 +163,44 @@
                 {
                     list.Add(day.ToString() + " " + Language.StringByID(MyInternationalizationString.day));
                 }
-                PickerView.Show(list, (obj) =>
-                {
-                    var day = list[obj].Split(' ')[0];
-                    if (btnenddate.Tag.ToString() != "0" && int.Parse(btnenddate.Tag.ToString()) < int.Parse(day))
-                    {
-                        var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
-                                               Language.StringByID(MyInternationalizationString.monthday),
-                                               Language.StringByID(MyInternationalizationString.OK));
-                        alert.Show();
-                    }
-                    else
-                    {
-                        btnstartdate.Text = Language.StringByID(MyInternationalizationString.monthly) + day + Language.StringByID(MyInternationalizationString.day);
-                        btnstartdate.Tag = day;
-                        if (string.IsNullOrEmpty(btnenddate.Text))
-                        {
-                            btnenddate.Text = Language.StringByID(MyInternationalizationString.monthly) + day + Language.StringByID(MyInternationalizationString.day);
-                            btnenddate.Tag = day;
-                        }
-                        Common.Logic.CurrentLogic.TimeAttribute.Repeat = 3;
-                        int a = int.Parse(btnstartdate.Tag.ToString());
-                        int b = int.Parse(btnenddate.Tag.ToString());
-                        string s = "";
-                        for (int i = 32; i > 0; i--)
-                        {
-                            if (i >=a  && i <= b)
-                            {
-                                s += "1";
-                            }
-                            else
-                            {
-                                s += "0";
-                            }
-                        }
-                        var intvalue = Convert.ToInt32(s, 2);
-                        Common.Logic.CurrentLogic.TimeAttribute.MonthDate = intvalue;
-                    }
-                },0,"", Language.StringByID(MyInternationalizationString.complete), "112");
+                //PickerView.Show(list, (obj) =>
+                //{
+                //    var day = obj.Split(' ')[0];
+                //    if (btnenddate.Tag.ToString() != "0" && int.Parse(btnenddate.Tag.ToString()) < int.Parse(day))
+                //    {
+                //        var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+                //                               Language.StringByID(MyInternationalizationString.monthday),
+                //                               Language.StringByID(MyInternationalizationString.OK));
+                //        alert.Show();
+                //    }
+                //    else
+                //    {
+                //        btnstartdate.Text = Language.StringByID(MyInternationalizationString.monthly) + day + Language.StringByID(MyInternationalizationString.day);
+                //        btnstartdate.Tag = day;
+                //        if (string.IsNullOrEmpty(btnenddate.Text))
+                //        {
+                //            btnenddate.Text = Language.StringByID(MyInternationalizationString.monthly) + day + Language.StringByID(MyInternationalizationString.day);
+                //            btnenddate.Tag = day;
+                //        }
+                //        Common.Logic.CurrentLogic.TimeAttribute.Repeat = 3;
+                //        int a = int.Parse(btnstartdate.Tag.ToString());
+                //        int b = int.Parse(btnenddate.Tag.ToString());
+                //        string s = "";
+                //        for (int i = 32; i > 0; i--)
+                //        {
+                //            if (i >=a  && i <= b)
+                //            {
+                //                s += "1";
+                //            }
+                //            else
+                //            {
+                //                s += "0";
+                //            }
+                //        }
+                //        var intvalue = Convert.ToInt32(s, 2);
+                //        Common.Logic.CurrentLogic.TimeAttribute.MonthDate = intvalue;
+                //    }
+                //}, Language.StringByID(MyInternationalizationString.complete), "112");
             };
             startdaterow.MouseUpEventHandler += startdateclick;
             btnstartdate.MouseUpEventHandler += startdateclick;
@@ -215,46 +215,46 @@
                 {
                     list.Add(day.ToString() + " " + Language.StringByID(MyInternationalizationString.day));
                 }
-                PickerView.Show(list, (obj) =>
-                {
-                    var day = list[obj].Split(' ')[0];
-                    if (btnstartdate.Tag.ToString() != "0" && int.Parse(btnstartdate.Tag.ToString()) > int.Parse(day))
-                    {
-                        var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
-                                               Language.StringByID(MyInternationalizationString.monthday),
-                                               Language.StringByID(MyInternationalizationString.OK));
-                        alert.Show();
-                    }
-                    else
-                    {
-                        btnenddate.Text = Language.StringByID(MyInternationalizationString.monthly) + day + Language.StringByID(MyInternationalizationString.day);
-                        btnenddate.Tag = day;
-                        if (string.IsNullOrEmpty(btnstartdate.Text))
-                        {
-                            btnstartdate.Text = Language.StringByID(MyInternationalizationString.monthly) + day + Language.StringByID(MyInternationalizationString.day);
-                            btnstartdate.Tag = day;
-                        }
+                //PickerView.Show(list, (obj) =>
+                //{
+                //    var day = obj.Split(' ')[0];
+                //    if (btnstartdate.Tag.ToString() != "0" && int.Parse(btnstartdate.Tag.ToString()) > int.Parse(day))
+                //    {
+                //        var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+                //                               Language.StringByID(MyInternationalizationString.monthday),
+                //                               Language.StringByID(MyInternationalizationString.OK));
+                //        alert.Show();
+                //    }
+                //    else
+                //    {
+                //        btnenddate.Text = Language.StringByID(MyInternationalizationString.monthly) + day + Language.StringByID(MyInternationalizationString.day);
+                //        btnenddate.Tag = day;
+                //        if (string.IsNullOrEmpty(btnstartdate.Text))
+                //        {
+                //            btnstartdate.Text = Language.StringByID(MyInternationalizationString.monthly) + day + Language.StringByID(MyInternationalizationString.day);
+                //            btnstartdate.Tag = day;
+                //        }
 
-                        Common.Logic.CurrentLogic.TimeAttribute.Repeat = 3;
-                        int a = int.Parse(btnstartdate.Tag.ToString());
-                        int b = int.Parse(btnenddate.Tag.ToString());
-                        string s = "";
-                        for (int i = 32; i > 0; i--)
-                        {
-                            if (i >= a && i <= b)
-                            {
-                                s += "1";
-                            }
-                            else
-                            {
-                                s += "0";
-                            }
-                        }
-                        var intvalue = Convert.ToInt32(s, 2);
-                        Common.Logic.CurrentLogic.TimeAttribute.MonthDate = intvalue;
+                //        Common.Logic.CurrentLogic.TimeAttribute.Repeat = 3;
+                //        int a = int.Parse(btnstartdate.Tag.ToString());
+                //        int b = int.Parse(btnenddate.Tag.ToString());
+                //        string s = "";
+                //        for (int i = 32; i > 0; i--)
+                //        {
+                //            if (i >= a && i <= b)
+                //            {
+                //                s += "1";
+                //            }
+                //            else
+                //            {
+                //                s += "0";
+                //            }
+                //        }
+                //        var intvalue = Convert.ToInt32(s, 2);
+                //        Common.Logic.CurrentLogic.TimeAttribute.MonthDate = intvalue;
 
-                    }
-                },0,"", Language.StringByID(MyInternationalizationString.complete), "112");
+                //    }
+                //}, Language.StringByID(MyInternationalizationString.complete), "112");
             };
             enddaterow.MouseUpEventHandler += enddateclick;
             btnenddate.MouseUpEventHandler += enddateclick;
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
index 5f62f26..171aa2f 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
@@ -40,14 +40,14 @@
 
             var titleName = new Button
             {
-               
+
                 TextSize = 17,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                 TextAlignment = TextAlignment.CenterLeft,
                 X = Application.GetRealWidth(150),
             };
             topFrameLayout.AddChidren(titleName);
-            if (Common.Logic.CurrentLogic.LogicId == 1)
+            if (Common.Logic.CurrentLogic.LogicId != 0)
             {
                 titleName.Text = Language.StringByID(MyInternationalizationString.editautomation);
             }
@@ -65,6 +65,7 @@
                 UnSelectedImagePath = "ZigeeLogic/Back.png",
             };
             topFrameLayout.AddChidren(back);
+           
             back.MouseDownEventHandler += (sender, e) =>
             {
                 //if (Common.Logic.CurrentLogic.LogicId != 0)
@@ -163,7 +164,7 @@
             };
             logicnamefl.AddChidren(text);
 
-             logicTextBox = new EditText
+            logicTextBox = new EditText
             {
                 Width = Application.GetRealWidth(900),
                 Height = Application.GetRealHeight(60),
@@ -171,12 +172,12 @@
                 Y = text.Bottom + Application.GetRealHeight(10),
                 TextAlignment = TextAlignment.CenterLeft,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                TextSize=13,
-                Text =Common.Logic.CurrentLogic.LogicName,
+                TextSize = 13,
+                Text = Common.Logic.CurrentLogic.LogicName,
                 //TextID=MyInternationalizationString.automation1,
             };
             logicnamefl.AddChidren(logicTextBox);
-          
+
             var btnline = new Button
             {
                 Height = Application.GetRealHeight(4),
@@ -193,7 +194,7 @@
                 //BackgroundColor = 0xff323232,
             };
             middle.AddChidren(conditionRowLayout);
-           
+
             conditionRowLayout.AddChidren(new Button
             {
                 Width = Application.GetRealWidth(300),
@@ -279,9 +280,9 @@
                     };
                     addfl.AddChidren(addbtn);
                     addbtn.MouseUpEventHandler += (sender, e) =>
-                      {
-                          ConditionView();
-                      };
+                    {
+                        ConditionView();
+                    };
                 }
                 else
                 {
@@ -335,7 +336,7 @@
                                     case 0:
                                         {
                                             string s = "";
-                                           s = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"];
+                                            s = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"];
                                             timevalue.Text = Language.StringByID(MyInternationalizationString.time) + conditions["StartHour"] + ":" + s;
                                         }
                                         break;
@@ -364,7 +365,7 @@
                                         }
                                         else
                                         {
-                                            timevalue.Text =Language.StringByID(MyInternationalizationString.sunset);
+                                            timevalue.Text = Language.StringByID(MyInternationalizationString.sunset);
                                         }
                                         break;
                                     case 3:
@@ -378,7 +379,7 @@
                                         }
                                         else
                                         {
-                                            timevalue.Text =Language.StringByID(MyInternationalizationString.noon);
+                                            timevalue.Text = Language.StringByID(MyInternationalizationString.noon);
                                         }
                                         break;
                                 }
@@ -387,9 +388,9 @@
                             break;
                         case 5:
                             {
-                                 string s1="", s2="";
-                                 s1 = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"];
-                                 s2 = conditions["StopMin"].Length <2 ? "0" + conditions["StopMin"] : conditions["StopMin"];
+                                string s1 = "", s2 = "";
+                                s1 = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"];
+                                s2 = conditions["StopMin"].Length < 2 ? "0" + conditions["StopMin"] : conditions["StopMin"];
                                 ///鏄剧ず鏃堕棿
                                 var timevalue = new Button
                                 {
@@ -406,7 +407,7 @@
 
                                 var timeedit = new Button
                                 {
-                                    BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor,
+                                    BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
                                     Text = Language.StringByID(MyInternationalizationString.edit),
                                     //TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                 };
@@ -445,7 +446,7 @@
 
                                 var deviceedit = new Button
                                 {
-                                    BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor,
+                                    BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
                                     Text = Language.StringByID(MyInternationalizationString.edit),
                                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                 };
@@ -469,7 +470,7 @@
                                     Height = Application.GetRealHeight(160),
                                     Gravity = Gravity.CenterVertical,
                                     TextAlignment = TextAlignment.CenterRight,
-                                    X = Application.GetRealWidth(1080 - 330),
+                                    X = Application.GetRealWidth(1080 - 340),
                                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                 };
                                 conditionsowLayout.AddChidren(devicestatus);
@@ -588,7 +589,16 @@
 
                                                     }
                                                     break;
-                                             }
+                                                default:
+                                                    {
+                                                        if (intvalue == "1")
+                                                        {
+                                                            devicestatus.TextID = MyInternationalizationString.callthepolice;
+                                                        }
+                                                    }
+                                                    break;
+
+                                            }
                                         }
                                         break;
                                     case DeviceType.OnOffSwitch:
@@ -640,7 +650,7 @@
 
                                 var logicedit = new Button
                                 {
-                                    BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor,
+                                    BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
                                     Text = Language.StringByID(MyInternationalizationString.edit),
                                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                 };
@@ -695,7 +705,7 @@
 
                                 var btnsecurityedit = new Button
                                 {
-                                    BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor,
+                                    BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
                                     Text = Language.StringByID(MyInternationalizationString.edit),
                                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                 };
@@ -737,7 +747,7 @@
                             break;
                         case 7:
                             {
-                                var btnlocation= new Button
+                                var btnlocation = new Button
                                 {
                                     X = Application.GetRealWidth(40),
                                     Width = Application.GetRealWidth(700),
@@ -753,14 +763,14 @@
 
                                 var btnlocationedit = new Button
                                 {
-                                    BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor,
+                                    BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
                                     Text = Language.StringByID(MyInternationalizationString.edit),
                                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                 };
                                 conditionsowLayout.AddRightView(btnlocationedit);
                                 btnlocationedit.MouseUpEventHandler += (sender, e) =>
                                 {
-                                    
+
                                     var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                                     this.AddChidren(flMain);
                                     AddLogicPage.LocationView(flMain, true);
@@ -779,11 +789,11 @@
 
                                 if (conditions["AtHome"] == "1")
                                 {
-                                    locationstatus.Text =Language.StringByID(MyInternationalizationString.athome);
+                                    locationstatus.Text = Language.StringByID(MyInternationalizationString.athome);
                                 }
                                 else
                                 {
-                                    locationstatus.Text =Language.StringByID(MyInternationalizationString.leavehome);
+                                    locationstatus.Text = Language.StringByID(MyInternationalizationString.leavehome);
                                 }
                             }
                             break;
@@ -814,7 +824,7 @@
                             }
                         };
                         alert.Show();
-                      
+
                     };
 
                 }
@@ -830,7 +840,7 @@
                 // BackgroundColor = 0xff323232,
             };
             middle.AddChidren(targetRowLayout);
-           
+
 
             var btntargettitle = new Button
             {
@@ -947,7 +957,7 @@
                 }
                 else
                 {
-                   var actionsrowLayout = new RowLayout
+                    var actionsrowLayout = new RowLayout
                     {
                         Height = Application.GetRealHeight(160),
                     };
@@ -960,8 +970,8 @@
                     {
                         case 10:
                             {
-                                var delaytime =actions["DelayTime"].ToString();
-                             
+                                var delaytime = actions["DelayTime"].ToString();
+
                                 var btnDelayTime = new Button
                                 {
                                     X = Application.GetRealWidth(40),
@@ -976,7 +986,7 @@
                                 ///缂栬緫璁惧鐘舵�丅utton
                                 var timeedit = new Button
                                 {
-                                    BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor,
+                                    BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
                                     Text = Language.StringByID(MyInternationalizationString.edit),
                                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                 };
@@ -1021,7 +1031,7 @@
                                     }
                                     ListActions[i].Add("Time", 0);
                                 }
-                                                          
+
                                 ///璁惧鍚嶇ОButton
                                 var btndevicename = new Button
                                 {
@@ -1055,15 +1065,15 @@
                                     Height = Application.GetRealHeight(160),
                                     Gravity = Gravity.CenterVertical,
                                     TextAlignment = TextAlignment.CenterRight,
-                                    X = Application.GetRealWidth(1080 - 330),
+                                    X = Application.GetRealWidth(1080 - 340),
                                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                                    };
+                                };
                                 actionsrowLayout.AddChidren(devicestatus);
 
                                 ///缂栬緫璁惧鐘舵�丅utton
                                 var deviceedit = new Button
                                 {
-                                    BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor,
+                                    BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
                                     Text = Language.StringByID(MyInternationalizationString.edit),
                                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                 };
@@ -1071,23 +1081,22 @@
 
                                 ///缂栬緫鐐瑰嚮浜嬩欢
                                 deviceedit.MouseUpEventHandler += (sender, e) =>
-                                 {
-                                     //var deviceStatePage = new DeviceStatePage();
-                                     //UserView.HomePage.Instance.AddChidren(deviceStatePage);
-                                     //UserView.HomePage.Instance.PageIndex += 1;
-                                     //deviceStatePage.IsDeviceEditor = true;
-                                     //deviceStatePage.Show(deviceinof);
+                                {
+                                    //var deviceStatePage = new DeviceStatePage();
+                                    //UserView.HomePage.Instance.AddChidren(deviceStatePage);
+                                    //UserView.HomePage.Instance.PageIndex += 1;
+                                    //deviceStatePage.IsDeviceEditor = true;
+                                    //deviceStatePage.Show(deviceinof);
 
-                                     //ActionModifyDeviceStateView(deviceinof);
-                                     var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
-                                     this.AddChidren(flMain);
-                                     LogicDevicePage.CurrentDeviceStateView(flMain, deviceinof, true);
-                                 };
+                                    //ActionModifyDeviceStateView(deviceinof);
+                                    var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+                                    this.AddChidren(flMain);
+                                    LogicDevicePage.CurrentDeviceStateView(flMain, deviceinof, true);
+                                };
 
 
                                 switch (deviceinof.Type)
                                 {
-
                                     case DeviceType.OnOffOutput:
                                         {
                                             var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
@@ -1108,6 +1117,38 @@
                                                         devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.close);
                                                     }
                                                 }
+
+                                            }
+
+                                        }
+                                        break;
+                                    case DeviceType.DimmableLight:
+                                        {
+                                            var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
+                                            if (TaskList == null)
+                                            {
+                                                continue;
+                                            }
+                                            foreach (var status in TaskList)
+                                            {
+                                                if (status["TaskType"].ToString() == "3")
+                                                {
+                                                    var intvalue = int.Parse(status["Data1"]);
+                                                    var lightbrightnessvalue = (intvalue * 100) / 254;
+                                                    devicestatus.Text = lightbrightnessvalue.ToString() + "%";
+                                                }
+                                                else if (status["TaskType"].ToString() == "1")
+                                                {
+                                                    if (status["Data1"].ToString() == "1")
+                                                    {
+                                                        devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.open);
+                                                    }
+                                                    else
+                                                    {
+                                                        devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.close);
+                                                    }
+                                                }
+
 
                                             }
 
@@ -1216,7 +1257,7 @@
                                     //TextColor = 0xff121212,
                                     X = Application.GetRealWidth(1080 - 330),
                                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                                    TextAlignment=TextAlignment.CenterRight,
+                                    TextAlignment = TextAlignment.CenterRight,
                                 };
                                 actionsrowLayout.AddChidren(logicstatus);
 
@@ -1240,7 +1281,7 @@
                                     Gravity = Gravity.CenterVertical,
                                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                                     //TextColor = 0xff121212,
-                                    TextID = MyInternationalizationString.securitymode,
+                                    TextID = MyInternationalizationString.security,
                                 };
                                 actionsrowLayout.AddChidren(btnsecurity);
 
@@ -1268,9 +1309,9 @@
                                     Height = Application.GetRealHeight(160),
                                     Gravity = Gravity.CenterVertical,
                                     //TextColor = 0xff121212,
-                                    X = Application.GetRealWidth(1080 -330),
+                                    X = Application.GetRealWidth(1080 - 330),
                                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                                    TextAlignment=TextAlignment.CenterRight,
+                                    TextAlignment = TextAlignment.CenterRight,
                                 };
                                 actionsrowLayout.AddChidren(securitystatus);
 
@@ -1337,13 +1378,13 @@
             #endregion
 
             #region  ----鎺ㄩ�佽缃�----
-
+            /*
             var pushRowLayout = new RowLayout
             {
                 Height = Application.GetRealHeight(150),
             };
             middle.AddChidren(pushRowLayout);
-
+ 
             var btnpushtitle = new Button
             {
                 //Text = "鎺ㄩ�佽缃�",
@@ -1360,14 +1401,14 @@
                 //TextID = MyInternationalizationString.execute,
             };
             pushRowLayout.AddChidren(btnpushtitle);
-
+ 
             var pushswitchRowlayout = new RowLayout
             {
                 Height = Application.GetRealHeight(160),
                 LineColor = ZigbeeColor.Current.LogicLineColor,
             };
             middle.AddChidren(pushswitchRowlayout);
-
+ 
             var btnswitchtxet = new Button
             {
                 //Text = "鎺ㄩ�佸紑鍏�",
@@ -1378,7 +1419,7 @@
                 TextID = MyInternationalizationString.pushswitch,
             };
             pushswitchRowlayout.AddChidren(btnswitchtxet);
-
+ 
             var btnswitch = new Button
             {
                 Width = Application.GetMinRealAverage(183),
@@ -1389,26 +1430,26 @@
                 Gravity = Gravity.CenterVertical,
             };
             pushswitchRowlayout.AddChidren(btnswitch);
-
+ 
             btnswitch.MouseUpEventHandler += (sender1, e1) =>
             {
                 btnswitch.IsSelected = !btnswitch.IsSelected;
                 if (btnswitch.IsSelected)
                 {
-
+ 
                 }
                 else
                 {
-
+ 
                 }
             };
-
+ 
             var custompushRowLayout = new RowLayout
             {
                 Height = Application.GetRealHeight(160),
             };
             middle.AddChidren(custompushRowLayout);
-
+ 
             var btncustompush = new Button
             {
                 TextID = MyInternationalizationString.custompush,
@@ -1419,8 +1460,8 @@
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
             };
             custompushRowLayout.AddChidren(btncustompush);
-
-
+ 
+ 
             var custompushback = new Button
             {
                 Width = Application.GetRealWidth(110),
@@ -1437,14 +1478,15 @@
                 UserView.HomePage.Instance.AddChidren(CustomText);
                 UserView.HomePage.Instance.PageIndex += 1;
                 CustomText.Show();
-
+ 
             };
             btncustompush.MouseUpEventHandler += customclick;
             custompushback.MouseUpEventHandler += customclick;
             custompushRowLayout.MouseUpEventHandler += customclick;
+            */
             #endregion
 
-         
+
             var btnsave = new Button
             {
                 Height = Application.GetRealHeight(150),//194
@@ -1461,50 +1503,50 @@
                 AddChidren(btnsave);
             }
             btnsave.MouseUpEventHandler += async (sender, e) =>
-             {
-                 var name = logicTextBox.Text.Trim();
+            {
+                var name = logicTextBox.Text.Trim();
 
-                 if (string.IsNullOrEmpty(logicTextBox.Text.Trim()))
-                 {
-                     new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.PleaseEnterLogicName), Language.StringByID(MyInternationalizationString.Close)).Show();
-                     return;
-                 }
-                 var logicname = Common.Logic.LogicList.Find((logic) => Common.Logic.CurrentLogic.LogicId != logic.LogicId && logic.LogicName == name);
-                 if (logicname != null)
-                 {
-                     new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.Rename), Language.StringByID(MyInternationalizationString.Close)).Show();
-                     return;
-                 }
+                if (string.IsNullOrEmpty(logicTextBox.Text.Trim()))
+                {
+                    new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.PleaseEnterLogicName), Language.StringByID(MyInternationalizationString.Close)).Show();
+                    return;
+                }
+                var logicname = Common.Logic.LogicList.Find((logic) => Common.Logic.CurrentLogic.LogicId != logic.LogicId && logic.LogicName == name);
+                if (logicname != null)
+                {
+                    new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.Rename), Language.StringByID(MyInternationalizationString.Close)).Show();
+                    return;
+                }
 
-                 Common.Logic.CurrentLogic.LogicName = name;
+                Common.Logic.CurrentLogic.LogicName = name;
 
-                 //鍒ゆ柇鏄柊娣诲姞閫昏緫(榛樿0)杩樻槸淇敼閫昏緫
-                 CommonPage.Loading.Start();
-                 if (Common.Logic.CurrentLogic.LogicId == 0)
-                 {
-                     //鍙戦�佹坊鍔犻�昏緫鍛戒护
-                     var logicifon = await Send.AddModifyLogic(Common.Logic.CurrentLogic);
-                     if (logicifon != null && logicifon.LogicId != 0)
-                     {
-                         Common.Logic.CurrentLogic.LogicId = logicifon.LogicId;
-                         Common.Logic.LogicList.Add(Common.Logic.CurrentLogic);
-                     }
-                 }
-                 else
-                 {
-                     //鍙戦�佷慨鏀归�昏緫鍛戒护
-                     Send.AddModifyLogic(Common.Logic.CurrentLogic);
-                 }
+                //鍒ゆ柇鏄柊娣诲姞閫昏緫(榛樿0)杩樻槸淇敼閫昏緫
+                CommonPage.Loading.Start();
+                if (Common.Logic.CurrentLogic.LogicId == 0)
+                {
+                    //鍙戦�佹坊鍔犻�昏緫鍛戒护
+                    var logicifon = await Send.AddModifyLogic(Common.Logic.CurrentLogic);
+                    if (logicifon != null && logicifon.LogicId != 0)
+                    {
+                        Common.Logic.CurrentLogic.LogicId = logicifon.LogicId;
+                        Common.Logic.LogicList.Add(Common.Logic.CurrentLogic);
+                    }
+                }
+                else
+                {
+                    //鍙戦�佷慨鏀归�昏緫鍛戒护
+                    Send.AddModifyLogic(Common.Logic.CurrentLogic);
+                }
 
-                 CommonPage.Loading.Hide();
-                 UserView.HomePage.Instance.RemoveViewByTag("Logic");
-                 Category.Category.instance?.RefreshBodyView();
-                 //UserView.HomePage.Instance.RemoveAt("Logic1");
-                 //Category.Category category = new Category.Category();
-                 //UserView.HomePage.Instance.AddChidren(category);
-                 //UserView.HomePage.Instance.PageIndex += 1;
-                 //category.Show(2);
-             };
+                CommonPage.Loading.Hide();
+                UserView.HomePage.Instance.RemoveViewByTag("Logic");
+                Category.Category.instance?.RefreshBodyView();
+                //UserView.HomePage.Instance.RemoveAt("Logic1");
+                //Category.Category category = new Category.Category();
+                //UserView.HomePage.Instance.AddChidren(category);
+                //UserView.HomePage.Instance.PageIndex += 1;
+                //category.Show(2);
+            };
 
 
         }
@@ -1585,7 +1627,7 @@
                         if (dictionary.Count != 0 && dictionary.Count == 1)
                         {
                             string len = "", leng = "";
-                            int minvalue = 0,Maximum=0;
+                            int minvalue = 0, Maximum = 0;
                             foreach (var value in dictionary)
                             {
                                 ///鍙栧嚭鏈堜唤
@@ -1625,13 +1667,13 @@
                                 {
                                     leng = month.ToString();
                                 }
-                                if (minvalue==Maximum)
+                                if (minvalue == Maximum)
                                 {
                                     btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.everyyear) + leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString());
                                 }
                                 else
                                 {
-                                    btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.everyyear) + leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString()) + "-" + leng + "/" + (Maximum.ToString().Length < 2 ? "0" + Maximum.ToString():Maximum.ToString());
+                                    btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.everyyear) + leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString()) + "-" + leng + "/" + (Maximum.ToString().Length < 2 ? "0" + Maximum.ToString() : Maximum.ToString());
                                 }
                             }
 
@@ -1643,7 +1685,7 @@
                             foreach (var value in dictionary)
                             {
                                 string len = "", leng = "";
-                                int minvalue = 0,Maximum=0;
+                                int minvalue = 0, Maximum = 0;
                                 ///鍙栧嚭鏈堜唤
                                 var month = value.Key;
                                 ///鍙栧嚭鏃ユ暟
@@ -1654,7 +1696,7 @@
                                 {
                                     len += str.Substring(j, 1);
                                 }
-                                                               
+
 
                                 if (month.ToString().Length < 2)
                                 {
@@ -1692,7 +1734,7 @@
                                             Maximum = j + 1;
                                         }
                                     }
-                                    stringtext += leng + "/" + (Maximum.ToString().Length < 2 ? "0" +Maximum.ToString() :Maximum.ToString());
+                                    stringtext += leng + "/" + (Maximum.ToString().Length < 2 ? "0" + Maximum.ToString() : Maximum.ToString());
 
                                 }
                                 b++;
@@ -1800,21 +1842,25 @@
 
                 var frameLayout = new FrameLayout
                 {
-                    Y = Application.GetRealHeight(1920 - 720),
-                    Height = Application.GetRealHeight(720),
-                    BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
+                    Y = Application.GetRealHeight(1920 - 680 - 50),
+                    Height = Application.GetRealHeight(680),
+                    BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+                    Width = Application.GetRealWidth(1000),
+                    X = Application.GetRealWidth(40),
+                    Radius = (uint)Application.GetRealHeight(40),
                 };
                 flMain.AddChidren(frameLayout);
 
-                var titlerow = new RowLayout
+                var titlerow = new FrameLayout
                 {
-                    Height = Application.GetRealHeight(180),
+                    Height = Application.GetRealHeight(150),
                 };
                 frameLayout.AddChidren(titlerow);
+
                 var titlebtn = new Button
                 {
                     //Text = "璇烽�夋嫨澶氭潯浠剁粍鍚�",
-                    //TextID = MyInternationalizationString.Multicondition,
+                    TextID = MyInternationalizationString.multicondition,
                     TextSize = 16,
                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                 };
@@ -1822,7 +1868,7 @@
 
                 var androw = new RowLayout
                 {
-                    Height = Application.GetRealHeight(180),
+                    Height = Application.GetRealHeight(160),
                     Y = titlerow.Bottom,
                 };
                 frameLayout.AddChidren(androw);
@@ -1831,13 +1877,15 @@
                     Width = Application.GetRealWidth(600),
                     TextID = MyInternationalizationString.Allconditions,
                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                    //Text = "婊¤冻鍏ㄩ儴鏉′欢鏃�", 
+                    //Text = "婊¤冻鍏ㄩ儴鏉′欢鏃�",
+                    TextAlignment = TextAlignment.CenterLeft,
+                    X = Application.GetRealHeight(50),
                 };
                 androw.AddChidren(andbtn);
 
                 var orrow = new RowLayout
                 {
-                    Height = Application.GetRealHeight(180),
+                    Height = Application.GetRealHeight(160),
                     Y = androw.Bottom,
                 };
                 frameLayout.AddChidren(orrow);
@@ -1847,6 +1895,8 @@
                     TextID = MyInternationalizationString.anycondition,
                     //Text = "婊¤冻浠讳竴鏉′欢鏃�",
                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                    TextAlignment = TextAlignment.CenterLeft,
+                    X = Application.GetRealHeight(50)
                 };
                 orrow.AddChidren(orbtn);
 
@@ -1854,9 +1904,10 @@
                 {
                     TextID = MyInternationalizationString.cancel,
                     TextSize = 16,
-                    Y = orrow.Bottom,
-                    Height = Application.GetRealHeight(180),
+                    Y = orrow.Bottom + Application.GetRealHeight(30),
+                    Height = Application.GetRealHeight(160),
                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                    BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
                 };
                 frameLayout.AddChidren(cancelbtn);
                 cancelbtn.MouseUpEventHandler += (sender4, e4) =>
@@ -1899,6 +1950,6 @@
                 addLogicPage.Show();
             }
         }
-              
+
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs
index e688e5e..296d3fb 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs
@@ -95,11 +95,11 @@
             middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
             this.AddChidren(middle);
 
-            ///杩囨护鎺夌殑璁惧
+            ///鐩墠鏀寔鐨勮澶�
             List<DeviceType> deviceTypeList = new List<DeviceType> {
-                DeviceType.IASZone,
-                DeviceType.OnOffSwitch,
-                DeviceType.AirSwitch,
+                DeviceType.OnOffOutput,
+                DeviceType.DimmableLight,
+                DeviceType.WindowCoveringDevice,
             };
 
             ///鎴块棿鐐瑰嚮浜嬩欢
@@ -166,8 +166,9 @@
                         foreach (var device in room.DeviceUIList) {
                             if (!deviceTypeList.Contains(device.CommonDevice.Type))
                             {
-                                list.Add(device);
+                                continue;
                             }
+                            list.Add(device);
                         }
                         AllDeviceTypeView(list);
 
@@ -182,7 +183,7 @@
             foreach (var device in Common.Logic.LogicDviceList)
             {
                 //杩囨护鎺夋病鏈夌敤鍒拌澶囷紱
-                if (deviceTypeList.Contains(device.Type))
+                if (!deviceTypeList.Contains(device.Type))
                 {
                     continue;
                 }
@@ -207,7 +208,7 @@
             devicetypelist.Clear();
           
             #region  ------鎺掑垪璁惧绫诲瀷------
-            var lightjosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.ColorDimmableLight || device.CommonDevice.Type == DeviceType.OnOffOutput);
+            var lightjosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.DimmableLight || device.CommonDevice.Type == DeviceType.OnOffOutput);
             if (lightjosn != null)
             {
                 devicetypelist.Add(Language.StringByID(MyInternationalizationString.Lights));
@@ -273,6 +274,7 @@
                     if (devicetype == Language.StringByID(MyInternationalizationString.Lights))
                     {
                         list.Add(DeviceType.OnOffOutput);//0x0101鍗佽繘鍒�257
+                        list.Add(DeviceType.DimmableLight);
                     }
                     else if (devicetype == Language.StringByID(MyInternationalizationString.Curtains))
                     {
@@ -600,7 +602,7 @@
                     }
                     break;
                 ///璋冨厜鐏厜
-                case DeviceType.ColorDimmableLight:
+                case DeviceType.DimmableLight:
                     {
 
                         #region  ----鍒濆鍖栬澶囧姛鑳芥暟鎹�----
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs
index cf1b17f..6d3e7a7 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs
@@ -182,4 +182,6 @@
         }
         #endregion
     }
+
+   
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs
index c30b73a..4cfcdd7 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs
@@ -38,6 +38,8 @@
                 TextID = MyInternationalizationString.securitymode,
                 TextSize = 17,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                TextAlignment = TextAlignment.CenterLeft,
+                X = Application.GetRealWidth(150),
             };
             topFrameLayout.AddChidren(titleName);
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
index d0a1967..3cb527e 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -30,7 +30,8 @@
                     {
 
                         var list = jObjectdata["Data"]["LogicList"];
-                        if(list==null){
+                        if (list == null)
+                        {
                             return;
                         }
                         foreach (var listIfon in list)
@@ -50,7 +51,7 @@
                 mainGateWay.GwResDataAction += action;
 
                 var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 2004 } };
-                mainGateWay?.Send("Logic/GetLogicList",jObject.ToString());
+                mainGateWay?.Send("Logic/GetLogicList", jObject.ToString());
                 //await System.Threading.Tasks.Task.Run(async () =>
                 //{
                 var dateTime = DateTime.Now;
@@ -78,7 +79,7 @@
                 Common.Logic logic = null;
                 Action<string, string> action = (topic, data) =>
                 {
-                   
+
                     var gatewayID = topic.Split('/')[0];
                     var jObjectdata = JObject.Parse(data);
                     if (jObjectdata == null)
@@ -88,50 +89,50 @@
 
                     if (topic == $"{gatewayID}/Logic/GetLogicInfo_Respon")
                     {
-                       
-                            logic = new Common.Logic();
-                            var Logicifon = jObjectdata["Data"];
-                            logic.LogicId = int.Parse(Logicifon["LogicId"]?.ToString());
-                            logic.IsEnable = int.Parse(Logicifon["IsEnable"]?.ToString());
-                            logic.LogicName = Logicifon["LogicName"]?.ToString();
 
-                            logic.Relationship = int.Parse(Logicifon["Relationship"]?.ToString());
-                            logic.TimeAttribute = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.TimeAttributeObj>(Logicifon["TimeAttribute"].ToString());
-                            logic.Conditions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(Logicifon["Conditions"].ToString());
-                            var listactions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(Logicifon["Actions"].ToString());
-                            if (listactions != null)
+                        logic = new Common.Logic();
+                        var Logicifon = jObjectdata["Data"];
+                        logic.LogicId = int.Parse(Logicifon["LogicId"]?.ToString());
+                        logic.IsEnable = int.Parse(Logicifon["IsEnable"]?.ToString());
+                        logic.LogicName = Logicifon["LogicName"]?.ToString();
+
+                        logic.Relationship = int.Parse(Logicifon["Relationship"]?.ToString());
+                        logic.TimeAttribute = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.TimeAttributeObj>(Logicifon["TimeAttribute"].ToString());
+                        logic.Conditions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(Logicifon["Conditions"].ToString());
+                        var listactions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(Logicifon["Actions"].ToString());
+                        if (listactions != null)
+                        {
+                            foreach (var actions in listactions)
                             {
-                                foreach (var actions in listactions)
+                                Dictionary<string, object> actionsdictionary = new Dictionary<string, object>();
+                                List<Dictionary<string, string>> tasklist = new List<Dictionary<string, string>>();
+                                if (actions["LinkType"].ToString() == "0")
                                 {
-                                    Dictionary<string, object> actionsdictionary = new Dictionary<string, object>();
-                                    List<Dictionary<string, string>> tasklist = new List<Dictionary<string, string>>();
-                                    if (actions["LinkType"].ToString() == "0")
+                                    actionsdictionary.Add("LinkType", actions["LinkType"]);
+                                    actionsdictionary.Add("DeviceAddr", actions["DeviceAddr"]);
+                                    actionsdictionary.Add("Epoint", actions["Epoint"]);
+                                    actionsdictionary.Add("Time", actions["Time"]);
+                                    var list = JArray.Parse(actions["TaskList"].ToString());
+                                    foreach (var taskIfon in list)
                                     {
-                                        actionsdictionary.Add("LinkType", actions["LinkType"]);
-                                        actionsdictionary.Add("DeviceAddr", actions["DeviceAddr"]);
-                                        actionsdictionary.Add("Epoint", actions["Epoint"]);
-                                        actionsdictionary.Add("Time", actions["Time"]);
-                                        var list = JArray.Parse(actions["TaskList"].ToString());
-                                        foreach (var taskIfon in list)
-                                        {
-                                            Dictionary<string, string> dictionary = new Dictionary<string, string>();
-                                            dictionary.Add("TaskType", taskIfon["TaskType"].ToString());
-                                            dictionary.Add("Data1", taskIfon["Data1"].ToString());
-                                            dictionary.Add("Data2", taskIfon["Data2"].ToString());
-                                            tasklist.Add(dictionary);
-                                        }
-                                        actionsdictionary.Add("TaskList", tasklist);
+                                        Dictionary<string, string> dictionary = new Dictionary<string, string>();
+                                        dictionary.Add("TaskType", taskIfon["TaskType"].ToString());
+                                        dictionary.Add("Data1", taskIfon["Data1"].ToString());
+                                        dictionary.Add("Data2", taskIfon["Data2"].ToString());
+                                        tasklist.Add(dictionary);
                                     }
-                                    else
-                                    {
-                                        actionsdictionary = actions;
-                                    }
-
-                                    logic.Actions.Add(actionsdictionary);
+                                    actionsdictionary.Add("TaskList", tasklist);
+                                }
+                                else
+                                {
+                                    actionsdictionary = actions;
                                 }
 
+                                logic.Actions.Add(actionsdictionary);
                             }
-                   
+
+                        }
+
                     };
                 };
                 var mainGateWay = ZbGateway.MainGateWay;
@@ -219,7 +220,7 @@
                 Common.Logic Logicifon = null;
                 Action<string, string> action = (topic, datastring) =>
                 {
-                   
+
                     var gatewayID = topic.Split('/')[0];
                     var jObjectdata = JObject.Parse(datastring);
                     if (jObjectdata == null)
@@ -230,8 +231,8 @@
                     if (topic == gatewayID + "/Logic/AddLogic_Respon")
                     {
                         try
-                        {  
-                            Logicifon=new Common.Logic();
+                        {
+                            Logicifon = new Common.Logic();
                             Logicifon = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.Logic>(jObjectdata["Data"].ToString());
                         }
                         catch (Exception ex)
@@ -281,7 +282,7 @@
                                 var tInfo = new JObject
                                 {
                                     ["Type"] = int.Parse(dictionary["Type"]),
-                                    ["IsValid"] =int.Parse(dictionary["IsValid"]),
+                                    ["IsValid"] = int.Parse(dictionary["IsValid"]),
                                     ["DateType"] = int.Parse(dictionary["DateType"]),
                                     ["RemindTime"] = int.Parse(dictionary["RemindTime"]),
                                     ["EnDelay"] = int.Parse(dictionary["EnDelay"]),
@@ -397,7 +398,7 @@
                                     ["LinkType"] = int.Parse(dictionary["LinkType"].ToString()),
                                     ["DeviceAddr"] = dictionary["DeviceAddr"].ToString(),
                                     ["Epoint"] = int.Parse(dictionary["Epoint"].ToString()),
-                                    ["Time"] =int.Parse(dictionary["Time"].ToString()),
+                                    ["Time"] = int.Parse(dictionary["Time"].ToString()),
                                     ["taskList"] = taskList,
 
                                 };
@@ -454,7 +455,7 @@
 
 
                 var dateTime = DateTime.Now;
-                while ((DateTime.Now - dateTime).TotalMilliseconds < 3*1000)
+                while ((DateTime.Now - dateTime).TotalMilliseconds < 3 * 1000)
                 {
                     await System.Threading.Tasks.Task.Delay(100);
                     if (Logicifon != null)
@@ -467,26 +468,181 @@
             });
         }
         /// <summary>
+        /// 鍗曠嫭鎺у埗鑷姩鍖栧紑鍏冲睘鎬�
+        /// </summary>
+        /// <returns></returns>
+        public static async System.Threading.Tasks.Task<int> LogicControlSwitch(Common.Logic logic)
+        {
+            return await System.Threading.Tasks.Task.Run(async () =>
+            {
+                int intvalue = 3;
+                Action<string, string> action = (topic, data) =>
+                {
+                    var gatewayID = topic.Split('/')[0];
+                    var jObjectdata = JObject.Parse(data);
+                    if (jObjectdata == null)
+                    {
+                        return;
+                    }
+
+                    if (topic == $"{gatewayID}/Logic/ReviseAttribute_Respon")
+                    {
+                        intvalue = int.Parse(jObjectdata["Data"]["Result"].ToString());
+                    }
+                };
+                var mainGateWay = ZbGateway.MainGateWay;
+                if (mainGateWay == null)
+                {
+                    Console.WriteLine("娌℃湁涓荤綉鍏�");
+                    return intvalue;
+                }
+                mainGateWay.GwResDataAction += action;
+
+                var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 2001 } };
+                var date = new JObject();
+                jObject.Add("Data", date);
+                date.Add("LogicId", logic.LogicId);
+                date.Add("IsEnable", logic.IsEnable);
+                //date.Add("LogicName", logic.LogicName);
+                //date.Add("Relationship", logic.Relationship);
+                mainGateWay?.Send("Logic/ReviseAttribute", jObject.ToString());
+                //await System.Threading.Tasks.Task.Run(async () =>
+                //{
+                var dateTime = DateTime.Now;
+                while ((DateTime.Now - dateTime).TotalMilliseconds < 3 * 1000)
+                {
+                    await System.Threading.Tasks.Task.Delay(100);
+                    if (intvalue != 3)
+                    {
+                        break;
+                    }
+                }
+                ZbGateway.MainGateWay.GwResDataAction -= action;
+                //});
+                return intvalue;
+            });
+        }
+        /// <summary>
+        /// 鑾峰彇Logic鍒楄〃鐨勬柟娉�
+        /// </summary>
+        /// <returns>The logic identifier.</returns>
+        public static async System.Threading.Tasks.Task<List<Common.Logic>> ReadList(int sum)
+        {
+            return await System.Threading.Tasks.Task.Run(async () =>
+            {
+
+                var listLogic = new List<Common.Logic>();
+                bool @bool = false;
+                Action<string, string> action = (topic, data) =>
+                {
+                    var gatewayID = topic.Split('/')[0];
+                    var jObjectdata = JObject.Parse(data);
+                    if (jObjectdata == null)
+                    {
+                        return;
+                    }
+
+                    if (topic == $"{gatewayID}/Logic/GetAllLogicListInfo_Respon")
+                    {
+
+                        var logic = new Common.Logic();
+                        var Logicifon = jObjectdata["Data"];
+                        logic.LogicId = int.Parse(Logicifon["LogicId"].ToString());
+                        logic.IsEnable = int.Parse(Logicifon["IsEnable"].ToString());
+                        logic.LogicName = Logicifon["LogicName"].ToString();
+                        logic.Relationship = int.Parse(Logicifon["Relationship"].ToString());
+                        logic.TimeAttribute = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.TimeAttributeObj>(Logicifon["TimeAttribute"].ToString());
+                        logic.Conditions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(Logicifon["Conditions"].ToString());
+                        List<Dictionary<string, object>> listactions = new List<Dictionary<string, object>>();
+                        listactions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(Logicifon["Actions"].ToString());
+
+                        if (listactions != null)
+                        {
+                            foreach (var actions in listactions)
+                            {
+                                Dictionary<string, object> actionsdictionary = new Dictionary<string, object>();
+                                List<Dictionary<string, string>> tasklist = new List<Dictionary<string, string>>();
+                                if (actions["LinkType"].ToString() == "0")
+                                {
+                                    actionsdictionary.Add("LinkType", actions["LinkType"]);
+                                    actionsdictionary.Add("DeviceAddr", actions["DeviceAddr"]);
+                                    actionsdictionary.Add("Epoint", actions["Epoint"]);
+                                    actionsdictionary.Add("Time", actions["Time"]);
+                                    var list = JArray.Parse(actions["TaskList"].ToString());
+                                    foreach (var taskIfon in list)
+                                    {
+                                        Dictionary<string, string> dictionary = new Dictionary<string, string>();
+                                        dictionary.Add("TaskType", taskIfon["TaskType"].ToString());
+                                        dictionary.Add("Data1", taskIfon["Data1"].ToString());
+                                        dictionary.Add("Data2", taskIfon["Data2"].ToString());
+                                        tasklist.Add(dictionary);
+                                    }
+                                    actionsdictionary.Add("TaskList", tasklist);
+                                }
+                                else
+                                {
+                                    actionsdictionary = actions;
+                                }
+
+                                logic.Actions.Add(actionsdictionary);
+                            }
+
+                        }
+
+                        lock (listLogic)
+                        {
+                            var @null = listLogic.Find((o) => { return o.LogicId == logic.LogicId; });
+                            if (@null == null)
+                            {
+                                listLogic.Add(logic);
+                            }
+                        }
+
+                    }
+                    if (topic == $"{gatewayID}/Logic/AllLogicNum_Respon")
+                    {
+                        @bool = true;
+                    }
+                };
+                var mainGateWay = ZbGateway.MainGateWay;
+                if (mainGateWay == null)
+                {
+                    Console.WriteLine("娌℃湁涓荤綉鍏�");
+                    return listLogic;
+                }
+                mainGateWay.GwResDataAction += action;
+                try
+                {
+                    var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 2015 } };
+                    ZbGateway.MainGateWay?.Send("Logic/GetAllLogicListInfo", jObject.ToString());
+                }
+                catch { }
+                var dateTime = DateTime.Now;
+                while ((DateTime.Now - dateTime).TotalMilliseconds < 8 * 1000)
+                {
+                    await System.Threading.Tasks.Task.Delay(100);
+                    //if (sum == listLogic.Count)
+                    //{
+                    //    break;
+                    //}
+                    if (@bool)
+                    {
+                        break;
+                    }
+                }
+                ZbGateway.MainGateWay.GwResDataAction -= action;
+                return listLogic;
+            });
+        }
+        // <summary>
         /// 閫氳繃璁惧鎵惧埌鍖哄煙(鎴块棿)鍚嶇О
         /// </summary>
         /// <param name="btnregionname">Btnregionname.</param>
         /// <param name="device">Device.</param>
         public static void RoomNmae(Button btnregionname, CommonDevice device)
         {
-            var room = new Common.Room();
-            var roomlistname = room.GetRoomListNameByDevice(device);
-            if (roomlistname.Count == 0)
-            {
-                btnregionname.Text = Language.StringByID(R.MyInternationalizationString.customroom);
-            }
-            else
-            {
-                foreach (var roomname in roomlistname)
-                {
-                    btnregionname.Text += roomname + ",";
-                }
-                btnregionname.Text = btnregionname.Text.TrimEnd(',');
-            }
+            var room = new Common.Room();
+            btnregionname.Text = room.GetRoomNameByDevice(device);
         }
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SetDeviceState.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SetDeviceState.cs
index 7673c10..bd9932d 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SetDeviceState.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SetDeviceState.cs
@@ -32,6 +32,8 @@
                 //TextID = MyInternationalizationString.adddevice,
                 TextSize = 17,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                TextAlignment = TextAlignment.CenterLeft,
+                X = Application.GetRealWidth(150),
             };
             topFrameLayout.AddChidren (titleName);
 
@@ -107,7 +109,7 @@
             actionsInfo.Add("TaskList", taskListInfo);
             switch (common.Type)
             {
-                case DeviceType.ColorDimmableLight:
+                case DeviceType.DimmableLight:
                     {
                         #region  ----鍒濆鍖栬澶囧姛鑳芥暟鎹�----
                         //Dictionary<string, string> switchdictionary = new Dictionary<string, string>();
@@ -314,7 +316,7 @@
                                     }
                                     var intvalue = int.Parse(value["Data1"]);
                                     brightnessdictionary.Add("Data1", intvalue.ToString());
-                                    var lightbrightnessvalue = (intvalue * 100) / 254 + 1;
+                                    var lightbrightnessvalue = (intvalue * 100) / 254;
                                     Btnvelue.Text = lightbrightnessvalue.ToString() + "%";
                                     horizontalSeekBarVol.Progress = lightbrightnessvalue;
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs
index 738a676..ce9932e 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs
@@ -327,7 +327,6 @@
 
                 EventHandler<MouseEventArgs> timeclick = (sedner, e) =>
                 {
-
                     DelayView(middle, textvalue, TypeValue);
                 };
                 rowDelayType.MouseUpEventHandler += timeclick;
@@ -475,13 +474,11 @@
             };
 
             List<string> timetypelist = new List<string> {
-                
                 Language.StringByID(MyInternationalizationString.sunrise),
                 Language.StringByID(MyInternationalizationString.sunset),
                 Language.StringByID(MyInternationalizationString.noon),
                 Language.StringByID(MyInternationalizationString.logiccustom),
-
-            };
+               };
 
             foreach (var typename in timetypelist)
             {
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/AddDeviceList.cs b/ZigbeeApp/Shared/Phone/Device/Room/AddDeviceList.cs
index ba85ab2..f620b49 100755
--- a/ZigbeeApp/Shared/Phone/Device/Room/AddDeviceList.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/AddDeviceList.cs
@@ -11,6 +11,10 @@
             BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
             Tag = "categoryAddScene";
         }
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
+        }
         /// <summary>
         /// Show the specified room.
         /// </summary>
@@ -18,7 +22,19 @@
         public async void Show(Shared.Common.Room room)
         {
             #region topview
-            var topBGView = new FrameLayout()鈥�            {鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor鈥�            };鈥�            AddChidren(topBGView);鈥�            var topView = new FrameLayout()鈥�            {鈥�                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,鈥�            };鈥�            AddChidren(topView);
+            var topBGView = new FrameLayout()
+            {
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
+            };
+            AddChidren(topBGView);
+            var topView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+            };
+            AddChidren(topView);
 
             var title = new Button()
             {
@@ -31,7 +47,8 @@
             };
             topView.AddChidren(title);
 
-            var back = new Device.CommonForm.BackButton() { };鈥�            topView.AddChidren(back);
+            var back = new Device.CommonForm.BackButton() { };
+            topView.AddChidren(back);
             back.MouseUpEventHandler += (sender, e) =>
             {
                 this.RemoveFromParent();
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/AddDevicesSameTypeList.cs b/ZigbeeApp/Shared/Phone/Device/Room/AddDevicesSameTypeList.cs
index 1814b85..a4158c2 100755
--- a/ZigbeeApp/Shared/Phone/Device/Room/AddDevicesSameTypeList.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/AddDevicesSameTypeList.cs
@@ -40,6 +40,11 @@
             Tag = "categoryAddScene";
         }
 
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
+        }
+
         #endregion
 
         #region 鈼� 鏄剧ず鐣岄潰_________________________
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/AddDevieDetailFromAddFunction.cs b/ZigbeeApp/Shared/Phone/Device/Room/AddDevieDetailFromAddFunction.cs
index 1a98c9d..b1f47c2 100755
--- a/ZigbeeApp/Shared/Phone/Device/Room/AddDevieDetailFromAddFunction.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/AddDevieDetailFromAddFunction.cs
@@ -263,7 +263,7 @@
             };
             sharedFL.AddChidren(sharedLine);
 
-            var confirmBtn = new Device.CommonForm.CompleteButton()
+            var confirmBtn = new Device.CommonForm.CompleteButton(1,2,3)
             {
                 TextID = R.MyInternationalizationString.ConfirmAdd,
             };
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/AddRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/AddRoom.cs
index a6d5baf..09d68bd 100755
--- a/ZigbeeApp/Shared/Phone/Device/Room/AddRoom.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/AddRoom.cs
@@ -290,7 +290,8 @@
             };
             settingContentFL.AddChidren(settingLine);
 
-            confirm = new Device.CommonForm.CompleteButton() { };
+            confirm = new Device.CommonForm.CompleteButton(1700, 700, 90);
+            confirm.SetTitle(R.MyInternationalizationString.Confrim);
             this.AddChidren(confirm);
             #endregion
 
@@ -448,6 +449,7 @@
                     if (room.BackgroundImageType == 1 || room.BackgroundImageType == 2)
                     {
                         OldBackgroundImagePath = room.BackgroundImage;
+                        System.IO.File.Delete(OldBackgroundImagePath);
                     }
                     backGround.UnSelectedImagePath = $"RoomPicture{tradeTime}.png";
                     //room.BackgroundImage = $"{Config.Instance.HomeId}/{backGround.UnSelectedImagePath}";
@@ -469,6 +471,7 @@
                     if (room.BackgroundImageType == 1 || room.BackgroundImageType == 2)
                     {
                         OldBackgroundImagePath = room.BackgroundImage;
+                        System.IO.File.Delete(OldBackgroundImagePath);
                     }
                     backGround.UnSelectedImagePath = $"RoomPicture{tradeTime}.png";
                     //room.BackgroundImage = $"{Config.Instance.HomeId}/{backGround.UnSelectedImagePath}";
@@ -576,7 +579,7 @@
                 if (IconType == 1 || IconType == 2)
                 {
                     room.MoveBackGroundIamageFileToDirectory(backGround.UnSelectedImagePath, backGround.UnSelectedImagePath);
-                    room.BackgroundImage = $"{Config.Instance.FullPath}/{backGround.UnSelectedImagePath}";
+                    room.BackgroundImage = $"{Config.Instance.Guid}/{Config.Instance.HomeId}/{backGround.UnSelectedImagePath}";
                 }
                 else
                 {
@@ -611,7 +614,7 @@
                     if (IconType == 1 || IconType == 2)
                     {
                         room.MoveBackGroundIamageFileToDirectory(backGround.UnSelectedImagePath, backGround.UnSelectedImagePath);
-                        room.BackgroundImage = $"{Config.Instance.FullPath}/{backGround.UnSelectedImagePath}";
+                        room.BackgroundImage = $"{Config.Instance.Guid}/{Config.Instance.HomeId}/{backGround.UnSelectedImagePath}";
                     }
                     else
                     {
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/AddRoomContent.cs b/ZigbeeApp/Shared/Phone/Device/Room/AddRoomContent.cs
index 0744335..e3409b6 100755
--- a/ZigbeeApp/Shared/Phone/Device/Room/AddRoomContent.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/AddRoomContent.cs
@@ -59,6 +59,10 @@
             instance = this;
         }
 
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
+        }
         #endregion
 
         #region 鈼� 鏄剧ず瑙嗗浘_________________________
@@ -70,7 +74,19 @@
         {
             CurrentRoom = room;
             #region topview
-            var topBGView = new FrameLayout()鈥�            {鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor鈥�            };鈥�            AddChidren(topBGView);鈥�            var topView = new FrameLayout()鈥�            {鈥�                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,鈥�            };鈥�            AddChidren(topView);
+            var topBGView = new FrameLayout()
+            {
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
+            };
+            AddChidren(topBGView);
+            var topView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+            };
+            AddChidren(topView);
 
             var title = new Button()
             {
@@ -83,7 +99,8 @@
             };
             topView.AddChidren(title);
 
-            var back = new Device.CommonForm.BackButton() { };鈥�            topView.AddChidren(back);
+            var back = new Device.CommonForm.BackButton() { };
+            topView.AddChidren(back);
             back.MouseUpEventHandler += (sender, e) =>
             {
                 this.RemoveFromParent();
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/AddRoomScene.cs b/ZigbeeApp/Shared/Phone/Device/Room/AddRoomScene.cs
index 5d8ad41..c2f1066 100755
--- a/ZigbeeApp/Shared/Phone/Device/Room/AddRoomScene.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/AddRoomScene.cs
@@ -137,10 +137,10 @@
                             tList.Add($"{i} {Language.StringByID(R.MyInternationalizationString.Second)}");
                         }
                         //1-60绉�
-                        PickerView.Show(tList, (obj) =>
-                        {
-                            targetDevice.DelayTime = int.Parse(tList[obj].Split(' ')[0]);
-                        }, 0, "", Language.StringByID(R.MyInternationalizationString.Confrim));
+                        //PickerView.Show(tList, (obj) =>
+                        //{
+                        //    targetDevice.DelayTime = int.Parse(obj.Split(' ')[0]);
+                        //}, Language.StringByID(R.MyInternationalizationString.Confrim));
                     };
                     devRight.MouseUpEventHandler += (sender, e) =>
                     {
@@ -236,7 +236,19 @@
         {
             CurrentRoom = room;
             #region topview
-            var topBGView = new FrameLayout()鈥�            {鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor鈥�            };鈥�            AddChidren(topBGView);鈥�            var topView = new FrameLayout()鈥�            {鈥�                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),鈥�                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),鈥�                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,鈥�            };鈥�            AddChidren(topView);
+            var topBGView = new FrameLayout()
+            {
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor
+            };
+            AddChidren(topBGView);
+            var topView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(CommonPage.NavigationTitle_Y),
+                Height = Application.GetRealHeight(CommonPage.Navigation_Height - CommonPage.NavigationTitle_Y),
+                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+            };
+            AddChidren(topView);
 
             var title = new Button()
             {
@@ -249,7 +261,16 @@
             };
             topView.AddChidren(title);
 
-            var back = new Button()鈥�            {鈥�                X = Application.GetRealWidth(CommonPage.Navigation_X),鈥�                Height = Application.GetMinRealAverage(110),鈥�                Width = Application.GetMinRealAverage(110),鈥�                UnSelectedImagePath = "Item/Back.png",鈥�                SelectedImagePath = "Item/BackSelected.png",鈥�                Gravity = Gravity.CenterVertical鈥�            };鈥�            topView.AddChidren(back);
+            var back = new Button()
+            {
+                X = Application.GetRealWidth(CommonPage.Navigation_X),
+                Height = Application.GetMinRealAverage(110),
+                Width = Application.GetMinRealAverage(110),
+                UnSelectedImagePath = "Item/Back.png",
+                SelectedImagePath = "Item/BackSelected.png",
+                Gravity = Gravity.CenterVertical
+            };
+            topView.AddChidren(back);
             back.MouseUpEventHandler += (sender, e) =>
             {
                 this.RemoveFromParent();
@@ -370,46 +391,44 @@
                 Y = zoneFL.Bottom,
                 Height = Application.GetRealHeight(170),
             };
-            midFL.AddChidren(targetFL);
-            var targetTip = new Button()
+
+            var targetAddFL = new FrameLayout()
             {
-                X = Application.GetRealWidth(50),
-                Height = Application.GetRealHeight(70),
-                Width = Application.GetRealWidth(300),
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 12,
-                TextColor = ZigbeeColor.Current.GXCButtonTipColor,
-                //TextID = R.MyInternationalizationString.BelongModel,
+                Y = zoneFL.Bottom,
+                Height = Application.GetRealHeight(170),
             };
-            //targetFL.AddChidren(targetTip);
+            midFL.AddChidren(targetFL);
+           
             var target = new Button()
             {
                 X = Application.GetRealWidth(50),
-                //Y = deviceNameTip.Bottom,
                 Height = Application.GetRealHeight(100) - 1,
                 Width = Application.GetRealWidth(500),
                 TextAlignment = TextAlignment.CenterLeft,
                 TextSize = 20,
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                TextID=R.MyInternationalizationString.AddRoomScentTargetAction,
+                TextID=R.MyInternationalizationString.AddScentTargetAction,
                 Gravity=Gravity.CenterVertical
             };
-            targetFL.AddChidren(target);
+            targetAddFL.AddChidren(target);
             var targetAdd = new Device.CommonForm.SelectedStatuButton()
             {
                 X = Application.GetRealWidth(CommonPage.AppRealWidth - 150),
-                Width = Application.GetMinRealAverage(110),
-                Height = Application.GetMinRealAverage(110),
+                Width = Application.GetMinRealAverage(72),
+                Height = Application.GetMinRealAverage(72),
                 UnSelectedImagePath = "Item/Add.png",
                 SelectedImagePath="Item/AddSelected.png",
                 Gravity = Gravity.CenterVertical
             };
             targetFL.AddChidren(targetAdd);
+
             var targetLine = new Button()
             {
                 Y = targetFL.Height-1,
                 Height = 1,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
+                Width=Application.GetRealWidth(965),
+                Gravity=Gravity.CenterHorizontal,
+                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2
             };
             targetFL.AddChidren(targetLine);
 
@@ -422,7 +441,7 @@
             };
             midFL.AddChidren(TargetListScrolView);
 
-            confirmBtn = new CommonForm.CompleteButton()
+            confirmBtn = new CommonForm.CompleteButton(1,2,3)
             {
                 TextID = R.MyInternationalizationString.ConfirmAdd,
             };
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/AddRoomSelectPicByLocal.cs b/ZigbeeApp/Shared/Phone/Device/Room/AddRoomSelectPicByLocal.cs
index 4df2296..39cc2e4 100755
--- a/ZigbeeApp/Shared/Phone/Device/Room/AddRoomSelectPicByLocal.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/AddRoomSelectPicByLocal.cs
@@ -9,6 +9,10 @@
         {
             BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
         }
+        public override void RemoveFromParent()
+        {
+            base.RemoveFromParent();
+        }
         public void Show()
         {
             ShowPic();
@@ -21,7 +25,7 @@
             var title = new Button()
             {
                 TextAlignment = TextAlignment.Center,
-                TextID = R.MyInternationalizationString.SelectPic,
+                //TextID = R.MyInternationalizationString.SelectPic,
                 TextSize = 20,
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                 Width = Application.GetRealWidth(500),
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs b/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs
index 3b2ff1a..a70a7cd 100755
--- a/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs
@@ -1,24 +1,100 @@
 锘縰sing System;
 using Shared.Common;
+using Shared.Phone.Device.CommonForm;
+
 namespace Shared.Phone.Device.Room
 {
 
     public class RoomManagement : FrameLayout
     {
-        public  Action action;
+
+        #region 鈼� 鍙橀噺____________________________
+        /// <summary>
+        /// bodyFrameLayout
+        /// </summary>
+        private FrameLayout bodyFrameLayout;
+
+        #endregion
+
+
+        public Action action;
+
+
+        public override void RemoveFromParent()
+        {
+            //鏇存柊鐣岄潰
+            action?.Invoke();
+            base.RemoveFromParent();
+        }
         /// <summary>
         /// 鎴块棿绠$悊
         /// </summary>
         public void Show()
         {
-            RoomPage();
+            AddTop();
+
+            AddBodyView();
         }
-        public override void RemoveFromParent()
+
+        #region Add____________________________________
+
+        /// <summary>
+        /// AddTop
+        /// </summary>
+        public void AddTop()
         {
-            //鏇存柊鐣岄潰
-            action();
-            base.RemoveFromParent();
+            var top = new TopFrameLayout();
+            AddChidren(top);
+            top.InitTopview();
+            top.SetTopTitle(R.MyInternationalizationString.RoomList);
+            top.backButton.MouseUpEventHandler += (sender, e) =>
+            {
+                RemoveFromParent();
+            };
+
+            var addRoomItemBtn = new Device.CommonForm.SelectedStatuButton()
+            {
+                X = Application.GetRealWidth(1080 - 150),
+                Width = Application.GetMinRealAverage(100),
+                Height = Application.GetMinRealAverage(100),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Item/Add.png",
+                SelectedImagePath = "Item/AddSelected.png"
+            };
+            top.AddChidren(addRoomItemBtn);
+
+            addRoomItemBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                var addRoom = new AddRoom();
+                UserView.HomePage.Instance.AddChidren(addRoom);
+                UserView.HomePage.Instance.PageIndex += 1;
+                addRoom.action = () =>
+                {
+                    Show();
+                };
+                AddRoom.OldBackgroundImagePath = string.Empty;
+                addRoom.Show("");
+            };
         }
+
+        /// <summary>
+        /// AddBodyView
+        /// </summary>
+        public void AddBodyView()
+        {
+            RemoveAll();
+            bodyFrameLayout = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(184),
+                Height = Application.GetRealHeight(1737),
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
+            };
+            AddChidren(bodyFrameLayout);
+
+        }
+
+        #endregion
+
         /// <summary>
         /// 鎴块棿绠$悊鐣岄潰
         /// </summary>
@@ -163,9 +239,15 @@
 
                 var delBtn = new Shared.Phone.Device.CommonForm.RowLayoutDeleteButton();
                 //绗竴涓槸鎴块棿鍠滅埍锛屼笉鍏佽婊戝姩鍒犻櫎  鍒嗕韩杩囨潵鐨勪篃涓嶅厑璁稿垹闄�
-                if (!room.IsLove || !room.IsSharedRoom){
+                if (room.IsLove || room.IsSharedRoom)
+                {
+
+                }
+                else
+                {
                     roomRowView.AddRightView(delBtn);
                 }
+
                 //鍒犻櫎浣忓畢
                 delBtn.MouseUpEventHandler += (sender, e) =>
                 {
@@ -203,6 +285,8 @@
                 };
 
             }
+
+
         }
     }
 }
\ No newline at end of file
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/DeviceTypePictrueImageEnum.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/DeviceTypePictrueImageEnum.cs
index e77c1f6..8d08705 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/DeviceTypePictrueImageEnum.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/DeviceTypePictrueImageEnum.cs
@@ -100,6 +100,18 @@
         /// 閽ュ寵鎵�
         /// </summary>
         Sensor_Keyfob = -1307,
+        /// <summary>
+        /// 娓╂箍搴︿紶鎰熷櫒
+        /// </summary>
+        Sensor_TemperatrueHumidity = -1308,
+        /// <summary>
+        /// 娓╁害浼犳劅鍣�
+        /// </summary>
+        Sensor_Temperatrue = -1309,
+        /// <summary>
+        /// 婀垮害浼犳劅鍣�
+        /// </summary>
+        Sensor_Humidity = -1310,
 
         //=========鈽呪槄缁х數鍣ㄧ被(2300-2499)鈽呪槄=========
         /// <summary>
@@ -235,6 +247,18 @@
         /// <summary>
         /// 褰╃伅
         /// </summary>
-        A褰╃伅 = 9
+        A褰╃伅 = 9,
+        /// <summary>
+        /// 娓╂箍搴︿紶鎰熷櫒
+        /// </summary>
+        A娓╂箍搴︿紶鎰熷櫒 = 10,
+        /// <summary>
+        /// 娓╁害浼犳劅鍣�
+        /// </summary>
+        A娓╁害浼犳劅鍣� = 11,
+        /// <summary>
+        /// 婀垮害浼犳劅鍣�
+        /// </summary>
+        A婀垮害浼犳劅鍣� = 12
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/SelectDeviceForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/SelectDeviceForm.cs
index a80ef6f..a74a7a7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/SelectDeviceForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/SelectDeviceForm.cs
@@ -80,7 +80,7 @@
             bodyFrameLayout.AddChidren(listView);
 
             //娣诲姞鎵�鏈夎澶囪
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 Application.RunOnMainThread(() =>
                 {
@@ -99,8 +99,7 @@
                         listView.Height = realHeight;
                     }
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/SelectRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/SelectRoomForm.cs
index ac69ffe..3532a55 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/SelectRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/SelectRoomForm.cs
@@ -58,7 +58,7 @@
         /// </summary>
         private void AddAllRoomRow()
         {
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 foreach (Common.Room room in Common.Room.Lists)
                 {
@@ -72,8 +72,7 @@
                         this.AddRoomRow(room);
                     });
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
index 3912540..24756d1 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
@@ -169,7 +169,7 @@
         /// <summary>
         /// 鎴块棿鍚嶇О
         /// </summary>
-        public List<string> listRoomName = new List<string>();
+        public string RoomName = string.Empty;
         /// <summary>
         /// 璁惧鐨勬墦寮�鐘舵��
         /// </summary>
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 74b9849..4319b59 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs
@@ -124,7 +124,23 @@
             }
             if (CanClick == true)
             {
-                this.ButtonClickEvent?.Invoke(this, e);
+                //Log鍑哄姏
+                this.WriteLog();
+
+                try
+                {
+                    this.ButtonClickEvent?.Invoke(this, e);
+                }
+                catch (Exception ex)
+                {
+                    //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
+                    var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
+                    alert.Show();
+                    //Log鍑哄姏
+                    string msg = ex.Message + "\r\n";
+                    msg += ex.TargetSite.ToString();
+                    HdlLogLogic.Current.WriteLog(-1, msg);
+                }
             }
         }
 
@@ -218,6 +234,68 @@
             return Application.GetRealWidth(realWidth);
         }
 
+        /// <summary>
+        /// 娣诲姞搴曢儴闃村奖鐗规晥(纭繚鎷ユ湁鐖舵帶浠跺悗鎵嶈皟鐢�)
+        /// </summary>
+        public void AddBottomShadow()
+        {
+            var btnShadow = new PicViewControl(this.Width, Application.GetMinRealAverage(45), false);
+            btnShadow.X = this.X;
+            btnShadow.Y = this.Bottom - 1;
+            btnShadow.UnSelectedImagePath = "Item/BottomShadow.png";
+            this.Parent.AddChidren(btnShadow);
+        }
+
+        #endregion
+
+        #region 鈻� Log鍑哄姏____________________________
+
+        /// <summary>
+        /// 璇ユ帶浠舵墍灞炵殑鐣岄潰鍚嶅瓧
+        /// </summary>
+        private string formName = null;
+        /// <summary>
+        /// 鎺т欢鍚嶅瓧
+        /// </summary>
+        private string controlName = null;
+
+        /// <summary>
+        /// Log鍑哄姏
+        /// </summary>
+        private void WriteLog()
+        {
+            if (formName == null)
+            {
+                formName = string.Empty;
+                View myView = this.Parent;
+                for (; ; )
+                {
+                    if (myView == null)
+                    {
+                        break;
+                    }
+                    else if (myView is CommonFormBase)
+                    {
+                        //杩欎釜鎺т欢鎵�灞炵殑鐣岄潰
+                        formName = ((CommonFormBase)myView).FormID;
+                        break;
+                    }
+                    myView = myView.Parent;
+                }
+                if (string.IsNullOrEmpty(this.Text) == false)
+                {
+                    //杩欎釜鎺т欢鐨勬枃鏈�
+                    controlName = this.Text;
+                }
+                else
+                {
+                    //濡傛灉娌℃湁鏂囨湰鐨勮瘽,瀹冨簲璇ユ槸涓�寮犲浘鐗�
+                    controlName = this.UnSelectedImagePath;
+                }
+            }
+            HdlLogLogic.Current.WriteLog(1, formName + "鐨刐" + controlName + "]鎸夐敭琚偣鍑�");
+        }
+
         #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/ClickButtonCommon.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/ClickButtonCommon.cs
index 27f699f..514060f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/ClickButtonCommon.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/ClickButtonCommon.cs
@@ -73,7 +73,7 @@
             //璁剧疆鐐瑰嚮鍚庣殑鐘舵��
             this.SetClickStatu();
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 System.Threading.Thread.Sleep(ControlCommonResourse.StatuChangedWaitTime);
                 Application.RunOnMainThread(() =>
@@ -86,8 +86,7 @@
                     //璁剧疆闈炵偣鍑诲悗鐨勭姸鎬�
                     this.SetNotClickStatu();
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/IconControlCommon.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/IconControlCommon.cs
index cebfbe2..64a0020 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/IconControlCommon.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/IconControlCommon.cs
@@ -54,7 +54,7 @@
             //璁剧疆澶勪簬閫夋嫨鐘舵�佹椂,鏄剧ず鐨勫浘鏍�
             this.SetSelectPictrue();
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 System.Threading.Thread.Sleep(ControlCommonResourse.StatuChangedWaitTime);
                 Application.RunOnMainThread(() =>
@@ -62,8 +62,7 @@
                     //璁剧疆澶勪簬闈為�夋嫨鐘舵�佹椂,鏄剧ず鐨勫浘鏍�
                     this.SetUnSelectPictrue();
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/BelongAreaControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/BelongAreaControl.cs
new file mode 100755
index 0000000..9b4ae07
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/BelongAreaControl.cs
@@ -0,0 +1,223 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+    /// <summary>
+    /// 鎵�灞炲尯鍩熺殑鎺т欢
+    /// </summary>
+    public class BelongAreaControl : FrameRowControl
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 閫夋嫨鎴块棿鐨勪簨浠�(鎴块棿涓婚敭)
+        /// </summary>
+        public Action<string> SelectRoomEvent = null;
+        /// <summary>
+        /// 褰撳墠閫夋嫨鐨勬埧闂寸殑涓婚敭(妤煎眰涓婚敭鍙互鏃犺)
+        /// </summary>
+        public string RoomKey = string.Empty;
+        /// <summary>
+        /// 褰撳墠閫夋嫨鐨勬ゼ灞備富閿�(娌″繀瑕佸叕寮�鍑哄幓)
+        /// </summary>
+        private string FloorKey = string.Empty;
+        /// <summary>
+        /// 妤煎眰鍒楄〃鍚嶅瓧
+        /// </summary>
+        private List<string> listFloorName = new List<string>();
+        /// <summary>
+        /// 妤煎眰鍒楄〃涓婚敭
+        /// </summary>
+        private List<string> listFloorKeys = new List<string>();
+        /// <summary>
+        /// 鎴块棿鍚嶅瓧
+        /// </summary>
+        private List<List<string>> listRoomName = new List<List<string>>();
+        /// <summary>
+        /// 鎴块棿涓婚敭
+        /// </summary>
+        private List<List<string>> listRoomKeys = new List<List<string>>();
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鎵�灞炲尯鍩熺殑鎺т欢
+        /// </summary>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        public BelongAreaControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
+        {
+            //鍒濆鍖栨暟鎹�
+            this.InitData();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栨帶浠�(閽堝鐨勬槸鍥炶矾)
+        /// </summary>
+        /// <param name="i_caption">鏍囬鏂囨湰</param>
+        /// <param name="i_device">璁惧瀵硅薄</param>
+        public void InitControl(string i_caption, ZigBee.Device.CommonDevice i_device)
+        {
+            var room = Common.Room.CurrentRoom.GetRoomByDevice(i_device);
+            this.InitControl(i_caption, room);
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栨帶浠�(閽堝鐨勬槸鏁翠釜璁惧)
+        /// </summary>
+        /// <param name="i_caption">鏍囬鏂囨湰</param>
+        /// <param name="i_listDevice">璁惧瀵硅薄</param>
+        public void InitControl(string i_caption, List<ZigBee.Device.CommonDevice> i_listDevice)
+        {
+            var room = Common.Room.CurrentRoom.GetRoomById(i_listDevice[0].DeviceRoomId);
+            this.InitControl(i_caption, room);
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栨帶浠�
+        /// </summary>
+        /// <param name="i_caption"></param>
+        /// <param name="i_Room"></param>
+        private void InitControl(string i_caption, Common.Room i_Room)
+        {
+            if (i_Room == null)
+            {
+                //鏈垎閰嶅尯鍩�
+                this.InitControl(i_caption, Language.StringByID(R.MyInternationalizationString.uDeviceNotAssignedRoom), false);
+            }
+            else
+            {
+                string roomName = i_Room.Name;
+                this.RoomKey = i_Room.Id;
+                this.FloorKey = i_Room.FloorId;
+                if (Common.Config.Instance.Home.FloorDics.ContainsKey(i_Room.FloorId) == true)
+                {
+                    //妤煎眰+鎴块棿
+                    roomName = Common.Config.Instance.Home.FloorDics[i_Room.FloorId] + " " + roomName;
+                }
+                this.InitControl(i_caption, roomName, i_Room.IsSharedRoom);
+            }
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栨帶浠�
+        /// </summary>
+        /// <param name="i_caption">鏍囬鏂囨湰</param>
+        /// <param name="i_RoomName">鎴块棿鍚嶅瓧</param>
+        /// <param name="IsSharedRoom">鎴块棿鏄惁鏄垎浜殑</param>
+        private void InitControl(string i_caption, string i_RoomName, bool IsSharedRoom)
+        {
+            //鏍囬
+            var btnCaption = new NormalViewControl(270, 58, true);
+            btnCaption.X = ControlCommonResourse.XXLeft;
+            btnCaption.Gravity = Gravity.CenterVertical;
+            btnCaption.Text = i_caption + "锛�";
+            this.AddChidren(btnCaption, ChidrenBindMode.BindEventOnly);
+
+            //鏄剧ず妗�
+            var txtView = new NormalViewControl(700, true);
+            txtView.X = Application.GetRealWidth(294);
+            txtView.Gravity = Gravity.CenterVertical;
+            txtView.TextColor = UserCenterColor.Current.TextGrayColor1;
+            txtView.Text = i_RoomName;
+            this.AddChidren(txtView, ChidrenBindMode.BindEventOnly);
+
+            if (chidrenYaxis != 0)
+            {
+                btnCaption.Y += chidrenYaxis;
+                txtView.Y += chidrenYaxis;
+            }
+
+            if (IsSharedRoom == true || this.listFloorKeys.Count == 0)
+            {
+                //濡傛灉杩欎釜璁惧浣嶄簬鍒嗕韩鐨勬埧闂�,鎴栬�呮牴鏈氨娌℃湁鍒涘缓鎴块棿锛屽垯涓嶅厑璁告洿鏀�
+                this.UseClickStatu = false;
+                return;
+            }
+            //鍙崇澶�
+            this.AddRightArrow();
+
+            this.ButtonClickEvent += (sender, e) =>
+            {
+                //鍖哄煙閫夋嫨
+                this.ShowSelectRoom(txtView, i_caption);
+            };
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栨暟鎹�
+        /// </summary>
+        private void InitData()
+        {
+            var dicFloor = Common.Room.CurrentRoom.GetFloorSortList();
+            foreach (string fKeys in dicFloor.Keys)
+            {
+                var listRoom = Common.Room.CurrentRoom.GetFloorSortRoom(fKeys, false);
+                if (listRoom.Count > 0)
+                {
+                    //妤煎眰鍚嶅瓧鍜屼富閿敹闆�
+                    this.listFloorKeys.Add(fKeys);
+                    this.listFloorName.Add(dicFloor[fKeys]);
+                    //鎴块棿鍚嶅瓧鍜屼富閿敹闆�
+                    var listName = new List<string>();
+                    var listKeys = new List<string>();
+                    foreach (var myRoom in listRoom)
+                    {
+                        listName.Add(myRoom.Name);
+                        listKeys.Add(myRoom.Id);
+                    }
+                    listRoomName.Add(listName);
+                    listRoomKeys.Add(listKeys);
+                }
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 鍖哄煙閫夋嫨___________________________
+
+        /// <summary>
+        /// 鍖哄煙閫夋嫨
+        /// </summary>
+        /// <param name="txtView"></param>
+        /// <param name="i_caption"></param>
+        private void ShowSelectRoom(NormalViewControl txtView, string i_caption)
+        {
+            int index1 = this.listFloorKeys.IndexOf(FloorKey);
+            if (index1 == -1) { index1 = 0; }
+            int index2 = this.listRoomKeys[index1].IndexOf(RoomKey);
+            if (index2 == -1) { index2 = 0; }
+
+            PickerView.ShowSecondary(this.listFloorName, this.listRoomName, (value1, value2) =>
+            {
+                //妤煎眰+鎴块棿
+                txtView.Text = this.listFloorName[value1] + " " + this.listRoomName[value1][value2];
+                FloorKey = this.listFloorKeys[value1];
+                RoomKey = this.listRoomKeys[value1][value2];
+                this.SelectRoomEvent?.Invoke(RoomKey);
+
+            }, index1, index2, i_caption,
+            Language.StringByID(R.MyInternationalizationString.uFinish),
+            Language.StringByID(R.MyInternationalizationString.uCancel));
+        }
+
+        #endregion
+
+        #region 鈻� 鎺т欢鎽ф瘉___________________________
+
+        /// <summary>
+        /// 鎺т欢鎽ф瘉
+        /// </summary>
+        public override void RemoveFromParent()
+        {
+            this.SelectRoomEvent = null;
+
+            base.RemoveFromParent();
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/InformationEditorControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/InformationEditorControl.cs
new file mode 100755
index 0000000..a1b5606
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/InformationEditorControl.cs
@@ -0,0 +1,78 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+    /// <summary>
+    /// 淇℃伅缂栬緫鎺т欢(涓嶅缓璁埆浜轰娇鐢�)
+    /// </summary>
+    public class InformationEditorControl
+    {
+        /// <summary>
+        /// 鍒濆鍖栨帶浠�(杩斿洖鐨勬槸淇℃伅瀹瑰櫒鎺т欢)
+        /// </summary>
+        /// <param name="bodyFrameLayout">bodyFrameLayout</param>
+        /// <param name="title">鏍囬鏂囨湰</param>
+        /// <param name="Y">bodyFrameLayout閲岄潰鐨刌杞村潗鏍�</param>
+        /// <param name="Height">钃濇箹UI閲岄潰瀹冪殑楂樺害</param>
+        /// <returns>淇℃伅瀹瑰櫒鎺т欢</returns>
+        public VerticalListControl InitControl(FrameLayout bodyFrameLayout, string title, int Y, int Height)
+        {
+            //寮у害鐨勫渾鐨勪竴鍗婄殑楂樺害(鍥哄畾)
+            int halfRoundHeigth = Application.GetRealHeight(116) / 2;
+            //寮у害鐨勫渾
+            var btnRound = new NormalViewControl(bodyFrameLayout.Width, halfRoundHeigth * 2, false);
+            btnRound.Y = Application.GetRealHeight(Y);
+            btnRound.BackgroundColor = UserCenterColor.Current.White;
+            btnRound.Radius = (uint)halfRoundHeigth;
+            bodyFrameLayout.AddChidren(btnRound);
+            //鏄庣粏鍒楄〃鐨勬甯冿紝鐧借壊鑳屾櫙(瑕嗙洊寮у害鐨勫渾鐨勫崐杈�)
+            var detailBackFrame = new FrameLayout();
+            detailBackFrame.Y = btnRound.Bottom - btnRound.Height / 2;
+            detailBackFrame.Height = Application.GetRealHeight(Height);//楂樺害灏辨槸瑕佸畠瓒呰繃
+            detailBackFrame.BackgroundColor = UserCenterColor.Current.White;
+            bodyFrameLayout.AddChidren(detailBackFrame);
+
+            //淇℃伅缂栬緫
+            var btnTile = new NormalViewControl(800, 60, true);
+            btnTile.X = ControlCommonResourse.XXLeft;
+            btnTile.TextSize = 15;
+            btnTile.TextColor = UserCenterColor.Current.TextColor2;
+            btnTile.Text = title;
+            detailBackFrame.AddChidren(btnTile);
+
+            var listview = new VerticalListControl(12);
+            listview.Y = btnTile.Bottom + Application.GetRealHeight(17);
+            listview.Height = Application.GetRealHeight(Height) - halfRoundHeigth - btnTile.Bottom - Application.GetRealHeight(17);
+            detailBackFrame.AddChidren(listview);
+
+            return listview;
+        }
+
+        /// <summary>
+        /// 瀹屾垚鍒濆鍖�(褰撹鏁板鐨勬椂鍊�,杩欎釜鍑芥暟寰堟湁鐢ㄣ�傝鏁颁笉瓒呰繃瀹瑰櫒鏃讹紝璋冧笉璋冪敤杩欎釜鍑芥暟閮芥病浜�)
+        /// </summary>
+        /// <param name="bodyFrameLayout">bodyFrameLayout</param>
+        /// <param name="listview">瀹瑰櫒鎺т欢</param>
+        public void FinishInitControl(FrameLayout bodyFrameLayout, VerticalListControl listview)
+        {
+            var btnFinish = new BottomClickButton();
+            //鍊熺敤Y杞村潗鏍�(璁╄繖涓尯鍩熶笉鑳界偣鍑昏彍鍗�)
+            var frameBack = new FrameLayout();
+            frameBack.Y = btnFinish.Yaxis;
+            frameBack.Height = bodyFrameLayout.Height - btnFinish.Yaxis;
+            bodyFrameLayout.AddChidren(frameBack);
+
+            var realHeight = listview.GetChildren(0).Height * listview.ChildrenCount;
+            if (bodyFrameLayout.Height - btnFinish.Yaxis + realHeight > listview.Height)
+            {
+                //淇冧娇琚尅浣忕殑鑿滃崟鑳藉鍚戜笂婊戝姩
+                var frameTemp = new FrameLayout();
+                frameTemp.Height = frameBack.Height + Application.GetRealHeight(115);
+                listview.AddChidren(frameTemp);
+            }
+            btnFinish = null;
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SearchEditText.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SearchEditText.cs
index 68a9da2..47a9c79 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SearchEditText.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SearchEditText.cs
@@ -150,7 +150,7 @@
         /// </summary>
         private void StartSearchKeysThead()
         {
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (this.Parent != null)
                 {
@@ -176,8 +176,7 @@
                     //濡傛灉褰撳墠鐨勬绱㈤敭鍊间笌涓嬩竴涓绱㈤敭鍊间笉涓�鏍风殑璇�
                     //閭e氨璇存槑锛岀敤鎴峰啀娆¤緭鍏ヤ簡閿�硷紝杩欎釜鏃跺�欙紝璁╃嚎绋嬬户缁窇涓嬪幓
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
         #endregion
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DialogInputFrameControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DialogInputFrameControl.cs
index ddf2ab9..2e11d1d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DialogInputFrameControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DialogInputFrameControl.cs
@@ -14,9 +14,9 @@
         #region 鈻� 鍙橀噺澹版槑___________________________
 
         /// <summary>
-        /// 涓婇儴鑿滃崟鏍囬鐨勯珮搴�
+        /// 鑿滃崟鏍囬鐨勯珮搴�
         /// </summary>
-        public int topMenuHeight = 190;
+        public int topTitleHeight = 63;
         /// <summary>
         /// 鎸夐挳鐨勯珮搴�
         /// </summary>
@@ -24,19 +24,15 @@
         /// <summary>
         /// 杈撳叆妗嗙殑瀹藉害
         /// </summary>
-        public int InputControlWidth = 800;
+        public int InputControlWidth = 677;
         /// <summary>
-        /// 纭鎸夐挳浜嬩欢
+        /// 纭鎸夐挳浜嬩欢(鐢盩ext鑾峰彇杈撳叆鍊�,None妯″紡闄ゅ)
         /// </summary>
-        public delegate void _ComfirmClickEvent();
-        /// <summary>
-        /// 鐢婚潰鍏抽棴浜嬩欢(鐢盜nputText鑾峰彇杈撳叆鍊�,None妯″紡闄ゅ)
-        /// </summary>
-        public _ComfirmClickEvent ComfirmClickEvent;
+        public Action<string> ComfirmClickEvent;
         /// <summary>
         /// 杈撳叆妗嗙殑鏂囨湰淇℃伅
         /// </summary>
-        public string InputText
+        public string Text
         {
             get
             {
@@ -94,15 +90,14 @@
             {
                 mainFrame.AddChidren(this);
                 //鍒濆鍖栨甯冩帶浠�
-                this.InitframeControl(this.dialogFrameMode);
+                this.InitframeControl();
             }
         }
 
         /// <summary>
         /// 鍒濆鍖栨甯冩帶浠�
         /// </summary>
-        /// <param name="i_dialogFrameMode">绐椾綋妯″紡</param>
-        public void InitframeControl(DialogFrameMode i_dialogFrameMode)
+        public void InitframeControl()
         {
             if (this.frameLayout != null)
             {
@@ -114,48 +109,42 @@
             }
 
             //杩欐槸涓�涓
-            //this.frameLayout = new SpecialFrameLayout(960, 620, buttonHeight);
             this.frameLayout = new FrameLayout();
-            frameLayout.Height = Application.GetRealHeight(620);
-            frameLayout.Width = Application.GetRealWidth(960);
+            frameLayout.Height = Application.GetRealHeight(538);
+            frameLayout.Width = Application.GetRealWidth(792);
             frameLayout.Gravity = Gravity.Center;
-            frameLayout.Radius = 5;
-            frameLayout.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
+            frameLayout.Radius = 6;
+            frameLayout.BackgroundColor = UserCenterColor.Current.White;
             base.AddChidren(frameLayout);
 
             //鏍囬淇℃伅
-            var btnTitle = new NormalViewControl(frameLayout.Width, Application.GetRealHeight(topMenuHeight), false);
+            var btnTitle = new NormalViewControl(frameLayout.Width, Application.GetRealHeight(topTitleHeight), false);
+            btnTitle.Y = Application.GetRealHeight(69);
             btnTitle.TextColor = UserCenterColor.Current.TextColor1;
-            btnTitle.TextSize = 22;
-            btnTitle.TextAlignment = TextAlignment.BottomCenter;
+            btnTitle.TextSize = 16;
+            btnTitle.TextAlignment = TextAlignment.Center;
             frameLayout.AddChidren(btnTitle);
             frameLayout.AddTag("btnTitle", btnTitle);
 
             //涓棿绌虹櫧鍖哄煙
-            int midHeight = frameLayout.Height - Application.GetRealHeight(topMenuHeight + buttonHeight);
-            //this.frameMiddle = new SpecialFrameLayout(frameLayout.Width, midHeight, buttonHeight, false);
+            int midHeight = frameLayout.Height - Application.GetRealHeight(btnTitle.Bottom + buttonHeight);
             this.frameMiddle = new FrameLayout();
             frameMiddle.Height = midHeight;
             frameMiddle.Width = frameLayout.Width;
             frameMiddle.Y = btnTitle.Bottom;
-            //frameMiddle.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
             frameLayout.AddChidren(frameMiddle);
 
             //鍙栨秷(鍥犱负鏈夊彲鑳借鎵╁ぇ涓儴楂樺害锛屾墍浠ュ厛澹版槑)
-            var btnCancel = new NormalClickButton(frameLayout.Width / 2 - 1, Application.GetRealHeight(buttonHeight));
-            btnCancel.BackgroundColor = 0;
+            var btnCancel = new NormalClickButton(frameLayout.Width / 2, Application.GetRealHeight(buttonHeight));
+            btnCancel.BackgroundColor = 0x66cccccc;
+            btnCancel.TextColor = UserCenterColor.Current.TextGrayColor1;
             btnCancel.TextID = R.MyInternationalizationString.uCancel;
-            btnCancel.TextSize = 18;
             frameLayout.AddTag("btnCancel", btnCancel);
 
             //纭(鍥犱负鏈夊彲鑳借鎵╁ぇ涓儴楂樺害锛屾墍浠ュ厛澹版槑)
-            var btnOk = new NormalClickButton(frameLayout.Width / 2 - 1, Application.GetRealHeight(buttonHeight));
-            btnOk.BackgroundColor = 0;
+            var btnOk = new NormalClickButton(frameLayout.Width / 2, Application.GetRealHeight(buttonHeight));
             btnOk.TextID = R.MyInternationalizationString.OkMsg;
-            btnOk.TextSize = 18;
-            btnOk.TextColor = UserCenterColor.Current.TextBlueColor;
             frameLayout.AddTag("btnOk", btnOk);
-
             if (dialogFrameMode == DialogFrameMode.None)
             {
                 return;
@@ -182,8 +171,7 @@
             var frameText = this.InitInputTextLine();
             this.frameMiddle.AddChidren(frameText);
             //杈撳叆妗�
-            this.txtInput = this.InitInputControl(frameText);
-            //frameText.AddChidren(txtInput, HeightAutoMode.IncreaseAll);
+            this.txtInput = this.InitInputControl();
             frameText.AddChidren(txtInput);
         }
 
@@ -195,12 +183,10 @@
             //鍒濆鍖栬竟妗�
             var frameText = this.InitInputTextLine();
             this.frameMiddle.AddChidren(frameText);
-            frameText.Radius = 8;
 
             //杈撳叆妗�
-            this.txtInput = this.InitInputControl(frameText);
+            this.txtInput = this.InitInputControl();
             this.txtInput.SecureTextEntry = true;
-            //frameText.AddChidren(txtInput, HeightAutoMode.IncreaseAll);
             frameText.AddChidren(txtInput);
         }
 
@@ -212,12 +198,10 @@
             //鍒濆鍖栬竟妗�
             var frameText = this.InitInputTextLine();
             this.frameMiddle.AddChidren(frameText);
-            frameText.Radius = 8;
 
             //杈撳叆妗�
-            this.txtInput = this.InitInputControl(frameText);
+            this.txtInput = this.InitInputControl();
             this.txtInput.SecureTextEntry = true;
-            //frameText.AddChidren(txtInput, HeightAutoMode.IncreaseAll);
             frameText.AddChidren(txtInput);
             this.txtInput.Gravity = Gravity.Frame;
 
@@ -234,12 +218,12 @@
         /// </summary>
         public FrameLayout InitInputTextLine()
         {
-            //var frameText = new SpecialFrameLayout(this.InputControlWidth, 110, 20);
             var frameText = new FrameLayout();
             frameText.Width = Application.GetRealWidth(this.InputControlWidth);
-            frameText.Height = Application.GetRealHeight(110);
-            frameText.Gravity = Gravity.Center;
-            frameText.BorderColor = UserCenterColor.Current.TextFrameColor;
+            frameText.Height = Application.GetRealHeight(100);
+            frameText.Y = Application.GetRealHeight(81);
+            frameText.Gravity = Gravity.CenterHorizontal;
+            frameText.BorderColor = 0xff676767;
             frameText.BorderWidth = 1;
             frameText.Radius = 8;
 
@@ -249,11 +233,9 @@
         /// <summary>
         /// 鍒濆鍖栬緭鍏ユ鎺т欢
         /// </summary>
-        /// <param name="frameLine"></param>
-        public TextInputControl InitInputControl(FrameLayout frameLine)
+        public TextInputControl InitInputControl()
         {
-            var txtText = new TextInputControl(Application.CurrentWidth);
-            txtText.InitSize(frameLine.Width - Application.GetRealHeight(10), ControlCommonResourse.NormalControlHeight, false);
+            var txtText = new TextInputControl(this.InputControlWidth - 20, 69, true);
             txtText.TextAlignment = TextAlignment.Center;
             txtText.Gravity = Gravity.Center;
 
@@ -314,32 +296,39 @@
                     this.RemoveFromParent();
                     return;
                 }
-                this.ComfirmClickEvent();
+                this.ComfirmClickEvent(this.Text);
             };
-
-            //鐏扮嚎
-            var btnLine1 = new NormalViewControl(1, Application.GetRealHeight(buttonHeight), false);
-            btnLine1.X = btnCancel.Right;
-            btnLine1.Y = btnCancel.Y;
-            btnLine1.BackgroundColor = UserCenterColor.Current.Line;
-            frameLayout.AddChidren(btnLine1);
-
-            //鐏扮嚎
-            var btnLine2 = new NormalViewControl(frameLayout.Width, 1, false);
-            btnLine2.Y = btnOk.Y - 1;
-            btnLine2.BackgroundColor = UserCenterColor.Current.Line;
-            frameLayout.AddChidren(btnLine2);
         }
 
         /// <summary>
         /// 娣诲姞瀛愭帶浠�
         /// </summary>
         /// <param name="view"></param>
-        /// <param name="heightAutoMode">楂樺害鍙樻洿妯″紡</param>
-        public void AddChidren(View view, HeightAutoMode heightAutoMode = HeightAutoMode.None)
+        /// <param name="heightAutoMode">楂樺害鍙樻洿妯″紡(闈濶one鐨勬椂鍊欓兘鍚屼竴鑷姩璋冩暣)</param>
+        /// <param name="bottomSpace">涓棿绌虹櫧鍖哄煙閲岄潰鏈�搴曢儴鐨勬帶浠朵笌搴曢儴鎸夐挳鐨勯棿璺�(闈炵湡瀹炲��)</param>
+        public void AddChidren(View view, HeightAutoMode heightAutoMode = HeightAutoMode.None, int bottomSpace = 0)
         {
-            //this.frameMiddle.AddChidren(view, heightAutoMode);
             this.frameMiddle.AddChidren(view);
+            if (heightAutoMode != HeightAutoMode.None)
+            {
+                //鑾峰彇鏈�搴曢儴鎺т欢鐨勫潗鏍�
+                int realHeight = 0;
+                for (int i = 0; i < this.frameMiddle.ChildrenCount; i++)
+                {
+                    var myView = this.frameMiddle.GetChildren(i);
+                    if (myView.Bottom > realHeight)
+                    {
+                        realHeight = myView.Bottom;
+                    }
+                }
+                int value = realHeight + Application.GetRealHeight(bottomSpace) - this.frameMiddle.Height;
+                if (value > 0)
+                {
+                    //搴曢儴鎺т欢宸茬粡瓒呭嚭浜嗙洰鍓嶇殑楂樺害,鍒欐墿澶ф帶浠�
+                    this.frameMiddle.Height += value;
+                    this.frameLayout.Height += value;
+                }
+            }
         }
 
         /// <summary>
@@ -347,6 +336,7 @@
         /// </summary>
         public void CloseDialog()
         {
+            this.ComfirmClickEvent = null;
             this.RemoveFromParent();
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs
index 1041b41..8dba4e5 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs
@@ -63,11 +63,11 @@
         /// <param name="chidrenBindMode">鍙樻洿鐨勭粦瀹氭ā寮�</param>
         public void ChangedChidrenBindMode(View view, ChidrenBindMode chidrenBindMode)
         {
-            if (view is Button)
+            if (view is ButtonBase)
             {
                 //瀛愭帶浠剁Щ闄や簨浠�
-                Button button = (Button)view;
-                button.MouseUpEventHandler -= ChildrenUpEvent;
+                ButtonBase button = (ButtonBase)view;
+                button.ButtonClickEvent -= ChildrenUpEvent;
                 button.MouseDownEventHandler -= ChildrenDownEvent;
 
                 this.BindChidrenEvent(view, chidrenBindMode);
@@ -82,11 +82,11 @@
                     {
                         break;
                     }
-                    if (myView is Button)
+                    if (myView is ButtonBase)
                     {
                         //瀛愭帶浠剁Щ闄や簨浠�
-                        Button button = (Button)myView;
-                        button.MouseUpEventHandler -= ChildrenUpEvent;
+                        ButtonBase button = (ButtonBase)myView;
+                        button.ButtonClickEvent -= ChildrenUpEvent;
                         button.MouseDownEventHandler -= ChildrenDownEvent;
                     }
                 }
@@ -105,14 +105,14 @@
         /// <param name="chidrenBindMode"></param>
         private void BindChidrenEvent(View view, ChidrenBindMode chidrenBindMode)
         {
-            if (view is Button && chidrenBindMode != ChidrenBindMode.NotBind)
+            if (view is ButtonBase && chidrenBindMode != ChidrenBindMode.NotBind)
             {
                 //涓哄瓙鎺т欢娣诲姞浜嬩欢
-                Button button = (Button)view;
-                button.MouseUpEventHandler -= ChildrenUpEvent;
+                ButtonBase button = (ButtonBase)view;
+                button.ButtonClickEvent -= ChildrenUpEvent;
                 button.MouseDownEventHandler -= ChildrenDownEvent;
 
-                button.MouseUpEventHandler += ChildrenUpEvent;
+                button.ButtonClickEvent += ChildrenUpEvent;
                 button.MouseDownEventHandler += ChildrenDownEvent;
             }
             else if (view is ViewGroup && chidrenBindMode != ChidrenBindMode.NotBind)
@@ -126,14 +126,14 @@
                     {
                         break;
                     }
-                    if (myView is Button)
+                    if (myView is ButtonBase)
                     {
                         //涓哄瓙鎺т欢娣诲姞浜嬩欢
-                        Button button = (Button)myView;
-                        button.MouseUpEventHandler -= ChildrenUpEvent;
+                        ButtonBase button = (ButtonBase)myView;
+                        button.ButtonClickEvent -= ChildrenUpEvent;
                         button.MouseDownEventHandler -= ChildrenDownEvent;
 
-                        button.MouseUpEventHandler += ChildrenUpEvent;
+                        button.ButtonClickEvent += ChildrenUpEvent;
                         button.MouseDownEventHandler += ChildrenDownEvent;
                     }
                 }
@@ -191,6 +191,11 @@
         /// <param name="e">E.</param>
         private void ChildrenUpEvent(object sender, MouseEventArgs e)
         {
+            if (sender is FrameLayoutControl)
+            {
+                //LOG鍑哄姏
+                this.WriteLog();
+            }
             //璋冪敤濮旀墭
             ButtonClickEvent?.Invoke(sender, e);
         }
@@ -247,7 +252,7 @@
 
             //璁剧疆閫夋嫨鐘舵��
             this.SetClickSelectStatu();
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 System.Threading.Thread.Sleep(waiTime);
                 Application.RunOnMainThread(() =>
@@ -255,8 +260,7 @@
                     //璁剧疆涓嶉�夋嫨鐘舵��
                     this.SetClickNotSelectStatu();
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -280,5 +284,40 @@
         }
 
         #endregion
+
+        #region 鈻� Log鍑哄姏____________________________
+
+        /// <summary>
+        /// 璇ユ帶浠舵墍灞炵殑鐣岄潰鍚嶅瓧
+        /// </summary>
+        private string formName = null;
+
+        /// <summary>
+        /// Log鍑哄姏
+        /// </summary>
+        private void WriteLog()
+        {
+            if (formName == null)
+            {
+                formName = string.Empty;
+                View myView = this.Parent;
+                for (; ; )
+                {
+                    if (myView == null)
+                    {
+                        break;
+                    }
+                    else if (myView is CommonFormBase)
+                    {
+                        formName = ((CommonFormBase)myView).FormID;
+                        break;
+                    }
+                    myView = myView.Parent;
+                }
+            }
+            HdlLogLogic.Current.WriteLog(1, formName + ".FrameLayoutControl 琚偣鍑�");
+        }
+
+        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
index fe8e625..167c1cc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
@@ -234,6 +234,24 @@
 
         #endregion
 
+        #region 鈻� 娣诲姞鍙宠竟鐨勫紑鍏冲浘鏍嘷________________
+
+        /// <summary>
+        /// 娣诲姞鍙宠竟鐨勫紑鍏冲浘鏍�
+        /// </summary>
+        /// <returns></returns>
+        public MostRightIconControl AddMostRightSwitchIcon()
+        {
+            var btnSwitch = this.AddMostRightEmptyIcon(104, 63);
+            this.ChangedChidrenBindMode(btnSwitch, ChidrenBindMode.NotBind);
+            btnSwitch.UnSelectedImagePath = "Item/Switch2.png";
+            btnSwitch.SelectedImagePath = "Item/Switch2Selected.png";
+
+            return btnSwitch;
+        }
+
+        #endregion
+
         #region 鈻� 娣诲姞鏈�鍙崇殑鏄剧ず鏂囨湰_________________
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/GatewayFirmwareUpdateControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/GatewayFirmwareUpdateControl.cs
index cbaec60..0d15b69 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/GatewayFirmwareUpdateControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/GatewayFirmwareUpdateControl.cs
@@ -858,7 +858,7 @@
         /// </summary>
         private void ShowFinishMsg()
         {
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鐘舵�佸彉鏇�
                 this.IsFinishUpdate = true;
@@ -888,8 +888,7 @@
                     this.btnUpdateButton.SetNotClickStatu();
 
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -1022,7 +1021,7 @@
         private void StartDownLoadTimeOutThread()
         {
             this.downLoadTimeOutCount = 30;
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (true)
                 {
@@ -1051,8 +1050,7 @@
                         break;
                     }
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -1086,7 +1084,7 @@
             //瓒呮椂鏃堕棿璁剧疆
             this.updateTimeOutCount = 60;
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (this.IsFinishUpdate == false)
                 {
@@ -1124,8 +1122,7 @@
                     //璁剧疆閿欒淇℃伅
                     this.ShowErrorMsg(this.errorMsg);
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -1173,7 +1170,7 @@
         /// <returns></returns>
         private void StartGetGatewayVersionThread()
         {
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 //褰撳墠缃戝叧鐨勭増鏈�
                 var oldVersion = HdlGatewayLogic.Current.GetGwInfoAttribute(this.upDatezbGateway, "LinuxFWVersion");
@@ -1208,8 +1205,7 @@
                 }
                 //宸茬粡鑳藉鑾峰彇鏁版嵁
                 this.ShowFinishMsg();
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs
index 34fa16f..df9a338 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs
@@ -49,5 +49,28 @@
             }
         }
         #endregion
+
+        #region 鈻� 璋冩暣鐪熷疄楂樺害_______________________
+
+        /// <summary>
+        /// 璋冩暣鎺т欢鐪熷疄楂樺害(鍙拡瀵硅鎺т欢閮芥槸鐩稿悓楂樺害鐨�,楂樺害鍙細鍑忓皯,涓嶄細澧炲姞)
+        /// </summary>
+        /// <param name="bottomSpace">搴曢儴绌虹櫧闂磋窛(鐪熷疄鍊�)</param>
+        public void AdjustRealHeight(int bottomSpace)
+        {
+            if (this.ChildrenCount == 0)
+            {
+                return;
+            }
+            //璋冩暣鍒楄〃鎺т欢鐨勯珮搴�
+            var realHeight = this.ChildrenCount * this.GetChildren(0).Height + bottomSpace;
+            if (realHeight < this.Height)
+            {
+                //缂╁皬鎺т欢楂樺害
+                this.Height = realHeight;
+            }
+        }
+
+        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs
index 521cd86..c7c8e13 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs
@@ -84,7 +84,8 @@
             }
             else
             {
-                roomName = Common.Room.CurrentRoom.GetRoomName(new List<string>());
+                //鏈垎閰嶅尯鍩�
+                roomName = Language.StringByID(R.MyInternationalizationString.uDeviceNotAssignedRoom);
             }
 
             var btnRoom = frameTable.AddLeftCaption(roomName, 600, 50, true);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/AreaCodeSelectForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/AreaCodeSelectForm.cs
index cda830e..f72589e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/AreaCodeSelectForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/AreaCodeSelectForm.cs
@@ -78,12 +78,11 @@
             frameBack.AddChidren(btnSearch);
             btnSearch.BindEvent(this.SearchEvent);
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鍒濆鍖栧湴鍖哄垪琛�
                 this.InitAreaList();
-            })
-            { IsBackground = true }.Start();
+            });
 
             //璁╄繖涓寜閽繖涓尯鍩熶笉鑳界偣鍑昏彍鍗�
             var frameTemp = new FrameLayout();
@@ -370,7 +369,7 @@
             /// </summary>
             private void StartSearchKeysThead()
             {
-                new System.Threading.Thread(() =>
+                HdlThreadLogic.Current.RunThread(() =>
                 {
                     while (this.Parent != null)
                     {
@@ -396,8 +395,7 @@
                         //濡傛灉褰撳墠鐨勬绱㈤敭鍊间笌涓嬩竴涓绱㈤敭鍊间笉涓�鏍风殑璇�
                         //閭e氨璇存槑锛岀敤鎴峰啀娆¤緭鍏ヤ簡閿�硷紝杩欎釜鏃跺�欙紝璁╃嚎绋嬬户缁窇涓嬪幓
                     }
-                })
-                { IsBackground = true }.Start();
+                });
             }
             #endregion
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/CommonFormBase.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/CommonFormBase.cs
index b059beb..0d36ad3 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/CommonFormBase.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/CommonFormBase.cs
@@ -28,6 +28,8 @@
         {
             //灏嗗綋鍓嶇殑鐢婚潰淇濆瓨鍒板唴瀛樺綋涓�
             UserCenterLogic.AddActionForm(this);
+            //Log鍑哄姏
+            HdlLogLogic.Current.WriteLog(1, this.FormID + " 鐣岄潰鎵撳紑");
         }
 
         /// <summary>
@@ -74,6 +76,9 @@
         /// </summary>
         public virtual void CloseForm()
         {
+            //Log鍑哄姏
+            HdlLogLogic.Current.WriteLog(1, this.FormID + " 鐣岄潰鍏抽棴");
+
             //绉婚櫎鎺ュ彈鍦ㄧ嚎鐘舵�佹帹閫�
             this.RemoveGatewayOnlinePush();
             //绉婚櫎璁惧灞炴�у彉鏇存帹閫�
@@ -88,7 +93,6 @@
 
             //浠庡垪琛ㄤ腑绉婚櫎(闃叉鐢婚潰浜岄噸娣诲姞)
             UserCenterLogic.RemoveActionForm(this);
-
         }
 
         /// <summary>
@@ -267,8 +271,21 @@
                 {
                     alert.ConfirmClickEvent += () =>
                     {
-                        //鍥炶皟鍑芥暟
-                        action?.Invoke();
+                        try
+                        {
+                            //鍥炶皟鍑芥暟
+                            action?.Invoke();
+                        }
+                        catch (Exception ex)
+                        {
+                            //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
+                            this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
+
+                            //Log鍑哄姏
+                            string errorMsg = ex.Message + "\r\n";
+                            errorMsg += ex.TargetSite.ToString();
+                            HdlLogLogic.Current.WriteLog(-1, errorMsg);
+                        }
                         action = null;
                     };
                 }
@@ -357,9 +374,13 @@
             }
             catch (Exception ex)
             {
+                //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
+                this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
+
+                //Log鍑哄姏
                 string msg = ex.Message + "\r\n";
                 msg += ex.TargetSite.ToString();
-                this.ShowMassage(ShowMsgType.Error, msg);
+                HdlLogLogic.Current.WriteLog(-1, msg);
 
                 return null;
             }
@@ -382,11 +403,12 @@
         #region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________
 
         /// <summary>
-        /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
+        /// <para>鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�</para>
+        /// <para>閲嶅啓鐨勬椂鍊欒繑鍥炲�艰杩斿洖1(杩斿洖鍊兼槸缁欏簳灞備娇鐢ㄧ殑)</para>
         /// </summary>
-        public virtual void FormActionAgainEvent()
+        public virtual int FormActionAgainEvent()
         {
-            return;
+            return -1;
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs
index a912f8b..be19a18 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs
@@ -152,15 +152,11 @@
             this.InitForm();
 
             //寮哄埗鏄剧ず鐣岄潰,鍒濆鍖栧畬妗嗘灦鍚�,灏辩洿鎺ユ樉绀虹晫闈�
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunMainInThread(() =>
             {
-                Application.RunOnMainThread(() =>
-                {
-                    //鎵цShowForm()鏂规硶
-                    this.LoadShowFormMethod(parameter);
-                });
-            })
-            { IsBackground = true }.Start();
+                //鎵цShowForm()鏂规硶
+                this.LoadShowFormMethod(parameter);
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
index f8af95c..f7020c4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
@@ -269,6 +269,10 @@
         /// <param name="fileName">鏂囦欢鐨勫悕瀛�,涓嶅惈璺緞</param>
         public static void AddOrEditorFile(string fileName)
         {
+            if (UserCenterResourse.LocalRootPath == string.Empty)
+            {
+                return;
+            }
             //鏍圭洰褰�
             string strroot = UserCenterResourse.LocalRootPath;
             //鑷姩澶囦唤鐩綍
@@ -302,6 +306,10 @@
         /// <param name="fileName">鏂囦欢鐨勫悕瀛�,涓嶅惈璺緞</param>
         public static void DeleteFile(string fileName)
         {
+            if (UserCenterResourse.LocalRootPath == string.Empty)
+            {
+                return;
+            }
             //鏍圭洰褰�
             string strroot = UserCenterResourse.LocalRootPath;
             //鑷姩鍒犻櫎澶囦唤鐩綍
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceUpdateLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceUpdateLogic.cs
index e07eeb3..b6ef03e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceUpdateLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceUpdateLogic.cs
@@ -382,12 +382,11 @@
             {
                 this.zbGateway.ReportAction -= this.UpdateDeviceProgress;
 
-                new System.Threading.Thread(async () =>
+                HdlThreadLogic.Current.RunThread(async () =>
                 {
                     //缁堟鍗囩骇
                     await this.otaDevice.KillUpdateAsync(this.zbGateway, 200);
-                })
-                { IsBackground = true }.Start();
+                });
 
                 this.UpdateStatu = UpdateStatuMode.DeviceUpdateFail;
                 return;
@@ -556,7 +555,7 @@
             //鍗囩骇鎴愬姛
             this.UpdateStatu = UpdateStatuMode.UpdateSuccess;
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 System.Threading.Thread.Sleep(3000);
 
@@ -592,8 +591,7 @@
                     //璁惧鍗囩骇鎴愬姛!
                     this.UpdateStatuChangedEvent?.Invoke(1, Language.StringByID(R.MyInternationalizationString.uDeviceUpdateSuccess));
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -636,7 +634,7 @@
         private void StartDownLoadTimeOutThread()
         {
             this.downLoadTimeOutCount = 30;
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (true)
                 {
@@ -665,8 +663,7 @@
                         break;
                     }
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -691,7 +688,7 @@
         private void StartUpdateTimeOutThread()
         {
             this.UpdateTimeOutCount = 60;
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (true)
                 {
@@ -719,8 +716,7 @@
                         break;
                     }
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
index 30dbd10..c62be4d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -1160,12 +1160,11 @@
         {
             bool bolBreak = false;
             ZbGatewayData.GetGwData result = null;
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 result = await this.GetGatewayNewInfoAsync(zbGateway, mode);
                 bolBreak = true;
-            })
-            { IsBackground = true }.Start();
+            });
 
             while (bolBreak == false)
             {
@@ -1356,7 +1355,7 @@
             if (localWay == null || localWay.getGwInfo == null)
             {
                 //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷
-                new System.Threading.Thread(async () =>
+                HdlThreadLogic.Current.RunThread(async () =>
                 {
                     var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
                     if (result != null)
@@ -1369,8 +1368,7 @@
                             }
                         });
                     }
-                })
-                { IsBackground = true }.Start();
+                });
             }
             else
             {
@@ -1390,7 +1388,7 @@
             if (localWay == null || localWay.getGwInfo == null)
             {
                 //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷
-                new System.Threading.Thread(async () =>
+                HdlThreadLogic.Current.RunThread(async () =>
                 {
                     var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO);
                     if (result != null)
@@ -1404,8 +1402,7 @@
                             }
                         });
                     }
-                })
-                { IsBackground = true }.Start();
+                });
             }
             else
             {
@@ -1575,7 +1572,7 @@
                 return;
             }
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 var dicStatu = this.GetNowOnlineStatuBeforeCheck();
                 //绛変釜3绉掞紝鍑嗗涓�涓�
@@ -1604,8 +1601,7 @@
                 }
                 //灏嗗彉鍖栫殑缃戝叧鎺ㄩ�佸埌鐣岄潰涓�
                 this.PushGatewayOnlineStatuToForm(dicStatu);
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -1623,7 +1619,7 @@
                 return;
             }
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鍏堣幏鍙栫幇鍦ㄥ叏閮ㄧ殑缃戝叧锛屽垵鏈熷�よ缃负涓嶅湪绾�
                 var dicStatu = this.GetNowOnlineStatuBeforeCheck();
@@ -1665,8 +1661,7 @@
                     string msg = Language.StringByID(R.MyInternationalizationString.uRemoteTimeOutAndNotGatewaiOnline);
                     //this.ShowTipMsg(msg);
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -1791,7 +1786,7 @@
             }
 
             bool canBreak = false;
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 List<string> list = new List<string>() { "NotSetAgain" };
 
@@ -1817,8 +1812,7 @@
                 }
                 dicDbGateway = dic;
                 canBreak = true;
-            })
-            { IsBackground = true }.Start();
+            });
 
             int count = 0;
             while (canBreak == false)
@@ -1887,7 +1881,7 @@
         /// </summary>
         public void ResetComandToBindBackupGateway()
         {
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 var fileData = Global.ReadFileByDirectory(DirNameResourse.LocalMemoryDirectory, DirNameResourse.BackupGatewayIdFile);
                 if (fileData == null)
@@ -1936,8 +1930,7 @@
                     var byteData = System.Text.Encoding.UTF8.GetBytes(strData);
                     Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.BackupGatewayIdFile, byteData);
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs
new file mode 100755
index 0000000..3f2e723
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs
@@ -0,0 +1,91 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+    /// <summary>
+    /// Log閫昏緫
+    /// </summary>
+    public class HdlLogLogic
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// Log閫昏緫
+        /// </summary>
+        private static HdlLogLogic m_Current = null;
+        /// <summary>
+        /// Log閫昏緫
+        /// </summary>
+        public static HdlLogLogic Current
+        {
+            get
+            {
+                if (m_Current == null)
+                {
+                    m_Current = new HdlLogLogic();
+                }
+                return m_Current;
+            }
+        }
+
+        /// <summary>
+        /// 閿�
+        /// </summary>
+        private object objLock = new object();
+
+        #endregion
+
+        #region 鈻� Log鍑哄姏____________________________
+
+        /// <summary>
+        /// Log鍑哄姏
+        /// </summary>
+        /// <param name="div">1:鏅�歀og,-1:鑷村懡閿欒Log</param>
+        /// <param name="strLog">Log鍐呭</param>
+        public void WriteLog(int div, string strLog)
+        {
+            lock (objLock)
+            {
+                if (div != -1)
+                {
+                    //鏆傛椂鍙褰曞紓甯镐俊鎭�
+                    return;
+                }
+                //Log鏂囦欢
+                string fileName = this.GetLogFile(div);
+                string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.LogDirectory, fileName);
+
+                strLog = "[" + DateTime.Now.ToString("yyyyMMdd HH:mm:ss") + "] " + strLog;
+                strLog = UserCenterLogic.EncryptPassword("1|Oli]7p", strLog);
+                var sw = new System.IO.StreamWriter(fullName, true, Encoding.UTF8);
+                sw.WriteLine(strLog);
+                sw.Close();
+                sw = null;
+            }
+        }
+
+        /// <summary>
+        /// 鑾峰彇LOG鏂囦欢
+        /// </summary>
+        /// <param name="div">1:鏅�歀og,-1:鑷村懡閿欒Log</param>
+        /// <returns></returns>
+        private string GetLogFile(int div)
+        {
+            //鍔犲瘑,鍥犱负杩欐槸鏀堕泦鏁版嵁,鏈�濂戒笉璁╁埆浜虹煡閬撹繖鏄粈涔堟渶濂�
+            string fileName = DateTime.Now.ToString("yyyyMMdd");
+            if (div == -1)
+            {
+                fileName += "Log";
+            }
+            else if (div == 1)
+            {
+                fileName += "Error";
+            }
+            fileName = UserCenterLogic.EncryptPassword("4^Olh_3f", fileName);
+            return fileName;
+        }
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSafeguardLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSafeguardLogic.cs
index ba11ec1..49549c2 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSafeguardLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSafeguardLogic.cs
@@ -1639,9 +1639,9 @@
                 //璁剧疆鎻愮ず淇℃伅:璇疯緭鍏ョ敤鎴峰瘑鐮�
                 Dialogform.SetTipText(Language.StringByID(R.MyInternationalizationString.uPleaseInputUserPassword));
                 //纭鎸夐挳
-                Dialogform.ComfirmClickEvent += (() =>
+                Dialogform.ComfirmClickEvent += ((textValue) =>
                 {
-                    if (Dialogform.InputText == string.Empty)
+                    if (textValue == string.Empty)
                     {
                         this.ShowErrorMsg(Language.StringByID(R.MyInternationalizationString.uPleaseInputUserPassword));
                         return;
@@ -1649,7 +1649,7 @@
                     Dialogform.CloseDialog();
 
                     //鐢ㄦ埛瀵嗙爜
-                    pasword = Dialogform.InputText;
+                    pasword = textValue;
                     //鍔犲瘑瀵嗙爜
                     this.UserPassword = pasword;
                 });
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs
new file mode 100755
index 0000000..b7e2b4e
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs
@@ -0,0 +1,103 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+    /// <summary>
+    /// 绾跨▼閫昏緫(鍒涘缓杩欎釜涓滆タ,鏄负浜哃og鍑哄姏)
+    /// </summary>
+    public class HdlThreadLogic
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 绾跨▼閫昏緫(鍒涘缓杩欎釜涓滆タ,鏄负浜哃og鍑哄姏)
+        /// </summary>
+        private static HdlThreadLogic m_Current = null;
+        /// <summary>
+        /// 绾跨▼閫昏緫(鍒涘缓杩欎釜涓滆タ,鏄负浜哃og鍑哄姏)
+        /// </summary>
+        public static HdlThreadLogic Current
+        {
+            get
+            {
+                if (m_Current == null)
+                {
+                    m_Current = new HdlThreadLogic();
+                }
+                return m_Current;
+            }
+        }
+        #endregion
+
+        #region 鈻� 绾跨▼鎵ц___________________________
+
+        /// <summary>
+        /// 瀛愮嚎绋嬫墽琛�(鍒涘缓杩欎釜涓滆タ,鏄负浜哃og鍑哄姏)
+        /// </summary>
+        public void RunThread(Action action)
+        {
+            new System.Threading.Thread(() =>
+            {
+                //璁板綍璧峰綋鍓嶇晫闈紝铏界劧浼间箮娌″暐鐢�
+                string nowFormId = UserCenterResourse.NowActionFormID;
+                try
+                {
+                    action.Invoke();
+                    action = null;
+                }
+                catch (Exception ex)
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
+                        var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
+                        alert.Show();
+                    });
+                    //Log鍑哄姏
+                    string msg = "褰撳墠婵�娲荤殑鐣岄潰[" + nowFormId + "]\r\n";
+                    msg += ex.Message + "\r\n";
+                    msg += ex.TargetSite.ToString();
+                    HdlLogLogic.Current.WriteLog(-1, msg);
+                }
+            })
+            { IsBackground = true }.Start();
+        }
+
+        /// <summary>
+        /// 鎵ц杩愯瀛愮嚎绋嬮噷闈㈢殑涓荤嚎绋�(鍒涘缓杩欎釜涓滆タ,鏄负浜哃og鍑哄姏)
+        /// </summary>
+        public void RunMainInThread(Action action)
+        {
+            new System.Threading.Thread(() =>
+            {
+                Application.RunOnMainThread(() =>
+                {
+                    //璁板綍璧峰綋鍓嶇晫闈紝铏界劧浼间箮娌″暐鐢�
+                    string nowFormId = UserCenterResourse.NowActionFormID;
+                    try
+                    {
+                        action.Invoke();
+                        action = null;
+                    }
+                    catch (Exception ex)
+                    {
+                        //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
+                        var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
+                        alert.Show();
+                        //Log鍑哄姏
+                        string msg = "褰撳墠婵�娲荤殑鐣岄潰[" + nowFormId + "]\r\n";
+                        msg += ex.Message + "\r\n";
+                        msg += ex.TargetSite.ToString();
+                        HdlLogLogic.Current.WriteLog(-1, msg);
+                    }
+                });
+                
+            })
+            { IsBackground = true }.Start();
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
index 3c92302..cb79387 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -395,8 +395,33 @@
                             UserCenterResourse.NowActionFormID = UserCenterResourse.listActionFormId[index];
                             if (UserCenterResourse.DicActionForm.ContainsKey(UserCenterResourse.NowActionFormID) == true)
                             {
-                                //瑙﹀彂鐣岄潰鍐嶆婵�娲荤殑浜嬩欢
-                                UserCenterResourse.DicActionForm[UserCenterResourse.NowActionFormID]?.FormActionAgainEvent();
+                                var Myform = UserCenterResourse.DicActionForm[UserCenterResourse.NowActionFormID];
+                                if (Myform != null)
+                                {
+                                    try
+                                    {
+                                        //瑙﹀彂鐣岄潰鍐嶆婵�娲荤殑浜嬩欢
+                                        int value = Myform.FormActionAgainEvent();
+                                        if (value == 1)
+                                        {
+                                            //Log鍑哄姏
+                                            HdlLogLogic.Current.WriteLog(1, Myform.FormID + " 琚縺娲�");
+                                        }
+                                    }
+                                    catch (Exception ex)
+                                    {
+                                        //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
+                                        var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
+                                        alert.Show();
+
+                                        //Log鍑哄姏
+                                        string msg = ex.Message + "\r\n";
+                                        msg += ex.TargetSite.ToString();
+                                        HdlLogLogic.Current.WriteLog(-1, msg);
+                                    }
+                                }
+                                //閲婃斁杩欎釜鍙橀噺
+                                Myform = null;
                             }
                         }
                         else if (actionForm != null && actionForm is UserView.UserPage)
@@ -408,8 +433,30 @@
                                 UserCenterResourse.NowActionFormID = UserCenterResourse.listActionFormId[index];
                                 if (UserCenterResourse.DicActionForm.ContainsKey(UserCenterResourse.NowActionFormID) == true)
                                 {
-                                    //瑙﹀彂鐣岄潰鍐嶆婵�娲荤殑浜嬩欢
-                                    UserCenterResourse.DicActionForm[UserCenterResourse.NowActionFormID]?.FormActionAgainEvent();
+                                    var Myform = UserCenterResourse.DicActionForm[UserCenterResourse.NowActionFormID];
+                                    try
+                                    {
+                                        //瑙﹀彂鐣岄潰鍐嶆婵�娲荤殑浜嬩欢
+                                        int value = Myform.FormActionAgainEvent();
+                                        if (value == 1)
+                                        {
+                                            //Log鍑哄姏
+                                            HdlLogLogic.Current.WriteLog(1, Myform.FormID + " 琚縺娲�");
+                                        }
+                                    }
+                                    catch (Exception ex)
+                                    {
+                                        //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
+                                        var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
+                                        alert.Show();
+
+                                        //Log鍑哄姏
+                                        string msg = ex.Message + "\r\n";
+                                        msg += ex.TargetSite.ToString();
+                                        HdlLogLogic.Current.WriteLog(-1, msg);
+                                    }
+                                    //閲婃斁杩欎釜鍙橀噺
+                                    Myform = null;
                                 }
                             }
                         }
@@ -563,7 +610,7 @@
             FirmwareUpdateResourse.dicDeviceUpdateList.Clear();
             FirmwareUpdateResourse.dicGatewayUpdateList.Clear();
 
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 //妫�娴婣PP鏄惁鑳藉閫�鍑�
                 while (UserCenterResourse.AppCanSignout == false)
@@ -599,8 +646,7 @@
                     Shared.Common.CommonPage.Instance.AddChidren(formLogin);
                     formLogin.Show(account);
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -926,12 +972,12 @@
         private static UserInformation GetUserInformationFromLocation()
         {
             string fileName = CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.UserInfoFile);
-            if (System.IO.File.Exists(fileName) == false)
+            var value = LoadFileContent(fileName);
+            if (value == null)
             {
                 return new UserInformation();
             }
-            var varByte = Shared.IO.FileUtils.ReadFile(fileName);
-            var info = Newtonsoft.Json.JsonConvert.DeserializeObject<UserInformation>(System.Text.Encoding.UTF8.GetString(varByte));
+            var info = Newtonsoft.Json.JsonConvert.DeserializeObject<UserInformation>(value);
             return info;
         }
 
@@ -940,12 +986,9 @@
         /// </summary>
         private static void SaveUserInformationToLocation()
         {
-            var data = Newtonsoft.Json.JsonConvert.SerializeObject(UserCenterResourse.UserInfo);
-            var byteData = System.Text.Encoding.UTF8.GetBytes(data);
-
             string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.UserInfoFile);
             //鍐欏叆鍐呭
-            Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData);
+            SaveFileContent(fullName, UserCenterResourse.UserInfo);
 
             //鎼炰竴涓嬩富浜虹殑榛樿澶村儚
             string defultFile = IO.FileUtils.GetImageFilePath("Center/Admin.png");
@@ -1114,6 +1157,10 @@
             directory = System.IO.Path.Combine(LocalDirectory, DirNameResourse.DownLoadShardDirectory);
             Global.CreateEmptyDirectory(directory);
 
+            //LOG鍑哄姏銆愭枃浠跺す銆�
+            directory = System.IO.Path.Combine(LocalDirectory, DirNameResourse.LogDirectory);
+            Global.CreateEmptyDirectory(directory);
+
             //鐢ㄦ埛鍥剧墖鐩綍璺緞銆愭枃浠跺す銆�
             if (!System.IO.Directory.Exists(UserCenterResourse.UserPictruePath))
             {
@@ -1242,5 +1289,37 @@
             return System.Text.Encoding.Default.GetString(ms.ToArray());
         }
         #endregion
+
+        #region 鈻� 鏂囦欢淇濆瓨鍜岃鍙朹____________________
+
+        /// <summary>
+        /// 鏂囦欢淇濆瓨(鏁村ぉ蹇樿,鎵�浠ュ缓涓�涓嚱鏁版潵鐜╃帺)
+        /// </summary>
+        /// <param name="fullName">鍏ㄨ矾寰�</param>
+        /// <param name="obj">闇�瑕佸簭鍒楀寲鐨勪笢瑗�</param>
+        public static void SaveFileContent(string fullName, object obj)
+        {
+            var data = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
+            var byteData = System.Text.Encoding.UTF8.GetBytes(data);
+            //鍐欏叆鍐呭
+            Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData);
+        }
+
+        /// <summary>
+        /// 璇诲彇鏂囦欢(鏂囦欢涓嶅瓨鍦ㄨ繑鍥瀗ull,鏁村ぉ蹇樿,鎵�浠ュ缓涓�涓嚱鏁版潵鐜╃帺)
+        /// </summary>
+        /// <param name="fullName">鍏ㄨ矾寰�</param>
+        /// <returns></returns>
+        public static string LoadFileContent(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);
+        }
+
+        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
index 06d1fa8..9b5bf4d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
@@ -86,5 +86,21 @@
         /// 淇濆瓨璐﹀彿閰嶇疆鐨勩�愭枃浠躲��
         /// </summary>
         public const string AccountOptionFile = "d33690329dfdf2e5dcce0280893b95a0db47b5be13b46aa0";
+        /// <summary>
+        /// 淇濆瓨浣忓畢椤哄簭鐨勩�愭枃浠躲��
+        /// </summary>
+        public const string ResidenceSortFile = "b79583bed6909a524e81e2461474f8dcc7a45bf99cecee93";
+        /// <summary>
+        /// 淇濆瓨妤煎眰椤哄簭鐨勩�愭枃浠躲��
+        /// </summary>
+        public const string FloorSortFile = "2b156ce95c29de53578282f4d7228f60";
+        /// <summary>
+        /// 淇濆瓨鎴块棿椤哄簭鐨勩�愭枃浠躲��
+        /// </summary>
+        public const string RoomSortFile = "b1b9f1a50064016f62dea3f160703de2";
+        /// <summary>
+        /// 淇濆瓨Log鐨勩�愭枃浠跺す銆�
+        /// </summary>
+        public const string LogDirectory = "820c65b54b6f3f2a";
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
index 991b648..2754542 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
@@ -96,6 +96,37 @@
             //鍒掔嚎
             btnType.AddBottomLine();
 
+            //鎵�灞炲尯鍩�
+            var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
+            listview.AddChidren(rowBeloneArea);
+            rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uBelongArea), this.listNewDevice);
+            //搴曠嚎
+            rowBeloneArea.AddBottomLine();
+
+            var listCheck = new List<string>();
+            rowBeloneArea.SelectRoomEvent += (roomKeys) =>
+            {
+                foreach (var device in this.listNewDevice)
+                {
+                    //淇濆瓨杩欎釜璁惧灞炰簬鍝釜鍖哄煙
+                    device.DeviceRoomId = roomKeys;
+                    device.ReSave();
+                    var room = Common.Room.CurrentRoom.GetRoomByDevice(device);
+                    string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
+                    if (room == null)
+                    {
+                        //杩欓噷鏈夌偣鐗规畩,濡傛灉鍥炶矾娌℃湁璁剧疆鏈夊尯鍩熺殑鏃跺��,鎵嶈缃�
+                        listCheck.Add(mainKeys);
+                        Common.Room.CurrentRoom.ChangedRoom(device, roomKeys);
+                    }
+                    else if (listCheck.Contains(mainKeys) == true)
+                    {
+                        //濡傛灉杩欎釜鍥炶矾涔嬪墠閮借繕娌℃湁鍖哄煙,鍦ㄦ湰鐣岄潰杩樻病鏈夊叧闂箣鍓�,鍙互鏃犳潯浠堕殢渚垮彉鏇�
+                        Common.Room.CurrentRoom.ChangedRoom(device, roomKeys);
+                    }
+                }
+            };
+
             //鏇村閰嶇疆
             var btnHelp = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(49), false);
             btnHelp.Y = Application.GetRealHeight(1388);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs
index c1221c9..513b50d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs
@@ -76,18 +76,18 @@
             this.ClearBodyFrame();
 
             //鍒濆鍖栨甯�
-            this.InitFrameTable();
+            var tableContr = new InformationEditorControl();
+            this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 562, 1175);
+
             //鍒濆鍖栬澶囧洖璺浘鏍�
             this.InitDeviceEpointIcon();
 
+            //鍒濆鍖栨甯冨畬鎴�
+            tableContr.FinishInitControl(bodyFrameLayout, this.listview);
+            tableContr = null;
+
             //淇濆瓨
             var btnFinish = new BottomClickButton();
-            //鍊熺敤Y杞村潗鏍�(璁╄繖涓尯鍩熶笉鑳界偣鍑昏彍鍗�)
-            var frameBack = new FrameLayout();
-            frameBack.Y = btnFinish.Yaxis;
-            frameBack.Height = bodyFrameLayout.Height - btnFinish.Yaxis;
-            bodyFrameLayout.AddChidren(frameBack);
-
             btnFinish.TextID = R.MyInternationalizationString.uSave;
             bodyFrameLayout.AddChidren(btnFinish);
             btnFinish.ButtonClickEvent += async (sender, e) =>
@@ -166,29 +166,15 @@
             };
 
             //鎵�灞炲尯鍩�
-            List<string> listRoomName = Common.Room.CurrentRoom.GetRoomListNameByDevice(nowSelectDevice);
-            caption = Language.StringByID(R.MyInternationalizationString.uBelongArea);
-            nameValue = Common.Room.CurrentRoom.GetRoomName(listRoomName);
-            var btnBeloneArea = new FrameCaptionViewControl(caption, nameValue, listview.rowSpace / 2);
-            listview.AddChidren(btnBeloneArea);
-            btnBeloneArea.InitControl();
+            var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
+            listview.AddChidren(rowBeloneArea);
+            rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uBelongArea), nowSelectDevice);
             //搴曠嚎
-            btnBeloneArea.AddBottomLine();
-            //鍙崇澶�
-            btnBeloneArea.AddRightArrow();
-            btnBeloneArea.ButtonClickEvent += (sender, e) =>
+            rowBeloneArea.AddBottomLine();
+            rowBeloneArea.SelectRoomEvent += (roomKeys) =>
             {
-                var form = new SelectRoomForm();
-                form.AddForm(listRoomName);
-                form.ActionSelectRoom = (list) =>
-                {
-                    //鍙樻洿鎴块棿
-                    Common.Room.CurrentRoom.ChangedRoom(nowSelectDevice, list);
-
-                    btnBeloneArea.Text = Common.Room.CurrentRoom.GetRoomName(list);
-                    listRoomName.Clear();
-                    listRoomName.AddRange(list);
-                };
+                //鍙樻洿鎴块棿
+                Common.Room.CurrentRoom.ChangedRoom(nowSelectDevice, roomKeys);
             };
 
             //3璺户鐢靛櫒鎴栬��1璺皟鍏夊櫒绗竷鍥炶矾鐨勯厤缃俊鎭�
@@ -593,44 +579,6 @@
                 listIcon.Insert(0, listTemp);
             }
             return listIcon;
-        }
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖栨甯僟________________________
-
-        /// <summary>
-        /// 鍒濆鍖栨甯�
-        /// </summary>
-        private void InitFrameTable()
-        {
-            //寮у害鐨勫渾鐨勪竴鍗婄殑楂樺害(鍥哄畾)
-            int halfRoundHeigth = Application.GetRealHeight(116) / 2;
-            //寮у害鐨勫渾
-            var btnRound = new NormalViewControl(bodyFrameLayout.Width, halfRoundHeigth * 2, false);
-            btnRound.Y = Application.GetRealHeight(562);
-            btnRound.BackgroundColor = UserCenterColor.Current.White;
-            btnRound.Radius = (uint)halfRoundHeigth;
-            bodyFrameLayout.AddChidren(btnRound);
-            //鏄庣粏鍒楄〃鐨勬甯冿紝鐧借壊鑳屾櫙(瑕嗙洊寮у害鐨勫渾鐨勫崐杈�)
-            var detailBackFrame = new FrameLayout();
-            detailBackFrame.Y = btnRound.Bottom - btnRound.Height / 2;
-            detailBackFrame.Height = Application.GetRealHeight(1175);//楂樺害灏辨槸瑕佸畠瓒呰繃
-            detailBackFrame.BackgroundColor = UserCenterColor.Current.White;
-            bodyFrameLayout.AddChidren(detailBackFrame);
-
-            //璁惧缂栬緫
-            var btnTile = new NormalViewControl(800, 60, true);
-            btnTile.X = ControlCommonResourse.XXLeft;
-            btnTile.TextSize = 15;
-            btnTile.TextColor = UserCenterColor.Current.TextColor2;
-            btnTile.TextID = R.MyInternationalizationString.uDeviceEditor;
-            detailBackFrame.AddChidren(btnTile);
-
-            this.listview = new VerticalListControl(12);
-            listview.Y = btnTile.Bottom + Application.GetRealHeight(17);
-            listview.Height = Application.GetRealHeight(1175) - halfRoundHeigth - btnTile.Bottom - Application.GetRealHeight(17);
-            detailBackFrame.AddChidren(listview);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
index 5769297..6bccb26 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
@@ -68,18 +68,18 @@
             this.ClearBodyFrame();
 
             //鍒濆鍖栨甯�
-            this.InitFrameTable();
+            var tableContr = new InformationEditorControl();
+            this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 708, 1128);
+
             //鍒濆鍖栬澶囧洖璺浘鏍�
             this.InitDeviceEpointIcon();
 
+            //鍒濆鍖栨甯冨畬鎴�
+            tableContr.FinishInitControl(bodyFrameLayout, this.listview);
+            tableContr = null;
+
             //淇濆瓨
             var btnFinish = new BottomClickButton();
-            //鍊熺敤Y杞村潗鏍�(璁╄繖涓尯鍩熶笉鑳界偣鍑昏彍鍗�)
-            var frameBack = new FrameLayout();
-            frameBack.Y = btnFinish.Yaxis;
-            frameBack.Height = bodyFrameLayout.Height - btnFinish.Yaxis;
-            bodyFrameLayout.AddChidren(frameBack);
-
             btnFinish.TextID = R.MyInternationalizationString.uSave;
             bodyFrameLayout.AddChidren(btnFinish);
             btnFinish.ButtonClickEvent += async (sender, e) =>
@@ -158,29 +158,15 @@
             };
 
             //鎵�灞炲尯鍩�
-            List<string> listRoomName = Common.Room.CurrentRoom.GetRoomListNameByDevice(nowSelectDevice);
-            caption = Language.StringByID(R.MyInternationalizationString.uBelongArea);
-            nameValue = Common.Room.CurrentRoom.GetRoomName(listRoomName);
-            var btnBeloneArea = new FrameCaptionViewControl(caption, nameValue, listview.rowSpace / 2);
-            listview.AddChidren(btnBeloneArea);
-            btnBeloneArea.InitControl();
+            var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
+            listview.AddChidren(rowBeloneArea);
+            rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uBelongArea), nowSelectDevice);
             //搴曠嚎
-            btnBeloneArea.AddBottomLine();
-            //鍙崇澶�
-            btnBeloneArea.AddRightArrow();
-            btnBeloneArea.ButtonClickEvent += (sender, e) =>
+            rowBeloneArea.AddBottomLine();
+            rowBeloneArea.SelectRoomEvent += (roomKeys) =>
             {
-                var form = new SelectRoomForm();
-                form.AddForm(listRoomName);
-                form.ActionSelectRoom = (list) =>
-                {
-                    //鍙樻洿鎴块棿
-                    Common.Room.CurrentRoom.ChangedRoom(nowSelectDevice, list);
-
-                    btnBeloneArea.Text = Common.Room.CurrentRoom.GetRoomName(list);
-                    listRoomName.Clear();
-                    listRoomName.AddRange(list);
-                };
+                //鍙樻洿鎴块棿
+                Common.Room.CurrentRoom.ChangedRoom(nowSelectDevice, roomKeys);
             };
 
             //娣诲姞鍔熻兘绫诲瀷琛�
@@ -497,44 +483,6 @@
                 listIcon.Insert(0, listTemp);
             }
             return listIcon;
-        }
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖栨甯僟________________________
-
-        /// <summary>
-        /// 鍒濆鍖栨甯�
-        /// </summary>
-        private void InitFrameTable()
-        {
-            //寮у害鐨勫渾鐨勪竴鍗婄殑楂樺害(鍥哄畾)
-            int halfRoundHeigth = Application.GetRealHeight(116) / 2;
-            //寮у害鐨勫渾
-            var btnRound = new NormalViewControl(bodyFrameLayout.Width, halfRoundHeigth * 2, false);
-            btnRound.Y = Application.GetRealHeight(708);
-            btnRound.BackgroundColor = UserCenterColor.Current.White;
-            btnRound.Radius = (uint)halfRoundHeigth;
-            bodyFrameLayout.AddChidren(btnRound);
-            //鏄庣粏鍒楄〃鐨勬甯冿紝鐧借壊鑳屾櫙(瑕嗙洊寮у害鐨勫渾鐨勫崐杈�)
-            var detailBackFrame = new FrameLayout();
-            detailBackFrame.Y = btnRound.Bottom - btnRound.Height / 2;
-            detailBackFrame.Height = Application.GetRealHeight(1128);//楂樺害灏辨槸瑕佸畠瓒呰繃
-            detailBackFrame.BackgroundColor = UserCenterColor.Current.White;
-            bodyFrameLayout.AddChidren(detailBackFrame);
-
-            //璁惧缂栬緫
-            var btnTile = new NormalViewControl(800, 60, true);
-            btnTile.X = ControlCommonResourse.XXLeft;
-            btnTile.TextSize = 15;
-            btnTile.TextColor = UserCenterColor.Current.TextColor2;
-            btnTile.TextID = R.MyInternationalizationString.uDeviceEditor;
-            detailBackFrame.AddChidren(btnTile);
-
-            this.listview = new VerticalListControl(12);
-            listview.Y = btnTile.Bottom + Application.GetRealHeight(17);
-            listview.Height = Application.GetRealHeight(1028) - halfRoundHeigth - btnTile.Bottom - Application.GetRealHeight(17);
-            detailBackFrame.AddChidren(listview);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceHistoryFirmwareVersionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceHistoryFirmwareVersionForm.cs
index 8ec6bff..bb34580 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceHistoryFirmwareVersionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceHistoryFirmwareVersionForm.cs
@@ -67,7 +67,7 @@
             string selectPic = string.Empty;
             Common.LocalDevice.Current.GetDeviceBeloneIcon(listUpdateDevice, ref unSelectPic, ref selectPic);
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 string ImagType = oTADevice.ImgTypeId.ToString();
                 Application.RunOnMainThread(() =>
@@ -82,8 +82,7 @@
                         this.AddRowlayout(data, unSelectPic, selectPic);
                     }
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
index 2d698b8..f86a187 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
@@ -95,12 +95,11 @@
             //鍒濆鍖栨悳绱㈡帶浠�
             this.InitSearchControl();
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鍒濆鍖栬澶囧垪琛ㄦ帶浠�
                 this.InitDeviceListControl();
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -416,7 +415,7 @@
             }
 
             string selectGwId = HdlGatewayLogic.Current.GetGatewayId(GatewayResourse.NowSelectGateway);
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 ZbGateway zbGateway = HdlGatewayLogic.Current.GetLocalGateway(selectGwId);
                 if (zbGateway == null)
@@ -436,8 +435,7 @@
                         this.StartDeviceListControlThread(online);
                     }
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -519,13 +517,12 @@
                 return;
             }
             string gwId = HdlGatewayLogic.Current.GetGatewayId(GatewayResourse.NowSelectGateway);
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 //杩欓噷涓昏鍙槸鑾峰彇鍦ㄧ嚎鐘舵��
                 var zbway = HdlGatewayLogic.Current.GetLocalGateway(gwId);
                 var result = await Common.LocalDevice.Current.GetDeviceListFromGateway(zbway, this.ReceiveDeviceStatuPush);
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -604,7 +601,7 @@
         /// <param name="list">ota璁惧</param>
         private void CheckDeviceNewVersion(List<OTADevice> list)
         {
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 await System.Threading.Tasks.Task.Delay(2000);
                 foreach (var ota in list)
@@ -644,8 +641,7 @@
                         }
                     });
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -762,11 +758,11 @@
         /// <summary>
         /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
         /// </summary>
-        public override void FormActionAgainEvent()
+        public override int FormActionAgainEvent()
         {
             if (this.nowActionDeviceMac == null)
             {
-                return;
+                return 1;
             }
             var rowInfo = this.dicRowInfo[nowActionDeviceMac];
             //妫�娴嬭繖涓澶囨槸鍚﹁鍒犻櫎
@@ -795,6 +791,8 @@
             this.nowActionDeviceMac = null;
             //缃戝叧鎺т欢鍒锋柊
             this.gatewayViewRow.RefreshControl();
+
+            return 1;
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
index 84aa6f9..81a41e2 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -83,7 +83,8 @@
             this.ClearBodyFrame();
 
             //鍒濆鍖栨甯�
-            this.InitFrameTable();
+            var tableContr = new InformationEditorControl();
+            this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 369, 1368);
 
             //鍥剧墖
             var btnPic = new DeviceInfoIconControl(listNewDevice[0]);
@@ -124,17 +125,46 @@
             //鍒掔嚎
             btnType.AddBottomLine();
 
+            //鎵�灞炲尯鍩�
+            var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
+            listview.AddChidren(rowBeloneArea);
+            rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uBelongArea), this.listNewDevice);
+            //搴曠嚎
+            rowBeloneArea.AddBottomLine();
+
+            var listCheck = new List<string>();
+            rowBeloneArea.SelectRoomEvent += (roomKeys) =>
+            {
+                foreach (var device in this.listNewDevice)
+                {
+                    //淇濆瓨杩欎釜璁惧灞炰簬鍝釜鍖哄煙
+                    device.DeviceRoomId = roomKeys;
+                    device.ReSave();
+                    var room = Room.CurrentRoom.GetRoomByDevice(device);
+                    string mainKeys = LocalDevice.Current.GetDeviceMainKeys(device);
+                    if (room == null)
+                    {
+                        //杩欓噷鏈夌偣鐗规畩,濡傛灉鍥炶矾娌℃湁璁剧疆鏈夊尯鍩熺殑鏃跺��,鎵嶈缃�
+                        listCheck.Add(mainKeys);
+                        Room.CurrentRoom.ChangedRoom(device, roomKeys);
+                    }
+                    else if (listCheck.Contains(mainKeys) == true)
+                    {
+                        //濡傛灉杩欎釜鍥炶矾涔嬪墠閮借繕娌℃湁鍖哄煙,鍦ㄦ湰鐣岄潰杩樻病鏈夊叧闂箣鍓�,鍙互鏃犳潯浠堕殢渚垮彉鏇�
+                        Room.CurrentRoom.ChangedRoom(device, roomKeys);
+                    }
+                }
+            };
+
             //娣诲姞鍏ㄩ儴鑿滃崟
             this.AddAllMenuRow();
 
+            //鍒濆鍖栨甯冨畬鎴�
+            tableContr.FinishInitControl(bodyFrameLayout, this.listview);
+            tableContr = null;
+
             //淇濆瓨
             var btnFinish = new BottomClickButton();
-            //鍊熺敤Y杞村潗鏍�(璁╄繖涓尯鍩熶笉鑳界偣鍑昏彍鍗�)
-            var frameBack = new FrameLayout();
-            frameBack.Y = btnFinish.Yaxis;
-            frameBack.Height = bodyFrameLayout.Height - btnFinish.Yaxis;
-            bodyFrameLayout.AddChidren(frameBack);
-
             btnFinish.TextID = R.MyInternationalizationString.uSave;
             bodyFrameLayout.AddChidren(btnFinish);
             btnFinish.ButtonClickEvent += (sender, e) =>
@@ -155,53 +185,6 @@
                     this.CloseForm();
                 }
             };
-
-            var realHeight = listview.GetChildren(0).Height * listview.ChildrenCount;
-            if (bodyFrameLayout.Height - btnFinish.Yaxis + realHeight > listview.Height)
-            {
-                //淇冧娇琚尅浣忕殑鑿滃崟鑳藉鍚戜笂婊戝姩
-                var frameTemp = new FrameLayout();
-                frameTemp.Height = frameBack.Height + Application.GetRealHeight(115);
-                listview.AddChidren(frameTemp);
-            }
-        }
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖栨甯僟________________________
-
-        /// <summary>
-        /// 鍒濆鍖栨甯�
-        /// </summary>
-        private void InitFrameTable()
-        {
-            //寮у害鐨勫渾鐨勪竴鍗婄殑楂樺害(鍥哄畾)
-            int halfRoundHeigth = Application.GetRealHeight(116) / 2;
-            //寮у害鐨勫渾
-            var btnRound = new NormalViewControl(bodyFrameLayout.Width, halfRoundHeigth * 2, false);
-            btnRound.Y = Application.GetRealHeight(369);
-            btnRound.BackgroundColor = UserCenterColor.Current.White;
-            btnRound.Radius = (uint)halfRoundHeigth;
-            bodyFrameLayout.AddChidren(btnRound);
-            //鏄庣粏鍒楄〃鐨勬甯冿紝鐧借壊鑳屾櫙(瑕嗙洊寮у害鐨勫渾鐨勫崐杈�)
-            var detailBackFrame = new FrameLayout();
-            detailBackFrame.Y = btnRound.Bottom - btnRound.Height / 2;
-            detailBackFrame.Height = Application.GetRealHeight(1368);//楂樺害灏辨槸瑕佸畠瓒呰繃
-            detailBackFrame.BackgroundColor = UserCenterColor.Current.White;
-            bodyFrameLayout.AddChidren(detailBackFrame);
-
-            //淇℃伅缂栬緫
-            var btnTile = new NormalViewControl(800, 60, true);
-            btnTile.X = ControlCommonResourse.XXLeft;
-            btnTile.TextSize = 15;
-            btnTile.TextColor = UserCenterColor.Current.TextColor2;
-            btnTile.TextID = R.MyInternationalizationString.uInfoEditor;
-            detailBackFrame.AddChidren(btnTile);
-
-            this.listview = new VerticalListControl(12);
-            listview.Y = btnTile.Bottom + Application.GetRealHeight(17);
-            listview.Height = Application.GetRealHeight(1368) - halfRoundHeigth - btnTile.Bottom - Application.GetRealHeight(17);
-            detailBackFrame.AddChidren(listview);
         }
 
         #endregion
@@ -291,11 +274,8 @@
                 btnRow.UseClickStatu = false;
                 listview.AddChidren(btnRow);
                 btnRow.AddLeftCaption(caption, 600);
-                //鍚戝彸鍥炬爣
-                var btnswitch = btnRow.AddMostRightEmptyIcon(104, 63);
-                btnRow.ChangedChidrenBindMode(btnswitch, ChidrenBindMode.NotBind);
-                btnswitch.UnSelectedImagePath = "Item/Switch.png";
-                btnswitch.SelectedImagePath = "Item/SwitchSelected.png";
+                //寮�鍏冲浘鏍�
+                var btnswitch = btnRow.AddMostRightSwitchIcon();
                 //搴曠嚎
                 btnRow.AddBottomLine();
 
@@ -510,7 +490,7 @@
         /// <param name="oTADevice">ota璁惧</param>
         private void SetDeviceVersionInfo(PicViewControl btnNewVersion, OTADevice oTADevice)
         {
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 bool receiveImageInfo = false;
                 //璁剧疆璁惧鍏ㄩ儴鐨勯暅鍍忎俊鎭�
@@ -548,8 +528,7 @@
                         }
                     });
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
index 5cde688..6c3006a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
@@ -130,7 +130,7 @@
             btnProgressView.Text = "0%";
             frameProgress.AddChidren(btnProgressView);
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //钃濇墠鍒氳鏈夋椂鍊欑綉鍏充細鏀朵笉鍒板叆缃戠殑鍛戒护,鎵�浠ュ彂涓夋
                 for (int i = 0; i < 3; i++)
@@ -143,8 +143,7 @@
                     GatewayResourse.NowSelectGateway.AddNewDeviceToGateway(255);
                     System.Threading.Thread.Sleep(1000);
                 }
-            })
-            { IsBackground = true }.Start();
+            });
 
             //娣诲姞鐩戣璁惧鏂颁笂鎶ョ殑浜嬩欢
             GatewayResourse.NowSelectGateway.GwResDataAction += this.AdjustGatewayResultData;
@@ -251,7 +250,7 @@
             }
             this.isDeviceThreadStart = true;
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (this.waitDeviceTimeOut >= 0)
                 {
@@ -279,8 +278,7 @@
                         break;
                     }
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -331,7 +329,7 @@
             btnRound.Y = Application.GetMinRealAverage(475);
             bodyFrameLayout.AddChidren(btnRound);
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 int index = 1;
                 while (this.Parent != null)
@@ -350,8 +348,7 @@
                         }
                     });
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -476,7 +473,7 @@
                 return;
             }
             this.isTopicTimeOutThreadStart = true;
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (this.Parent != null && this.topTimeOut >= 0)
                 {
@@ -494,8 +491,7 @@
                         this.CloseForm();
                     });
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -511,13 +507,12 @@
             //鍋滄鎺ユ敹
             GatewayResourse.NowSelectGateway.GwResDataAction -= this.AdjustGatewayResultData;
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 System.Threading.Thread.Sleep(1200);
                 //鍏抽棴鍏ョ綉妯″紡
                 GatewayResourse.NowSelectGateway.AddNewDeviceToGateway(0);
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
index 5cb3cde..9975b3d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
@@ -98,15 +98,14 @@
 
             //涓荤嚎绋嬬殑寮傛浼氶樆濉炰富绾跨▼,瀵艰嚧鐣岄潰鏈夋鏃堕棿浼氱櫧灞�,鎵�浠ヨ繖鏍峰瓙璁╃晫闈㈠厛鍑烘潵
             //鐒跺悗鍐嶅埛鏂版暟鎹�
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 Application.RunOnMainThread(() =>
                 {
                     //鍒濆鍖栬褰曞垪琛�
                     this.InitLogListInfo();
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs
index 2285ed2..b3e6f0f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs
@@ -109,10 +109,7 @@
             //鑺傝兘妯″紡
             frameBack.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uEnergyConservationMode), 400);
             //寮�鍏虫帶浠�
-            var btnSwitch = frameBack.AddMostRightEmptyIcon(104, 63);
-            frameBack.ChangedChidrenBindMode(btnSwitch, ChidrenBindMode.NotBind);
-            btnSwitch.UnSelectedImagePath = "Item/Switch.png";
-            btnSwitch.SelectedImagePath = "Item/SwitchSelected.png";
+            var btnSwitch = frameBack.AddMostRightSwitchIcon();
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
                 btnSwitch.IsSelected = !btnSwitch.IsSelected;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs
index a28b1ef..d4c903f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs
@@ -75,18 +75,18 @@
             this.ClearBodyFrame();
 
             //鍒濆鍖栨甯�
-            this.InitFrameTable();
+            var tableContr = new InformationEditorControl();
+            this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 708, 1028);
+
             //鍒濆鍖栬澶囧洖璺浘鏍�
             this.InitDeviceEpointIcon();
 
+            //鍒濆鍖栨甯冨畬鎴�
+            tableContr.FinishInitControl(bodyFrameLayout, this.listview);
+            tableContr = null;
+
             //淇濆瓨
             var btnFinish = new BottomClickButton();
-            //鍊熺敤Y杞村潗鏍�(璁╄繖涓尯鍩熶笉鑳界偣鍑昏彍鍗�)
-            var frameBack = new FrameLayout();
-            frameBack.Y = btnFinish.Yaxis;
-            frameBack.Height = bodyFrameLayout.Height - btnFinish.Yaxis;
-            bodyFrameLayout.AddChidren(frameBack);
-
             btnFinish.TextID = R.MyInternationalizationString.uSave;
             bodyFrameLayout.AddChidren(btnFinish);
             btnFinish.ButtonClickEvent += async (sender, e) =>
@@ -165,29 +165,15 @@
             };
 
             //鎵�灞炲尯鍩�
-            List<string> listRoomName = Common.Room.CurrentRoom.GetRoomListNameByDevice(nowSelectDevice);
-            caption = Language.StringByID(R.MyInternationalizationString.uBelongArea);
-            nameValue = Common.Room.CurrentRoom.GetRoomName(listRoomName);
-            var btnBeloneArea = new FrameCaptionViewControl(caption, nameValue, listview.rowSpace / 2);
-            listview.AddChidren(btnBeloneArea);
-            btnBeloneArea.InitControl();
+            var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
+            listview.AddChidren(rowBeloneArea);
+            rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uBelongArea), nowSelectDevice);
             //搴曠嚎
-            btnBeloneArea.AddBottomLine();
-            //鍙崇澶�
-            btnBeloneArea.AddRightArrow();
-            btnBeloneArea.ButtonClickEvent += (sender, e) =>
+            rowBeloneArea.AddBottomLine();
+            rowBeloneArea.SelectRoomEvent += (roomKeys) =>
             {
-                var form = new SelectRoomForm();
-                form.AddForm(listRoomName);
-                form.ActionSelectRoom = (list) =>
-                {
-                    //鍙樻洿鎴块棿
-                    Common.Room.CurrentRoom.ChangedRoom(nowSelectDevice, list);
-
-                    btnBeloneArea.Text = Common.Room.CurrentRoom.GetRoomName(list);
-                    listRoomName.Clear();
-                    listRoomName.AddRange(list);
-                };
+                //鍙樻洿鎴块棿
+                Common.Room.CurrentRoom.ChangedRoom(nowSelectDevice, roomKeys);
             };
 
             //娣诲姞缁戝畾鐩爣琛�
@@ -533,44 +519,6 @@
             frameBack.AddChidren(frame4);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame4, listDevice[3], false);
-        }
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖栨甯僟________________________
-
-        /// <summary>
-        /// 鍒濆鍖栨甯�
-        /// </summary>
-        private void InitFrameTable()
-        {
-            //寮у害鐨勫渾鐨勪竴鍗婄殑楂樺害(鍥哄畾)
-            int halfRoundHeigth = Application.GetRealHeight(116) / 2;
-            //寮у害鐨勫渾
-            var btnRound = new NormalViewControl(bodyFrameLayout.Width, halfRoundHeigth * 2, false);
-            btnRound.Y = Application.GetRealHeight(708);
-            btnRound.BackgroundColor = UserCenterColor.Current.White;
-            btnRound.Radius = (uint)halfRoundHeigth;
-            bodyFrameLayout.AddChidren(btnRound);
-            //鏄庣粏鍒楄〃鐨勬甯冿紝鐧借壊鑳屾櫙(瑕嗙洊寮у害鐨勫渾鐨勫崐杈�)
-            var detailBackFrame = new FrameLayout();
-            detailBackFrame.Y = btnRound.Bottom - btnRound.Height / 2;
-            detailBackFrame.Height = Application.GetRealHeight(1028);//楂樺害灏辨槸瑕佸畠瓒呰繃
-            detailBackFrame.BackgroundColor = UserCenterColor.Current.White;
-            bodyFrameLayout.AddChidren(detailBackFrame);
-
-            //璁惧缂栬緫
-            var btnTile = new NormalViewControl(800, 60, true);
-            btnTile.X = ControlCommonResourse.XXLeft;
-            btnTile.TextSize = 15;
-            btnTile.TextColor = UserCenterColor.Current.TextColor2;
-            btnTile.TextID = R.MyInternationalizationString.uDeviceEditor;
-            detailBackFrame.AddChidren(btnTile);
-
-            this.listview = new VerticalListControl(12);
-            listview.Y = btnTile.Bottom + Application.GetRealHeight(17);
-            listview.Height = Application.GetRealHeight(1028) - halfRoundHeigth - btnTile.Bottom - Application.GetRealHeight(17);
-            detailBackFrame.AddChidren(listview);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs
index dfba0ac..19e6442 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs
@@ -68,18 +68,18 @@
             this.ClearBodyFrame();
 
             //鍒濆鍖栨甯�
-            this.InitFrameTable();
+            var tableContr = new InformationEditorControl();
+            this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 708, 1028);
+           
             //鍒濆鍖栬澶囧洖璺浘鏍�
             this.InitDeviceEpointIcon();
 
+            //鍒濆鍖栨甯冨畬鎴�
+            tableContr.FinishInitControl(bodyFrameLayout, this.listview);
+            tableContr = null;
+
             //淇濆瓨
             var btnFinish = new BottomClickButton();
-            //鍊熺敤Y杞村潗鏍�(璁╄繖涓尯鍩熶笉鑳界偣鍑昏彍鍗�)
-            var frameBack = new FrameLayout();
-            frameBack.Y = btnFinish.Yaxis;
-            frameBack.Height = bodyFrameLayout.Height - btnFinish.Yaxis;
-            bodyFrameLayout.AddChidren(frameBack);
-
             btnFinish.TextID = R.MyInternationalizationString.uSave;
             bodyFrameLayout.AddChidren(btnFinish);
             btnFinish.ButtonClickEvent += async (sender, e) =>
@@ -158,29 +158,15 @@
             };
 
             //鎵�灞炲尯鍩�
-            List<string> listRoomName = Common.Room.CurrentRoom.GetRoomListNameByDevice(nowSelectDevice);
-            caption = Language.StringByID(R.MyInternationalizationString.uBelongArea);
-            nameValue = Common.Room.CurrentRoom.GetRoomName(listRoomName);
-            var btnBeloneArea = new FrameCaptionViewControl(caption, nameValue, listview.rowSpace / 2);
-            listview.AddChidren(btnBeloneArea);
-            btnBeloneArea.InitControl();
+            var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
+            listview.AddChidren(rowBeloneArea);
+            rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uBelongArea), nowSelectDevice);
             //搴曠嚎
-            btnBeloneArea.AddBottomLine();
-            //鍙崇澶�
-            btnBeloneArea.AddRightArrow();
-            btnBeloneArea.ButtonClickEvent += (sender, e) =>
+            rowBeloneArea.AddBottomLine();
+            rowBeloneArea.SelectRoomEvent += (roomKeys) =>
             {
-                var form = new SelectRoomForm();
-                form.AddForm(listRoomName);
-                form.ActionSelectRoom = (list) =>
-                {
-                    //鍙樻洿鎴块棿
-                    Common.Room.CurrentRoom.ChangedRoom(nowSelectDevice, list);
-
-                    btnBeloneArea.Text = Common.Room.CurrentRoom.GetRoomName(list);
-                    listRoomName.Clear();
-                    listRoomName.AddRange(list);
-                };
+                //鍙樻洿鎴块棿
+                Common.Room.CurrentRoom.ChangedRoom(nowSelectDevice, roomKeys);
             };
 
             //娣诲姞鍔熻兘绫诲瀷琛�
@@ -555,44 +541,6 @@
             frameBack.AddChidren(frame4);
             //鍒濆鍖栬澶囧浘鏍�
             this.InitDeviceIcon(frame4, listDevice[3], false);
-        }
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖栨甯僟________________________
-
-        /// <summary>
-        /// 鍒濆鍖栨甯�
-        /// </summary>
-        private void InitFrameTable()
-        {
-            //寮у害鐨勫渾鐨勪竴鍗婄殑楂樺害(鍥哄畾)
-            int halfRoundHeigth = Application.GetRealHeight(116) / 2;
-            //寮у害鐨勫渾
-            var btnRound = new NormalViewControl(bodyFrameLayout.Width, halfRoundHeigth * 2, false);
-            btnRound.Y = Application.GetRealHeight(708);
-            btnRound.BackgroundColor = UserCenterColor.Current.White;
-            btnRound.Radius = (uint)halfRoundHeigth;
-            bodyFrameLayout.AddChidren(btnRound);
-            //鏄庣粏鍒楄〃鐨勬甯冿紝鐧借壊鑳屾櫙(瑕嗙洊寮у害鐨勫渾鐨勫崐杈�)
-            var detailBackFrame = new FrameLayout();
-            detailBackFrame.Y = btnRound.Bottom - btnRound.Height / 2;
-            detailBackFrame.Height = Application.GetRealHeight(1028);//楂樺害灏辨槸瑕佸畠瓒呰繃
-            detailBackFrame.BackgroundColor = UserCenterColor.Current.White;
-            bodyFrameLayout.AddChidren(detailBackFrame);
-
-            //璁惧缂栬緫
-            var btnTile = new NormalViewControl(800, 60, true);
-            btnTile.X = ControlCommonResourse.XXLeft;
-            btnTile.TextSize = 15;
-            btnTile.TextColor = UserCenterColor.Current.TextColor2;
-            btnTile.TextID = R.MyInternationalizationString.uDeviceEditor;
-            detailBackFrame.AddChidren(btnTile);
-
-            this.listview = new VerticalListControl(12);
-            listview.Y = btnTile.Bottom + Application.GetRealHeight(17);
-            listview.Height = Application.GetRealHeight(1028) - halfRoundHeigth - btnTile.Bottom - Application.GetRealHeight(17);
-            detailBackFrame.AddChidren(listview);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetForm.cs
index 60f5f34..6a3ddb9 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetForm.cs
@@ -70,7 +70,7 @@
         //    //寮�鍚繘搴︽潯
         //    this.ShowProgressBar();
 
-        //    new System.Threading.Thread(async () =>
+        //    HdlThreadLogic.Current.Run(async () =>
         //    {
         //        List<CommonDevice> listDevice = await HdlDeviceBindLogic.Current.GetBindTargetDevice(this.deviceIASZone);
         //        if (listDevice == null)
@@ -91,8 +91,7 @@
         //        }
         //        //鍏抽棴杩涘害鏉�
         //        this.CloseProgressBar();
-        //    })
-        //    { IsBackground = true }.Start();
+        //    });
         //}
 
         ///// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayThreeLoadBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayThreeLoadBackLightSettionForm.cs
index 80eeebc..a30be7c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayThreeLoadBackLightSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayThreeLoadBackLightSettionForm.cs
@@ -142,10 +142,7 @@
             //鑺傝兘妯″紡
             frameBack.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uEnergyConservationMode), 400);
             //寮�鍏虫帶浠�
-            var btnSwitch = frameBack.AddMostRightEmptyIcon(104, 63);
-            frameBack.ChangedChidrenBindMode(btnSwitch, ChidrenBindMode.NotBind);
-            btnSwitch.UnSelectedImagePath = "Item/Switch.png";
-            btnSwitch.SelectedImagePath = "Item/SwitchSelected.png";
+            var btnSwitch = frameBack.AddMostRightSwitchIcon();
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
                 btnSwitch.IsSelected = !btnSwitch.IsSelected;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs
index cb7d3cf..f751770 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs
@@ -131,7 +131,7 @@
             //寮�鍚�掕鏃剁嚎绋�
             this.StartTimeCountThread(textValue);
 
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 while (this.IsThreadAction)
                 {
@@ -145,8 +145,7 @@
                     //妫�娴嬫悳绱㈠埌鐨勭綉鍏筹紝鐒跺悗娣诲姞鍒扮敾闈㈢殑琛岄噷闈�
                     await this.CheckZbGatewayAndSetRow();
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -158,7 +157,7 @@
             //鎼滅储鏃堕棿
             this.searchTime = 60;
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (this.IsThreadAction)
                 {
@@ -187,8 +186,7 @@
                         btnStop.Text = textValue;
                     }
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessGatewaySearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessGatewaySearchForm.cs
index 501dc8a..18a1bbc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessGatewaySearchForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessGatewaySearchForm.cs
@@ -145,7 +145,7 @@
             frame.AddChidren(btnRound);
 
             animateThread = true;
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 int index = 1;
                 int timeCount = 0;
@@ -176,8 +176,7 @@
                         }
                     });
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -189,7 +188,7 @@
         /// </summary>
         private void CheckZbGatewayAndSetRow()
         {
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 while (animateThread == true && this.Parent != null)
                 {
@@ -273,8 +272,7 @@
                         }
                     }
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayFirmwareInfoForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayFirmwareInfoForm.cs
index f0ff043..126e2fe 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayFirmwareInfoForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayFirmwareInfoForm.cs
@@ -71,7 +71,7 @@
         //        this.ShowProgressBar();
         //    }
 
-        //    new System.Threading.Thread(async () =>
+        //    HdlThreadLogic.Current.Run(async () =>
         //    {
         //        //鑾峰彇缃戝叧鏂扮増鏈俊鎭�
         //        this.listVersionInfo = await Common.LocalGateway.Current.GetGatewayAllNewVersion(this.zbGateway);
@@ -102,8 +102,7 @@
         //            //娣诲姞鍥轰欢鍗囩骇琛�
         //            this.AddFirmwareUpdateRow();
         //        });
-        //    })
-        //    { IsBackground = true }.Start();
+        //    });
         //}
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayHistoryFirmwareVersionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayHistoryFirmwareVersionForm.cs
index ea4aa17..b3f61e2 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayHistoryFirmwareVersionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayHistoryFirmwareVersionForm.cs
@@ -95,7 +95,7 @@
         //             this.listVode[0].DriveImageType.ToString());
         //    }
 
-        //    new System.Threading.Thread(() =>
+        //    HdlThreadLogic.Current.Run(() =>
         //    {
         //        string fVersion = Common.LocalGateway.Current.GetGwInfoAttribute(upDatezbGateway, "LinuxFWVersion").ToString();
         //        string imageType = Common.LocalGateway.Current.GetGwInfoAttribute(upDatezbGateway, "LinuxImageType").ToString();
@@ -140,8 +140,7 @@
         //                this.AddRowlayout(data, FirmwareLevelType.VirtualDevice);
         //            });
         //        }
-        //    })
-        //    { IsBackground = true }.Start();
+        //    });
         //}
 
         ///// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
index 1e3c05f..d32bd4c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
@@ -379,7 +379,7 @@
             }
             oldGetOnlineTime = DateTime.Now;
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 System.Threading.Thread.Sleep(300);
                 //鍒锋柊缃戝叧鍦ㄧ嚎鐘舵��
@@ -395,8 +395,7 @@
                 }
                 //缃戝叧鏂扮増鏈娴�
                 this.CheckGatewayNewVersion(listway);
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -492,10 +491,11 @@
         /// <summary>
         /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
         /// </summary>
-        public override void FormActionAgainEvent()
+        public override int FormActionAgainEvent()
         {
             //鍒濆鍖栦腑閮ㄦ帶浠�
             this.InitMiddleFrame();
+            return 1;
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackUpForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackUpForm.cs
index 4f48312..02888e6 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackUpForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackUpForm.cs
@@ -43,7 +43,7 @@
             //娓呯┖bodyFrame
             this.ClearBodyFrame();
 
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 //杩涘害鏉�
                 this.ShowProgressBar();
@@ -65,8 +65,7 @@
                         this.m_BackupDeleteClassId = data[0].Id;
                     }
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -123,7 +122,7 @@
         /// <param name="BackupClassId"></param>
         private void LoadBackupInfo(string BackupClassId)
         {
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 //浠庝簯绔幏鍙栧浠界殑鏂囦欢
                 bool result = await HdlBackupLogic.Current.LoadAppBackupInfo(BackupClassId);
@@ -146,8 +145,7 @@
                 //鏂囦欢鎭㈠鎴愬姛
                 string msg = Language.StringByID(R.MyInternationalizationString.uFileRecoverSuccess);
                 this.ShowMassage(ShowMsgType.Normal, msg);
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -159,7 +157,7 @@
         /// </summary>
         public void UpLoadBackupInfo()
         {
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 int result = await HdlAutoBackupLogic.DoUpLoadAutoBackupData();
                 if (result == -1)
@@ -182,8 +180,7 @@
                         this.InitMiddleFrame();
                     }
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
         #endregion
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupSettionForm.cs
index 124706e..23a4fda 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackupSettionForm.cs
@@ -96,13 +96,12 @@
         //public void UpLoadBackupInfo()
         //{
         //    //鍥為伩鐣岄潰鍗℃闂
-        //    new System.Threading.Thread(() =>
+        //    HdlThreadLogic.Current.Run(() =>
         //    {
         //        //涓婁紶鏁版嵁
         //        this.UpLoadBackupInfoAsync();
-        //    })
-        //    { IsBackground = true }.Start();
-            
+        //    });
+
         //}
 
         ///// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayBackUpForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayBackUpForm.cs
index 2251c8d..2e6c079 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayBackUpForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayBackUpForm.cs
@@ -65,12 +65,11 @@
         //    listView.Height = bodyFrameLayout.Height;
         //    bodyFrameLayout.AddChidren(listView);
 
-        //    new System.Threading.Thread(() =>
+        //    HdlThreadLogic.Current.Run(() =>
         //    {
         //        //浠庝簯绔幏鍙栨暟鎹�
         //        this.SetBackupInfoToForm();
-        //    })
-        //    { IsBackground = true }.Start();
+        //    });
         //}
 
         #endregion
@@ -184,7 +183,7 @@
         ///// <param name="BackupClassId"></param>
         //public void LoadBackupInfo(string BackupClassId)
         //{
-        //    new System.Threading.Thread(async () =>
+        //    HdlThreadLogic.Current.Run(async () =>
         //    {
         //        //鑾峰彇缃戝叧涓婇潰瀛樺湪鐨勫叏閮ㄦ枃浠�
         //        var listFile = await this.GetGatewayFileFromGateway();
@@ -211,8 +210,7 @@
         //        //缃戝叧鎭㈠鎴愬姛
         //        string msg = Language.StringByID(R.MyInternationalizationString.uGatewayFileRecoverSuccess);
         //        this.ShowNormalMsg(msg);
-        //    })
-        //    { IsBackground = true }.Start();
+        //    });
         //}
 
         //#endregion
@@ -259,7 +257,7 @@
         //    appendText = Language.StringByID(R.MyInternationalizationString.uDataUpLoad);
         //    ProgressBar.SetAppendText(appendText);
 
-        //    new System.Threading.Thread(async () =>
+        //    HdlThreadLogic.Current.Run(async () =>
         //    {
         //        //涓婁紶鏁版嵁鍒颁簯绔�
         //        directory = UserCenterLogic.CombinePath(directory);
@@ -281,8 +279,7 @@
 
         //        //鍒锋柊鐢婚潰
         //        this.SetBackupInfoToForm();
-        //    })
-        //    { IsBackground = true }.Start();
+        //    });
         //}
 
         //#endregion
@@ -446,7 +443,7 @@
         //    {
         //        return null;
         //    }
-            
+
         //    int timeOutCount = 0;
         //    bool receiving = false;
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayListBackUpForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayListBackUpForm.cs
index 43dcb15..8c39464 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayListBackUpForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayListBackUpForm.cs
@@ -62,7 +62,7 @@
             //璁剧疆鎺ュ彈鍦ㄧ嚎鐘舵�佹帹閫�
             this.AddGatewayOnlinePush();
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 List<ZbGateway> listway = HdlGatewayLogic.Current.GetAllLocalGateway();
                 if (listway.Count == 0)
@@ -83,8 +83,7 @@
                     //寮�鍚綉鍏冲湪绾跨洃娴嬬殑绾跨▼
                     this.StartGatewayOnlieCheckThread(listway);
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -157,7 +156,7 @@
         /// <param name="listway"></param>
         private void StartGatewayOnlieCheckThread(List<ZbGateway> listway)
         {
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 System.Threading.Thread.Sleep(300);
                 //鍒锋柊缃戝叧鍦ㄧ嚎鐘舵��
@@ -173,8 +172,7 @@
                 }
                 //缃戝叧鏂扮増鏈娴�
                 this.CheckGatewayNewVersion(listway);
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlManualBackUpForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlManualBackUpForm.cs
index a4b8721..47fbae8 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlManualBackUpForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlManualBackUpForm.cs
@@ -56,12 +56,11 @@
             listView.Height = bodyFrameLayout.Height;
             bodyFrameLayout.AddChidren(listView);
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //浠庝簯绔幏鍙栨暟鎹�
                 this.SetBackupInfoToForm();
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -183,7 +182,7 @@
         /// <param name="BackupClassId"></param>
         private void LoadBackupInfo(string BackupClassId)
         {
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 //浠庝簯绔幏鍙栧浠界殑鏂囦欢
                 bool result = await HdlBackupLogic.Current.LoadAppBackupInfo(BackupClassId);
@@ -206,8 +205,7 @@
                 //鏂囦欢鎭㈠鎴愬姛
                 string msg = Language.StringByID(R.MyInternationalizationString.uFileRecoverSuccess);
                 this.ShowMassage(ShowMsgType.Normal, msg);
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -220,7 +218,7 @@
         /// <param name="backName"></param>
         private void UpLoadBackInfo(string backName)
         {
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 //鍒涘缓涓�涓浠藉悕瀛�
                 string backupClassId = await HdlBackupLogic.Current.CreatNewBackupNameToDB(backName);
@@ -247,14 +245,12 @@
                     return;
                 }
 
-                new System.Threading.Thread(() =>
+                HdlThreadLogic.Current.RunThread(() =>
                 {
                     //浠庝簯绔幏鍙栨暟鎹�
                     this.SetBackupInfoToForm();
-                })
-                { IsBackground = true }.Start();
-            })
-            { IsBackground = true }.Start();
+                });
+            });
         }
 
         #endregion
@@ -288,12 +284,11 @@
                 return;
             }
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //浠庝簯绔幏鍙栨暟鎹�
                 this.SetBackupInfoToForm();
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -326,12 +321,11 @@
                 return;
             }
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //浠庝簯绔幏鍙栨暟鎹�
                 this.SetBackupInfoToForm();
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -352,14 +346,13 @@
             dialogForm.SetTitleText(Language.StringByID(R.MyInternationalizationString.uEditorBackup));
             //璇疯緭鍏ュ娉ㄥ悕绉�
             dialogForm.SetTipText(Language.StringByID(R.MyInternationalizationString.uPleaseInpuBackup));
-            dialogForm.InputText = fileInfo.BackupName;
+            dialogForm.Text = fileInfo.BackupName;
 
             //鎸変笅纭鎸夐挳
-            dialogForm.ComfirmClickEvent += (() =>
+            dialogForm.ComfirmClickEvent += ((textValue) =>
             {
-                string txtvalue = dialogForm.InputText;
                 //妫�娴嬪鑰冨悕绉�
-                if (this.CheckBackupName(txtvalue) == false)
+                if (this.CheckBackupName(textValue) == false)
                 {
                     return;
                 }
@@ -368,10 +361,10 @@
                 dialogForm.CloseDialog();
 
                 //鍚嶅瓧涓�鏍锋椂锛屼笉澶勭悊
-                if (txtvalue != fileInfo.BackupName)
+                if (textValue != fileInfo.BackupName)
                 {
                     //缂栬緫澶囦唤鍚嶇О
-                    this.EditorBackInfo(fileInfo.Id, txtvalue);
+                    this.EditorBackInfo(fileInfo.Id, textValue);
                 }
             });
         }
@@ -391,11 +384,10 @@
             dialogForm.SetTipText(Language.StringByID(R.MyInternationalizationString.uPleaseInpuBackup));
 
             //鎸変笅纭鎸夐挳
-            dialogForm.ComfirmClickEvent += (() =>
+            dialogForm.ComfirmClickEvent += ((textValue) =>
             {
-                string txtvalue = dialogForm.InputText;
                 //妫�娴嬪鑰冨悕绉�
-                if (this.CheckBackupName(txtvalue) == false)
+                if (this.CheckBackupName(textValue) == false)
                 {
                     return;
                 }
@@ -404,7 +396,7 @@
                 dialogForm.CloseDialog();
 
                 //涓婁紶澶囦唤
-                this.UpLoadBackInfo(txtvalue);
+                this.UpLoadBackInfo(textValue);
             });
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
index 81b3c85..a50a04e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
@@ -321,7 +321,7 @@
         /// <summary>
         /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
         /// </summary>
-        public override void FormActionAgainEvent()
+        public override int FormActionAgainEvent()
         {
             //娓呯┖鍏变韩鏂囦欢澶�
             HdlShardLogic.Current.ClearShardDirectory();
@@ -331,6 +331,8 @@
 
             //娣诲姞鎴愬憳鍒楄〃
             this.AddMemberListRowByData();
+
+            return 1;
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
index deaf1b7..da175eb 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
@@ -222,10 +222,7 @@
             btnName.TextSize = 15;
 
             //寮�鍏�
-            var btnSwitch = row.AddMostRightEmptyIcon(104, 63);
-            row.ChangedChidrenBindMode(btnSwitch, ChidrenBindMode.NotBind);
-            btnSwitch.UnSelectedImagePath = "Item/Switch.png";
-            btnSwitch.SelectedImagePath = "Item/SwitchSelected.png";
+            var btnSwitch = row.AddMostRightSwitchIcon();
             btnSwitch.ButtonClickEvent += (sender, e) =>
             {
                 btnSwitch.IsSelected = !btnSwitch.IsSelected;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs
index 77ae83e..ae24813 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs
@@ -168,7 +168,7 @@
             int waitime = 300;
             btnNext.Text = waitime + "s" + repeat;
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (this.Parent != null)
                 {
@@ -197,8 +197,7 @@
                         }
                     });
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs
index 2bc03be..f85afd8 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs
@@ -188,7 +188,7 @@
             int waitime = 300;
             btnNext.Text = waitime + "s" + repeat;
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (this.Parent != null)
                 {
@@ -217,8 +217,7 @@
                         }
                     });
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs
index 3c21373..b642833 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs
@@ -137,7 +137,7 @@
             int waitime = 300;
             btnNext.Text = waitime + "s" + repeat;
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (this.Parent != null)
                 {
@@ -166,8 +166,7 @@
                         }
                     });
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs
index 2279789..4763aba 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs
@@ -150,7 +150,7 @@
             int waitime = 300;
             btnNext.Text = waitime + "s" + repeat;
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (this.Parent != null)
                 {
@@ -179,8 +179,7 @@
                         }
                     });
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs
index 2495684..a8ad87f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotAccountPasswordForm.cs
@@ -191,7 +191,7 @@
             int waitime = 300;
             btnCode.Text = waitime + "s" + repeat;
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (this.Parent != null)
                 {
@@ -221,8 +221,7 @@
                         }
                     });
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs
index 70369a2..491a55a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/ForgotSecondaryPasswordForm.cs
@@ -191,7 +191,7 @@
             int waitime = 300;
             btnCode.Text = waitime + "s" + repeat;
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 while (this.Parent != null)
                 {
@@ -221,8 +221,7 @@
                         }
                     });
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
new file mode 100755
index 0000000..bd256dd
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
@@ -0,0 +1,225 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter.Residence
+{
+    /// <summary>
+    /// 娣诲姞鏂版埧闂寸殑鐣岄潰
+    /// </summary>
+    public class AddNewRoomForm : EditorCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 鍒楄〃鎺т欢
+        /// </summary>
+        private VerticalListControl listview = null;
+        /// <summary>
+        /// 妤煎眰涓婚敭
+        /// </summary>
+        private string floorKeys = string.Empty;
+        /// <summary>
+        /// 鏂版埧闂村璞�
+        /// </summary>
+        private Common.Room newRoom = null;
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        /// <param name="i_floorKeys">妤煎眰涓婚敭</param>
+        public void ShowForm(string i_floorKeys)
+        {
+            this.floorKeys = i_floorKeys;
+            //璁剧疆澶撮儴淇℃伅
+            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uCreatRoom));
+
+            //鍒濆鍖栦腑閮ㄤ俊鎭�
+            this.InitMiddleFrame();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+        /// </summary>
+        private void InitMiddleFrame()
+        {
+            //娓呯┖bodyFrame
+            this.ClearBodyFrame();
+
+            var btnPic = new PicViewControl(887, 444);
+            btnPic.Y = Application.GetRealHeight(60);
+            btnPic.Gravity = Gravity.CenterHorizontal;
+            btnPic.UnSelectedImagePath = "Room/r0.png";
+            bodyFrameLayout.AddChidren(btnPic);
+
+            this.newRoom = new Common.Room();
+            newRoom.FloorId = this.floorKeys;
+            newRoom.BackgroundImage = btnPic.UnSelectedImagePath;
+
+            //鍒濆鍖栨甯�
+            var tableContr = new InformationEditorControl();
+            this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 562, 1175);
+
+            //娣诲姞鍏ㄩ儴鑿滃崟
+            this.AddAllMenuRow(tableContr);
+        }
+
+        #endregion
+
+        #region 鈻� 娣诲姞鑿滃崟___________________________
+
+        /// <summary>
+        /// 娣诲姞鍏ㄩ儴鑿滃崟
+        /// </summary>
+        private void AddAllMenuRow(InformationEditorControl tableContr)
+        {
+            //銆愭埧闂村悕绉般��
+            var txtRoomName = new FrameCaptionInputControl(Language.StringByID(R.MyInternationalizationString.uRoomName), string.Empty, this.listview.rowSpace / 2);
+            txtRoomName.txtInput.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputRoomName);
+            listview.AddChidren(txtRoomName);
+            txtRoomName.InitControl();
+            //搴曠嚎
+            txtRoomName.AddBottomLine();
+
+            //銆愭墍灞炴ゼ灞傘��
+            var btnBelone = new FrameCaptionViewControl(Language.StringByID(R.MyInternationalizationString.uBelongeFloor), Common.Config.Instance.Home.FloorDics[this.floorKeys], this.listview.rowSpace / 2);
+            listview.AddChidren(btnBelone);
+            btnBelone.InitControl();
+            //鍙崇澶�
+            btnBelone.AddRightArrow();
+            //搴曠嚎
+            btnBelone.AddBottomLine();
+            btnBelone.ButtonClickEvent += (sender, e) =>
+            {
+                //妤煎眰閫夋嫨
+                this.ShowSelectFloor(btnBelone);
+            };
+
+            //銆愭俯搴︺��
+            var rowTemperature = new FrameRowControl(this.listview.rowSpace / 2);
+            listview.AddChidren(rowTemperature);
+            rowTemperature.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uTemperature), 600);
+            //鍙崇澶�
+            rowTemperature.AddRightArrow();
+            var btnTemper = rowTemperature.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uNothing), 300);
+            //搴曠嚎
+            rowTemperature.AddBottomLine();
+            rowTemperature.ButtonClickEvent += (sender, e) =>
+            {
+            };
+
+            //銆愭箍搴︺��
+            var rowHumidity = new FrameRowControl(this.listview.rowSpace / 2);
+            listview.AddChidren(rowHumidity);
+            rowHumidity.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uHumidity), 600);
+            //鍙崇澶�
+            rowHumidity.AddRightArrow();
+            var btnHumi = rowHumidity.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uNothing), 300);
+            //搴曠嚎
+            rowHumidity.AddBottomLine();
+            rowHumidity.ButtonClickEvent += (sender, e) =>
+            {
+            };
+
+            //鍒濆鍖栨甯冨畬鎴�
+            tableContr.FinishInitControl(bodyFrameLayout, this.listview);
+            tableContr = null;
+            //淇濆瓨
+            var btnFinish = new BottomClickButton();
+            btnFinish.TextID = R.MyInternationalizationString.uSave;
+            bodyFrameLayout.AddChidren(btnFinish);
+            btnFinish.ButtonClickEvent += (sender, e) =>
+            {
+                this.newRoom.Name = txtRoomName.Text;
+                //妫�娴嬭兘鍚︿繚瀛樻埧闂�
+                if (this.CheckCanSaveRoom() == false)
+                {
+                    return;
+                }
+                var result = newRoom.AddRoom(newRoom);
+                if (result == false)
+                {
+                    //鎻愮ず鐢ㄦ埛娣诲姞澶辫触
+                    this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.FAIL));
+                }
+                else
+                {
+                    this.CloseForm();
+                }
+            };
+        }
+
+        #endregion
+
+        #region 鈻� 妤煎眰閫夋嫨___________________________
+
+        /// <summary>
+        /// 妤煎眰閫夋嫨
+        /// </summary>
+        /// <param name="control"></param>
+        private void ShowSelectFloor(FrameCaptionViewControl control)
+        {
+            var dicFloor = Common.Room.CurrentRoom.GetFloorSortList();
+
+            var listKeys = new List<string>();
+            var listName = new List<string>();
+            int index = 0;
+            foreach (string keys in dicFloor.Keys)
+            {
+                listKeys.Add(keys);
+                listName.Add(dicFloor[keys]);
+                if (keys == this.floorKeys)
+                {
+                    index = listKeys.Count - 1;
+                }
+            }
+            PickerView.Show(listName, (value) =>
+             {
+                 control.txtView.Text = listName[value];
+                 //涓婚敭淇敼
+                 this.floorKeys = listKeys[value];
+             },
+            index,
+            Language.StringByID(R.MyInternationalizationString.uBelongeFloor),
+            Language.StringByID(R.MyInternationalizationString.uFinish),
+            Language.StringByID(R.MyInternationalizationString.uCancel));
+        }
+
+        #endregion
+
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        /// <summary>
+        /// 妫�娴嬭兘鍚︿繚瀛樻埧闂�
+        /// </summary>
+        /// <returns></returns>
+        private bool CheckCanSaveRoom()
+        {
+            if (this.newRoom.Name == string.Empty)
+            {
+                //璇疯緭鍏ユ埧闂村悕绉�
+                this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseInputRoomName));
+                return false;
+            }
+            if (Shared.Common.Room.Lists.Find((obj) => obj.Name == this.newRoom.Name) != null)
+            {
+                this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom));
+                return false;
+            }
+            if (newRoom.BackgroundImageType == 1 || newRoom.BackgroundImageType == 2)
+            {
+                this.newRoom.MoveBackGroundIamageFileToDirectory(newRoom.BackgroundImage, newRoom.BackgroundImage);
+                this.newRoom.BackgroundImage = $"{Common.Config.Instance.Guid}/{Common.Config.Instance.HomeId}/{newRoom.BackgroundImage}";
+            }
+            newRoom.FloorId = this.floorKeys;
+
+            return true;
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
new file mode 100755
index 0000000..37409c4
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
@@ -0,0 +1,219 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter.Residence
+{
+    /// <summary>
+    /// 缂栬緫鎴块棿淇℃伅鐨勭晫闈�
+    /// </summary>
+    public class EditorRoomInforForm : EditorCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 鍒楄〃鎺т欢
+        /// </summary>
+        private VerticalListControl listview = null;
+        /// <summary>
+        /// 鎴块棿瀵硅薄
+        /// </summary>
+        private Common.Room editorRoom = null;
+        /// <summary>
+        /// 鍏嬮殕瀵硅薄
+        /// </summary>
+        private Common.Room cloneRoom = null;
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        /// <param name="i_editorRoom">缂栬緫鐨勬埧闂村璞�</param>
+        public void ShowForm(Common.Room i_editorRoom = null)
+        {
+            this.editorRoom = i_editorRoom;
+            this.cloneRoom = i_editorRoom.CloneRoomClass();
+            //璁剧疆澶撮儴淇℃伅
+            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uEditorRoom));
+
+            //鍒濆鍖栦腑閮ㄤ俊鎭�
+            this.InitMiddleFrame();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+        /// </summary>
+        private void InitMiddleFrame()
+        {
+            //娓呯┖bodyFrame
+            this.ClearBodyFrame();
+
+            var btnPic = new PicViewControl(887, 444);
+            btnPic.Y = Application.GetRealHeight(60);
+            btnPic.Gravity = Gravity.CenterHorizontal;
+            btnPic.UnSelectedImagePath = this.cloneRoom.BackgroundImage;
+            bodyFrameLayout.AddChidren(btnPic);
+
+            //鍒濆鍖栨甯�
+            var tableContr = new InformationEditorControl();
+            this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 562, 1175);
+
+            //娣诲姞鍏ㄩ儴鑿滃崟
+            this.AddAllMenuRow(tableContr);
+        }
+
+        #endregion
+
+        #region 鈻� 娣诲姞鑿滃崟___________________________
+
+        /// <summary>
+        /// 娣诲姞鍏ㄩ儴鑿滃崟
+        /// </summary>
+        private void AddAllMenuRow(InformationEditorControl tableContr)
+        {
+            //銆愭埧闂村悕绉般��
+            var txtRoomName = new FrameCaptionInputControl(Language.StringByID(R.MyInternationalizationString.uRoomName), this.cloneRoom.Name, this.listview.rowSpace / 2);
+            txtRoomName.txtInput.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputRoomName);
+            listview.AddChidren(txtRoomName);
+            txtRoomName.InitControl();
+            //搴曠嚎
+            txtRoomName.AddBottomLine();
+
+            //銆愭墍灞炴ゼ灞傘��
+            var btnBelone = new FrameCaptionViewControl(Language.StringByID(R.MyInternationalizationString.uBelongeFloor), Common.Config.Instance.Home.FloorDics[this.cloneRoom.FloorId], this.listview.rowSpace / 2);
+            listview.AddChidren(btnBelone);
+            btnBelone.InitControl();
+            //鍙崇澶�
+            btnBelone.AddRightArrow();
+            //搴曠嚎
+            btnBelone.AddBottomLine();
+            btnBelone.ButtonClickEvent += (sender, e) =>
+            {
+                //妤煎眰閫夋嫨
+                this.ShowSelectFloor(btnBelone);
+            };
+
+            //銆愭俯搴︺��
+            var rowTemperature = new FrameRowControl(this.listview.rowSpace / 2);
+            listview.AddChidren(rowTemperature);
+            rowTemperature.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uTemperature), 600);
+            //鍙崇澶�
+            rowTemperature.AddRightArrow();
+            var btnTemper = rowTemperature.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uNothing), 300);
+            //搴曠嚎
+            rowTemperature.AddBottomLine();
+            rowTemperature.ButtonClickEvent += (sender, e) =>
+            {
+            };
+
+            //銆愭箍搴︺��
+            var rowHumidity = new FrameRowControl(this.listview.rowSpace / 2);
+            listview.AddChidren(rowHumidity);
+            rowHumidity.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uHumidity), 600);
+            //鍙崇澶�
+            rowHumidity.AddRightArrow();
+            var btnHumi = rowHumidity.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uNothing), 300);
+            //搴曠嚎
+            rowHumidity.AddBottomLine();
+            rowHumidity.ButtonClickEvent += (sender, e) =>
+            {
+            };
+
+            //鍒濆鍖栨甯冨畬鎴�
+            tableContr.FinishInitControl(bodyFrameLayout, this.listview);
+            tableContr = null;
+            //淇濆瓨
+            var btnFinish = new BottomClickButton();
+            btnFinish.TextID = R.MyInternationalizationString.uSave;
+            bodyFrameLayout.AddChidren(btnFinish);
+            btnFinish.ButtonClickEvent += (sender, e) =>
+            {
+                this.cloneRoom.Name = txtRoomName.Text;
+                //妫�娴嬭兘鍚︿繚瀛樻埧闂�
+                if (this.CheckCanSaveRoom() == false)
+                {
+                    return;
+                }
+                editorRoom.Save();
+                this.CloseForm();
+            };
+        }
+
+        #endregion
+
+        #region 鈻� 妤煎眰閫夋嫨___________________________
+
+        /// <summary>
+        /// 妤煎眰閫夋嫨
+        /// </summary>
+        /// <param name="control"></param>
+        private void ShowSelectFloor(FrameCaptionViewControl control)
+        {
+            var dicFloor = Common.Room.CurrentRoom.GetFloorSortList();
+
+            var listKeys = new List<string>();
+            var listName = new List<string>();
+            int index = 0;
+            foreach (string keys in dicFloor.Keys)
+            {
+                listKeys.Add(keys);
+                listName.Add(dicFloor[keys]);
+                if (keys == cloneRoom.FloorId)
+                {
+                    index = listKeys.Count - 1;
+                }
+            }
+            PickerView.Show(listName, (value) =>
+            {
+                control.txtView.Text = listName[value];
+                //涓婚敭淇敼
+                cloneRoom.FloorId = listKeys[value];
+            },
+            index,
+            Language.StringByID(R.MyInternationalizationString.uBelongeFloor),
+            Language.StringByID(R.MyInternationalizationString.uFinish),
+            Language.StringByID(R.MyInternationalizationString.uCancel));
+        }
+
+        #endregion
+
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        /// <summary>
+        /// 妫�娴嬭兘鍚︿繚瀛樻埧闂�
+        /// </summary>
+        /// <returns></returns>
+        private bool CheckCanSaveRoom()
+        {
+            if (this.cloneRoom.Name == string.Empty)
+            {
+                //璇疯緭鍏ユ埧闂村悕绉�
+                this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseInputRoomName));
+                return false;
+            }
+            if (Shared.Common.Room.Lists.Find((obj) => obj.Name == this.cloneRoom.Name && obj.Id != this.cloneRoom.Id) != null)
+            {
+                this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom));
+                return false;
+            }
+            if (cloneRoom.BackgroundImageType == 1 || cloneRoom.BackgroundImageType == 2)
+            {
+                this.cloneRoom.MoveBackGroundIamageFileToDirectory(cloneRoom.BackgroundImage, cloneRoom.BackgroundImage);
+                this.cloneRoom.BackgroundImage = $"{Common.Config.Instance.Guid}/{Common.Config.Instance.HomeId}/{cloneRoom.BackgroundImage}";
+            }
+
+            editorRoom.FloorId = cloneRoom.FloorId;
+            editorRoom.Name = cloneRoom.Name;
+            editorRoom.BackgroundImage = cloneRoom.BackgroundImage;
+            editorRoom.BackgroundImageType = cloneRoom.BackgroundImageType;
+            cloneRoom = null;
+
+            return true;
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/FloorListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/FloorListRoomForm.cs
new file mode 100755
index 0000000..724b35e
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/FloorListRoomForm.cs
@@ -0,0 +1,192 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter.Residence
+{
+    /// <summary>
+    /// 妤煎眰鐨勬埧闂村垪琛ㄧ晫闈�
+    /// </summary>
+    public class FloorListRoomForm : EditorCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 鍒楄〃鎺т欢
+        /// </summary>
+        private VerticalListControl listView = null;
+        /// <summary>
+        /// 妤煎眰鐨勪富閿�
+        /// </summary>
+        private string floorKeys = string.Empty;
+        /// <summary>
+        /// 鍏ㄩ儴鐨勯『搴�
+        /// </summary>
+        private Dictionary<string, List<string>> dicAllSort = new Dictionary<string, List<string>>();
+        /// <summary>
+        /// 鎴块棿椤哄簭
+        /// </summary>
+        private List<string> listRoomSort = new List<string>();
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        /// <param name="i_floor">妤煎眰鐨勪富閿�</param>
+        public void ShowForm(string i_floor)
+        {
+            this.floorKeys = i_floor;
+            //璁剧疆澶撮儴淇℃伅
+            base.SetTitleText(Common.Config.Instance.Home.FloorDics[i_floor]);
+
+            var btnIcon = new MostRightIconControl(69, 69);
+            btnIcon.UnSelectedImagePath = "Item/Add.png";
+            topFrameLayout.AddChidren(btnIcon);
+            btnIcon.InitControl();
+            btnIcon.ButtonClickEvent += ((sender, e) =>
+            {
+                var form = new AddNewRoomForm();
+                form.AddForm(i_floor);
+            });
+
+            //鍒濆鍖栦腑閮ㄤ俊鎭�
+            this.InitMiddleFrame();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+        /// </summary>
+        private void InitMiddleFrame()
+        {
+            //娓呯┖bodyFrame
+            this.ClearBodyFrame();
+
+            this.listView = new VerticalListControl(29);
+            listView.Y = Application.GetRealHeight(-6);
+            listView.Height = bodyFrameLayout.Height + Application.GetRealHeight(6);
+            listView.BackgroundColor = UserCenterColor.Current.White;
+            bodyFrameLayout.AddChidren(listView);
+
+            //鍒濆鍖栨埧闂村垪琛�
+            this.InitRoomListRow();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栨埧闂村垪琛�
+        /// </summary>
+        private void InitRoomListRow()
+        {
+            //鑾峰彇妤煎眰鐨勬埧闂�
+            var listRoom = Common.Room.CurrentRoom.GetFloorSortRoom(this.floorKeys);
+            this.listRoomSort.Clear();
+            for (int i = 0; i < listRoom.Count; i++)
+            {
+                this.listRoomSort.Add(listRoom[i].Id);
+            }
+
+            this.listView.RemoveAll();
+            listView.Height = bodyFrameLayout.Height + Application.GetRealHeight(6);
+
+            for (int i = 0; i < listRoom.Count; i++)
+            {
+                //娣诲姞鎴块棿琛�
+                this.AddRoomRow(listRoom[i], i != listRoom.Count - 1);
+            }
+            //璋冩暣鎺т欢鐪熷疄楂樺害
+            listView.AdjustRealHeight(Application.GetRealHeight(23));
+        }
+
+        #endregion
+
+        #region 鈻� 娣诲姞鎴块棿琛宊________________________
+
+        /// <summary>
+        /// 娣诲姞鎴块棿琛�
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="addLine"></param>
+        private void AddRoomRow(Common.Room room, bool addLine)
+        {
+            var frameRow = new RowLayoutControl(listView.rowSpace / 2);
+            listView.AddChidren(frameRow);
+            //鍥炬爣
+            var btnIcon = frameRow.frameTable.AddLeftIcon(81);
+            btnIcon.UnSelectedImagePath = "Item/RoomIcon.png";
+            //鍚嶇О
+            var btnName = frameRow.frameTable.AddLeftCaption(room.Name, 600);
+            btnName.TextSize = 15;
+            //鍙崇澶�
+            frameRow.frameTable.AddRightArrow();
+            if (addLine == true)
+            {
+                //搴曠嚎
+                frameRow.frameTable.AddBottomLine();
+            }
+            frameRow.frameTable.ButtonClickEvent += (sender, e) =>
+            {
+
+            };
+
+            if (room.IsSharedRoom == true)
+            {
+                //濡傛灉鏄垎浜殑鎴块棿锛屼笉鑳界紪杈戝拰淇敼
+                return;
+            }
+
+            //缂栬緫
+            var btnEditor = new NormalViewControl(Application.GetRealWidth(184), frameRow.Height, false);
+            btnEditor.BackgroundColor = 0xff4a4a4a;
+            btnEditor.TextSize = 12;
+            btnEditor.TextColor = UserCenterColor.Current.White;
+            btnEditor.TextAlignment = TextAlignment.Center;
+            btnEditor.TextID = R.MyInternationalizationString.uEditor;
+            frameRow.AddRightView(btnEditor);
+            btnEditor.ButtonClickEvent += (sender, e) =>
+            {
+                var form = new EditorRoomInforForm();
+                form.AddForm(room);
+            };
+
+            //鍒犻櫎
+            var btnDelete = new NormalViewControl(Application.GetRealWidth(184), frameRow.Height, false);
+            btnDelete.BackgroundColor = 0xfff75858;
+            btnDelete.TextSize = 12;
+            btnDelete.TextColor = UserCenterColor.Current.White;
+            btnDelete.TextAlignment = TextAlignment.Center;
+            btnDelete.TextID = R.MyInternationalizationString.uDelete;
+            frameRow.AddRightView(btnDelete);
+            btnDelete.ButtonClickEvent += (sender, e) =>
+            {
+                //纭鍒犻櫎鎴块棿?
+                this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uDeleteRoomMsg), () =>
+                {
+                    if (Common.Room.CurrentRoom.Id == room.Id)
+                    {
+                        //濡傛灉鍒犻櫎鐨勬槸褰撳墠鎴块棿鐨勮瘽
+                        Common.Room.CurrentRoom = Common.Room.Lists[0];
+                    }
+                    Common.Room.CurrentRoom.Remove(room.FileName);
+                });
+            };
+        }
+
+        #endregion
+
+        #region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________
+
+        /// <summary>
+        /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
+        /// </summary>
+        public override int FormActionAgainEvent()
+        {
+            //鍒濆鍖栨埧闂村垪琛�
+            this.InitRoomListRow();
+            return 1;
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs
new file mode 100755
index 0000000..c6f851d
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs
@@ -0,0 +1,572 @@
+锘縰sing Shared.Common;
+using System;
+using System.Collections.Generic;
+
+namespace Shared.Phone.UserCenter.Residence
+{
+    /// <summary>
+    /// 浣忓畢绠$悊鐨勭敾闈⑩槄
+    /// </summary>
+    public class ResidenceListForm : EditorCommonForm
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// 鍒楄〃鎺т欢
+        /// </summary>
+        private VerticalListControl listView = null;
+        /// <summary>
+        /// 浣忓畢鏁版嵁
+        /// </summary>
+        private Dictionary<string, Common.ResponseEntity.ResidenceObj> dicResidenceData = null;
+        /// <summary>
+        /// 浣忓畢椤哄簭
+        /// </summary>
+        private List<string> listResidenceSort = new List<string>();
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        public void ShowForm()
+        {
+            //璁剧疆鏍囬淇℃伅
+            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) =>
+            {
+                //鏄剧ず娣诲姞浣忓畢鍚嶇О鐨勭敾闈�
+                this.ShowAddNameForm();
+            };
+
+            //鍒濆鍖栦腑閮ㄦ帶浠�
+            this.InitMiddleFrame();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄦ帶浠�
+        /// </summary>
+        private void InitMiddleFrame()
+        {
+            //娓呯┖bodyFrame
+            this.ClearBodyFrame();
+
+            //璇诲彇浣忓畢椤哄簭
+            var strData = UserCenterLogic.LoadFileContent(UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.ResidenceSortFile));
+            if (strData != null)
+            {
+                listResidenceSort = Newtonsoft.Json.JsonConvert.DeserializeObject<List<string>>(strData);
+                strData = null;
+            }
+
+            listView = new VerticalListControl(29);
+            listView.Y = Application.GetRealHeight(-6);
+            listView.Height = bodyFrameLayout.Height + Application.GetRealHeight(6);
+            listView.BackgroundColor = UserCenterColor.Current.White;
+            bodyFrameLayout.AddChidren(listView);
+
+            HdlThreadLogic.Current.RunThread(() =>
+            {
+                //璁剧疆浣忓畢淇℃伅
+                this.SetResidenceInfo();
+            });
+        }
+
+        #endregion
+
+        #region 鈻� 璁剧疆浣忓畢淇℃伅_______________________
+
+        /// <summary>
+        /// 璁剧疆浣忓畢淇℃伅
+        /// </summary>
+        private async void SetResidenceInfo()
+        {
+            //寮�鍚繘搴︽潯
+            this.ShowProgressBar();
+
+            //鑾峰彇浣忓畢淇℃伅
+            var Pra = new GetResidenceInfoPra();
+            string resultData = await UserCenterLogic.GetResponseDataByRequestHttps("App/GetHomePager", false, Pra);
+            if (resultData == null)
+            {
+                //鍏抽棴杩涘害鏉�
+                this.CloseProgressBar(ShowReLoadMode.YES);
+                return;
+            }
+            //鍏抽棴杩涘害鏉�
+            this.CloseProgressBar();
+
+            var pageData = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResidenceRes>(resultData);
+
+            //鏆傛椂瀛樺偍鏁版嵁
+            var dicData = new Dictionary<string, Common.ResponseEntity.ResidenceObj>();
+            for (int i = 0; i < pageData.PageData.Count; i++)
+            {
+                dicData[pageData.PageData[i].Id] = pageData.PageData[i];
+                if (listResidenceSort.Contains(pageData.PageData[i].Id) == false)
+                {
+                    //鏂版坊鍔犵殑浣忓畢
+                    listResidenceSort.Add(pageData.PageData[i].Id);
+                }
+            }
+            //淇濆瓨椤哄簭
+            string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.ResidenceSortFile);
+            UserCenterLogic.SaveFileContent(fullName, listResidenceSort);
+
+            Application.RunOnMainThread(() =>
+            {
+                if (this.Parent == null)
+                {
+                    return;
+                }
+                listView.Height = bodyFrameLayout.Height + Application.GetRealHeight(6);
+
+                this.dicResidenceData = new Dictionary<string, Common.ResponseEntity.ResidenceObj>();
+                for (int i = 0; i < listResidenceSort.Count; i++)
+                {
+                    var info = dicData[listResidenceSort[i]];
+                    if (info.IsOthreShare == false)
+                    {
+                        //鏀堕泦璇ヨ处鍙锋墍鎷ユ湁鐨勮嚜宸辩殑浣忓畢鐨勬暟鎹�
+                        this.dicResidenceData[info.Id] = info;
+                    }
+                    this.AddRowLayout(info, i != listResidenceSort.Count - 1);
+                }
+                //璋冩暣鍒楄〃鎺т欢鐨勯珮搴�
+                this.listView.AdjustRealHeight(Application.GetRealHeight(23));
+            });
+        }
+
+        #endregion
+
+        #region 鈻� 娣诲姞浣忓畢鐨勮_______________________
+
+        /// <summary>
+        /// 娣诲姞浣忓畢鐨勮
+        /// </summary>
+        /// <param name="info"></param>
+        private void AddRowLayout(Common.ResponseEntity.ResidenceObj info, 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 (info.Id == Config.Instance.Home.Id)
+            {
+                //浣忓畢鍚嶇О
+                btnHome = rowLayout.frameTable.AddLeftCaption(info.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(info.Name, 800, true);
+                btnHome.TextSize = 15;
+            }
+            //鍙崇澶�
+            rowLayout.frameTable.AddRightArrow();
+            if (addLine == true)
+            {
+                //搴曠嚎
+                rowLayout.frameTable.AddBottomLine();
+            }
+
+            rowLayout.frameTable.ButtonClickEvent += (sender, e) =>
+            {
+                if (info.Id != Config.Instance.Home.Id)
+                {
+                    //纭鍒囨崲褰撳墠浣忓畢鍒般�屻��?
+                    string msg = Language.StringByID(R.MyInternationalizationString.uSwitchResidenceMsg);
+                    if (msg.Contains("{0}") == true)
+                    {
+                        msg = string.Format(msg, info.Name);
+                    }
+                    this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+                    {
+                        HdlThreadLogic.Current.RunThread(async () =>
+                        {
+                            ProgressBar.Show();
+                            Config.Instance.HomeId = info.Id;
+                            Global.CreateHomeDirectory(info.Id);
+                            Config.Instance.Save();
+                            //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
+                            await UserCenterLogic.InitUserCenterMenmoryAndThread();
+
+                            Room.InitAllRoom();
+
+                            Application.RunOnMainThread(() =>
+                            {
+                                //閲嶆柊鍒锋柊鍒楄〃
+                                this.listView.RemoveAll();
+                                this.SetResidenceInfo();
+                            });
+                        });
+                    });
+                }
+                else
+                {
+                    //妫�娴嬭兘鍚﹀垹闄や綇瀹�
+                    bool flage = this.CheckIsCanDeleteResidence(info);
+                    var form = new ResidenceManagementForm();
+                    form.AddForm(flage);
+                }
+            };
+
+            if (info.IsOthreShare == true && info.AccountType != 1)
+            {
+                //鍒嗕韩鐨勶紝鍙堜笉鎷ユ湁绠$悊鍛樻潈闄愮殑,涓嶈兘鏇存敼
+                return;
+            }
+            //鏇存敼
+            var btnChanged = new NormalViewControl(Application.GetRealWidth(184), rowLayout.Height, false);
+            btnChanged.BackgroundColor = 0xff4a4a4a;
+            btnChanged.TextSize = 12;
+            btnChanged.TextColor = UserCenterColor.Current.White;
+            btnChanged.TextAlignment = TextAlignment.Center;
+            btnChanged.TextID = R.MyInternationalizationString.uChanged1;
+            rowLayout.AddRightView(btnChanged);
+            btnChanged.ButtonClickEvent += (sender, e) =>
+            {
+                //鏄剧ず缂栬緫鍚嶇О鐣岄潰
+                this.ShowEditorNameForm(info, btnHome);
+            };
+        }
+
+        #endregion
+
+        #region 鈻� 缂栬緫浣忓畢鍚嶇О_______________________
+
+        /// <summary>
+        /// 鏄剧ず缂栬緫浣忓畢鍚嶇О鐣岄潰
+        /// </summary>
+        /// <param name="info"></param>
+        private void ShowEditorNameForm(Common.ResponseEntity.ResidenceObj info, NormalViewControl btnHome)
+        {
+            //鐢熸垚涓�涓脊绐楃敾闈�
+            var dialogForm = new DialogInputFrameControl(this, DialogFrameMode.OnlyInput);
+            //缂栬緫浣忓畢
+            dialogForm.SetTitleText(Language.StringByID(R.MyInternationalizationString.uChangedName));
+            //璇疯緭鍏ヤ綇瀹呭悕绉�
+            dialogForm.SetTipText(Language.StringByID(R.MyInternationalizationString.uPleaseInputResidenceName));
+            dialogForm.Text = info.Name;
+
+            //鎸変笅纭鎸夐挳
+            dialogForm.ComfirmClickEvent += ((textValue) =>
+            {
+                if (textValue == string.Empty)
+                {
+                    //璇疯緭鍏ヤ綇瀹呭悕绉�
+                    string msg = Language.StringByID(R.MyInternationalizationString.uPleaseInputResidenceName);
+                    this.ShowMassage(ShowMsgType.Error, msg);
+                    return;
+                }
+                //鐢婚潰鍏抽棴
+                dialogForm.CloseDialog();
+
+                if (info.Name != textValue)
+                {
+                    //缂栬緫浜戠鐨勪綇瀹呭悕绉�
+                    this.EditorResidenceName(textValue, info);
+                }
+            });
+        }
+
+        /// <summary>
+        /// 缂栬緫浜戠鐨勪綇瀹呭悕绉�
+        /// </summary>
+        /// <param name="ResidenceName"></param>
+        /// <param name="info"></param>
+        /// <returns></returns>
+        private async void EditorResidenceName(string ResidenceName, Common.ResponseEntity.ResidenceObj info)
+        {
+            //妫�娴嬭兘鍚︿繚瀛樹綇瀹�
+            if (this.CheckIsCanSaveResidence(info.Id, ResidenceName, true) == false)
+            {
+                return;
+            }
+            //寮�鍚繘搴︽潯
+            this.ShowProgressBar();
+
+            var Pra = new EditorResidencePra();
+            Pra.HomeId = info.Id;
+            Pra.Name = ResidenceName;
+            if (info.IsOthreShare == true)
+            {
+                Pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
+            }
+            //缂栬緫浣忓畢
+            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", info.IsOthreShare, Pra);
+            if (flage == false)
+            {
+                //鍏抽棴杩涘害鏉�
+                this.CloseProgressBar();
+                return;
+            }
+            //鍒锋柊鍐呭瓨鐨勪綇瀹呭悕
+            House.EditorHouseByHouseId(info.Id, ResidenceName);
+            //閲嶆柊鍒锋柊鍒楄〃
+            this.listView.RemoveAll();
+            this.SetResidenceInfo();
+        }
+
+        #endregion
+
+        #region 鈻� 娣诲姞浣忓畢鍚嶇О_______________________
+
+        /// <summary>
+        /// 鏄剧ず娣诲姞浣忓畢鍚嶇О鐨勭敾闈�
+        /// </summary>
+        private void ShowAddNameForm()
+        {
+            //鐢熸垚涓�涓脊绐楃敾闈�
+            var dialogForm = new DialogInputFrameControl(this, DialogFrameMode.OnlyInput);
+            //鍒涘缓浣忓畢
+            dialogForm.SetTitleText(Language.StringByID(R.MyInternationalizationString.uCreatResidence));
+            //璇疯緭鍏ヤ綇瀹呭悕绉�
+            dialogForm.SetTipText(Language.StringByID(R.MyInternationalizationString.uPleaseInputResidenceName));
+            //鎸変笅纭鎸夐挳
+            dialogForm.ComfirmClickEvent += ((textValue) =>
+            {
+                if (textValue == string.Empty)
+                {
+                    //璇疯緭鍏ヤ綇瀹呭悕绉�
+                    string msg = Language.StringByID(R.MyInternationalizationString.uPleaseInputResidenceName);
+                    this.ShowMassage(ShowMsgType.Error, msg);
+                    return;
+                }
+                //鐢婚潰鍏抽棴
+                dialogForm.CloseDialog();
+
+                //淇濆瓨浣忓畢
+                this.AddNewResidence(textValue);
+            });
+        }
+
+        /// <summary>
+        /// 鍚戜簯绔坊鍔犳柊鐨勪綇瀹�
+        /// </summary>
+        /// <param name="ResidenceName"></param>
+        /// <returns></returns>
+        private async void AddNewResidence(string ResidenceName)
+        {
+            //妫�娴嬭兘鍚︿繚瀛樹綇瀹�
+            if (this.CheckIsCanSaveResidence(string.Empty, ResidenceName, false) == false)
+            {
+                return;
+            }
+            //寮�鍚繘搴︽潯
+            this.ShowProgressBar();
+
+            var Pra = new AddResidencePra();
+            Pra.Name = ResidenceName;
+            //娣诲姞浣忓畢
+            string resultData = await UserCenterLogic.GetResponseDataByRequestHttps("App/AddHome", false, Pra);
+            if (resultData == null)
+            {
+                //鍏抽棴杩涘害鏉�
+                this.CloseProgressBar();
+                return;
+            }
+
+            var newInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<List<NewResidenceInfo>>(resultData);
+
+            House.AddHouse(newInfo[0].Id, ResidenceName, 0);
+            //閲嶆柊鍒锋柊鍒楄〃
+            this.listView.RemoveAll();
+            this.SetResidenceInfo();
+        }
+
+        #endregion
+
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        /// <summary>
+        /// 妫�娴嬭兘鍚﹀垹闄や綇瀹�
+        /// </summary>
+        /// <param name="info"></param>
+        /// <returns></returns>
+        private bool CheckIsCanDeleteResidence(Common.ResponseEntity.ResidenceObj info)
+        {
+            if (this.dicResidenceData.Count == 1)
+            {
+                //濡傛灉姝よ处鍙蜂笅鍙墿涓嬪敮涓�涓�涓嚜宸辩殑浣忓畢锛屽綋鍒犻櫎杩欎釜浣忓畢鏃讹紝鎻愮ず涓嶈兘鍒犻櫎
+                //鍥犱负鏈�灏戣鏈変竴涓綇瀹�
+                if (this.dicResidenceData.ContainsKey(info.Id) == true)
+                {
+                    return false;
+                }
+            }
+            if (info.IsOthreShare == true)
+            {
+                //鍒嗕韩杩囨潵鐨勪綇瀹呬笉鑳藉垹闄�
+                return false;
+            }
+            return true;
+        }
+
+        /// <summary>
+        /// 妫�娴嬭兘鍚︿繚瀛樹綇瀹�
+        /// </summary>
+        /// <param name="residenceId">浣忓畢ID</param>
+        /// <param name="residenceName">浣忓畢鍚�</param>
+        /// <param name="isEditor">isEditor</param>
+        /// <returns></returns>
+        private bool CheckIsCanSaveResidence(string residenceId, string residenceName, bool isEditor)
+        {
+            //浣忓畢鍚嶅瓧閲嶅妫�娴�
+            foreach (string strId in this.dicResidenceData.Keys)
+            {
+                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;
+                }
+            }
+            return true;
+        }
+
+        #endregion
+
+        #region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________
+
+        /// <summary>
+        /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
+        /// </summary>
+        public override int FormActionAgainEvent()
+        {
+            foreach (string keys in dicResidenceData.Keys)
+            {
+                if (Config.Instance.HomeFilePathList.Contains($"House_{keys}.json") == false)
+                {
+                    listResidenceSort.Remove(keys);
+                    this.listView.RemoveAll();
+                    //鏁版嵁宸茬粡鍙樻洿
+                    HdlThreadLogic.Current.RunThread(() =>
+                    {
+                        //閲嶆柊璁剧疆浣忓畢淇℃伅
+                        this.SetResidenceInfo();
+                    });
+                    break;
+                }
+            }
+            return 1;
+        }
+
+        #endregion
+
+        #region 鈻� 缁撴瀯浣揰____________________________
+
+        /// <summary>
+        /// 璁块棶浣忓畢淇℃伅鎺ュ彛鐨勫惎鍔ㄥ弬鏁�(鏌ヨ涓撶敤)
+        /// </summary>
+        public class GetResidenceInfoPra : IfacePraCommon
+        {
+            /// <summary>
+            /// RequestVersion
+            /// </summary>
+            public string RequestVersion = Common.CommonPage.RequestVersion;
+            /// <summary>
+            /// ReqDto
+            /// </summary>
+            public TokenInfo ReqDto = new TokenInfo();
+        }
+
+        /// <summary>
+        /// 璁块棶浣忓畢淇℃伅鎺ュ彛鐨勫惎鍔ㄥ弬鏁�(鏌ヨ涓撶敤)
+        /// </summary>
+        public class TokenInfo
+        {
+            /// <summary>
+            /// LoginAccessToken
+            /// </summary>
+            public string LoginAccessToken = Common.Config.Instance.Token;
+            /// <summary>
+            /// PageSetting
+            /// </summary>
+            public PageSettingInfo PageSetting = new PageSettingInfo()
+            {
+                Page = 1,
+                PageSize = 500
+            };
+        }
+
+        /// <summary>
+        ///  娣诲姞浣忓畢鐨勫惎鍔ㄥ弬鏁�
+        /// </summary>
+        public class AddResidencePra : IfacePraCommon
+        {
+            /// <summary>
+            /// RequestVersion
+            /// </summary>
+            public string RequestVersion = Common.CommonPage.RequestVersion;
+            /// <summary>
+            /// LoginAccessToken
+            /// </summary>
+            public string LoginAccessToken = Common.Config.Instance.Token;
+            /// <summary>
+            /// Name
+            /// </summary>
+            public string Name = string.Empty;
+        }
+
+        /// <summary>
+        /// 鏂颁綇瀹呯殑淇℃伅
+        /// </summary>
+        public class NewResidenceInfo
+        {
+            /// <summary>
+            /// ZigbeeHomeGuid
+            /// </summary>
+            public string Id = string.Empty;
+        }
+
+        /// <summary>
+        ///  缂栬緫浣忓畢鐨勫惎鍔ㄥ弬鏁�
+        /// </summary>
+        public class EditorResidencePra : IfacePraCommon
+        {
+            /// <summary>
+            /// RequestVersion
+            /// </summary>
+            public string RequestVersion = Common.CommonPage.RequestVersion;
+            /// <summary>
+            /// LoginAccessToken
+            /// </summary>
+            public string LoginAccessToken = Common.Config.Instance.Token;
+            /// <summary>
+            /// ZigbeeHomeId
+            /// </summary>
+            public string HomeId = "";
+            /// <summary>
+            /// Name
+            /// </summary>
+            public string Name = string.Empty;
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
index cf487de..3570f6e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
@@ -1,11 +1,11 @@
-锘縰sing Shared.Common;
-using System;
+锘縰sing System;
 using System.Collections.Generic;
+using System.Text;
 
 namespace Shared.Phone.UserCenter.Residence
 {
     /// <summary>
-    /// 浣忓畢绠$悊鐨勭敾闈⑩槄
+    /// 浣忓畢绠$悊鐣岄潰
     /// </summary>
     public class ResidenceManagementForm : EditorCommonForm
     {
@@ -14,11 +14,15 @@
         /// <summary>
         /// 鍒楄〃鎺т欢
         /// </summary>
-        private VerticalScrolViewLayout listView = null;
+        private VerticalListControl listView = null;
         /// <summary>
-        /// 浣忓畢鏁版嵁
+        /// 鍒楄〃鎺т欢鏈�澶ч珮搴�
         /// </summary>
-        private Dictionary<string, Common.ResponseEntity.ResidenceObj> dicResidenceData = null;
+        private int MaxListViewHeight = 0;
+        /// <summary>
+        /// 妤煎眰椤哄簭
+        /// </summary>
+        private List<string> listFloorSort = new List<string>();
 
         #endregion
 
@@ -27,465 +31,424 @@
         /// <summary>
         /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
         /// </summary>
-        public void ShowForm()
+        /// <param name="i_CanDeleteResidence">鑳藉惁鍒犻櫎褰撳墠浣忓畢</param>
+        public void ShowForm(bool i_CanDeleteResidence)
         {
-            //璁剧疆鏍囬淇℃伅
-            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.ResidenceManagement));
+            //璁剧疆澶撮儴淇℃伅
+            base.SetTitleText(Common.Config.Instance.Home.Name);
 
-            if (UserCenterResourse.UserInfo.AuthorityNo == 1)
+            //鍒ゆ柇鑳藉惁鍒犻櫎浣忓畢
+            if (i_CanDeleteResidence == true)
             {
-                //鍙充笂娣诲姞鎸夐挳
-                var btnTopIcon = new MostRightIconControl(69, 69);
-                btnTopIcon.UnSelectedImagePath = "Item/Add.png";
-                topFrameLayout.AddChidren(btnTopIcon);
-                btnTopIcon.InitControl();
-                btnTopIcon.ButtonClickEvent += (sender, e) =>
+                //鍒濆鍖栧彸涓婅鑿滃崟
+                this.InitTopRightMenu();
+            }
+            //鍒濆鍖栦腑閮ㄤ俊鎭�
+            this.InitMiddleFrame();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+        /// </summary>
+        private void InitMiddleFrame()
+        {
+            //娓呯┖bodyFrame
+            this.ClearBodyFrame();
+
+            var frameHome = new FrameRowControl();
+            frameHome.Height = Application.GetRealHeight(173);
+            frameHome.BackgroundColor = UserCenterColor.Current.White;
+            bodyFrameLayout.AddChidren(frameHome);
+
+            var btnAdreeIcon = frameHome.AddLeftIcon(81);
+            btnAdreeIcon.UnSelectedImagePath = "Item/FixedPositionSelected.png";
+
+            //浣忓畢鍚嶇О
+            var btnHomeName = frameHome.AddLeftCaption(Common.Config.Instance.Home.Name, 700, 60);
+            btnHomeName.TextSize = 15;
+            btnHomeName.Y = Application.GetRealHeight(35);
+            frameHome.AddChidren(btnHomeName, ChidrenBindMode.BindEventOnly);
+            //褰撳墠浣忓畢
+            var btnNowView = frameHome.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uNowResidence), 700, 49);
+            btnNowView.TextSize = 12;
+            btnNowView.Y = Application.GetRealHeight(95);
+            btnNowView.TextColor = UserCenterColor.Current.TextGrayColor1;
+            frameHome.AddChidren(btnNowView, ChidrenBindMode.BindEventOnly);
+            //鍙崇澶�
+            frameHome.AddRightArrow();
+
+            var frameFloor = new FrameRowControl();
+            frameFloor.UseClickStatu = false;
+            frameFloor.Y = frameHome.Bottom + Application.GetRealHeight(23);
+            frameFloor.Height = Application.GetRealHeight(115);
+            frameFloor.BackgroundColor = UserCenterColor.Current.White;
+            bodyFrameLayout.AddChidren(frameFloor);
+
+            //妤煎眰
+            var btnFloor = frameFloor.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFloor), 200, 60);
+            btnFloor.Y = Application.GetRealHeight(49);
+            btnFloor.TextColor = UserCenterColor.Current.TextColor2;
+            btnFloor.TextSize = 15;
+            frameFloor.AddChidren(btnFloor, ChidrenBindMode.NotBind);
+            if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
+            {
+                //娣诲姞妤煎眰
+                var btnAddFloor = frameFloor.AddMostRightEmptyIcon(69, 69);
+                frameFloor.ChangedChidrenBindMode(btnAddFloor, ChidrenBindMode.NotBind);
+                btnAddFloor.Y = Application.GetRealHeight(46);
+                btnAddFloor.UnSelectedImagePath = "Item/Add.png";
+                btnAddFloor.ButtonClickEvent += (sender, e) =>
                 {
-                    //var info = new Common.ResponseEntity.ResidenceObj();
-                    //this.ShowEditorForm(info);
+                    //鍒涘缓妤煎眰
+                    this.CreatOrEditorFloor(string.Empty, string.Empty);
                 };
             }
 
-            //鍒濆鍖栦腑閮ㄦ帶浠�
-            //this.InitMiddleFrame();
+            this.MaxListViewHeight = bodyFrameLayout.Height - frameFloor.Bottom;
+            listView = new VerticalListControl(29);
+            listView.BackgroundColor = UserCenterColor.Current.White;
+            listView.Y = frameFloor.Bottom;
+            listView.Height = MaxListViewHeight;
+            bodyFrameLayout.AddChidren(listView);
+
+            //鍒濆鍖栨ゼ灞傝
+            this.InitFloorRow();
         }
 
-        ///// <summary>
-        ///// 鍒濆鍖栦腑閮ㄦ帶浠�
-        ///// </summary>
-        //private void InitMiddleFrame()
-        //{
-        //    //娓呯┖bodyFrame
-        //    this.ClearBodyFrame();
+        /// <summary>
+        /// 鍒濆鍖栨ゼ灞傝
+        /// </summary>
+        private void InitFloorRow()
+        {
+            //鑾峰彇妤煎眰
+            var dicFloor = Common.Room.CurrentRoom.GetFloorSortList();
+            this.listFloorSort.Clear();
+            foreach (string keys in dicFloor.Keys)
+            {
+                listFloorSort.Add(keys);
+            }
 
-        //    listView = new VerticalScrolViewLayout();
-        //    listView.Height = bodyFrameLayout.Height;
-        //    bodyFrameLayout.AddChidren(listView);
-
-        //    new System.Threading.Thread(() =>
-        //    {
-        //        //璁剧疆浣忓畢淇℃伅
-        //        this.SetResidenceInfo();
-        //    })
-        //    { IsBackground = true }.Start();
-        //}
-
-        ///// <summary>
-        ///// 璁剧疆浣忓畢淇℃伅
-        ///// </summary>
-        //private async void SetResidenceInfo()
-        //{
-        //    //寮�鍚繘搴︽潯
-        //    this.ShowProgressBar();
-
-        //    Application.RunOnMainThread(() =>
-        //    {
-        //        this.listView?.RemoveAll();
-        //    });
-        //    //鑾峰彇浣忓畢淇℃伅
-        //    var Pra = new GetResidenceInfoPra();
-        //    string resultData = await UserCenterLogic.GetResponseDataByRequestHttps("App/GetHomePager", false, Pra);
-        //    if (resultData == null)
-        //    {
-        //        //鍏抽棴杩涘害鏉�
-        //        this.CloseProgressBar(ShowReLoadMode.YES);
-        //        return;
-        //    }
-        //    this.dicResidenceData = new Dictionary<string, Common.ResponseEntity.ResidenceObj>();
-
-        //    var pageData = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResidenceRes>(resultData);
-        //    foreach (Common.ResponseEntity.ResidenceObj info in pageData.PageData)
-        //    {
-        //        if (info.IsOthreShare == false)
-        //        {
-        //            //鏀堕泦璇ヨ处鍙锋墍鎷ユ湁鐨勮嚜宸辩殑浣忓畢鐨勬暟鎹�
-        //            this.dicResidenceData[info.Id] = info;
-        //        }
-
-        //        Application.RunOnMainThread(() =>
-        //        {
-        //            if (this.Parent != null)
-        //            {
-        //                this.AddRowLayout(info);
-        //            }
-        //        });
-        //    }
-        //    //鍏抽棴杩涘害鏉�
-        //    this.CloseProgressBar();
-        //}
+            listView.Height = MaxListViewHeight;
+            listView.RemoveAll();
+            if (Common.Config.Instance.Home.FloorDics.Count == 0)
+            {
+                return;
+            }
+            HdlThreadLogic.Current.RunMainInThread(() =>
+            {
+                int count = listFloorSort.Count - 1;
+                for (int i = 0; i < listFloorSort.Count; i++)
+                {
+                    string keys = listFloorSort[i];
+                    this.AddFloorRow(keys, dicFloor[keys], i != count);
+                }
+                //璋冩暣鎺т欢楂樺害
+                listView.AdjustRealHeight(Application.GetRealHeight(23));
+            });
+        }
 
         #endregion
 
-        //#region 鈻� 娣诲姞浣忓畢鐨勮_______________________
+        #region 鈻� 娣诲姞妤煎眰琛宊________________________
 
-        ///// <summary>
-        ///// 娣诲姞浣忓畢鐨勮
-        ///// </summary>
-        ///// <param name="info"></param>
-        //private void AddRowLayout(Common.ResponseEntity.ResidenceObj info)
-        //{
-        //    if (info.IsOthreShare == true)
-        //    {
-        //        return;
-        //    }
-        //    var rowLayout = new RowLayout();
-        //    rowLayout.Height = ControlCommonResourse.ListViewRowHeight;
-        //    this.listView.AddChidren(rowLayout);
+        /// <summary>
+        /// 娣诲姞妤煎眰琛�
+        /// </summary>
+        /// <param name="keys"></param>
+        /// <param name="floorName"></param>
+        /// <param name="addLine"></param>
+        private void AddFloorRow(string keys, string floorName, bool addLine)
+        {
+            var frameRow = new RowLayoutControl(listView.rowSpace / 2);
+            this.listView.AddChidren(frameRow);
+            //鍥炬爣
+            var btnIcon = frameRow.frameTable.AddLeftIcon(81);
+            btnIcon.UnSelectedImagePath = "Floor/FloorSelected.png";
+            //妤煎眰鍚嶇О
+            var btnFloor = frameRow.frameTable.AddLeftCaption(floorName, 500);
+            btnFloor.TextSize = 15;
+            //鍚戝彸绠ご
+            frameRow.frameTable.AddRightArrow();
+            if (addLine == true)
+            {
+                frameRow.frameTable.AddBottomLine();
+            }
+            frameRow.frameTable.ButtonClickEvent += (sender, e) =>
+            {
+                var form = new FloorListRoomForm();
+                form.AddForm(keys);
+            };
 
-        //    //鍥炬爣
-        //    var btnIcon = new RowLeftIconView();
-        //    btnIcon.ChangedControlInPointMode();
-        //    rowLayout.AddChidren(btnIcon);
+            if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
+            {
+                //鏇存敼
+                var btnChanged = new NormalViewControl(Application.GetRealWidth(184), frameRow.Height, false);
+                btnChanged.BackgroundColor = 0xff4a4a4a;
+                btnChanged.TextSize = 12;
+                btnChanged.TextColor = UserCenterColor.Current.White;
+                btnChanged.TextAlignment = TextAlignment.Center;
+                btnChanged.TextID = R.MyInternationalizationString.uChanged1;
+                frameRow.AddRightView(btnChanged);
+                btnChanged.ButtonClickEvent += (sender, e) =>
+                {
+                //鍒涘缓鎴栬�呯紪杈戞ゼ灞�
+                this.CreatOrEditorFloor(keys, floorName);
+                };
 
-        //    //浣忓畢
-        //    var txtResidence = new RowCenterView(true);
-        //    txtResidence.Text = info.Name;
-        //    rowLayout.AddChidren(txtResidence);
-        //    txtResidence.X -= ControlCommonResourse.PointXXLeft;
+                //鍒犻櫎
+                var btnDelete = new NormalViewControl(Application.GetRealWidth(184), frameRow.Height, false);
+                btnDelete.BackgroundColor = 0xfff75858;
+                btnDelete.TextSize = 12;
+                btnDelete.TextColor = UserCenterColor.Current.White;
+                btnDelete.TextAlignment = TextAlignment.Center;
+                btnDelete.TextID = R.MyInternationalizationString.uDelete;
+                frameRow.AddRightView(btnDelete);
+                btnDelete.ButtonClickEvent += (sender, e) =>
+                {
+                    //鍒犻櫎妤煎眰
+                    this.DeleteFloor(keys);
+                };
+            }
+        }
 
-        //    //涓嶆槸鍒嗕韩杩囨潵鐨勪綇瀹�
-        //    if (info.IsOthreShare == false)
-        //    {
-        //        //缂栬緫
-        //        var btnEditor = new RowEditorButton();
-        //        rowLayout.AddRightView(btnEditor);
-        //        btnEditor.MouseUpEventHandler += (sender, e) =>
-        //        {
-        //            this.ShowEditorForm(info);
-        //        };
+        #endregion
 
-        //        //涓嶈兘鍒犻櫎褰撳墠姝e湪鎿嶄綔鐨勪綇瀹�
-        //        if (Common.Config.Instance.HomeId != info.Id)
-        //        {
-        //            //鍒犻櫎
-        //            var btnDelete = new RowDeleteButton();
-        //            rowLayout.AddRightView(btnDelete);
-        //            btnDelete.MouseUpEventHandler += (sender, e) =>
-        //            {
-        //                //妫�娴嬭兘鍚﹀垹闄や綇瀹�
-        //                if (this.CheckIsCanDeleteResidence(info) == false)
-        //                {
-        //                    return;
-        //                }
-        //                //纭瑕佸垹闄ゅ悧锛�
-        //                string msg = Language.StringByID(R.MyInternationalizationString.uShowDoDeleteMsg);
-        //                this.ShowConfirmMsg(msg, "DeleteResidence", info);
-        //            };
-        //        }
-        //    }
-        //    //鎴愬憳鐨勭鐞嗗憳鏉冮檺,鍙兘缂栬緫锛屼笉鑳藉垹闄�
-        //    //if (info.AccountType == 1)
-        //    //{
-        //    //    //缂栬緫
-        //    //    var btnEditor = new RowEditorButton();
-        //    //    rowLayout.AddRightView(btnEditor);
-        //    //    btnEditor.MouseUpEventHandler += (sender, e) =>
-        //    //    {
-        //    //        this.ShowEditorForm(info);
-        //    //    };
-        //    //}
-        //}
+        #region 鈻� 鍒涘缓鎴栫紪杈戞ゼ灞俖____________________
 
-        //#endregion
+        /// <summary>
+        /// 鍒涘缓鎴栬�呯紪杈戞ゼ灞�
+        /// </summary>
+        /// <param name="keys"></param>
+        /// <param name="floorName"></param>
+        private void CreatOrEditorFloor(string keys, string floorName)
+        {
+            //鐢熸垚涓�涓脊绐楃敾闈�
+            var dialogForm = new DialogInputFrameControl(this, DialogFrameMode.OnlyInput);
+            //鍒涘缓妤煎眰
+            dialogForm.SetTitleText(Language.StringByID(R.MyInternationalizationString.uCreatFloor));
+            if (keys != string.Empty)
+            {
+                //鏇存敼鍚嶇О
+                dialogForm.SetTitleText(Language.StringByID(R.MyInternationalizationString.uChangedName));
+            }
+            //璇疯緭鍏ユゼ灞傚悕绉�
+            dialogForm.SetTipText(Language.StringByID(R.MyInternationalizationString.uPleaseInputFloorName));
+            dialogForm.Text = floorName;
 
-        //#region 鈻� 鏄剧ず缂栬緫鐢婚潰_______________________
+            //鎸変笅纭鎸夐挳
+            dialogForm.ComfirmClickEvent += ((textValue) =>
+            {
+                if (this.CheckFloorName(keys, textValue) == false)
+                {
+                    //妤煎眰鍚嶇О妫�娴�
+                    return;
+                }
+                //鐢婚潰鍏抽棴
+                dialogForm.CloseDialog();
+                if (floorName != textValue)
+                {
+                    //缂栬緫鎴栬�呭垱寤烘ゼ灞傚悕绉�
+                    if (keys == string.Empty)
+                    {
+                        keys = Guid.NewGuid().ToString();
+                    }
+                    Common.Config.Instance.Home.FloorDics[keys] = textValue;
+                    Common.Config.Instance.Home.Save();
+                    //閲嶆柊鍒濆鍖栨ゼ灞傝
+                    this.InitFloorRow();
+                }
+            });
+        }
 
-        ///// <summary>
-        ///// 鏄剧ず缂栬緫鐢婚潰
-        ///// </summary>
-        ///// <param name="info"></param>
-        //private void ShowEditorForm(Common.ResponseEntity.ResidenceObj info)
-        //{
-        //    //鐢熸垚涓�涓脊绐楃敾闈�
-        //    var dialogForm = new DialogInputFrameControl(this, DialogFrameMode.OnlyInput);
+        /// <summary>
+        /// 妫�娴嬫ゼ灞傚悕绉�
+        /// </summary>
+        /// <param name="keys">涓婚敭</param>
+        /// <param name="newFloorName">鏂扮殑妤煎眰鍚嶇О</param>
+        /// <returns></returns>
+        private bool CheckFloorName(string keys, string newFloorName)
+        {
+            if (newFloorName == string.Empty)
+            {
+                //璇疯緭鍏ヤ綇瀹呭悕绉�
+                string msg = Language.StringByID(R.MyInternationalizationString.uPleaseInputFloorName);
+                this.ShowMassage(ShowMsgType.Error, msg);
+                return false;
+            }
+            foreach (string floorKeys in Common.Config.Instance.Home.FloorDics.Keys)
+            {
+                if (floorKeys != keys && newFloorName == Common.Config.Instance.Home.FloorDics[floorKeys])
+                {
+                    //妤煎眰鍚嶇О宸茬粡瀛樺湪
+                    string msg = Language.StringByID(R.MyInternationalizationString.uFloorNameIsExist);
+                    this.ShowMassage(ShowMsgType.Error, msg);
+                    return false;
+                }
+            }
+            return true;
+        }
 
-        //    if (string.IsNullOrEmpty(info.Name) == true)
-        //    {
-        //        //娣诲姞浣忓畢
-        //        dialogForm.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddResidence));
-        //    }
-        //    else
-        //    {
-        //        //缂栬緫浣忓畢
-        //        dialogForm.SetTitleText(Language.StringByID(R.MyInternationalizationString.uEditorResidence));
-        //    }
+        #endregion
 
-        //    //璇疯緭鍏ヤ綇瀹呭悕绉�
-        //    dialogForm.SetTipText(Language.StringByID(R.MyInternationalizationString.uPleaseInputResidenceName));
-        //    if (info.Name != null)
-        //    {
-        //        dialogForm.InputText = info.Name;
-        //    }
-           
-        //    //鎸変笅纭鎸夐挳
-        //    dialogForm.ComfirmClickEvent += (()=>
-        //    {
-        //        string resiName = dialogForm.InputText;
-        //        if (resiName == string.Empty)
-        //        {
-        //            //璇疯緭鍏ヤ綇瀹呭悕绉�
-        //            string msg = Language.StringByID(R.MyInternationalizationString.uPleaseInputResidenceName);
-        //            this.ShowErrorMsg(msg);
-        //            return;
-        //        }
-        //        //鐢婚潰鍏抽棴
-        //        dialogForm.CloseDialog();
+        #region 鈻� 鍒犻櫎妤煎眰___________________________
 
-        //        if (info.Name != resiName)
-        //        {
-        //            //淇濆瓨浣忓畢
-        //            this.SaveResidence(resiName, info, string.IsNullOrEmpty(info.Name) == false);
-        //        }
-        //    });
-        //}
+        /// <summary>
+        /// 鍒犻櫎妤煎眰
+        /// </summary>
+        /// <param name="keys"></param>
+        private void DeleteFloor(string keys)
+        {
+            //纭鍒犻櫎妤煎眰鍙婂叾鎵�鏈夋埧闂�?
+            this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uDeleteFloorMsg), () =>
+            {
+                //绉婚櫎妤煎眰
+                Common.Config.Instance.Home.FloorDics.Remove(keys);
+                if (Common.Room.CurrentRoom == null)
+                {
+                    Common.Room.CurrentRoom = Common.Room.Lists[0];
+                }
+                var listDeleteFile = new List<string>();
+                for (int i = 0; i < Common.Room.Lists.Count; i++)
+                {
+                    if (Common.Room.Lists[i].FloorId == keys)
+                    {
+                        listDeleteFile.Add(Common.Room.Lists[i].FileName);
+                    }
+                }
+                //鍒犻櫎鎴块棿
+                foreach (string fileName in listDeleteFile)
+                {
+                    Common.Room.CurrentRoom.Remove(fileName);
+                }
+                //濡傛灉褰撳墠閫夋嫨鐨勬埧闂存槸鍒犻櫎瀵硅薄鐨勮瘽
+                if (Common.Room.CurrentRoom.FloorId == keys)
+                {
+                    Common.Room.CurrentRoom = Common.Room.Lists[0];
+                }
+                Common.Config.Instance.Home.Save();
+                //閲嶆柊鍒濆鍖栨ゼ灞傝
+                listFloorSort.Remove(keys);
+                this.InitFloorRow();
+            });
+        }
 
-        //#endregion
+        #endregion
 
-        //#region 鈻� 淇濆瓨浣忓畢___________________________
+        #region 鈻� 鍙充笂瑙掕彍鍗昣________________________
 
-        ///// <summary>
-        ///// 淇濆瓨浣忓畢
-        ///// </summary>
-        ///// <param name="ResidenceName"></param>
-        ///// <param name="info"></param>
-        ///// <param name="isEditor"></param>
-        ///// <returns></returns>
-        //private async void SaveResidence(string ResidenceName, Common.ResponseEntity.ResidenceObj info, bool isEditor)
-        //{
-        //    //妫�娴嬭兘鍚︿繚瀛樹綇瀹�
-        //    if (this.CheckIsCanSaveResidence(info.Id, ResidenceName, isEditor) == false)
-        //    {
-        //        return;
-        //    }
-        //    //寮�鍚繘搴︽潯
-        //    this.ShowProgressBar();
+        /// <summary>
+        /// 鍒濆鍖栧彸涓婅鑿滃崟
+        /// </summary>
+        private void InitTopRightMenu()
+        {
+            var btnIcon = new MostRightIconControl(69, 69);
+            btnIcon.UnSelectedImagePath = "Item/More.png";
+            topFrameLayout.AddChidren(btnIcon);
+            btnIcon.InitControl();
+            btnIcon.ButtonClickEvent += ((sender, e) =>
+            {
+                var frame = new TopRightMenuControl(this, 1);
+                //鍒犻櫎浣忓畢
+                frame.AddRowMenu(Language.StringByID(R.MyInternationalizationString.uDeleteResidence), "Item/DeleteIcon2.png", "Item/DeleteIcon2Selected.png", () =>
+                {
+                    //纭鍒犻櫎浣忓畢鍙婃墍鏈夋ゼ灞傘�佹埧闂�?
+                    string msg = Language.StringByID(R.MyInternationalizationString.uDeleteResidenceMsg);
+                    this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+                    {
+                        this.DeleteResidence();
+                    });
+                });
+            });
+        }
 
-        //    if (isEditor == true)
-        //    {
-        //        var Pra = new EditorResidencePra();
-        //        Pra.HomeId = info.Id;
-        //        Pra.Name = ResidenceName;
-        //        //缂栬緫浣忓畢
-        //        bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("App/EditHome", false, Pra);
-        //        if (flage == false)
-        //        {
-        //            //鍏抽棴杩涘害鏉�
-        //            this.CloseProgressBar();
-        //            return;
-        //        }
-        //        //鍒锋柊鍐呭瓨鐨勪綇瀹呭悕
-        //        House.EditorHouseByHouseId(info.Id, ResidenceName);
-        //        //閲嶆柊鍒锋柊鍒楄〃
-        //        this.SetResidenceInfo();
-        //    }
-        //    else
-        //    {
-        //        var Pra = new AddResidencePra();
-        //        Pra.Name = ResidenceName;
-        //        //娣诲姞浣忓畢
-        //        string resultData = await UserCenterLogic.GetResponseDataByRequestHttps("App/AddHome", false, Pra);
-        //        if (resultData == null)
-        //        {
-        //            //鍏抽棴杩涘害鏉�
-        //            this.CloseProgressBar();
-        //            return;
-        //        }
+        /// <summary>
+        /// 鍒犻櫎浣忓畢
+        /// </summary>
+        public async void DeleteResidence()
+        {
+            //寮�鍚繘搴︽潯
+            this.ShowProgressBar();
 
-        //        var newInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<List<NewResidenceInfo>>(resultData);
+            var Pra = new DeleteResidencePra();
+            Pra.HomeId = Common.Config.Instance.Home.Id;
+            Pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-        //        House.AddHouse(newInfo[0].Id, ResidenceName, 0);
-        //        //閲嶆柊鍒锋柊鍒楄〃
-        //        this.SetResidenceInfo();
-        //    }
-        //}
+            bool result = await UserCenterLogic.GetResultStatuByRequestHttps("App/DelHome", true, Pra);
+            //鍏抽棴杩涘害鏉�
+            this.CloseProgressBar();
+            if (result == false)
+            {
+                return;
+            }
 
-        //#endregion
+            HdlThreadLogic.Current.RunThread(async () =>
+            {
+                //鍥犱负鍒犻櫎鐨勬槸褰撳墠鐨勪綇瀹�,鎵�浠ラ渶瑕佸厛鍒囨崲鍒板埆鐨勪綇瀹�
+                string deleteId = Common.Config.Instance.Home.Id;
+                string deleteFile = Common.Config.Instance.Home.FileName;
+                int index = 0;
+                for (; index < Common.Config.Instance.HomeFilePathList.Count; index++)
+                {
+                    if (Common.Config.Instance.HomeFilePathList[index] == deleteFile)
+                    {
+                        //褰撳墠浣忓畢鎵�澶勭殑浣嶇疆(浣忓畢鏁拌偗瀹氬ぇ浜�1,涓嶇劧涓嶄細鍑虹幇鍒犻櫎鎸夐挳)
+                        if (index == 0)
+                        {
+                            //鍙栦笅涓�浣�
+                            index++;
+                        }
+                        else
+                        {
+                            //鍙栧墠涓�浣�
+                            index--;
+                        }
+                        break;
+                    }
+                }
 
-        //#region 鈻� 鍒犻櫎浣忓畢___________________________
+                var myHouse = Common.House.GetHouseByFilePath(Common.Config.Instance.HomeFilePathList[index]);
+                //鍒囨崲浣忓畢
+                Common.Config.Instance.HomeId = myHouse.Id;
+                Common.Global.CreateHomeDirectory(myHouse.Id);
+                Common.Config.Instance.Save();
+                //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
+                await UserCenterLogic.InitUserCenterMenmoryAndThread();
+                Common.Room.InitAllRoom();
 
-        ///// <summary>
-        ///// 鍒犻櫎浣忓畢
-        ///// </summary>
-        ///// <param name="info"></param>
-        //public async void DeleteResidence(Common.ResponseEntity.ResidenceObj info)
-        //{
-        //    //寮�鍚繘搴︽潯
-        //    this.ShowProgressBar();
+                //鍒犻櫎浣忓畢
+                Common.House.DeleteHouseByHouseId(deleteId);
 
-        //    var Pra = new DeleteResidencePra();
-        //    Pra.HomeId = info.Id;
+                Application.RunOnMainThread(() =>
+                {
+                    //鍏抽棴鐣岄潰
+                    this.CloseForm();
+                });
+            });
+        }
 
-        //    bool result = await UserCenterLogic.GetResultStatuByRequestHttps("App/DelHome", false, Pra);
-        //    if (result == false)
-        //    {
-        //        //鍏抽棴杩涘害鏉�
-        //        this.CloseProgressBar();
-        //        return;
-        //    }
-        //    House.DeleteHouseByHouseId(info.Id);
+        #endregion
 
-        //    this.SetResidenceInfo();
-        //}
+        #region 鈻� 缁撴瀯浣揰____________________________
 
-        //#endregion
+        /// <summary>
+        ///  鍒犻櫎浣忓畢鐨勫惎鍔ㄥ弬鏁�
+        /// </summary>
+        public class DeleteResidencePra : IfacePraCommon
+        {
+            /// <summary>
+            /// RequestVersion
+            /// </summary>
+            public string RequestVersion = Common.CommonPage.RequestVersion;
+            /// <summary>
+            /// LoginAccessToken
+            /// </summary>
+            public string LoginAccessToken = Common.Config.Instance.Token;
+            /// <summary>
+            /// ZigbeeHomeId
+            /// </summary>
+            public string HomeId = "";
+        }
 
-        //#region 鈻� 涓�鑸柟娉昣__________________________
-
-        ///// <summary>
-        ///// 妫�娴嬭兘鍚﹀垹闄や綇瀹�
-        ///// </summary>
-        ///// <param name="info"></param>
-        ///// <returns></returns>
-        //private bool CheckIsCanDeleteResidence(Common.ResponseEntity.ResidenceObj info)
-        //{
-        //    if (this.dicResidenceData.Count == 1)
-        //    {
-        //        //濡傛灉姝よ处鍙蜂笅鍙墿涓嬪敮涓�涓�涓嚜宸辩殑浣忓畢锛屽綋鍒犻櫎杩欎釜浣忓畢鏃讹紝鎻愮ず涓嶈兘鍒犻櫎
-        //        //鍥犱负鏈�灏戣鏈変竴涓綇瀹�
-        //        if (this.dicResidenceData.ContainsKey(info.Id) == true)
-        //        {
-        //            //涓嶈兘鍒犻櫎鏈�鍚庡敮涓�鐨勪綇瀹�
-        //            string msg = Language.StringByID(R.MyInternationalizationString.uDoNotDeleteLastResidence);
-        //            this.ShowErrorMsg(msg);
-        //            return false;
-        //        }
-        //    }
-        //    return true;
-        //}
-
-        ///// <summary>
-        ///// 妫�娴嬭兘鍚︿繚瀛樹綇瀹�
-        ///// </summary>
-        ///// <param name="residenceId">浣忓畢ID</param>
-        ///// <param name="residenceName">浣忓畢鍚�</param>
-        ///// <param name="isEditor">isEditor</param>
-        ///// <returns></returns>
-        //private bool CheckIsCanSaveResidence(string residenceId, string residenceName, bool isEditor)
-        //{
-        //    //浣忓畢鍚嶅瓧閲嶅妫�娴�
-        //    foreach (string strId in this.dicResidenceData.Keys)
-        //    {
-        //        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.ShowErrorMsg(msg);
-        //            return false;
-        //        }
-        //    }
-        //    return true;
-        //}
-
-        //#endregion
-
-        //#region 鈻� 缁撴瀯浣揰____________________________
-
-        ///// <summary>
-        ///// 璁块棶浣忓畢淇℃伅鎺ュ彛鐨勫惎鍔ㄥ弬鏁�(鏌ヨ涓撶敤)
-        ///// </summary>
-        //public class GetResidenceInfoPra:IfacePraCommon
-        //{
-        //    /// <summary>
-        //    /// RequestVersion
-        //    /// </summary>
-        //    public string RequestVersion = Common.CommonPage.RequestVersion;
-        //    /// <summary>
-        //    /// ReqDto
-        //    /// </summary>
-        //    public TokenInfo ReqDto = new TokenInfo();
-        //}
-
-        ///// <summary>
-        ///// 璁块棶浣忓畢淇℃伅鎺ュ彛鐨勫惎鍔ㄥ弬鏁�(鏌ヨ涓撶敤)
-        ///// </summary>
-        //public class TokenInfo
-        //{
-        //    /// <summary>
-        //    /// LoginAccessToken
-        //    /// </summary>
-        //    public string LoginAccessToken = Common.Config.Instance.Token;
-        //    /// <summary>
-        //    /// PageSetting
-        //    /// </summary>
-        //    public PageSettingInfo PageSetting = new PageSettingInfo()
-        //    {
-        //        Page = 1,
-        //        PageSize = 500
-        //    };
-        //}
-
-        ///// <summary>
-        /////  娣诲姞浣忓畢鐨勫惎鍔ㄥ弬鏁�
-        ///// </summary>
-        //public class AddResidencePra:IfacePraCommon
-        //{
-        //    /// <summary>
-        //    /// RequestVersion
-        //    /// </summary>
-        //    public string RequestVersion = Common.CommonPage.RequestVersion;
-        //    /// <summary>
-        //    /// LoginAccessToken
-        //    /// </summary>
-        //    public string LoginAccessToken = Common.Config.Instance.Token;
-        //    /// <summary>
-        //    /// Name
-        //    /// </summary>
-        //    public string Name = string.Empty;
-        //}
-
-        ///// <summary>
-        ///// 鏂颁綇瀹呯殑淇℃伅
-        ///// </summary>
-        //public class NewResidenceInfo
-        //{
-        //    /// <summary>
-        //    /// ZigbeeHomeGuid
-        //    /// </summary>
-        //    public string Id = string.Empty;
-        //}
-
-        ///// <summary>
-        /////  缂栬緫浣忓畢鐨勫惎鍔ㄥ弬鏁�
-        ///// </summary>
-        //public class EditorResidencePra : IfacePraCommon
-        //{
-        //    /// <summary>
-        //    /// RequestVersion
-        //    /// </summary>
-        //    public string RequestVersion = Common.CommonPage.RequestVersion;
-        //    /// <summary>
-        //    /// LoginAccessToken
-        //    /// </summary>
-        //    public string LoginAccessToken = Common.Config.Instance.Token;
-        //    /// <summary>
-        //    /// ZigbeeHomeId
-        //    /// </summary>
-        //    public string HomeId = "";
-        //    /// <summary>
-        //    /// Name
-        //    /// </summary>
-        //    public string Name = string.Empty;
-        //}
-
-        ///// <summary>
-        /////  鍒犻櫎浣忓畢鐨勫惎鍔ㄥ弬鏁�
-        ///// </summary>
-        //public class DeleteResidencePra : IfacePraCommon
-        //{
-        //    /// <summary>
-        //    /// RequestVersion
-        //    /// </summary>
-        //    public string RequestVersion = Common.CommonPage.RequestVersion;
-        //    /// <summary>
-        //    /// LoginAccessToken
-        //    /// </summary>
-        //    public string LoginAccessToken = Common.Config.Instance.Token;
-        //    /// <summary>
-        //    /// ZigbeeHomeId
-        //    /// </summary>
-        //    public string HomeId = "";
-        //}
-        //#endregion
+        #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/TemperatrueHumiditySensorSelectForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/TemperatrueHumiditySensorSelectForm.cs
new file mode 100755
index 0000000..0b26480
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/TemperatrueHumiditySensorSelectForm.cs
@@ -0,0 +1,10 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter.Residence
+{
+    public class TemperatrueHumiditySensorSelectForm : EditorCommonForm
+    {
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/AddAlarmTargetTypeListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/AddAlarmTargetTypeListForm.cs
index a798f83..7f49657 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/AddAlarmTargetTypeListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/AddAlarmTargetTypeListForm.cs
@@ -60,7 +60,7 @@
         /// </summary>
         private void SetMiddleInfo()
         {
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鑾峰彇璁惧鐨勬墍鏈夌被鍨嬶紝骞舵暣鐞嗘垚姣忎竴琛岀殑鏁版嵁
                 this.GetAllListData();
@@ -90,8 +90,7 @@
                         this.AddRowLaout(listAllDeviceInfo[i], i != count);
                     }
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
@@ -193,7 +192,7 @@
                     //璁惧鏀堕泦
                     var info = new uDeviceInfo
                     {
-                        listRoomName = Shared.Common.Room.CurrentRoom.GetRoomListNameByDevice(device),
+                        RoomName = Shared.Common.Room.CurrentRoom.GetRoomNameByDevice(device),
                         Device = device,
                         MainKeys = device.DeviceAddr + device.DeviceEpoint.ToString()
                     };
@@ -237,10 +236,12 @@
         /// <summary>
         /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
         /// </summary>
-        public override void FormActionAgainEvent()
+        public override int FormActionAgainEvent()
         {
             //閲嶆柊鍒锋柊鐣岄潰
             this.InitMiddleFrame();
+
+            return 1;
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/AddDeviceAlarmTargetListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/AddDeviceAlarmTargetListForm.cs
index 6f72ba9..8913330 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/AddDeviceAlarmTargetListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/AddDeviceAlarmTargetListForm.cs
@@ -99,7 +99,7 @@
         /// </summary>
         private void SetMiddleFrameInfo()
         {
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 if (this.Parent == null)
                 {
@@ -128,8 +128,7 @@
                         }
                     }
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/AddSceneAlarmTargetListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/AddSceneAlarmTargetListForm.cs
index 6516847..7aea3f8 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/AddSceneAlarmTargetListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/AddSceneAlarmTargetListForm.cs
@@ -66,7 +66,7 @@
             listView.BackgroundColor = UserCenterColor.Current.White;
             bodyFrameLayout.AddChidren(listView);
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鑾峰彇鏈湴瀹夐槻鐨勫満鏅�
                 Dictionary<int, string> dicScene = HdlSafeguardLogic.Current.GetLocalSceneByZoneID(this.zoonID);
@@ -103,8 +103,7 @@
                         }
                     }
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetSettionForm.cs
index ec32d7c..e8a5a21 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetSettionForm.cs
@@ -90,13 +90,12 @@
 
             //娣诲姞搴曢儴 娣诲姞鎶ヨ鐩爣鐨勮彍鍗曡
             this.AddBottomAlarmTargetMenu();
- 
-            new System.Threading.Thread(() =>
+
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //璁剧疆涓棿閮ㄥ垎淇℃伅
                 this.SetMiddleInfo(listData);
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -368,10 +367,12 @@
         /// <summary>
         /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
         /// </summary>
-        public override void FormActionAgainEvent()
+        public override int FormActionAgainEvent()
         {
             //閲嶆柊鍒锋柊鐣岄潰
             this.InitMiddleFrame();
+
+            return 1;
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoerceContactSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoerceContactSettionForm.cs
index af92cc9..8aeb73c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoerceContactSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/CoerceContactSettionForm.cs
@@ -82,7 +82,7 @@
         //    this.listView.Height = 0;
         //    frameTableLayout.AddChidren(this.listView);
 
-        //    new System.Threading.Thread(() =>
+        //    HdlThreadLogic.Current.Run(() =>
         //    {
         //        Application.RunOnMainThread(() =>
         //        {
@@ -91,8 +91,7 @@
         //            //娣诲姞銆愭坊鍔犺仈绯讳汉銆戠殑琛�
         //            this.AddAddContactPersionRow();
         //        });
-        //    })
-        //    { IsBackground = true }.Start();
+        //    });
         //}
 
         ///// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/PasswordRefreshMsgForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/PasswordRefreshMsgForm.cs
index 301b794..7777241 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/PasswordRefreshMsgForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/PasswordRefreshMsgForm.cs
@@ -25,7 +25,7 @@
             txtMsg.TextAlignment = TextAlignment.Center;
             bodyFrameLayout.AddChidren(txtMsg);
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //浜旂鍚庡叧闂敾闈�
                 System.Threading.Thread.Sleep(5000);
@@ -33,8 +33,7 @@
                 {
                     this.CloseForm();
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
index 55ccfe5..2c46711 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
@@ -326,7 +326,7 @@
             listView.Height = frameLayoutDraw.Height;
             frameLayoutDraw.AddChidren(listView);
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鑾峰彇瀹夐槻鐨勫叏閮ㄤ紶鎰熷櫒璁惧鐨勪俊鎭�
                 var dicDevice = HdlSafeguardLogic.Current.GetAllSensorDeviceInfo();
@@ -363,8 +363,7 @@
                         }
                     });
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -454,7 +453,7 @@
             oldGetOnlineTime = DateTime.Now;
 
             //浠庤澶囧垪琛ㄤ腑鑾峰彇鍦ㄧ嚎鐘舵��
-            new System.Threading.Thread(async () =>
+            HdlThreadLogic.Current.RunThread(async () =>
             {
                 //棣栧厛鑾峰彇杩欎簺浼犳劅鍣ㄦ墍鍦ㄧ殑缃戝叧
                 var listWay = new List<ZbGateway>();
@@ -477,8 +476,7 @@
                     }
                     await Common.LocalDevice.Current.GetDeviceListFromGateway(zbway, this.ReceiveDeviceStatuPush, ShowErrorMode.NO);
                 }
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -557,7 +555,7 @@
             listView.Height = frameLayoutDraw.Height;
             frameLayoutDraw.AddChidren(listView);
 
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 var dicAlarm = HdlAlarmsLogic.Current.GetSafeguardAlarmInfo();
                 var dicInfo = new Dictionary<string, Dictionary<int, List<SafeguardAlarmInfo>>>();
@@ -630,8 +628,7 @@
                     //寮�鍚紶鎰熷櫒鎶ヨ鐩戣
                     this.StartCheckDeviceAlarm();
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         /// <summary>
@@ -711,7 +708,7 @@
         /// <summary>
         /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
         /// </summary>
-        public override void FormActionAgainEvent()
+        public override int FormActionAgainEvent()
         {
             //璁剧疆甯冮槻鎸夐挳鐨勫彲瑙嗙姸鎬�
             garrisonControl?.SetButtonVisible();
@@ -726,6 +723,7 @@
                 //璁剧疆浼犳劅鍣ㄦ暟鎹埌鐢婚潰
                 this.SetSensorDataToForm();
             }
+            return 1;
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SectorsSettionMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SectorsSettionMenuForm.cs
index efd7962..43fc1c3 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SectorsSettionMenuForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SectorsSettionMenuForm.cs
@@ -100,9 +100,7 @@
             listView.AddChidren(row4);
             row4.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uInformationPush), 500);
             //寮�鍏冲浘鏍�
-            var btnSwicth = row4.AddMostRightEmptyIcon(104, 63);
-            btnSwicth.UnSelectedImagePath = "Item/Switch.png";
-            btnSwicth.SelectedImagePath = "Item/SwitchSelected.png";
+            var btnSwicth = row4.AddMostRightSwitchIcon();
             btnSwicth.IsSelected = HdlSafeguardLogic.Current.GetGarrisonInformationPushStatu(this.zoonID) == 0;
             btnSwicth.ButtonClickEvent += (sender, e) =>
             {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SensorDeviceSettionListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SensorDeviceSettionListForm.cs
index 373d26f..db0d6dc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SensorDeviceSettionListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SensorDeviceSettionListForm.cs
@@ -72,7 +72,7 @@
             {
                 return;
             }
-            new System.Threading.Thread(() =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 Application.RunOnMainThread(() =>
                 {
@@ -92,8 +92,7 @@
                     //璋冩暣鍒楄〃鎺т欢鐨勯珮搴�
                     this.AdjustListviewHeight();
                 });
-            })
-            { IsBackground = true }.Start();
+            });
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedListRoomForm.cs
index 4846515..a633d1a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedListRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedListRoomForm.cs
@@ -68,12 +68,11 @@
         //    listView.Height = bodyFrameLayout.Height - Application.GetRealHeight(30) - btnTitle.Bottom;
         //    bodyFrameLayout.AddChidren(listView);
 
-        //    new System.Threading.Thread(() =>
+        //    HdlThreadLogic.Current.Run(() =>
         //    {
         //        //鍒濆鍖栧尯鍩熷垪琛�
         //        this.InitAreaListRow();
-        //    })
-        //    { IsBackground = true }.Start();
+        //    });
         //}
 
         #endregion
@@ -239,7 +238,7 @@
         //        listScene.Add(sceneUi);
         //    }
 
-        //    new System.Threading.Thread(async () =>
+        //    HdlThreadLogic.Current.Run(async () =>
         //    {
         //        //鎵ц涓婁紶
         //        var result = await HdlShardLogic.Current.DoUploadSharedContent(memberShardInfo, room, listDevice, listScene);
@@ -258,8 +257,7 @@
         //                }
         //            });
         //        }
-        //    })
-        //    { IsBackground = true }.Start();
+        //    });
         //}
 
         //#endregion
@@ -271,6 +269,8 @@
         ///// </summary>
         //public override void FormActionAgainEvent()
         //{
+        //    //涓嶈鍒犻櫎杩欎釜鍑芥暟
+        //    base.FormActionAgainEvent();
         //    //閲嶆柊鍒锋柊鐣岄潰
         //    this.InitMiddleFrame();
         //}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedMainForm.cs
index d5b5737..3345b21 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedMainForm.cs
@@ -63,12 +63,11 @@
             //topFrameLayout.AddChidren(btnShard);
             //btnShard.MouseUpEventHandler += (sender, e) =>
             //{
-            //    new System.Threading.Thread(() =>
+            //    HdlThreadLogic.Current.Run(() =>
             //    {
             //        //纭鍒嗕韩
             //        this.DoSaveSharedContent();
-            //    })
-            //    { IsBackground = true }.Start();
+            //    });
             //};
 
             ////鍒濆鍖栦腑閮ㄤ俊鎭�
@@ -98,14 +97,13 @@
         //    listSceneView.Visible = this.TabSelectIndex == 2;
         //    bodyFrameLayout.AddChidren(listSceneView);
 
-        //    new System.Threading.Thread(() =>
+        //    HdlThreadLogic.Current.Run(() =>
         //    {
         //        //鍒濆鍖栧姛鑳絋ab鍒楄〃
         //        this.InitFunctionTabList();
         //        //鍒濆鍖栧満鏅疶ab鍒楄〃
         //        this.InitSceneTabList();
-        //    })
-        //    { IsBackground = true }.Start();
+        //    });
         //}
 
         #endregion
@@ -127,7 +125,7 @@
         //    //鍔熻兘
         //    var btnFunction = new NormalViewControl(frameSwich.Width / 2, Application.GetRealHeight(100));
         //    btnFunction.Gravity = Gravity.CenterVertical;
-        //    btnFunction.TextID = R.MyInternationalizationString.Function;
+        //    btnFunction.TextID = R.MyInternationalizationString.uFunction;
         //    btnFunction.TextAlignment = TextAlignment.Center;
         //    btnFunction.TextColor = UserCenterColor.Current.SelectTextColor;
         //    btnFunction.TextAlignment = TextAlignment.Center;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedListRoomForm.cs
index 70ca15f..ed9afe6 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedListRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedListRoomForm.cs
@@ -79,7 +79,7 @@
         //    listView.Height = bodyFrameLayout.Height - Application.GetRealHeight(30) - btnTitle.Bottom;
         //    bodyFrameLayout.AddChidren(listView);
 
-        //    new System.Threading.Thread(async () =>
+        //    HdlThreadLogic.Current.Run(async () =>
         //    {
         //        //鑾峰彇鎴愬憳鐨勫叡浜垪琛�(杩斿洖鏂囦欢鐨勫悕瀛楀拰涓婚敭)
         //        var result = await this.GetMemberShardContentListAndSetToLocation();
@@ -92,8 +92,7 @@
         //        //鍒濆鍖栧尯鍩熷垪琛�
         //        this.InitAreaListRow();
 
-        //    })
-        //    { IsBackground = true }.Start();
+        //    });
         //}
 
         #endregion
@@ -195,7 +194,7 @@
         //        listScene.Add(sceneUi);
         //    }
 
-        //    new System.Threading.Thread(async () =>
+        //    HdlThreadLogic.Current.Run(async () =>
         //    {
         //        //鎵ц鍒犻櫎
         //        var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, room, listDevice, listScene);
@@ -207,8 +206,7 @@
         //                this.InitMiddleFrame();
         //            });
         //        }
-        //    })
-        //    { IsBackground = true }.Start();
+        //    });
         //}
 
         //#endregion
@@ -377,6 +375,8 @@
         ///// </summary>
         //public override void FormActionAgainEvent()
         //{
+        //    //涓嶈鍒犻櫎杩欎釜鍑芥暟
+        //    base.FormActionAgainEvent();
         //    //閲嶆柊鍒锋柊鐣岄潰
         //    this.InitMiddleFrame();
         //}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedMainForm.cs
index 39b1f8c..9e8b9cd 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedMainForm.cs
@@ -83,14 +83,13 @@
         //    listSceneView.Visible = this.TabSelectIndex == 2;
         //    bodyFrameLayout.AddChidren(listSceneView);
 
-        //    new System.Threading.Thread(() =>
+        //    HdlThreadLogic.Current.Run(() =>
         //    {
         //        //鍒濆鍖栧姛鑳絋ab鍒楄〃
         //        this.InitFunctionTabList();
         //        //鍒濆鍖栧満鏅疶ab鍒楄〃
         //        this.InitSceneTabList();
-        //    })
-        //    { IsBackground = true }.Start();
+        //    });
         //}
 
         #endregion
@@ -112,7 +111,7 @@
         //    //鍔熻兘
         //    var btnFunction = new NormalViewControl(frameSwich.Width / 2, Application.GetRealHeight(100));
         //    btnFunction.Gravity = Gravity.CenterVertical;
-        //    btnFunction.TextID = R.MyInternationalizationString.Function;
+        //    btnFunction.TextID = R.MyInternationalizationString.uFunction;
         //    btnFunction.TextAlignment = TextAlignment.Center;
         //    btnFunction.TextColor = UserCenterColor.Current.SelectTextColor;
         //    btnFunction.TextAlignment = TextAlignment.Center;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
index a400080..705fdbd 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
@@ -54,9 +54,7 @@
             btnEffect.TextColor = UserCenterColor.Current.TextGrayColor1;
             rowFinger.AddChidren(btnEffect, ChidrenBindMode.NotBind);
             //寮�鍏虫寜閽�
-            var btnFingerSwicth = rowFinger.AddMostRightEmptyIcon(104, 63);
-            btnFingerSwicth.UnSelectedImagePath = "Item/Switch.png";
-            btnFingerSwicth.SelectedImagePath = "Item/SwitchSelected.png";
+            var btnFingerSwicth = rowFinger.AddMostRightSwitchIcon();
             btnFingerSwicth.IsSelected = UserCenterResourse.Option.FingerprintAuthentication;
             //搴曠嚎
             rowFinger.AddBottomLine();
@@ -132,9 +130,7 @@
             btnUnLockByApp.TextColor = UserCenterColor.Current.TextGrayColor1;
             rowLock.AddChidren(btnUnLockByApp, ChidrenBindMode.NotBind);
             //寮�鍏虫寜閽�
-            var btnLockSwicth = rowLock.AddMostRightEmptyIcon(104, 63);
-            btnLockSwicth.UnSelectedImagePath = "Item/Switch.png";
-            btnLockSwicth.SelectedImagePath = "Item/SwitchSelected.png";
+            var btnLockSwicth = rowLock.AddMostRightSwitchIcon();
             //搴曠嚎
             rowLock.AddBottomLine();
             btnLockSwicth.IsSelected = UserCenterResourse.Option.DoorUnLockByRemote;
@@ -176,12 +172,34 @@
             //瀵嗙爜楠岃瘉
             rowPsw.ButtonClickEvent += (sender, e) =>
             {
-                var form = new Password.EditorSecondaryPasswordForm();
-                form.AddForm();
+                //濡傛灉娌℃湁瀵嗙爜楠岃瘉
+                if (string.IsNullOrEmpty(UserCenterResourse.Option.PswAuthentication) == true)
+                {
+                    //濡傛灉璁剧疆鏈夊叾浠栭獙璇佹柟寮�,鍒欓渶瑕侀獙璇�,鍚﹀垯鐩存帴璺宠繃楠岃瘉
+                    HdlCheckLogic.Current.CheckSecondarySecurity(
+                   () => { var form = new Password.EditorSecondaryPasswordForm(); form.AddForm(); },
+                   () => { var form = new Password.EditorSecondaryPasswordForm(); form.AddForm(); });
+                }
+                else
+                {
+                    var form = new Password.EditorSecondaryPasswordForm();
+                    form.AddForm();
+                }
             };
             //鎵嬪娍楠岃瘉
             rowGesture.ButtonClickEvent += (sender, e) =>
             {
+                //濡傛灉娌℃湁鎵嬪娍楠岃瘉
+                if (string.IsNullOrEmpty(UserCenterResourse.Option.GestureAuthentication) == true)
+                {
+                    //濡傛灉璁剧疆鏈夊叾浠栭獙璇佹柟寮�,鍒欓渶瑕侀獙璇�,鍚﹀垯鐩存帴璺宠繃楠岃瘉
+                    HdlCheckLogic.Current.CheckSecondarySecurity(
+                   () => { },
+                   () => { });
+                }
+                else
+                {
+                }
             };
             //杩滅▼寮�閿�
             btnLockSwicth.ButtonClickEvent += (sender, e) =>
@@ -289,10 +307,12 @@
         /// <summary>
         /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
         /// </summary>
-        public override void FormActionAgainEvent()
+        public override int FormActionAgainEvent()
         {
             //閲嶆柊鍒锋柊鐣岄潰
             this.InitMiddleFrame();
+
+            return 1;
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
index 833ab19..d84a7e6 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
@@ -301,10 +301,12 @@
         /// <summary>
         /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
         /// </summary>
-        public override void FormActionAgainEvent()
+        public override int FormActionAgainEvent()
         {
             //閲嶆柊鍒锋柊鐣岄潰
             this.ShowForm();
+
+            return 1;
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
index 3ce4dde..77ba2cb 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
@@ -18,6 +18,10 @@
         /// 鐢ㄦ埛鍚嶅瓧
         /// </summary>
         private NormalViewControl btnUserName = null;
+        /// <summary>
+        /// 鐢ㄦ埛韬唤
+        /// </summary>
+        private NormalViewControl btnAuthority = null;
 
         #endregion
 
@@ -127,7 +131,7 @@
             frameWhite.AddChidren(btnUserName);
 
             //鐢ㄦ埛韬唤
-            var btnAuthority = new NormalViewControl(605, 60, true);
+            this.btnAuthority = new NormalViewControl(605, 60, true);
             btnAuthority.X = btnUserName.X;
             btnAuthority.Y = btnUserName.Bottom;
             btnAuthority.TextColor = UserCenterColor.Current.Gray;
@@ -244,7 +248,7 @@
                 frame.ButtonClickEvent += (sender, e) =>
                 {
                     //浣忓畢鎺ュ彛涓嶉渶瑕佺壒娈婄殑鐧婚檰Token
-                    var form = new Residence.ResidenceManagementForm();
+                    var form = new Residence.ResidenceListForm();
                     form.AddForm();
                 };
             }
@@ -397,12 +401,21 @@
         /// <summary>
         /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
         /// </summary>
-        public override void FormActionAgainEvent()
+        public override int FormActionAgainEvent()
         {
+            //涓嶈鍒犻櫎杩欎釜鍑芥暟
+            base.FormActionAgainEvent();
             //鐢ㄦ埛鍚嶅瓧
             btnUserName.Text = UserCenterResourse.UserInfo.UserName;
+            if (UserCenterResourse.UserInfo != null)
+            {
+                //鐢ㄦ埛韬唤
+                btnAuthority.Text = UserCenterResourse.UserInfo.AuthorityText;
+            }
             //鍒濆鍖栦富鑿滃崟鐨勬帶浠�
             this.InitMainMenuInfoControl(frameWhiteBack);
+
+            return 1;
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs
index c3ae6f1..11eef73 100755
--- a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs
@@ -4,7 +4,7 @@
 namespace Shared.Phone.UserView
 {
     /// <summary>
-    /// Home page.
+    /// Home page.绗簩鐗堝憖
     /// </summary>
     public class HomePage : PageLayout
     {
@@ -62,15 +62,15 @@
                     {
                         new System.Threading.Thread(async () =>
                         {
+                            //鍚姩ZigBee
                             ZigBee.Common.Application.Init();
-                           
                             //鐧诲綍鎴愬姛
                             var homes = await House.GetHomeLists();
 
                             //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
                             await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
 
-                            Room.canInitAllRoom = true;
+                            Room.CanInitAllRoom = true;
                             Room.InitAllRoom();
 
                             Application.RunOnMainThread(() =>
@@ -94,6 +94,7 @@
                         //鐧诲綍澶辫触锛屼篃鐩存帴杩涘叆涓婚〉
                         new System.Threading.Thread(async () =>
                         {
+                            //鍚姩ZigBee
                             ZigBee.Common.Application.Init();
 
                             //鐧诲綍鎴愬姛
@@ -102,7 +103,7 @@
                             //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
                             await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
 
-                            Room.canInitAllRoom = true;
+                            Room.CanInitAllRoom = true;
                             Room.InitAllRoom();
 
                             Application.RunOnMainThread(() =>
@@ -166,11 +167,9 @@
 
                     var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
                     var revertData = responseDataObj;
-                    Config.Instance.UserID = revertData.UserID;
-                    Config.Instance.MasterID = revertData.MainUserID;
-                    Config.Instance.AccountType = revertData.UserType;
                     Config.Instance.Account = revertData.Account;
                     Config.Instance.Password = password;
+                    Config.Instance.MD5PWD = revertData.MD5PWD;
                     Config.Instance.Guid = revertData.Guid;
                     Config.Instance.MqttKey = revertData.MqttKey;
                     Config.Instance.LoginDateTime = DateTime.Now;
diff --git a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
index b80edea..8004460 100755
--- a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
@@ -1,7 +1,9 @@
 锘縰sing System;
 using System.Collections.Generic;
 using Shared.Common;
+using Shared.Phone.Device.AC;
 using ZigBee.Device;
+using Shared.Phone.Device.CommonForm;
 
 namespace Shared.Phone.UserView
 {
@@ -33,9 +35,9 @@
         /// </summary>
         private static readonly int topFrameLayout_Height = 500;
         /// <summary>
-        /// The height of the middle view.-- 1920-500-160
+        /// 1524
         /// </summary>
-        private static readonly int midView_Height = CommonPage.AppRealHeight - topFrameLayout_Height - CommonPage.TabbarHeight;
+        private static readonly int midView_Height = 1524;
         /// <summary>
         /// The height of the room page view. -- 550
         /// </summary>
@@ -229,6 +231,17 @@
                                     break;
 
                                 case DeviceType.WindowCoveringDevice:
+                                    if ((common as Rollershade).DeviceStatusReport.CluterID == 258)
+                                    {
+                                        if ((common as Rollershade).DeviceStatusReport.AttriBute[0].AttributeId == 0)
+                                        {
+                                            //绐楀笜绫诲瀷
+                                            var rollerShade = deviceUI.CommonDevice as Rollershade;
+                                            rollerShade.DeviceStatusReport = (common as Rollershade).DeviceStatusReport;
+                                            rollerShade.WcdType = (common as Rollershade).DeviceStatusReport.AttriBute[0].AttriButeData;
+                                            rollerShade.LastDateTime = DateTime.Now;
+                                        }
+                                    }
                                     if ((common as ZigBee.Device.Rollershade).DeviceStatusReport.CluterID == 3)
                                     {
                                         var rollershade = deviceUI.CommonDevice as ZigBee.Device.Rollershade;
@@ -265,11 +278,34 @@
                                         {
                                             case 0:
                                                 //姝ゅ睘鎬ц〃鏄庡鍐呭綋鍓嶇殑娓╁害 * 100锛屽疄闄呮俯搴︿负鈥淟ocalTemperature / 100鈥濓紝鍗曚綅锛氣剝
-                                                ac.currentLocalTemperature = attriButeList[0].AttriButeData / 100;
+                                                ac.currentLocalTemperature = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
                                                 ac.LastDateTime = DateTime.Now;
-                                                //indoorTemperatureBtn.Text = $"瀹ゆ俯 {ac.currentLocalTemperature} 鈩�";
-                                                //currentTemperatureBtn.Text = $"{ac.currentLocalTemperature} 鈩�";
-                                                //Temparetrue
+                                                break;
+
+                                            case 17:
+                                                //姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勫埗鍐锋俯搴︼紝瀹為檯娓╁害涓衡�淐oolingSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
+                                                ac.currentCoolingSetpoint = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
+                                                ac.LastDateTime = DateTime.Now;
+                                                break;
+
+                                            case 18:
+                                                //姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勫埗鐑俯搴︼紝瀹為檯娓╁害涓衡�淗eatingSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
+                                                ac.currentHeatingSetpoint = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
+                                                ac.LastDateTime = DateTime.Now;
+                                                break;
+
+                                            case 4096:
+                                                //姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勮嚜鍔ㄦ俯搴︼紝瀹為檯娓╁害涓衡�淎utoSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
+                                                ac.currentAutoSetpoint = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
+                                                ac.LastDateTime = DateTime.Now;
+                                                break;
+
+                                            case 28:
+                                                //姝ゅ睘鎬ф弿杩版亽娓╄澶囨澶勪簬鍝妯″紡
+                                                //Off = 0  Auto = 1 Cool = 3 Heat = 4 FanOnly = 7  Dry = 8
+                                                ac.currentSystemMode = attriButeList[0].AttriButeData;
+                                                ac.LastDateTime = DateTime.Now;
+
                                                 for (int j = 0; j < frameLayout.ChildrenCount; j++)
                                                 {
                                                     var tempView = frameLayout.GetChildren(j);
@@ -280,42 +316,16 @@
                                                     if (tempView.Tag.ToString() == "Temparetrue")
                                                     {
 
-                                                        (tempView as Button).Text = $"{ac.currentLocalTemperature} 鈩�";
+                                                        (tempView as Button).Text = $"{ACControlBase.GetCurrentModeTemperature(ac)} 鈩�";
                                                     }
-                                                }
-                                                break;
 
-                                            case 17:
-                                                //姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勫埗鍐锋俯搴︼紝瀹為檯娓╁害涓衡�淐oolingSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
-                                                ac.currentCoolingSetpoint = attriButeList[0].AttriButeData / 100;
-                                                ac.LastDateTime = DateTime.Now;
-                                                break;
-
-                                            case 18:
-                                                //姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勫埗鐑俯搴︼紝瀹為檯娓╁害涓衡�淗eatingSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
-                                                ac.currentHeatingSetpoint = attriButeList[0].AttriButeData / 100;
-                                                ac.LastDateTime = DateTime.Now;
-                                                break;
-
-                                            case 28:
-                                                //姝ゅ睘鎬ф弿杩版亽娓╄澶囨澶勪簬鍝妯″紡
-                                                //Off = 0  Auto = 1 Cool = 3 Heat = 4 FanOnly = 7  Dry = 8
-                                                ac.currentSystemMode = attriButeList[0].AttriButeData;
-                                                ac.LastDateTime = DateTime.Now;
-                                                for (int j = 0; j < frameLayout.ChildrenCount; j++)
-                                                {
-                                                    var tempView = frameLayout.GetChildren(j);
-                                                    if (tempView.Tag == null)
-                                                    {
-                                                        continue;
-                                                    }
                                                     if (tempView.Tag.ToString() == deviceStatus_OnOffStatus)
                                                     {
-
                                                         (tempView as Button).IsSelected = ac.currentSystemMode != 0;
                                                     }
                                                 }
                                                 break;
+
 
                                         }
 
@@ -600,7 +610,7 @@
         public UserHomeView()
         {
             ZbGateway.StatusList.Add(this);
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
+            BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
         }
 
         /// <summary>
@@ -608,55 +618,83 @@
         /// </summary>
         public void Show()
         {
-
             this.RemoveAll();
 
             #region topview
             var topFrameLayout = new FrameLayout()
             {
-                Height = Application.GetRealHeight(topFrameLayout_Height),
-                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                Y=Application.GetRealHeight(60),
+                Height = Application.GetRealHeight(127),
+                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
             };
-            this.AddChidren(topFrameLayout);
+            AddChidren(topFrameLayout);
 
-            var homeBtn = new Device.CommonForm.SelectedStatuButton()
+            var floor = new Button
             {
-                Y = Application.GetRealHeight(100),
-                X = Application.GetRealWidth(50),
-                Width = Application.GetMinRealAverage(110),
-                Height = Application.GetMinRealAverage(110),
-                UnSelectedImagePath = "Item/MyHome.png",
-
+                X = Application.GetRealWidth(CommonFormResouce.X_Left),
+                Width = Application.GetMinRealAverage(69),
+                Height = Application.GetMinRealAverage(69),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Item/Floor.png"
             };
-            topFrameLayout.AddChidren(homeBtn);
+            topFrameLayout.AddChidren(floor);
 
-            var residecneName = new Button()
+            var floorBtn = new Button
             {
-                Y = Application.GetRealHeight(100),
-                Width = Application.GetRealWidth(600),
-                Height = Application.GetRealHeight(110),
-                TextAlignment = TextAlignment.Center,
-                Text = Config.Instance.Home.Name ?? Language.StringByID(R.MyInternationalizationString.TheResidenceNameNull),
-                TextSize = 20,
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                Gravity = Gravity.CenterHorizontal
+                X=floor.Right,
+                Width=Application.GetRealWidth(500),
+                Height=Application.GetRealHeight(100),
+                Gravity = Gravity.CenterVertical,
+                TextAlignment =TextAlignment.CenterLeft,
+                TextColor=ZigbeeColor.Current.GXCTextColor,
+                Text=Config.Instance.Home.GetCurrentFloorName()
             };
-            topFrameLayout.AddChidren(residecneName);
+            topFrameLayout.AddChidren(floorBtn);
 
             var messageBtn = new Button()
             {
-                X = Application.GetRealWidth(CommonPage.AppRealWidth - 150),
-                Y = Application.GetRealHeight(100),
-                Width = Application.GetMinRealAverage(110),
-                Height = Application.GetMinRealAverage(110),
-                UnSelectedImagePath = "Item/Message.png"
+                X = Application.GetRealWidth(953),
+                Width = Application.GetMinRealAverage(69),
+                Height = Application.GetMinRealAverage(69),
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Item/Message.png",
+                SelectedImagePath="Item/MessageSelected.png"
             };
-            //鏆傛椂闅愯棌
-            //topFrameLayout.AddChidren(messageBtn);
+            topFrameLayout.AddChidren(messageBtn);
 
-            //鍒囨崲浣忓畢
-            homeBtn.MouseUpEventHandler += (send, e) =>
+            var residecneName = new Button()
             {
+                X=Application.GetRealWidth(CommonFormResouce.X_Left),
+                Y = Application.GetRealHeight(161),
+                Width = Application.GetRealWidth(700),
+                Height = Application.GetRealHeight(95),
+                TextAlignment = TextAlignment.CenterLeft,
+                Text = Config.Instance.Home.Name ?? Language.StringByID(R.MyInternationalizationString.TheResidenceNameNull),
+                TextSize = 24,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor
+            };
+            if(Config.Instance.Home.IsOthreShare)
+            {
+                residecneName.Text = $"({Language.StringByID(R.MyInternationalizationString.Shared)}){Config.Instance.Home.Name}";
+            }
+            AddChidren(residecneName);
+
+            EventHandler<MouseEventArgs> selectFloor = (send, e) =>
+              {
+                  var floorFL = new Phone.Device.Category.SelectFloor();
+                  AddChidren(floorFL);
+                  floorFL.Init(35,153);
+                  floorFL.FloorAction = (floorName) =>
+                  {
+                      floorBtn.Text = floorName;
+                  };
+              };
+            floor.MouseUpEventHandler += selectFloor;
+            floorBtn.MouseUpEventHandler += selectFloor;
+            //鍒囨崲浣忓畢
+            residecneName.MouseLongEventHandler += (send, e) =>
+            {
+                var tempHomeBtn = send as Button;
                 if (Config.Instance.HomeFilePathList.Count == 0)
                 {
                     var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.CurrentlyTheUserIshHouseIsEmptyPleaseBuildANewHouseFirst), Language.StringByID(R.MyInternationalizationString.Close), Language.StringByID(R.MyInternationalizationString.OK));
@@ -680,21 +718,22 @@
                         residenceListView.Close();
                     };
 
-                    var upperTriangleBtn = new Button()
+                    var bg = new Button
                     {
-                        X = Application.GetRealWidth(25) + homeBtn.X,
-                        Y = homeBtn.Bottom,
-                        Width = Application.GetMinRealAverage(30),
-                        Height = Application.GetMinRealAverage(15),
-                        UnSelectedImagePath = "Item/UpperTriangle.png"
+                        X = Application.GetRealWidth(35),
+                        Y = Application.GetRealHeight(248),
+                        Width = Application.GetMinRealAverage(449),
+                        Height = Application.GetMinRealAverage(478),
+                        UnSelectedImagePath = "Item/SelectHouse"
                     };
-                    closeBGview.AddChidren(upperTriangleBtn);
+                    closeBGview.AddChidren(bg);
+
                     var changeHomeFL = new FrameLayout()
                     {
-                        X = Application.GetRealWidth(25),
-                        Y = upperTriangleBtn.Bottom,
-                        Height = Application.GetRealHeight(340),
-                        Width = Application.GetRealWidth(500),
+                        X = Application.GetRealWidth(35),
+                        Y = Application.GetRealHeight(271),
+                        Height = Application.GetRealHeight(449),
+                        Width = Application.GetRealWidth(440),
                         Radius = CommonPage.BigFormRadius,
                         BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
                     };
@@ -703,9 +742,9 @@
                     var changeHomeBtn = new Button()
                     {
                         X = Application.GetRealWidth(80),
-                        Width = Application.GetRealWidth(450),
-                        Height = Application.GetRealHeight(110),
-                        TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+                        Width = Application.GetRealWidth(350),
+                        Height = Application.GetRealHeight(150),
+                        TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                         TextID = R.MyInternationalizationString.ChangeHome,
                         TextAlignment = TextAlignment.CenterLeft
                     };
@@ -714,7 +753,7 @@
                     var scrolView = new VerticalScrolViewLayout()
                     {
                         Y = changeHomeBtn.Bottom,
-                        Height = Application.GetRealHeight(220)
+                        Height = Application.GetMinRealAverage(305-10)
                     };
                     changeHomeFL.AddChidren(scrolView);
 
@@ -729,34 +768,39 @@
                         }
                         var rowView = new RowLayout()
                         {
-                            Height = Application.GetRealHeight(110)
+                            Height = Application.GetRealHeight(150)
                         };
                         scrolView.AddChidren(rowView);
                         var pointBtn = new Device.CommonForm.SelectedStatuButton()
                         {
+                            X=Application.GetRealWidth(80),
                             Width = Application.GetMinRealAverage(80),
-                            Height = Application.GetMinRealAverage(110),
+                            Height = Application.GetMinRealAverage(80),
                             Gravity = Gravity.CenterVertical,
-                            UnSelectedImagePath = "Item/Point.png",
-                            SelectedImagePath = "Item/PointSelected.png",
+                            UnSelectedImagePath = "Item/House.png",
+                            SelectedImagePath = "Item/HouseSelected.png",
                             IsSelected = home.Id == Config.Instance.Home.Id
                         };
                         rowView.AddChidren(pointBtn);
                         var nameBtn = new Device.CommonForm.SelectedStatuButton()
                         {
-                            X = Application.GetRealWidth(80),
-                            Width = Application.GetRealWidth(500 - 80 - 50),
+                            X = Application.GetRealWidth(173),
+                            Width = Application.GetRealWidth(280),
                             TextAlignment = TextAlignment.CenterLeft,
                             Text = home.Name,
-                            TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                            SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor,
+                            TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+                            SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor,
                             IsSelected = home.Id == Config.Instance.Home.Id
                         };
+                        if(home.IsOthreShare)
+                        {
+                            nameBtn.Text = $"({Language.StringByID(R.MyInternationalizationString.Shared)}){home.Name}";
+                        }
                         rowView.AddChidren(nameBtn);
 
                         EventHandler<MouseEventArgs> selectedResidenceHandler = (send1, e1) =>
                         {
-                            if (Config.Instance.Home == home)
+                            if (Config.Instance.Home.FileName == homeFilePath)
                             {
                                 return;
                             }
@@ -766,6 +810,10 @@
                             nameBtn.IsSelected = true;
 
                             residecneName.Text = home.Name;
+                            if(home.IsOthreShare)
+                            {
+                                nameBtn.Text = $"({Language.StringByID(R.MyInternationalizationString.Shared)}){home.Name}";
+                            }
                             clickCheckBtn = pointBtn;
                             clickNameBtn = nameBtn;
                             residenceListView.Close();
@@ -781,6 +829,10 @@
                             clickCheckBtn = pointBtn;
                             clickNameBtn = nameBtn;
                             residecneName.Text = home.Name;
+                            if (home.IsOthreShare)
+                            {
+                                residecneName.Text = nameBtn.Text = $"({Language.StringByID(R.MyInternationalizationString.Shared)}){home.Name}";
+                            }
                         }
                         else
                         {
@@ -795,39 +847,90 @@
             {
 
             };
+
             #endregion
 
-            #region midView
-            var midView = new FrameLayout()
+            if(CanBindGateway()==false)
             {
-                Y = topFrameLayout.Bottom,
-                Height = midView_Height,
-            };
-            AddChidren(midView);
-            #endregion
+                var roomPageView = new PageLayout()
+                {
+                    Y = Application.GetRealHeight(302),
+                    Width = Application.GetRealWidth(CommonPage.AppRealWidth - CommonPage.XLeft * 2),
+                    Height = Application.GetMinRealAverage(roomPageView_Height),
+                    Radius = CommonPage.BigFormRadius,
+                    Gravity = Gravity.CenterHorizontal,
+                    IsShowPoint = false
+                };
+                AddChidren(roomPageView);
 
-            #region --roomPage
-            var roomPageView = new PageLayout()
-            {
-                Y = Application.GetRealHeight(50) + residecneName.Bottom,
-                Width = Application.GetRealWidth(CommonPage.AppRealWidth - CommonPage.XLeft * 2),
-                Height = Application.GetMinRealAverage(roomPageView_Height),
-                Radius = CommonPage.BigFormRadius,
-                Gravity = Gravity.CenterHorizontal,
-                IsShowPoint = false
-            };
-            AddChidren(roomPageView);
+                //褰撳墠鎴块棿
+                if (Shared.Common.Room.CanInitAllRoom == true)
+                {
+                    //Room.CurrentRoom = Room.CurrentRoom == null ? Room.Lists[0] : Room.CurrentRoom;
+                    Room.CurrentRoom = Room.Lists[0];
+                    foreach (var room in Room.Lists)
+                    {
+                        var roomBackView = new FrameLayout()
+                        {
+                            BackgroundImagePath = room.BackgroundImage
+                        };
+                        roomPageView.AddChidren(roomBackView);
+                        var roomBG = new Button()
+                        {
+                            UnSelectedImagePath = "Room/HomeBG.png",
+                        };
+                        roomBackView.AddChidren(roomBG);
+                        var roomName = new Button()
+                        {
+                            X = Application.GetRealWidth(20),
+                            Y = Application.GetRealHeight(20),
+                            Width = Application.GetRealWidth(500),
+                            Height = Application.GetRealHeight(80),
+                            Text = room.Name,
+                            TextAlignment = TextAlignment.CenterLeft,
+                            TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+                            TextSize = 18,
+                        };
+                        roomBackView.AddChidren(roomName);
+                        var roomListBtn = new Device.CommonForm.SelectedStatuButton()
+                        {
+                            X = roomPageView.Width - Application.GetRealWidth(100 + 20),
+                            Y = Application.GetRealHeight(20),
+                            Width = Application.GetMinRealAverage(100),
+                            Height = Application.GetMinRealAverage(100),
+                            UnSelectedImagePath = "Item/List.png",
+                            SelectedImagePath = "Item/ListSelected.png"
+                        };
+                        roomBackView.AddChidren(roomListBtn);
 
-            //褰撳墠鎴块棿
-            if (Shared.Common.Room.canInitAllRoom == true)
-            {
-                //Room.CurrentRoom = Room.CurrentRoom == null ? Room.Lists[0] : Room.CurrentRoom;
-                Room.CurrentRoom = Room.Lists[0];
-                foreach (var room in Room.Lists)
+                        roomListBtn.MouseUpEventHandler += (send, e) =>
+                        {
+                            //var roomList = new Device.Room.RoomManagement();
+                            //HomePage.Instance.AddChidren(roomList);
+                            //HomePage.Instance.PageIndex += 1;
+                            //roomList.Show();
+                            //roomList.action += () =>
+                            //{
+                            //    Show();
+                            //};
+
+                            var editRoom = new Device.Room.AddRoom();
+                            HomePage.Instance.AddChidren(editRoom);
+                            HomePage.Instance.PageIndex += 1;
+                            editRoom.Show();
+                            editRoom.action += () =>
+                            {
+                                Show();
+                            };
+
+                        };
+                    }
+                }
+                else
                 {
                     var roomBackView = new FrameLayout()
                     {
-                        BackgroundImagePath = room.BackgroundImage
+                        BackgroundImagePath = "Room/r0.png"
                     };
                     roomPageView.AddChidren(roomBackView);
                     var roomBG = new Button()
@@ -841,172 +944,100 @@
                         Y = Application.GetRealHeight(20),
                         Width = Application.GetRealWidth(500),
                         Height = Application.GetRealHeight(80),
-                        Text = room.Name,
+                        Text = Language.StringByID(R.MyInternationalizationString.Favorite),
                         TextAlignment = TextAlignment.CenterLeft,
                         TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
                         TextSize = 18,
                     };
                     roomBackView.AddChidren(roomName);
-                    var roomListBtn = new Device.CommonForm.SelectedStatuButton()
+                    var roomListBtn = new Button()
                     {
                         X = roomPageView.Width - Application.GetRealWidth(100 + 20),
                         Y = Application.GetRealHeight(20),
                         Width = Application.GetMinRealAverage(100),
                         Height = Application.GetMinRealAverage(100),
-                        UnSelectedImagePath = "Item/List.png",
-                        SelectedImagePath = "Item/ListSelected.png"
+                        UnSelectedImagePath = "Item/List.png"
                     };
                     roomBackView.AddChidren(roomListBtn);
-
-                    roomListBtn.MouseUpEventHandler += (send, e) =>
-                    {
-                        var roomList = new Device.Room.RoomManagement();
-                        HomePage.Instance.AddChidren(roomList);
-                        HomePage.Instance.PageIndex += 1;
-                        roomList.Show();
-                        roomList.action += () =>
-                        {
-                            Show();
-                        };
-                    };
                 }
 
+                var functionSceneView = new FrameLayout()
+                {
+                    Y = Application.GetRealHeight(861),
+                    Width=Application.GetRealWidth(832),
+                    Height = Application.GetRealHeight(167),
+                    Gravity=Gravity.CenterHorizontal,
+                    BackgroundImagePath="Item/SceneFunctionBG.png"
+                };
+                AddChidren(functionSceneView);
+
+                //鍔熻兘
+                functionBtn = new Button()
+                {
+                    X = Application.GetRealWidth(30),
+                    Y=Application.GetRealHeight(12),
+                    Width = Application.GetRealWidth(350),
+                    Height = Application.GetRealHeight(100),
+                    TextColor = ZigbeeColor.Current.GXCTextGrayColor3,
+                    SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+                    TextID = R.MyInternationalizationString.Function,
+                    IsSelected = true
+                };
+                functionSceneView.AddChidren(functionBtn);
+
+                //鍦烘櫙
+                var sceneBtn = new Button()
+                {
+                    X = Application.GetRealWidth(430),
+                    Y = Application.GetRealHeight(12),
+                    Width = Application.GetRealWidth(360),
+                    Height = Application.GetRealHeight(100),
+                    TextColor = ZigbeeColor.Current.GXCTextGrayColor3,
+                    SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+                    TextID = R.MyInternationalizationString.Scence,
+                    IsSelected = false
+                };
+                functionSceneView.AddChidren(sceneBtn);
+
+                //鍔熻兘鍜屽満鏅痓odyView
+                functionSceneBodyView = new FrameLayout()
+                {
+                    Y = functionSceneView.Bottom,
+                    Height = Application.GetRealHeight(750),
+                    Gravity = Gravity.CenterHorizontal,
+                    BackgroundColor=ZigbeeColor.Current.GXCGrayBackgroundColor
+                };
+                AddChidren(functionSceneBodyView);
+
+                //閫夋嫨鍔熻兘鍒嗘爮
+                functionBtn.MouseUpEventHandler += (sender, e) =>
+                {
+                    sceneBtn.IsSelected = false;
+                    functionBtn.IsSelected = true;
+                    RefreshBodyView();
+                };
+                //閫夋嫨鍦烘櫙鍒嗘爮
+                sceneBtn.MouseUpEventHandler += (sender, e) =>
+                {
+                    functionBtn.IsSelected = false;
+                    sceneBtn.IsSelected = true;
+                    RefreshBodyView();
+                };
+
+                RefreshBodyView();
+
+                roomPageView.PageChange += (sender, e) =>
+                {
+                    //鍒囨崲褰撳墠鎴块棿
+                    Room.CurrentRoom = Room.CurrentRoom == null ? Room.Lists[0] : Room.Lists[roomPageView.PageIndex];
+                    RefreshBodyView();
+                };
             }
             else
             {
-                var roomBackView = new FrameLayout()
-                {
-                    BackgroundImagePath = "Room/r0.png"
-                };
-                roomPageView.AddChidren(roomBackView);
-                var roomBG = new Button()
-                {
-                    UnSelectedImagePath = "Room/HomeBG.png",
-                };
-                roomBackView.AddChidren(roomBG);
-                var roomName = new Button()
-                {
-                    X = Application.GetRealWidth(20),
-                    Y = Application.GetRealHeight(20),
-                    Width = Application.GetRealWidth(500),
-                    Height = Application.GetRealHeight(80),
-                    Text = Language.StringByID(R.MyInternationalizationString.Favorite),
-                    TextAlignment = TextAlignment.CenterLeft,
-                    TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                    TextSize = 18,
-                };
-                roomBackView.AddChidren(roomName);
-                var roomListBtn = new Button()
-                {
-                    X = roomPageView.Width - Application.GetRealWidth(100 + 20),
-                    Y = Application.GetRealHeight(20),
-                    Width = Application.GetMinRealAverage(100),
-                    Height = Application.GetMinRealAverage(100),
-                    UnSelectedImagePath = "Item/List.png"
-                };
-                roomBackView.AddChidren(roomListBtn);
+                ShowNoGatewayTip();
             }
 
-            var functionSceneView = new FrameLayout()
-            {
-                Y = roomPageView.Bottom,
-                Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.TabbarHeight) - roomPageView.Bottom,
-            };
-            AddChidren(functionSceneView);
-            //鍔熻兘
-            functionBtn = new Button()
-            {
-                X = Application.GetRealWidth(50),
-                Width = Application.GetRealWidth(540 - 50) - 2,
-                Height = Application.GetRealHeight(150),
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                TextAlignment = TextAlignment.Center,
-                TextSize = 16,
-                TextID = R.MyInternationalizationString.Function,
-                IsSelected = true
-            };
-            functionSceneView.AddChidren(functionBtn);
-            var functionSceneMidLine = new Button()
-            {
-                X = functionBtn.Right,
-                Width = 2,
-                Y = Application.GetRealHeight(60),
-                Height = Application.GetRealHeight(60),
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            functionSceneView.AddChidren(functionSceneMidLine);
-            //鍦烘櫙
-            var sceneBtn = new Button()
-            {
-                X = functionBtn.Right,
-                Width = Application.GetRealWidth(540 - 50),
-                Height = Application.GetRealHeight(150),
-                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor,
-                TextAlignment = TextAlignment.Center,
-                TextSize = 16,
-                TextID = R.MyInternationalizationString.Scence,
-                IsSelected = false
-            };
-            functionSceneView.AddChidren(sceneBtn);
-            var functionSceneBottomLine = new Button()
-            {
-                Y = functionBtn.Bottom,
-                Height = CommonPage.LineHeight,
-                X = functionBtn.X,
-                Width = roomPageView.Width,
-                BackgroundColor = ZigbeeColor.Current.GXCLineColor
-            };
-            functionSceneView.AddChidren(functionSceneBottomLine);
-
-            var line = new Button()
-            {
-                Y = functionBtn.Bottom,
-                Height = CommonPage.LineHeight,
-                X = functionBtn.X,
-                Width = Application.GetRealWidth(540 - 50),
-                BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor
-            };
-            functionSceneView.AddChidren(line);
-            //鍔熻兘鍜屽満鏅痓odyView
-            functionSceneBodyView = new FrameLayout()
-            {
-                Y = line.Bottom,
-                Height = functionSceneView.Height - functionBtn.Height,
-                Width = roomPageView.Width,
-                Gravity = Gravity.CenterHorizontal
-            };
-            functionSceneView.AddChidren(functionSceneBodyView);
-
-            //閫夋嫨鍔熻兘鍒嗘爮
-            functionBtn.MouseUpEventHandler += (sender, e) =>
-            {
-                sceneBtn.IsSelected = false;
-                functionBtn.IsSelected = true;
-                line.X = functionBtn.X;
-                RefreshBodyView();
-            };
-            //閫夋嫨鍦烘櫙鍒嗘爮
-            sceneBtn.MouseUpEventHandler += (sender, e) =>
-            {
-                functionBtn.IsSelected = false;
-                sceneBtn.IsSelected = true;
-                line.X = sceneBtn.X;
-                RefreshBodyView();
-            };
-
-            RefreshBodyView();
-
-            #endregion
-
-            roomPageView.PageChange += (sender, e) =>
-            {
-                //鍒囨崲褰撳墠鎴块棿
-                Room.CurrentRoom = Room.CurrentRoom == null ? Room.Lists[0] : Room.Lists[roomPageView.PageIndex];
-                RefreshBodyView();
-            };
-            //roomPageView.PageIndex = Room.Lists.IndexOf(Room.CurrentRoom);
         }
 
         #endregion
@@ -1015,7 +1046,7 @@
 
         public void RefreshBodyView()
         {
-            if (Room.canInitAllRoom == false)
+            if (Room.CanInitAllRoom == false)
             {
                 return;
             }
@@ -1040,7 +1071,7 @@
         /// <returns><c>true</c>, if bing gateway was caned, <c>false</c> otherwise.</returns>
         private bool CanBindGateway()
         {
-            if (HadBindGateway() == false && UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 1)
+            if (HadBindGateway() == false && (UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 2))
             {
                 return true;
             }
@@ -1066,26 +1097,59 @@
         /// </summary>
         private void ShowNoGatewayTip()
         {
-            var addGatewayBtn = new Button()
+            var bg = new Button
             {
-                Height = Application.GetMinRealAverage(200),
-                Width = Application.GetMinRealAverage(200),
-                UnSelectedImagePath = "Room/AddScenceFunction.png",
-                Gravity = Gravity.Center
+                Y = Application.GetRealHeight(302),
+                Width = Application.GetMinRealAverage(717),
+                Height = Application.GetMinRealAverage(478),
+                Gravity = Gravity.CenterHorizontal,
+                UnSelectedImagePath = "Item/NoBindGW.png"
             };
-            functionSceneBodyView.AddChidren(addGatewayBtn);
-            addGatewayBtn.MouseUpEventHandler += GoToAddGateWay;
+            AddChidren(bg);
 
-            var noGatewayTip = new Button()
+            var tip = new Button
             {
-                Y = addGatewayBtn.Bottom,
-                Height = Application.GetRealHeight(150),
-                TextID = R.MyInternationalizationString.NoGateway,
-                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextAlignment = TextAlignment.Center,
+                Y = Application.GetRealHeight(815),
+                Width = Application.GetMinRealAverage(717),
+                Height = Application.GetMinRealAverage(58),
+                Gravity = Gravity.CenterHorizontal,
+                TextID = R.MyInternationalizationString.NewAccountNeedBingGW,
+                TextColor = ZigbeeColor.Current.GXCTextGrayColor
+            };
+            AddChidren(tip);
+
+            var addBG = new Button
+            {
+                Y = Application.GetRealHeight(1048),
+                Height = Application.GetMinRealAverage(366),
+                Width = Application.GetMinRealAverage(971),
+                UnSelectedImagePath = "Item/VirtualFrame.png",
                 Gravity = Gravity.CenterHorizontal
             };
-            functionSceneBodyView.AddChidren(noGatewayTip);
+            AddChidren(addBG);
+
+            var addGatewayBtn = new Button()
+            {
+                Y = Application.GetRealHeight(1143),
+                Height = Application.GetMinRealAverage(89),
+                Width = Application.GetMinRealAverage(89),
+                UnSelectedImagePath = "Item/Add_GW.png",
+                Gravity = Gravity.CenterHorizontal
+            };
+            AddChidren(addGatewayBtn);
+            addGatewayBtn.MouseUpEventHandler += GoToAddGateWay;
+
+            var addTip = new Button
+            {
+                Y = Application.GetRealHeight(1256),
+                Width = Application.GetMinRealAverage(717),
+                Height = Application.GetMinRealAverage(58),
+                Gravity = Gravity.CenterHorizontal,
+                TextID = R.MyInternationalizationString.AddSmartGW,
+                TextColor = ZigbeeColor.Current.GXCTextBlackColor
+            };
+            AddChidren(addTip);
+            addTip.MouseUpEventHandler += GoToAddGateWay;
         }
 
         /// <summary>
@@ -1095,8 +1159,8 @@
         /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
         private void GoToAddGateWay(object sender, MouseEventArgs mouseEventArgs)
         {
-            var selectNewGateWayForm = new UserCenter.GatewayAdd.NewGateWaySelectForm();
-            selectNewGateWayForm.AddForm();
+            UserCenter.GatewayAdd.NewGateWaySelectForm selectNewGateWayForm = new UserCenter.GatewayAdd.NewGateWaySelectForm { };
+            selectNewGateWayForm.AddForm(selectNewGateWayForm);
         }
 
         #endregion
@@ -1124,1216 +1188,1372 @@
         /// </summary>
         private void ShowFunction()
         {
-            if (CanBindGateway() == false)
+            //閫夋嫨鍔熻兘--鐩存帴浠庢埧闂寸殑devicelist涓幏鍙�
+            var deviceList = Room.CurrentRoom.DeviceUIList;
+            if (deviceList == null)
             {
-                //閫夋嫨鍔熻兘--鐩存帴浠庢埧闂寸殑devicelist涓幏鍙�
-                var deviceList = Room.CurrentRoom.DeviceUIList;
-                if (deviceList == null)
-                {
-                    return;
-                }
+                return;
+            }
 
-                if (deviceList.Count == 0)
+            if (deviceList.Count == 0)
+            {
+                ShowNoFunctionTip();
+            }
+            else
+            {
+                deviceVerticalScrolViewLayout = new VerticalScrolViewLayout { };
+                functionSceneBodyView.AddChidren(deviceVerticalScrolViewLayout);
+                foreach (var device in deviceList)
                 {
-                    ShowNoFunctionTip();
-                }
-                else
-                {
-                    deviceVerticalScrolViewLayout = new VerticalScrolViewLayout { };
-                    functionSceneBodyView.AddChidren(deviceVerticalScrolViewLayout);
-                    foreach (var device in deviceList)
+                    if (device == null || device.CommonDevice == null)
                     {
-                        if (device == null || device.CommonDevice == null)
+                        continue;
+                    }
+                    //鍒犻櫎璁惧
+                    EventHandler<MouseEventArgs> delEvent = (sender, e) =>
+                    {
+                        var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ConfirmDelete), Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim));
+                        alert.Show();
+                        alert.ResultEventHandler += (send1, e1) =>
+                        {
+                            if (e1)
+                            {
+                                Room.CurrentRoom.DeleteDevice(device.FileName);
+                                    //RefreshBodyView();
+                                    deviceVerticalScrolViewLayout.RemoveViewByTag((sender as Button).Tag);
+                            }
+                        };
+                    };
+                    //鏀惰棌
+                    //EventHandler<MouseEventArgs> collectionEvent = (sender, e) =>
+                    //{
+                    //    if ((sender as Button).IsSelected)
+                    //    {
+                    //        Room.Lists[0].DeleteDevice(device.FilePath);
+                    //        (sender as Button).IsSelected = false;
+                    //        if (Room.CurrentRoom == Room.Lists[0])
+                    //        {
+                    //            DeviceVerticalScrolViewLayout.RemoveViewByTag((sender as Button).Tag);
+                    //        }
+                    //    }
+                    //    else
+                    //    {
+                    //        Room.Lists[0].AddDevice(device.FilePath);
+                    //        (sender as Button).IsSelected = true;
+                    //    }
+                    //    //RefreshBodyView();
+                    //};
+                    EventHandler<MouseEventArgs> collectionEvent = (sender, e) =>
+                    {
+                        if (Room.CurrentRoom == Room.Lists[0])
+                        {
+                            Room.Lists[0].DeleteDevice(device.FileName);
+                            deviceVerticalScrolViewLayout.RemoveViewByTag((sender as Button).Tag);
+                        }
+                    };
+
+                    //////鍒ゆ柇璁惧鏄惁鏀寔鐨勫睘鎬� 濡傚紑鍏崇瓑鎺у埗
+                    if (device.CommonDevice.Type == ZigBee.Device.DeviceType.WindowCoveringDevice)
+                    {
+                        //绐楀笜 鍗峰笜
+                        var rollerShade = (ZigBee.Device.Rollershade)device.CommonDevice;
+                        //涓嶄笂闈炶繙绋�
+                        if (rollerShade.Gateway == null)
                         {
                             continue;
                         }
-                        //鍒犻櫎璁惧
-                        EventHandler<MouseEventArgs> delEvent = (sender, e) =>
+                        if (rollerShade.Gateway.IsVirtual)
                         {
-                            var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ConfirmDelete), Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim));
-                            alert.Show();
-                            alert.ResultEventHandler += (send1, e1) =>
+                            //鍙戦�佽鍙栫姸鎬佸懡浠�
+                            ReadStatus(rollerShade, () =>
                             {
-                                if (e1)
-                                {
-                                    Room.CurrentRoom.DeleteDevice(device.FileName);
-                                    //RefreshBodyView();
-                                    deviceVerticalScrolViewLayout.RemoveViewByTag((sender as Button).Tag);
-                                }
-                            };
+                                rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                            });
+                        }
+                        else
+                        {
+                            if (CommonPage.ReadDeviceStatuSpan < (DateTime.Now - rollerShade.LastDateTime).TotalSeconds)
+                            {
+                                rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                            }
+                        }
+
+                        var deviceFL = new FrameLayout
+                        {
+                            Height = Application.GetRealHeight(deviceFL_Height),
+                            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                            Tag = device
                         };
-                        //鏀惰棌
-                        //EventHandler<MouseEventArgs> collectionEvent = (sender, e) =>
+                        deviceVerticalScrolViewLayout.AddChidren(deviceFL);
+                        var deviceRowLayout = new RowLayout
+                        {
+                            Y = Application.GetRealHeight(25),
+                            Height = Application.GetRealHeight(deviceFL_Height - 25) - 1,
+                            LineColor = ZigbeeColor.Current.GXCBackgroundColor,
+                            BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+                            Radius = CommonPage.BigFormRadius,
+                            Tag = device
+                        };
+                        deviceFL.AddChidren(deviceRowLayout);
+                        var deviceItemFL = new FrameLayout()
+                        {
+                            BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+                            Radius = CommonPage.BigFormRadius
+                        };
+                        deviceRowLayout.AddChidren(deviceItemFL);
+                        var deviceIMG = new Button()
+                        {
+                            X = Application.GetRealWidth(50),
+                            Y = Application.GetRealHeight(30),
+                            Width = Application.GetMinRealAverage(110),
+                            Height = Application.GetMinRealAverage(110),
+                            UnSelectedImagePath = device.IconPath,
+                            SelectedImagePath = device.OnlineIconPath,
+                            IsSelected = rollerShade.IsOnline == 1,
+                            Tag = deviceStatus_Online
+                        };
+                        deviceItemFL.AddChidren(deviceIMG);
+                        var deviceName = new Button()
+                        {
+                            X = Application.GetRealWidth(10),
+                            Y = deviceIMG.Bottom,
+                            Width = Application.GetRealWidth(180),
+                            Height = Application.GetRealHeight(80),
+                            TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                            TextAlignment = TextAlignment.Center,
+                            Text = device.CommonDevice.DeviceEpointName,
+                            TextSize = 10,
+                            IsMoreLines = true
+                        };
+                        deviceItemFL.AddChidren(deviceName);
+
+                        var closeBtnBG = new Device.CommonForm.SelectedStatuButton()
+                        {
+                            X = deviceName.Right,
+                            Width = Application.GetMinRealAverage(250),
+                            Height = Application.GetMinRealAverage(250),
+                            Gravity = Gravity.CenterVertical,
+                        };
+                        deviceItemFL.AddChidren(closeBtnBG);
+
+                        var closeBtn = new Device.CommonForm.SelectedStatuButton()
+                        {
+                            X = Application.GetRealWidth(50) + deviceName.Right,
+                            Width = Application.GetMinRealAverage(110),
+                            Height = Application.GetMinRealAverage(110),
+                            Gravity = Gravity.CenterVertical,
+                            UnSelectedImagePath = "WindowCovering/RollerShadeClose.png",
+                            SelectedImagePath = "WindowCovering/RollerShadeCloseSelected.png",
+                            //Visible=false
+                        };
+                        deviceItemFL.AddChidren(closeBtn);
+
+                        var stopBtnBG = new Device.CommonForm.SelectedStatuButton()
+                        {
+                            X = Application.GetRealWidth(120) + closeBtn.Right,
+                            Width = Application.GetMinRealAverage(250),
+                            Height = Application.GetMinRealAverage(250),
+                            Gravity = Gravity.CenterVertical,
+                        };
+                        deviceItemFL.AddChidren(stopBtnBG);
+                        var stopBtn = new Device.CommonForm.SelectedStatuButton()
+                        {
+                            X = Application.GetRealWidth(120) + closeBtn.Right,
+                            Width = Application.GetMinRealAverage(110),
+                            Height = Application.GetMinRealAverage(110),
+                            Gravity = Gravity.CenterVertical,
+                            UnSelectedImagePath = "WindowCovering/RollerShadeStop.png",
+                            SelectedImagePath = "WindowCovering/RollerShadeStopSelected.png",
+                            //Visible=false
+                        };
+                        deviceItemFL.AddChidren(stopBtn);
+
+                        var openBtnBG = new Device.CommonForm.SelectedStatuButton()
+                        {
+                            X = Application.GetRealWidth(20) + stopBtn.Right,
+                            Width = Application.GetMinRealAverage(250),
+                            Height = Application.GetMinRealAverage(250),
+                            Gravity = Gravity.CenterVertical,
+                        };
+                        deviceItemFL.AddChidren(openBtnBG);
+                        var openBtn = new Device.CommonForm.SelectedStatuButton()
+                        {
+                            X = Application.GetRealWidth(120) + stopBtn.Right,
+                            Width = Application.GetMinRealAverage(110),
+                            Height = Application.GetMinRealAverage(110),
+                            Gravity = Gravity.CenterVertical,
+                            UnSelectedImagePath = "WindowCovering/RollerShadeOpen.png",
+                            SelectedImagePath = "WindowCovering/RollerShadeOpenSelected.png",
+                            //Visible=false
+                        };
+                        deviceItemFL.AddChidren(openBtn);
+                        var collectionBtn = new Button()
+                        {
+                            X = deviceItemFL.Right - Application.GetRealWidth(150),
+                            Y = Application.GetRealHeight(20),
+                            Width = Application.GetMinRealAverage(80),
+                            Height = Application.GetMinRealAverage(80),
+                            UnSelectedImagePath = "Item/Collection.png",
+                            SelectedImagePath = "Item/CollectionSelected.png",
+                            Tag = device
+                        };
+                        //*****鍏堥殣钘�*****
+                        //deviceItemFL.AddChidren(collectionBtn);
+                        var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
+                        {
+                            Tag = device,
+                            IsMoreLines = true
+                        };
+
+                        if (Room.CurrentRoom.IsLove)
+                        {
+                            deleteBtn.TextID = R.MyInternationalizationString.CancelCollect;
+                            deleteBtn.BackgroundColor = ZigbeeColor.Current.GXCCancelCollectionBGColor;
+                            deleteBtn.MouseUpEventHandler += collectionEvent;
+                            deviceRowLayout.AddRightView(deleteBtn);
+                        }
+                        else if (Room.CurrentRoom.IsSharedRoom)
+                        {
+                            //涓嶅鐞�
+                        }
+                        else
+                        {
+                            deleteBtn.MouseUpEventHandler += delEvent;
+                            deviceRowLayout.AddRightView(deleteBtn);
+                        }
+
+                        if (rollerShade.WcdType == -1)
+                        {
+                            CommonPage.Loading.Start();
+                            new System.Threading.Thread(() =>
+                            {
+                                ZigBee.Device.Rollershade.ReadWcdTypeAction(rollerShade, () =>
+                                {
+                                    Application.RunOnMainThread(() =>
+                                    {
+                                        if (rollerShade.WcdType == 0)
+                                        {
+                                            closeBtn.UnSelectedImagePath = "WindowCovering/RollerShadeDown.png";
+                                            closeBtn.SelectedImagePath = "WindowCovering/RollerShadeDownSelected.png";
+                                            openBtn.UnSelectedImagePath = "WindowCovering/RollerShadeUp.png";
+                                            openBtn.SelectedImagePath = "WindowCovering/RollerShadeUpSelected.png";
+                                        }
+                                        else
+                                        {
+                                            closeBtn.UnSelectedImagePath = "WindowCovering/RollerShadeClose.png";
+                                            closeBtn.SelectedImagePath = "WindowCovering/RollerShadeCloseSelected.png";
+                                            openBtn.UnSelectedImagePath = "WindowCovering/RollerShadeOpen.png";
+                                            openBtn.SelectedImagePath = "WindowCovering/RollerShadeOpenSelected.png";
+                                        }
+                                        CommonPage.Loading.Hide();
+                                    });
+                                });
+                            })
+                            { IsBackground = true }.Start();
+                        }
+                        else if (rollerShade.WcdType == 0)
+                        {
+                            closeBtn.UnSelectedImagePath = "WindowCovering/RollerShadeDown.png";
+                            closeBtn.SelectedImagePath = "WindowCovering/RollerShadeDownSelected.png";
+                            openBtn.UnSelectedImagePath = "WindowCovering/RollerShadeUp.png";
+                            openBtn.SelectedImagePath = "WindowCovering/RollerShadeUpSelected.png";
+                        }
+                        else
+                        {
+                            closeBtn.UnSelectedImagePath = "WindowCovering/RollerShadeClose.png";
+                            closeBtn.SelectedImagePath = "WindowCovering/RollerShadeCloseSelected.png";
+                            openBtn.UnSelectedImagePath = "WindowCovering/RollerShadeOpen.png";
+                            openBtn.SelectedImagePath = "WindowCovering/RollerShadeOpenSelected.png";
+                        }
+
+
+                        EventHandler<MouseEventArgs> curtainHandler = (sender, e) =>
+                        {
+                            var curtain = new Phone.Device.Curtain.RollerShadeControl();
+                            UserView.HomePage.Instance.ScrollEnabled = false;
+                            UserView.HomePage.Instance.AddChidren(curtain);
+                            UserView.HomePage.Instance.PageIndex += 1;
+                            curtain.action = RefreshBodyView;
+                            curtain.Show(device, Room.CurrentRoom);
+                        };
+                        deviceItemFL.MouseUpEventHandler += curtainHandler;
+                        //deviceItemFL.MouseLongEventHandler += curtainHandler;
+                        deviceIMG.MouseUpEventHandler += curtainHandler;
+                        deviceName.MouseUpEventHandler += curtainHandler;
+
+                        //绐楀笜鍏�
+                        closeBtn.MouseUpEventHandler += (sender, e) =>
+                        {
+                            zbGateway = device.CommonDevice.Gateway;
+                            sendedControlCommand = false;
+                            zbGateway.ReportAction += UpdateDeviceControllStatu;
+                            AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
+
+                            rollerShade.CurtainUpDownStopControl(1);
+
+                                //鎺у埗寤舵椂鍥炶皟
+                                DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
+                            {
+                                if (Parent == null)
+                                {
+                                    return;
+                                }
+                                RemoveUpdateControlDeviceStatuAction(zbGateway);
+                                if (sendedControlCommand == false)
+                                {
+                                    DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
+                                }
+                            });
+                        };
+                        //绐楀笜鍋�
+                        stopBtn.MouseUpEventHandler += (sender, e) =>
+                        {
+                            zbGateway = device.CommonDevice.Gateway;
+                            sendedControlCommand = false;
+                            zbGateway.ReportAction += UpdateDeviceControllStatu;
+                            AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
+
+                            rollerShade.CurtainUpDownStopControl(2);
+
+                                //鎺у埗寤舵椂鍥炶皟
+                                DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
+                            {
+                                if (Parent == null)
+                                {
+                                    return;
+                                }
+                                RemoveUpdateControlDeviceStatuAction(zbGateway);
+                                if (sendedControlCommand == false)
+                                {
+                                    DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
+                                }
+                            });
+                        };
+                        //绐楀笜寮�
+                        openBtn.MouseUpEventHandler += (sender, e) =>
+                        {
+                            zbGateway = device.CommonDevice.Gateway;
+                            sendedControlCommand = false;
+                            zbGateway.ReportAction += UpdateDeviceControllStatu;
+                            AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
+
+                            rollerShade.CurtainUpDownStopControl(0);
+
+                                //鎺у埗寤舵椂鍥炶皟
+                                DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
+                            {
+                                if (Parent == null)
+                                {
+                                    return;
+                                }
+                                RemoveUpdateControlDeviceStatuAction(zbGateway);
+                                if (sendedControlCommand == false)
+                                {
+                                    DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
+                                }
+                            });
+                        };
+                        //collectionBtn.MouseUpEventHandler += (sender, e) =>
                         //{
-                        //    if ((sender as Button).IsSelected)
+                        //    if (collectionBtn.IsSelected)
                         //    {
                         //        Room.Lists[0].DeleteDevice(device.FilePath);
-                        //        (sender as Button).IsSelected = false;
-                        //        if (Room.CurrentRoom == Room.Lists[0])
+                        //        collectionBtn.IsSelected = false;
+                        //    }
+                        //    else
+                        //    {
+                        //        Room.Lists[0].AddDevice(device.FilePath);
+                        //        collectionBtn.IsSelected = true;
+                        //    }
+                        //    //RefreshBodyView();
+                        //};
+                        collectionBtn.MouseUpEventHandler += collectionEvent;
+                        //var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj==device.FilePath);
+                        //if(dev==null)
+                        //{
+                        //    collectionBtn.IsSelected = false;
+                        //}
+                        //else
+                        //{
+                        //    collectionBtn.IsSelected = true;
+                        //}
+
+                        ////寮�鍏冲仠鎸夐挳鏄惁鏄剧ず
+                        //foreach(var command in commandList)
+                        //{
+                        //    if (command == null)
+                        //    {
+                        //        continue;
+                        //    }
+                        //    if (command.commandId==0)
+                        //    {
+                        //        openBtn.Visible = true;
+                        //    }
+                        //    else if(command.commandId==1)
+                        //    {
+                        //        openBtn.Visible = true;
+                        //    }
+                        //    else if(command.commandId==2)
+                        //    {
+                        //        stopBtn.Visible = true;
+                        //    }
+                        //}
+                    }
+                    else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.OnOffOutput)
+                    {
+                        //寮�鍏崇伅
+                        var light = device.CommonDevice as ToggleLight;
+                        //琛ヤ笂闈炶繙绋�
+                        if (light.Gateway == null)
+                        {
+                            continue;
+                        }
+                        if (light.Gateway.IsVirtual)
+                        {
+                            //鍙戦�佽鍙栫姸鎬佸懡浠�
+                            ReadStatus(light, () =>
+                            {
+                                light.ReadOnOffStatus();
+                                light.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                            });
+                        }
+                        else
+                        {
+                            if (CommonPage.ReadDeviceStatuSpan < (DateTime.Now - light.LastDateTime).TotalSeconds)
+                            {
+                                light.ReadOnOffStatus();
+                                light.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                            }
+                        }
+
+
+                        var deviceFL = new FrameLayout
+                        {
+                            Height = Application.GetRealHeight(deviceFL_Height),
+                            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                            Tag = device
+                        };
+                        deviceVerticalScrolViewLayout.AddChidren(deviceFL);
+                        var deviceRowLayout = new RowLayout
+                        {
+                            Y = Application.GetRealHeight(25),
+                            Height = Application.GetRealHeight(deviceFL_Height - 25) - 1,
+                            LineColor = ZigbeeColor.Current.GXCBackgroundColor,
+                            BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+                            Radius = CommonPage.BigFormRadius,
+                            Tag = device
+                        };
+                        deviceFL.AddChidren(deviceRowLayout);
+
+                        var deviceItemFL = new FrameLayout()
+                        {
+                            BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+                            Radius = CommonPage.BigFormRadius
+                        };
+                        deviceRowLayout.AddChidren(deviceItemFL);
+                        var deviceIMG = new Button()
+                        {
+                            X = Application.GetRealWidth(50),
+                            Y = Application.GetRealHeight(30),
+                            Width = Application.GetMinRealAverage(110),
+                            Height = Application.GetMinRealAverage(110),
+                            UnSelectedImagePath = device.IconPath,
+                            SelectedImagePath = device.OnlineIconPath,
+                            IsSelected = light.IsOnline == 1,
+                            Tag = deviceStatus_Online
+                        };
+                        deviceItemFL.AddChidren(deviceIMG);
+                        var deviceName = new Button()
+                        {
+                            X = Application.GetRealWidth(10),
+                            Y = deviceIMG.Bottom,
+                            Width = Application.GetRealWidth(180),
+                            Height = Application.GetRealHeight(80),
+                            TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                            TextAlignment = TextAlignment.Center,
+                            Text = device.CommonDevice.DeviceEpointName,
+                            TextSize = 10,
+                            IsMoreLines = true
+                        };
+                        deviceItemFL.AddChidren(deviceName);
+
+                        var collectionBtn = new Button()
+                        {
+                            X = deviceItemFL.Right - Application.GetRealWidth(150),
+                            Y = Application.GetRealHeight(20),
+                            Width = Application.GetMinRealAverage(80),
+                            Height = Application.GetMinRealAverage(80),
+                            UnSelectedImagePath = "Item/Collection.png",
+                            SelectedImagePath = "Item/CollectionSelected.png",
+                            Tag = device
+                        };
+                        //***鍏堥殣钘�******
+                        //deviceItemFL.AddChidren(collectionBtn);
+                        var switchBtnBG = new Button
+                        {
+                            X = deviceItemFL.Right - Application.GetRealWidth(250),
+                            Width = Application.GetMinRealAverage(250),
+                            Height = Application.GetMinRealAverage(250),
+                            Gravity = Gravity.CenterVertical
+                        };
+                        deviceItemFL.AddChidren(switchBtnBG);
+
+                        var switchBtn = new Button
+                        {
+                            X = deviceItemFL.Right - Application.GetRealWidth(200),
+                            //Y = deviceItemFL.Bottom - Application.GetRealHeight(120),
+                            Width = Application.GetMinRealAverage(183),
+                            Height = Application.GetMinRealAverage(123),
+                            UnSelectedImagePath = "Item/Switch.png",
+                            SelectedImagePath = "Item/SwitchSelected.png",
+                            IsSelected = light.OnOffStatus == 1,
+                            Tag = deviceStatus_OnOffStatus,
+                            //Visible=false
+                            Gravity = Gravity.CenterVertical
+                        };
+                        deviceItemFL.AddChidren(switchBtn);
+                        switchBtn.MouseUpEventHandler += (send2, e2) =>
+                        {
+                            switchBtn.IsSelected = !switchBtn.IsSelected;
+                            if (switchBtn.IsSelected == true)
+                            {
+                                zbGateway = device.CommonDevice.Gateway;
+                                sendedControlCommand = false;
+                                zbGateway.ReportAction += UpdateDeviceControllStatu;
+                                AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
+
+                                light.SwitchControl(1);
+
+                                    //鎺у埗寤舵椂鍥炶皟
+                                    DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
+                                {
+                                    if (Parent == null)
+                                    {
+                                        return;
+                                    }
+                                    RemoveUpdateControlDeviceStatuAction(zbGateway);
+                                    if (sendedControlCommand == false)
+                                    {
+                                        DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
+                                    }
+                                });
+                            }
+                            else
+                            {
+                                zbGateway = device.CommonDevice.Gateway;
+                                sendedControlCommand = false;
+                                zbGateway.ReportAction += UpdateDeviceControllStatu;
+                                AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
+
+                                light.SwitchControl(0);
+
+                                    //鎺у埗寤舵椂鍥炶皟
+                                    DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
+                                {
+                                    if (Parent == null)
+                                    {
+                                        return;
+                                    }
+                                    RemoveUpdateControlDeviceStatuAction(zbGateway);
+                                    if (sendedControlCommand == false)
+                                    {
+                                        DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
+                                    }
+                                });
+                            }
+                        };
+
+
+                        var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
+                        {
+                            Tag = device,
+                            IsMoreLines = true
+                        };
+                        if (Room.CurrentRoom.IsLove)
+                        {
+                            deleteBtn.TextID = R.MyInternationalizationString.CancelCollect;
+                            deleteBtn.BackgroundColor = ZigbeeColor.Current.GXCCancelCollectionBGColor;
+                            deleteBtn.MouseUpEventHandler += collectionEvent;
+                            deviceRowLayout.AddRightView(deleteBtn);
+                        }
+                        else if (Room.CurrentRoom.IsSharedRoom)
+                        {
+                            //涓嶅鐞�
+                        }
+                        else
+                        {
+                            deleteBtn.MouseUpEventHandler += delEvent;
+                            deviceRowLayout.AddRightView(deleteBtn);
+                        }
+
+
+                        EventHandler<MouseEventArgs> lightHandler = (sender, e) =>
+                        {
+                            var lightControl = new Phone.Device.Light.LightControl();
+                            UserView.HomePage.Instance.AddChidren(lightControl);
+                            UserView.HomePage.Instance.PageIndex += 1;
+                            lightControl.action = RefreshBodyView;
+                            lightControl.Show(device, Room.CurrentRoom);
+                        };
+                        //deviceItemFL.MouseLongEventHandler += lightHandler;
+                        deviceItemFL.MouseUpEventHandler += lightHandler;
+                        deviceName.MouseUpEventHandler += lightHandler;
+                        deviceIMG.MouseUpEventHandler += lightHandler;
+
+                        //collectionBtn.MouseUpEventHandler += (sender, e) =>
+                        //{
+                        //    if (collectionBtn.IsSelected)
+                        //    {
+                        //        Room.Lists[0].DeleteDevice(device.FilePath);
+                        //        collectionBtn.IsSelected = false;
+                        //        if(Room.CurrentRoom==Room.Lists[0])
                         //        {
-                        //            DeviceVerticalScrolViewLayout.RemoveViewByTag((sender as Button).Tag);
+                        //            RefreshBodyView();
                         //        }
                         //    }
                         //    else
                         //    {
                         //        Room.Lists[0].AddDevice(device.FilePath);
-                        //        (sender as Button).IsSelected = true;
+                        //        collectionBtn.IsSelected = true;
                         //    }
                         //    //RefreshBodyView();
                         //};
-                        EventHandler<MouseEventArgs> collectionEvent = (sender, e) =>
+                        collectionBtn.MouseUpEventHandler += collectionEvent;
+
+                        //var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FilePath);
+                        //if (dev == null)
+                        //{
+                        //    collectionBtn.IsSelected = false;
+                        //}
+                        //else
+                        //{
+                        //    collectionBtn.IsSelected = true;
+                        //}
+
+                    }
+                    else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.AirSwitch)
+                    {
+                        //绌烘皵寮�鍏�
+                        var airSwitch = device.CommonDevice as AirSwitch;
+
+                        //琛ヤ笂闈炶繙绋�
+                        if (airSwitch.Gateway == null)
                         {
-                            if (Room.CurrentRoom == Room.Lists[0])
+                            continue;
+                        }
+                        if (airSwitch.Gateway.IsVirtual)
+                        {
+                            //鍙戦�佽鍙栫姸鎬佸懡浠�
+                            ReadStatus(airSwitch, () =>
                             {
-                                Room.Lists[0].DeleteDevice(device.FileName);
-                                deviceVerticalScrolViewLayout.RemoveViewByTag((sender as Button).Tag);
+                                airSwitch.ReadOnOffStatus();
+                                airSwitch.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                            });
+                        }
+                        else
+                        {
+                            //闃叉鐭椂闂村唴澶氭璇诲彇璁惧鐘舵��
+                            if ((DateTime.Now - airSwitch.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
+                            {
+                                airSwitch.ReadOnOffStatus();
+                                airSwitch.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                            }
+                        }
+
+                        var deviceFL = new FrameLayout
+                        {
+                            Height = Application.GetRealHeight(deviceFL_Height),
+                            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                            Tag = device
+                        };
+                        deviceVerticalScrolViewLayout.AddChidren(deviceFL);
+                        var deviceRowLayout = new RowLayout
+                        {
+                            Y = Application.GetRealHeight(25),
+                            Height = Application.GetRealHeight(deviceFL_Height - 25) - 1,
+                            LineColor = ZigbeeColor.Current.GXCBackgroundColor,
+                            BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+                            Radius = CommonPage.BigFormRadius,
+                            Tag = device
+                        };
+                        deviceFL.AddChidren(deviceRowLayout);
+
+                        var deviceItemFL = new FrameLayout()
+                        {
+                            BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+                            Radius = CommonPage.BigFormRadius
+                        };
+                        deviceRowLayout.AddChidren(deviceItemFL);
+                        var deviceIMG = new Button()
+                        {
+                            X = Application.GetRealWidth(50),
+                            Y = Application.GetRealHeight(30),
+                            Width = Application.GetMinRealAverage(110),
+                            Height = Application.GetMinRealAverage(110),
+                            UnSelectedImagePath = device.IconPath,
+                            SelectedImagePath = device.OnlineIconPath,
+                            IsSelected = airSwitch.IsOnline == 1,
+                            Tag = deviceStatus_Online
+                        };
+                        deviceItemFL.AddChidren(deviceIMG);
+                        var deviceName = new Button()
+                        {
+                            X = Application.GetRealWidth(10),
+                            Y = deviceIMG.Bottom,
+                            Width = Application.GetRealWidth(180),
+                            Height = Application.GetRealHeight(80),
+                            TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                            TextAlignment = TextAlignment.Center,
+                            Text = device.CommonDevice.DeviceEpointName,
+                            TextSize = 10,
+                            IsMoreLines = true
+                        };
+                        deviceItemFL.AddChidren(deviceName);
+
+                        var collectionBtn = new Button()
+                        {
+                            X = deviceItemFL.Right - Application.GetRealWidth(150),
+                            Y = Application.GetRealHeight(20),
+                            Width = Application.GetMinRealAverage(80),
+                            Height = Application.GetMinRealAverage(80),
+                            UnSelectedImagePath = "Item/Collection.png",
+                            SelectedImagePath = "Item/CollectionSelected.png",
+                            Tag = device
+                        };
+                        //***鍏堥殣钘�******
+                        //deviceItemFL.AddChidren(collectionBtn);
+                        var switchBtnBG = new Button
+                        {
+                            X = deviceItemFL.Right - Application.GetRealWidth(250),
+                            Width = Application.GetMinRealAverage(250),
+                            Height = Application.GetMinRealAverage(250),
+                            Gravity = Gravity.CenterVertical
+                        };
+                        deviceItemFL.AddChidren(switchBtnBG);
+                        var switchBtn = new Button
+                        {
+                            X = deviceItemFL.Right - Application.GetRealWidth(200),
+                            //Y = deviceItemFL.Bottom - Application.GetRealHeight(120),
+                            Width = Application.GetMinRealAverage(183),
+                            Height = Application.GetMinRealAverage(123),
+                            UnSelectedImagePath = "Item/Switch.png",
+                            SelectedImagePath = "Item/SwitchSelected.png",
+                            IsSelected = airSwitch.OnOffStatus == 1,
+                            Tag = deviceStatus_OnOffStatus,
+                            //Visible=false
+                            Gravity = Gravity.CenterVertical
+                        };
+                        deviceItemFL.AddChidren(switchBtn);
+                        switchBtn.MouseUpEventHandler += (send2, e2) =>
+                        {
+                            switchBtn.IsSelected = !switchBtn.IsSelected;
+                            if (switchBtn.IsSelected == true)
+                            {
+                                zbGateway = device.CommonDevice.Gateway;
+                                sendedControlCommand = false;
+                                zbGateway.ReportAction += UpdateDeviceControllStatu;
+                                AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
+
+                                airSwitch.SwitchControl(1);
+
+                                    //鎺у埗寤舵椂鍥炶皟
+                                    DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
+                                {
+                                    if (Parent == null)
+                                    {
+                                        return;
+                                    }
+                                    RemoveUpdateControlDeviceStatuAction(zbGateway);
+                                    if (sendedControlCommand == false)
+                                    {
+                                        DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
+                                    }
+                                });
+                            }
+                            else
+                            {
+                                zbGateway = device.CommonDevice.Gateway;
+                                sendedControlCommand = false;
+                                zbGateway.ReportAction += UpdateDeviceControllStatu;
+                                AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
+
+                                airSwitch.SwitchControl(0);
+
+                                    //鎺у埗寤舵椂鍥炶皟
+                                    DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
+                                {
+                                    if (Parent == null)
+                                    {
+                                        return;
+                                    }
+                                    RemoveUpdateControlDeviceStatuAction(zbGateway);
+                                    if (sendedControlCommand == false)
+                                    {
+                                        DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
+                                    }
+                                });
                             }
                         };
 
-                        //////鍒ゆ柇璁惧鏄惁鏀寔鐨勫睘鎬� 濡傚紑鍏崇瓑鎺у埗
-                        if (device.CommonDevice.Type == ZigBee.Device.DeviceType.WindowCoveringDevice)
+                        var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
                         {
-                            //绐楀笜 鍗峰笜
-                            var rollerShade = (ZigBee.Device.Rollershade)device.CommonDevice;
-                            //涓嶄笂闈炶繙绋�
-                            if (rollerShade.Gateway == null)
-                            {
-                                continue;
-                            }
-                            if (rollerShade.Gateway.IsVirtual)
-                            {
-                                //鍙戦�佽鍙栫姸鎬佸懡浠�
-                                ReadStatus(rollerShade, () =>
-                                {
-                                    rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                                });
-                            }
-                            else
-                            {
-                                if (CommonPage.ReadDeviceStatuSpan < (DateTime.Now - rollerShade.LastDateTime).TotalSeconds)
-                                {
-                                    rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                                }
-                            }
-
-                            var deviceFL = new FrameLayout
-                            {
-                                Height = Application.GetRealHeight(deviceFL_Height),
-                                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                                Tag = device
-                            };
-                            deviceVerticalScrolViewLayout.AddChidren(deviceFL);
-                            var deviceRowLayout = new RowLayout
-                            {
-                                Y = Application.GetRealHeight(25),
-                                Height = Application.GetRealHeight(deviceFL_Height - 25) - 1,
-                                LineColor = ZigbeeColor.Current.GXCBackgroundColor,
-                                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-                                Radius = CommonPage.BigFormRadius,
-                                Tag = device
-                            };
-                            deviceFL.AddChidren(deviceRowLayout);
-                            var deviceItemFL = new FrameLayout()
-                            {
-                                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-                                Radius = CommonPage.BigFormRadius
-                            };
-                            deviceRowLayout.AddChidren(deviceItemFL);
-                            var deviceIMG = new Button()
-                            {
-                                X = Application.GetRealWidth(50),
-                                Y = Application.GetRealHeight(30),
-                                Width = Application.GetMinRealAverage(110),
-                                Height = Application.GetMinRealAverage(110),
-                                UnSelectedImagePath = device.IconPath,
-                                SelectedImagePath = device.OnlineIconPath,
-                                IsSelected = rollerShade.IsOnline == 1,
-                                Tag = deviceStatus_Online
-                            };
-                            deviceItemFL.AddChidren(deviceIMG);
-                            var deviceName = new Button()
-                            {
-                                X = Application.GetRealWidth(10),
-                                Y = deviceIMG.Bottom,
-                                Width = Application.GetRealWidth(180),
-                                Height = Application.GetRealHeight(80),
-                                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                                TextAlignment = TextAlignment.Center,
-                                Text = device.CommonDevice.DeviceEpointName,
-                                TextSize = 10,
-                                IsMoreLines = true
-                            };
-                            deviceItemFL.AddChidren(deviceName);
-                            var closeBtn = new Device.CommonForm.SelectedStatuButton()
-                            {
-                                X = Application.GetRealWidth(50) + deviceName.Right,
-                                Width = Application.GetMinRealAverage(110),
-                                Height = Application.GetMinRealAverage(110),
-                                Gravity = Gravity.CenterVertical,
-                                UnSelectedImagePath = "WindowCovering/RollerShadeClose.png",
-                                SelectedImagePath = "WindowCovering/RollerShadeCloseSelected.png",
-                                //Visible=false
-                            };
-                            deviceItemFL.AddChidren(closeBtn);
-                            var stopBtn = new Device.CommonForm.SelectedStatuButton()
-                            {
-                                X = Application.GetRealWidth(120) + closeBtn.Right,
-                                Width = Application.GetMinRealAverage(110),
-                                Height = Application.GetMinRealAverage(110),
-                                Gravity = Gravity.CenterVertical,
-                                UnSelectedImagePath = "WindowCovering/RollerShadeStop.png",
-                                SelectedImagePath = "WindowCovering/RollerShadeStopSelected.png",
-                                //Visible=false
-                            };
-                            deviceItemFL.AddChidren(stopBtn);
-                            var openBtn = new Device.CommonForm.SelectedStatuButton()
-                            {
-                                X = Application.GetRealWidth(120) + stopBtn.Right,
-                                Width = Application.GetMinRealAverage(110),
-                                Height = Application.GetMinRealAverage(110),
-                                Gravity = Gravity.CenterVertical,
-                                UnSelectedImagePath = "WindowCovering/RollerShadeOpen.png",
-                                SelectedImagePath = "WindowCovering/RollerShadeOpenSelected.png",
-                                //Visible=false
-                            };
-
-                            deviceItemFL.AddChidren(openBtn);
-                            var collectionBtn = new Button()
-                            {
-                                X = deviceItemFL.Right - Application.GetRealWidth(150),
-                                Y = Application.GetRealHeight(20),
-                                Width = Application.GetMinRealAverage(80),
-                                Height = Application.GetMinRealAverage(80),
-                                UnSelectedImagePath = "Item/Collection.png",
-                                SelectedImagePath = "Item/CollectionSelected.png",
-                                Tag = device
-                            };
-                            //*****鍏堥殣钘�*****
-                            //deviceItemFL.AddChidren(collectionBtn);
-                            var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
-                            {
-                                Tag = device,
-                                IsMoreLines = true
-                            };
-
-                            if (Room.CurrentRoom.IsLove)
-                            {
-                                deleteBtn.TextID = R.MyInternationalizationString.CancelCollect;
-                                deleteBtn.BackgroundColor = ZigbeeColor.Current.GXCCancelCollectionBGColor;
-                                deleteBtn.MouseUpEventHandler += collectionEvent;
-                                deviceRowLayout.AddRightView(deleteBtn);
-                            }
-                            else if(Room.CurrentRoom.IsSharedRoom)
-                            {
-                                //涓嶅鐞�
-                            }
-                            else
-                            {
-                                deleteBtn.MouseUpEventHandler += delEvent;
-                                deviceRowLayout.AddRightView(deleteBtn);
-                            }
-
-
-                            EventHandler<MouseEventArgs> curtainHandler = (sender, e) =>
-                            {
-                                var curtain = new Phone.Device.Curtain.RollerShadeControl();
-                                UserView.HomePage.Instance.ScrollEnabled = false;
-                                UserView.HomePage.Instance.AddChidren(curtain);
-                                UserView.HomePage.Instance.PageIndex += 1;
-                                curtain.action = RefreshBodyView;
-                                curtain.Show(device, Room.CurrentRoom);
-                            };
-                            deviceItemFL.MouseUpEventHandler += curtainHandler;
-                            deviceItemFL.MouseLongEventHandler += curtainHandler;
-                            deviceIMG.MouseUpEventHandler += curtainHandler;
-                            deviceName.MouseUpEventHandler += curtainHandler;
-
-                            //绐楀笜鍏�
-                            closeBtn.MouseUpEventHandler += (sender, e) =>
-                            {
-                                zbGateway = device.CommonDevice.Gateway;
-                                sendedControlCommand = false;
-                                zbGateway.ReportAction += UpdateDeviceControllStatu;
-                                AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
-
-                                rollerShade.CurtainUpDownStopControl(1);
-
-                                //鎺у埗寤舵椂鍥炶皟
-                                DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
-                                {
-                                    if (Parent == null)
-                                    {
-                                        return;
-                                    }
-                                    RemoveUpdateControlDeviceStatuAction(zbGateway);
-                                    if (sendedControlCommand == false)
-                                    {
-                                        DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
-                                    }
-                                });
-                            };
-                            //绐楀笜鍋�
-                            stopBtn.MouseUpEventHandler += (sender, e) =>
-                            {
-                                zbGateway = device.CommonDevice.Gateway;
-                                sendedControlCommand = false;
-                                zbGateway.ReportAction += UpdateDeviceControllStatu;
-                                AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
-
-                                rollerShade.CurtainUpDownStopControl(2);
-
-                                //鎺у埗寤舵椂鍥炶皟
-                                DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
-                                {
-                                    if (Parent == null)
-                                    {
-                                        return;
-                                    }
-                                    RemoveUpdateControlDeviceStatuAction(zbGateway);
-                                    if (sendedControlCommand == false)
-                                    {
-                                        DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
-                                    }
-                                });
-                            };
-                            //绐楀笜寮�
-                            openBtn.MouseUpEventHandler += (sender, e) =>
-                            {
-                                zbGateway = device.CommonDevice.Gateway;
-                                sendedControlCommand = false;
-                                zbGateway.ReportAction += UpdateDeviceControllStatu;
-                                AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
-
-                                rollerShade.CurtainUpDownStopControl(0);
-
-                                //鎺у埗寤舵椂鍥炶皟
-                                DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
-                                {
-                                    if (Parent == null)
-                                    {
-                                        return;
-                                    }
-                                    RemoveUpdateControlDeviceStatuAction(zbGateway);
-                                    if (sendedControlCommand == false)
-                                    {
-                                        DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
-                                    }
-                                });
-                            };
-                            //collectionBtn.MouseUpEventHandler += (sender, e) =>
-                            //{
-                            //    if (collectionBtn.IsSelected)
-                            //    {
-                            //        Room.Lists[0].DeleteDevice(device.FilePath);
-                            //        collectionBtn.IsSelected = false;
-                            //    }
-                            //    else
-                            //    {
-                            //        Room.Lists[0].AddDevice(device.FilePath);
-                            //        collectionBtn.IsSelected = true;
-                            //    }
-                            //    //RefreshBodyView();
-                            //};
-                            collectionBtn.MouseUpEventHandler += collectionEvent;
-                            //var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj==device.FilePath);
-                            //if(dev==null)
-                            //{
-                            //    collectionBtn.IsSelected = false;
-                            //}
-                            //else
-                            //{
-                            //    collectionBtn.IsSelected = true;
-                            //}
-
-                            ////寮�鍏冲仠鎸夐挳鏄惁鏄剧ず
-                            //foreach(var command in commandList)
-                            //{
-                            //    if (command == null)
-                            //    {
-                            //        continue;
-                            //    }
-                            //    if (command.commandId==0)
-                            //    {
-                            //        openBtn.Visible = true;
-                            //    }
-                            //    else if(command.commandId==1)
-                            //    {
-                            //        openBtn.Visible = true;
-                            //    }
-                            //    else if(command.commandId==2)
-                            //    {
-                            //        stopBtn.Visible = true;
-                            //    }
-                            //}
+                            Tag = device,
+                            IsMoreLines = true
+                        };
+                        if (Room.CurrentRoom.IsLove)
+                        {
+                            deleteBtn.TextID = R.MyInternationalizationString.CancelCollect;
+                            deleteBtn.BackgroundColor = ZigbeeColor.Current.GXCCancelCollectionBGColor;
+                            deleteBtn.MouseUpEventHandler += collectionEvent;
+                            deviceRowLayout.AddRightView(deleteBtn);
                         }
-                        else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.OnOffOutput)
+                        else if (Room.CurrentRoom.IsSharedRoom)
                         {
-                            //寮�鍏崇伅
-                            var light = device.CommonDevice as ToggleLight;
-                            //琛ヤ笂闈炶繙绋�
-                            if (light.Gateway == null)
-                            {
-                                continue;
-                            }
-                            if (light.Gateway.IsVirtual)
-                            {
-                                //鍙戦�佽鍙栫姸鎬佸懡浠�
-                                ReadStatus(light, () =>
-                                {
-                                    light.ReadOnOffStatus();
-                                    light.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                                });
-                            }
-                            else
-                            {
-                                if (CommonPage.ReadDeviceStatuSpan < (DateTime.Now - light.LastDateTime).TotalSeconds)
-                                {
-                                    light.ReadOnOffStatus();
-                                    light.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                                }
-                            }
-
-
-                            var deviceFL = new FrameLayout
-                            {
-                                Height = Application.GetRealHeight(deviceFL_Height),
-                                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                                Tag = device
-                            };
-                            deviceVerticalScrolViewLayout.AddChidren(deviceFL);
-                            var deviceRowLayout = new RowLayout
-                            {
-                                Y = Application.GetRealHeight(25),
-                                Height = Application.GetRealHeight(deviceFL_Height - 25) - 1,
-                                LineColor = ZigbeeColor.Current.GXCBackgroundColor,
-                                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-                                Radius = CommonPage.BigFormRadius,
-                                Tag = device
-                            };
-                            deviceFL.AddChidren(deviceRowLayout);
-
-                            var deviceItemFL = new FrameLayout()
-                            {
-                                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-                                Radius = CommonPage.BigFormRadius
-                            };
-                            deviceRowLayout.AddChidren(deviceItemFL);
-                            var deviceIMG = new Button()
-                            {
-                                X = Application.GetRealWidth(50),
-                                Y = Application.GetRealHeight(30),
-                                Width = Application.GetMinRealAverage(110),
-                                Height = Application.GetMinRealAverage(110),
-                                UnSelectedImagePath = device.IconPath,
-                                SelectedImagePath = device.OnlineIconPath,
-                                IsSelected = light.IsOnline == 1,
-                                Tag = deviceStatus_Online
-                            };
-                            deviceItemFL.AddChidren(deviceIMG);
-                            var deviceName = new Button()
-                            {
-                                X = Application.GetRealWidth(10),
-                                Y = deviceIMG.Bottom,
-                                Width = Application.GetRealWidth(180),
-                                Height = Application.GetRealHeight(80),
-                                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                                TextAlignment = TextAlignment.Center,
-                                Text = device.CommonDevice.DeviceEpointName,
-                                TextSize = 10,
-                                IsMoreLines = true
-                            };
-                            deviceItemFL.AddChidren(deviceName);
-
-                            var collectionBtn = new Button()
-                            {
-                                X = deviceItemFL.Right - Application.GetRealWidth(150),
-                                Y = Application.GetRealHeight(20),
-                                Width = Application.GetMinRealAverage(80),
-                                Height = Application.GetMinRealAverage(80),
-                                UnSelectedImagePath = "Item/Collection.png",
-                                SelectedImagePath = "Item/CollectionSelected.png",
-                                Tag = device
-                            };
-                            //***鍏堥殣钘�******
-                            //deviceItemFL.AddChidren(collectionBtn);
-                            var switchBtn = new Button
-                            {
-                                X = deviceItemFL.Right - Application.GetRealWidth(200),
-                                //Y = deviceItemFL.Bottom - Application.GetRealHeight(120),
-                                Width = Application.GetMinRealAverage(183),
-                                Height = Application.GetMinRealAverage(123),
-                                UnSelectedImagePath = "Item/Switch.png",
-                                SelectedImagePath = "Item/SwitchSelected.png",
-                                IsSelected = light.OnOffStatus == 1,
-                                Tag = deviceStatus_OnOffStatus,
-                                //Visible=false
-                                Gravity = Gravity.CenterVertical
-                            };
-                            deviceItemFL.AddChidren(switchBtn);
-                            switchBtn.MouseUpEventHandler += (send2, e2) =>
-                            {
-                                switchBtn.IsSelected = !switchBtn.IsSelected;
-                                if (switchBtn.IsSelected == true)
-                                {
-                                    zbGateway = device.CommonDevice.Gateway;
-                                    sendedControlCommand = false;
-                                    zbGateway.ReportAction += UpdateDeviceControllStatu;
-                                    AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
-
-                                    light.SwitchControl(1);
-
-                                    //鎺у埗寤舵椂鍥炶皟
-                                    DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
-                                    {
-                                        if (Parent == null)
-                                        {
-                                            return;
-                                        }
-                                        RemoveUpdateControlDeviceStatuAction(zbGateway);
-                                        if (sendedControlCommand == false)
-                                        {
-                                            DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
-                                        }
-                                    });
-                                }
-                                else
-                                {
-                                    zbGateway = device.CommonDevice.Gateway;
-                                    sendedControlCommand = false;
-                                    zbGateway.ReportAction += UpdateDeviceControllStatu;
-                                    AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
-
-                                    light.SwitchControl(0);
-
-                                    //鎺у埗寤舵椂鍥炶皟
-                                    DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
-                                    {
-                                        if (Parent == null)
-                                        {
-                                            return;
-                                        }
-                                        RemoveUpdateControlDeviceStatuAction(zbGateway);
-                                        if (sendedControlCommand == false)
-                                        {
-                                            DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
-                                        }
-                                    });
-                                }
-                            };
-
-
-                            var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
-                            {
-                                Tag = device,
-                                IsMoreLines = true
-                            };
-                            if (Room.CurrentRoom.IsLove)
-                            {
-                                deleteBtn.TextID = R.MyInternationalizationString.CancelCollect;
-                                deleteBtn.BackgroundColor = ZigbeeColor.Current.GXCCancelCollectionBGColor;
-                                deleteBtn.MouseUpEventHandler += collectionEvent;
-                                deviceRowLayout.AddRightView(deleteBtn);
-                            }
-                            else if(Room.CurrentRoom.IsSharedRoom)
-                            {
-                                //涓嶅鐞�
-                            }
-                            else
-                            {
-                                deleteBtn.MouseUpEventHandler += delEvent;
-                                deviceRowLayout.AddRightView(deleteBtn);
-                            }
-
-
-                            EventHandler<MouseEventArgs> lightHandler = (sender, e) =>
-                            {
-                                var lightControl = new Phone.Device.Light.LightControl();
-                                UserView.HomePage.Instance.AddChidren(lightControl);
-                                UserView.HomePage.Instance.PageIndex += 1;
-                                lightControl.action = RefreshBodyView;
-                                lightControl.Show(device, Room.CurrentRoom);
-                            };
-                            deviceItemFL.MouseLongEventHandler += lightHandler;
-                            deviceItemFL.MouseUpEventHandler += lightHandler;
-                            deviceName.MouseUpEventHandler += lightHandler;
-                            deviceIMG.MouseUpEventHandler += lightHandler;
-
-                            //collectionBtn.MouseUpEventHandler += (sender, e) =>
-                            //{
-                            //    if (collectionBtn.IsSelected)
-                            //    {
-                            //        Room.Lists[0].DeleteDevice(device.FilePath);
-                            //        collectionBtn.IsSelected = false;
-                            //        if(Room.CurrentRoom==Room.Lists[0])
-                            //        {
-                            //            RefreshBodyView();
-                            //        }
-                            //    }
-                            //    else
-                            //    {
-                            //        Room.Lists[0].AddDevice(device.FilePath);
-                            //        collectionBtn.IsSelected = true;
-                            //    }
-                            //    //RefreshBodyView();
-                            //};
-                            collectionBtn.MouseUpEventHandler += collectionEvent;
-
-                            //var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FilePath);
-                            //if (dev == null)
-                            //{
-                            //    collectionBtn.IsSelected = false;
-                            //}
-                            //else
-                            //{
-                            //    collectionBtn.IsSelected = true;
-                            //}
-
+                            //涓嶅鐞�
                         }
-                        else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.AirSwitch)
+                        else
                         {
-                            //绌烘皵寮�鍏�
-                            var airSwitch = device.CommonDevice as AirSwitch;
-
-                            //琛ヤ笂闈炶繙绋�
-                            if (airSwitch.Gateway == null)
-                            {
-                                continue;
-                            }
-                            if (airSwitch.Gateway.IsVirtual)
-                            {
-                                //鍙戦�佽鍙栫姸鎬佸懡浠�
-                                ReadStatus(airSwitch, () =>
-                                {
-                                    airSwitch.ReadOnOffStatus();
-                                    airSwitch.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                                });
-                            }
-                            else
-                            {
-                                //闃叉鐭椂闂村唴澶氭璇诲彇璁惧鐘舵��
-                                if ((DateTime.Now - airSwitch.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
-                                {
-                                    airSwitch.ReadOnOffStatus();
-                                    airSwitch.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                                }
-                            }
-
-                            var deviceFL = new FrameLayout
-                            {
-                                Height = Application.GetRealHeight(deviceFL_Height),
-                                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                                Tag = device
-                            };
-                            deviceVerticalScrolViewLayout.AddChidren(deviceFL);
-                            var deviceRowLayout = new RowLayout
-                            {
-                                Y = Application.GetRealHeight(25),
-                                Height = Application.GetRealHeight(deviceFL_Height - 25) - 1,
-                                LineColor = ZigbeeColor.Current.GXCBackgroundColor,
-                                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-                                Radius = CommonPage.BigFormRadius,
-                                Tag = device
-                            };
-                            deviceFL.AddChidren(deviceRowLayout);
-
-                            var deviceItemFL = new FrameLayout()
-                            {
-                                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-                                Radius = CommonPage.BigFormRadius
-                            };
-                            deviceRowLayout.AddChidren(deviceItemFL);
-                            var deviceIMG = new Button()
-                            {
-                                X = Application.GetRealWidth(50),
-                                Y = Application.GetRealHeight(30),
-                                Width = Application.GetMinRealAverage(110),
-                                Height = Application.GetMinRealAverage(110),
-                                UnSelectedImagePath = device.IconPath,
-                                SelectedImagePath = device.OnlineIconPath,
-                                IsSelected = airSwitch.IsOnline == 1,
-                                Tag = deviceStatus_Online
-                            };
-                            deviceItemFL.AddChidren(deviceIMG);
-                            var deviceName = new Button()
-                            {
-                                X = Application.GetRealWidth(10),
-                                Y = deviceIMG.Bottom,
-                                Width = Application.GetRealWidth(180),
-                                Height = Application.GetRealHeight(80),
-                                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                                TextAlignment = TextAlignment.Center,
-                                Text = device.CommonDevice.DeviceEpointName,
-                                TextSize = 10,
-                                IsMoreLines = true
-                            };
-                            deviceItemFL.AddChidren(deviceName);
-
-                            var collectionBtn = new Button()
-                            {
-                                X = deviceItemFL.Right - Application.GetRealWidth(150),
-                                Y = Application.GetRealHeight(20),
-                                Width = Application.GetMinRealAverage(80),
-                                Height = Application.GetMinRealAverage(80),
-                                UnSelectedImagePath = "Item/Collection.png",
-                                SelectedImagePath = "Item/CollectionSelected.png",
-                                Tag = device
-                            };
-                            //***鍏堥殣钘�******
-                            //deviceItemFL.AddChidren(collectionBtn);
-                            var switchBtn = new Button
-                            {
-                                X = deviceItemFL.Right - Application.GetRealWidth(200),
-                                //Y = deviceItemFL.Bottom - Application.GetRealHeight(120),
-                                Width = Application.GetMinRealAverage(183),
-                                Height = Application.GetMinRealAverage(123),
-                                UnSelectedImagePath = "Item/Switch.png",
-                                SelectedImagePath = "Item/SwitchSelected.png",
-                                IsSelected = airSwitch.OnOffStatus == 1,
-                                Tag = deviceStatus_OnOffStatus,
-                                //Visible=false
-                                Gravity = Gravity.CenterVertical
-                            };
-                            deviceItemFL.AddChidren(switchBtn);
-                            switchBtn.MouseUpEventHandler += (send2, e2) =>
-                            {
-                                switchBtn.IsSelected = !switchBtn.IsSelected;
-                                if (switchBtn.IsSelected == true)
-                                {
-                                    zbGateway = device.CommonDevice.Gateway;
-                                    sendedControlCommand = false;
-                                    zbGateway.ReportAction += UpdateDeviceControllStatu;
-                                    AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
-
-                                    airSwitch.SwitchControl(1);
-
-                                    //鎺у埗寤舵椂鍥炶皟
-                                    DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
-                                    {
-                                        if (Parent == null)
-                                        {
-                                            return;
-                                        }
-                                        RemoveUpdateControlDeviceStatuAction(zbGateway);
-                                        if (sendedControlCommand == false)
-                                        {
-                                            DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
-                                        }
-                                    });
-                                }
-                                else
-                                {
-                                    zbGateway = device.CommonDevice.Gateway;
-                                    sendedControlCommand = false;
-                                    zbGateway.ReportAction += UpdateDeviceControllStatu;
-                                    AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
-
-                                    airSwitch.SwitchControl(0);
-
-                                    //鎺у埗寤舵椂鍥炶皟
-                                    DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
-                                    {
-                                        if (Parent == null)
-                                        {
-                                            return;
-                                        }
-                                        RemoveUpdateControlDeviceStatuAction(zbGateway);
-                                        if (sendedControlCommand == false)
-                                        {
-                                            DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
-                                        }
-                                    });
-                                }
-                            };
-
-                            var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
-                            {
-                                Tag = device,
-                                IsMoreLines = true
-                            };
-                            if (Room.CurrentRoom.IsLove)
-                            {
-                                deleteBtn.TextID = R.MyInternationalizationString.CancelCollect;
-                                deleteBtn.BackgroundColor = ZigbeeColor.Current.GXCCancelCollectionBGColor;
-                                deleteBtn.MouseUpEventHandler += collectionEvent;
-                                deviceRowLayout.AddRightView(deleteBtn);
-                            }
-                            else if(Room.CurrentRoom.IsSharedRoom)
-                            {
-                                //涓嶅鐞�
-                            }
-                            else
-                            {
-                                deleteBtn.MouseUpEventHandler += delEvent;
-                                deviceRowLayout.AddRightView(deleteBtn);
-                            }
-
-
-                            EventHandler<MouseEventArgs> airSwitchHandler = (sender, e) =>
-                            {
-                                var airSwitchControl = new Phone.Device.AirSwitch.AirSwitchControl();
-                                UserView.HomePage.Instance.AddChidren(airSwitchControl);
-                                UserView.HomePage.Instance.PageIndex += 1;
-                                airSwitchControl.action = RefreshBodyView;
-                                airSwitchControl.Show(device, Room.CurrentRoom);
-                            };
-                            deviceItemFL.MouseLongEventHandler += airSwitchHandler;
-                            deviceItemFL.MouseUpEventHandler += airSwitchHandler;
-                            deviceName.MouseUpEventHandler += airSwitchHandler;
-                            deviceIMG.MouseUpEventHandler += airSwitchHandler;
-
-                            //collectionBtn.MouseUpEventHandler += (sender, e) =>
-                            //{
-                            //    if (collectionBtn.IsSelected)
-                            //    {
-                            //        Room.Lists[0].DeleteDevice(device.FilePath);
-                            //        collectionBtn.IsSelected = false;
-                            //        if(Room.CurrentRoom==Room.Lists[0])
-                            //        {
-                            //            RefreshBodyView();
-                            //        }
-                            //    }
-                            //    else
-                            //    {
-                            //        Room.Lists[0].AddDevice(device.FilePath);
-                            //        collectionBtn.IsSelected = true;
-                            //    }
-                            //    //RefreshBodyView();
-                            //};
-                            collectionBtn.MouseUpEventHandler += collectionEvent;
-
-                            //var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FilePath);
-                            //if (dev == null)
-                            //{
-                            //    collectionBtn.IsSelected = false;
-                            //}
-                            //else
-                            //{
-                            //    collectionBtn.IsSelected = true;
-                            //}
+                            deleteBtn.MouseUpEventHandler += delEvent;
+                            deviceRowLayout.AddRightView(deleteBtn);
                         }
-                        else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.Thermostat)
+
+
+                        EventHandler<MouseEventArgs> airSwitchHandler = (sender, e) =>
                         {
-                            //鎭掓俯鍣�-AC-绌鸿皟
-                            var ac = device.CommonDevice as AC;
+                            var airSwitchControl = new Phone.Device.AirSwitch.AirSwitchControl();
+                            UserView.HomePage.Instance.AddChidren(airSwitchControl);
+                            UserView.HomePage.Instance.PageIndex += 1;
+                            airSwitchControl.action = RefreshBodyView;
+                            airSwitchControl.Show(device, Room.CurrentRoom);
+                        };
+                        //deviceItemFL.MouseLongEventHandler += airSwitchHandler;
+                        deviceItemFL.MouseUpEventHandler += airSwitchHandler;
+                        deviceName.MouseUpEventHandler += airSwitchHandler;
+                        deviceIMG.MouseUpEventHandler += airSwitchHandler;
 
-                            //琛ヤ笂闈炶繙绋�
-                            if (ac.Gateway == null)
+                        //collectionBtn.MouseUpEventHandler += (sender, e) =>
+                        //{
+                        //    if (collectionBtn.IsSelected)
+                        //    {
+                        //        Room.Lists[0].DeleteDevice(device.FilePath);
+                        //        collectionBtn.IsSelected = false;
+                        //        if(Room.CurrentRoom==Room.Lists[0])
+                        //        {
+                        //            RefreshBodyView();
+                        //        }
+                        //    }
+                        //    else
+                        //    {
+                        //        Room.Lists[0].AddDevice(device.FilePath);
+                        //        collectionBtn.IsSelected = true;
+                        //    }
+                        //    //RefreshBodyView();
+                        //};
+                        collectionBtn.MouseUpEventHandler += collectionEvent;
+
+                        //var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FilePath);
+                        //if (dev == null)
+                        //{
+                        //    collectionBtn.IsSelected = false;
+                        //}
+                        //else
+                        //{
+                        //    collectionBtn.IsSelected = true;
+                        //}
+                    }
+                    else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.Thermostat)
+                    {
+                        //鎭掓俯鍣�-AC-绌鸿皟
+                        var ac = device.CommonDevice as AC;
+
+                        //琛ヤ笂闈炶繙绋�
+                        if (ac.Gateway == null)
+                        {
+                            continue;
+                        }
+                        if (ac.Gateway.IsVirtual)
+                        {
+                            //鍙戦�佽鍙栫姸鎬佸懡浠�
+                            ReadStatus(ac, () =>
                             {
-                                continue;
+                                ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                                ac.ReadLocalTemperature();
+                                ac.ReadCoolingSetpoint();
+                                ac.ReadHeatingSetpoint();
+                                ac.ReadAutoSetpoint();
+                                ac.ReadFanMode();
+                                ac.ReadSystemMode();
+                            });
+                        }
+                        else
+                        {
+                            //闃叉鐭椂闂村唴澶氭璇诲彇璁惧鐘舵��
+                            if ((DateTime.Now - ac.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
+                            {
+                                ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                                ac.ReadLocalTemperature();
+                                ac.ReadCoolingSetpoint();
+                                ac.ReadHeatingSetpoint();
+                                ac.ReadAutoSetpoint();
+                                ac.ReadFanMode();
+                                ac.ReadSystemMode();
                             }
-                            if (ac.Gateway.IsVirtual)
+                        }
+
+                        var deviceFL = new FrameLayout
+                        {
+                            Height = Application.GetRealHeight(deviceFL_Height),
+                            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                            Tag = device
+                        };
+                        deviceVerticalScrolViewLayout.AddChidren(deviceFL);
+                        var deviceRowLayout = new RowLayout
+                        {
+                            Y = Application.GetRealHeight(25),
+                            Height = Application.GetRealHeight(deviceFL_Height - 25) - 1,
+                            LineColor = ZigbeeColor.Current.GXCBackgroundColor,
+                            BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+                            Radius = CommonPage.BigFormRadius,
+                            Tag = device
+                        };
+                        deviceFL.AddChidren(deviceRowLayout);
+
+                        var deviceItemFL = new FrameLayout()
+                        {
+                            BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+                            Radius = CommonPage.BigFormRadius
+                        };
+                        deviceRowLayout.AddChidren(deviceItemFL);
+                        var deviceIMG = new Button()
+                        {
+                            X = Application.GetRealWidth(50),
+                            Y = Application.GetRealHeight(30),
+                            Width = Application.GetMinRealAverage(110),
+                            Height = Application.GetMinRealAverage(110),
+                            UnSelectedImagePath = device.IconPath,
+                            SelectedImagePath = device.OnlineIconPath,
+                            IsSelected = ac.IsOnline == 1,
+                            Tag = deviceStatus_Online
+                        };
+                        deviceItemFL.AddChidren(deviceIMG);
+                        var deviceName = new Button()
+                        {
+                            X = Application.GetRealWidth(10),
+                            Y = deviceIMG.Bottom,
+                            Width = Application.GetRealWidth(180),
+                            Height = Application.GetRealHeight(80),
+                            TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                            TextAlignment = TextAlignment.Center,
+                            Text = device.CommonDevice.DeviceEpointName,
+                            TextSize = 10,
+                            IsMoreLines = true
+                        };
+                        deviceItemFL.AddChidren(deviceName);
+
+                        var collectionBtn = new Button()
+                        {
+                            X = deviceItemFL.Right - Application.GetRealWidth(150),
+                            Y = Application.GetRealHeight(20),
+                            Width = Application.GetMinRealAverage(80),
+                            Height = Application.GetMinRealAverage(80),
+                            UnSelectedImagePath = "Item/Collection.png",
+                            SelectedImagePath = "Item/CollectionSelected.png",
+                            Tag = device
+                        };
+                        //***鍏堥殣钘�******
+                        //deviceItemFL.AddChidren(collectionBtn);
+
+                        //鍑�
+                        var reduceBtnBG = new Device.CommonForm.SelectedStatuButton()
+                        {
+                            X = deviceName.Right,
+                            Width = Application.GetMinRealAverage(250),
+                            Height = Application.GetMinRealAverage(250),
+                            Gravity = Gravity.CenterVertical,
+                        };
+                        deviceItemFL.AddChidren(reduceBtnBG);
+
+                        var reduceBtn = new Device.CommonForm.SelectedStatuButton()
+                        {
+                            X = Application.GetRealWidth(30) + deviceName.Right,
+                            Width = Application.GetMinRealAverage(110),
+                            Height = Application.GetMinRealAverage(110),
+                            Gravity = Gravity.CenterVertical,
+                            UnSelectedImagePath = "Item/Reduce.png",
+                            SelectedImagePath = "Item/ReduceSelected.png",
+                        };
+                        deviceItemFL.AddChidren(reduceBtn);
+                        //褰撳墠娓╁害
+                        var currentTemperatureBtn = new Button()
+                        {
+                            X = Application.GetRealWidth(50) + reduceBtn.Right,
+                            Width = Application.GetRealWidth(200),
+                            Height = Application.GetRealHeight(110),
+                            Gravity = Gravity.CenterVertical,
+                            TextColor = ZigbeeColor.Current.TextBlack,
+                            TextSize = 16,
+                            Text = $"{Device.AC.ACControlBase.GetCurrentModeTemperature(ac)} 掳C",
+                            Tag = "Temparetrue"
+                        };
+                        deviceItemFL.AddChidren(currentTemperatureBtn);
+                        reduceBtn.MouseUpEventHandler += (send2, e2) =>
+                        {
+                            if (Device.AC.ACControlBase.IsOpen(ac) == false)
                             {
-                                //鍙戦�佽鍙栫姸鎬佸懡浠�
-                                ReadStatus(ac, () =>
-                                {
-                                    ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                                    ac.ReadFanMode();
-                                    ac.ReadSystemMode();
-                                    ac.ReadLocalTemperature();
-                                    ac.ReadCoolingSetpoint();
-                                    ac.ReadHeatingSetpoint();
-                                });
+                                Device.AC.ACControlBase.ShowACIsCloseTip();
+                                return;
                             }
-                            else
+                                //cool
+                                if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8)
                             {
-                                //闃叉鐭椂闂村唴澶氭璇诲彇璁惧鐘舵��
-                                if ((DateTime.Now - ac.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
+                                if (ac.currentCoolingSetpoint <= ACControlBase.Temperature_Low)
                                 {
-                                    ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                                    ac.ReadFanMode();
-                                    ac.ReadSystemMode();
-                                    ac.ReadLocalTemperature();
-                                    ac.ReadCoolingSetpoint();
-                                    ac.ReadHeatingSetpoint();
-                                }
-                            }
-
-                            var deviceFL = new FrameLayout
-                            {
-                                Height = Application.GetRealHeight(deviceFL_Height),
-                                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                                Tag = device
-                            };
-                            deviceVerticalScrolViewLayout.AddChidren(deviceFL);
-                            var deviceRowLayout = new RowLayout
-                            {
-                                Y = Application.GetRealHeight(25),
-                                Height = Application.GetRealHeight(deviceFL_Height - 25) - 1,
-                                LineColor = ZigbeeColor.Current.GXCBackgroundColor,
-                                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-                                Radius = CommonPage.BigFormRadius,
-                                Tag = device
-                            };
-                            deviceFL.AddChidren(deviceRowLayout);
-
-                            var deviceItemFL = new FrameLayout()
-                            {
-                                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-                                Radius = CommonPage.BigFormRadius
-                            };
-                            deviceRowLayout.AddChidren(deviceItemFL);
-                            var deviceIMG = new Button()
-                            {
-                                X = Application.GetRealWidth(50),
-                                Y = Application.GetRealHeight(30),
-                                Width = Application.GetMinRealAverage(110),
-                                Height = Application.GetMinRealAverage(110),
-                                UnSelectedImagePath = device.IconPath,
-                                SelectedImagePath = device.OnlineIconPath,
-                                IsSelected = ac.IsOnline == 1,
-                                Tag = deviceStatus_Online
-                            };
-                            deviceItemFL.AddChidren(deviceIMG);
-                            var deviceName = new Button()
-                            {
-                                X = Application.GetRealWidth(10),
-                                Y = deviceIMG.Bottom,
-                                Width = Application.GetRealWidth(180),
-                                Height = Application.GetRealHeight(80),
-                                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                                TextAlignment = TextAlignment.Center,
-                                Text = device.CommonDevice.DeviceEpointName,
-                                TextSize = 10,
-                                IsMoreLines = true
-                            };
-                            deviceItemFL.AddChidren(deviceName);
-
-                            var collectionBtn = new Button()
-                            {
-                                X = deviceItemFL.Right - Application.GetRealWidth(150),
-                                Y = Application.GetRealHeight(20),
-                                Width = Application.GetMinRealAverage(80),
-                                Height = Application.GetMinRealAverage(80),
-                                UnSelectedImagePath = "Item/Collection.png",
-                                SelectedImagePath = "Item/CollectionSelected.png",
-                                Tag = device
-                            };
-                            //***鍏堥殣钘�******
-                            //deviceItemFL.AddChidren(collectionBtn);
-
-                            //鍑�
-                            var reduceBtn = new Device.CommonForm.SelectedStatuButton()
-                            {
-                                X = Application.GetRealWidth(30) + deviceName.Right,
-                                Width = Application.GetMinRealAverage(110),
-                                Height = Application.GetMinRealAverage(110),
-                                Gravity = Gravity.CenterVertical,
-                                UnSelectedImagePath = "Item/Reduce.png",
-                                SelectedImagePath = "Item/ReduceSelected.png",
-                            };
-                            deviceItemFL.AddChidren(reduceBtn);
-                            //褰撳墠娓╁害
-                            var currentTemperatureBtn = new Button()
-                            {
-                                X = Application.GetRealWidth(50) + reduceBtn.Right,
-                                Width = Application.GetRealWidth(200),
-                                Height = Application.GetRealHeight(110),
-                                Gravity = Gravity.CenterVertical,
-                                TextColor = ZigbeeColor.Current.TextBlack,
-                                TextSize = 16,
-                                Text = $"{Device.AC.ACControlBase.GetCurrentModeTemperature(ac)} 掳C",
-                                Tag = "Temparetrue"
-                            };
-                            deviceItemFL.AddChidren(currentTemperatureBtn);
-                            reduceBtn.MouseUpEventHandler += (send2, e2) =>
-                            {
-                                if (Device.AC.ACControlBase.IsOpen(ac) == false)
-                                {
-                                    Device.AC.ACControlBase.ShowACIsCloseTip();
                                     return;
                                 }
-                                //cool
-                                if (ac.currentSystemMode == 3)
-                                {
-                                    ac.currentCoolingSetpoint -= 1;
-                                    ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint);
-                                    currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} 掳C";
-                                }
+                                ac.currentCoolingSetpoint -= 1;
+                                ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint * 100);
+                                currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} 掳C";
+                            }
                                 //heat
                                 else if (ac.currentSystemMode == 4)
+                            {
+                                if (ac.currentHeatingSetpoint <= ACControlBase.Temperature_Low)
                                 {
-                                    ac.currentHeatingSetpoint -= 1;
-                                    ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint);
-
-                                    currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} 掳C";
+                                    return;
                                 }
+                                ac.currentHeatingSetpoint -= 1;
+                                ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint * 100);
+                                currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} 掳C";
+                            }
+                            else if (ac.currentSystemMode == 1)
+                            {
+                                if (ac.currentAutoSetpoint <= ACControlBase.Temperature_Low)
+                                {
+                                    return;
+                                }
+                                ac.currentAutoSetpoint -= 1;
+                                ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint * 100);
+                                currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} 掳C";
+                            }
                                 //auto
                                 //dry
                                 //currentTemperatureBtn.Text = $"{Device.AC.ACControlBase.GetCurrentModeTemperature(ac)} 掳C";
                             };
 
-                            var addBtn = new Device.CommonForm.SelectedStatuButton()
-                            {
-                                X = Application.GetRealWidth(30) + currentTemperatureBtn.Right,
-                                Width = Application.GetMinRealAverage(110),
-                                Height = Application.GetMinRealAverage(110),
-                                Gravity = Gravity.CenterVertical,
-                                UnSelectedImagePath = "Item/Add.png",
-                                SelectedImagePath = "Item/AddSelected.png",
-                            };
-                            deviceItemFL.AddChidren(addBtn);
+                        var addBtnBG = new Device.CommonForm.SelectedStatuButton()
+                        {
+                            X = currentTemperatureBtn.Right,
+                            Width = Application.GetMinRealAverage(250),
+                            Height = Application.GetMinRealAverage(250),
+                            Gravity = Gravity.CenterVertical
+                        };
+                        deviceItemFL.AddChidren(addBtnBG);
 
-                            addBtn.MouseUpEventHandler += (send2, e2) =>
+                        var addBtn = new Device.CommonForm.SelectedStatuButton()
+                        {
+                            X = Application.GetRealWidth(30) + currentTemperatureBtn.Right,
+                            Width = Application.GetMinRealAverage(110),
+                            Height = Application.GetMinRealAverage(110),
+                            Gravity = Gravity.CenterVertical,
+                            UnSelectedImagePath = "Item/Add.png",
+                            SelectedImagePath = "Item/AddSelected.png",
+                        };
+                        deviceItemFL.AddChidren(addBtn);
+
+                        addBtn.MouseUpEventHandler += (send2, e2) =>
+                        {
+                            if (Device.AC.ACControlBase.IsOpen(ac) == false)
                             {
-                                if (Device.AC.ACControlBase.IsOpen(ac) == false)
+                                Device.AC.ACControlBase.ShowACIsCloseTip();
+                                return;
+                            }
+                                //cool
+                                if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8)
+                            {
+                                if (ac.currentCoolingSetpoint >= ACControlBase.Temperature_High)
                                 {
-                                    Device.AC.ACControlBase.ShowACIsCloseTip();
                                     return;
                                 }
-                                //cool
-                                if (ac.currentSystemMode == 3)
-                                {
-                                    ac.currentCoolingSetpoint += 1;
-                                    ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint);
+                                ac.currentCoolingSetpoint += 1;
+                                ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint * 100);
 
-                                    currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} 掳C";
-                                }
+                                currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} 掳C";
+                            }
                                 //heat
                                 else if (ac.currentSystemMode == 4)
+                            {
+                                if (ac.currentHeatingSetpoint >= ACControlBase.Temperature_High)
                                 {
-                                    ac.currentHeatingSetpoint += 1;
-                                    ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint);
-
-                                    currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} 掳C";
+                                    return;
                                 }
-                                //auto
-                                //dry
-                            };
+                                ac.currentHeatingSetpoint += 1;
+                                ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint * 100);
 
-                            var switchBtn = new Button
-                            {
-                                X = deviceItemFL.Right - Application.GetRealWidth(200),
-                                //Y = deviceItemFL.Bottom - Application.GetRealHeight(120),
-                                Width = Application.GetMinRealAverage(183),
-                                Height = Application.GetMinRealAverage(123),
-                                UnSelectedImagePath = "Item/Switch.png",
-                                SelectedImagePath = "Item/SwitchSelected.png",
-                                IsSelected = ac.currentSystemMode != 0,
-                                Tag = deviceStatus_OnOffStatus,
-                                //Visible=false
-                                Gravity = Gravity.CenterVertical
-                            };
-                            deviceItemFL.AddChidren(switchBtn);
-                            switchBtn.MouseUpEventHandler += (send2, e2) =>
-                            {
-                                switchBtn.IsSelected = !switchBtn.IsSelected;
-                                if (switchBtn.IsSelected == true)
-                                {
-                                    zbGateway = device.CommonDevice.Gateway;
-                                    sendedControlCommand = false;
-                                    zbGateway.ReportAction += UpdateDeviceControllStatu;
-                                    AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
-
-                                    ac.Open();
-
-                                    //鎺у埗寤舵椂鍥炶皟
-                                    //DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
-                                    //{
-                                    //    if (Parent == null)
-                                    //    {
-                                    //        return;
-                                    //    }
-                                    //    RemoveUpdateControlDeviceStatuAction(zbGateway);
-                                    //    if (sendedControlCommand == false)
-                                    //    {
-                                    //        DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
-                                    //    }
-                                    //});
-                                }
-                                else
-                                {
-                                    zbGateway = device.CommonDevice.Gateway;
-                                    sendedControlCommand = false;
-                                    zbGateway.ReportAction += UpdateDeviceControllStatu;
-                                    AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
-
-                                    ac.Close();
-
-                                    //鎺у埗寤舵椂鍥炶皟
-                                    //DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
-                                    //{
-                                    //    if (Parent == null)
-                                    //    {
-                                    //        return;
-                                    //    }
-                                    //    RemoveUpdateControlDeviceStatuAction(zbGateway);
-                                    //    if (sendedControlCommand == false)
-                                    //    {
-                                    //        DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
-                                    //    }
-                                    //});
-                                }
-                            };
-
-                            var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
-                            {
-                                Tag = device,
-                                IsMoreLines = true
-                            };
-                            if (Room.CurrentRoom.IsLove)
-                            {
-                                deleteBtn.TextID = R.MyInternationalizationString.CancelCollect;
-                                deleteBtn.BackgroundColor = ZigbeeColor.Current.GXCCancelCollectionBGColor;
-                                deleteBtn.MouseUpEventHandler += collectionEvent;
-                                deviceRowLayout.AddRightView(deleteBtn);
+                                currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} 掳C";
                             }
-                            else if(Room.CurrentRoom.IsSharedRoom)
+                            else if (ac.currentSystemMode == 1)
                             {
-                                //涓嶅鐞�
-                            }
-                            else
-                            {
-                                deleteBtn.MouseUpEventHandler += delEvent;
-                                deviceRowLayout.AddRightView(deleteBtn);
+                                if (ac.currentAutoSetpoint >= ACControlBase.Temperature_High)
+                                {
+                                    return;
+                                }
+                                ac.currentAutoSetpoint += 1;
+                                ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint * 100);
+                                currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} 掳C";
                             }
 
+                        };
 
-                            EventHandler<MouseEventArgs> acHandler = (sender, e) =>
-                            {
-                                var acControl = new Phone.Device.AC.ACControl { };
-                                UserView.HomePage.Instance.AddChidren(acControl);
-                                UserView.HomePage.Instance.PageIndex += 1;
-                                acControl.action = RefreshBodyView;
-                                acControl.Show(device, Room.CurrentRoom);
-                            };
-                            deviceItemFL.MouseLongEventHandler += acHandler;
-                            deviceItemFL.MouseUpEventHandler += acHandler;
-                            deviceName.MouseUpEventHandler += acHandler;
-                            deviceIMG.MouseUpEventHandler += acHandler;
-                        }
-                        else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.DimmableLight)
+                        var switchBtnBG = new Button
                         {
-                            //璋冨厜鐏�
-                            var dimmableLight = device.CommonDevice as DimmableLight;
+                            X = deviceItemFL.Right - Application.GetRealWidth(250),
+                            Width = Application.GetMinRealAverage(250),
+                            Height = Application.GetMinRealAverage(250),
+                            Gravity = Gravity.CenterVertical
+                        };
+                        deviceItemFL.AddChidren(switchBtnBG);
+                        var switchBtn = new Button
+                        {
+                            X = deviceItemFL.Right - Application.GetRealWidth(200),
+                            //Y = deviceItemFL.Bottom - Application.GetRealHeight(120),
+                            Width = Application.GetMinRealAverage(183),
+                            Height = Application.GetMinRealAverage(123),
+                            UnSelectedImagePath = "Item/Switch.png",
+                            SelectedImagePath = "Item/SwitchSelected.png",
+                            IsSelected = ac.currentSystemMode != 0,
+                            Tag = deviceStatus_OnOffStatus,
+                            //Visible=false
+                            Gravity = Gravity.CenterVertical
+                        };
+                        deviceItemFL.AddChidren(switchBtn);
+                        switchBtn.MouseUpEventHandler += (send2, e2) =>
+                        {
+                            switchBtn.IsSelected = !switchBtn.IsSelected;
+                            if (switchBtn.IsSelected == true)
+                            {
+                                zbGateway = device.CommonDevice.Gateway;
+                                sendedControlCommand = false;
+                                zbGateway.ReportAction += UpdateDeviceControllStatu;
+                                AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
 
-                            //琛ヤ笂闈炶繙绋�
-                            if (dimmableLight.Gateway == null)
-                            {
-                                continue;
-                            }
-                            if (dimmableLight.Gateway.IsVirtual)
-                            {
-                                //鍙戦�佽鍙栫姸鎬佸懡浠�
-                                ReadStatus(dimmableLight, () =>
-                                {
-                                    dimmableLight.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                                    dimmableLight.ReadOnOffStatus();
-                                    dimmableLight.ReadLevel();
-                                });
-                            }
+                                ac.Open();
+
+                                    //鎺у埗寤舵椂鍥炶皟
+                                    //DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
+                                    //{
+                                    //    if (Parent == null)
+                                    //    {
+                                    //        return;
+                                    //    }
+                                    //    RemoveUpdateControlDeviceStatuAction(zbGateway);
+                                    //    if (sendedControlCommand == false)
+                                    //    {
+                                    //        DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
+                                    //    }
+                                    //});
+                                }
                             else
                             {
-                                //闃叉鐭椂闂村唴澶氭璇诲彇璁惧鐘舵��
-                                if ((DateTime.Now - dimmableLight.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
-                                {
-                                    dimmableLight.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
-                                    dimmableLight.ReadOnOffStatus();
-                                    dimmableLight.ReadLevel();
+                                zbGateway = device.CommonDevice.Gateway;
+                                sendedControlCommand = false;
+                                zbGateway.ReportAction += UpdateDeviceControllStatu;
+                                AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, device.CommonDevice);
+
+                                ac.Close();
+
+                                    //鎺у埗寤舵椂鍥炶皟
+                                    //DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
+                                    //{
+                                    //    if (Parent == null)
+                                    //    {
+                                    //        return;
+                                    //    }
+                                    //    RemoveUpdateControlDeviceStatuAction(zbGateway);
+                                    //    if (sendedControlCommand == false)
+                                    //    {
+                                    //        DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
+                                    //    }
+                                    //});
                                 }
+                        };
+
+                        var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
+                        {
+                            Tag = device,
+                            IsMoreLines = true
+                        };
+                        if (Room.CurrentRoom.IsLove)
+                        {
+                            deleteBtn.TextID = R.MyInternationalizationString.CancelCollect;
+                            deleteBtn.BackgroundColor = ZigbeeColor.Current.GXCCancelCollectionBGColor;
+                            deleteBtn.MouseUpEventHandler += collectionEvent;
+                            deviceRowLayout.AddRightView(deleteBtn);
+                        }
+                        else if (Room.CurrentRoom.IsSharedRoom)
+                        {
+                            //涓嶅鐞�
+                        }
+                        else
+                        {
+                            deleteBtn.MouseUpEventHandler += delEvent;
+                            deviceRowLayout.AddRightView(deleteBtn);
+                        }
+
+
+                        EventHandler<MouseEventArgs> acHandler = (sender, e) =>
+                        {
+                            var acControl = new Phone.Device.AC.ACControl { };
+                            UserView.HomePage.Instance.AddChidren(acControl);
+                            UserView.HomePage.Instance.PageIndex += 1;
+                            acControl.action = RefreshBodyView;
+                            acControl.Show(device, Room.CurrentRoom);
+                        };
+                        //deviceItemFL.MouseLongEventHandler += acHandler;
+                        deviceItemFL.MouseUpEventHandler += acHandler;
+                        deviceName.MouseUpEventHandler += acHandler;
+                        deviceIMG.MouseUpEventHandler += acHandler;
+                    }
+                    else if (device.CommonDevice.Type == ZigBee.Device.DeviceType.DimmableLight)
+                    {
+                        //璋冨厜鐏�
+                        var dimmableLight = device.CommonDevice as DimmableLight;
+
+                        //琛ヤ笂闈炶繙绋�
+                        if (dimmableLight.Gateway == null)
+                        {
+                            continue;
+                        }
+                        if (dimmableLight.Gateway.IsVirtual)
+                        {
+                            //鍙戦�佽鍙栫姸鎬佸懡浠�
+                            ReadStatus(dimmableLight, () =>
+                            {
+                                dimmableLight.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                                dimmableLight.ReadOnOffStatus();
+                                dimmableLight.ReadLevel();
+                            });
+                        }
+                        else
+                        {
+                            //闃叉鐭椂闂村唴澶氭璇诲彇璁惧鐘舵��
+                            if ((DateTime.Now - dimmableLight.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
+                            {
+                                dimmableLight.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
+                                dimmableLight.ReadOnOffStatus();
+                                dimmableLight.ReadLevel();
                             }
+                        }
 
-                            var deviceFL = new FrameLayout
-                            {
-                                Height = Application.GetRealHeight(deviceFL_Height),
-                                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                                Tag = device
-                            };
-                            deviceVerticalScrolViewLayout.AddChidren(deviceFL);
-                            var deviceRowLayout = new RowLayout
-                            {
-                                Y = Application.GetRealHeight(25),
-                                Height = Application.GetRealHeight(deviceFL_Height - 25) - 1,
-                                LineColor = ZigbeeColor.Current.GXCBackgroundColor,
-                                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-                                Radius = CommonPage.BigFormRadius,
-                                Tag = device
-                            };
-                            deviceFL.AddChidren(deviceRowLayout);
+                        var deviceFL = new FrameLayout
+                        {
+                            Height = Application.GetRealHeight(deviceFL_Height),
+                            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                            Tag = device
+                        };
+                        deviceVerticalScrolViewLayout.AddChidren(deviceFL);
+                        var deviceRowLayout = new RowLayout
+                        {
+                            Y = Application.GetRealHeight(25),
+                            Height = Application.GetRealHeight(deviceFL_Height - 25) - 1,
+                            LineColor = ZigbeeColor.Current.GXCBackgroundColor,
+                            BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+                            Radius = CommonPage.BigFormRadius,
+                            Tag = device
+                        };
+                        deviceFL.AddChidren(deviceRowLayout);
 
-                            var deviceItemFL = new FrameLayout()
-                            {
-                                BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
-                                Radius = CommonPage.BigFormRadius
-                            };
-                            deviceRowLayout.AddChidren(deviceItemFL);
-                            var deviceIMG = new Button()
-                            {
-                                X = Application.GetRealWidth(50),
-                                Y = Application.GetRealHeight(30),
-                                Width = Application.GetMinRealAverage(110),
-                                Height = Application.GetMinRealAverage(110),
-                                UnSelectedImagePath = device.IconPath,
-                                SelectedImagePath = device.OnlineIconPath,
-                                IsSelected = dimmableLight.IsOnline == 1,
-                                Tag = deviceStatus_Online
-                            };
-                            deviceItemFL.AddChidren(deviceIMG);
-                            var deviceName = new Button()
-                            {
-                                X = Application.GetRealWidth(10),
-                                Y = deviceIMG.Bottom,
-                                Width = Application.GetRealWidth(180),
-                                Height = Application.GetRealHeight(80),
-                                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-                                TextAlignment = TextAlignment.Center,
-                                Text = device.CommonDevice.DeviceEpointName,
-                                TextSize = 10,
-                                IsMoreLines = true
-                            };
-                            deviceItemFL.AddChidren(deviceName);
+                        var deviceItemFL = new FrameLayout()
+                        {
+                            BackgroundColor = ZigbeeColor.Current.GXCTopViewBackgroundColor,
+                            Radius = CommonPage.BigFormRadius
+                        };
+                        deviceRowLayout.AddChidren(deviceItemFL);
+                        var deviceIMG = new Button()
+                        {
+                            X = Application.GetRealWidth(50),
+                            Y = Application.GetRealHeight(30),
+                            Width = Application.GetMinRealAverage(110),
+                            Height = Application.GetMinRealAverage(110),
+                            UnSelectedImagePath = device.IconPath,
+                            SelectedImagePath = device.OnlineIconPath,
+                            IsSelected = dimmableLight.IsOnline == 1,
+                            Tag = deviceStatus_Online
+                        };
+                        deviceItemFL.AddChidren(deviceIMG);
+                        var deviceName = new Button()
+                        {
+                            X = Application.GetRealWidth(10),
+                            Y = deviceIMG.Bottom,
+                            Width = Application.GetRealWidth(180),
+                            Height = Application.GetRealHeight(80),
+                            TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                            TextAlignment = TextAlignment.Center,
+                            Text = device.CommonDevice.DeviceEpointName,
+                            TextSize = 10,
+                            IsMoreLines = true
+                        };
+                        deviceItemFL.AddChidren(deviceName);
 
-                            var levelSeekBar = new HorizontalSeekBar()
-                            {
-                                X=deviceIMG.Right+Application.GetRealWidth(50),
-                                Width =  Application.GetRealWidth(500),
-                                Height = Application.GetRealHeight(80),
-                                Gravity = Gravity.CenterVertical,
-                                BackgroundColor = ZigbeeColor.Current.GXCSliderUnSelectedColor,
-                                ThumbColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                                BorderColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                                ProgressColor = ZigbeeColor.Current.GXCButtonBlueColor,
-                                Max = 254,
-                                Tag = "LevelSeekBar",
-                                Progress = dimmableLight.Level,
-                                SleepTime=sleepSpan
-                            };
-                            deviceItemFL.AddChidren(levelSeekBar);
-                            levelSeekBar.ProgressChanged += (send2, e2) =>
-                            {
-                                dimmableLight.SetLevel(levelSeekBar.Progress);
-                            };
+                        var levelSeekBar = new HorizontalSeekBar()
+                        {
+                            X = deviceIMG.Right + Application.GetRealWidth(50),
+                            Width = Application.GetRealWidth(500),
+                            Height = Application.GetRealHeight(80),
+                            Gravity = Gravity.CenterVertical,
+                            BackgroundColor = ZigbeeColor.Current.GXCSliderUnSelectedColor,
+                            ThumbColor = ZigbeeColor.Current.GXCButtonBlueColor,
+                            BorderColor = ZigbeeColor.Current.GXCButtonBlueColor,
+                            ProgressColor = ZigbeeColor.Current.GXCButtonBlueColor,
+                            Max = 254,
+                            Tag = "LevelSeekBar",
+                            Progress = dimmableLight.Level,
+                            SleepTime = sleepSpan
+                        };
+                        deviceItemFL.AddChidren(levelSeekBar);
+                        levelSeekBar.ProgressChanged += (send2, e2) =>
+                        {
+                            dimmableLight.SetLevel(levelSeekBar.Progress);
+                        };
 
-                            var collectionBtn = new Button()
+                        var collectionBtn = new Button()
+                        {
+                            X = deviceItemFL.Right - Application.GetRealWidth(150),
+                            Y = Application.GetRealHeight(20),
+                            Width = Application.GetMinRealAverage(80),
+                            Height = Application.GetMinRealAverage(80),
+                            UnSelectedImagePath = "Item/Collection.png",
+                            SelectedImagePath = "Item/CollectionSelected.png",
+                            Tag = device
+                        };
+                        //***鍏堥殣钘�******
+                        //deviceItemFL.AddChidren(collectionBtn);
+                        var switchBtnBG = new Button
+                        {
+                            X = deviceItemFL.Right - Application.GetRealWidth(250),
+                            Width = Application.GetMinRealAverage(250),
+                            Height = Application.GetMinRealAverage(250),
+                            Gravity = Gravity.CenterVertical
+                        };
+                        deviceItemFL.AddChidren(switchBtnBG);
+                        var switchBtn = new Button
+                        {
+                            X = deviceItemFL.Right - Application.GetRealWidth(200),
+                            //Y = deviceItemFL.Bottom - Application.GetRealHeight(120),
+                            Width = Application.GetMinRealAverage(183),
+                            Height = Application.GetMinRealAverage(123),
+                            UnSelectedImagePath = "Item/Switch.png",
+                            SelectedImagePath = "Item/SwitchSelected.png",
+                            IsSelected = dimmableLight.OnOffStatus == 1,
+                            Tag = deviceStatus_OnOffStatus,
+                            //Visible=false
+                            Gravity = Gravity.CenterVertical
+                        };
+                        deviceItemFL.AddChidren(switchBtn);
+                        switchBtn.MouseUpEventHandler += (send2, e2) =>
+                        {
+                            switchBtn.IsSelected = !switchBtn.IsSelected;
+                            if (switchBtn.IsSelected == true)
                             {
-                                X = deviceItemFL.Right - Application.GetRealWidth(150),
-                                Y = Application.GetRealHeight(20),
-                                Width = Application.GetMinRealAverage(80),
-                                Height = Application.GetMinRealAverage(80),
-                                UnSelectedImagePath = "Item/Collection.png",
-                                SelectedImagePath = "Item/CollectionSelected.png",
-                                Tag = device
-                            };
-                            //***鍏堥殣钘�******
-                            //deviceItemFL.AddChidren(collectionBtn);
-                            var switchBtn = new Button
-                            {
-                                X = deviceItemFL.Right - Application.GetRealWidth(200),
-                                //Y = deviceItemFL.Bottom - Application.GetRealHeight(120),
-                                Width = Application.GetMinRealAverage(183),
-                                Height = Application.GetMinRealAverage(123),
-                                UnSelectedImagePath = "Item/Switch.png",
-                                SelectedImagePath = "Item/SwitchSelected.png",
-                                IsSelected = dimmableLight.OnOffStatus == 1,
-                                Tag = deviceStatus_OnOffStatus,
-                                //Visible=false
-                                Gravity = Gravity.CenterVertical
-                            };
-                            deviceItemFL.AddChidren(switchBtn);
-                            switchBtn.MouseUpEventHandler += (send2, e2) =>
-                            {
-                                switchBtn.IsSelected = !switchBtn.IsSelected;
-                                if (switchBtn.IsSelected == true)
-                                {
                                     //zbGateway = device.CommonDevice.Gateway;
                                     //sendedControlCommand = false;
                                     //zbGateway.ReportAction += UpdateDeviceControllStatu;
@@ -2344,19 +2564,19 @@
                                     //鎺у埗寤舵椂鍥炶皟
                                     //DeviceUI.SendCommandDelayAction(device.CommonDevice, () =>
                                     //{
-                                        //if (Parent == null)
-                                        //{
-                                        //    return;
-                                        //}
-                                        //RemoveUpdateControlDeviceStatuAction(zbGateway);
-                                        //if (sendedControlCommand == false)
-                                        //{
-                                        //    DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
-                                        //}
+                                    //if (Parent == null)
+                                    //{
+                                    //    return;
+                                    //}
+                                    //RemoveUpdateControlDeviceStatuAction(zbGateway);
+                                    //if (sendedControlCommand == false)
+                                    //{
+                                    //    DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
+                                    //}
                                     //});
                                 }
-                                else
-                                {
+                            else
+                            {
                                     //zbGateway = device.CommonDevice.Gateway;
                                     //sendedControlCommand = false;
                                     //zbGateway.ReportAction += UpdateDeviceControllStatu;
@@ -2378,87 +2598,83 @@
                                     //    }
                                     //});
                                 }
-                            };
+                        };
 
-                            var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
-                            {
-                                Tag = device,
-                                IsMoreLines = true
-                            };
-                            if (Room.CurrentRoom.IsLove)
-                            {
-                                deleteBtn.TextID = R.MyInternationalizationString.CancelCollect;
-                                deleteBtn.BackgroundColor = ZigbeeColor.Current.GXCCancelCollectionBGColor;
-                                deleteBtn.MouseUpEventHandler += collectionEvent;
-                                deviceRowLayout.AddRightView(deleteBtn);
-                            }
-                            else if(Room.CurrentRoom.IsSharedRoom)
-                            {
-                                //涓嶅鐞�
-                            }
-                            else
-                            {
-                                deleteBtn.MouseUpEventHandler += delEvent;
-                                deviceRowLayout.AddRightView(deleteBtn);
-                            }
-
-                            EventHandler<MouseEventArgs> dimmableLightHandler = (sender, e) =>
-                            {
-                                var dimmableLightControl = new Phone.Device.Light.DimmableLightControl();
-                                UserView.HomePage.Instance.AddChidren(dimmableLightControl);
-                                UserView.HomePage.Instance.PageIndex += 1;
-                                UserView.HomePage.Instance.ScrollEnabled = false;
-                                dimmableLightControl.action = RefreshBodyView;
-                                dimmableLightControl.Show(device, Room.CurrentRoom);
-                            };
-                            deviceItemFL.MouseLongEventHandler += dimmableLightHandler;
-                           deviceItemFL.MouseUpEventHandler += dimmableLightHandler;
-                           deviceName.MouseUpEventHandler += dimmableLightHandler;
-                            deviceIMG.MouseUpEventHandler += dimmableLightHandler;
-
-                            //collectionBtn.MouseUpEventHandler += (sender, e) =>
-                            //{
-                            //    if (collectionBtn.IsSelected)
-                            //    {
-                            //        Room.Lists[0].DeleteDevice(device.FilePath);
-                            //        collectionBtn.IsSelected = false;
-                            //        if(Room.CurrentRoom==Room.Lists[0])
-                            //        {
-                            //            RefreshBodyView();
-                            //        }
-                            //    }
-                            //    else
-                            //    {
-                            //        Room.Lists[0].AddDevice(device.FilePath);
-                            //        collectionBtn.IsSelected = true;
-                            //    }
-                            //    //RefreshBodyView();
-                            //};
-                            collectionBtn.MouseUpEventHandler += collectionEvent;
-
-                            //var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FilePath);
-                            //if (dev == null)
-                            //{
-                            //    collectionBtn.IsSelected = false;
-                            //}
-                            //else
-                            //{
-                            //    collectionBtn.IsSelected = true;
-                            //}
-                        }
-                        else if (device.CommonDevice.Type == DeviceType.OnOffSwitch)
+                        var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
                         {
-                            //鎸夐敭
-                            var panel = (Panel)device.CommonDevice;
-
+                            Tag = device,
+                            IsMoreLines = true
+                        };
+                        if (Room.CurrentRoom.IsLove)
+                        {
+                            deleteBtn.TextID = R.MyInternationalizationString.CancelCollect;
+                            deleteBtn.BackgroundColor = ZigbeeColor.Current.GXCCancelCollectionBGColor;
+                            deleteBtn.MouseUpEventHandler += collectionEvent;
+                            deviceRowLayout.AddRightView(deleteBtn);
                         }
+                        else if (Room.CurrentRoom.IsSharedRoom)
+                        {
+                            //涓嶅鐞�
+                        }
+                        else
+                        {
+                            deleteBtn.MouseUpEventHandler += delEvent;
+                            deviceRowLayout.AddRightView(deleteBtn);
+                        }
+
+                        EventHandler<MouseEventArgs> dimmableLightHandler = (sender, e) =>
+                        {
+                            var dimmableLightControl = new Phone.Device.Light.DimmableLightControl();
+                            UserView.HomePage.Instance.AddChidren(dimmableLightControl);
+                            UserView.HomePage.Instance.PageIndex += 1;
+                            UserView.HomePage.Instance.ScrollEnabled = false;
+                            dimmableLightControl.action = RefreshBodyView;
+                            dimmableLightControl.Show(device, Room.CurrentRoom);
+                        };
+                        //deviceItemFL.MouseLongEventHandler += dimmableLightHandler;
+                        deviceItemFL.MouseUpEventHandler += dimmableLightHandler;
+                        deviceName.MouseUpEventHandler += dimmableLightHandler;
+                        deviceIMG.MouseUpEventHandler += dimmableLightHandler;
+
+                        //collectionBtn.MouseUpEventHandler += (sender, e) =>
+                        //{
+                        //    if (collectionBtn.IsSelected)
+                        //    {
+                        //        Room.Lists[0].DeleteDevice(device.FilePath);
+                        //        collectionBtn.IsSelected = false;
+                        //        if(Room.CurrentRoom==Room.Lists[0])
+                        //        {
+                        //            RefreshBodyView();
+                        //        }
+                        //    }
+                        //    else
+                        //    {
+                        //        Room.Lists[0].AddDevice(device.FilePath);
+                        //        collectionBtn.IsSelected = true;
+                        //    }
+                        //    //RefreshBodyView();
+                        //};
+                        collectionBtn.MouseUpEventHandler += collectionEvent;
+
+                        //var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FilePath);
+                        //if (dev == null)
+                        //{
+                        //    collectionBtn.IsSelected = false;
+                        //}
+                        //else
+                        //{
+                        //    collectionBtn.IsSelected = true;
+                        //}
+                    }
+                    else if (device.CommonDevice.Type == DeviceType.OnOffSwitch)
+                    {
+                        //鎸夐敭
+                        var panel = (Panel)device.CommonDevice;
+
                     }
                 }
             }
-            else
-            {
-                ShowNoGatewayTip();
-            }
+
         }
 
         #endregion
@@ -2486,97 +2702,95 @@
         /// </summary>
         private void ShowScene()
         {
-            if (CanBindGateway() == false)
+            //閫夋嫨鍦烘櫙
+            var sceneList = Room.CurrentRoom.SceneUIList;
+            if (sceneList == null)
             {
-                //閫夋嫨鍦烘櫙
-                var sceneList = Room.CurrentRoom.SceneUIList;
-                if (sceneList == null)
+                return;
+            }
+            if (sceneList.Count == 0)
+            {
+                ShowNoSceneTip();
+            }
+            else
+            {
+                var sceneScrolView = new VerticalScrolViewLayout { };
+                functionSceneBodyView.AddChidren(sceneScrolView);
+                foreach (var scene in sceneList)
                 {
-                    return;
-                }
-                if (sceneList.Count == 0)
-                {
-                    ShowNoSceneTip();
-                }
-                else
-                {
-                    var sceneScrolView = new VerticalScrolViewLayout { };
-                    functionSceneBodyView.AddChidren(sceneScrolView);
-                    foreach (var scene in sceneList)
+                    if (scene == null)
                     {
-                        if (scene == null)
-                        {
-                            continue;
-                        }
-                        var sceneFL = new FrameLayout()
-                        {
-                            Height = Application.GetRealHeight(400),
-                            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                            Tag = scene
-                        };
-                        sceneScrolView.AddChidren(sceneFL);
-                        var sceneRowLayout = new RowLayout()
-                        {
-                            Y = Application.GetRealHeight(30),
-                            Height = Application.GetRealHeight(400 - 10 - 30),
-                            LineColor = ZigbeeColor.Current.GXCBackgroundColor,
-                            Radius = CommonPage.BigFormRadius
-                        };
-                        sceneFL.AddChidren(sceneRowLayout);
-                        var sceneItemFL = new FrameLayout()
-                        {
-                            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
-                            Radius = CommonPage.BigFormRadius
-                        };
-                        sceneRowLayout.AddChidren(sceneItemFL);
-                        var sceneImg = new Button()
-                        {
-                            UnSelectedImagePath = scene.IconPath,
-                            Radius = CommonPage.BigFormRadius
-                        };
-                        sceneItemFL.AddChidren(sceneImg);
-                        var hardBlackBG = new Button()
-                        {
-                            BackgroundColor = ZigbeeColor.Current.GXCBlack70Color,
-                            SelectedBackgroundColor = ZigbeeColor.Current.GXCBlack80Color,
-                            Radius = CommonPage.BigFormRadius
-                        };
-                        sceneItemFL.AddChidren(hardBlackBG);
-                        var sceneNameBtn = new Button()
-                        {
-                            Text = scene.Name,
-                            TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                            TextSize = 20
-                        };
-                        sceneItemFL.AddChidren(sceneNameBtn);
-                        //缂栬緫
-                        var editBtn = new Device.CommonForm.RowLayoutEditButton
-                        {
-                            TextID = R.MyInternationalizationString.Edit,
-                            Tag = scene
-                        };
-                        //鍒犻櫎
-                        var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
-                        {
-                            Tag = scene
-                        };
-                        if (!Room.CurrentRoom.IsSharedRoom)
-                        {
-                            sceneRowLayout.AddRightView(editBtn);
-                            sceneRowLayout.AddRightView(deleteBtn);
-                        }
+                        continue;
+                    }
+                    var sceneFL = new FrameLayout()
+                    {
+                        Height = Application.GetRealHeight(400),
+                        BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                        Tag = scene
+                    };
+                    sceneScrolView.AddChidren(sceneFL);
+                    var sceneRowLayout = new RowLayout()
+                    {
+                        Y = Application.GetRealHeight(30),
+                        Height = Application.GetRealHeight(400 - 10 - 30),
+                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
+                        Radius = CommonPage.BigFormRadius
+                    };
+                    sceneFL.AddChidren(sceneRowLayout);
+                    var sceneItemFL = new FrameLayout()
+                    {
+                        BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+                        Radius = CommonPage.BigFormRadius
+                    };
+                    sceneRowLayout.AddChidren(sceneItemFL);
+                    var sceneImg = new Button()
+                    {
+                        UnSelectedImagePath = scene.IconPath,
+                        Radius = CommonPage.BigFormRadius
+                    };
+                    sceneItemFL.AddChidren(sceneImg);
+                    var hardBlackBG = new Button()
+                    {
+                        BackgroundColor = ZigbeeColor.Current.GXCBlack70Color,
+                        SelectedBackgroundColor = ZigbeeColor.Current.GXCBlack80Color,
+                        Radius = CommonPage.BigFormRadius
+                    };
+                    sceneItemFL.AddChidren(hardBlackBG);
+                    var sceneNameBtn = new Button()
+                    {
+                        Text = scene.Name,
+                        TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+                        TextSize = 20
+                    };
+                    sceneItemFL.AddChidren(sceneNameBtn);
+                    //缂栬緫
+                    var editBtn = new Device.CommonForm.RowLayoutEditButton
+                    {
+                        TextID = R.MyInternationalizationString.Edit,
+                        Tag = scene
+                    };
+                    //鍒犻櫎
+                    var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
+                    {
+                        Tag = scene
+                    };
+                    if (!Room.CurrentRoom.IsSharedRoom)
+                    {
+                        sceneRowLayout.AddRightView(editBtn);
+                        sceneRowLayout.AddRightView(deleteBtn);
+                    }
 
-                        EventHandler<MouseEventArgs> sceneDownHandler = (sender, e) =>
-                        {
-                            hardBlackBG.IsSelected = true;
-                        };
-                        sceneNameBtn.MouseDownEventHandler += sceneDownHandler;
-                        hardBlackBG.MouseDownEventHandler += sceneDownHandler;
+                    EventHandler<MouseEventArgs> sceneDownHandler = (sender, e) =>
+                    {
+                        hardBlackBG.IsSelected = true;
+                    };
+                    sceneNameBtn.MouseDownEventHandler += sceneDownHandler;
+                    hardBlackBG.MouseDownEventHandler += sceneDownHandler;
 
-                        //璋冪敤鍦烘櫙
-                        EventHandler<MouseEventArgs> sceneUpHandler = async (sender, e) =>
-                        {
-                            hardBlackBG.IsSelected = false;
+                    //璋冪敤鍦烘櫙
+                    EventHandler<MouseEventArgs> sceneUpHandler = async (sender, e) =>
+                    {
+                        hardBlackBG.IsSelected = false;
                             //1鎴愬姛 0澶辫触
                             //鍚庨潰琛ヤ笂鐩稿叧鎻愮ず
                             // Error鍙傛暟鍚箟
@@ -2586,74 +2800,70 @@
                             //<para>4锛氬叾浠栭敊璇�</para>
                             //<para>5锛氭暟鎹紶杈撻敊璇紙鍦ㄦ煇娆″鎴风鍚戠綉鍏冲彂閫佹暟鎹殑杩囩▼涓紝缃戝叧鍦ㄥ悎鐞嗘椂闂磋寖鍥村唴鎺ユ敹瀹㈡埛绔暟鎹笉瀹屾暣瀵艰嚧璇ラ敊璇彂鐢熴�傚瀹㈡埛绔悜缃戝叧涓�娆″彂閫�100涓瓧鑺傜殑鏁版嵁锛屼絾缃戝叧绛夊緟鎺ユ敹浜嗕竴绉掑彧鎺ユ敹浜�80涓瓧鑺傘�傚彂鐢熻閿欒锛岀綉鍏冲皢涓诲姩鍏抽棴瀹㈡埛绔繛鎺ワ級</para>
                             var sceneOpenAllData = await ZigBee.Device.Scene.ControlSceneAsync(scene.Id, 0);
-                            if (sceneOpenAllData == null || sceneOpenAllData.sceneOpenData == null)
+                        if (sceneOpenAllData == null || sceneOpenAllData.sceneOpenData == null)
+                        {
+                            return;
+                        }
+                        if (sceneOpenAllData.sceneOpenData.Result == 0)
+                        {
+                            if (sceneOpenAllData.errorResponData == null)
                             {
                                 return;
                             }
-                            if (sceneOpenAllData.sceneOpenData.Result == 0)
+                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.ControlSceneFail);
+                        }
+                    };
+                    sceneNameBtn.MouseUpEventHandler += sceneUpHandler;
+                    hardBlackBG.MouseUpEventHandler += sceneUpHandler;
+
+                    //缂栬緫鍦烘櫙
+                    EventHandler<MouseEventArgs> editEvent = (sender, e) =>
+                    {
+                        SceneRoomUI.EditScene(scene, Room.CurrentRoom);
+                    };
+                    editBtn.MouseUpEventHandler += editEvent;
+
+                    //鍒犻櫎鍦烘櫙
+                    EventHandler<MouseEventArgs> delEvent = (sender, e) =>
+                    {
+                        var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ConfirmDelete), Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim));
+                        alert.Show();
+                        alert.ResultEventHandler += async (send1, e1) =>
+                        {
+                            if (e1)
                             {
-                                if (sceneOpenAllData.errorResponData == null)
+                                    //0 绉婚櫎澶辫触 1 绉婚櫎鎴愬姛 2 娌℃湁璇ュ満鏅�
+                                    var removeSceneAllData = await ZigBee.Device.Scene.DeleteSceneAsync(scene.Id);
+                                if (removeSceneAllData == null || removeSceneAllData.removeSceneData == null)
                                 {
                                     return;
                                 }
-                                CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.ControlSceneFail);
-                            }
-                        };
-                        sceneNameBtn.MouseUpEventHandler += sceneUpHandler;
-                        hardBlackBG.MouseUpEventHandler += sceneUpHandler;
-
-                        //缂栬緫鍦烘櫙
-                        EventHandler<MouseEventArgs> editEvent = (sender, e) =>
-                        {
-                            SceneRoomUI.EditScene(scene, Room.CurrentRoom);
-                        };
-                        editBtn.MouseUpEventHandler += editEvent;
-
-                        //鍒犻櫎鍦烘櫙
-                        EventHandler<MouseEventArgs> delEvent = (sender, e) =>
-                        {
-                            var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ConfirmDelete), Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim));
-                            alert.Show();
-                            alert.ResultEventHandler += async (send1, e1) =>
-                            {
-                                if (e1)
+                                if (removeSceneAllData.removeSceneData.Result == 1)
                                 {
-                                    //0 绉婚櫎澶辫触 1 绉婚櫎鎴愬姛 2 娌℃湁璇ュ満鏅�
-                                    var removeSceneAllData = await ZigBee.Device.Scene.DeleteSceneAsync(scene.Id);
-                                    if (removeSceneAllData == null || removeSceneAllData.removeSceneData == null)
-                                    {
-                                        return;
-                                    }
-                                    if (removeSceneAllData.removeSceneData.Result == 1)
-                                    {
                                         //1鎴愬姛
                                         Room.CurrentRoom.RemoveScene(scene);
                                         //RefreshBodyView();
                                         sceneScrolView.RemoveViewByTag((sender as Button).Tag);
-                                    }
-                                    else if (removeSceneAllData.removeSceneData.Result == 0)
-                                    {
+                                }
+                                else if (removeSceneAllData.removeSceneData.Result == 0)
+                                {
                                         //0 绉婚櫎澶辫触
                                         CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.DeleteSceneFail);
-                                    }
-                                    else if (removeSceneAllData.removeSceneData.Result == 2)
-                                    {
+                                }
+                                else if (removeSceneAllData.removeSceneData.Result == 2)
+                                {
                                         //2 娌℃湁璇ュ満鏅�
                                         Room.CurrentRoom.RemoveScene(scene);
                                         //RefreshBodyView();
                                         sceneScrolView.RemoveViewByTag((sender as Button).Tag);
-                                    }
                                 }
-                            };
+                            }
                         };
-                        deleteBtn.MouseUpEventHandler += delEvent;
-                    }
+                    };
+                    deleteBtn.MouseUpEventHandler += delEvent;
                 }
             }
-            else
-            {
-                ShowNoGatewayTip();
-            }
+
         }
 
         #endregion
@@ -2671,6 +2881,7 @@
                 new System.Threading.Thread(async () =>
                  {
                      Config.Instance.HomeId = home.Id;
+                     Config.Instance.Home = House.GetHouseByFilePath(home.FileName);
                      Global.CreateHomeDirectory(home.Id);
                      Config.Instance.Save();
                      //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
diff --git a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
index 3849b40..aaa7ee1 100755
--- a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using Shared.Common;
 using ZigBee.Device;
+using Shared.Phone.Device.AC;
 
 namespace Shared.Phone.UserView
 {
@@ -20,25 +21,25 @@
         /// </summary>
         private static readonly int tabBarEnum_Width = CommonPage.AppRealWidth / 3;
         /// <summary>
-        /// 搴曢儴鎸夐挳鍥剧墖鐨勯珮搴�-110
+        /// 搴曢儴鎸夐挳鍥剧墖鐨勯珮搴�
         /// </summary>
-        private static readonly int tabBarEnumIMG_Height = 110;
+        private static readonly int tabBarEnumIMG_Height = 98;
         /// <summary>
-        /// 搴曢儴鎸夐挳鍥剧墖鐨勫搴�-110
+        /// 搴曢儴鎸夐挳鍥剧墖鐨勫搴�
         /// </summary>
-        private static readonly int tabBarEnumIMG_Width = 110;
+        private static readonly int tabBarEnumIMG_Width = 138;
         /// <summary>
-        /// 搴曢儴鎸夐挳鍥剧墖鐨刌鍊� -5
+        /// 搴曢儴鎸夐挳鍥剧墖鐨刌鍊�
         /// </summary>
-        private static readonly int tabBarEnumIMG_Y = 5;
+        private static readonly int tabBarEnumIMG_Y = 3;
         /// <summary>
-        /// 搴曢儴鎸夐挳鏂囧瓧鐨勯珮搴� -50
+        /// 搴曢儴鎸夐挳鏂囧瓧鐨勯珮搴�
         /// </summary>
-        private static readonly int tabBarEnumName_Height = 50;
+        private static readonly int tabBarEnumName_Height = 40;
         /// <summary>
-        /// 搴曢儴鎸夐挳鏂囧瓧鐨刌鍊� 100
+        /// 搴曢儴鎸夐挳鏂囧瓧鐨刌鍊�
         /// </summary>
-        private static readonly int tabBarEnumName_Y = tabBarEnumIMG_Height - 10;
+        private static readonly int tabBarEnumName_Y = 104;
         #endregion
 
         #region 鈼� 鎺ュ彛____________________________
@@ -138,6 +139,23 @@
                                 break;
 
                             case DeviceType.WindowCoveringDevice:
+                                if ((common as ZigBee.Device.Rollershade).DeviceStatusReport.CluterID == 258)
+                                {
+                                    var rollershade = deviceUI.CommonDevice as ZigBee.Device.Rollershade;
+                                    rollershade.DeviceStatusReport = (common as ZigBee.Device.Rollershade).DeviceStatusReport;
+                                    var attriButeList = rollershade.DeviceStatusReport.AttriBute;
+                                    if (attriButeList == null || attriButeList.Count == 0)
+                                    {
+                                        continue;
+                                    }
+                                    switch (attriButeList[0].AttributeId)
+                                    {
+                                        case 0:
+                                            rollershade.WcdType = attriButeList[0].AttriButeData;
+                                            rollershade.LastDateTime = DateTime.Now;
+                                            break;
+                                    }
+                                }
                                 if ((common as ZigBee.Device.Rollershade).DeviceStatusReport.CluterID == 3)
                                 {
                                     var rollershade = deviceUI.CommonDevice as ZigBee.Device.Rollershade;
@@ -175,6 +193,12 @@
                                         case 18:
                                             //姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勫埗鐑俯搴︼紝瀹為檯娓╁害涓衡�淗eatingSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
                                             ac.currentHeatingSetpoint = attriButeList[0].AttriButeData / 100;
+                                            ac.LastDateTime = DateTime.Now;
+                                            break;
+
+                                        case 4096:
+                                            //姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勮嚜鍔ㄦ俯搴︼紝瀹為檯娓╁害涓衡�淎utoSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
+                                            ac.currentAutoSetpoint = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
                                             ac.LastDateTime = DateTime.Now;
                                             break;
 
@@ -368,8 +392,18 @@
         {
             Y = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.TabbarHeight),
             Height = Application.GetRealHeight(CommonPage.TabbarHeight),
-            BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCTopViewBackgroundColor,
+            BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCBottomColor,
         };
+
+        #region 鍒嗗壊绾�
+
+        private Button bottomLine = new Button
+        {
+            Height = 1,
+            BackgroundColor = ZigbeeColor.Current.GXCBottomLineColor
+        };
+
+        #endregion
 
         #region 搴曢儴-涓婚〉鎸夐挳
         /// <summary>
@@ -402,10 +436,11 @@
             Y = Application.GetRealHeight(tabBarEnumName_Y),
             Height = Application.GetRealHeight(tabBarEnumName_Height),
             TextID = R.MyInternationalizationString.HomePage,
-            TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor,
-            SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlueColor,
+            TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor,
+            SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2,
             IsSelected = true,
-            Gravity = Gravity.CenterHorizontal
+            Gravity = Gravity.CenterHorizontal,
+            TextSize = 10
         };
         #endregion
 
@@ -439,10 +474,11 @@
             Y = Application.GetRealHeight(tabBarEnumName_Y),
             Height = Application.GetRealHeight(tabBarEnumName_Height),
             TextID = R.MyInternationalizationString.Category,
-            TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor,
-            SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlueColor,
+            TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor,
+            SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2,
             IsSelected = false,
-            Gravity = Gravity.CenterHorizontal
+            Gravity = Gravity.CenterHorizontal,
+            TextSize=10
         };
         #endregion
 
@@ -476,22 +512,14 @@
             Y = Application.GetRealHeight(tabBarEnumName_Y),
             Height = Application.GetRealHeight(tabBarEnumName_Height),
             TextID = R.MyInternationalizationString.Me,
-            TextColor = ZigbeeColor.Current.GXCTextBlackColor,
-            SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor,
+            TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor,
+            SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2,
             IsSelected = false,
-            Gravity = Gravity.CenterHorizontal
+            Gravity = Gravity.CenterHorizontal,
+            TextSize = 10
         };
         #endregion
 
-        #region 鍒嗗壊绾�
-
-        private FrameLayout bottomLine = new FrameLayout
-        {
-            Height = 3,
-            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
-        };
-
-        #endregion
 
         EventHandler<MouseEventArgs> BottomEventHandler = (sender, e) =>
         {
@@ -557,6 +585,8 @@
             AddChidren(BodyView);
             AddChidren(BottomMenuView);
 
+            BottomMenuView.AddChidren(Instance.bottomLine);
+
             Instance.homePageFL.AddChidren(Instance.homePageIMG);
             Instance.homePageFL.AddChidren(Instance.homePageName);
             BottomMenuView.AddChidren(Instance.homePageFL);
@@ -568,8 +598,6 @@
             Instance.settingFL.AddChidren(Instance.settingIMG);
             Instance.settingFL.AddChidren(Instance.settingName);
             BottomMenuView.AddChidren(Instance.settingFL);
-
-            BottomMenuView.AddChidren(Instance.bottomLine);
 
             homePageIMG.MouseUpEventHandler += BottomEventHandler;
             homePageName.MouseUpEventHandler += BottomEventHandler;
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/AC.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/AC.cs
index e76b505..2855c62 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/AC.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/AC.cs
@@ -27,6 +27,11 @@
         public int currentCoolingSetpoint = 0;
 
         /// <summary>
+        /// 褰撳墠鑷姩娓╁害
+        /// </summary>
+        public int currentAutoSetpoint;
+
+        /// <summary>
         ///鎭掓俯璁惧绫诲瀷
         /// <para>鎭掓俯璁惧鍏峰鍔熻兘锛孉ttribute Values濡備笅</para>
         /// <para>0:(Cooling Only) 鏃燞eat鍜孍mergency鍔熻兘</para>
@@ -101,6 +106,16 @@
         public void ReadHeatingSetpoint()
         {
             ReadAttri(Device.Cluster_ID.Thermostat, AttriButeId.HeatingSetpoint);
+        }
+
+
+        /// <summary>
+        /// 鑾峰彇褰撳墠鑷姩搴︽暟.
+        /// <para>AttriButeId=18 (鍏堣皟鐢ㄥ彂鐜板睘鎬ф帴鍙o紝鏌ョ湅璁惧鏄惁鏀寔璇ユ帴鍙g殑灞炴�э級</para>
+        /// </summary>
+        public void ReadAutoSetpoint()
+        {
+            ReadAttri(Device.Cluster_ID.Thermostat, AttriButeId.AutoSetpoint);
         }
 
         /// <summary>
@@ -296,6 +311,84 @@
         }
 
         ///<summary >
+        ///璁剧疆鑷姩搴︽暟.
+        /// </summary>
+        public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetAutoTemperatureAsync(int temperature)
+        {
+            if (Gateway == null)
+            {
+                return null;
+            }
+            return await System.Threading.Tasks.Task.Run(async () =>
+            {
+                SetWritableValueResponAllData d = null;
+                Action<string, string> action = (topic, message) =>
+                {
+                    var gatewayID = topic.Split('/')[0];
+                    var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
+
+                    if (topic == gatewayID + "/" + "Error_Respon")
+                    {
+                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
+                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
+
+                        if (temp == null)
+                        {
+                            d = new SetWritableValueResponAllData { errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" };
+                        }
+                        else
+                        {
+                            d = new SetWritableValueResponAllData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
+                        }
+                    }
+
+                    if (topic == gatewayID + "/" + "SetWritableValue_Respon")
+                    {
+                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
+                        var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetWritableValueResponData>(jobject["Data"].ToString());
+
+                        if (tempData == null)
+                        {
+                            d = new SetWritableValueResponAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
+                        }
+                        else
+                        {
+                            d = new SetWritableValueResponAllData { setWritableValueResponData = tempData };
+                            DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
+                        }
+                    }
+                };
+                Gateway.Actions += action;
+                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", 4096 }, { "AttributeDataType", 41 }, { "AttributeData", (int)temperature } };
+                    jObject.Add("Data", data);
+                    Gateway.Send("SetWritableValue", jObject.ToString());
+                }
+                catch { }
+
+                var dateTime = DateTime.Now;
+                while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
+                {
+                    await System.Threading.Tasks.Task.Delay(10);
+                    if (d != null)
+                    {
+                        break;
+                    }
+                }
+                if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
+                {
+                    d = new SetWritableValueResponAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
+                }
+                Gateway.Actions -= action;
+                DebugPrintLog("SetWritableValue_Actions 閫�鍑�" + System.DateTime.Now.ToString());
+                return d;
+            });
+        }
+
+        ///<summary >
         ///璁剧疆鎭掓俯鍣ㄨ澶囧綋鍓嶅伐浣滄ā寮�.
         /// </summary>
         public async System.Threading.Tasks.Task<SetWritableValueResponAllData> SetSystemModeAsync(AcMode acMode)
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
index d3feb0d..a1b5119 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
@@ -163,6 +163,10 @@
             else if (strDeviceType == ZigBee.Device.DeviceType.DoorLock.ToString())
             {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLock>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.TemperatureSensor.ToString())
+            {
+                return Newtonsoft.Json.JsonConvert.DeserializeObject<TemperatureSensor>(strDeviceByte);
             }
             return null;
         }
@@ -224,6 +228,19 @@
                 {
                     //绌鸿皟
                     IconPath = "Device/AirConditionerEpoint.png";
+                }
+                else if (this.Type == DeviceType.TemperatureSensor)
+                {
+                    if (((TemperatureSensor)this).SensorDiv == 1)
+                    {
+                        //娓╁害浼犳劅鍣�
+                        IconPath = "Device/SensorTemperature.png";
+                    }
+                    else if (((TemperatureSensor)this).SensorDiv == 2)
+                    {
+                        //婀垮害浼犳劅鍣�
+                        IconPath = "Device/SensorHumidity.png";
+                    }
                 }
                 else if (this.Type != DeviceType.UnKown)
                 {
@@ -399,6 +416,10 @@
         /// 搴忓垪鍙�
         /// </summary>
         public string SerialNumber = string.Empty;
+        /// <summary>
+        /// 鏁翠釜璁惧鎵�灞炵殑鍖哄煙ID(鍥犱负璁惧涔熻兘澶熷垎閰嶅尯鍩熶簡)
+        /// </summary>
+        public string DeviceRoomId = string.Empty;
         /// <summary>
         /// 鎵�鏈夋寚瀹歝luster鏄惁閮藉凡缁忔垚鍔熺粦瀹氬崗璋冨櫒
         ///<para>0:鏈畬鍏ㄧ粦瀹�</para>
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs
index cbbb6fa..6ca45a5 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/DeviceType.cs
@@ -77,6 +77,12 @@
         /// <para>瀹氫箟瀵硅薄锛歍ransverter</para>
         /// </summary>
         Transverter = 0xD003,
+        /// <summary>
+        /// <para>娓╂箍搴︿紶鎰熷櫒</para>
+        /// <para>璁惧ID涓�770</para>
+        /// <para>瀹氫箟瀵硅薄锛歍emperatureSensor</para>
+        /// </summary>
+        TemperatureSensor = 770,
     }
 
     /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/Enum.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/Enum.cs
index b0733e1..a5aa9a6 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/Enum.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/Enum.cs
@@ -222,6 +222,11 @@
         HeatingSetpoint = 18,
 
         /// <summary>
+        /// 褰撳墠鑷姩娓╁害
+        /// </summary>
+        AutoSetpoint = 4096,
+
+        /// <summary>
         ///鎭掓俯璁惧绫诲瀷
         ///MinCoolSetpointLimit ~ MaxCoolSetpointLimit
         /// </summary>
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs
index 501f5c3..ec02fdb 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs
@@ -5,50 +5,16 @@
 {
     public class TemperatureSensor: CommonDevice
     {
+        /// <summary>
+        /// 鍥犱负杩欎袱涓笢瑗垮叡鐢ㄥ悓涓�涓澶嘔D锛屾墍浠� 1锛氭俯搴︿紶鎰熷櫒  2:婀垮害浼犳劅鍣�
+        /// </summary>
+        public int SensorDiv = 1;
+
         public TemperatureSensor()
         {
-            //this.Type = DeviceType.TemperatureSensor ;
+            this.Type = DeviceType.TemperatureSensor ;
         }
  
-        /// <summary>
-        /// 褰撳墠娓╁害鍊�
-        /// </summary>
-        public int CurentTemperature = 999;
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int MinTemperature=999;
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int MaxTemperature=999;
-        /// <summary>
-        ///  
-        /// </summary>
-        public int TorleranceTemperature= 999;
-
-        /// <summary>
-        /// 褰撳墠婀垮害鍊�
-        /// </summary>
-        public int CurentHumidity= 999; 
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int MinHumidity= 999;
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int MaxHumidity= 999;
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public int ToleranceHumidity= 999;
-
         /// <summary>
         /// 璇诲彇娓�/婀垮害
         /// </summary>
@@ -56,34 +22,6 @@
         {
             ReadAttri(Device.Cluster_ID.TemperatureMeasurement, AttriButeId.MeasuredValue );
             ReadAttri(Device.Cluster_ID.RelativeHumidityMeasurement, AttriButeId.MeasuredValue);
-
-        }
-
-        /// <summary>
-        /// 娓�/婀垮害涓嬮檺
-        /// </summary>
-        public void ReadMinMeasuredValue()
-        {
-            ReadAttri(Device.Cluster_ID.TemperatureMeasurement, AttriButeId.MinMeasuredValue );
-            ReadAttri(Device.Cluster_ID.RelativeHumidityMeasurement, AttriButeId.MinMeasuredValue);
-        }
-
-        /// <summary>
-        /// 娓�/婀垮害涓婇檺
-        /// </summary>
-        public void ReadMaxMeasuredValue()
-        {
-            ReadAttri(Device.Cluster_ID.TemperatureMeasurement, AttriButeId.MaxMeasuredValue );
-            ReadAttri(Device.Cluster_ID.RelativeHumidityMeasurement, AttriButeId.MaxMeasuredValue);
-        }
-
-        /// <summary>
-        /// 娴嬮噺璇樊
-        /// </summary>
-        public void ReadTolerance()
-        {
-            ReadAttri(Device.Cluster_ID.TemperatureMeasurement, AttriButeId.Tolerance );
-            ReadAttri(Device.Cluster_ID.RelativeHumidityMeasurement, AttriButeId.Tolerance);
         }
     }
 }
diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs
index 1a57db1..23619fa 100755
--- a/ZigbeeApp/Shared/R.cs
+++ b/ZigbeeApp/Shared/R.cs
@@ -89,7 +89,7 @@
         public readonly static int ModeType = 19;
         public readonly static int BindDevice = 20;
         public readonly static int BindScene = 21;
-        public readonly static int Save = 22;
+        //public readonly static int Save = 22;
         public readonly static int RemoveSuccess = 23;
         public readonly static int RemoveFailed = 24;
         public readonly static int ModeConfigureFailed = 25;
@@ -115,7 +115,7 @@
         public readonly static int Ac = 42;
         public readonly static int SneneModeExistTargets = 43;
         //闂ㄩ攣
-        public static readonly int FunctionSetting = 44;
+        //public static readonly int FunctionSetting = 44;
         public static readonly int RandomPasword = 45;
         public static readonly int DoolockMonth = 46;
         public static readonly int DoorlockDay = 47;
@@ -492,29 +492,291 @@
 
 
 
+        #region 鐧诲綍娉ㄥ唽
         /// <summary>
-        /// 鍠滅埍
+        /// HDL Home
         /// </summary>
-        public static readonly int Favorite = 10000;
+        public const int AppName = 10000;
 
-        public static readonly int RequestServerFailed = 10003;
-        public static readonly int OK = 10005;
 
-        public static readonly int AccountOrPasswordCanNotBeEmpty = 10006;
-        public static readonly int AccountHasBeenRegistered = 10007;
-        public static readonly int IncorrectMailboxformat = 10008;
-        public static readonly int PasswordLengthIsLessThanSix = 10009;
+        /// <summary>
+        /// 鎵嬫満鍙�
+        /// </summary>
+        public const int PhoneNum = 10100;
+        /// <summary>
+        /// 閭
+        /// </summary>
+        public const int Email = 10101;
+        /// <summary>
+        /// 璇疯緭鍏ユ墜鏈哄彿
+        /// </summary>
+        public const int PleaseInputPhoneNum = 10102;
+        /// <summary>
+        /// 璇疯緭鍏ヤ笉灏戜簬6浣嶇殑瀵嗙爜
+        /// </summary>
+        public const int PleaseInputPWD = 10103;
+        /// <summary>
+        /// 鐧诲綍
+        /// </summary>
+        public const int Login = 10104;
+        /// <summary>
+        /// 楠岃瘉鐮佺櫥褰�
+        /// </summary>
+        public const int LoginByCode = 10105;
+        /// <summary>
+        /// 娉ㄥ唽鐢ㄦ埛
+        /// </summary>
+        public const int Register = 10106;
+        /// <summary>
+        /// 璇疯緭鍏ラ偖绠�
+        /// </summary>
+        public const int PleaseInputEmail = 10107;
+        /// <summary>
+        /// 鎼滅储
+        /// </summary>
+        public const int Search = 10108;
+        /// <summary>
+        /// 纭畾
+        /// </summary>
+        public const int Complete = 10109;
+        /// <summary>
+        /// 璐﹀彿鐧诲綍
+        /// </summary>
+        public const int LoginByAccountPWD = 10110;
+        /// <summary>
+        /// 鍙戦�侀獙璇佺爜
+        /// </summary>
+        public const int SendVerificationCode = 10111;
+        /// <summary>
+        /// 鍚庨噸鍙�
+        /// </summary>
+        public const int SendVerificationCodeAgain = 10112;
+        /// <summary>
+        /// 璇峰啀娆¤緭鍏ュ瘑鐮�
+        /// </summary>
+        public const int PleaseComfirePWD = 10113;
+        /// <summary>
+        /// 鍙戦�侀獙璇佺爜鎴愬姛锛岃娉ㄦ剰鏌ユ敹
+        /// </summary>
+        public const int SendVerificationCodeSuccess = 10114;
+        /// <summary>
+        /// 纭畾
+        /// </summary>
+        public const int Confrim = 10115;
+        /// <summary>
+        /// 璇ヨ处鍙峰凡娉ㄥ唽锛屽彲鐩存帴鐧诲綍
+        /// </summary>
+        public const int AccountHasBeenRegistered = 10116;
+        /// <summary>
+        /// 鎻愪緵鐨勫弬鏁伴敊璇�
+        /// </summary>
+        public const int PARAMETEROREMPTY = 10117;
         /// <summary>
         /// 涓ゆ瀵嗙爜涓嶄竴鑷�
         /// </summary>
-        public static readonly int TwoPasswordInconsistency = 10010;
+        public const int TwoPasswordInconsistency = 10118;
+        /// <summary>
+        /// 楠岃瘉鐮侀敊璇�
+        /// </summary>
+        public const int VALIDCODEANDPHONENOEQUAL = 10119;
+        /// <summary>
+        /// 璇锋眰鏈嶅姟鍣ㄥけ璐�
+        /// </summary>
+        public const int RequestServerFailed = 10120;
+        /// <summary>
+        /// 鎭枩娉ㄥ唽鎴愬姛锛�
+        /// </summary>
+        public const int RegisterSuccessTip = 10121;
+        /// <summary>
+        /// 鍗冲皢鑷姩鐧诲綍
+        /// </summary>
+        public const int WillAutoLogin = 10122;
+        /// <summary>
+        /// 蹇樿瀵嗙爜
+        /// </summary>
+        public const int ForgotPWD = 10123;
+        /// <summary>
+        /// 纭閲嶇疆
+        /// </summary>
+        public const int ComfirmReset = 10124;
+        /// <summary>
+        /// 淇敼鎴愬姛
+        /// </summary>
+        public const int ResetSuccess = 10125;
+        /// <summary>
+        /// 浣犵殑瀵嗙爜淇敼鎴愬姛锛岃閲嶆柊鐧诲綍
+        /// </summary>
+        public const int ResetScucessPleaseLogin = 10126;
+
+
+        #endregion
+
+        #region 鍒嗙被
+
+        /// <summary>
+        /// 鍔熻兘
+        /// </summary>
+        public const int Function = 11000;
+        /// <summary>
+        /// 鍦烘櫙
+        /// </summary>
+        public const int Scence = 11001;
+        /// <summary>
+        /// 鑷姩鍖�
+        /// </summary>
+        public const int Automation = 11002;
+
+
+        /// <summary>
+        /// 娌℃湁鍔熻兘 璇峰湪涓汉涓績涓�--璁惧绠$悊澶勬坊鍔�
+        /// </summary>
+        public const int NoFunction = 11010;
+        /// <summary>
+        /// 缂栬緫
+        /// </summary>
+        public const int Edit = 11011;
+        /// <summary>
+        /// 璁剧疆鍔熻兘
+        /// </summary>
+        public const int FunctionSetting = 11012;
+        /// <summary>
+        /// 淇℃伅缂栬緫
+        /// </summary>
+        public const int EditInfo = 11013;
+        /// <summary>
+        /// 鍔熻兘鍚嶇О
+        /// </summary>
+        public const int FunctionName = 11014;
+        /// <summary>
+        /// 鎵�灞炲尯鍩�
+        /// </summary>
+        public const int BelongZone = 11015;
+        /// <summary>
+        /// 鎵�灞炴ā鍧�
+        /// </summary>
+        public const int BelongModel = 11016;
+        /// <summary>
+        /// 鏈煡
+        /// </summary>
+        public const int UNKnown = 11017;
+        /// <summary>
+        /// 鍒嗕韩
+        /// </summary>
+        public const int Share = 11018;
+        /// <summary>
+        /// 鍒嗕韩鐨�
+        /// </summary>
+        public const int Shared = 11019;
+        /// <summary>
+        /// 閫夋嫨鍥炬爣
+        /// </summary>
+        public const int SelectIcon = 11020;
+        /// <summary>
+        /// 淇濆瓨
+        /// </summary>
+        public const int Save = 11021;
+        /// <summary>
+        /// 鎻愮ず
+        /// </summary>
+        public const int TIP = 11022;
+        /// <summary>
+        /// 鍙栨秷
+        /// </summary>
+        public const int Cancel = 11023;
+        /// <summary>
+        /// 娌℃湁鍦烘櫙 \n 璇风偣鍑诲彸涓婅娣诲姞
+        /// </summary>
+        public const int NoScene = 11024;
+        /// <summary>
+        /// 璁剧疆
+        /// </summary>
+        public const int Setting = 11025;
+        /// <summary>
+        /// 瀹氭椂
+        /// </summary>
+        public const int Delay = 11026;
+        /// <summary>
+        /// 纭畾鍒犻櫎鍚楋紵
+        /// </summary>
+        public const int ConfirmDelete = 11027;
+        /// <summary>
+        /// 娣诲姞鍦烘櫙
+        /// </summary>
+        public const int AddScence = 11028;
+        /// <summary>
+        /// 鍦烘櫙鍚嶇О
+        /// </summary>
+        public const int SceneName = 11029;
+        /// <summary>
+        /// 璇疯緭鍏ュ満鏅悕绉�
+        /// </summary>
+        public const int PleaseInputSceneName = 11030;
+        /// <summary>
+        /// 娣诲姞鎵ц鐩爣
+        /// </summary>
+        public const int AddScentTargetAction = 11031;
+        /// <summary>
+        /// 閫夋嫨鍖哄煙
+        /// </summary>
+        public const int SelectZone = 11032;
+        /// <summary>
+        /// 閫夋嫨鍦烘櫙鍥剧墖
+        /// </summary>
+        public const int SelectScenePic = 11033;
+
+
+        #endregion
+
+
+
+        #region 涓婚〉
+
+        /// <summary>
+        /// 鎴块棿鍒楄〃
+        /// </summary>
+        public const int RoomList = 13100;
+
+        /// <summary>
+        /// 閫夋嫨妤煎眰
+        /// </summary>
+        public const int SelectFloor = 13101;
+        /// <summary>
+        /// 閫夋嫨浣忓畢
+        /// </summary>
+        public const int ChangeHome = 13102;
+        /// <summary>
+        /// 鏂扮敤鎴风櫥褰曪紝璇峰厛缁戝畾缃戝叧
+        /// </summary>
+        public const int NewAccountNeedBingGW = 13103;
+        /// <summary>
+        /// 娣诲姞鏅鸿兘缃戝叧
+        /// </summary>
+        public const int AddSmartGW = 13104;
+
+
+        #endregion
+
+
+        /// <summary>
+        /// 鍠滅埍
+        /// </summary>
+        public static readonly int Favorite = 100000;
+
+
+        public static readonly int OK = 10005;
+
+        public static readonly int AccountOrPasswordCanNotBeEmpty = 10006;
+
+        public static readonly int IncorrectMailboxformat = 10008;
+        public static readonly int PasswordLengthIsLessThanSix = 10009;
+        
 
         public static readonly int ThePasswordIsEmpty = 10011;
         public static readonly int PleaseGoToTheMailboxToActivateTheAccountNumber = 10012;
         public static readonly int PleaseInputTheCorrectCellPhoneNumber = 10013;
         public static readonly int PleaseInputTheCorrectVerificationCode = 10014;
         public static readonly int PleaseSelectAreaCode = 10015;
-        public static readonly int LoginByCode = 10016;
+  
         public static readonly int ThePhoneNumberIsNotRegisteredYetPleaseRegisterFirst = 10017;
         public static readonly int LoginCodeError = 10018;
         public static readonly int ThisUserBelongsToDebugAccountAndIsNotEnabled = 10019;
@@ -538,71 +800,69 @@
 
 
         public static readonly int PleaseInputPhoneNumberOrEmail = 11000;
-        public static readonly int PleaseInputPWD = 11001;
+        
         //*****public static readonly int ForgotPassword = 11002;
-        public static readonly int Login = 11003;
-        public static readonly int Register = 11004;
+       
+
         public static readonly int Account = 11005;
         public static readonly int RegisterByPhone = 11006;
         public static readonly int RegisterByEmail = 11007;
         public static readonly int LoginHadAccountPWD = 11008;
-        public static readonly int PleaseInputPhoneNum = 11009;
-        public static readonly int PleaseComfirePWD = 11010;
+
+  
         public static readonly int PleaseInputVerificationCode = 11011;
-        public static readonly int SendVerificationCode = 11012;
-        public static readonly int TIP = 11013;
-        public static readonly int SendVerificationCodeSuccess = 11014;
+
+
+
         public static readonly int BackToLogin = 11015;
-        public static readonly int PleaseInputEmail = 11016;
+
         public static readonly int FindPWDByPhone = 11017;
         public static readonly int FindPWDByEmail = 11018;
         public static readonly int PleaseInputThePhoneAndYouWillHaveVerificationCode = 11019;
         public static readonly int PleaseInputTheEmailAndYouWillHaveVerificatoinCode = 11020;
         public static readonly int ResetPWD = 11021;
         public static readonly int ResetPWDSuccessPleaseLoginAgain = 11022;
-        public static readonly int LoginByAccountPWD = 11023;
+
         public static readonly int Logining = 11024;
-        public static readonly int RoomList = 11025;
+
         public static readonly int AddRoom = 11026;
         public static readonly int RoomName = 11027;
-        public static readonly int Cancel = 11028;
-        public static readonly int Confrim = 11029;
-        public static readonly int Complete = 11030;
+
+
         public static readonly int SettingContent = 11031;
         public static readonly int PleaseInputRoomName = 11032;
         public static readonly int LocalPic = 11033;
         public static readonly int TakePhoto = 11034;
         public static readonly int SystemPic = 11035;
-        public static readonly int SelectPic = 11036;
+
         public static readonly int HadSameRoom = 11037;
         //*****public static readonly int Function = 11038;
-        public static readonly int Scence = 11039;
+
         public static readonly int EditRoom = 11040;
         public static readonly int Delete = 11041;
         public static readonly int AddFunction = 11042;
-        public static readonly int AddScence = 11043;
+
         public static readonly int Light = 11044;
         public static readonly int AddLight = 11045;
         public static readonly int DropLight = 11046;
         public static readonly int DownLight = 11047;
         public static readonly int SpotLight = 11048;
         public static readonly int DeviceName = 11049;
-        public static readonly int BelongZone = 11050;
-        public static readonly int Shared = 11051;
+
+
         public static readonly int ConfirmAdd = 11052;
-        public static readonly int BelongModel = 11053;
+
         public static readonly int Add = 11054;
         public static readonly int DeviceSetting = 11055;
-        public static readonly int PleaseInputSceneName = 11056;
-        public static readonly int AddRoomScentTargetAction = 11057;
+
         public static readonly int AddDeviceSuccess = 11058;
         public static readonly int Close = 11059;
         public static readonly int Device = 11060;
-        public static readonly int NoFunction = 11061;
+  
         public static readonly int ConfirmDeleteThisRoom = 11062;
-        public static readonly int ConfirmDelete = 11063;
-        public static readonly int NoScene = 11064;
-        public static readonly int Automation = 11065;
+
+  
+ 
 
 
 
@@ -619,8 +879,8 @@
         public static readonly int ThisSceneHadTheDevice = 11076;
         public static readonly int SceneNameCannotBeNull = 11077;
         public static readonly int ModifyScene = 11078;
-        public static readonly int SceneName = 11079;
-        public static readonly int ChangeHome = 11080;
+
+
         /// <summary>
         /// 鏈縺娲�
         /// </summary>
@@ -641,14 +901,8 @@
         /// 璐﹀彿涓嶅瓨鍦紝璇峰厛娉ㄥ唽
         /// </summary>
         public static readonly int ACCOUNTNOEXISTS = 11085;
-        /// <summary>
-        /// 鎻愪緵鐨勫弬鏁伴敊璇�
-        /// </summary>
-        public static readonly int PARAMETEROREMPTY = 11086;
-        /// <summary>
-        /// 楠岃瘉鐮侀敊璇�
-        /// </summary>
-        public static readonly int VALIDCODEANDPHONENOEQUAL = 11087;
+
+       
         public static readonly int YourPWDIsTooSample = 11088;
         public static readonly int PleaseInputTheCorrectEmail = 11089;
         /// <summary>
@@ -682,7 +936,6 @@
         /// </summary>
         public static readonly int Custom = 11098;
 
-        public static readonly int Delay = 11100;
         /// <summary>
         /// 鍙栨秷鏀惰棌
         /// </summary>
@@ -696,10 +949,7 @@
         /// </summary>
         public static readonly int Percent = 11103;
         public static readonly int Success = 11104;
-        /// <summary>
-        /// 鏈煡
-        /// </summary>
-        public static readonly int UNKnown = 11105;
+      
         /// <summary>
         /// The please confirm new password.
         /// </summary>
@@ -800,10 +1050,7 @@
         /// 鎮ㄧ殑璐﹀彿宸插湪鍙︿竴鍙拌澶囩櫥褰曪紝鎮ㄥ凡琚己鍒朵笅绾�
         /// </summary>
         public static readonly int YouHaveBeenSignOut = 12030;
-        /// <summary>
-        /// 缂栬緫
-        /// </summary>
-        public static readonly int Edit = 12031;
+   
         /// <summary>
         /// 鍦烘櫙涓凡鍖呭惈璇ュ満鏅�
         /// </summary>
@@ -1202,7 +1449,7 @@
         /// <summary>
         /// 鍔熻兘
         /// </summary>
-        public const int Function = 15070;
+        public const int uFunction = 15070;
         /// <summary>
         /// 鐏厜
         /// </summary>
@@ -1680,9 +1927,9 @@
         /// </summary>
         public const int uDeviceNotAssignedRoom = 15199;
         /// <summary>
-        /// 娣诲姞浣忓畢
+        /// 鍒涘缓浣忓畢
         /// </summary>
-        public const int uAddResidence = 15200;
+        public const int uCreatResidence = 15200;
         /// <summary>
         /// 缂栬緫浣忓畢
         /// </summary>
@@ -3627,6 +3874,87 @@
         /// 娌℃湁璁剧疆瀵嗙爜楠岃瘉
         /// </summary>
         public const int uPasswordAuthenticationNotSettion = 15751;
+        /// <summary>
+        /// 褰撳墠浣忓畢
+        /// </summary>
+        public const int uNowResidence = 15752;
+        /// <summary>
+        /// 鍒囨崲
+        /// </summary>
+        public const int uSwitch1 = 15753;
+        /// <summary>
+        /// 鏇存敼
+        /// </summary>
+        public const int uChanged1 = 15754;
+        /// <summary>
+        /// 鏇存敼鍚嶇О
+        /// </summary>
+        public const int uChangedName = 15755;
+        /// <summary>
+        /// 纭鍒囨崲褰撳墠浣忓畢鍒般�寋0}銆�?
+        /// </summary>
+        public const int uSwitchResidenceMsg = 15756;
+        /// <summary>
+        /// 妤煎眰
+        /// </summary>
+        public const int uFloor = 15757;
+        /// <summary>
+        /// 鍒涘缓妤煎眰
+        /// </summary>
+        public const int uCreatFloor = 15758;
+        /// <summary>
+        /// 璇疯緭鍏ユゼ灞傚悕绉�
+        /// </summary>
+        public const int uPleaseInputFloorName = 15759;
+        /// <summary>
+        /// 妤煎眰鍚嶇О宸茬粡瀛樺湪
+        /// </summary>
+        public const int uFloorNameIsExist = 15760;
+        /// <summary>
+        /// 纭鍒犻櫎妤煎眰鍙婂叾鎵�鏈夋埧闂�?
+        /// </summary>
+        public const int uDeleteFloorMsg = 15761;
+        /// <summary>
+        /// 鍒犻櫎浣忓畢
+        /// </summary>
+        public const int uDeleteResidence = 15762;
+        /// <summary>
+        /// 纭鍒犻櫎浣忓畢鍙婃墍鏈夋ゼ灞傘�佹埧闂�?
+        /// </summary>
+        public const int uDeleteResidenceMsg = 15763;
+        /// <summary>
+        /// 纭鍒犻櫎鎴块棿?
+        /// </summary>
+        public const int uDeleteRoomMsg = 15764;
+        /// <summary>
+        /// 鍒涘缓鎴块棿
+        /// </summary>
+        public const int uCreatRoom = 15765;
+        /// <summary>
+        /// 鎴块棿鍚嶇О
+        /// </summary>
+        public const int uRoomName = 15766;
+        /// <summary>
+        /// 鎵�灞炴ゼ灞�
+        /// </summary>
+        public const int uBelongeFloor = 15767;
+        /// <summary>
+        /// 娓╁害
+        /// </summary>
+        public const int uTemperature = 15768;
+        /// <summary>
+        /// 婀垮害
+        /// </summary>
+        public const int uHumidity = 15769;
+        /// <summary>
+        /// 璇疯緭鍏ユ埧闂村悕绉�
+        /// </summary>
+        public const int uPleaseInputRoomName = 15770;
+        /// <summary>
+        /// 缂栬緫鎴块棿
+        /// </summary>
+        public const int uEditorRoom = 15771;
+
 
         //鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
         /// <summary>
@@ -3937,5 +4265,17 @@
         /// 鑷畾涔夎澶囨墍灞濱D涓�9鐨勭炕璇戝悕瀛楋細褰╃伅
         /// </summary>
         public const int uDeviceBelongId9 = 40010;
+        /// <summary>
+        /// 鑷畾涔夎澶囨墍灞濱D涓�10鐨勭炕璇戝悕瀛楋細娓╂箍搴︿紶鎰熷櫒
+        /// </summary>
+        public const int uDeviceBelongId10 = 40011;
+        /// <summary>
+        /// 鑷畾涔夎澶囨墍灞濱D涓�10鐨勭炕璇戝悕瀛楋細娓╁害浼犳劅鍣�
+        /// </summary>
+        public const int uDeviceBelongId11 = 40012;
+        /// <summary>
+        /// 鑷畾涔夎澶囨墍灞濱D涓�10鐨勭炕璇戝悕瀛楋細婀垮害浼犳劅鍣�
+        /// </summary>
+        public const int uDeviceBelongId12 = 40013;
     }
 }
diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems
index 1172fcd..ad7e707 100755
--- a/ZigbeeApp/Shared/Shared.projitems
+++ b/ZigbeeApp/Shared/Shared.projitems
@@ -19,13 +19,12 @@
     <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\ResultPack.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\UserLoginLocalRegionRes.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Pad\MainPage.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\ForgotPasswordByEmail.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\ForgotPasswordByPhone.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\ForgotPasswordSetNewPWD.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\RegisterSuccess.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\RegistrationByEmail.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\RegistrationByPhone.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\RegistrationPhoneOREmail.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\AccountForgetPWD.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\AccountRegister.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\AccountRegisterSuccess.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\AccountResetPWDSuccess.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\PhoneEmailForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\PhoneZone.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\AC\ACControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\AC\ACControlBase.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\AirSwitch\AirSwitchControl.cs" />
@@ -39,12 +38,22 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\CategorySceneSelectImgByLocal.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\CategorySceneSelectLightSetting.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\CategorySceneSelectRoomList.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\SelectFloor.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\ACLeftIconButtonRowLayout.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\BackButton.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\CommonFormResourse.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\ButtonLineForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\CommonFormResouce.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\CompleteButton.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\CustomAlert.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\DeviceDetailInfo.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\DeviceIconSelectedIMGByLocal.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\LeftIconButtonRowLayout.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\DeviceInfoEditRow.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\DeviceInfoRow.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\FunctionButton.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\FunctionIconButton.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\FunctionRow.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\LeftIconButtonRow.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\Line.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\RowLayoutDeleteButton.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\RowLayoutEditButton.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SelectedStatuButton.cs" />
@@ -77,10 +86,14 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\WeekPage.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Room\RoomCommon.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Abount\AbountForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\BelongAreaControl.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\InformationEditorControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\VerificationCodeControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Form\GesturePswSecirityForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Form\SecondaryPswSecurityForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlCheckLogic.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlLogLogic.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlThreadLogic.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Bind\AddDevicePage.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Bind\AddScenePage.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Bind\BindCommonLayout.cs" />
@@ -91,6 +104,11 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\EditorSecondaryPasswordForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\ForgotAccountPasswordForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\ForgotSecondaryPasswordForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Residence\AddNewRoomForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Residence\EditorRoomInforForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Residence\FloorListRoomForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Residence\ResidenceManagementForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Residence\TemperatrueHumiditySensorSelectForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\UserMain\QRCodeForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\ResetAccountPasswordForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Form\AreaCodeSelectForm.cs" />
@@ -211,7 +229,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Member\AddMemberSuccessForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Member\SubAccountLevelUpSuccessForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\OtherParty\OtherPartyAccountMenuForm.cs" />
-    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Residence\ResidenceManagementForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Residence\ResidenceListForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Resourse\ControlCommonResourse.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Resourse\DirectoryFileNameResourse.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Resourse\FirmwareUpdateResourse.cs" />

--
Gitblit v1.8.0