From 97e259d966cb5cb5d73c105d5dbaadcc1f920614 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 18 十月 2019 13:48:43 +0800 Subject: [PATCH] 合并了全部的代码 --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs | 132 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/function1.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/InputAccountIcon.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SelectFloor_Right.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs | 7 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedlight.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs | 21 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/ac.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/DoorLock/TemPasswordInvisiable.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Room/ItemSelected.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedac.png | 0 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs | 611 ++- ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/security1.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ItemSelected.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs | 2 ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs | 207 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/2.png | 0 ZigbeeApp/Shared/Phone/ZigBee/Common/IStatus.cs | 10 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs | 807 ++++ ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewayDirectionForm.cs | 87 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/delay.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs | 4 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs | 94 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/time.png | 0 ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs | 12 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/RoomIconBackgroundSelected.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor40.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicopen.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs | 252 ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGatewayInstruct.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs | 596 +- ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/timeparagraph.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs | 64 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor42.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Shared.png | 0 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectCurtainSetting.cs | 104 ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackUpForm.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MemberNotEsixtPic.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/airswitch.png | 0 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs | 98 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sunset.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFirmwareInfoForm.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayFirmwareUpdateForm.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MyHome.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Room/ItemUnSelected.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor44.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/doorlock.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/point.png | 0 ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Message.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor277.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs | 10 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/TopRightMenuControl.cs | 186 ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs | 6 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MessageSelected.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/panel.png | 0 ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj | 102 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor13.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessGatewaySearchForm.cs | 6 ZigbeeApp/Shared/Common/CommonPage.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/add.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NotShardPic.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/SelectFloor_Right.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor21.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor44.png | 0 ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml | 2 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorlockDialog.cs | 2 ZigbeeApp/Shared/Phone/Device/CommonForm/SelectTime.cs | 4 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TempPasswordTimePage.cs | 10 ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGateway.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/scene.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/ItemUnSelected_Black.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/1.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/BottomButtonGround.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sunrise.png | 0 ZigbeeApp/Shared/Common/SceneRoomUI.cs | 37 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/RoomIconBackgroundSelected.png | 0 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberFrozenPage.cs | 5 ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayListBackUpForm.cs | 4 ZigbeeApp/Shared/Phone/Device/Room/AddRoomScene.cs | 8 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/deviceunselectedbackgroundcolor.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicbj2.png | 0 ZigbeeApp/Shared/R.cs | 1437 +++--- ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/position.png | 0 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedScene.cs | 54 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/athome.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/humidity.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor43.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/BottomButtonGround.png | 0 ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs | 561 +- ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/AddSelected.png | 0 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs | 354 + ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs | 58 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TimeSettignPage.cs | 533 ++ ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/connect.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs | 810 +++ ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewayListForm.cs | 168 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicclose.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selected.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs | 13 ZigbeeApp/GateWay.Ios/Resources/Phone/DoorLock/TemPasswordInvisiable.png | 0 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor22.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/timepoint.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGatewaySearching.png | 0 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs | 503 ++ ZigbeeApp/GateWay.Droid/Assets/Phone/Room/FavoriteRoom.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/curtain.png | 0 ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs | 13 ZigbeeApp/Shared/Common/House.cs | 28 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Message.png | 0 ZigbeeApp/Shared/Common/Room.cs | 143 ZigbeeApp/GateWay.Ios/Resources/Phone/Room/FavoriteRoom.png | 0 ZigbeeApp/GateWay.Droid/Assets/Language.ini | 251 - ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedcurtain.png | 0 ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs | 31 ZigbeeApp/GateWay.Ios/Resources/Phone/Room/NoNameRoom.png | 0 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectLightSetting.cs | 64 ZigbeeApp/Shared/Phone/Device/Category/Category.cs | 1433 +++--- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/Room/ItemUnSelected_Black.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/noon.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs | 4 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectAirSwitchSetting.cs | 64 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/Ddmmablelight.png | 0 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGateway.png | 0 ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs | 4 ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/drop-down.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor22.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Timer.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGatewaySearching.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NextSelected.png | 0 ZigbeeApp/Shared/Common/ZigbeeColor.cs | 33 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/NoNameRoom.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selecteddoorlock.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/leavehome.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/scene1.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs | 149 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor42.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ScanQRcodeIcon.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/iconSelectedBackgroundColor.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewayRebindForm.cs | 66 ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetRow.cs | 119 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor277.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Light/DeskLamp.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/deviceselectedbackgroundcolor.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsenor.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/light.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/noscene.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/FailIcon.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MyHome.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGatewayInstruct.png | 0 ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs | 203 + ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedairswitch.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/back.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/FailIcon.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ItemSelected.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ScanQRcodeIconSelected.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sign.png | 0 ZigbeeApp/Shared/Shared.projitems | 21 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedmonth.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor40.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WirelessGateway.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/InputAccountIconSelected.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/ItemSelected.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NextSelected.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicbj1.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Shared.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/light_1.png | 0 ZigbeeApp/Shared/Phone/Device/Room/RoomCommon.cs | 13 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/GatewayProductInfoForm.cs | 220 + ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ItemUnSelected.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/temperature.png | 0 ZigbeeApp/GateWay.Ios/Resources/Language.ini | 287 - ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ItemUnSelected.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor13.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/nosecurity.png | 0 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor21.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/next.png | 0 ZigbeeApp/Shared/Common/SceneTargetDeviceUI.cs | 23 ZigbeeApp/GateWay.Droid/Assets/Phone/Room/ItemUnSelected.png | 0 ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs | 5 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodFailedTip.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/dropdown.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicaddcolor.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Timer.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/RoomIconBackground.png | 0 ZigbeeApp/Shared/Phone/Device/CommonForm/SelectZone.cs | 54 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/function.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Light/DeskLampSelected.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/dimmableLight.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/DoorLock/DelBackground.png | 0 ZigbeeApp/Shared/Phone/ZigBee/Device/Enum.cs | 2 ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs | 4 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/iconBackgroundColor.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/security.png | 0 ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs | 2 ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDimmableLightSetting.cs | 64 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/nodelay.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/withdrawal.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor43.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/3.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedpanel.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs | 2 ZigbeeApp/GateWay.Droid/Assets/Phone/Light/DeskLamp.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/RoomIconBackground.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selecteddimmableLight.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs | 12 ZigbeeApp/GateWay.Droid/Assets/Phone/DoorLock/DelBackground.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WirelessGateway.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs | 2 ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NotAuthority.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/nofunction.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs | 4 /dev/null | 517 -- ZigbeeApp/GateWay.Ios/Resources/Phone/Light/DeskLampSelected.png | 0 ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/delay1.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MessageSelected.png | 0 230 files changed, 7,456 insertions(+), 4,402 deletions(-) diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini index c2813c8..7fb67bc 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini +++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini @@ -185,9 +185,18 @@ 179=鎿嶄綔澶辫触 180=杩滅▼寮�閿佺粦瀹氭垚鍔� 181=璇疯缃簩娆″畨鍏ㄩ獙璇佹柟寮� -182=宸插叧闂� +182=鍏抽棴 183=姝e湪寮�閿� -184=宸叉墦寮� +184=鎵撳紑 +185=骞� +186=鐭鎴愬姛 +187=鐭澶辫触 +188=璇疯缃敓鏁堟椂闂� +189=璇疯缃敓鏁堟棩鏈� +190=璇疯缃け鏁堟椂闂� +191=璇疯缃け鏁堟棩鏈� +192=璇�"鐐瑰嚮鐢熸垚"涓存椂瀵嗙爜 + 548=鎻愰啋璁剧疆 550=鏂板鐢ㄦ埛 @@ -611,7 +620,7 @@ 11023=鍙栨秷 11024=娌℃湁鍦烘櫙 {\r\n} 璇风偣鍑诲彸涓婅娣诲姞 11025=璁剧疆 -11026=瀹氭椂 +11026=寤舵椂 11027=纭畾鍒犻櫎鍚楋紵 11028=娣诲姞鍦烘櫙 11029=鍦烘櫙鍚嶇О @@ -641,216 +650,11 @@ 13117=鏈垎閰� 13118=鍏ㄩ�� 13119=娣诲姞鍒� +13120=璇ユ埧闂存槸鍒嗕韩杩囨潵鐨勶紝涓嶅厑璁歌繘琛岃鎿嶄綔 +13121=杩樻病閫夋嫨鎴块棿锛岃鍏堥�夋嫨 +13122=涓轰綘鐨勫姩浣滃垱寤烘椂闂撮棿闅� - - - -10011=瀵嗙爜涓嶈兘涓虹┖锛� -10012=璇峰幓閭婵�娲昏处鍙� -10013=璇疯緭鍏ユ纭殑鎵嬫満鍙� -10014=璇疯緭鍏ユ纭獙璇佺爜 -10015=璇烽�夋嫨鍖哄彿 -10016=鐭俊鐧诲綍 -10017=璇ユ墜鏈哄彿杩樻病娉ㄥ唽锛岃鍏堟敞鍐� -10018=楠岃瘉鐮侀敊璇� -10019=璇ョ敤鎴峰睘浜庤皟璇曡处鍙凤紝骞舵湭鍚敤 -10020=璇峰幓閭纭淇敼瀵嗙爜 - - - -10021=閭欢鍙戦�佸け璐ワ紝璇烽噸璇� -10022=璇ヨ处鍙锋棤鏉冮檺 -10023=鐗堟湰 -10024=纭畾閫�鍑哄綋鍓嶈处鍙峰悧 -10025=璇疯缃笉灏戜簬6浣嶇殑鏂板瘑鐮� -10026=褰撳墠鐢ㄦ埛浣忓畢涓虹┖锛岃鍏堟柊寤轰綇瀹� -10027=浣忓畢鍚嶇О涓嶈兘涓虹┖ -10028=璇ヤ綇瀹呭悕绉板凡缁忓瓨鍦紝璇锋敼鎹㈠啀璇� -10029=鍒犻櫎浣忓畢 -10030=瀵嗙爜涓嶈兘涓虹┖ -10031=鎴块棿鑳屾櫙鍥� -10032=鎴块棿鍚嶅瓧涓嶈兘涓虹┖ -10033=鏃� -11000=璇疯緭鍏ユ墜鏈�/閭 -11001=璇疯緭鍏ヤ笉灏戜簬6浣嶇殑瀵嗙爜 -11002=蹇樿瀵嗙爜 -11003=鐧诲綍 -11004=娉ㄥ唽 -11005=璐﹀彿 -11006=鎵嬫満鍙锋敞鍐� -11007=閭娉ㄥ唽 -11008=宸叉湁璐﹀彿锛熺櫥褰� -11009=璇疯緭鍏ユ墜鏈哄彿 - -11011=璇疯緭鍏ラ獙璇佺爜 -11012=鍙戦�侀獙璇佺爜 -11013=鎻愮ず -11014=鍙戦�侀獙璇佺爜鎴愬姛锛岃娉ㄦ剰鏌ユ敹 -11015=杩斿洖鐧诲綍鐣岄潰 -11016=璇疯緭鍏ラ偖绠� -11017=閫氳繃鎵嬫満鍙锋壘鍥� -11018=閫氳繃閭鎵惧洖 -11019=璇疯緭鍏ョ粦瀹氱殑鎵嬫満鍙凤紝浣犲皢浼氭敹鍒伴獙璇佺爜 -11020=璇疯緭鍏ョ粦瀹氱殑閭锛屼綘灏嗕細鏀跺埌楠岃瘉鐮� -11021=閲嶇疆瀵嗙爜 -11022=淇敼瀵嗙爜鎴愬姛锛岃閲嶆柊鐧诲綍 -11023=璐﹀彿瀵嗙爜鐧诲綍 -11024=鐧诲綍涓�... -11025=鎴块棿鍒楄〃 -11026=娣诲姞鎴块棿 -11027=鎴块棿鍚嶇О -11028=鍙栨秷 -11029=纭畾 -11030=瀹屾垚 -11031=璁剧疆鍐呭 -11032=璇疯缃埧闂村悕 -11033=鏈湴鍥惧簱 -11034=鎷嶇収 -11035=绯荤粺鐩稿唽 -11036=閫夋嫨鍥剧墖 -11037=鎴块棿宸插瓨鍦� -11038=鍔熻兘 -11039=鍦烘櫙 -11040=淇敼鎴块棿 -11041=鍒犻櫎 -11042=娣诲姞鍔熻兘 -11043=娣诲姞鍦烘櫙 -11044=鐏厜 -11045=娣诲姞鐏厜 -11046=鍚婄伅 -11047=绛掔伅 -11048=灏勭伅 -11049=璁惧鍚嶇О -11050=鎵�灞炲尯鍩� -11051=鍒嗕韩鐨� -11052=纭畾娣诲姞 -11053=鎵�灞炴ā鍧� -11054=娣诲姞 -11055=璁惧璁剧疆 -11056=璇疯緭鍏ュ満鏅悕绉� -11057=娣诲姞鎵ц鐩爣 -11058=娣诲姞璁惧鎴愬姛 -11059=鍏抽棴 -11060=璁惧 - -11062=纭畾鍒犻櫎璇ユ埧闂村悧锛� -11063=纭畾鍒犻櫎鍚楋紵 -11064=杩樻病娣诲姞鍦烘櫙 -11065=鑷姩鍖� - - - - - - - - - -11071=涓嬩竴姝� -11072=閫夋嫨鍖哄煙 -11073=閫夋嫨鎵ц璁惧 -11074=寮� -11075=璋冨厜 -11076=璇ヨ澶囧凡缁忔坊鍔犲埌璇ュ満鏅腑 -11077=鍦烘櫙鍚嶄笉鑳戒负绌� -11078=淇敼鍦烘櫙 -11079=鍦烘櫙鍚嶇О -11080=鍒囨崲浣忓畢 -11081=鏈縺娲� -11082=璇ョ敤鎴峰睘浜庤皟璇曡处鍙凤紝骞舵湭鍚敤 -11083=鏁版嵁骞朵笉鍦ㄦHDL鍖哄煙鏈嶅姟鍣� -11084=璐﹀彿鎴栧瘑鐮侀敊璇� -11085=璐﹀彿涓嶅瓨鍦紝璇峰厛娉ㄥ唽 -11086=鎻愪緵鐨勫弬鏁伴敊璇� -11087=楠岃瘉鐮侀敊璇� -11088=浣犵殑瀵嗙爜杩囦簬绠�鍗� -11089=璇疯緭鍏ユ纭殑閭 -11090=鎿嶄綔澶辫触 -11091=楠岃瘉鐮佸彂閫佸け璐� -11092=璇锋眰缃戝叧鏁版嵁澶辫触锛岃妫�鏌ョ綉鍏炽�佽澶囩綉缁滆繛鎺ユ槸鍚︽甯� -11093=鏃堕棿闂撮殧 -11094=鍦烘櫙宸茬粡瀛樺湪 -11095=娣诲姞鍦烘櫙澶辫触 -11096=绉� -11097=鍒嗛挓 -11098=鑷畾涔� - -11100=寤舵椂 -11101=鍙栨秷鏀惰棌 -11102=淇敼淇℃伅 -11103=鐧惧垎姣� -11104=鎴愬姛 -11105=鏈煡 -11106=鍐嶆杈撳叆瀵嗙爜 -11107=楠岃瘉鐮佸け鏁� - -12000=涓荤綉鍏充笉鍦ㄧ嚎 -12001=澶辫触锛岃閲嶈瘯 -12002=鍒犻櫎澶辫触锛屽満鏅负绌� -12003=璇ュ満鏅腑娌℃湁璁惧 -12004=褰撳墠APP鐗堟湰宸茬粡鏄渶鏂扮殑浜� -12005=鏇存柊 -12006=鏇存柊鍐呭 -12007=鏇存柊APP澶辫触锛岃閲嶈瘯 -12008=鎺у埗鍦烘櫙澶辫触锛岃閲嶈瘯 -12009=鍒犻櫎鍦烘櫙澶辫触锛岃閲嶈瘯 -12010=鏄惁淇濆瓨褰撳墠鏂板缓鎴块棿锛� -12011=鏇存柊涓�... -12012=鍙栨秷鏇存柊锛� -12013=鏂瑰悜涓庨檺浣� -12014=缁存姢妯″紡 -12015=鍚姩/绂佹鎵嬫媺寮�鍏� -12016=璧峰鏂瑰悜 -12017=姝e悜 -12018=鍙嶅悜 -12019=闄愪綅 -12020=寮�濮� -12021=缁撴潫 -12022=鎭㈠琛岀▼璁剧疆 -12023=鎭㈠琛岀▼璁剧疆鍚庯紝褰撳墠璁剧疆灏嗚鍒濆鍖栵紝纭畾缁х画鍚楋紵 -12024=鍒囨崲缁存姢妯″紡澶辫触 -12025=鏄惁璁剧疆褰撳墠浣嶇疆涓哄紑濮嬮檺浣嶏紵 -12026=鏄惁璁剧疆褰撳墠浣嶇疆涓虹粨鏉熼檺浣嶏紵 -12027=璁剧疆寮�濮嬮檺浣� -12028=璁剧疆缁撴潫闄愪綅 -12029=瀵艰建绉诲姩涓紝璇风瓑寰呫�傘�傘�� -12030=鎮ㄧ殑璐﹀彿宸插湪鍙︿竴鍙拌澶囩櫥褰曪紝鎮ㄥ凡琚己鍒朵笅绾� -12031=缂栬緫 -12032=鍦烘櫙涓凡鍖呭惈璇ュ満鏅� -12033=褰撳墠娌℃悳绱㈠埌缃戝叧锛岃鍏堟坊鍔犵綉鍏� -12034=褰撳墠娌℃湁鍙互娣诲姞鍒拌鎴块棿鐨勮澶� - -12035=閫夋嫨椋庨�� -12036=浣庨 -12037=涓 -12038=楂橀 -12039=閫夋嫨妯″紡 -12040=鑷姩 -12041=鍒跺喎 -12042=鍒剁儹 -12043=闄ゆ箍 -12044=閫侀 -12045=瀹ゆ俯 - -12046=绌鸿皟宸茬粡鍏抽棴锛岃鍏堟墦寮� -12047=璇ユ埧闂存槸鍒嗕韩杩囨潵鐨勶紝涓嶅厑璁歌繘琛岃鎿嶄綔 - - -12100=鏈煡璁惧 -12101=鎺у埗闈㈡澘 -12102=鐏厜 -12103=璋冨厜鐏� -12104=绐楀笜 -12105=绌鸿皟 -12106=浼犳劅鍣� -12107=绌烘皵寮�鍏� -12108=璋冨厜鐏� -12109=涓户鍣� - -12500=褰撳墠鎴块棿娌℃湁璁惧鍙互娣诲姞鍒板満鏅� -12501=寰�涓婄Щ鍔� -12502=寰�涓嬬Щ鍔� @@ -903,9 +707,9 @@ 15048=娣诲姞鏈夌嚎缃戝叧 15049=涓嬩竴姝� 15050=鍋滄鎼滅储 -15051=鏅鸿兘缃戝叧姝e湪閰嶇疆缃戠粶涓� +15051=姝e湪鎼滅储缃戝叧鈥� 15052=璇风◢鍊櫬仿仿� -15053=璇风‘淇濈綉鍏冲凡鐢ㄧ綉绾胯繛鎺� +15053=璇风‘淇濈綉鍏充笌缃戠嚎杩炴帴{0}绯荤粺鐏瘡绉掗棯鐑佷竴娆� 15054=缃戝叧鍚嶇О 15055=浣忓畢鍚嶇О 15056=瀹屾垚 @@ -914,7 +718,7 @@ 15059=閿欒 15060=纭 15061=鎻愮ず -15062=闇�閲嶆柊缁戝畾 +15062=鎹㈢粦 15063=宸茬粦瀹� 15064=鍦ㄧ嚎 15065=绂荤嚎 @@ -1215,7 +1019,7 @@ 15398=缃戠粶杩炴帴涓�︹�� 15399=鑷畾涔夊浠� 15400=鍚屾鏁版嵁 -15401=瀛愮綉鍏� +15401=浠庣綉鍏� 15402=涓荤綉鍏� 15403=涓婁紶鏁版嵁 15404=纭畾鏄惁涓婁紶鏁版嵁鍒版湇鍔″櫒锛� @@ -1294,7 +1098,7 @@ 15489=鑾峰彇鎸夐敭闈㈡澘鑺傝兘妯″紡淇℃伅澶辫触 15490=璁剧疆鎸夐敭闈㈡澘鎸囩ず鐏鑹插け璐� 15491=鑾峰彇缃戝叧瀵硅薄澶辫触 -15492=鏄惁閲嶆柊缁戝畾缃戝叧? +15492=纭缁戝畾鏃х綉鍏筹紵 15493=缃戝叧瀵硅薄寮傚父,璇烽噸鏂伴�夋嫨缃戝叧 15494=閿欒:缃戝叧瀵硅薄涓㈠け 15495=绗笁鏂硅澶� @@ -1361,7 +1165,7 @@ 15562=鍏朵粬闃插尯閲屾病鏈夐厤缃紶鎰熷櫒璁惧 15563=褰撳墠姝e浜庡竷闃叉ā寮�,鏃犳硶鍒犻櫎璁惧 15564=宸插叡浜唴瀹� -15565=鏂板鍏变韩 +15565=鍒涘缓鏂板叡浜� 15566=浜у搧鍚嶇О 15567=璇疯緭鍏ヤ骇鍝佸悕绉� 15568=缂栬緫浜у搧鍚嶇О @@ -1377,7 +1181,7 @@ 15580=鍏变韩鏁版嵁鍚屾涓� 15581=璇烽厤缃叡浜澶� 15582=褰撳墠姝e浜庡竷闃叉ā寮�,鏃犳硶娣诲姞璁惧 -15583=鍏ㄩ儴鍖哄煙鏃犲彲鍏变韩鐨勮澶� +15583=鏃犲彲鍏变韩鐨勬埧闂� 15584=纭畾绉婚櫎閫変腑鐨勫満鏅紵 15585=鍒嗕韩鎴愬姛 15586=璇烽�夋嫨鐩爣鍚庡啀鎵ц鍒嗕韩鎿嶄綔 @@ -1566,6 +1370,17 @@ 15775=杩斿洖 15776=杩樻病鏈夊叡浜尯鍩熺粰鎴愬憳{0}鍙偣鍑诲彸涓婅鈥�+鈥濇坊鍔� 15777=纭鍒犻櫎鍏变韩鎴块棿锛� +15778=杩樻病缁戝畾缃戝叧鍝� +15779=瑙e喅鏂规硶锛屽彲閫夋嫨鎵ц浠ヤ笅浠绘剰涓�绉嶆柟寮忥細 +15780=1.闀挎寜ZB/RST閿�20绉掞紝缃戝叧鎭㈠鍑哄巶璁剧疆锛屾寚绀虹伅鍏ㄩ儴鐔剓0}鐏悗锛岄噸鏂板叆缃戙�� +15781=2.鐐规寜HID/WCFG閿紝杩涘叆缃戝叧鎹㈢粦妯″紡锛岀郴缁熸寚绀虹伅蹇棯{0}5绉掋�� +15782=3.璇烽噸璇曪紝閲嶆柊娣诲姞缃戝叧銆� +15783=4.杩斿洖缃戝叧绠$悊銆� +15784=閲嶈瘯 +15785=杩斿洖缃戝叧绠$悊 +15786=鎼滅储澶辫触 +15787=(鏂�) +15788=姝e湪鎹㈢粦缃戝叧锛岃绋嶅�欌�� ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽� 18004=鎸囧畾缃戝叧宸茬粡琚粦瀹� diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/DoorLock/DelBackground.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/DoorLock/DelBackground.png new file mode 100755 index 0000000..5a18740 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/DoorLock/DelBackground.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/DoorLock/TemPasswordInvisiable.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/DoorLock/TemPasswordInvisiable.png new file mode 100755 index 0000000..c9bce73 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/DoorLock/TemPasswordInvisiable.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/PhoneImage.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/PhoneImage.png deleted file mode 100755 index ff8b680..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/PhoneImage.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGateway.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGateway.png index a35b196..077ac0d 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGateway.png +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGateway.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGatewayInstruct.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGatewayInstruct.png index 5e999f5..3d18cca 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGatewayInstruct.png +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGatewayInstruct.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGatewaySearching.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGatewaySearching.png new file mode 100755 index 0000000..a73220f --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WiredGatewaySearching.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WirelessGateway.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WirelessGateway.png index 5e0b1b3..b2f44c4 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WirelessGateway.png +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/WirelessGateway.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/BottomButtonGround.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/BottomButtonGround.png new file mode 100755 index 0000000..6f7ad5b --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/BottomButtonGround.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/FailIcon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/FailIcon.png new file mode 100755 index 0000000..5e7f089 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/FailIcon.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ItemSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ItemSelected.png index 52c55d6..5dbc1ab 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ItemSelected.png +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ItemSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ItemUnSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ItemUnSelected.png new file mode 100755 index 0000000..1c00059 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ItemUnSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Message.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Message.png new file mode 100755 index 0000000..05d6834 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Message.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MessageSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MessageSelected.png new file mode 100755 index 0000000..236fd0c --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MessageSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MyHome.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MyHome.png new file mode 100755 index 0000000..760da25 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MyHome.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NextSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NextSelected.png new file mode 100755 index 0000000..b8c3d12 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NextSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconBackgroundColor.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/RoomIconBackground.png similarity index 100% copy from ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconBackgroundColor.png copy to ZigbeeApp/GateWay.Droid/Assets/Phone/Item/RoomIconBackground.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconSelectedBackgroundColor.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/RoomIconBackgroundSelected.png similarity index 100% copy from ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconSelectedBackgroundColor.png copy to ZigbeeApp/GateWay.Droid/Assets/Phone/Item/RoomIconBackgroundSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SelectFloor_Right.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SelectFloor_Right.png new file mode 100755 index 0000000..3f91ce3 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SelectFloor_Right.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Shared.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Shared.png new file mode 100755 index 0000000..b7b0cb9 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Shared.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Timer.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Timer.png index 736599d..e26dff3 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Timer.png +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Timer.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Light/DeskLamp.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Light/DeskLamp.png new file mode 100755 index 0000000..31f5e9f --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Light/DeskLamp.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Light/DeskLampSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Light/DeskLampSelected.png new file mode 100755 index 0000000..a0a01cc --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Light/DeskLampSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/FavoriteRoom.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/FavoriteRoom.png new file mode 100755 index 0000000..b516b16 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/FavoriteRoom.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/HomeBG.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/HomeBG.png deleted file mode 100755 index cd4994b..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/HomeBG.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/ItemSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/ItemSelected.png new file mode 100755 index 0000000..526ab07 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/ItemSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/ItemUnSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/ItemUnSelected.png new file mode 100755 index 0000000..e585d3d --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/ItemUnSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/ItemUnSelected_Black.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/ItemUnSelected_Black.png new file mode 100755 index 0000000..fb408e5 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/ItemUnSelected_Black.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/NoNameRoom.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/NoNameRoom.png new file mode 100755 index 0000000..d831f53 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/NoNameRoom.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r0.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r0.png deleted file mode 100755 index 48934fc..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r0.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r1.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r1.png deleted file mode 100755 index a2de21f..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r1.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r10.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r10.png deleted file mode 100755 index d413f1a..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r10.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r11.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r11.png deleted file mode 100755 index 4dbf445..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r11.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r12.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r12.png deleted file mode 100755 index 462e0c8..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r12.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r13.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r13.png deleted file mode 100755 index 9bdc9aa..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r13.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r14.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r14.png deleted file mode 100755 index dbfdb30..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r14.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r15.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r15.png deleted file mode 100755 index 0b447de..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r15.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r16.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r16.png deleted file mode 100755 index de1c4ed..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r16.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r17.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r17.png deleted file mode 100755 index a541cd1..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r17.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r18.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r18.png deleted file mode 100755 index f7cffea..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r18.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r19.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r19.png deleted file mode 100755 index de439f4..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r19.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r2.png deleted file mode 100755 index 8d6c085..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r2.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r20.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r20.png deleted file mode 100755 index c3fa6b9..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r20.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r21.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r21.png deleted file mode 100755 index 7a93d5b..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r21.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r22.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r22.png deleted file mode 100755 index 25f6057..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r22.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r23.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r23.png deleted file mode 100755 index 7e3e441..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r23.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r24.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r24.png deleted file mode 100755 index af9d1d8..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r24.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r3.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r3.png deleted file mode 100755 index 5386ba8..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r3.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r4.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r4.png deleted file mode 100755 index 32fabae..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r4.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r5.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r5.png deleted file mode 100755 index 346bde6..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r5.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r6.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r6.png deleted file mode 100755 index d16c81c..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r6.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r7.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r7.png deleted file mode 100755 index cccf7ac..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r7.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r8.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r8.png deleted file mode 100755 index 24ea738..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r8.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r9.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r9.png deleted file mode 100755 index 53a4c4d..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/r9.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj index ccc8183..098627a 100755 --- a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj +++ b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj @@ -52,6 +52,12 @@ <MandroidI18n>cjk</MandroidI18n> <DefineConstants>Android,Release</DefineConstants> <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> + <AotAssemblies>false</AotAssemblies> + <EnableLLVM>false</EnableLLVM> + <AndroidEnableProfiledAot>false</AndroidEnableProfiledAot> + <BundleAssemblies>false</BundleAssemblies> + <AndroidDexTool>d8</AndroidDexTool> + <AndroidUseAapt2>false</AndroidUseAapt2> </PropertyGroup> <ItemGroup> <Reference Include="BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0e99375e54769942"> @@ -418,7 +424,6 @@ <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon1Selected.png" /> <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon6.png" /> <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon6Selected.png" /> - <AndroidAsset Include="Assets\Phone\Gateway\PhoneImage.png" /> <AndroidAsset Include="Assets\Phone\Gateway\RealGateway1.png" /> <AndroidAsset Include="Assets\Phone\Gateway\RealGateway6.png" /> <AndroidAsset Include="Assets\Phone\Gateway\SearchGateway.png" /> @@ -537,32 +542,6 @@ <AndroidAsset Include="Assets\Phone\RealDevice\SensorMotion.png" /> <AndroidAsset Include="Assets\Phone\RealDevice\SensorPir.png" /> <AndroidAsset Include="Assets\Phone\RealDevice\SensorWater.png" /> - <AndroidAsset Include="Assets\Phone\Room\HomeBG.png" /> - <AndroidAsset Include="Assets\Phone\Room\r0.png" /> - <AndroidAsset Include="Assets\Phone\Room\r1.png" /> - <AndroidAsset Include="Assets\Phone\Room\r10.png" /> - <AndroidAsset Include="Assets\Phone\Room\r11.png" /> - <AndroidAsset Include="Assets\Phone\Room\r12.png" /> - <AndroidAsset Include="Assets\Phone\Room\r13.png" /> - <AndroidAsset Include="Assets\Phone\Room\r14.png" /> - <AndroidAsset Include="Assets\Phone\Room\r15.png" /> - <AndroidAsset Include="Assets\Phone\Room\r16.png" /> - <AndroidAsset Include="Assets\Phone\Room\r17.png" /> - <AndroidAsset Include="Assets\Phone\Room\r18.png" /> - <AndroidAsset Include="Assets\Phone\Room\r19.png" /> - <AndroidAsset Include="Assets\Phone\Room\r2.png" /> - <AndroidAsset Include="Assets\Phone\Room\r20.png" /> - <AndroidAsset Include="Assets\Phone\Room\r21.png" /> - <AndroidAsset Include="Assets\Phone\Room\r22.png" /> - <AndroidAsset Include="Assets\Phone\Room\r23.png" /> - <AndroidAsset Include="Assets\Phone\Room\r24.png" /> - <AndroidAsset Include="Assets\Phone\Room\r3.png" /> - <AndroidAsset Include="Assets\Phone\Room\r4.png" /> - <AndroidAsset Include="Assets\Phone\Room\r5.png" /> - <AndroidAsset Include="Assets\Phone\Room\r6.png" /> - <AndroidAsset Include="Assets\Phone\Room\r7.png" /> - <AndroidAsset Include="Assets\Phone\Room\r8.png" /> - <AndroidAsset Include="Assets\Phone\Room\r9.png" /> <AndroidAsset Include="Assets\Phone\Room\RoomCardView.png" /> <AndroidAsset Include="Assets\Phone\Room\RoomCardView_Name.png" /> <AndroidAsset Include="Assets\Phone\Room\Room_Rectangle.png" /> @@ -597,12 +576,6 @@ </ItemGroup> <ItemGroup> <AndroidAsset Include="Assets\Phone\Item\ScanQRcodeIconSelected.png" /> - </ItemGroup> - <ItemGroup> - <AndroidAsset Include="Assets\Phone\Room\iconBackgroundColor.png" /> - </ItemGroup> - <ItemGroup> - <AndroidAsset Include="Assets\Phone\Room\iconSelectedBackgroundColor.png" /> </ItemGroup> <ItemGroup> <AndroidAsset Include="Assets\Phone\ZigeeLogic\1.png" /> @@ -844,6 +817,69 @@ <ItemGroup> <AndroidAsset Include="Assets\Phone\ZigeeLogic\withdrawal.png" /> </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Item\ItemUnSelected.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Gateway\WiredGatewaySearching.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Item\BottomButtonGround.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Item\FailIcon.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Light\DeskLamp.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Light\DeskLampSelected.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Item\Message.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Item\MessageSelected.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Item\MyHome.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Item\NextSelected.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Item\SelectFloor_Right.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Item\Shared.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Item\RoomIconBackground.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Item\RoomIconBackgroundSelected.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Room\FavoriteRoom.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Room\ItemSelected.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Room\ItemUnSelected.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Room\ItemUnSelected_Black.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Room\NoNameRoom.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\DoorLock\DelBackground.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\DoorLock\TemPasswordInvisiable.png" /> + </ItemGroup> <Import Project="..\Shared\Shared.projitems" Label="Shared" Condition="Exists('..\Shared\Shared.projitems')" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> <Import Project="..\packages\Xamarin.Android.Support.Annotations.26.0.2\build\MonoAndroid80\Xamarin.Android.Support.Annotations.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Annotations.26.0.2\build\MonoAndroid80\Xamarin.Android.Support.Annotations.targets')" /> diff --git a/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml b/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml index 30c0643..4832d46 100755 --- a/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml +++ b/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="2019082201" android:installLocation="auto" android:versionName="1.0.19082201"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="2019101701" android:installLocation="auto" android:versionName="1.0.19101701"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" /> <permission android:name="com.hdl.home.permission.JPUSH_MESSAGE" android:protectionLevel="signature" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> diff --git a/ZigbeeApp/GateWay.Ios/Resources/Language.ini b/ZigbeeApp/GateWay.Ios/Resources/Language.ini index 2969b1f..7fb67bc 100755 --- a/ZigbeeApp/GateWay.Ios/Resources/Language.ini +++ b/ZigbeeApp/GateWay.Ios/Resources/Language.ini @@ -185,9 +185,18 @@ 179=鎿嶄綔澶辫触 180=杩滅▼寮�閿佺粦瀹氭垚鍔� 181=璇疯缃簩娆″畨鍏ㄩ獙璇佹柟寮� -182=宸插叧闂� +182=鍏抽棴 183=姝e湪寮�閿� -184=宸叉墦寮� +184=鎵撳紑 +185=骞� +186=鐭鎴愬姛 +187=鐭澶辫触 +188=璇疯缃敓鏁堟椂闂� +189=璇疯缃敓鏁堟棩鏈� +190=璇疯缃け鏁堟椂闂� +191=璇疯缃け鏁堟棩鏈� +192=璇�"鐐瑰嚮鐢熸垚"涓存椂瀵嗙爜 + 548=鎻愰啋璁剧疆 550=鏂板鐢ㄦ埛 @@ -531,6 +540,32 @@ 5302=鎸夐敭涓� 5303=鎸夐敭鍥� 5304=鏄惁瑕佸垹闄�? +5305=寮�/鍏� +5306=鏃犱汉绉诲姩鏃堕棿 +5307=鏃犱汉绉诲姩鏃� +5308=瓒呰繃鏃堕棿鏈叧闂椂 +5309=鏈叧闂椂 +5340=姣忓懆 +5341=璇烽�夋嫨鎵ц鍛ㄦ湡锛屽惁鍒欐棤娉曟墽琛屼笅涓�姝� +5342=闂ㄩ攣 +5343=閫夋嫨鐢ㄦ埛 +5344=瀵嗙爜 +5345=鎸囩汗 +5346=IC鍗� +5347=绌烘皵寮�鍏� +5348=涓轰綘鐨勫姩浣滃垱寤烘椂闂撮棿闅� +5349=娣诲姞寤舵椂 +5350=鍒跺喎 +5351=鍒剁儹 +5352=鑷姩 +5353=闄ゆ箍 +5354=閫侀 +5355=浣庨 +5356=涓 +5357=楂橀 +5358=鎺ㄨ崘妯℃澘 +5359=浜烘潵鐏寒 +5360=浜鸿蛋鐏伃 @@ -546,7 +581,7 @@ 10106=娉ㄥ唽鐢ㄦ埛 10107=璇疯緭鍏ラ偖绠� 10108=鎼滅储 -10109=纭畾 +10109=瀹屾垚 10110=璐﹀彿鐧诲綍 10111=鍙戦�侀獙璇佺爜 10112=鍚庨噸鍙� @@ -585,7 +620,7 @@ 11023=鍙栨秷 11024=娌℃湁鍦烘櫙 {\r\n} 璇风偣鍑诲彸涓婅娣诲姞 11025=璁剧疆 -11026=瀹氭椂 +11026=寤舵椂 11027=纭畾鍒犻櫎鍚楋紵 11028=娣诲姞鍦烘櫙 11029=鍦烘櫙鍚嶇О @@ -612,215 +647,14 @@ 13114=绉� 13115=鍒嗛挓 13116=灏忔椂 +13117=鏈垎閰� +13118=鍏ㄩ�� +13119=娣诲姞鍒� +13120=璇ユ埧闂存槸鍒嗕韩杩囨潵鐨勶紝涓嶅厑璁歌繘琛岃鎿嶄綔 +13121=杩樻病閫夋嫨鎴块棿锛岃鍏堥�夋嫨 +13122=涓轰綘鐨勫姩浣滃垱寤烘椂闂撮棿闅� - - -10011=瀵嗙爜涓嶈兘涓虹┖锛� -10012=璇峰幓閭婵�娲昏处鍙� -10013=璇疯緭鍏ユ纭殑鎵嬫満鍙� -10014=璇疯緭鍏ユ纭獙璇佺爜 -10015=璇烽�夋嫨鍖哄彿 -10016=鐭俊鐧诲綍 -10017=璇ユ墜鏈哄彿杩樻病娉ㄥ唽锛岃鍏堟敞鍐� -10018=楠岃瘉鐮侀敊璇� -10019=璇ョ敤鎴峰睘浜庤皟璇曡处鍙凤紝骞舵湭鍚敤 -10020=璇峰幓閭纭淇敼瀵嗙爜 - - - -10021=閭欢鍙戦�佸け璐ワ紝璇烽噸璇� -10022=璇ヨ处鍙锋棤鏉冮檺 -10023=鐗堟湰 -10024=纭畾閫�鍑哄綋鍓嶈处鍙峰悧 -10025=璇疯缃笉灏戜簬6浣嶇殑鏂板瘑鐮� -10026=褰撳墠鐢ㄦ埛浣忓畢涓虹┖锛岃鍏堟柊寤轰綇瀹� -10027=浣忓畢鍚嶇О涓嶈兘涓虹┖ -10028=璇ヤ綇瀹呭悕绉板凡缁忓瓨鍦紝璇锋敼鎹㈠啀璇� -10029=鍒犻櫎浣忓畢 -10030=瀵嗙爜涓嶈兘涓虹┖ -10031=鎴块棿鑳屾櫙鍥� -10032=鎴块棿鍚嶅瓧涓嶈兘涓虹┖ -10033=鏃� -11000=璇疯緭鍏ユ墜鏈�/閭 -11001=璇疯緭鍏ヤ笉灏戜簬6浣嶇殑瀵嗙爜 -11002=蹇樿瀵嗙爜 -11003=鐧诲綍 -11004=娉ㄥ唽 -11005=璐﹀彿 -11006=鎵嬫満鍙锋敞鍐� -11007=閭娉ㄥ唽 -11008=宸叉湁璐﹀彿锛熺櫥褰� -11009=璇疯緭鍏ユ墜鏈哄彿 - -11011=璇疯緭鍏ラ獙璇佺爜 -11012=鍙戦�侀獙璇佺爜 -11013=鎻愮ず -11014=鍙戦�侀獙璇佺爜鎴愬姛锛岃娉ㄦ剰鏌ユ敹 -11015=杩斿洖鐧诲綍鐣岄潰 -11016=璇疯緭鍏ラ偖绠� -11017=閫氳繃鎵嬫満鍙锋壘鍥� -11018=閫氳繃閭鎵惧洖 -11019=璇疯緭鍏ョ粦瀹氱殑鎵嬫満鍙凤紝浣犲皢浼氭敹鍒伴獙璇佺爜 -11020=璇疯緭鍏ョ粦瀹氱殑閭锛屼綘灏嗕細鏀跺埌楠岃瘉鐮� -11021=閲嶇疆瀵嗙爜 -11022=淇敼瀵嗙爜鎴愬姛锛岃閲嶆柊鐧诲綍 -11023=璐﹀彿瀵嗙爜鐧诲綍 -11024=鐧诲綍涓�... -11025=鎴块棿鍒楄〃 -11026=娣诲姞鎴块棿 -11027=鎴块棿鍚嶇О -11028=鍙栨秷 -11029=纭畾 -11030=瀹屾垚 -11031=璁剧疆鍐呭 -11032=璇疯缃埧闂村悕 -11033=鏈湴鍥惧簱 -11034=鎷嶇収 -11035=绯荤粺鐩稿唽 -11036=閫夋嫨鍥剧墖 -11037=鎴块棿宸插瓨鍦� -11038=鍔熻兘 -11039=鍦烘櫙 -11040=淇敼鎴块棿 -11041=鍒犻櫎 -11042=娣诲姞鍔熻兘 -11043=娣诲姞鍦烘櫙 -11044=鐏厜 -11045=娣诲姞鐏厜 -11046=鍚婄伅 -11047=绛掔伅 -11048=灏勭伅 -11049=璁惧鍚嶇О -11050=鎵�灞炲尯鍩� -11051=鍒嗕韩鐨� -11052=纭畾娣诲姞 -11053=鎵�灞炴ā鍧� -11054=娣诲姞 -11055=璁惧璁剧疆 -11056=璇疯緭鍏ュ満鏅悕绉� -11057=娣诲姞鎵ц鐩爣 -11058=娣诲姞璁惧鎴愬姛 -11059=鍏抽棴 -11060=璁惧 - -11062=纭畾鍒犻櫎璇ユ埧闂村悧锛� -11063=纭畾鍒犻櫎鍚楋紵 -11064=杩樻病娣诲姞鍦烘櫙 -11065=鑷姩鍖� - - - - - - - - - -11071=涓嬩竴姝� -11072=閫夋嫨鍖哄煙 -11073=閫夋嫨鎵ц璁惧 -11074=寮� -11075=璋冨厜 -11076=璇ヨ澶囧凡缁忔坊鍔犲埌璇ュ満鏅腑 -11077=鍦烘櫙鍚嶄笉鑳戒负绌� -11078=淇敼鍦烘櫙 -11079=鍦烘櫙鍚嶇О -11080=鍒囨崲浣忓畢 -11081=鏈縺娲� -11082=璇ョ敤鎴峰睘浜庤皟璇曡处鍙凤紝骞舵湭鍚敤 -11083=鏁版嵁骞朵笉鍦ㄦHDL鍖哄煙鏈嶅姟鍣� -11084=璐﹀彿鎴栧瘑鐮侀敊璇� -11085=璐﹀彿涓嶅瓨鍦紝璇峰厛娉ㄥ唽 -11086=鎻愪緵鐨勫弬鏁伴敊璇� -11087=楠岃瘉鐮侀敊璇� -11088=浣犵殑瀵嗙爜杩囦簬绠�鍗� -11089=璇疯緭鍏ユ纭殑閭 -11090=鎿嶄綔澶辫触 -11091=楠岃瘉鐮佸彂閫佸け璐� -11092=璇锋眰缃戝叧鏁版嵁澶辫触锛岃妫�鏌ョ綉鍏炽�佽澶囩綉缁滆繛鎺ユ槸鍚︽甯� -11093=鏃堕棿闂撮殧 -11094=鍦烘櫙宸茬粡瀛樺湪 -11095=娣诲姞鍦烘櫙澶辫触 -11096=绉� -11097=鍒嗛挓 -11098=鑷畾涔� - -11100=寤舵椂 -11101=鍙栨秷鏀惰棌 -11102=淇敼淇℃伅 -11103=鐧惧垎姣� -11104=鎴愬姛 -11105=鏈煡 -11106=鍐嶆杈撳叆瀵嗙爜 -11107=楠岃瘉鐮佸け鏁� - -12000=涓荤綉鍏充笉鍦ㄧ嚎 -12001=澶辫触锛岃閲嶈瘯 -12002=鍒犻櫎澶辫触锛屽満鏅负绌� -12003=璇ュ満鏅腑娌℃湁璁惧 -12004=褰撳墠APP鐗堟湰宸茬粡鏄渶鏂扮殑浜� -12005=鏇存柊 -12006=鏇存柊鍐呭 -12007=鏇存柊APP澶辫触锛岃閲嶈瘯 -12008=鎺у埗鍦烘櫙澶辫触锛岃閲嶈瘯 -12009=鍒犻櫎鍦烘櫙澶辫触锛岃閲嶈瘯 -12010=鏄惁淇濆瓨褰撳墠鏂板缓鎴块棿锛� -12011=鏇存柊涓�... -12012=鍙栨秷鏇存柊锛� -12013=鏂瑰悜涓庨檺浣� -12014=缁存姢妯″紡 -12015=鍚姩/绂佹鎵嬫媺寮�鍏� -12016=璧峰鏂瑰悜 -12017=姝e悜 -12018=鍙嶅悜 -12019=闄愪綅 -12020=寮�濮� -12021=缁撴潫 -12022=鎭㈠琛岀▼璁剧疆 -12023=鎭㈠琛岀▼璁剧疆鍚庯紝褰撳墠璁剧疆灏嗚鍒濆鍖栵紝纭畾缁х画鍚楋紵 -12024=鍒囨崲缁存姢妯″紡澶辫触 -12025=鏄惁璁剧疆褰撳墠浣嶇疆涓哄紑濮嬮檺浣嶏紵 -12026=鏄惁璁剧疆褰撳墠浣嶇疆涓虹粨鏉熼檺浣嶏紵 -12027=璁剧疆寮�濮嬮檺浣� -12028=璁剧疆缁撴潫闄愪綅 -12029=瀵艰建绉诲姩涓紝璇风瓑寰呫�傘�傘�� -12030=鎮ㄧ殑璐﹀彿宸插湪鍙︿竴鍙拌澶囩櫥褰曪紝鎮ㄥ凡琚己鍒朵笅绾� -12031=缂栬緫 -12032=鍦烘櫙涓凡鍖呭惈璇ュ満鏅� -12033=褰撳墠娌℃悳绱㈠埌缃戝叧锛岃鍏堟坊鍔犵綉鍏� -12034=褰撳墠娌℃湁鍙互娣诲姞鍒拌鎴块棿鐨勮澶� - -12035=閫夋嫨椋庨�� -12036=浣庨 -12037=涓 -12038=楂橀 -12039=閫夋嫨妯″紡 -12040=鑷姩 -12041=鍒跺喎 -12042=鍒剁儹 -12043=闄ゆ箍 -12044=閫侀 -12045=瀹ゆ俯 - -12046=绌鸿皟宸茬粡鍏抽棴锛岃鍏堟墦寮� -12047=璇ユ埧闂存槸鍒嗕韩杩囨潵鐨勶紝涓嶅厑璁歌繘琛岃鎿嶄綔 - - -12100=鏈煡璁惧 -12101=鎺у埗闈㈡澘 -12102=鐏厜 -12103=璋冨厜鐏� -12104=绐楀笜 -12105=绌鸿皟 -12106=浼犳劅鍣� -12107=绌烘皵寮�鍏� -12108=璋冨厜鐏� -12109=涓户鍣� - -12500=褰撳墠鎴块棿娌℃湁璁惧鍙互娣诲姞鍒板満鏅� -12501=寰�涓婄Щ鍔� -12502=寰�涓嬬Щ鍔� @@ -873,9 +707,9 @@ 15048=娣诲姞鏈夌嚎缃戝叧 15049=涓嬩竴姝� 15050=鍋滄鎼滅储 -15051=鏅鸿兘缃戝叧姝e湪閰嶇疆缃戠粶涓� +15051=姝e湪鎼滅储缃戝叧鈥� 15052=璇风◢鍊櫬仿仿� -15053=璇风‘淇濈綉鍏冲凡鐢ㄧ綉绾胯繛鎺� +15053=璇风‘淇濈綉鍏充笌缃戠嚎杩炴帴{0}绯荤粺鐏瘡绉掗棯鐑佷竴娆� 15054=缃戝叧鍚嶇О 15055=浣忓畢鍚嶇О 15056=瀹屾垚 @@ -884,7 +718,7 @@ 15059=閿欒 15060=纭 15061=鎻愮ず -15062=闇�閲嶆柊缁戝畾 +15062=鎹㈢粦 15063=宸茬粦瀹� 15064=鍦ㄧ嚎 15065=绂荤嚎 @@ -1010,7 +844,7 @@ 15189=宸茶缃梺璺� 15190=娣诲姞浼犳劅鍣� 15191=甯冮槻 -15192=纭畾瑕佹巿鏉冭璐﹀彿涓轰富璐﹀彿? +15192=纭畾鎺堟潈銆寋0}銆嶆垚涓虹鐞嗗憳? 15193=纭畾瑕佹挙閿�璇ユ垚鍛樼鐞嗘潈闄愬悧锛� 15194=鎴愬憳鎺堟潈 15195=鎴愬憳鎺堟潈鎴愬姛 @@ -1185,7 +1019,7 @@ 15398=缃戠粶杩炴帴涓�︹�� 15399=鑷畾涔夊浠� 15400=鍚屾鏁版嵁 -15401=瀛愮綉鍏� +15401=浠庣綉鍏� 15402=涓荤綉鍏� 15403=涓婁紶鏁版嵁 15404=纭畾鏄惁涓婁紶鏁版嵁鍒版湇鍔″櫒锛� @@ -1264,7 +1098,7 @@ 15489=鑾峰彇鎸夐敭闈㈡澘鑺傝兘妯″紡淇℃伅澶辫触 15490=璁剧疆鎸夐敭闈㈡澘鎸囩ず鐏鑹插け璐� 15491=鑾峰彇缃戝叧瀵硅薄澶辫触 -15492=鏄惁閲嶆柊缁戝畾缃戝叧? +15492=纭缁戝畾鏃х綉鍏筹紵 15493=缃戝叧瀵硅薄寮傚父,璇烽噸鏂伴�夋嫨缃戝叧 15494=閿欒:缃戝叧瀵硅薄涓㈠け 15495=绗笁鏂硅澶� @@ -1331,7 +1165,7 @@ 15562=鍏朵粬闃插尯閲屾病鏈夐厤缃紶鎰熷櫒璁惧 15563=褰撳墠姝e浜庡竷闃叉ā寮�,鏃犳硶鍒犻櫎璁惧 15564=宸插叡浜唴瀹� -15565=鏂板鍏变韩 +15565=鍒涘缓鏂板叡浜� 15566=浜у搧鍚嶇О 15567=璇疯緭鍏ヤ骇鍝佸悕绉� 15568=缂栬緫浜у搧鍚嶇О @@ -1347,7 +1181,7 @@ 15580=鍏变韩鏁版嵁鍚屾涓� 15581=璇烽厤缃叡浜澶� 15582=褰撳墠姝e浜庡竷闃叉ā寮�,鏃犳硶娣诲姞璁惧 -15583=鍏ㄩ儴鍖哄煙鏃犲彲鍏变韩鐨勮澶� +15583=鏃犲彲鍏变韩鐨勬埧闂� 15584=纭畾绉婚櫎閫変腑鐨勫満鏅紵 15585=鍒嗕韩鎴愬姛 15586=璇烽�夋嫨鐩爣鍚庡啀鎵ц鍒嗕韩鎿嶄綔 @@ -1532,6 +1366,21 @@ 15771=缂栬緫鎴块棿 15772=鑾峰彇涓�... 15773=瀛樺湪闈炴硶瀛楃銆寋0}銆� +15774=涓嶅瓨鍦ㄨ璐︽埛锛岃閲嶆柊杈撳叆 +15775=杩斿洖 +15776=杩樻病鏈夊叡浜尯鍩熺粰鎴愬憳{0}鍙偣鍑诲彸涓婅鈥�+鈥濇坊鍔� +15777=纭鍒犻櫎鍏变韩鎴块棿锛� +15778=杩樻病缁戝畾缃戝叧鍝� +15779=瑙e喅鏂规硶锛屽彲閫夋嫨鎵ц浠ヤ笅浠绘剰涓�绉嶆柟寮忥細 +15780=1.闀挎寜ZB/RST閿�20绉掞紝缃戝叧鎭㈠鍑哄巶璁剧疆锛屾寚绀虹伅鍏ㄩ儴鐔剓0}鐏悗锛岄噸鏂板叆缃戙�� +15781=2.鐐规寜HID/WCFG閿紝杩涘叆缃戝叧鎹㈢粦妯″紡锛岀郴缁熸寚绀虹伅蹇棯{0}5绉掋�� +15782=3.璇烽噸璇曪紝閲嶆柊娣诲姞缃戝叧銆� +15783=4.杩斿洖缃戝叧绠$悊銆� +15784=閲嶈瘯 +15785=杩斿洖缃戝叧绠$悊 +15786=鎼滅储澶辫触 +15787=(鏂�) +15788=姝e湪鎹㈢粦缃戝叧锛岃绋嶅�欌�� ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽� 18004=鎸囧畾缃戝叧宸茬粡琚粦瀹� diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/DoorLock/DelBackground.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/DoorLock/DelBackground.png new file mode 100755 index 0000000..5a18740 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/DoorLock/DelBackground.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/DoorLock/TemPasswordInvisiable.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/DoorLock/TemPasswordInvisiable.png new file mode 100755 index 0000000..c9bce73 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/DoorLock/TemPasswordInvisiable.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/PhoneImage.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/PhoneImage.png deleted file mode 100755 index ff8b680..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/PhoneImage.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGateway.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGateway.png index a35b196..077ac0d 100755 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGateway.png +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGateway.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGatewayInstruct.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGatewayInstruct.png index 5e999f5..3d18cca 100755 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGatewayInstruct.png +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGatewayInstruct.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGatewaySearching.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGatewaySearching.png new file mode 100755 index 0000000..a73220f --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WiredGatewaySearching.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WirelessGateway.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WirelessGateway.png index 5e0b1b3..b2f44c4 100755 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WirelessGateway.png +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Gateway/WirelessGateway.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/BottomButtonGround.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/BottomButtonGround.png new file mode 100755 index 0000000..6f7ad5b --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/BottomButtonGround.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/FailIcon.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/FailIcon.png new file mode 100755 index 0000000..5e7f089 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/FailIcon.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/InputAccountIcon.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/InputAccountIcon.png new file mode 100755 index 0000000..0bc95dc --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/InputAccountIcon.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/InputAccountIconSelected.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/InputAccountIconSelected.png new file mode 100755 index 0000000..537086b --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/InputAccountIconSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ItemSelected.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ItemSelected.png index 52c55d6..5dbc1ab 100755 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ItemSelected.png +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ItemSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ItemUnSelected.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ItemUnSelected.png new file mode 100755 index 0000000..1c00059 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ItemUnSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MemberNotEsixtPic.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MemberNotEsixtPic.png new file mode 100755 index 0000000..b441a8a --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MemberNotEsixtPic.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Message.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Message.png new file mode 100755 index 0000000..05d6834 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Message.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MessageSelected.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MessageSelected.png new file mode 100755 index 0000000..236fd0c --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MessageSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MyHome.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MyHome.png new file mode 100755 index 0000000..760da25 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/MyHome.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NextSelected.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NextSelected.png new file mode 100755 index 0000000..b8c3d12 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NextSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NotAuthority.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NotAuthority.png new file mode 100755 index 0000000..1e57c20 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NotAuthority.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NotShardPic.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NotShardPic.png new file mode 100755 index 0000000..095968e --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/NotShardPic.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconBackgroundColor.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/RoomIconBackground.png similarity index 100% copy from ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconBackgroundColor.png copy to ZigbeeApp/GateWay.Ios/Resources/Phone/Item/RoomIconBackground.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconSelectedBackgroundColor.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/RoomIconBackgroundSelected.png similarity index 100% copy from ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconSelectedBackgroundColor.png copy to ZigbeeApp/GateWay.Ios/Resources/Phone/Item/RoomIconBackgroundSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ScanQRcodeIcon.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ScanQRcodeIcon.png new file mode 100755 index 0000000..e6e9ce2 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ScanQRcodeIcon.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ScanQRcodeIconSelected.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ScanQRcodeIconSelected.png new file mode 100755 index 0000000..7281096 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/ScanQRcodeIconSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/SelectFloor_Right.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/SelectFloor_Right.png new file mode 100755 index 0000000..3f91ce3 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/SelectFloor_Right.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Shared.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Shared.png new file mode 100755 index 0000000..b7b0cb9 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Shared.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Timer.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Timer.png index 736599d..e26dff3 100755 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Timer.png +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Item/Timer.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Light/DeskLamp.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Light/DeskLamp.png new file mode 100755 index 0000000..31f5e9f --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Light/DeskLamp.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Light/DeskLampSelected.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Light/DeskLampSelected.png new file mode 100755 index 0000000..a0a01cc --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Light/DeskLampSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/FavoriteRoom.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/FavoriteRoom.png new file mode 100755 index 0000000..b516b16 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/FavoriteRoom.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/HomeBG.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/HomeBG.png deleted file mode 100755 index cd4994b..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/HomeBG.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/ItemSelected.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/ItemSelected.png new file mode 100755 index 0000000..526ab07 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/ItemSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/ItemUnSelected.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/ItemUnSelected.png new file mode 100755 index 0000000..e585d3d --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/ItemUnSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/ItemUnSelected_Black.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/ItemUnSelected_Black.png new file mode 100755 index 0000000..fb408e5 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/ItemUnSelected_Black.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/NoNameRoom.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/NoNameRoom.png new file mode 100755 index 0000000..d831f53 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/NoNameRoom.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r0.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r0.png deleted file mode 100755 index 48934fc..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r0.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r1.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r1.png deleted file mode 100755 index a2de21f..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r1.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r10.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r10.png deleted file mode 100755 index d413f1a..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r10.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r11.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r11.png deleted file mode 100755 index 4dbf445..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r11.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r12.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r12.png deleted file mode 100755 index 462e0c8..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r12.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r13.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r13.png deleted file mode 100755 index 9bdc9aa..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r13.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r14.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r14.png deleted file mode 100755 index dbfdb30..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r14.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r15.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r15.png deleted file mode 100755 index 0b447de..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r15.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r16.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r16.png deleted file mode 100755 index de1c4ed..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r16.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r17.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r17.png deleted file mode 100755 index a541cd1..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r17.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r18.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r18.png deleted file mode 100755 index f7cffea..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r18.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r19.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r19.png deleted file mode 100755 index de439f4..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r19.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r2.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r2.png deleted file mode 100755 index 8d6c085..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r2.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r20.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r20.png deleted file mode 100755 index c3fa6b9..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r20.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r21.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r21.png deleted file mode 100755 index 7a93d5b..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r21.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r22.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r22.png deleted file mode 100755 index 25f6057..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r22.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r23.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r23.png deleted file mode 100755 index 7e3e441..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r23.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r24.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r24.png deleted file mode 100755 index af9d1d8..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r24.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r3.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r3.png deleted file mode 100755 index 5386ba8..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r3.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r4.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r4.png deleted file mode 100755 index 32fabae..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r4.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r5.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r5.png deleted file mode 100755 index 346bde6..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r5.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r6.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r6.png deleted file mode 100755 index d16c81c..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r6.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r7.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r7.png deleted file mode 100755 index cccf7ac..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r7.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r8.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r8.png deleted file mode 100755 index 24ea738..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r8.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r9.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r9.png deleted file mode 100755 index 53a4c4d..0000000 --- a/ZigbeeApp/GateWay.Ios/Resources/Phone/Room/r9.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/1.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/1.png new file mode 100755 index 0000000..9cc9dbb --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/1.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/2.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/2.png new file mode 100755 index 0000000..73589e5 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/2.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/3.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/3.png new file mode 100755 index 0000000..cd45bfd --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/3.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/AddSelected.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/AddSelected.png new file mode 100755 index 0000000..d566501 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/AddSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/Ddmmablelight.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/Ddmmablelight.png new file mode 100755 index 0000000..0e35b54 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/Ddmmablelight.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/ac.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/ac.png new file mode 100755 index 0000000..0f83fb1 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/ac.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/add.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/add.png new file mode 100755 index 0000000..0de2e77 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/add.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/airswitch.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/airswitch.png new file mode 100755 index 0000000..3b8f3bb --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/airswitch.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/athome.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/athome.png new file mode 100755 index 0000000..d96ce54 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/athome.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/back.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/back.png new file mode 100755 index 0000000..01783ab --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/back.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/connect.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/connect.png new file mode 100755 index 0000000..cc0f634 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/connect.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/curtain.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/curtain.png new file mode 100755 index 0000000..78f44aa --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/curtain.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/delay.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/delay.png new file mode 100755 index 0000000..081e226 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/delay.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/delay1.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/delay1.png new file mode 100755 index 0000000..0556053 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/delay1.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/deviceselectedbackgroundcolor.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/deviceselectedbackgroundcolor.png new file mode 100755 index 0000000..222bdb9 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/deviceselectedbackgroundcolor.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/deviceunselectedbackgroundcolor.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/deviceunselectedbackgroundcolor.png new file mode 100755 index 0000000..5df12a6 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/deviceunselectedbackgroundcolor.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/dimmableLight.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/dimmableLight.png new file mode 100755 index 0000000..0e35b54 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/dimmableLight.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/doorlock.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/doorlock.png new file mode 100755 index 0000000..c8b0a0f --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/doorlock.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/drop-down.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/drop-down.png new file mode 100755 index 0000000..0ba04b0 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/drop-down.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/dropdown.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/dropdown.png new file mode 100755 index 0000000..b272b15 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/dropdown.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/function.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/function.png new file mode 100755 index 0000000..c493e4c --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/function.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/function1.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/function1.png new file mode 100755 index 0000000..7ab6716 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/function1.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/humidity.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/humidity.png new file mode 100755 index 0000000..3bfa89d --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/humidity.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconBackgroundColor.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/iconBackgroundColor.png similarity index 100% rename from ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconBackgroundColor.png rename to ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/iconBackgroundColor.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconSelectedBackgroundColor.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/iconSelectedBackgroundColor.png similarity index 100% rename from ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconSelectedBackgroundColor.png rename to ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/iconSelectedBackgroundColor.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/leavehome.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/leavehome.png new file mode 100755 index 0000000..171bf20 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/leavehome.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/light.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/light.png new file mode 100755 index 0000000..892e791 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/light.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/light_1.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/light_1.png new file mode 100755 index 0000000..892e791 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/light_1.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicaddcolor.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicaddcolor.png new file mode 100755 index 0000000..28a5977 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicaddcolor.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicbj1.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicbj1.png new file mode 100755 index 0000000..908bb80 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicbj1.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicbj2.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicbj2.png new file mode 100755 index 0000000..60c44ae --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicbj2.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicclose.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicclose.png new file mode 100755 index 0000000..6c5746d --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicclose.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicopen.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicopen.png new file mode 100755 index 0000000..f0f0a42 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/logicopen.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/next.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/next.png new file mode 100755 index 0000000..268e0c9 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/next.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/nodelay.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/nodelay.png new file mode 100755 index 0000000..bbd6e09 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/nodelay.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/nofunction.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/nofunction.png new file mode 100755 index 0000000..1da2679 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/nofunction.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/noon.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/noon.png new file mode 100755 index 0000000..56fa0f4 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/noon.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/noscene.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/noscene.png new file mode 100755 index 0000000..9a710fe --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/noscene.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/nosecurity.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/nosecurity.png new file mode 100755 index 0000000..395aaee --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/nosecurity.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/panel.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/panel.png new file mode 100755 index 0000000..b10227f --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/panel.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/point.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/point.png new file mode 100755 index 0000000..28e4411 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/point.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/position.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/position.png new file mode 100755 index 0000000..38a1707 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/position.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/scene.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/scene.png new file mode 100755 index 0000000..1a085e7 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/scene.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/scene1.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/scene1.png new file mode 100755 index 0000000..edef6af --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/scene1.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/security.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/security.png new file mode 100755 index 0000000..5ba9cf1 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/security.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/security1.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/security1.png new file mode 100755 index 0000000..0531aa4 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/security1.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selected.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selected.png new file mode 100755 index 0000000..8090a4e --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedac.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedac.png new file mode 100755 index 0000000..85d626d --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedac.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedairswitch.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedairswitch.png new file mode 100755 index 0000000..2699c8d --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedairswitch.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedcurtain.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedcurtain.png new file mode 100755 index 0000000..6940234 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedcurtain.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selecteddimmableLight.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selecteddimmableLight.png new file mode 100755 index 0000000..fb01d0b --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selecteddimmableLight.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selecteddoorlock.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selecteddoorlock.png new file mode 100755 index 0000000..ecabc55 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selecteddoorlock.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedlight.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedlight.png new file mode 100755 index 0000000..852cd65 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedlight.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedmonth.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedmonth.png new file mode 100755 index 0000000..d7779d3 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedmonth.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedpanel.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedpanel.png new file mode 100755 index 0000000..0bc3863 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedpanel.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsenor.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsenor.png new file mode 100755 index 0000000..ad426d7 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsenor.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor13.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor13.png new file mode 100755 index 0000000..34fd2c1 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor13.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor21.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor21.png new file mode 100755 index 0000000..aa12951 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor21.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor22.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor22.png new file mode 100755 index 0000000..aa12951 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor22.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor277.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor277.png new file mode 100755 index 0000000..3392659 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor277.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor40.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor40.png new file mode 100755 index 0000000..b73ce2a --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor40.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor42.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor42.png new file mode 100755 index 0000000..5015393 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor42.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor43.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor43.png new file mode 100755 index 0000000..bdffdb9 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor43.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor44.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor44.png new file mode 100755 index 0000000..d1c7c11 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/selectedsensor44.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor13.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor13.png new file mode 100755 index 0000000..2de7965 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor13.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor21.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor21.png new file mode 100755 index 0000000..36e2af3 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor21.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor22.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor22.png new file mode 100755 index 0000000..36e2af3 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor22.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor277.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor277.png new file mode 100755 index 0000000..cc0a514 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor277.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor40.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor40.png new file mode 100755 index 0000000..522a291 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor40.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor42.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor42.png new file mode 100755 index 0000000..1414d94 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor42.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor43.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor43.png new file mode 100755 index 0000000..0c519d8 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor43.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor44.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor44.png new file mode 100755 index 0000000..41653a0 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sensor44.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sign.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sign.png new file mode 100755 index 0000000..aff814c --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sign.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sunrise.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sunrise.png new file mode 100755 index 0000000..18073ca --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sunrise.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sunset.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sunset.png new file mode 100755 index 0000000..6dd40b9 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/sunset.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/temperature.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/temperature.png new file mode 100755 index 0000000..baa303e --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/temperature.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/time.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/time.png new file mode 100755 index 0000000..e54ecf3 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/time.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/timeparagraph.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/timeparagraph.png new file mode 100755 index 0000000..8872a53 --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/timeparagraph.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/timepoint.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/timepoint.png new file mode 100755 index 0000000..03a623e --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/timepoint.png Binary files differ diff --git a/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/withdrawal.png b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/withdrawal.png new file mode 100755 index 0000000..a54767d --- /dev/null +++ b/ZigbeeApp/GateWay.Ios/Resources/Phone/ZigeeLogic/withdrawal.png Binary files differ diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs index 97a93ac..2e4feb7 100755 --- a/ZigbeeApp/Shared/Common/CommonPage.cs +++ b/ZigbeeApp/Shared/Common/CommonPage.cs @@ -57,7 +57,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string CodeIDString = "1.0.19080501"; + public static string CodeIDString = "1.0.19101701"; /// <summary> /// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee) /// </summary> diff --git a/ZigbeeApp/Shared/Common/House.cs b/ZigbeeApp/Shared/Common/House.cs index 7d0728e..a76d259 100755 --- a/ZigbeeApp/Shared/Common/House.cs +++ b/ZigbeeApp/Shared/Common/House.cs @@ -307,6 +307,11 @@ Config.Instance.HomeId = GetHouseIdByFilePath(Config.Instance.HomeFilePathList[0]); } Config.Instance.Save(); + //妫�娴嬩綇瀹呭璞� + if (Config.Instance.Home.Id == string.Empty) + { + Config.Instance.Home = House.GetHouseByHouseId(Config.Instance.HomeId); + } } } } @@ -406,28 +411,31 @@ { get { - return GetFloorName(CurrentFloorId); + return GetFloorNameById(CurrentFloorId); } } /// <summary> - /// GetFloorName + /// 鑾峰彇妤煎眰鍚嶇О /// </summary> /// <param name="floorId"></param> /// <returns></returns> - public string GetFloorName(string floorId) + public string GetFloorNameById(string floorId) { - if (string.IsNullOrEmpty(floorId)) + if (Config.Instance.Home.FloorDics.Count == 0) { return null; } - if (Config.Instance.Home.FloorDics.Count == 0 || Config.Instance.Home.FloorDics.ContainsKey(floorId) == false) - { - return null; - } - return Config.Instance.Home.FloorDics[floorId]; - } + foreach (var floor in Config.Instance.Home.FloorDics) + { + if (floorId == floor.Key) + { + return floor.Value; + } + } + return null; + } #endregion diff --git a/ZigbeeApp/Shared/Common/Room.cs b/ZigbeeApp/Shared/Common/Room.cs index d29e34b..363128b 100755 --- a/ZigbeeApp/Shared/Common/Room.cs +++ b/ZigbeeApp/Shared/Common/Room.cs @@ -44,7 +44,7 @@ { get { - return GetFloorNameById(FloorId); + return Config.Instance.Home.GetFloorNameById(FloorId); } } /// <summary> @@ -134,7 +134,7 @@ { return new List<string> { }; } - return GetLoveRoom().DeviceUIFilePathList; + return CurrentRoom.GetLoveRoom().DeviceUIFilePathList; } } @@ -349,7 +349,7 @@ /// 鑾峰彇鍠滅埍鎴块棿 /// </summary> /// <returns></returns> - public static Room GetLoveRoom() + public Room GetLoveRoom() { return CurrentRoom.GetRoomById(LoveRoomId); } @@ -450,6 +450,16 @@ } /// <summary> + /// 鏍规嵁鎴块棿鍚嶅瓧锛岃幏鍙栨埧闂村璞� + /// </summary> + /// <returns>The room by name.</returns> + /// <param name="roomName">鎴块棿鍚�</param> + public Room GetRoomByName(string roomName) + { + return Lists.Find((obj) => obj.Name == roomName); + } + + /// <summary> /// 鏍规嵁璁惧鑾峰彇鎴块棿鍚嶅瓧(妤煎眰+鎴块棿鍚�) /// </summary> /// <returns>鎴块棿鍚�</returns> @@ -519,6 +529,55 @@ return null; } + /// <summary> + /// 鑾峰彇褰撳墠妤煎眰鐨勬埧闂� + /// </summary> + /// <param name="id"></param> + /// <returns></returns> + public List<Room> GetRoomsByFloorId(string id) + { + return Lists.FindAll((obj) => obj.FloorId==id); + } + /// <summary> + /// 鑾峰彇褰撳墠妤煎眰鐨勬埧闂村悕绉� + /// </summary> + /// <param name="id"></param> + /// <returns></returns> + public List<string> GetRoomNamesByFloorId(string id) + { + List<string> names = new List<string> { }; + foreach(var r in Lists) + { + if(r.FloorId==id) + { + names.Add(r.Name); + } + } + return names; + } + + /// <summary> + /// 鑾峰彇褰撳墠妤煎眰鐨勬埧闂�(鎷兼帴浜嗐�愬父鐢ㄣ�戝湪绗竴浣�) + /// </summary> + /// <param name="id"></param> + /// <returns></returns> + public List<Room> GetRoomsByFloorIdAppendLoveRoom(string id) + { + var r= Lists.FindAll((obj) => obj.FloorId == id); + r.Insert(0, GetLoveRoom()); + return r; + } + + /// <summary> + /// 鑾峰彇褰撳墠妤煎眰鐨勬埧闂�(鎷兼帴浜嗐�愬父鐢ㄣ�戝湪绗竴浣�) + /// </summary> + /// <returns></returns> + public List<Room> GetRoomsByCurrentFloorIdAppendLoveRoom() + { + var r = Lists.FindAll((obj) => obj.FloorId == Config.Instance.Home.CurrentFloorId); + r.Insert(0, GetLoveRoom()); + return r; + } #endregion @@ -689,7 +748,6 @@ #endregion #region 鈼� 鍒犻櫎璁惧_________________________ - /// <summary> /// 鍒犻櫎鍔熻兘-璁惧 /// </summary> @@ -826,6 +884,56 @@ } return Common.LocalDevice.Current.SortDevice(listDevice); } + + /// <summary> + /// 鑾峰彇鎴块棿璁惧绫诲瀷 + /// </summary> + /// <param name="room"></param> + /// <returns></returns> + public static List<DeviceType> GetdeviceTypes(Room room) + { + List<DeviceType> typeList = new List<DeviceType> { }; + foreach (var deviceUI in room.DeviceUIList) + { + if (deviceUI == null || deviceUI.CommonDevice == null) + { + continue; + } + if (!typeList.Contains(deviceUI.CommonDevice.Type)) + { + typeList.Add(deviceUI.CommonDevice.Type); + } + } + return typeList; + } + + /// <summary> + /// 鑾峰彇璇ョ被鍨嬬殑璁惧 + /// </summary> + /// <param name="room"></param> + /// <param name="deviceType"></param> + /// <returns></returns> + public static List<DeviceUI> GetDeviceUIs(Room room ,DeviceType deviceType) + { + List<DeviceUI> typeList = new List<DeviceUI> { }; + foreach (var deviceUI in room.DeviceUIList) + { + if (deviceUI == null || deviceUI.CommonDevice == null) + { + continue; + } + if(deviceUI.CommonDevice.Type!=deviceType) + { + continue; + } + if (!typeList.Contains(deviceUI)) + { + typeList.Add(deviceUI); + } + } + return typeList; + } + #endregion @@ -1310,33 +1418,6 @@ } #endregion - - #region 鈼� 妤煎眰___________________________ - - /// <summary> - /// 鑾峰彇妤煎眰鍚嶇О - /// </summary> - /// <param name="floorId"></param> - /// <returns></returns> - public string GetFloorNameById(string floorId) - { - if (Config.Instance.Home.FloorDics.Count == 0) - { - return null; - } - - foreach (var floor in Config.Instance.Home.FloorDics) - { - if (floorId == floor.Key) - { - return floor.Value; - } - } - return null; - } - - #endregion - } } diff --git a/ZigbeeApp/Shared/Common/SceneRoomUI.cs b/ZigbeeApp/Shared/Common/SceneRoomUI.cs index 8bdc70d..3692d3f 100755 --- a/ZigbeeApp/Shared/Common/SceneRoomUI.cs +++ b/ZigbeeApp/Shared/Common/SceneRoomUI.cs @@ -88,8 +88,7 @@ if (sceneDeviceList.getSceneDeviceListInfo != null) { var deviceList = sceneDeviceList.getSceneDeviceListInfo.DeviceList; - CategoryAddScene.sceneTargetDevicesList?.Clear(); - CategoryAddScene.beforeSceneTargetDevicesList?.Clear(); + //CategoryAddScene.sceneTargetDevicesList?.Clear(); //绱姞寤舵椂 int AddedDelayTime = 0; if (deviceList != null && Shared.Common.Room.AllRoomDeviceUIList.Count != 0) @@ -109,19 +108,19 @@ if (sceneDev.DelayTime - AddedDelayTime > 0) { var sceneTargetDeviceTime = new SceneTargetDeviceUI { Type = 1, DelayTime = sceneDev.DelayTime - AddedDelayTime }; - CategoryAddScene.sceneTargetDevicesList.Add(sceneTargetDeviceTime); - CategoryAddScene.beforeSceneTargetDevicesList.Add(sceneTargetDeviceTime); + //CategoryAddScene.sceneTargetDevicesList.Add(sceneTargetDeviceTime); + //CategoryAddScene.beforeSceneTargetDevicesList.Add(sceneTargetDeviceTime); var sceneTargetDevice = new SceneTargetDeviceUI { Type = 0, DeviceUI = dev, TaskList = sceneDev.TaskList }; - CategoryAddScene.sceneTargetDevicesList.Add(sceneTargetDevice); - CategoryAddScene.beforeSceneTargetDevicesList.Add(sceneTargetDevice); + //CategoryAddScene.sceneTargetDevicesList.Add(sceneTargetDevice); + //CategoryAddScene.beforeSceneTargetDevicesList.Add(sceneTargetDevice); AddedDelayTime = sceneDev.DelayTime; } else { var sceneTargetDevice = new SceneTargetDeviceUI { Type = 0, DeviceUI = dev, TaskList = sceneDev.TaskList }; - CategoryAddScene.sceneTargetDevicesList.Add(sceneTargetDevice); - CategoryAddScene.beforeSceneTargetDevicesList.Add(sceneTargetDevice); + //CategoryAddScene.sceneTargetDevicesList.Add(sceneTargetDevice); + //CategoryAddScene.beforeSceneTargetDevicesList.Add(sceneTargetDevice); } } } @@ -137,18 +136,18 @@ if (sceneDev.DelayTime - AddedDelayTime > 0) { var sceneTargetDeviceTime = new SceneTargetDeviceUI { Type = 1, DelayTime = sceneDev.DelayTime - AddedDelayTime }; - CategoryAddScene.sceneTargetDevicesList.Add(sceneTargetDeviceTime); - CategoryAddScene.beforeSceneTargetDevicesList.Add(sceneTargetDeviceTime); + //CategoryAddScene.sceneTargetDevicesList.Add(sceneTargetDeviceTime); + //CategoryAddScene.beforeSceneTargetDevicesList.Add(sceneTargetDeviceTime); var sceneTargetDeviceScene = new SceneTargetDeviceUI { Type = 2, ElseScenesId = sceneDev.ElseScenesId, SceneName = localSceneName }; - CategoryAddScene.sceneTargetDevicesList.Add(sceneTargetDeviceScene); - CategoryAddScene.beforeSceneTargetDevicesList.Add(sceneTargetDeviceScene); + //CategoryAddScene.sceneTargetDevicesList.Add(sceneTargetDeviceScene); + //CategoryAddScene.beforeSceneTargetDevicesList.Add(sceneTargetDeviceScene); AddedDelayTime = sceneDev.DelayTime; } else { var sceneTargetDeviceScene = new SceneTargetDeviceUI { Type = 2, ElseScenesId = sceneDev.ElseScenesId, SceneName = localSceneName }; - CategoryAddScene.sceneTargetDevicesList.Add(sceneTargetDeviceScene); - CategoryAddScene.beforeSceneTargetDevicesList.Add(sceneTargetDeviceScene); + //CategoryAddScene.sceneTargetDevicesList.Add(sceneTargetDeviceScene); + //CategoryAddScene.beforeSceneTargetDevicesList.Add(sceneTargetDeviceScene); } } } @@ -161,11 +160,11 @@ var scene = new CategoryAddScene(); Phone.UserView.HomePage.Instance.AddChidren(scene); Phone.UserView.HomePage.Instance.PageIndex += 1; - CategoryAddScene.SceneText = sceneUI.Name; - CategoryAddScene.CurrentRoom = room; - CategoryAddScene.ModifySceneUI = sceneUI; - CategoryAddScene.Modify = true; - CategoryAddScene.ImagePath = sceneUI.IconPath; + //CategoryAddScene.SceneText = sceneUI.Name; + //scene.curRoom = room; + //CategoryAddScene.ModifySceneUI = sceneUI; + //CategoryAddScene.Modify = true; + //CategoryAddScene.ImagePath = sceneUI.IconPath; scene.Show(); } catch (Exception ex) diff --git a/ZigbeeApp/Shared/Common/SceneTargetDeviceUI.cs b/ZigbeeApp/Shared/Common/SceneTargetDeviceUI.cs index 06a88f2..0f3e214 100755 --- a/ZigbeeApp/Shared/Common/SceneTargetDeviceUI.cs +++ b/ZigbeeApp/Shared/Common/SceneTargetDeviceUI.cs @@ -12,6 +12,10 @@ public class SceneTargetDeviceUI { /// <summary> + /// 鍦烘櫙娣诲姞瀵硅薄鐨勭被鍨� 榛樿0璁惧 1鏃堕棿娈� 2鍦烘櫙 + /// </summary> + public int Type = 0; + /// <summary> /// 浠诲姟鍒楄〃涓殑鏁版嵁鍒楄〃 /// Type=0 瀛樺湪 /// </summary> @@ -22,19 +26,15 @@ /// </summary> public DeviceUI DeviceUI = new DeviceUI(); /// <summary> - /// 閫夋嫨鐨勫満鏅� - /// Type=2 瀛樺湪 - /// </summary> - public SceneUI SceneUI = new SceneUI(); - /// <summary> /// 寤舵椂鏃堕棿 /// Type=1 瀛樺湪 /// </summary> public int DelayTime = 0; /// <summary> - /// 鍦烘櫙娣诲姞瀵硅薄鐨勭被鍨� 榛樿0璁惧 1鏃堕棿娈� 2鍦烘櫙 + /// 閫夋嫨鐨勫満鏅� + /// Type=2 瀛樺湪 /// </summary> - public int Type = 0; + public SceneUI SceneUI = new SceneUI(); /// <summary> /// 浣滀负鎴愬憳鐨勫叾浠栧満鏅痠d銆� /// Type=2 瀛樺湪 @@ -56,14 +56,5 @@ return GetHashCode().ToString(); } } - - //public string TargetHasd - //{ - // get - // { - // return GetHashCode().ToString(); - // } - //} - } } diff --git a/ZigbeeApp/Shared/Common/ZigbeeColor.cs b/ZigbeeApp/Shared/Common/ZigbeeColor.cs index 1b07814..b05ebc5 100755 --- a/ZigbeeApp/Shared/Common/ZigbeeColor.cs +++ b/ZigbeeApp/Shared/Common/ZigbeeColor.cs @@ -35,6 +35,7 @@ public uint XMGray1 = 0xff232323; public uint XMGray2 = 0xff666666; public uint XMGray3 = 0xff999999; + public uint XMGray4 = 0xffcccccc; public uint XMOrange = 0xfffc744b; public uint XMVerticalSeekBar = 0xffececec; public uint XMDel = 0xffF75858; @@ -84,14 +85,14 @@ /// 瀛椾綋娴呰壊 0xFFCBCACA /// </summary> public uint GXCTextGrayColor3 = 0xFFCBCACA; - /// <summary> - /// 瀛椾綋娴呰壊 0xFF666666 - /// </summary> - public uint GXCTextGrayColor4 = 0xFF666666; - /// <summary> - /// 瀛椾綋閫変腑棰滆壊 0xFFFC744B - /// </summary> - public uint GXCTextSelectedColor = 0xFFFC744B; + /// <summary> + /// 瀛椾綋娴呰壊 0xFF666666 + /// </summary> + public uint GXCTextGrayColor4 = 0xFF666666; + /// <summary> + /// 瀛椾綋閫変腑棰滆壊 0xFFFC744B + /// </summary> + public uint GXCTextSelectedColor = 0xFFFC744B; /// <summary> /// 瀛椾綋閫変腑棰滆壊 0xFFFB744A /// </summary> @@ -241,20 +242,20 @@ public uint GXCTextBlueColor = 0xFF00AAF0; - - - + + + public uint GXCBorderRedColor = 0xFFF44D4D; public uint GXCButtonBlueColor = 0xFF00AAF0; public uint GXCButtonUnselectedColor = 0xFFAAAAAA; - public uint GXCTextUnselectedColor= 0xFFD5D6D7; - - + public uint GXCTextUnselectedColor = 0xFFD5D6D7; + + public uint GXCSelectedColor = 0xFFFE5E00;//閫変腑棰滆壊 public uint GXCButtonhardWhiteColor = 0xFFE0E0E0;//鎴块棿btn鍗婇�忔槑鑳屾櫙鑹� - + /// <summary> /// 30%閫忔槑搴﹂粦鑹� /// </summary> @@ -290,7 +291,7 @@ public uint LogicTextBlueColor = 0xFF00AAF0; public uint LogicDelBackgroundColor = 0xFFFF0000; public uint LogicEditBlackColor = 0xFF00aaf0; - public uint LogicTimeViewColor = 0xFFFFFFFF; + public uint LogicTimeViewColor= 0xFFFFFFFF; public uint LogicTimeViewSaveButton = 0xFF121212; //鏈�鏂癠I棰滆壊 public uint LogicTopBackgroundColor = 0xFFF9F9F9; diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs index 0c0e063..0aa8117 100755 --- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs @@ -36,9 +36,13 @@ /// </summary> private ButtonLineForm automationBtn; /// <summary> - /// 涓儴鑳屾櫙bodyView + /// 鍦烘櫙鍔熻兘涓儴鑳屾櫙bodyView /// </summary> public FrameLayout functionSceneBodyView; + /// <summary> + /// 涓儴鑳屾櫙bodyView + /// </summary> + public FrameLayout functionSceneAutoBodyView; /// <summary> /// 鐩稿悓鐨勮澶囧垪琛� /// </summary> @@ -539,6 +543,7 @@ /// <param name="selectedBtn">閫変腑閭d釜鐣岄潰 0--鍔熻兘 1--鍦烘櫙 2--鑷姩鍖� </param> public void Show(int selectedBtn = 1) { + ZbGateway.StatusList.Add(this); RemoveAll(); @@ -639,76 +644,13 @@ functionSceneAutoBG.AddChidren(selectFloorBtn); } - var roomFL = new HorizontalScrolViewLayout() + functionSceneAutoBodyView = new FrameLayout { - X= Application.GetRealWidth(CommonFormResouce.X_Left), Y = functionSceneAutoBG.Bottom, - Height = Application.GetRealHeight(167), - Width=Application.GetRealWidth(CommonPage.AppRealWidth-CommonFormResouce.X_Left), + Height = Application.GetRealHeight(1423), 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 = roomFL.Bottom, - Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.TabbarHeight) - functionBtn.Height - topView.Height - roomFL.Height - CommonPage.LineHeight, - BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor - }; - midFL.AddChidren(functionSceneBodyView); + midFL.AddChidren(functionSceneAutoBodyView); if (selectedBtn == 0) { @@ -763,10 +705,11 @@ { var floors = new SelectFloor (); AddChidren(floors); - floors.Init(599,357); + floors.Init(599,357,Direction.Right); floors.FloorAction += (floorName) => { floorBtn.Text = floorName; + RefreshBodyView(); }; } @@ -843,12 +786,6 @@ var scene = new CategoryAddScene(); UserView.HomePage.Instance.AddChidren(scene); UserView.HomePage.Instance.PageIndex += 1; - CategoryAddScene.sceneTargetDevicesList?.Clear(); - CategoryAddScene.SceneText = ""; - CategoryAddScene.CurrentRoom = Shared.Common.Room.CurrentRoom; - CategoryAddScene.ModifySceneUI = null; - CategoryAddScene.Modify = false; - CategoryAddScene.ImagePath = "Scene/Scene0.png"; scene.Show(); } @@ -875,7 +812,7 @@ /// </summary> public void RefreshBodyView() { - functionSceneBodyView.RemoveAll(); + functionSceneAutoBodyView.RemoveAll(); if (functionBtn.IsSelected) { ShowFunction(); @@ -898,590 +835,7 @@ /// </summary> public void ShowFunction() { - //绉婚櫎鐩戝惉 - RemoveAllUpdateControlDeviceStatuAction(); - //閫夋嫨鍔熻兘--鐩存帴浠庢埧闂寸殑devicelist涓幏鍙� - Shared.Common.Room.GetAllRoomDeviceUIList(); - Shared.Common.Room.GetAllRoomDeviceTypeList(); - if (Common.Room.AllRoomDeviceUIList == null) - { - return; - } - if (Common.Room.AllRoomDeviceUIList.Count == 0) - { - ShowNoFunctionTip(); - } - else - { - functionTypeScrowView = new HorizontalScrolViewLayout - { - X=Application.GetRealWidth(CommonFormResouce.X_Left), - Height = Application.GetRealHeight(279), - Width = Application.GetRealWidth(1028), - BackgroundColor=ZigbeeColor.Current.GXCBackgroundColor - }; - functionSceneBodyView.AddChidren(functionTypeScrowView); - - deviceListScrolView = new VerticalScrolViewLayout - { - 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 FunctionButton(); - - foreach (var deviceType in Common.Room.AllRoomDeviceTypeList) - { - typeRowLayout = new RowLayout() - { - Width = Application.GetRealWidth(CommonPage.AppRealWidth / 5), - LineColor = ZigbeeColor.Current.GXCBackgroundColor, - Tag = deviceType - }; - functionTypeScrowView.AddChidren(typeRowLayout); - - functionTypeIMG = new FunctionButton() - { - Tag = deviceType - }; - functionTypeIMG.Init(DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType), DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType)); - functionTypeIMG.SetTitle(DeviceUI.GetDeviceTypeName(deviceType)); - typeRowLayout.AddChidren(functionTypeIMG); - - - functionTypeIMG.ImageBtn.MouseUpEventHandler += ShowSameTypeFunction; - functionTypeIMG.NameBtn.MouseUpEventHandler += ShowSameTypeFunction; - functionTypeIMG.ImageBG.MouseUpEventHandler += ShowSameTypeFunction; - - if (deviceType == Shared.Common.Room.AllRoomDeviceUIList[0].CommonDevice.Type) - { - ShowSameTypeFunction(functionTypeIMG.ImageBtn, null); - } - } - } - } - - /// <summary> - /// 鏄剧ず鐩稿悓绫诲瀷鐨勫姛鑳� - /// </summary> - /// <param name="typeSender">typeSender.</param> - /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param> - private void ShowSameTypeFunction(object typeSender, MouseEventArgs mouseEventArgs) - { - //閫夋嫨鍔熻兘--鐩存帴浠庢埧闂寸殑devicelist涓幏鍙� - Shared.Common.Room.GetAllRoomDeviceUIList(); - tempFunctionTypeBtn.IsSelected = false; - tempFunctionTypeBtn = (typeSender as Button).Parent as FunctionButton; - ((typeSender as Button).Parent as FunctionButton).IsSelected = true; - - deviceListScrolView.RemoveAll(); - - var sameTypeList = new List<DeviceUI> { }; - foreach (var devieceUI in Common.Room.AllRoomDeviceUIList) - { - if (devieceUI == null || devieceUI.CommonDevice == null) - { - continue; - } - if (devieceUI.CommonDevice.Type.ToString() == (typeSender as Button).Tag.ToString()) - { - if (!sameTypeList.Contains(devieceUI)) - { - sameTypeList.Add(devieceUI); - } - } - } - foreach (var deviceUI in sameTypeList) - { - //鍒犻櫎璁惧 - EventHandler<MouseEventArgs> delEvent = (delSender, delE) => - { - 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); - deviceListScrolView.RemoveViewByTag((delSender as Button).Tag); - sameTypeList.Remove(deviceUI); - if (sameTypeList.Count == 0) - { - RefreshBodyView(); - } - } - }; - }; - EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) => - { - var detailInfo = new Device.CommonForm.DeviceDetailInfo { }; - UserView.HomePage.Instance.AddChidren(detailInfo); - UserView.HomePage.Instance.PageIndex += 1; - detailInfo.Show(deviceUI, Shared.Common.Room.CurrentRoom); - detailInfo.action = RefreshBodyView; - }; - - if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.OnOffOutput) - { - //鐏� - var light = deviceUI.CommonDevice as ZigBee.Device.ToggleLight; - //琛ヤ笂闈炶繙绋� - if (light.Gateway == null) - { - continue; - } - if (light.Gateway.IsVirtual) - { - UserHomeView.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 deviceTypeRowLayout = new RowLayout() - { - Height = Application.GetRealHeight(127+35), - LineColor = ZigbeeColor.Current.GXCBackgroundColor, - Tag = deviceUI - }; - deviceListScrolView.AddChidren(deviceTypeRowLayout); - - 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); - (send2 as CommonForm.SelectedStatuButton).IsSelected = !(send2 as CommonForm.SelectedStatuButton).IsSelected; - if ((send2 as CommonForm.SelectedStatuButton).IsSelected) - { - light.SwitchControl(1); - } - else - { - light.SwitchControl(0); - } - //鎺у埗寤舵椂鍥炶皟 - DeviceUI.SendCommandDelayAction(deviceUI.CommonDevice, () => - { - if (Parent == null) - { - return; - } - RemoveUpdateControlDeviceStatuAction(zbGateway); - if (sendedControlCommand == false) - { - DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL); - } - }); - }; - - var editBtn = new CommonForm.RowLayoutEditButton() - { - Tag = deviceUI, - Radius = 0 - }; - deviceTypeRowLayout.AddRightView(editBtn); - editBtn.MouseUpEventHandler += deviceDetailHandler; - - var delBtn = new Device.CommonForm.RowLayoutDeleteButton() - { - Tag = deviceUI, - Radius = 0 - }; - deviceTypeRowLayout.AddRightView(delBtn); - delBtn.MouseUpEventHandler += delEvent; - } - else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.AirSwitch) - { - //绌烘皵寮�鍏� - var airSwitch = deviceUI.CommonDevice as ZigBee.Device.AirSwitch; - //琛ヤ笂闈炶繙绋� - if (airSwitch.Gateway == null) - { - continue; - } - if (airSwitch.Gateway.IsVirtual) - { - UserHomeView.ReadStatus(airSwitch, () => - { - airSwitch.ReadOnOffStatus(); - airSwitch.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); - }); - } - else - { - if ((DateTime.Now - airSwitch.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan) - { - airSwitch.ReadOnOffStatus(); - airSwitch.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); - } - } - - var deviceTypeRowLayout = new RowLayout() - { - Height = Application.GetRealHeight(127 + 35), - LineColor = ZigbeeColor.Current.GXCBackgroundColor, - Tag = deviceUI - }; - deviceListScrolView.AddChidren(deviceTypeRowLayout); - - 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); - - (send2 as CommonForm.SelectedStatuButton).IsSelected = !(send2 as CommonForm.SelectedStatuButton).IsSelected; - if ((send2 as CommonForm.SelectedStatuButton).IsSelected) - { - airSwitch.SwitchControl(1); - } - else - { - airSwitch.SwitchControl(0); - } - //鎺у埗寤舵椂鍥炶皟 - DeviceUI.SendCommandDelayAction(deviceUI.CommonDevice, () => - { - if (Parent == null) - { - return; - } - RemoveUpdateControlDeviceStatuAction(zbGateway); - if (sendedControlCommand == false) - { - DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL); - } - }); - }; - - var editBtn = new CommonForm.RowLayoutEditButton() - { - Tag = deviceUI, - Radius = 0 - }; - deviceTypeRowLayout.AddRightView(editBtn); - editBtn.MouseUpEventHandler += deviceDetailHandler; - - var delBtn = new Device.CommonForm.RowLayoutDeleteButton() - { - Tag = deviceUI, - Radius = 0 - }; - deviceTypeRowLayout.AddRightView(delBtn); - delBtn.MouseUpEventHandler += delEvent; - } - else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.DimmableLight) - { - //璋冨厜鐏� - var dimmableLight = deviceUI.CommonDevice as ZigBee.Device.DimmableLight; - //琛ヤ笂闈炶繙绋� - if (dimmableLight.Gateway == null) - { - continue; - } - if (dimmableLight.Gateway.IsVirtual) - { - UserHomeView.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 deviceTypeRowLayout = new RowLayout() - { - Height = Application.GetRealHeight(127 + 35), - LineColor = ZigbeeColor.Current.GXCBackgroundColor, - Tag = deviceUI - }; - deviceListScrolView.AddChidren(deviceTypeRowLayout); - - 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); - - (send2 as CommonForm.SelectedStatuButton).IsSelected = !(send2 as CommonForm.SelectedStatuButton).IsSelected; - if ((send2 as CommonForm.SelectedStatuButton).IsSelected) - { - dimmableLight.SwitchControl(1); - } - else - { - dimmableLight.SwitchControl(0); - } - //鎺у埗寤舵椂鍥炶皟 - DeviceUI.SendCommandDelayAction(deviceUI.CommonDevice, () => - { - if (Parent == null) - { - return; - } - RemoveUpdateControlDeviceStatuAction(zbGateway); - if (sendedControlCommand == false) - { - DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL); - } - }); - }; - - var editBtn = new CommonForm.RowLayoutEditButton() - { - Tag = deviceUI, - Radius = 0 - }; - deviceTypeRowLayout.AddRightView(editBtn); - editBtn.MouseUpEventHandler += deviceDetailHandler; - - var delBtn = new Device.CommonForm.RowLayoutDeleteButton() - { - Tag = deviceUI, - Radius = 0 - }; - deviceTypeRowLayout.AddRightView(delBtn); - delBtn.MouseUpEventHandler += delEvent; - - } - else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.Thermostat) - { - //绌鸿皟 - var ac = deviceUI.CommonDevice as ZigBee.Device.AC; - //琛ヤ笂闈炶繙绋� - if (ac.Gateway == null) - { - continue; - } - if (ac.Gateway.IsVirtual) - { - //鍙戦�佽鍙栫姸鎬佸懡浠� - UserView.UserHomeView.ReadStatus(ac, () => - { - ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); - ac.ReadFanMode(); - ac.ReadSystemMode(); - ac.ReadLocalTemperature(); - ac.ReadCoolingSetpoint(); - ac.ReadHeatingSetpoint(); - }); - } - else - { - //闃叉鐭椂闂村唴澶氭璇诲彇璁惧鐘舵�� - 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(); - } - } - - var deviceTypeRowLayout = new RowLayout() - { - Height = Application.GetRealHeight(127 + 35), - LineColor = ZigbeeColor.Current.GXCBackgroundColor, - Tag = deviceUI - }; - deviceListScrolView.AddChidren(deviceTypeRowLayout); - - 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); - - (send2 as CommonForm.SelectedStatuButton).IsSelected = !(send2 as CommonForm.SelectedStatuButton).IsSelected; - if ((send2 as CommonForm.SelectedStatuButton).IsSelected) - { - ac.Open(); - } - else - { - ac.Close(); - } - //鎺у埗寤舵椂鍥炶皟 - DeviceUI.SendCommandDelayAction(deviceUI.CommonDevice, () => - { - if (Parent == null) - { - return; - } - RemoveUpdateControlDeviceStatuAction(zbGateway); - if (sendedControlCommand == false) - { - DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL); - } - }); - }; - - var editBtn = new CommonForm.RowLayoutEditButton() - { - Tag = deviceUI, - Radius = 0 - }; - deviceTypeRowLayout.AddRightView(editBtn); - editBtn.MouseUpEventHandler += deviceDetailHandler; - - var delBtn = new Device.CommonForm.RowLayoutDeleteButton() - { - Tag = deviceUI, - Radius = 0 - }; - deviceTypeRowLayout.AddRightView(delBtn); - delBtn.MouseUpEventHandler += delEvent; - } - else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.WindowCoveringDevice) - { - //鍗峰笜 - var rollerShade = deviceUI.CommonDevice as ZigBee.Device.Rollershade; - //涓嶄笂闈炶繙绋� - if (rollerShade.Gateway == null) - { - continue; - } - if (rollerShade.Gateway.IsVirtual) - { - UserHomeView.ReadStatus(rollerShade, () => - { - rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); - }); - } - else - { - //闃叉鐭椂闂村唴澶氭璇诲彇 - if ((DateTime.Now - rollerShade.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan) - { - rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); - } - } - - - var deviceTypeRowLayout = new RowLayout() - { - Height = Application.GetRealHeight(127 + 35), - LineColor = ZigbeeColor.Current.GXCLineColor, - Tag = deviceUI - }; - deviceListScrolView.AddChidren(deviceTypeRowLayout); - - 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() - { - Tag = deviceUI, - Radius = 0 - }; - deviceTypeRowLayout.AddRightView(editBtn); - editBtn.MouseUpEventHandler += deviceDetailHandler; - - var delBtn = new Device.CommonForm.RowLayoutDeleteButton() - { - Tag = deviceUI, - Radius = 0 - }; - deviceTypeRowLayout.AddRightView(delBtn); - delBtn.MouseUpEventHandler += delEvent; - - - deviceRow.SwitchBtn.MouseUpEventHandler += (sender, e) => - { - zbGateway = deviceUI.CommonDevice.Gateway; - sendedControlCommand = false; - zbGateway.ReportAction += UpdateDeviceControllStatu; - AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, deviceUI.CommonDevice); - - (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, () => - { - if (Parent == null) - { - return; - } - RemoveUpdateControlDeviceStatuAction(zbGateway); - if (sendedControlCommand == false) - { - DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL); - } - }); - }; - } - else - { - - } - } + AddRoomView(); } /// <summary> @@ -1505,13 +859,681 @@ Height = Application.GetRealHeight(200), Width = Application.GetRealWidth(700), Gravity = Gravity.CenterHorizontal, - TextID = R.MyInternationalizationString.NoFunction, - //Text = "娌℃湁鍔熻兘 \n 璇峰湪涓汉涓績涓�--璁惧绠$悊澶勬坊鍔�", + Text = Language.StringByID(R.MyInternationalizationString.NoFunction).Replace("{\\r\\n}","\r\n"), TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor, TextAlignment = TextAlignment.Center, IsMoreLines=true }; functionSceneBodyView.AddChidren(noFunctionTip); + } + + /// <summary> + /// RefreshFunction + /// </summary> + /// <param name="room"></param> + private void RefreshFunction(Common.Room room) + { + //绉婚櫎鐩戝惉 + RemoveAllUpdateControlDeviceStatuAction(); + functionSceneBodyView.RemoveAll(); + + if (room.DeviceUIList.Count == 0) + { + ShowNoFunctionTip(); + } + else + { + functionTypeScrowView = new HorizontalScrolViewLayout + { + X = Application.GetRealWidth(CommonFormResouce.X_Left), + Height = Application.GetRealHeight(279), + Width = Application.GetRealWidth(1028), + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor + }; + functionSceneBodyView.AddChidren(functionTypeScrowView); + + deviceListScrolView = new VerticalScrolViewLayout + { + 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 FunctionButton(); + + EventHandler<MouseEventArgs> ShowSameTypeFunction = (object typeSender, MouseEventArgs mouseEventArgs) => + { + tempFunctionTypeBtn.IsSelected = false; + tempFunctionTypeBtn = (typeSender as Button).Parent as FunctionButton; + ((typeSender as Button).Parent as FunctionButton).IsSelected = true; + + deviceListScrolView.RemoveAll(); + + var sameTypeList = new List<DeviceUI> { }; + foreach (var devieceUI in room.DeviceUIList) + { + if (devieceUI == null || devieceUI.CommonDevice == null) + { + continue; + } + if (devieceUI.CommonDevice.Type.ToString() == (typeSender as Button).Tag.ToString()) + { + if (!sameTypeList.Contains(devieceUI)) + { + sameTypeList.Add(devieceUI); + } + } + } + foreach (var deviceUI in sameTypeList) + { + //鍒犻櫎璁惧 + EventHandler<MouseEventArgs> delEvent = (delSender, delE) => + { + 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); + deviceListScrolView.RemoveViewByTag((delSender as Button).Tag); + sameTypeList.Remove(deviceUI); + if (sameTypeList.Count == 0) + { + RefreshBodyView(); + } + } + }; + }; + EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) => + { + var detailInfo = new Device.CommonForm.DeviceDetailInfo { }; + UserView.HomePage.Instance.AddChidren(detailInfo); + UserView.HomePage.Instance.PageIndex += 1; + detailInfo.Show(deviceUI, Shared.Common.Room.CurrentRoom); + detailInfo.action = RefreshBodyView; + }; + + if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.OnOffOutput) + { + //鐏� + var light = deviceUI.CommonDevice as ZigBee.Device.ToggleLight; + //琛ヤ笂闈炶繙绋� + if (light.Gateway == null) + { + continue; + } + if (light.Gateway.IsVirtual) + { + UserHomeView.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 deviceTypeRowLayout = new RowLayout() + { + Height = Application.GetRealHeight(127 + 35), + LineColor = ZigbeeColor.Current.GXCBackgroundColor, + Tag = deviceUI + }; + deviceListScrolView.AddChidren(deviceTypeRowLayout); + + 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); + (send2 as CommonForm.SelectedStatuButton).IsSelected = !(send2 as CommonForm.SelectedStatuButton).IsSelected; + if ((send2 as CommonForm.SelectedStatuButton).IsSelected) + { + light.SwitchControl(1); + } + else + { + light.SwitchControl(0); + } + //鎺у埗寤舵椂鍥炶皟 + DeviceUI.SendCommandDelayAction(deviceUI.CommonDevice, () => + { + if (Parent == null) + { + return; + } + RemoveUpdateControlDeviceStatuAction(zbGateway); + if (sendedControlCommand == false) + { + DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL); + } + }); + }; + + var editBtn = new CommonForm.RowLayoutEditButton() + { + Tag = deviceUI, + Radius = 0 + }; + deviceTypeRowLayout.AddRightView(editBtn); + editBtn.MouseUpEventHandler += deviceDetailHandler; + + var delBtn = new Device.CommonForm.RowLayoutDeleteButton() + { + Tag = deviceUI, + Radius = 0 + }; + deviceTypeRowLayout.AddRightView(delBtn); + delBtn.MouseUpEventHandler += delEvent; + } + else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.AirSwitch) + { + //绌烘皵寮�鍏� + var airSwitch = deviceUI.CommonDevice as ZigBee.Device.AirSwitch; + //琛ヤ笂闈炶繙绋� + if (airSwitch.Gateway == null) + { + continue; + } + if (airSwitch.Gateway.IsVirtual) + { + UserHomeView.ReadStatus(airSwitch, () => + { + airSwitch.ReadOnOffStatus(); + airSwitch.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); + }); + } + else + { + if ((DateTime.Now - airSwitch.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan) + { + airSwitch.ReadOnOffStatus(); + airSwitch.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); + } + } + + var deviceTypeRowLayout = new RowLayout() + { + Height = Application.GetRealHeight(127 + 35), + LineColor = ZigbeeColor.Current.GXCBackgroundColor, + Tag = deviceUI + }; + deviceListScrolView.AddChidren(deviceTypeRowLayout); + + 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); + + (send2 as CommonForm.SelectedStatuButton).IsSelected = !(send2 as CommonForm.SelectedStatuButton).IsSelected; + if ((send2 as CommonForm.SelectedStatuButton).IsSelected) + { + airSwitch.SwitchControl(1); + } + else + { + airSwitch.SwitchControl(0); + } + //鎺у埗寤舵椂鍥炶皟 + DeviceUI.SendCommandDelayAction(deviceUI.CommonDevice, () => + { + if (Parent == null) + { + return; + } + RemoveUpdateControlDeviceStatuAction(zbGateway); + if (sendedControlCommand == false) + { + DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL); + } + }); + }; + + var editBtn = new CommonForm.RowLayoutEditButton() + { + Tag = deviceUI, + Radius = 0 + }; + deviceTypeRowLayout.AddRightView(editBtn); + editBtn.MouseUpEventHandler += deviceDetailHandler; + + var delBtn = new Device.CommonForm.RowLayoutDeleteButton() + { + Tag = deviceUI, + Radius = 0 + }; + deviceTypeRowLayout.AddRightView(delBtn); + delBtn.MouseUpEventHandler += delEvent; + } + else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.DimmableLight) + { + //璋冨厜鐏� + var dimmableLight = deviceUI.CommonDevice as ZigBee.Device.DimmableLight; + //琛ヤ笂闈炶繙绋� + if (dimmableLight.Gateway == null) + { + continue; + } + if (dimmableLight.Gateway.IsVirtual) + { + UserHomeView.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 deviceTypeRowLayout = new RowLayout() + { + Height = Application.GetRealHeight(127 + 35), + LineColor = ZigbeeColor.Current.GXCBackgroundColor, + Tag = deviceUI + }; + deviceListScrolView.AddChidren(deviceTypeRowLayout); + + 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); + + (send2 as CommonForm.SelectedStatuButton).IsSelected = !(send2 as CommonForm.SelectedStatuButton).IsSelected; + if ((send2 as CommonForm.SelectedStatuButton).IsSelected) + { + dimmableLight.SwitchControl(1); + } + else + { + dimmableLight.SwitchControl(0); + } + //鎺у埗寤舵椂鍥炶皟 + DeviceUI.SendCommandDelayAction(deviceUI.CommonDevice, () => + { + if (Parent == null) + { + return; + } + RemoveUpdateControlDeviceStatuAction(zbGateway); + if (sendedControlCommand == false) + { + DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL); + } + }); + }; + + var editBtn = new CommonForm.RowLayoutEditButton() + { + Tag = deviceUI, + Radius = 0 + }; + deviceTypeRowLayout.AddRightView(editBtn); + editBtn.MouseUpEventHandler += deviceDetailHandler; + + var delBtn = new Device.CommonForm.RowLayoutDeleteButton() + { + Tag = deviceUI, + Radius = 0 + }; + deviceTypeRowLayout.AddRightView(delBtn); + delBtn.MouseUpEventHandler += delEvent; + + } + else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.Thermostat) + { + //绌鸿皟 + var ac = deviceUI.CommonDevice as ZigBee.Device.AC; + //琛ヤ笂闈炶繙绋� + if (ac.Gateway == null) + { + continue; + } + if (ac.Gateway.IsVirtual) + { + //鍙戦�佽鍙栫姸鎬佸懡浠� + UserView.UserHomeView.ReadStatus(ac, () => + { + ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); + ac.ReadFanMode(); + ac.ReadSystemMode(); + ac.ReadLocalTemperature(); + ac.ReadCoolingSetpoint(); + ac.ReadHeatingSetpoint(); + }); + } + else + { + //闃叉鐭椂闂村唴澶氭璇诲彇璁惧鐘舵�� + 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(); + } + } + + var deviceTypeRowLayout = new RowLayout() + { + Height = Application.GetRealHeight(127 + 35), + LineColor = ZigbeeColor.Current.GXCBackgroundColor, + Tag = deviceUI + }; + deviceListScrolView.AddChidren(deviceTypeRowLayout); + + 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); + + (send2 as CommonForm.SelectedStatuButton).IsSelected = !(send2 as CommonForm.SelectedStatuButton).IsSelected; + if ((send2 as CommonForm.SelectedStatuButton).IsSelected) + { + ac.Open(); + } + else + { + ac.Close(); + } + //鎺у埗寤舵椂鍥炶皟 + DeviceUI.SendCommandDelayAction(deviceUI.CommonDevice, () => + { + if (Parent == null) + { + return; + } + RemoveUpdateControlDeviceStatuAction(zbGateway); + if (sendedControlCommand == false) + { + DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL); + } + }); + }; + + var editBtn = new CommonForm.RowLayoutEditButton() + { + Tag = deviceUI, + Radius = 0 + }; + deviceTypeRowLayout.AddRightView(editBtn); + editBtn.MouseUpEventHandler += deviceDetailHandler; + + var delBtn = new Device.CommonForm.RowLayoutDeleteButton() + { + Tag = deviceUI, + Radius = 0 + }; + deviceTypeRowLayout.AddRightView(delBtn); + delBtn.MouseUpEventHandler += delEvent; + } + else if (deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.WindowCoveringDevice) + { + //鍗峰笜 + var rollerShade = deviceUI.CommonDevice as ZigBee.Device.Rollershade; + //涓嶄笂闈炶繙绋� + if (rollerShade.Gateway == null) + { + continue; + } + if (rollerShade.Gateway.IsVirtual) + { + UserHomeView.ReadStatus(rollerShade, () => + { + rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); + }); + } + else + { + //闃叉鐭椂闂村唴澶氭璇诲彇 + if ((DateTime.Now - rollerShade.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan) + { + rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); + } + } + + + var deviceTypeRowLayout = new RowLayout() + { + Height = Application.GetRealHeight(127 + 35), + LineColor = ZigbeeColor.Current.GXCLineColor, + Tag = deviceUI + }; + deviceListScrolView.AddChidren(deviceTypeRowLayout); + + 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() + { + Tag = deviceUI, + Radius = 0 + }; + deviceTypeRowLayout.AddRightView(editBtn); + editBtn.MouseUpEventHandler += deviceDetailHandler; + + var delBtn = new Device.CommonForm.RowLayoutDeleteButton() + { + Tag = deviceUI, + Radius = 0 + }; + deviceTypeRowLayout.AddRightView(delBtn); + delBtn.MouseUpEventHandler += delEvent; + + + deviceRow.SwitchBtn.MouseUpEventHandler += (sender, e) => + { + zbGateway = deviceUI.CommonDevice.Gateway; + sendedControlCommand = false; + zbGateway.ReportAction += UpdateDeviceControllStatu; + AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, deviceUI.CommonDevice); + + (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, () => + { + if (Parent == null) + { + return; + } + RemoveUpdateControlDeviceStatuAction(zbGateway); + if (sendedControlCommand == false) + { + DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL); + } + }); + }; + } + else + { + + } + } + }; + + foreach (var deviceType in Common.Room.GetdeviceTypes(room)) + { + typeRowLayout = new RowLayout() + { + Width = Application.GetRealWidth(CommonPage.AppRealWidth / 5), + LineColor = ZigbeeColor.Current.GXCBackgroundColor, + Tag = deviceType + }; + functionTypeScrowView.AddChidren(typeRowLayout); + + functionTypeIMG = new FunctionButton() + { + Tag = deviceType + }; + functionTypeIMG.Init(DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType), DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType)); + functionTypeIMG.SetTitle(DeviceUI.GetDeviceTypeName(deviceType)); + typeRowLayout.AddChidren(functionTypeIMG); + + + functionTypeIMG.ImageBtn.MouseUpEventHandler += ShowSameTypeFunction; + functionTypeIMG.NameBtn.MouseUpEventHandler += ShowSameTypeFunction; + functionTypeIMG.ImageBG.MouseUpEventHandler += ShowSameTypeFunction; + + if (deviceType == room.DeviceUIList[0].CommonDevice.Type) + { + ShowSameTypeFunction(functionTypeIMG.ImageBtn, null); + } + + } + + + } + } + + /// <summary> + /// AddRoomView + /// </summary> + private void AddRoomView() + { + var roomFL = new HorizontalScrolViewLayout() + { + X = Application.GetRealWidth(CommonFormResouce.X_Left), + Height = Application.GetRealHeight(167), + Width = Application.GetRealWidth(CommonPage.AppRealWidth - CommonFormResouce.X_Left), + BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor + }; + functionSceneAutoBodyView.AddChidren(roomFL); + + //鍔熻兘鍜屽満鏅痓odyView + functionSceneBodyView = new FrameLayout() + { + Y = roomFL.Bottom, + Height = Application.GetRealHeight(1316), + BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor + }; + functionSceneAutoBodyView.AddChidren(functionSceneBodyView); + + Button curBtn = new Button(); + foreach (var room in Common.Room.CurrentRoom.GetRoomsByCurrentFloorIdAppendLoveRoom()) + { + 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 (room.IsLove) + { + roomBtn.IsSelected = true; + curBtn = roomBtn; + + if(sceneBtn.IsSelected) + { + RefreshScene(room); + } + else + { + RefreshFunction(room); + } + + } + roomBtn.MouseUpEventHandler += (sender, e) => + { + if ((sender as Button) == curBtn) + { + return; + } + (sender as Button).IsSelected = true; + curBtn.IsSelected = false; + curBtn = sender as Button; + if (sceneBtn.IsSelected) + { + RefreshScene(room); + } + else + { + RefreshFunction(room); + } + }; + } + } #endregion @@ -1522,15 +1544,16 @@ /// </summary> public void ShowScene() { - //鍒锋柊鍦烘櫙 - //var reFreshResult=await Shared.Common.Room.RefreshSceneUIList(); - Shared.Common.SceneRoomUI.GetAllSceneRoomUIList(); - if (SceneRoomUI.AllSceneRoomUIList == null) - { - return; - } - var sceneList = SceneRoomUI.AllSceneRoomUIList; - Shared.Common.Room.GetAllRoomDeviceUIList(); + AddRoomView(); + } + + /// <summary> + /// RefreshScene + /// </summary> + /// <param name="room"></param> + public void RefreshScene(Common.Room room) + { + var sceneList = room.SceneUIList; if (sceneList.Count == 0) { ShowNoSceneTip(); @@ -1539,24 +1562,22 @@ { var sceneScrolView = new VerticalScrolViewLayout { - Y=Application.GetRealHeight(58) + Y = Application.GetRealHeight(58) }; functionSceneBodyView.AddChidren(sceneScrolView); - foreach (var sceneRoomUI in sceneList) + foreach (var scene in sceneList) { var sceneFL = new FrameLayout() { Height = Application.GetRealHeight(446), - Gravity = Gravity.CenterHorizontal, BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor, - Tag = sceneRoomUI + Tag = scene }; sceneScrolView.AddChidren(sceneFL); - var sceneRowLayout = new RowLayout() + var sceneRowLayout = new RowLayout { Y = Application.GetRealHeight(46), Height = Application.GetRealHeight(446 - 46), - Gravity = Gravity.CenterHorizontal, LineColor = ZigbeeColor.Current.GXCGrayBackgroundColor, Radius = CommonPage.BigFormRadius }; @@ -1564,33 +1585,34 @@ var sceneImg = new Button() { - X=Application.GetRealWidth(179), - Width=Application.GetMinReal(844), - Height=Application.GetMinReal(400), - Gravity = Gravity.CenterVertical, - UnSelectedImagePath = sceneRoomUI.sceneUI.IconPath, - Radius = (uint)Application.GetRealHeight(CommonFormResouce.BigFormRadius) + X = Application.GetRealWidth(179), + Width = Application.GetRealWidth(844), + Height = Application.GetRealHeight(400), + BackgroundColor = ZigbeeColor.Current.GXCRedColor, + UnSelectedImagePath = scene.IconPath, + Radius = (uint)Application.GetRealHeight(17) }; sceneRowLayout.AddChidren(sceneImg); var leftFL = new FrameLayout { - X=Application.GetRealWidth(CommonFormResouce.X_Left), + X = Application.GetRealWidth(CommonFormResouce.X_Left), + Y = Application.GetRealHeight(58), Width = Application.GetRealWidth(251), Height = Application.GetRealHeight(282), - Gravity=Gravity.CenterVertical, - BackgroundColor = ZigbeeColor.Current.GXCBlackBackgroundColor2 + BackgroundColor = ZigbeeColor.Current.GXCBlackBackgroundColor2, + Radius = (uint)Application.GetRealHeight(17) }; sceneRowLayout.AddChidren(leftFL); var collectionBtn = new Button { - X=Application.GetRealWidth(23), - Y=Application.GetRealHeight(23), - Width=Application.GetMinRealAverage(65), - Height=Application.GetMinRealAverage(65), - UnSelectedImagePath="Item/Collection.png", - SelectedImagePath="Item/CollectionSelected.png" + X = Application.GetRealWidth(23), + Y = Application.GetRealHeight(23), + Width = Application.GetMinRealAverage(65), + Height = Application.GetMinRealAverage(65), + UnSelectedImagePath = "Item/Collection.png", + SelectedImagePath = "Item/CollectionSelected.png" }; leftFL.AddChidren(collectionBtn); @@ -1599,9 +1621,9 @@ Width = Application.GetRealWidth(176), Height = Application.GetRealHeight(200), TextColor = ZigbeeColor.Current.GXCTextWhiteColor, - Text = sceneRoomUI.sceneUI.Name, + Text = scene.Name, Gravity = Gravity.Center, - IsMoreLines=true + IsMoreLines = true }; leftFL.AddChidren(sceneNameBtn); @@ -1609,36 +1631,35 @@ var delayBtn = new RowLayoutDeleteButton { TextID = R.MyInternationalizationString.Delay, - Tag = sceneRoomUI.sceneUI.SceneDelayTime + Tag = scene.SceneDelayTime }; sceneRowLayout.AddLeftView(delayBtn); //缂栬緫 var settingBtn = new Device.CommonForm.RowLayoutEditButton() { - TextID=R.MyInternationalizationString.Setting, - Tag = sceneRoomUI.sceneUI.SceneDelayTime + TextID = R.MyInternationalizationString.Setting, + Tag = scene.SceneDelayTime }; //鍒犻櫎 var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton { - Tag = sceneRoomUI + Tag = scene }; - if (!sceneRoomUI.room.IsSharedRoom) + if (!room.IsSharedRoom) { sceneRowLayout.AddRightView(settingBtn); sceneRowLayout.AddRightView(deleteBtn); } //璋冪敤鍦烘櫙 - EventHandler<MouseEventArgs> sceneUpHandler = async (sender, e) => { //1鎴愬姛 0澶辫触 //鍚庨潰琛ヤ笂鐩稿叧鎻愮ず //瑕佸厛浠庣綉鍏宠鍙栧欢鏃舵槸鍚︽鍦ㄦ墽琛岋紝濡傛灉鏄繘琛屽�掕鏃讹紝涓嶅厑璁稿湪鐐瑰嚮 - var sceneOpenAllData = await ZigBee.Device.Scene.ControlSceneAsync(sceneRoomUI.sceneUI.Id, sceneRoomUI.sceneUI.SceneDelayTime); + var sceneOpenAllData = await ZigBee.Device.Scene.ControlSceneAsync(scene.Id, scene.SceneDelayTime); //涓荤綉鍏充笉鍦ㄧ嚎 if (sceneOpenAllData == null) { @@ -1678,7 +1699,7 @@ if (e1) { //0 绉婚櫎澶辫触 1 绉婚櫎鎴愬姛 2 娌℃湁璇ュ満鏅� - var removeSceneAllData = await ZigBee.Device.Scene.DeleteSceneAsync(sceneRoomUI.sceneUI.Id); + var removeSceneAllData = await ZigBee.Device.Scene.DeleteSceneAsync(scene.Id); if (removeSceneAllData == null || removeSceneAllData.removeSceneData == null) { //CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheMainGatewayIsNotOnLine); @@ -1688,7 +1709,7 @@ //1鎴愬姛 if (removeSceneAllData.removeSceneData.Result == 1) { - sceneRoomUI.room.RemoveScene(sceneRoomUI.sceneUI); + room.RemoveScene(scene); //RefreshBodyView(); sceneScrolView.RemoveViewByTag((sender as Button).Tag); } @@ -1701,7 +1722,7 @@ //2 娌℃湁璇ュ満鏅� else if (removeSceneAllData.removeSceneData.Result == 2) { - sceneRoomUI.room.RemoveScene(sceneRoomUI.sceneUI); + room.RemoveScene(scene); //RefreshBodyView(); sceneScrolView.RemoveViewByTag((sender as Button).Tag); CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneIsNull); @@ -1714,7 +1735,7 @@ //缂栬緫鍦烘櫙 settingBtn.MouseUpEventHandler += (sender, e) => { - SceneRoomUI.EditScene(sceneRoomUI.sceneUI, sceneRoomUI.room); + SceneRoomUI.EditScene(scene,room); }; //缂栬緫寤舵椂 delayBtn.MouseUpEventHandler += (sender, e) => @@ -1737,7 +1758,7 @@ // { // if (ss.Id == sceneRoomUI.sceneUI.Id) // { - // ss.SceneDelayTime = int.Parse(obj.Split(' ')[0]); + // //ss.SceneDelayTime = int.Parse(obj.Split(' ')[0]); // sceneRoomUI.room.Save(); // RefreshBodyView(); // return; @@ -1770,7 +1791,7 @@ Height = Application.GetRealHeight(200), Width = Application.GetRealWidth(700), Gravity = Gravity.CenterHorizontal, - TextID = R.MyInternationalizationString.NoScene, + Text = Language.StringByID(R.MyInternationalizationString.NoScene).Replace("{\\r\\n}","\r\n"), TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor, TextAlignment = TextAlignment.Center, IsMoreLines = true diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs index 7ccbe78..48f3418 100755 --- a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs @@ -15,25 +15,34 @@ /// 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> { }; /// <summary> - /// 璁板綍缂栬緫鍓嶇殑璁惧鍒楄〃 + /// floorIds /// </summary> - public static List<SceneTargetDeviceUI> beforeSceneTargetDevicesList = new List<SceneTargetDeviceUI> { }; - public static bool Modify = false; - public static SceneUI ModifySceneUI = null; + List<string> floorIds = new List<string> { }; /// <summary> - /// 鍥剧墖鏉ユ簮 0--鏈湴鍥惧簱 1--鎷嶇収 2--绯荤粺鍥惧簱 + /// floorNames /// </summary> - public static int IconType = 0; + List<string> floorNames = new List<string> { }; + /// <summary> + /// roomNames + /// </summary> + List<List<string>> roomNames = new List<List<string>> { }; + /// <summary> + /// roomNames + /// </summary> + List<List<Common.Room>> rooms = new List<List<Common.Room>> { }; + /// <summary> + /// ImagePath + /// </summary> + private string ImagePath="SceneIcon/1.png"; + /// <summary> + /// curRoom + /// </summary> + private Common.Room curRoom; + /// <summary> + /// sceneTargetDevicesList + /// </summary> + private List<SceneTargetDeviceUI> sceneTargetDevicesList = new List<SceneTargetDeviceUI> { }; /// <summary> /// 娣诲姞鐩爣鍚庣殑灞曠ず鍒楄〃 @@ -51,20 +60,20 @@ /// 纭畾鎸夐挳鏈�寮�濮嬬殑鍧愭爣 /// </summary> private readonly int ConfirmButton_Y = CommonPage.AppRealHeight - 300; - /// <summary> - /// 纭畾鎸夐挳涓嬬Щ鍚庣殑鍧愭爣 - /// </summary> - private readonly int ConfirmButton_Change_Y = CommonPage.AppRealHeight - 130; - /// <summary> - /// 璁板綍鏇存敼鍓嶇殑鎴块棿 - /// </summary> - private Shared.Common.Room oldRoom; + #endregion + + /// <summary> + /// CategoryAddScene + /// </summary> public CategoryAddScene() { BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; Tag = "categoryAddScene"; } + /// <summary> + /// RemoveFromParent + /// </summary> public override void RemoveFromParent() { Category.instance?.RefreshBodyView(); @@ -76,16 +85,6 @@ public void RefreshTargetListView() { TargetListScrolView.RemoveAll(); - if (sceneTargetDevicesList.Count >= 2) - { - TargetListScrolView.Height = Application.GetRealHeight(TargetListScrolView_RowHeight * 3); - confirmBtn.Y = Application.GetRealHeight(ConfirmButton_Change_Y); - } - else - { - TargetListScrolView.Height = Application.GetRealHeight(TargetListScrolView_RowHeight * 2); - confirmBtn.Y = Application.GetRealHeight(ConfirmButton_Y); - } if (sceneTargetDevicesList.Count > 0) { @@ -111,8 +110,9 @@ } var targetRowLayout = new RowLayout() { + Height = Application.GetRealHeight(160), LineColor = ZigbeeColor.Current.GXCLineColor, - Height = Application.GetRealHeight(170) + BackgroundColor=ZigbeeColor.Current.GXCBackgroundColor }; TargetListScrolView.AddChidren(targetRowLayout); @@ -159,21 +159,6 @@ TextColor = ZigbeeColor.Current.GXCTextWhiteColor }; targetRowLayout.AddRightView(devRight); - //寤舵椂 - devTimer.MouseUpEventHandler += (sender, e) => - { - /////******鏆傛椂鍏堜笉鍔犲欢鏃讹紝瀹夊崜鎺т欢鏈夐棶棰�*******//// - var tList = new List<string> { }; - 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(obj.Split(' ')[0]); - // }, Language.StringByID(R.MyInternationalizationString.Confrim)); - }; //鍒犻櫎璁惧 devRight.MouseUpEventHandler += (sender, e) => { @@ -260,10 +245,20 @@ //鏃堕棿闂撮殧 else if (targetDevice.Type == 1) { - var delayTimeView = new CategorySceneSelectedDelayTime(); + var delayTimeView = new SelectDelayTime(); UserView.HomePage.Instance.AddChidren(delayTimeView); UserView.HomePage.Instance.PageIndex += 1; - delayTimeView.Show(1, targetDevice.SceneTargetDeviceUIID); + delayTimeView.sceneTargetDevice = targetDevice; + delayTimeView.Show(); + delayTimeView.selectedTimeAction = (second) => + { + var targetDeviceUI = sceneTargetDevicesList.Find((obj) => obj.SceneTargetDeviceUIID == second.SceneTargetDeviceUIID); + if (targetDeviceUI != null) + { + targetDeviceUI.DelayTime = second.DelayTime; + } + RefreshTargetListView(); + }; } //鍦烘櫙 else if (targetDevice.Type == 2) @@ -286,6 +281,8 @@ /// </summary> public void Show() { + Init(); + AddTop(); AddBodyView(); @@ -295,9 +292,26 @@ #region Add____________________________________ /// <summary> + /// Init + /// </summary> + private void Init() + { + foreach (var floor in Config.Instance.Home.FloorDics) + { + floorIds.Add(floor.Key); + floorNames.Add(floor.Value); + if(Common.Room.CurrentRoom.GetRoomsByFloorId(floor.Key).Count>0) + { + roomNames.Add(Common.Room.CurrentRoom.GetRoomNamesByFloorId(floor.Key)); + rooms.Add(Common.Room.CurrentRoom.GetRoomsByFloorId(floor.Key)); + } + } + } + + /// <summary> /// AddTop /// </summary> - public void AddTop() + private void AddTop() { var top = new TopFrameLayout(); AddChidren(top); @@ -307,13 +321,12 @@ { RemoveFromParent(); }; - } /// <summary> /// AddBodyView /// </summary> - public void AddBodyView() + private void AddBodyView() { bodyFrameLayout = new FrameLayout() { @@ -336,7 +349,8 @@ Height = Application.GetRealHeight(464), Gravity = Gravity.Center, Radius = (uint)Application.GetRealHeight(CommonFormResouce.BigFormRadius), - UnSelectedImagePath = ImagePath + //UnSelectedImagePath = ImagePath + UnSelectedImagePath = "SceneIcon/3.png" }; imgFL.AddChidren(backGround); @@ -350,73 +364,87 @@ var infoEdit = new Button { - X=Application.GetRealWidth(CommonFormResouce.X_Left), + X = Application.GetRealWidth(CommonFormResouce.X_Left), Height = Application.GetRealHeight(130), - Width=Application.GetRealWidth(700), + Width = Application.GetRealWidth(700), TextID = R.MyInternationalizationString.EditInfo, TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor, - TextAlignment=TextAlignment.CenterLeft, - TextSize=14 + TextAlignment = TextAlignment.CenterLeft, + TextSize = 14 }; infoFL.AddChidren(infoEdit); var nameRow = new DeviceInfoEditRow(130); nameRow.Init(); - nameRow.SetTipTitle(R.MyInternationalizationString.SceneName); + nameRow.SetTipTitle($"{Language.StringByID(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); + zoneRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.BelongZone)}:"); + //zoneRow.SetTitle(curRoom.Name); infoFL.AddChidren(zoneRow); + zoneRow.HideLine(false); var targetFL = new FrameLayout() { Y = infoFL.Bottom + Application.GetRealHeight(23), + Height = Application.GetRealHeight(730) + }; + bodyFrameLayout.AddChidren(targetFL); + + var targetBG = new FrameLayout + { Height = Application.GetRealHeight(334), BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; - bodyFrameLayout.AddChidren(targetFL); + targetFL.AddChidren(targetBG); + + var addTargetFL = new FrameLayout + { + Y=Application.GetRealHeight(46), + Height = Application.GetRealHeight(127), + }; + targetFL.AddChidren(addTargetFL); var target = new Button() { X = Application.GetRealWidth(CommonFormResouce.X_Left), - Y = Application.GetRealHeight(46), Height = Application.GetRealHeight(127) - 1, Width = Application.GetRealWidth(600), TextAlignment = TextAlignment.CenterLeft, TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextID = R.MyInternationalizationString.AddScentTargetAction, + Gravity = Gravity.CenterVertical }; - targetFL.AddChidren(target); + addTargetFL.AddChidren(target); - var targetAdd = new SelectedStatuButton() + var targetAdd = new Button { X = Application.GetRealWidth(950), Y = Application.GetRealHeight(46), Width = Application.GetMinRealAverage(72), Height = Application.GetMinRealAverage(72), + Gravity=Gravity.CenterVertical, UnSelectedImagePath = "Item/Add.png", - SelectedImagePath = "Item/AddSelected.png", }; - targetFL.AddChidren(targetAdd); + addTargetFL.AddChidren(targetAdd); var targetLine = new Button() { Y = target.Bottom, Height = 1, BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2 }; - targetFL.AddChidren(targetLine); + addTargetFL.AddChidren(targetLine); //娣诲姞鐩爣鍚庣殑灞曠ず鍒楄〃 TargetListScrolView = new VerticalScrolViewLayout() { Y = targetLine.Bottom, - Height = Application.GetRealHeight(173), - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor + Height = Application.GetRealHeight(730-127), + //BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; targetFL.AddChidren(TargetListScrolView); @@ -425,45 +453,22 @@ RefreshTargetListView(); - #region 鑳屾櫙鍥� 鍚嶇О 鍖哄煙 鎵ц鐩爣 - - - - if (!string.IsNullOrEmpty(SceneText)) - { - nameRow.NameText.Text = SceneText; - } - if (CurrentRoom != null) - { - - } - if (Modify) - { - //title.TextID = R.MyInternationalizationString.ModifyScene; - oldRoom = CurrentRoom; - if (ModifySceneUI != null && ModifySceneUI.IsSharedScene) - { - nameRow.NameText.Enable = false; - } - } - #endregion - #region event - //璁板綍杈撳叆鍦烘櫙鍚� - nameRow.NameText.TextChangeEventHandler += (sender, e) => - { - SceneText = nameRow.NameText.Text.Trim(); - }; - + //閫夋嫨鑳屾櫙鍥� EventHandler<MouseEventArgs> backGroundIMGHander = (sender, e) => { - if (CurrentRoom.IsSharedRoom) + if (curRoom == null) + { + RoomCommon.ShowTipNoRoom(); + return; + } + if (curRoom.IsSharedRoom) { RoomCommon.ShowTipRoomIsShared(); return; } - + var localPic = new CategorySceneSelectImgByLocal(); Shared.Phone.UserView.HomePage.Instance.AddChidren(localPic); Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; @@ -471,43 +476,43 @@ localPic.action = () => { backGround.UnSelectedImagePath = ImagePath; - IconType = 0; }; - }; backGround.MouseUpEventHandler += backGroundIMGHander; + + //鍖哄煙 EventHandler<MouseEventArgs> zoneHander = (sender, e) => { - if (CurrentRoom.IsSharedRoom) + PickerView.ShowSecondary(floorNames, roomNames, (index1, index2) => { - RoomCommon.ShowTipRoomIsShared(); - return; - } - var selectRoom = new CategorySceneSelectRoomList(); - UserView.HomePage.Instance.AddChidren(selectRoom); - UserView.HomePage.Instance.PageIndex += 1; - selectRoom.SelectedRoomAction = (room) => - { - CurrentRoom = room; - zoneRow.NameText.Text = CurrentRoom.Name; - }; - selectRoom.Show(); + curRoom = rooms[index1][index2]; + zoneRow.NameText.Text = $"{Config.Instance.Home.GetFloorNameById(floorIds[index1])} , {rooms[index1][index2].Name}"; + }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor), Language.StringByID(R.MyInternationalizationString.Confrim), Language.StringByID(R.MyInternationalizationString.Cancel)); }; zoneRow.NextBtn.MouseUpEventHandler += zoneHander; zoneRow.TipBtn.MouseUpEventHandler += zoneHander; + zoneRow.NameText.MouseUpEventHandler += zoneHander; zoneRow.MouseUpEventHandler += zoneHander; + //鎵ц鐩爣-娣诲姞鎵ц璁惧 EventHandler<MouseEventArgs> targetAddHander = (sender, e) => { - if (CurrentRoom.IsSharedRoom) + + if (curRoom == null) + { + RoomCommon.ShowTipNoRoom(); + return; + } + if (curRoom.IsSharedRoom) { RoomCommon.ShowTipRoomIsShared(); return; } - int selectRow_Height = 130; + int selectRow_Height = 150; + int selectRow_Width = 1034; var selectFL = new FrameLayout() { BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor @@ -516,37 +521,36 @@ var itemFL = new FrameLayout() { - Y = Application.GetRealHeight(CommonPage.AppRealHeight - selectRow_Height * 4 - 20), - Height = Application.GetRealHeight(selectRow_Height * 4 + 20) + Y = Application.GetRealHeight(1276), + Height = Application.GetRealHeight(450), + Width = Application.GetRealWidth(selectRow_Width), + Gravity=Gravity.CenterHorizontal, + Radius = (uint)Application.GetRealHeight(17), + BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor }; selectFL.AddChidren(itemFL); - var selectedFunctionBtn = new Device.CommonForm.SelectedStatuButton() + var selectedFunctionBtn = new Button() { Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.Function, - TextColor = ZigbeeColor.Current.GXCTextBlackColor, - TextAlignment = TextAlignment.Center, - BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor, - SelectedBackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 }; itemFL.AddChidren(selectedFunctionBtn); var selectedFunctionLine = new Button() { Y = selectedFunctionBtn.Bottom, Height = 1, - BackgroundColor = ZigbeeColor.Current.GXCLineColor, + BackgroundColor = ZigbeeColor.Current.GXCLineColor }; itemFL.AddChidren(selectedFunctionLine); - var selectedSceneBtn = new Device.CommonForm.SelectedStatuButton() + var selectedSceneBtn = new Button() { Y = selectedFunctionLine.Bottom, Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.Scence, - TextColor = ZigbeeColor.Current.GXCTextBlackColor, - BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor, - SelectedBackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 }; itemFL.AddChidren(selectedSceneBtn); var selectedSceneLine = new Button() @@ -557,29 +561,29 @@ }; itemFL.AddChidren(selectedSceneLine); - var selectedTimerBtn = new Device.CommonForm.SelectedStatuButton() + var selectedTimerBtn = new Button() { Y = selectedSceneLine.Bottom, Height = Application.GetRealHeight(selectRow_Height) - 1, - TextID = R.MyInternationalizationString.TimeSpan, - TextColor = ZigbeeColor.Current.GXCTextBlackColor, - BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor, - SelectedBackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor + TextID = R.MyInternationalizationString.Delay, + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 }; itemFL.AddChidren(selectedTimerBtn); - var cancelBtn = new Device.CommonForm.SelectedStatuButton() - { - Y = selectedTimerBtn.Bottom + Application.GetRealHeight(20), - Height = Application.GetRealHeight(selectRow_Height), - TextID = R.MyInternationalizationString.Cancel, - TextColor = ZigbeeColor.Current.GXCTextBlackColor, - BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor, - SelectedBackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor - }; - itemFL.AddChidren(cancelBtn); - itemFL.Animate = Animate.DownToUp; + var cancelBtn = new Button() + { + Y = Application.GetRealHeight(1742), + Height = Application.GetRealHeight(selectRow_Height), + Width = Application.GetRealWidth(selectRow_Width), + Gravity=Gravity.CenterHorizontal, + TextID = R.MyInternationalizationString.Cancel, + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor, + Radius = (uint)Application.GetRealHeight(17) + }; + selectFL.AddChidren(cancelBtn); + //娣诲姞鍔熻兘 selectedFunctionBtn.MouseUpEventHandler += (send, ee) => { @@ -596,24 +600,30 @@ var sceneView = new CategorySceneSelectedScene(); UserView.HomePage.Instance.AddChidren(sceneView); UserView.HomePage.Instance.PageIndex += 1; - if (Modify) - { - sceneView.Show(sceneTargetDevicesList, -1, "", false, ModifySceneUI.Id); - } - else - { - sceneView.Show(sceneTargetDevicesList); - } + //if (Modify) + //{ + // sceneView.Show(sceneTargetDevicesList, -1, "", false, ModifySceneUI.Id); + //} + //else + //{ + // sceneView.Show(sceneTargetDevicesList); + //} }; //娣诲姞鏃堕棿闂撮殧 selectedTimerBtn.MouseUpEventHandler += (send, ee) => { selectFL.RemoveFromParent(); - var delayTimeView = new CategorySceneSelectedDelayTime(); + var delayTimeView = new SelectDelayTime(); UserView.HomePage.Instance.AddChidren(delayTimeView); UserView.HomePage.Instance.PageIndex += 1; delayTimeView.Show(); + delayTimeView.selectedTimeAction = (second) => + { + sceneTargetDevicesList.Add(second); + RefreshTargetListView(); + }; }; + cancelBtn.MouseUpEventHandler += (send, ee) => { selectFL.RemoveFromParent(); @@ -626,54 +636,46 @@ targetAdd.MouseUpEventHandler += targetAddHander; targetFL.MouseUpEventHandler += targetAddHander; target.MouseUpEventHandler += targetAddHander; + addTargetFL.MouseUpEventHandler += targetAddHander; //纭畾娣诲姞鐩爣 confirmBtn.MouseUpEventHandler += async (sender, e) => { - if (CurrentRoom.IsSharedRoom) + if (curRoom == null) + { + RoomCommon.ShowTipNoRoom(); + return; + } + if (curRoom.IsSharedRoom) { RemoveFromParent(); return; } - if (Modify) + + //鏂板 + 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(); + alert.ResultEventHandler += (sendAlert, eAlert) => + { + return; + }; + } + else { try { - CommonPage.Loading.Start(); - //淇敼--鍏堝垽鏂満鏅悕鏄惁鏀瑰彉锛屽啀绉婚櫎璁惧锛屽啀娣诲姞璁惧 - ModifySceneUI.IconPath = ImagePath; - if (ModifySceneUI.Name != nameRow.NameText.Text.Trim()) + if (Shared.Common.Room.AllRoomSceneUIList.Find(s => s.Name == nameRow.NameText.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, nameRow.NameText.Text.Trim()); - var reName = r.sceneRenameResponseData.Result; - if (reName == 0) - { - //澶辫触 - return; - } - else if (reName == 1) - { - //鎴愬姛 - ModifySceneUI.Name = nameRow.NameText.Text.Trim(); - - } - else if (reName == 2) - { - //娌℃湁璇ュ満鏅� - return; - } + Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist); + return; } - //淇敼璁惧 - var memberDataList = new List<AddSceneMemberData>(); + CommonPage.Loading.Start(); + var memberDataList = new List<ZigBee.Device.Scene.AddSceneMemberData>(); + //绱姞寤舵椂 int AddedDelayTime = 0; for (int i = 0; i < sceneTargetDevicesList.Count; i++) { - //鍚堝苟寤舵椂 var sceneTarget = sceneTargetDevicesList[i]; SceneTargetDeviceUI beforeSceneTarget = null; if (i - 1 >= 0) @@ -682,6 +684,11 @@ } if (sceneTarget.Type == 0) { + if (sceneTarget.DeviceUI == null || sceneTarget.DeviceUI.CommonDevice == null) + { + continue; + } + if (beforeSceneTarget != null && beforeSceneTarget.Type == 1) { if (i - 1 >= 0) @@ -696,10 +703,7 @@ } } } - if (sceneTarget.DeviceUI == null || sceneTarget.DeviceUI.CommonDevice == null) - { - continue; - } + var memberData = new ZigBee.Device.Scene.AddSceneMemberData { DeviceAddr = sceneTarget.DeviceUI.CommonDevice.DeviceAddr, @@ -737,62 +741,21 @@ memberDataList.Add(memberData); } } - var sceneRemoveMemberData = new SceneRemoveMemberData { }; - var removeSceneDeviceListInfoList = new List<RemoveSceneDeviceListInfo> { }; - for (int i = 0; i < beforeSceneTargetDevicesList.Count; i++) - { - //鍚堝苟寤舵椂 - var sceneTarget = beforeSceneTargetDevicesList[i]; - if (sceneTarget.Type == 0) - { - if (sceneTarget.DeviceUI == null || sceneTarget.DeviceUI.CommonDevice == null) - { - continue; - } - var removeDevice = new RemoveSceneDeviceListInfo - { - Type = 0, - DeviceAddr = sceneTarget.DeviceUI.CommonDevice.DeviceAddr, - Epoint = sceneTarget.DeviceUI.CommonDevice.DeviceEpoint, - }; - removeSceneDeviceListInfoList.Add(removeDevice); - } - else if (sceneTarget.Type == 2) - { - var removeDevice = new ZigBee.Device.Scene.RemoveSceneDeviceListInfo - { - Type = 1, - ElseScenesId = sceneTarget.ElseScenesId - }; - removeSceneDeviceListInfoList.Add(removeDevice); - } - } - sceneRemoveMemberData.DeviceList = removeSceneDeviceListInfoList; - sceneRemoveMemberData.ScenesId = ModifySceneUI.Id; - var result = await CurrentRoom.ModifyScene(ModifySceneUI, sceneRemoveMemberData, memberDataList); + + var result = await curRoom.AddScene(nameRow.NameText.Text, backGround.UnSelectedImagePath, memberDataList); if (result == 1) { - if (oldRoom != CurrentRoom) - { - oldRoom.SceneUIList.Remove(ModifySceneUI); - oldRoom.SceneUIFilePathList.Remove(ModifySceneUI.FileName); - CurrentRoom.SceneUIList.Add(ModifySceneUI); - CurrentRoom.SceneUIFilePathList.Add(ModifySceneUI.FileName); - oldRoom.Save(); - CurrentRoom.Save(); - } - RemoveFromParent(); } else if (result == 0) { //澶辫触 - Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain); + CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.AddSceneFail); } else if (result == -1) { //宸插瓨鍦� - Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist); + CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist); } } catch (Exception ex) @@ -803,132 +766,14 @@ { CommonPage.Loading.Hide(); } - } - //鏂板 - else - { - 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(); - alert.ResultEventHandler += (sendAlert, eAlert) => - { - return; - }; - } - else - { - try - { - if (Shared.Common.Room.AllRoomSceneUIList.Find(s => s.Name == nameRow.NameText.Text.Trim()) != null) - { - Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist); - return; - } - CommonPage.Loading.Start(); - var memberDataList = new List<ZigBee.Device.Scene.AddSceneMemberData>(); - //绱姞寤舵椂 - int AddedDelayTime = 0; - for (int i = 0; i < sceneTargetDevicesList.Count; i++) - { - var sceneTarget = sceneTargetDevicesList[i]; - SceneTargetDeviceUI beforeSceneTarget = null; - if (i - 1 >= 0) - { - beforeSceneTarget = sceneTargetDevicesList[i - 1]; - } - if (sceneTarget.Type == 0) - { - if (sceneTarget.DeviceUI == null || sceneTarget.DeviceUI.CommonDevice == null) - { - continue; - } - if (beforeSceneTarget != null && beforeSceneTarget.Type == 1) - { - if (i - 1 >= 0) - { - for (int k = i - 1; k >= 0; k--) - { - if (sceneTargetDevicesList[k] == null || sceneTargetDevicesList[k].Type != 1) - { - break; - } - AddedDelayTime += sceneTargetDevicesList[k].DelayTime; - } - } - } - - var memberData = new ZigBee.Device.Scene.AddSceneMemberData - { - DeviceAddr = sceneTarget.DeviceUI.CommonDevice.DeviceAddr, - Type = 0, - ScenesId = 0, - Epoint = sceneTarget.DeviceUI.CommonDevice.DeviceEpoint, - TaskList = sceneTarget.TaskList, - DelayTime = AddedDelayTime - }; - memberDataList.Add(memberData); - } - else if (sceneTarget.Type == 2) - { - if (beforeSceneTarget != null && beforeSceneTarget.Type == 1) - { - if (i - 1 >= 0) - { - for (int k = i - 1; k >= 0; k--) - { - if (sceneTargetDevicesList[k] == null || sceneTargetDevicesList[k].Type != 1) - { - break; - } - AddedDelayTime += sceneTargetDevicesList[k].DelayTime; - } - } - } - var memberData = new ZigBee.Device.Scene.AddSceneMemberData - { - Type = 1, - ScenesId = 0, - ElseScenesId = sceneTarget.ElseScenesId, - DelayTime = AddedDelayTime - }; - memberDataList.Add(memberData); - } - } - - var result = await CurrentRoom.AddScene(nameRow.NameText.Text, backGround.UnSelectedImagePath, memberDataList); - if (result == 1) - { - RemoveFromParent(); - } - else if (result == 0) - { - //澶辫触 - CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.AddSceneFail); - } - else if (result == -1) - { - //宸插瓨鍦� - CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist); - } - } - catch (Exception ex) - { - System.Console.WriteLine($"鍒嗙被娣诲姞鍦烘櫙鍑洪敊{ex.Message}"); - } - finally - { - CommonPage.Loading.Hide(); - } - - } } }; #endregion - } #endregion + + } } diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectAirSwitchSetting.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectAirSwitchSetting.cs index f707f22..0ef09bb 100755 --- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectAirSwitchSetting.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectAirSwitchSetting.cs @@ -338,26 +338,26 @@ else { //鍥炲埌鍒嗙被 - var sameScene = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.DeviceUI == sceneTargetDevice.DeviceUI); - if (sameScene == null) - { - 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 - { - //鎻愮ず璇ヨ澶囧凡鍔犲叆 - var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ThisSceneHadTheDevice), Language.StringByID(R.MyInternationalizationString.Close)); - alert.Show(); - alert.ResultEventHandler += (sendAlert, eAlert) => - { - return; - }; - } + //var sameScene = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.DeviceUI == sceneTargetDevice.DeviceUI); + //if (sameScene == null) + //{ + // 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 + //{ + // //鎻愮ず璇ヨ澶囧凡鍔犲叆 + // var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ThisSceneHadTheDevice), Language.StringByID(R.MyInternationalizationString.Close)); + // alert.Show(); + // alert.ResultEventHandler += (sendAlert, eAlert) => + // { + // return; + // }; + //} } } //淇敼 @@ -380,18 +380,18 @@ } else { - var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.SceneTargetDeviceUIID == targetDeviceID); - if (targetDeviceUI != null) - { - targetDeviceUI.Type = sceneTargetDevice.Type; - targetDeviceUI.DeviceUI = sceneTargetDevice.DeviceUI; - targetDeviceUI.TaskList = sceneTargetDevice.TaskList; - } - UserView.HomePage.Instance.RemoveViewByTag("categoryAddScene"); - var categoryAddScene = new CategoryAddScene(); - UserView.HomePage.Instance.AddChidren(categoryAddScene); - UserView.HomePage.Instance.PageIndex += 1; - categoryAddScene.Show(); + //var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.SceneTargetDeviceUIID == targetDeviceID); + //if (targetDeviceUI != null) + //{ + // targetDeviceUI.Type = sceneTargetDevice.Type; + // targetDeviceUI.DeviceUI = sceneTargetDevice.DeviceUI; + // targetDeviceUI.TaskList = sceneTargetDevice.TaskList; + //} + //UserView.HomePage.Instance.RemoveViewByTag("categoryAddScene"); + //var categoryAddScene = new CategoryAddScene(); + //UserView.HomePage.Instance.AddChidren(categoryAddScene); + //UserView.HomePage.Instance.PageIndex += 1; + //categoryAddScene.Show(); } } }; diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectCurtainSetting.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectCurtainSetting.cs index b868a4f..204623f 100755 --- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectCurtainSetting.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectCurtainSetting.cs @@ -390,50 +390,50 @@ if (isFromRoom) { //鍥炲埌鎴块棿娣诲姞鍦烘櫙鐣岄潰 - var sameScene = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.DeviceUI == sceneTargetDevice.DeviceUI); - if (sameScene == null) - { - 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 - { - //鎻愮ず璇ヨ澶囧凡鍔犲叆 - var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ThisSceneHadTheDevice), Language.StringByID(R.MyInternationalizationString.Close)); - alert.Show(); - alert.ResultEventHandler += (sendAlert, eAlert) => - { - return; - }; - } + //var sameScene = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.DeviceUI == sceneTargetDevice.DeviceUI); + //if (sameScene == null) + //{ + // 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 + //{ + // //鎻愮ず璇ヨ澶囧凡鍔犲叆 + // var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ThisSceneHadTheDevice), Language.StringByID(R.MyInternationalizationString.Close)); + // alert.Show(); + // alert.ResultEventHandler += (sendAlert, eAlert) => + // { + // return; + // }; + //} } else { //鍥炲埌鍒嗙被 - var sameScene = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.DeviceUI == sceneTargetDevice.DeviceUI); - if (sameScene == null) - { - 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 - { - //鎻愮ず璇ヨ澶囧凡鍔犲叆 - var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ThisSceneHadTheDevice), Language.StringByID(R.MyInternationalizationString.Close)); - alert.Show(); - alert.ResultEventHandler += (sendAlert, eAlert) => - { - return; - }; - } + //var sameScene = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.DeviceUI == sceneTargetDevice.DeviceUI); + //if (sameScene == null) + //{ + // 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 + //{ + // //鎻愮ず璇ヨ澶囧凡鍔犲叆 + // var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ThisSceneHadTheDevice), Language.StringByID(R.MyInternationalizationString.Close)); + // alert.Show(); + // alert.ResultEventHandler += (sendAlert, eAlert) => + // { + // return; + // }; + //} } } //淇敼 @@ -456,18 +456,18 @@ } else { - var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.SceneTargetDeviceUIID == targetDeviceID); - if (targetDeviceUI != null) - { - targetDeviceUI.DeviceUI = sceneTargetDevice.DeviceUI; - targetDeviceUI.TaskList = sceneTargetDevice.TaskList; - 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(); + //var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.SceneTargetDeviceUIID == targetDeviceID); + //if (targetDeviceUI != null) + //{ + // targetDeviceUI.DeviceUI = sceneTargetDevice.DeviceUI; + // targetDeviceUI.TaskList = sceneTargetDevice.TaskList; + // 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(); } } }; diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs index 5388d58..a718558 100755 --- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs @@ -94,7 +94,7 @@ EventHandler<MouseEventArgs> selectIcon = (sender, e) => { - CategoryAddScene.ImagePath = icon.UnSelectedImagePath; + //CategoryAddScene.ImagePath = icon.UnSelectedImagePath; Room.AddRoomScene.ImagePath = icon.UnSelectedImagePath; action?.Invoke(); action = null; diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectLightSetting.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectLightSetting.cs index bf0f7cd..0ba6c83 100755 --- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectLightSetting.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectLightSetting.cs @@ -339,26 +339,26 @@ else { //鍥炲埌鍒嗙被 - var sameScene = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.DeviceUI == sceneTargetDevice.DeviceUI); - if (sameScene == null) - { - 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 - { - //鎻愮ず璇ヨ澶囧凡鍔犲叆 - var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ThisSceneHadTheDevice), Language.StringByID(R.MyInternationalizationString.Close)); - alert.Show(); - alert.ResultEventHandler += (sendAlert, eAlert) => - { - return; - }; - } + //var sameScene = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.DeviceUI == sceneTargetDevice.DeviceUI); + //if (sameScene == null) + //{ + // 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 + //{ + // //鎻愮ず璇ヨ澶囧凡鍔犲叆 + // var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ThisSceneHadTheDevice), Language.StringByID(R.MyInternationalizationString.Close)); + // alert.Show(); + // alert.ResultEventHandler += (sendAlert, eAlert) => + // { + // return; + // }; + //} } } //淇敼 @@ -381,18 +381,18 @@ } else { - var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.SceneTargetDeviceUIID == targetDeviceID); - if (targetDeviceUI != null) - { - targetDeviceUI.Type = sceneTargetDevice.Type; - targetDeviceUI.DeviceUI = sceneTargetDevice.DeviceUI; - targetDeviceUI.TaskList = sceneTargetDevice.TaskList; - } - UserView.HomePage.Instance.RemoveViewByTag("categoryAddScene"); - var categoryAddScene = new CategoryAddScene(); - UserView.HomePage.Instance.AddChidren(categoryAddScene); - UserView.HomePage.Instance.PageIndex += 1; - categoryAddScene.Show(); + //var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.SceneTargetDeviceUIID == targetDeviceID); + //if (targetDeviceUI != null) + //{ + // targetDeviceUI.Type = sceneTargetDevice.Type; + // targetDeviceUI.DeviceUI = sceneTargetDevice.DeviceUI; + // targetDeviceUI.TaskList = sceneTargetDevice.TaskList; + //} + //UserView.HomePage.Instance.RemoveViewByTag("categoryAddScene"); + //var categoryAddScene = new CategoryAddScene(); + //UserView.HomePage.Instance.AddChidren(categoryAddScene); + //UserView.HomePage.Instance.PageIndex += 1; + //categoryAddScene.Show(); } } }; diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDelayTime.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDelayTime.cs deleted file mode 100755 index 6c6ed15..0000000 --- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDelayTime.cs +++ /dev/null @@ -1,343 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using Shared.Common; -namespace Shared.Phone.Device.Category -{ - public class CategorySceneSelectedDelayTime : FrameLayout - { - - public CategorySceneSelectedDelayTime() - { - 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" }; - /// <summary> - /// 娣诲姞鏃堕棿闂撮殧涓烘墽琛岀洰鏍� state = -1 涓嶉�夋嫨锛屼唬琛ㄦ柊澧炪�俿tate=1 鏃讹紝targetDeviceID浠h〃浼犺繘鏉ョ殑鐩爣id - /// </summary> - /// <param name="state">State.</param> - /// <param name="targetDeviceID">Target device identifier.</param> - /// <param name="delayTime">Delay time.</param> - /// <param name="isFromRoom">If set to <c>true</c> is from room.</param> - public void Show(int state = -1, string targetDeviceID = "", int delayTime = -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 title = new Button() - { - TextAlignment = TextAlignment.Center, - TextID = R.MyInternationalizationString.TimeSpan, - TextSize = 20, - TextColor = ZigbeeColor.Current.GXCTextBlackColor, - Width = Application.GetRealWidth(CommonPage.AppRealWidth - 500), - Gravity = Gravity.CenterHorizontal - }; - 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); - back.MouseUpEventHandler += (sender, e) => - { - this.RemoveFromParent(); - }; - #endregion - - #region midFL - var midFL = new VerticalScrolViewLayout() - { - Y = topView.Bottom, - Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.Navigation_Height), - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, - ScrollEnabled = false - }; - AddChidren(midFL); - foreach (var timeStr in TimeList) - { - var timeRowView = new RowLayout() - { - Height = Application.GetRealHeight(170), - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, - LineColor = ZigbeeColor.Current.GXCLineColor - }; - midFL.AddChidren(timeRowView); - - var timeFL = new FrameLayout() - { - - }; - timeRowView.AddChidren(timeFL); - - var timeUnitStr = string.Empty; - if (timeStr.Split('_')[1] == "绉�") - { - timeUnitStr = Language.StringByID(R.MyInternationalizationString.Second); - } - else - { - timeUnitStr = Language.StringByID(R.MyInternationalizationString.Minute); - } - - var timeBtn = new Button() - { - X = Application.GetRealWidth(50), - Width = Application.GetRealWidth(500), - Text = $"{timeStr.Split('_')[0]} {timeUnitStr}", - TextAlignment = TextAlignment.CenterLeft, - TextColor = ZigbeeColor.Current.GXCTextBlackColor, - SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor, - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, - Gravity = Gravity.CenterVertical - }; - timeRowView.AddChidren(timeBtn); - var timeBtnSelected = new Button() - { - X = timeRowView.Width - Application.GetRealWidth(150), - Width = Application.GetMinRealAverage(110), - Height = Application.GetMinRealAverage(110), - UnSelectedImagePath = "Item/YesSelected.png", - Visible = false, - Gravity = Gravity.CenterVertical - }; - timeRowView.AddChidren(timeBtnSelected); - void selectTimeMouseDownEvent(object sender, MouseEventArgs e) - { - timeBtn.IsSelected = true; - timeBtnSelected.Visible = true; - new System.Threading.Thread(() => - { - System.Threading.Thread.Sleep(200); - Application.RunOnMainThread(() => - { - timeBtn.IsSelected = false; - timeBtnSelected.Visible = false; - }); - }) - { IsBackground = true }.Start(); - } - timeBtn.MouseDownEventHandler += selectTimeMouseDownEvent; - timeRowView.MouseDownEventHandler += selectTimeMouseDownEvent; - timeFL.MouseDownEventHandler += selectTimeMouseDownEvent; - - void selectTimeMouseUpEvent(object sender, MouseEventArgs e) - { - //timeBtn.IsSelected = false; - //timeBtnSelected.Visible = false; - //timeBtn.IsSelected = true; - //timeBtnSelected.Visible = true; - - SceneTargetDevice.DelayTime = int.Parse(timeStr.Split('_')[2]); - 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((obj) => obj.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((obj) => obj.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(); - } - } - } - timeBtn.MouseUpEventHandler += selectTimeMouseUpEvent; - timeRowView.MouseUpEventHandler += selectTimeMouseUpEvent; - timeFL.MouseUpEventHandler += selectTimeMouseUpEvent; - } - //鑷畾涔� - var customRowView = new RowLayout() - { - Height = Application.GetRealHeight(170), - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, - LineColor = ZigbeeColor.Current.GXCLineColor - }; - midFL.AddChidren(customRowView); - customBtn = new Button() - { - X = Application.GetRealWidth(50), - Width = Application.GetRealWidth(500), - TextID=R.MyInternationalizationString.Custom, - TextAlignment = TextAlignment.CenterLeft, - TextColor = ZigbeeColor.Current.GXCTextBlackColor, - SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor, - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, - Gravity = Gravity.CenterVertical - }; - customRowView.AddChidren(customBtn); - var customBtnSelected = new Button() - { - X = customRowView.Width - Application.GetRealWidth(150), - Width = Application.GetMinRealAverage(110), - Height = Application.GetMinRealAverage(110), - UnSelectedImagePath = "Item/YesSelected.png", - Visible = false, - Gravity = Gravity.CenterVertical - }; - customRowView.AddChidren(customBtnSelected); - - void customMouseDownEvent(object sender, MouseEventArgs e) - { - customBtn.IsSelected = true; - customBtnSelected.Visible = true; - } - customBtn.MouseDownEventHandler += customMouseDownEvent; - customRowView.MouseDownEventHandler += customMouseDownEvent; - - void customMouseUpEvent(object sender,MouseEventArgs e) - { - customBtn.IsSelected = false; - customBtnSelected.Visible = false; - var tList = new List<string> { }; - for (int i = 1; i <= 60; i++) - { - tList.Add($"{i} {Language.StringByID(R.MyInternationalizationString.Second)}"); - } - //1-60绉� - //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(); - // } - // } - //}, Language.StringByID(R.MyInternationalizationString.Confrim)); - } - customBtn.MouseDownEventHandler += customMouseUpEvent; - customRowView.MouseDownEventHandler += customMouseUpEvent; - - #endregion - - #region event - - #endregion - } - - } -} diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDimmableLightSetting.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDimmableLightSetting.cs index ec76115..fe677d7 100755 --- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDimmableLightSetting.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedDimmableLightSetting.cs @@ -421,26 +421,26 @@ else { //鍥炲埌鍒嗙被 - var sameScene = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.DeviceUI == sceneTargetDevice.DeviceUI); - if (sameScene == null) - { - 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 - { - //鎻愮ず璇ヨ澶囧凡鍔犲叆 - var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ThisSceneHadTheDevice), Language.StringByID(R.MyInternationalizationString.Close)); - alert.Show(); - alert.ResultEventHandler += (sendAlert, eAlert) => - { - return; - }; - } + //var sameScene = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.DeviceUI == sceneTargetDevice.DeviceUI); + //if (sameScene == null) + //{ + // //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 + //{ + // //鎻愮ず璇ヨ澶囧凡鍔犲叆 + // var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ThisSceneHadTheDevice), Language.StringByID(R.MyInternationalizationString.Close)); + // alert.Show(); + // alert.ResultEventHandler += (sendAlert, eAlert) => + // { + // return; + // }; + //} } } //淇敼 @@ -463,18 +463,18 @@ } else { - var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.SceneTargetDeviceUIID == targetDeviceID); - if (targetDeviceUI != null) - { - targetDeviceUI.DeviceUI = sceneTargetDevice.DeviceUI; - targetDeviceUI.TaskList = sceneTargetDevice.TaskList; - 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(); + //var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.SceneTargetDeviceUIID == targetDeviceID); + //if (targetDeviceUI != null) + //{ + // targetDeviceUI.DeviceUI = sceneTargetDevice.DeviceUI; + // targetDeviceUI.TaskList = sceneTargetDevice.TaskList; + // 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(); } } }; diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedScene.cs index 52a4935..4e412aa 100755 --- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedScene.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectedScene.cs @@ -174,26 +174,26 @@ } else { - var sameScene = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.ElseScenesId == sceneTargetDevice.ElseScenesId); - if (sameScene == null) - { - 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 - { - //鎻愮ず璇ュ満鏅凡鍔犲叆 - var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ThisSceneHadTheScene), Language.StringByID(R.MyInternationalizationString.Close)); - alert.Show(); - alert.ResultEventHandler += (sendAlert, eAlert) => - { - return; - }; - } + //var sameScene = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.ElseScenesId == sceneTargetDevice.ElseScenesId); + //if (sameScene == null) + //{ + // //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 + //{ + // //鎻愮ず璇ュ満鏅凡鍔犲叆 + // var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ThisSceneHadTheScene), Language.StringByID(R.MyInternationalizationString.Close)); + // alert.Show(); + // alert.ResultEventHandler += (sendAlert, eAlert) => + // { + // return; + // }; + //} } } else @@ -235,13 +235,13 @@ { if (!string.IsNullOrEmpty(targetDeviceID)) { - var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.SceneTargetDeviceUIID == targetDeviceID); - if (targetDeviceUI != null) - { - targetDeviceUI.Type = sceneTargetDevice.Type; - targetDeviceUI.ElseScenesId = sceneTargetDevice.ElseScenesId; - targetDeviceUI.SceneName = sceneTargetDevice.SceneName; - } + //var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.SceneTargetDeviceUIID == targetDeviceID); + //if (targetDeviceUI != null) + //{ + // targetDeviceUI.Type = sceneTargetDevice.Type; + // targetDeviceUI.ElseScenesId = sceneTargetDevice.ElseScenesId; + // targetDeviceUI.SceneName = sceneTargetDevice.SceneName; + //} } //var sameScene = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.ElseScenesId == sceneTargetDevice.ElseScenesId); diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs new file mode 100755 index 0000000..8a34d39 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs @@ -0,0 +1,203 @@ +锘縰sing System; +using System.Collections.Generic; +using Shared.Common; +using Shared.Phone.Device.CommonForm; + +namespace Shared.Phone.Device.Category +{ + public class SelectDelayTime : FrameLayout + { + #region 鈼� 鍙橀噺____________________________ + /// <summary> + /// bodyFrameLayout + /// </summary> + private FrameLayout bodyFrameLayout; + /// <summary> + /// totalSecond + /// </summary> + private int totalSecond; + /// <summary> + /// selectedTimeAction + /// </summary> + public Action<SceneTargetDeviceUI> selectedTimeAction; + + #endregion + + public SelectDelayTime() + { + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; + Tag = "categoryAddScene"; + } + public override void RemoveFromParent() + { + base.RemoveFromParent(); + } + + public SceneTargetDeviceUI sceneTargetDevice; + + + public void Show() + { + if (sceneTargetDevice == null) + { + sceneTargetDevice = new SceneTargetDeviceUI { Type = 1 }; + } + AddTop(); + + AddBodyView(); + + + + void selectTimeMouseUpEvent(object sender, MouseEventArgs e) + { + //if (!string.IsNullOrEmpty(targetDeviceID)) + //{ + //var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.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(); + } + + + + + } + + + #region Add____________________________________ + /// <summary> + /// AddTop + /// </summary> + private void AddTop() + { + var top = new TopFrameLayout(); + AddChidren(top); + top.InitTopview(); + top.SetTopTitle(R.MyInternationalizationString.AddScence); + 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); + + var bg1 = new FrameLayout + { + Y = Application.GetRealHeight(118), + Height = Application.GetRealHeight(207), + Width = Application.GetRealWidth(207), + Gravity = Gravity.CenterHorizontal, + Radius = (uint)Application.GetRealHeight(207 / 2), + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, + }; + bodyFrameLayout.AddChidren(bg1); + + var bg2 = new FrameLayout + { + Height = Application.GetRealHeight(184), + Width = Application.GetRealWidth(184), + Gravity = Gravity.Center, + Radius = (uint)Application.GetRealHeight(184 / 2), + BackgroundColor = ZigbeeColor.Current.GXCSelectedBackgroundColor, + }; + bg1.AddChidren(bg2); + + var timeImg = new Button + { + Height = Application.GetMinRealAverage(124), + Width = Application.GetMinRealAverage(124), + Gravity = Gravity.Center, + Radius = (uint)Application.GetRealHeight(124 / 2), + UnSelectedImagePath = "Item/Timer.png" + }; + bg1.AddChidren(timeImg); + + var tip = new Button + { + Y = Application.GetRealHeight(350), + Width = Application.GetRealWidth(700), + Height = Application.GetRealHeight(120), + Gravity = Gravity.CenterHorizontal, + TextID = R.MyInternationalizationString.SelectTimeForAction, + TextColor = ZigbeeColor.Current.GXCTextBlackColor, + IsMoreLines = true + }; + bodyFrameLayout.AddChidren(tip); + + var midFL = new FrameLayout + { + Y = Application.GetRealHeight(611), + Height = Application.GetRealHeight(1126), + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, + Radius = (uint)Application.GetRealHeight(17), + }; + bodyFrameLayout.AddChidren(midFL); + + var timeFL = new FrameLayout + { + Y = Application.GetRealHeight(127), + Height = Application.GetRealHeight(1126 - 127), + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor + }; + midFL.AddChidren(timeFL); + + var pickView = new UIPickerView + { + Height = Application.GetRealHeight(153 * 3), + }; + timeFL.AddChidren(pickView); + + var minuList = new List<int> { }; + var secList = new List<int> { }; + var minuStrList = new List<string> { }; + var secStrList = new List<string> { }; + for (int i = 0; i < 60; i++) + { + minuList.Add(i); + minuStrList.Add($"{i}{Language.StringByID(R.MyInternationalizationString.Minute)}"); + secList.Add(i); + secStrList.Add($"{i}{Language.StringByID(R.MyInternationalizationString.Second)}"); + } + + pickView.setNPicker(minuStrList, secStrList, null); + + pickView.OnSelectChangeEvent += (l1, l2, l3) => + { + totalSecond = minuList[l1] * 60 + secList[l2]; + }; + + var confirmBtn = new CommonForm.CompleteButton(1656, 907, 127); + AddChidren(confirmBtn); + confirmBtn.SetTitle(R.MyInternationalizationString.Save); + confirmBtn.MouseUpEventHandler += (sender, e) => + { + sceneTargetDevice.DelayTime = totalSecond; + selectedTimeAction?.Invoke(sceneTargetDevice); + RemoveFromParent(); + }; + } + + #endregion + + } +} diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs index 2c1541c..668754b 100755 --- a/ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs @@ -35,9 +35,9 @@ UnSelectedImagePath="Item/SelectFloor_Left.png" }; dialog.AddChidren(bg); - if(direction==CommonForm.Direction.Right) + if (direction == CommonForm.Direction.Right) { - bg.UnSelectedImagePath = ""; + bg.UnSelectedImagePath = "Item/SelectFloor_Right.png"; } var backgroundFL = new FrameLayout @@ -105,6 +105,7 @@ { ((sender as Button).Parent as CommonForm.LeftIconButtonRow).IsSelected = true; Config.Instance.Home.CurrentFloorId = (sender as Button).Tag.ToString(); + Config.Instance.Home.Save(); FloorAction?.Invoke(Config.Instance.Home.GetCurrentFloorName); RemoveFromParent(); } diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs index f335c58..69b0a79 100755 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs @@ -4,7 +4,6 @@ { public class DeviceInfoRow : FrameLayout { - /// <summary> /// TipBtn /// </summary> @@ -17,6 +16,10 @@ /// NextBtn /// </summary> public Button NextBtn; + /// <summary> + /// line + /// </summary> + private Button line; /// <summary> /// DeviceInfoEditRow @@ -67,7 +70,7 @@ }; AddChidren(NextBtn); - var line = new Button() + line = new Button() { X = Application.GetRealWidth(CommonFormResouce.X_Left), Y = Height - 2, @@ -114,5 +117,10 @@ { SetTipTitle(Language.StringByID(title)); } + + public void HideLine(bool hiden) + { + line.Visible = hiden; + } } } diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetRow.cs new file mode 100755 index 0000000..370fb76 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetRow.cs @@ -0,0 +1,119 @@ +锘縰sing System; +using Shared.Common; +namespace Shared.Phone.Device.CommonForm +{ + public class SceneTargetRow:FrameLayout + { + /// <summary> + /// TipBtn + /// </summary> + public Button Icon; + /// <summary> + /// NameText + /// </summary> + public Button NameText; + /// <summary> + /// NextBtn + /// </summary> + public Button NextBtn; + /// <summary> + /// line + /// </summary> + private Button line; + /// <summary> + /// SceneTargetRow + /// </summary> + /// <param name="y"></param> + public SceneTargetRow(int y) + { + X = Application.GetRealWidth(0); + Y = Application.GetRealHeight(y); + Width = Application.GetRealWidth(1080); + Height = Application.GetRealHeight(127); + } + + /// <summary> + /// Init + /// </summary> + public void Init() + { + Icon = new Button + { + X = Application.GetRealWidth(CommonFormResouce.X_Left), + Width = Application.GetMinRealAverage(80), + Height = Application.GetMinRealAverage(80), + Gravity = Gravity.CenterVertical, + UnSelectedImagePath="Item/Timer.png" + }; + AddChidren(Icon); + + 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); + + 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> + /// SetIcon + /// </summary> + /// <param name="imagePath"></param> + public void SetIcon(string imagePath) + { + Icon.UnSelectedImagePath = imagePath; + } + + /// <summary> + /// HideLine + /// </summary> + /// <param name="hiden"></param> + public void HideLine(bool hiden) + { + line.Visible = hiden; + } + } +} diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectTime.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectTime.cs index 5044d9c..39d8100 100755 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectTime.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectTime.cs @@ -123,7 +123,6 @@ { AddTime(timeLayout, t); } - } /// <summary> @@ -208,9 +207,6 @@ } } - - - /// <summary> /// Close diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectZone.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectZone.cs index 822da27..213da61 100755 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectZone.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectZone.cs @@ -108,60 +108,6 @@ confrim.MouseUpEventHandler += Confrim_MouseEvent; } - /// <summary> - /// AddTime - /// </summary> - /// <param name="verticalScrolView"></param> - private void AddTime(VerticalScrolViewLayout verticalScrolView, int timess) - { - var row = new FrameLayout - { - Height = Application.GetRealHeight(127 + 12), - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor - }; - verticalScrolView.AddChidren(row); - - var trow = new FrameLayout - { - Y = Application.GetRealHeight(12), - Height = Application.GetRealHeight(127), - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor - }; - row.AddChidren(trow); - - var timeBtn = new Button - { - X = Application.GetRealWidth(80), - Width = Application.GetRealWidth(500), - TextAlignment = TextAlignment.CenterLeft, - TextColor = ZigbeeColor.Current.GXCTextGrayColor4, - SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor, - IsSelected = false - }; - trow.AddChidren(timeBtn); - - var selectBtn = new Button - { - X = Application.GetRealWidth(942), - Width = Application.GetMinRealAverage(60), - Height = Application.GetMinRealAverage(60), - Gravity = Gravity.CenterVertical, - UnSelectedImagePath = "Item/ItemSelected.png", - Visible = false - }; - trow.AddChidren(selectBtn); - - var Line = new FrameLayout() - { - Y = trow.Height - 1, - Width = Application.GetRealWidth(919), - Height = 1, - Gravity = Gravity.CenterHorizontal, - BackgroundColor = Common.ZigbeeColor.Current.GXCGrayLineColor2 - }; - trow.AddChidren(Line); - - } /// <summary> /// Close diff --git a/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs index 7cdecac..02e5698 100755 --- a/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs +++ b/ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs @@ -531,12 +531,12 @@ //collection if ((sender as Button).IsSelected) { - Shared.Common.Room.GetLoveRoom().DeleteDevice(device.FileName); + Shared.Common.Room.CurrentRoom.GetLoveRoom().DeleteDevice(device.FileName); (sender as Button).IsSelected = false; } else { - Shared.Common.Room.GetLoveRoom().AddDevice(device.FileName); + Shared.Common.Room.CurrentRoom.GetLoveRoom().AddDevice(device.FileName); (sender as Button).IsSelected = true; } } diff --git a/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs b/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs index 3e280d9..54e4f18 100755 --- a/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs +++ b/ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs @@ -475,12 +475,12 @@ //collection if ((sender as Button).IsSelected) { - Shared.Common.Room.GetLoveRoom().DeleteDevice(device.FileName); + Shared.Common.Room.CurrentRoom.GetLoveRoom().DeleteDevice(device.FileName); (sender as Button).IsSelected = false; } else { - Shared.Common.Room.GetLoveRoom().AddDevice(device.FileName); + Shared.Common.Room.CurrentRoom.GetLoveRoom().AddDevice(device.FileName); (sender as Button).IsSelected = true; } } diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs index 4f71fa0..5d33720 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs @@ -224,7 +224,7 @@ ///绗竴娆¤繘鏉� var roomlists = new List<Common.Room>(); roomlists.Clear(); - if (Config.Instance.Home.FloorDics.Count < 1) + if (Config.Instance.Home.FloorDics.Count < 2) { foolrname.Visible = false; dropdown.Visible = false; diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs index 2baeb78..cb9097a 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs @@ -227,7 +227,7 @@ ///绗竴娆¤繘鏉� var roomlists = new List<Common.Room>(); roomlists.Clear(); - if (Config.Instance.Home.FloorDics.Count < 1) + if (Config.Instance.Home.FloorDics.Count < 2) { foolrname.Visible = false; dropdown.Visible = false; diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs index b16a8d5..6d20209 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs @@ -227,7 +227,7 @@ ///绗竴娆¤繘鏉� var roomlists = new List<Common.Room>(); roomlists.Clear(); - if (Config.Instance.Home.FloorDics.Count < 1) + if (Config.Instance.Home.FloorDics.Count < 2) { foolrname.Visible = false; dropdown.Visible = false; diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs index bdec8f7..1489f2e 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs @@ -222,7 +222,7 @@ var roomlists = new List<Common.Room>(); roomlists.Clear(); - if (Config.Instance.Home.FloorDics.Count < 1) + if (Config.Instance.Home.FloorDics.Count < 2) { foolrname.Visible = false; dropdown.Visible = false; diff --git a/ZigbeeApp/Shared/Phone/Device/Room/AddRoomScene.cs b/ZigbeeApp/Shared/Phone/Device/Room/AddRoomScene.cs index 1df900c..73f1753 100755 --- a/ZigbeeApp/Shared/Phone/Device/Room/AddRoomScene.cs +++ b/ZigbeeApp/Shared/Phone/Device/Room/AddRoomScene.cs @@ -202,10 +202,10 @@ //鏃堕棿闂撮殧 else if (targetDevice.Type == 1) { - var delayTimeView = new CategorySceneSelectedDelayTime(); + var delayTimeView = new SelectDelayTime(); UserView.HomePage.Instance.AddChidren(delayTimeView); UserView.HomePage.Instance.PageIndex += 1; - delayTimeView.Show(1, targetDevice.SceneTargetDeviceUIID,-1,true); + //delayTimeView.Show(1, targetDevice.SceneTargetDeviceUIID,-1,true); } //鍦烘櫙 else if (targetDevice.Type == 2) @@ -704,10 +704,10 @@ selectedTimerBtn.MouseUpEventHandler += (send, ee) => { selectFL.RemoveFromParent(); - var delayTimeView = new CategorySceneSelectedDelayTime(); + var delayTimeView = new SelectDelayTime(); UserView.HomePage.Instance.AddChidren(delayTimeView); UserView.HomePage.Instance.PageIndex += 1; - delayTimeView.Show(-1,"",-1,true); + //delayTimeView.Show(-1,"",-1,true); }; cancelBtn.MouseUpEventHandler += (send, ee) => { diff --git a/ZigbeeApp/Shared/Phone/Device/Room/RoomCommon.cs b/ZigbeeApp/Shared/Phone/Device/Room/RoomCommon.cs index 098a265..eb50f4c 100755 --- a/ZigbeeApp/Shared/Phone/Device/Room/RoomCommon.cs +++ b/ZigbeeApp/Shared/Phone/Device/Room/RoomCommon.cs @@ -14,5 +14,18 @@ alert.Show(); }); } + + /// <summary> + /// 鎻愮ず鐢ㄦ埛杩樻病閫夋嫨鎴块棿 + /// </summary> + public static void ShowTipNoRoom() + { + Application.RunOnMainThread(() => + { + var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.NotSelectZone), Language.StringByID(R.MyInternationalizationString.Close)); + alert.Show(); + }); + } + } } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs index 3167003..da3d02d 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs @@ -891,22 +891,22 @@ public class MemberShardInfoData { /// <summary> - /// 鎴愬憳鐨勫叏閮ㄥ垎浜暟鎹�,閲岄潰鍖呭惈鎵�鏈夌殑鏂囦欢(keys:鎴块棿鏂囦欢鍚� value:鏂囦欢鍚�) - /// </summary> - public Dictionary<string, HashSet<string>> dicAllMemberShard = new Dictionary<string, HashSet<string>>(); - /// <summary> /// 鍏ㄩ儴鐨勫垎浜枃浠剁殑涓婚敭(keys:鏂囦欢鍚� value:涓婚敭) /// </summary> public Dictionary<string, string> dicAllShardKeys = new Dictionary<string, string>(); /// <summary> /// 鍒嗕韩鎴块棿鐨勫璞�(瀹冩槸浠庝簯绔潵鐨�,keys:鏂囦欢鍚�) /// </summary> - public Dictionary<string, Common.Room> dicShardRoom = new Dictionary<string, Common.Room>(); + public Dictionary<string, Room> dicShardRoom = new Dictionary<string, Common.Room>(); /// <summary> /// 鍒嗕韩鐨勬ゼ灞� /// </summary> public Dictionary<string, string> dicShardFloor = new Dictionary<string, string>(); /// <summary> + /// 涓存椂鍙橀噺(杩欎釜涓滆タ涓簄ull,鍗充笉鏄柊鍒嗕韩鐨勬埧闂�,鍚﹀垯鏄柊鍒嗕韩鐨勬埧闂淬�傜敤瀹岃寰楃疆绌�) + /// </summary> + public Room TempRoom = null; + /// <summary> /// 鏄惁闇�瑕佸埛鏂� /// </summary> public bool Refresh = true; 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 587dde4..5d191f4 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs @@ -230,7 +230,7 @@ //byteLength += Encoding.GetEncoding("gb2312").GetBytes(i_text[i].ToString()).Length; } int realWidth = byteLength * (int)textSize; - return Application.GetRealWidth(realWidth); + return Application.GetRealWidth(realWidth + 20); } /// <summary> diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/TopRightMenuControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/TopRightMenuControl.cs index fe4e545..0a8b19e 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/TopRightMenuControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/TopRightMenuControl.cs @@ -12,25 +12,13 @@ #region 鈻� 鍙橀噺澹版槑___________________________ /// <summary> - /// 妗屽竷鎺т欢 + /// 鍒楄〃鎺т欢 /// </summary> - private FrameLayout frameTable = null; - /// <summary> - /// 涓夎褰㈠浘鏍� - /// </summary> - private PicViewControl btnTriangle = null; - /// <summary> - /// 澶撮儴鍦嗚鎺т欢 - /// </summary> - private NormalViewControl btnTopRadius = null; - /// <summary> - /// 搴曢儴鍦嗚鎺т欢 - /// </summary> - private NormalViewControl btnBottomRadius = null; + private VerticalListControl listView = null; /// <summary> /// 鍓嶅洖閫夋嫨鐨勮 /// </summary> - private FrameLayoutControl oldRowFrame = null; + private FrameRowControl oldRowFrame = null; /// <summary> /// 琛岄珮搴� /// </summary> @@ -38,20 +26,11 @@ /// <summary> /// 琛屽搴� /// </summary> - //private int RowWidth = 449; private int RowWidth = 395; /// <summary> /// 琛屾暟 /// </summary> private int RowCount = 0; - /// <summary> - /// 鑿滃崟璁℃暟 - /// </summary> - private int menuCount = 0; - /// <summary> - /// 鍦嗚搴� - /// </summary> - private int tableRadius = Application.GetMinRealAverage(12); #endregion @@ -60,22 +39,21 @@ /// <summary> /// 鍋氭垚涓�涓瓨鍦ㄤ簬鍙充笂瑙掔殑鑿滃崟鎺т欢 /// </summary> - /// <param name="frame">鐖跺鍣ㄦ帶浠�</param> /// <param name="i_RowCount">涓�鍏辨湁鍑犺</param> /// <param name="i_width">杩欎釜鑿滃崟鏈夊瀹�</param> - public TopRightMenuControl(FrameLayout frame, int i_RowCount, int i_width = 395) + /// <param name="titleText">鏍囬鏂囨湰(濡傛灉涓嶄负绌�,鑿滃崟妯″紡鍙樻洿涓烘嫢鏈夋爣棰樼殑妯″紡)</param> + public TopRightMenuControl(int i_RowCount, int i_width = 395, string titleText = null) { this.RowCount = i_RowCount; this.RowWidth = i_width; //鍒濆鍖栫敾闈㈢殑鎺т欢 - this.InitFormControl(frame); + this.InitFormControl(titleText); } /// <summary> /// 鍒濆鍖栫敾闈㈢殑鎺т欢 /// </summary> - /// <param name="frame">鐖跺鍣ㄦ帶浠�</param> - private void InitFormControl(FrameLayout frame) + private void InitFormControl(string titleText) { this.BackgroundColor = UserCenterColor.Current.DialogBackColor; this.MouseUpEventHandler += (sender2, e2) => @@ -83,41 +61,47 @@ //鍏抽棴鑷韩 this.RemoveFromParent(); }; + var frame = (FrameLayout)UserView.HomePage.Instance.GetChildren(UserView.HomePage.Instance.ChildrenCount - 1); frame.AddChidren(this); + //鏈�澶ф樉绀�5涓� + int rowCount = this.RowCount > 5 ? 5 : this.RowCount; //妗屽竷 - this.frameTable = new FrameLayout(); - //frameTable.X = Application.GetRealWidth(596); - //frameTable.Y = Application.GetRealHeight(184); + var frameTable = new FrameLayoutControl(false); frameTable.X = Application.GetRealWidth(662 - (RowWidth - 395)); frameTable.Y = Application.GetRealHeight(158 + 15 + 1); frameTable.Width = Application.GetRealWidth(RowWidth); - frameTable.Height = Application.GetRealHeight(RowHeight * this.RowCount) + (this.RowCount - 1) * ControlCommonResourse.BottomLineHeight; + frameTable.Height = Application.GetRealHeight(RowHeight * rowCount); frameTable.BackgroundColor = UserCenterColor.Current.White; - frameTable.Radius = (uint)tableRadius / 2; + frameTable.BorderColor = UserCenterColor.Current.Transparent; + frameTable.RadiusEx = 6; this.AddChidren(frameTable); - //澶撮儴鍦嗚鎺т欢 - btnTopRadius = new NormalViewControl(frameTable.Width, tableRadius * 2, false); - btnTopRadius.Radius = (uint)tableRadius; - //btnTopRadius.BackgroundColor = UserCenterColor.Current.BlackBackGround; - frameTable.AddChidren(btnTopRadius); - if (RowCount == 1) + if (titleText != null) { - btnTopRadius.BackgroundColor = UserCenterColor.Current.White; + var btnTitle = new NormalViewControl(frameTable.Width - Application.GetRealWidth(81), Application.GetRealHeight(58), false); + btnTitle.X = Application.GetRealWidth(81); + btnTitle.Y = Application.GetRealHeight(58); + btnTitle.Text = titleText; + frameTable.AddChidren(btnTitle); } - //搴曢儴鍦嗚鎺т欢 - btnBottomRadius = new NormalViewControl(frameTable.Width, tableRadius * 2, false); - btnBottomRadius.Y = frameTable.Height - tableRadius * 2; - btnBottomRadius.Radius = (uint)tableRadius; - btnBottomRadius.BackgroundColor = UserCenterColor.Current.White; - frameTable.AddChidren(btnBottomRadius); + + //鍒楄〃鎺т欢 + this.listView = new VerticalListControl(); + listView.Height = frameTable.Height; + if (rowCount == 5 && titleText != null) + { + //杩炲甫鏍囬,鍙兘鏄剧ず5琛� + listView.Height = frameTable.Height - Application.GetRealHeight(RowHeight); + listView.Y = Application.GetRealHeight(RowHeight); + } + listView.Radius = frameTable.Radius; + frameTable.AddChidren(listView); //涓夎褰㈠浘鏍� - btnTriangle = new PicViewControl(31, 15); + var btnTriangle = new PicViewControl(31, 15); btnTriangle.X = Application.GetRealWidth(980); - //btnTriangle.Y = Application.GetRealHeight(169); - btnTriangle.Y = Application.GetRealHeight(158); + btnTriangle.Y = Application.GetRealHeight(159); btnTriangle.UnSelectedImagePath = "Item/UpperTriangle.png"; this.AddChidren(btnTriangle); } @@ -136,72 +120,36 @@ /// <param name="closeOnClick">鍗曞嚮鐨勬椂鍊欙紝鍏抽棴鑿滃崟</param> public void AddRowMenu(string TextValue, string unSelectPic, string selectPic, Action action, bool closeOnClick = true) { - NormalViewControl btnLine = null; - if (menuCount > 0) - { - //鐢荤嚎 - btnLine = new NormalViewControl(Application.GetRealWidth(RowWidth - 81), ControlCommonResourse.BottomLineHeight, false); - btnLine.X = Application.GetRealWidth(81); - btnLine.Y = Application.GetRealHeight(RowHeight * menuCount) + menuCount * ControlCommonResourse.BottomLineHeight; - btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine; - frameTable.AddChidren(btnLine); - } - menuCount++; - - var rowFrame = new FrameLayoutControl(); + var rowFrame = new FrameRowControl(); + rowFrame.LeftOffset = Application.GetRealWidth(81) - ControlCommonResourse.XXLeft; rowFrame.Height = Application.GetRealHeight(RowHeight); - rowFrame.Name = "Menu" + menuCount; - if (btnLine != null) - { - rowFrame.Y = btnLine.Bottom; - } - if (this.RowCount == 1) - { - //鍙湁涓�涓彍鍗� - rowFrame.Y = tableRadius; - rowFrame.Height = Application.GetRealHeight(RowHeight) - tableRadius * 2; - } - frameTable.AddChidren(rowFrame); + listView.AddChidren(rowFrame); + rowFrame.MainKeys = listView.ChildrenCount.ToString(); //鍥炬爣 - var btnIcon = new IconViewControl(81); - btnIcon.X = Application.GetRealWidth(81); - btnIcon.Gravity = Gravity.CenterVertical; + var btnIcon = rowFrame.AddLeftIcon(81); btnIcon.UnSelectedImagePath = unSelectPic; btnIcon.SelectedImagePath = selectPic; - rowFrame.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly); //鏄剧ず鏂囧瓧 - var btnText = new NormalViewControl(RowWidth - 173, 58, true); + var btnText = rowFrame.AddLeftCaption(TextValue, RowWidth - 173); btnText.X = Application.GetRealWidth(173); - btnText.Text = TextValue; - btnText.Gravity = Gravity.CenterVertical; - rowFrame.AddChidren(btnText, ChidrenBindMode.BindEventOnly); - if (menuCount > 1) + //搴曠嚎 + if (listView.ChildrenCount != this.RowCount) { - btnIcon.IsSelected = false; - btnText.TextColor = UserCenterColor.Current.TextGrayColor1; + var btnLine = rowFrame.AddBottomLine(); + btnLine.X = Application.GetRealWidth(81); } - if (this.RowCount == 1) + if (listView.ChildrenCount == 1) { - //濡傛灉鍙湁涓�涓彍鍗� - } - else if (menuCount == 1) - { - //澶氫釜鑿滃崟妯″紡鐨勭涓�涓彍鍗� - rowFrame.Y = tableRadius; - rowFrame.Height -= tableRadius; - btnIcon.Y -= tableRadius / 2; - btnText.Y -= tableRadius / 2; //绗竴涓彍鍗曢粯璁よ缃负閫夋嫨鐘舵�� this.SetRowSelectStatu(rowFrame, true); this.oldRowFrame = rowFrame; } - else if (menuCount == this.RowCount) + else { - //澶氫釜鑿滃崟妯″紡鐨勬渶鍚庝竴涓彍鍗� - rowFrame.Height -= tableRadius; - btnIcon.Y += tableRadius / 2; - btnText.Y += tableRadius / 2; + //鍏朵粬鑿滃崟涓虹伆鑹� + btnIcon.IsSelected = false; + btnText.TextColor = UserCenterColor.Current.TextGrayColor1; } //閫夋嫨鐘舵�� @@ -235,7 +183,7 @@ /// </summary> /// <param name="frame">琛屾帶浠�</param> /// <param name="select">閫夋嫨鐨勭姸鎬�</param> - private void SetRowSelectStatu(FrameLayoutControl frame, bool select) + private void SetRowSelectStatu(FrameRowControl frame, bool select) { //鍥炬爣 var btnIcon = (IconViewControl)frame.GetChildren(0); @@ -247,46 +195,14 @@ var btnText = (NormalViewControl)frame.GetChildren(1); if (btnText != null) { - //btnText.TextColor = select == true ? UserCenterColor.Current.TextColor3 : UserCenterColor.Current.TextColor1; btnText.TextColor = select == true ? UserCenterColor.Current.TextColor1 : UserCenterColor.Current.TextGrayColor1; } - //鑳屾櫙鑹� - //frame.BackgroundColor = select == true ? UserCenterColor.Current.BlackBackGround : UserCenterColor.Current.White; - - if (this.RowCount == 1) - { - //濡傛灉鍙湁涓�涓彍鍗曠殑璇� - //this.btnTopRadius.BackgroundColor = UserCenterColor.Current.BlackBackGround; - //this.btnBottomRadius.BackgroundColor = UserCenterColor.Current.BlackBackGround; - return; - } //鍓嶅洖閫夋嫨鐨勮彍鍗曚负null,鎴栬�呮槸鐩稿悓鐨勪笢瑗�,鍒欎笉澶勭悊 - if (this.oldRowFrame == null || this.oldRowFrame.Name == frame.Name) + if (this.oldRowFrame == null || this.oldRowFrame.MainKeys == frame.MainKeys) { return; } - if (frame.Name == "Menu1") - { - //濡傛灉鐐瑰嚮鐨勬槸绗竴涓彍鍗曠殑璇�,鍙橀粦鑹� - //this.btnTopRadius.BackgroundColor = UserCenterColor.Current.BlackBackGround; - } - else - { - //鍙樺洖鐧借壊 - //this.btnTopRadius.BackgroundColor = UserCenterColor.Current.White; - } - - if (frame.Name == "Menu" + this.RowCount) - { - //濡傛灉鐐瑰嚮鐨勬槸鏈�鍚庝竴涓彍鍗曠殑璇�,鍙橀粦鑹� - //this.btnBottomRadius.BackgroundColor = UserCenterColor.Current.BlackBackGround; - } - else - { - //鍙樺洖鐧借壊 - //this.btnBottomRadius.BackgroundColor = UserCenterColor.Current.White; - } //鍓嶅洖閫夋嫨鐨勮杩樺師 this.SetRowSelectStatu(this.oldRowFrame, false); } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs index 1f00096..52838aa 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs @@ -32,19 +32,14 @@ return zbway; } } - - /// <summary> - /// 鍥炬爣鎺т欢 - /// </summary> - public IconViewControl btnIcon = null; /// <summary> /// 鏄剧ず鏂囨湰鎺т欢 /// </summary> public NormalViewControl btnName = null; /// <summary> - /// 鍦ㄧ嚎鐘舵�佺殑鎺т欢 + /// 鏄剧ずIP鎺т欢 /// </summary> - public NormalViewControl btnOnline = null; + private NormalViewControl btnIp = null; /// <summary> /// 鍦ㄧ嚎鐘舵�� @@ -87,7 +82,7 @@ var tempWay = this.zbGateway; //鍥炬爣 - this.btnIcon = frameTable.AddLeftIcon(iconSize); + var btnIcon = frameTable.AddLeftIcon(iconSize); if (tempWay != null) { HdlGatewayLogic.Current.SetGatewayIcon(btnIcon, tempWay); @@ -100,10 +95,35 @@ //鏃犳硶璇嗗埆鐨勭綉鍏宠澶� wayName = Language.StringByID(R.MyInternationalizationString.uUnDistinguishTheGatewayDevice); } - this.btnName = frameTable.AddLeftCaption(wayName, 700); - this.btnName.Text = wayName; + else + { + var value = HdlGatewayLogic.Current.IsMainGateway(this.zbGatewayId); + if (value == 1) + { + //涓荤綉鍏� + wayName += "(" + Language.StringByID(R.MyInternationalizationString.uMainGateway) + ")"; + } + else if (value == 2) + { + //浠庣綉鍏� + wayName += "(" + Language.StringByID(R.MyInternationalizationString.uChidrenGateway) + ")"; + } + } - tempWay = null; + this.btnName = frameTable.AddLeftCaption(wayName, 700, 60); + btnName.TextSize = 15; + //杩欎釜鍧愭爣鏈夌偣鐗规畩 + btnName.Y = Application.GetRealHeight(12) + this.chidrenYaxis; + frameTable.AddChidren(btnName, ChidrenBindMode.BindEventOnly); + + //鎴块棿 + string strIp = HdlGatewayLogic.Current.GetGatewayBaseInfoAttribute(tempWay, "IpAddress").ToString(); + this.btnIp = frameTable.AddLeftCaption(strIp, 600, 50, true); + //杩欎釜鍧愭爣鏈夌偣鐗规畩 + btnIp.Y = Application.GetRealHeight(72) + this.chidrenYaxis; + btnIp.TextSize = 12; + btnIp.TextColor = UserCenterColor.Current.TextGrayColor1; + frameTable.AddChidren(btnIp, ChidrenBindMode.BindEventOnly); } #endregion @@ -120,38 +140,28 @@ { this.zbGatewayId = HdlGatewayLogic.Current.GetGatewayId(zbway); } - ZbGateway realWay = null; - bool bonline = false; - if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, this.zbGatewayId) == true) - { - bonline = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(realWay); - } + bool bonline = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(zbway); this.IsOnline = bonline; - this.btnName.Text = HdlGatewayLogic.Current.GetGatewayName(this.zbGateway); - realWay = null; + string wayName = HdlGatewayLogic.Current.GetGatewayName(this.zbGateway); + var value = HdlGatewayLogic.Current.IsMainGateway(this.zbGatewayId); + if (value == 1) + { + //涓荤綉鍏� + wayName += "(" + Language.StringByID(R.MyInternationalizationString.uMainGateway) + ")"; + } + else if (value == 2) + { + //浠庣綉鍏� + wayName += "(" + Language.StringByID(R.MyInternationalizationString.uChidrenGateway) + ")"; + } + this.btnName.Text = wayName; } #endregion #region 鈻� 鍦ㄧ嚎鐘舵�乢__________________________ - - /// <summary> - /// 娣诲姞鍦ㄧ嚎鐘舵�佺殑鎺т欢(鍙宠竟鏈夊浘鏍囩殑璇�,鍏堟坊鍔犲浘鏍�,鍐嶆坊鍔犳鎺т欢) - /// </summary> - public void AddOnLineControl() - { - this.btnOnline = frameTable.AddMostRightView(string.Empty, 270); - - ZbGateway realWay = null; - bool bonline = false; - if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, zbGateway) == true) - { - bonline = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(realWay); - } - this.SetOnlineStatu(bonline); - } /// <summary> /// 璁剧疆鍦ㄧ嚎鐘舵�� @@ -160,23 +170,13 @@ private void SetOnlineStatu(bool online) { m_IsOnline = online; - if (btnOnline == null) - { - return; - } if (online == false) { - //鍒濆鍊硷細绂荤嚎 - btnOnline.TextID = R.MyInternationalizationString.uOffLine; - //鍒濆鍊硷細鐏拌壊 - btnOnline.TextColor = UserCenterColor.Current.Gray; + btnName.TextColor = UserCenterColor.Current.TextGrayColor2; } else { - //鍦ㄧ嚎 - btnOnline.TextID = R.MyInternationalizationString.uOnline; - //缁胯壊 - btnOnline.TextColor = UserCenterColor.Current.Green; + btnName.TextColor = UserCenterColor.Current.TextColor1; } } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs index 8dba4e5..a79ddb8 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutControl.cs @@ -36,6 +36,17 @@ /// </summary> public int chidrenYaxis = 0; + /// <summary> + /// 鍦嗚搴�(瀹夊崜鍜孖OS鎴栬闇�瑕侀缂栬瘧) + /// </summary> + public uint RadiusEx + { + set + { + this.Radius = value; + } + } + #endregion #region 鈻� 鍒濆鍖朹____________________________ @@ -50,7 +61,15 @@ this.MouseUpEventHandler += ChildrenUpEvent; this.MouseDownEventHandler += ChildrenDownEvent; - } + } + + /// <summary> + /// 鍋氭垚涓�涓櫘閫氱殑FrameLayout鎺т欢 + /// </summary> + /// <param name="flage">娌″暐鐢ㄧ殑涓滆タ</param> + public FrameLayoutControl(bool flage) + { + } #endregion diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs index c62be4d..20c6cb8 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs @@ -391,7 +391,7 @@ /// 閲嶆柊缁戝畾缃戝叧(1:姝e父 -1:寮傚父 0:褰撳墠鐨勭綉鍏崇粦瀹氬湪浜嗗綋鍓嶈处鍙蜂笅鐨勪笉鍚屼綇瀹呴噷闈�) /// </summary> /// <param name="zbGateway">缃戝叧</param> - public async Task<int> ReBindNewGateway(ZbGateway zbGateway) + public async Task<int> ReBindNewGateway(ZbGateway zbGateway, NormalViewControl btnMsg = null) { if (zbGateway == null) { @@ -424,9 +424,19 @@ HdlGatewayLogic.Current.BackupGatewayIdOnNotNetwork(zbGateway); } - //缃戝叧鍐呴儴鏁版嵁鍙樻洿涓�,璇风◢鍚� - ProgressBar.SetValue(Language.StringByID(R.MyInternationalizationString.uGatewayDataIsChangingPleaseWhait)); - + if (btnMsg == null) + { + //缃戝叧鍐呴儴鏁版嵁鍙樻洿涓�,璇风◢鍚� + ProgressBar.SetValue(Language.StringByID(R.MyInternationalizationString.uGatewayDataIsChangingPleaseWhait)); + } + else + { + HdlThreadLogic.Current.RunMain(() => + { + //缃戝叧鍐呴儴鏁版嵁鍙樻洿涓�,璇风◢鍚� + btnMsg.TextID = R.MyInternationalizationString.uGatewayDataIsChangingPleaseWhait; + }); + } await System.Threading.Tasks.Task.Delay(8000); //鑾峰彇缃戝叧鐨勪俊鎭� @@ -1053,38 +1063,60 @@ } /// <summary> - /// 鑾峰彇缃戝叧闀滃儚绫诲瀷鐨勭炕璇戝悕瀛� + /// 璁剧疆缃戝叧闀滃儚绫诲瀷鐨勭炕璇戝悕瀛� /// </summary> + /// <param name="button"></param> /// <param name="zbGateway"></param> /// <returns></returns> - public string GetGatewayImageText(ZbGateway zbGateway) + public void SetGatewayImageText(Button button, ZbGateway zbGateway) { + //鍒濆鍊�:鏃犳硶璇嗗埆鐨勭綉鍏宠澶� + button.TextID = R.MyInternationalizationString.uUnDistinguishTheGatewayDevice; + string gwId = this.GetGatewayId(zbGateway); - int imageType = -1; if (this.dicGateway.ContainsKey(gwId) == false || this.dicGateway[gwId].getGwInfo == null) { //濡傛灉杩欎釜缃戝叧娌℃湁淇℃伅锛屽垯浠庢柊鑾峰彇 - var result = this.GetGatewayNewInfo(zbGateway, ShowErrorMode.NO); - if (result == null) + if (zbGateway.getGwInfo != null && zbGateway.getGwInfo.LinuxImageType != 0) { - //鏃犳硶璇嗗埆鐨勭綉鍏宠澶� - return Language.StringByID(R.MyInternationalizationString.uUnDistinguishTheGatewayDevice); + string keyName = Common.LocalDevice.deviceModelIdName + zbGateway.getGwInfo.LinuxImageType; + if (Common.LocalDevice.Current.dicDeviceDefultNameID.ContainsKey(keyName) == true) + { + //浣跨敤R鏂囦欢閲岄潰璁剧疆鐨勪笢瑗� + button.TextID = LocalDevice.Current.dicDeviceDefultNameID[keyName]; + } } - imageType = result.LinuxImageType; + else + { + //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷 + HdlThreadLogic.Current.RunThread(async () => + { + var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO); + if (result != null) + { + zbGateway.getGwInfo = result; + HdlThreadLogic.Current.RunMain(() => + { + string keyName = Common.LocalDevice.deviceModelIdName + zbGateway.getGwInfo.LinuxImageType; + if (Common.LocalDevice.Current.dicDeviceDefultNameID.ContainsKey(keyName) == true) + { + //浣跨敤R鏂囦欢閲岄潰璁剧疆鐨勪笢瑗� + button.TextID = LocalDevice.Current.dicDeviceDefultNameID[keyName]; + } + }); + } + }); + } } else { - imageType = Convert.ToInt32(this.GetGwInfoAttribute(this.dicGateway[gwId], "LinuxImageType")); + string keyName = Common.LocalDevice.deviceModelIdName + this.dicGateway[gwId].getGwInfo.LinuxImageType; + if (Common.LocalDevice.Current.dicDeviceDefultNameID.ContainsKey(keyName) == true) + { + //浣跨敤R鏂囦欢閲岄潰璁剧疆鐨勪笢瑗� + button.TextID = Common.LocalDevice.Current.dicDeviceDefultNameID[keyName]; + } } - string keyName = Common.LocalDevice.deviceModelIdName + imageType; - if (Common.LocalDevice.Current.dicDeviceDefultNameID.ContainsKey(keyName) == true) - { - //浣跨敤R鏂囦欢閲岄潰璁剧疆鐨勪笢瑗� - return Language.StringByID(Common.LocalDevice.Current.dicDeviceDefultNameID[keyName]); - } - - //鏃犳硶璇嗗埆鐨勭綉鍏宠澶� - return Language.StringByID(R.MyInternationalizationString.uUnDistinguishTheGatewayDevice); } #endregion @@ -1314,7 +1346,7 @@ #region 鈻� 涓荤綉鍏冲垽瀹歘________________________ /// <summary> - /// 鍒ゆ柇鏄惁涓荤綉鍏�(1:涓荤綉鍏� 0:涓嶅湪绾� -1:杩滅▼妯″紡,涓嶅瓨鍦ㄥ暐涓荤綉鍏崇殑璇存硶) + /// 鍒ゆ柇鏄惁涓荤綉鍏�(1:涓荤綉鍏� 0:涓嶅湪绾� 2:瀛愮綉鍏�) /// </summary> /// <param name="zbGateway">缃戝叧瀵硅薄</param> /// <returns></returns> @@ -1325,7 +1357,7 @@ } /// <summary> - /// 鍒ゆ柇鏄惁涓荤綉鍏�(1:涓荤綉鍏� 0:涓嶅湪绾� -1:杩滅▼妯″紡,涓嶅瓨鍦ㄥ暐涓荤綉鍏崇殑璇存硶) + /// 鍒ゆ柇鏄惁涓荤綉鍏�(1:涓荤綉鍏� 0:涓嶅湪绾� 2:瀛愮綉鍏�) /// </summary> /// <param name="waiID">缃戝叧id</param> /// <returns></returns> @@ -1336,7 +1368,7 @@ { return 0; } - return zbGateway.IsMainGateWay == true ? 1 : 0; + return zbGateway.IsMainGateWay == true ? 1 : 2; } #endregion @@ -1344,7 +1376,7 @@ #region 鈻� 璁剧疆缃戝叧鍥剧墖_______________________ /// <summary> - /// 璁剧疆鐪熷疄缃戝叧鐨勫浘鐗囷紝瑙勬牸锛�915X492 + /// 璁剧疆鐪熷疄缃戝叧鐨勫浘鐗� /// </summary> /// <param name="button"></param> /// <param name="zbGateway"></param> @@ -1354,30 +1386,35 @@ var localWay = this.GetLocalGateway(gwID); if (localWay == null || localWay.getGwInfo == null) { - //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷 - HdlThreadLogic.Current.RunThread(async () => + if (zbGateway.getGwInfo != null && zbGateway.getGwInfo.LinuxImageType != 0) { - var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO); - if (result != null) + button.UnSelectedImagePath = "Gateway/RealGateway" + zbGateway.getGwInfo.LinuxImageType + ".png"; + } + else + { + //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷 + HdlThreadLogic.Current.RunThread(async () => { - Application.RunOnMainThread(() => + var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO); + if (result != null) { - if (button != null) + zbGateway.getGwInfo = result; + HdlThreadLogic.Current.RunMain(() => { button.UnSelectedImagePath = "Gateway/RealGateway" + result.LinuxImageType + ".png"; - } - }); - } - }); + }); + } + }); + } } else { - button.UnSelectedImagePath = "Gateway/RealGateway" + this.GetGwInfoAttribute(localWay, "LinuxImageType").ToString() + ".png"; + button.UnSelectedImagePath = "Gateway/RealGateway" + localWay.getGwInfo.LinuxImageType + ".png"; } } /// <summary> - /// 璁剧疆缃戝叧鍥炬爣锛岃鏍硷細110X110 + /// 璁剧疆缃戝叧鍥炬爣 /// </summary> /// <param name="button"></param> /// <param name="zbGateway"></param> @@ -1387,28 +1424,30 @@ var localWay = this.GetLocalGateway(gwID); if (localWay == null || localWay.getGwInfo == null) { - //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷 - HdlThreadLogic.Current.RunThread(async () => + if (zbGateway.getGwInfo != null && zbGateway.getGwInfo.LinuxImageType != 0) { - var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO); - if (result != null) + button.UnSelectedImagePath = "Gateway/GatewayIcon" + zbGateway.getGwInfo.LinuxImageType + ".png"; + } + else + { + //缁欎竴涓嚎绋嬪幓鑾峰彇瀹冪殑闀滃儚绫诲瀷 + HdlThreadLogic.Current.RunThread(async () => { - Application.RunOnMainThread(() => + var result = await this.GetGatewayNewInfoAsync(zbGateway, ShowErrorMode.NO); + if (result != null) { - if (button != null) + zbGateway.getGwInfo = result; + HdlThreadLogic.Current.RunMain(() => { button.UnSelectedImagePath = "Gateway/GatewayIcon" + result.LinuxImageType + ".png"; - button.SelectedImagePath = "Gateway/GatewayIcon" + result.LinuxImageType + "Selected.png"; - } - }); - } - }); + }); + } + }); + } } else { - string linType = this.GetGwInfoAttribute(localWay, "LinuxImageType").ToString(); - button.UnSelectedImagePath = "Gateway/GatewayIcon" + linType + ".png"; - button.SelectedImagePath = "Gateway/GatewayIcon" + linType + "Selected.png"; + button.UnSelectedImagePath = "Gateway/GatewayIcon" + localWay.getGwInfo.LinuxImageType + ".png"; } } @@ -1443,13 +1482,13 @@ #endregion - #region 鈻� 娴嬭瘯缃戝叧___________________________ + #region 鈻� 缃戝叧瀹氫綅___________________________ /// <summary> - /// 鍙戦�佹祴璇曟寚浠ゅ埌璁惧(缃戝叧LED闂儊璇嗗埆) + /// 鍙戦�佹寚浠ゅ埌缃戝叧杩涜瀹氫綅(缃戝叧LED闂儊璇嗗埆) /// </summary> /// <param name="zbGateway"></param> - public void SetTestCommand(ZbGateway zbGateway) + public void SetFixedPositionCommand(ZbGateway zbGateway) { ZbGateway realWay = null; if (this.GetRealGateway(ref realWay, zbGateway) == false) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs index 0970bc3..ef0bb03 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs @@ -1,6 +1,9 @@ 锘縰sing Shared.Common; using System; using System.Collections.Generic; +using System.Collections.Specialized; +using System.IO; +using System.Net; using System.Text; using System.Threading.Tasks; using ZigBee.Device; @@ -181,6 +184,20 @@ Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData); } + /// <summary> + /// 娣诲姞妤煎眰瀵硅薄鍒扮紦瀛� + /// </summary> + /// <param name="dic">妤煎眰</param> + public void AddShardFile(Dictionary<string, string> dic) + { + var data = Newtonsoft.Json.JsonConvert.SerializeObject(dic); + var byteData = System.Text.Encoding.UTF8.GetBytes(data); + + string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, DirNameResourse.ShardFloorFile); + //鍐欏叆鍐呭 + Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData); + } + #endregion #region 鈻� 鍒犻櫎鍒嗕韩鏂囦欢_______________________ @@ -210,6 +227,115 @@ #endregion + #region 鈻� 鑾峰彇鎴愬憳鍏变韩鍒楄〃___________________ + + /// <summary> + /// 浠庢湰鍦拌幏鍙栨垚鍛樼殑鍒嗕韩鍒楄〃 + /// </summary> + /// <param name="memberShardInfo">鎴愬憳鐨勫垎浜暟鎹殑缂撳瓨(璋冪敤杩欎釜鍑芥暟浼氬埛鏂拌繖涓彉閲忕殑淇℃伅)</param> + public void GetMemberShardContentListFromLocal(MemberShardInfoData memberShardInfo) + { + memberShardInfo.dicShardRoom = new Dictionary<string, Common.Room>(); + + var listDeviceFile = new HashSet<string>(); + var listSceneFile = new HashSet<string>(); + + var listFile = this.GetLocalAllShardFile(); + //鍏堝垵濮嬪寲鎴块棿 + foreach (string fileName in listFile) + { + if (fileName.StartsWith("Room_") == true) + { + //鎴块棿鏂囦欢 + var byteData = this.GetShardFileContent(fileName); + if (byteData != null) + { + string valueData = System.Text.Encoding.UTF8.GetString(byteData); + var roomTemp = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.Room>(valueData); + memberShardInfo.dicShardRoom[fileName] = roomTemp; + } + } + else if (fileName == DirNameResourse.ShardFloorFile) + { + //妤煎眰鏂囦欢 + var byteData = this.GetShardFileContent(fileName); + if (byteData != null) + { + string valueData = System.Text.Encoding.UTF8.GetString(byteData); + memberShardInfo.dicShardFloor = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(valueData); + } + } + else if (fileName.StartsWith("Device_") == true) + { + //璁惧鏂囦欢 + listDeviceFile.Add(fileName); + } + else if (fileName.StartsWith("Scene_") == true) + { + //鍦烘櫙鏂囦欢 + listSceneFile.Add(fileName); + } + } + + //璁剧疆鎴块棿閲岄潰璁惧鐨刄I瀵硅薄(鍥犱负杩欎釜涓滆タ鏄弽搴忓垪鍖栧嚭鏉ョ殑,璁惧UI瀵硅薄鏄笉搴忓垪鍖栧璞�) + foreach (var tempRoom in memberShardInfo.dicShardRoom.Values) + { + //杩樺師璁惧瀵硅薄 + tempRoom.DeviceUIList.Clear(); + foreach (string uiPath in tempRoom.DeviceUIFilePathList) + { + string deviceFile = uiPath.Replace("DeviceUI_", string.Empty); + //杩欎釜璁惧鏂囦欢鍖归厤寰楀埌鎴块棿 + listDeviceFile.Remove(deviceFile); + if (this.IsFileExists(deviceFile) == false) + { + continue; + } + tempRoom.DeviceUIList.Add(Common.LocalDevice.Current.GetDeviceUI(uiPath)); + } + //杩樺師鍦烘櫙瀵硅薄 + tempRoom.SceneUIList.Clear(); + foreach (string uiPath in tempRoom.SceneUIFilePathList) + { + //杩欎釜鍦烘櫙鏂囦欢鍖归厤寰楀埌鎴块棿 + listSceneFile.Remove(uiPath); + var byteData = this.GetShardFileContent(uiPath); + if (byteData == null) + { + continue; + } + string valueData = System.Text.Encoding.UTF8.GetString(byteData); + var tempUi = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.SceneUI>(valueData); + tempRoom.SceneUIList.Add(tempUi); + } + } + //濡傛灉瀛樺湪鍖归厤涓嶄笂鐨勬枃浠� + if (listDeviceFile.Count != 0 || listSceneFile.Count != 0) + { + //鍒涘缓涓�涓复鏃舵埧闂存潵瀛樺偍 + var roomTemp = new Room(); + roomTemp.Id = "Other"; + roomTemp.FloorId = "Other"; + memberShardInfo.dicShardRoom[roomTemp.FileName] = roomTemp; + roomTemp.Name = Language.StringByID(R.MyInternationalizationString.uSharedRoom); + //杩樺師璁惧瀵硅薄 + foreach (string deviceFile in listDeviceFile) + { + roomTemp.DeviceUIList.Add(Common.LocalDevice.Current.GetDeviceUI(deviceFile)); + } + //杩樺師鍦烘櫙瀵硅薄 + foreach (string uiPath in listSceneFile) + { + var byteData = this.GetShardFileContent(uiPath); + string valueData = System.Text.Encoding.UTF8.GetString(byteData); + var tempUi = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.SceneUI>(valueData); + roomTemp.SceneUIList.Add(tempUi); + } + } + } + + #endregion + #region 鈻� 鍚屾鏈嶅姟鍣ㄧ殑鍒嗕韩鍐呭_______________ /// <summary> @@ -224,7 +350,7 @@ } //鑾峰彇涓讳汉鍒嗕韩缁欐垚鍛樼殑鏂囦欢鍒楄〃 - var infoPra = new { DistributedMark = Config.Instance.Guid, HouseDistributedMark = Common.Config.Instance.Home.Id , IsOtherAccountControl = Common.Config.Instance.isAdministrator }; + var infoPra = new { DistributedMark = Config.Instance.Guid, HouseDistributedMark = Common.Config.Instance.Home.Id, IsOtherAccountControl = Common.Config.Instance.isAdministrator }; var listNotShow = new List<string>() { "NotSetAgain" }; var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra, listNotShow); if (string.IsNullOrEmpty(result) == true) @@ -437,6 +563,87 @@ #endregion + //----------------------------------鍒嗗壊绾�(鏁版嵁棰勫)------------------------------------------------- + + #region 鈻� 鏁版嵁棰勫___________________________ + + /// <summary> + /// 鑾峰彇鎴愬憳鍏变韩鍒楄〃鐒跺悗淇濆瓨鍒版湰鍦�(鐢ㄥ畬涔嬪悗鏈�濂借皟鐢ㄦ竻绌� ClearShardDirectory鍑芥暟娓呯┖) + /// </summary> + /// <param name="SubAccountDistributedMark">鎴愬憳鍒楄〃鎺ュ彛杩斿洖鐨凷ubAccountDistributedMark</param> + /// <param name="memberShardInfo"> + /// <para>鎴愬憳鐨勫垎浜暟鎹�</para> + /// <para>濡傛灉涓嶇煡閬撹繖鏄粈涔堜笢瑗�,灏盢ew涓�涓�,鐒跺悗缂撳瓨璧锋潵,璋冪敤鍏朵粬鍑芥暟閮介渶瑕佽繖涓笢瑗�</para> + /// <para>New鐨勬椂鍊欒寰楀SubAccountDistributedMark璧嬪��,瀹冩槸鎴愬憳鍒楄〃鎺ュ彛杩斿洖鐨凷ubAccountDistributedMark</para> + /// </param> + /// <returns></returns> + public async Task<bool> GetMemberShardContentListAndSetToLocation(MemberShardInfoData memberShardInfo) + { + if (memberShardInfo.Refresh == false) + { + return true; + } + memberShardInfo.Refresh = false; + + //鎵撳紑杩涘害鏉� + ProgressBar.Show(); + + var infoPra = new + { + DistributedMark = memberShardInfo.SubAccountDistributedMark, + HouseDistributedMark = Shared.Common.Config.Instance.HomeId, + IsOtherAccountControl = Common.Config.Instance.isAdministrator + }; + var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra); + if (result == null) + { + //鍏抽棴杩涘害鏉� + ProgressBar.Close(); + return false; + } + var listData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ReceiveShardInfoResult>>(result); + //鍏堟竻绌哄叡浜枃浠跺す + this.ClearShardDirectory(); + + var listMark = new List<string>(); + foreach (var data in listData) + { + //鎬ц兘浼樺寲锛氬鏋滄湰鍦版嫢鏈夎繖涓枃浠剁殑璇�,鐩存帴浣跨敤閭d釜鏂囦欢 + string fileName = data.ShareName; + //璁板綍璧峰畠鐨勪富閿� + memberShardInfo.dicAllShardKeys[fileName] = data.DistributedMark; + + if (fileName.StartsWith("Room_") == true || fileName.StartsWith("Scene_") == true) + { + //鎴块棿鏂囦欢鍜屽満鏅枃浠堕渶瑕侀噸鏂板弽搴忓垪鍖� + listMark.Add(data.DistributedMark); + continue; + } + if (Shared.Common.Global.IsExistsByHomeId(fileName) == true) + { + //鍏朵粬鏂囦欢鐨勮瘽锛屽鏋滄湰鍦板瓨鍦紝鍒欎互鏈湴鏂囦欢涓哄噯 + this.AddShardFile(fileName); + continue; + } + listMark.Add(data.DistributedMark); + } + + //灏嗗垎浜殑鏁版嵁瀛樺叆鏈湴,杩斿洖鐨勬槸鏂囦欢鍚嶅瓧(寮傚父鏃惰繑鍥瀗ull) + var listFile = await this.SetShardFileToLocation(listMark); + if (listFile == null) + { + //鍏抽棴杩涘害鏉� + ProgressBar.Close(); + return false; + } + //鍏抽棴杩涘害鏉� + ProgressBar.Close(); + + return true; + } + + #endregion + //----------------------------------鍒嗗壊绾�(涓婁紶鏂扮殑鍒嗕韩)--------------------------------------------- #region 鈻� 鎵ц涓婁紶鏂扮殑鍒嗕韩___________________ @@ -447,10 +654,16 @@ /// <param name="memberShardInfo">鎴愬憳鐨勫垎浜暟鎹�</param> /// <param name="nowRoom">褰撳墠鐨勬埧闂村璞�</param> /// <param name="listDevice">閫夋嫨涓婁紶鐨勮澶�</param> - /// <param name="listScene">閫夋嫨涓婁紶鐨勫満鏅�</param> + /// <param name="listScene">閫夋嫨涓婁紶鐨勫満鏅�(涓嶈鑾峰彇瀹冮噷闈㈢殑缁戝畾鍒楄〃)</param> + /// <param name="BarMaxValue">杩涘害鏉$殑鏈�澶у��,濡傛灉涓嶄负-1,鍒欏唴閮ㄤ笉浼氳嚜鍔ㄥ脊鍑鸿繘搴︽潯</param> + /// <param name="listCheckFile">鏂囦欢閲嶅涓婁紶妫�娴�</param> public async Task<bool> DoUploadSharedContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom, - List<CommonDevice> listDevice, List<Common.SceneUI> listScene) + List<CommonDevice> listDevice, List<Common.SceneUI> listScene, int BarMaxValue = -1, HashSet<string> listCheckFile = null) { + if (listDevice.Count == 0 && listScene.Count == 0) + { + return true; + } var listCheck = new HashSet<string>(); //鑾峰彇鍦烘櫙閲岄潰宓屽鐨勫瓙璁惧鍜屽瓙鍦烘櫙 @@ -462,36 +675,53 @@ this.GetSceneDeviceList(SceneTemp, listCheck, listChirdScene, listChirdDevice); } + //杩欎釜涔熸槸澶囦唤 + int BackgroundImageType = 0; + string BackgroundImage = string.Empty; + if (memberShardInfo.dicShardRoom.ContainsKey(nowRoom.FileName) == true) + { + BackgroundImageType = memberShardInfo.dicShardRoom[nowRoom.FileName].BackgroundImageType; + BackgroundImage = memberShardInfo.dicShardRoom[nowRoom.FileName].BackgroundImage; + } //闃叉鍑虹幇閿欒,鏆傛椂淇濆瓨涓や釜鍒楄〃(铏界劧娌¢偅涔堥夯鐑︼紝涓嶈繃鏃㈢劧宸茬粡杩欐牱鍐欎簡灏辫繖鏍蜂簡) var dicBackDevice = new Dictionary<string, List<string>>(); var dicBackScene = new Dictionary<string, List<string>>(); //涓存椂澶囦唤鎴块棿璁惧鍒楄〃 this.BackupRoomDevicelistTemporary(memberShardInfo, dicBackDevice, dicBackScene); - Common.Room roomTemp = null; - if (memberShardInfo.dicShardRoom.ContainsKey(nowRoom.FileName) == false) - { - //鍏嬮殕涓�涓璞� - roomTemp = nowRoom.CloneRoomClass(); - memberShardInfo.dicShardRoom[nowRoom.FileName] = roomTemp; - } - roomTemp = memberShardInfo.dicShardRoom[nowRoom.FileName]; - //鑾峰彇涓婁紶鐨勬枃浠�,鐒跺悗灏嗘枃浠跺鍒跺埌鎸囧畾鏂囦欢澶� - var listFile = this.GetUploadListFile(ref roomTemp, listDevice, listScene, listChirdDevice, listChirdScene); + var listDelPic = new List<string>(); + var listFile = this.GetUploadListFile(memberShardInfo, nowRoom, listDevice, listScene, listChirdDevice, listChirdScene, listDelPic); //涓嶅厑璁告寜绯荤粺鐨勮繑鍥為敭 Shared.Common.CommonPage.BackKeyCanClick = false; UserCenterResourse.Option.AppCanSignout = false; - //鎵撳紑杩涘害鏉� - ProgressBar.Show(); - //璁剧疆鏈�澶у�� - ProgressBar.SetMaxValue(listFile.Count); + if (BarMaxValue == -1) + { + //鎵撳紑杩涘害鏉� + ProgressBar.Show(); + //璁剧疆鏈�澶у�� + ProgressBar.SetMaxValue(listFile.Count); + } + else + { + //璁剧疆鏈�澶у�� + ProgressBar.SetMaxValue(BarMaxValue); + } + //涓婁紶鍒嗕韩 - var result = await this.DoUploadShardContent(memberShardInfo, nowRoom, listFile); - //鍏抽棴杩涘害鏉� - ProgressBar.Close(); + var result = await this.DoUploadShardContent(memberShardInfo, listFile, listCheckFile); + if (result == true) + { + //鍒犻櫎鎸囧畾鑷畾涔夊浘鐗� + result = await this.DoDeleteSharedContent(memberShardInfo, listDelPic); + } + if (BarMaxValue == -1) + { + //鍏抽棴杩涘害鏉� + ProgressBar.Close(); + } //鍏佽鎸夌郴缁熺殑杩斿洖閿� Shared.Common.CommonPage.BackKeyCanClick = true; @@ -500,32 +730,87 @@ if (result == false) { //鎭㈠鍘熸暟鎹� + if (memberShardInfo.TempRoom == null) + { + memberShardInfo.dicShardRoom[nowRoom.FileName].BackgroundImageType = BackgroundImageType; + memberShardInfo.dicShardRoom[nowRoom.FileName].BackgroundImage = BackgroundImage; + } this.RecoverRoomDevicelistTemporary(memberShardInfo, dicBackDevice, dicBackScene, listFile); - return false; } + else + { + //瑕嗙洊鏁版嵁 + if (memberShardInfo.TempRoom != null) + { + memberShardInfo.dicShardRoom[nowRoom.FileName] = memberShardInfo.TempRoom; + } + } + memberShardInfo.TempRoom = null; - return true; + return result; } /// <summary> /// 鑾峰彇涓婁紶鐨勬枃浠跺悕 /// </summary> - /// <param name="roomTemp">闇�瑕佷笂浼犲埌浜戠鐨勬埧闂村璞�</param> - /// <param name="listDevice">鍒嗕韩鐨勮澶囧垪琛�</param> - /// <param name="listScene">鍒嗕韩鐨勫満鏅垪琛�</param> + /// <param name="memberShardInfo">鎴愬憳鐨勫垎浜暟鎹�</param> + /// <param name="nowRoom">闇�瑕佷笂浼犲埌浜戠鐨勬埧闂村璞�(娉ㄦ剰,杩欎釜鎴块棿鏄富浜虹殑鎴块棿瀵硅薄,鑰屼笉鏄櫄鎷熺殑)</param> + /// <param name="listDevice">鍒嗕韩鐨勮澶囧垪琛�(娉ㄦ剰,杩欎釜涓滆タ鏄富浜虹殑)</param> + /// <param name="listScene">鍒嗕韩鐨勫満鏅垪琛�(娉ㄦ剰,杩欎釜涓滆タ鏄富浜虹殑)</param> /// <param name="listChirdDevice">鍦烘櫙閲岄潰閫掑綊鑾峰彇鐨勮澶�</param> /// <param name="listChirdScene">鍦烘櫙閲岄潰閫掑綊鑾峰彇鐨勫満鏅�</param> + /// <param name="listDelPic">闇�瑕佸垹闄ょ殑鍥剧墖</param> /// <returns></returns> - private List<string> GetUploadListFile(ref Common.Room roomTemp, List<CommonDevice> listDevice, List<Common.SceneUI> listScene, - List<CommonDevice> listChirdDevice, List<Common.SceneUI> listChirdScene) + private List<string> GetUploadListFile(MemberShardInfoData memberShardInfo, Common.Room nowRoom, List<CommonDevice> listDevice, List<Common.SceneUI> listScene, + List<CommonDevice> listChirdDevice, List<Common.SceneUI> listChirdScene, List<string> listDelPic) { var listFile = new List<string>(); - var listOtaCheck = new List<string>(); + + Common.Room roomTemp = null; + if (memberShardInfo.dicShardRoom.ContainsKey(nowRoom.FileName) == false) + { + //鍏嬮殕涓�涓璞� + roomTemp = nowRoom.CloneRoomClass(); + memberShardInfo.TempRoom = roomTemp; + //鏂板垎浜殑鎴块棿,濡傛灉鍥剧墖鏄嚜瀹氫箟鐨�,鍒欎笂浼犲浘鐗� + if (roomTemp.BackgroundImageType != 0) + { + //鑷畾涔夌殑鍥剧墖,瀹冨瓨鍦ㄤ簬鏈湴,浣嗘槸瀹冩槸鍏ㄨ矾寰� + string[] Arry = roomTemp.BackgroundImage.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries); + listFile.Add(Arry[Arry.Length - 1]); + this.AddShardFile(Arry[Arry.Length - 1]); + } + } + else + { + roomTemp = memberShardInfo.dicShardRoom[nowRoom.FileName]; + //濡傛灉浜戠鍒嗕韩鐨勬埧闂寸殑鍥剧墖鍜屼富浜虹殑涓嶄竴鏍风殑鏃跺�� + if (roomTemp.BackgroundImage != nowRoom.BackgroundImage) + { + if (roomTemp.BackgroundImageType != 0) + { + //鍒犻櫎鑷畾涔夊浘鐗� + string[] Arry = roomTemp.BackgroundImage.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries); + listDelPic.Add(Arry[Arry.Length - 1]); + } + if (nowRoom.BackgroundImageType != 0) + { + //鑷畾涔夌殑鍥剧墖,瀹冨瓨鍦ㄤ簬鏈湴,浣嗘槸瀹冩槸鍏ㄨ矾寰� + string[] Arry = nowRoom.BackgroundImage.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries); + listFile.Add(Arry[Arry.Length - 1]); + this.AddShardFile(Arry[Arry.Length - 1]); + } + //鍙樻洿鍥剧墖璁剧疆 + roomTemp.BackgroundImageType = nowRoom.BackgroundImageType; + roomTemp.BackgroundImage = nowRoom.BackgroundImage; + } + } + foreach (var device in listDevice) { //璁惧 listFile.Add(device.FilePath); - HdlShardLogic.Current.AddShardFile(device.FilePath); + this.AddShardFile(device.FilePath); //璁惧鐨刄I var deviceUi = $"DeviceUI_{device.FilePath}"; @@ -539,14 +824,22 @@ { //璁惧 listFile.Add(device.FilePath); - HdlShardLogic.Current.AddShardFile(device.FilePath); + this.AddShardFile(device.FilePath); } //鍦烘櫙 foreach (var secene in listScene) { + if (secene.IconPathType != 0) + { + //鑷畾涔夌殑鍥剧墖,瀹冨瓨鍦ㄤ簬鏈湴,浣嗘槸瀹冩槸鍏ㄨ矾寰� + string[] Arry = secene.IconPath.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries); + listFile.Add(Arry[Arry.Length - 1]); + this.AddShardFile(Arry[Arry.Length - 1]); + } + listFile.Add(secene.FileName); - HdlShardLogic.Current.AddShardFile(secene); + this.AddShardFile(secene); if (roomTemp.SceneUIFilePathList.Contains(secene.FileName) == false) { @@ -557,11 +850,19 @@ foreach (var secene in listChirdScene) { listFile.Add(secene.FileName); - HdlShardLogic.Current.AddShardFile(secene); + this.AddShardFile(secene); } //鎴块棿鏂囦欢涔熺粰杩囧幓 listFile.Add(roomTemp.FileName); - HdlShardLogic.Current.AddShardFile(roomTemp); + this.AddShardFile(roomTemp); + + //鍙嶆妤煎眰鏂囦欢寰堝皬,涓�璧风粰杩囧幓鍚� + if (roomTemp.FloorId != string.Empty) + { + memberShardInfo.dicShardFloor[roomTemp.FloorId] = roomTemp.FloorName; ; + } + this.AddShardFile(memberShardInfo.dicShardFloor); + listFile.Add(DirNameResourse.ShardFloorFile); return listFile; } @@ -574,7 +875,7 @@ /// <param name="listSceneUI">娣诲姞鍒嗕韩鐨勫満鏅垪琛�</param> /// <param name="listDevice">娣诲姞鍒嗕韩鐨勮澶囧垪琛�</param> /// <returns></returns> - private void GetSceneDeviceList(Common.SceneUI scene, HashSet<string> listCheck, List<Common.SceneUI> listSceneUI, List<CommonDevice> listDevice) + public void GetSceneDeviceList(Common.SceneUI scene, HashSet<string> listCheck, List<Common.SceneUI> listSceneUI, List<CommonDevice> listDevice) { foreach (var data in scene.AddSceneMemberDataList) { @@ -624,57 +925,216 @@ /// 涓婁紶鍒嗕韩(杩斿洖浜戠鍒嗕韩鏂囦欢鐨勪富閿�:DistributedMark) /// </summary> /// <param name="memberShardInfo">鎴愬憳鐨勫垎浜暟鎹�</param> - /// <param name="nowRoom">褰撳墠鐨勬埧闂村璞�</param> /// <param name="listFile">涓婁紶鐨勬枃浠跺悕</param> + /// <param name="listCheckFile">閲嶅鏂囦欢涓婁紶妫�娴�</param> /// <returns></returns> - private async Task<bool> DoUploadShardContent(MemberShardInfoData memberShardInfo, Common.Room nowRoom, List<string> listFile) + private async Task<bool> DoUploadShardContent(MemberShardInfoData memberShardInfo, List<string> listFile, HashSet<string> listCheckFile) { var dicKeys = new Dictionary<string, string>(); for (int i = 0; i < listFile.Count; i++) { string fileName = listFile[i]; - var info = new UploadShardContent(); - info.SubAccountDistributedMark = memberShardInfo.SubAccountDistributedMark; - info.ShareName = fileName; - info.ShareDataBytes = HdlShardLogic.Current.GetShardFileContent(fileName); - - //杩藉姞鍏变韩 - if (memberShardInfo.dicAllShardKeys.ContainsKey(fileName) == false) + if (listCheckFile != null) { - var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/AddShareData", false, info); - if (string.IsNullOrEmpty(result) == true) + if (listCheckFile.Contains(fileName) == true) + { + //閲嶅鏂囦欢涓嶅啀涓婁紶 + continue; + } + listCheckFile.Add(fileName); + } + if (fileName.EndsWith(".png") == true) + { + //涓婁紶鍥剧墖 + var result = this.UpLoadBigBackupFileToDB(memberShardInfo, fileName); + if (result == null) { return false; } - //杩欓噷鏈夌偣鐗规畩锛屾帴鍙f槸鐩存帴杩斿洖涓婚敭鍥炴潵鐨勶紝鑰屼笉鏄疛soin dicKeys[fileName] = result; } else { - info.DistributedMark = memberShardInfo.dicAllShardKeys[fileName]; - var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info); - if (result == false) + var info = new UploadShardContent(); + info.SubAccountDistributedMark = memberShardInfo.SubAccountDistributedMark; + info.ShareName = fileName; + info.ShareDataBytes = HdlShardLogic.Current.GetShardFileContent(fileName); + + //杩藉姞鍏变韩 + if (memberShardInfo.dicAllShardKeys.ContainsKey(fileName) == false) { - return false; + var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/AddShareData", false, info); + if (string.IsNullOrEmpty(result) == true) + { + return false; + } + //杩欓噷鏈夌偣鐗规畩锛屾帴鍙f槸鐩存帴杩斿洖涓婚敭鍥炴潵鐨勶紝鑰屼笉鏄疛soin + dicKeys[fileName] = result; } - dicKeys[fileName] = info.DistributedMark; + else + { + info.DistributedMark = memberShardInfo.dicAllShardKeys[fileName]; + var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info); + if (result == false) + { + return false; + } + dicKeys[fileName] = info.DistributedMark; + } } //璁剧疆杩涘害鍊� ProgressBar.SetValue(1); } //濡傛灉娌℃湁閿欒,鍒欐坊鍔犱复鏃剁紦瀛� - var listShard = memberShardInfo.dicAllMemberShard[nowRoom.FileName]; foreach (var keys in dicKeys.Keys) { - if (listShard.Contains(keys) == false) - { - listShard.Add(keys); - } memberShardInfo.dicAllShardKeys[keys] = dicKeys[keys]; } return true; } + + /// <summary> + /// 涓婁紶鍥剧墖鏂囦欢鍒颁簯绔� + /// </summary> + /// <param name="fullDir">鏂囦欢澶圭殑鍏ㄨ矾寰�</param> + /// <param name="listPicFile">鍥剧墖鏂囦欢鍒楄〃</param> + /// <returns></returns> + private string UpLoadBigBackupFileToDB(MemberShardInfoData memberShardInfo, string fileName) + { + string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, fileName); + if (System.IO.File.Exists(fullName) == false) + { + return null; + } + var nvc = new NameValueCollection(); + nvc.Add("ShareName", fileName); + nvc.Add("HouseDistributedMark", Common.Config.Instance.Home.Id); + nvc.Add("SubAccountDistributedMark", memberShardInfo.SubAccountDistributedMark); + nvc.Add("ShareDataBytes", Convert.ToBase64String(this.GetShardFileContent(fileName))); + nvc.Add("IsOtherAccountCtrl", Common.Config.Instance.isAdministrator.ToString()); + + //杩藉姞鍏变韩 + if (memberShardInfo.dicAllShardKeys.ContainsKey(fileName) == false) + { + var result = this.UpLoadBigBackupFileToDB("ZigbeeDataShare/AddShareData", fullName, nvc); + if (string.IsNullOrEmpty(result) == true) + { + return null; + } + //杩欓噷鏈夌偣鐗规畩锛屾帴鍙f槸鐩存帴杩斿洖涓婚敭鍥炴潵鐨勶紝鑰屼笉鏄疛soin + return result; + } + else + { + nvc.Add("DistributedMark", memberShardInfo.dicAllShardKeys[fileName]); + var result = this.UpLoadBigBackupFileToDB("ZigbeeDataShare/EditShareData", fullName, nvc); + if (result != "1") + { + return null; + } + return memberShardInfo.dicAllShardKeys[fileName]; + } + } + + /// <summary> + /// 涓婁紶澶ф枃浠� + /// </summary> + /// <param name="RequestName">璇锋眰鎺ュ彛</param> + /// <param name="fullFileName">鏂囦欢鍚嶅瓧(鍚矾寰�)</param> + /// <param name="nvc"></param> + /// <returns></returns> + private string UpLoadBigBackupFileToDB(string RequestName, string fullFileName, NameValueCollection nvc) + { + string paramName = "file"; + string contentType = "application/octet-stream"; + string requestUrl = $"{CommonPage.RequestHttpsHost}/{RequestName}"; + //鍚敤绠$悊鍛樻潈闄� + //if (Config.Instance.isAdministrator == true) + //{ + // requestUrl = $"{Config.Instance.AdminRequestBaseUrl}/{RequestName}"; + //} + //else + //{ + // requestUrl = $"{CommonPage.RequestHttpsHost}/{RequestName}"; + //} + + string boundary = "---------------------------" + DateTime.Now.Ticks.ToString("x"); + byte[] boundarybytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "\r\n"); + + var wr = (HttpWebRequest)WebRequest.Create(requestUrl); + wr.ContentType = "multipart/form-data; boundary=" + boundary; + wr.Method = "POST"; + wr.KeepAlive = true; + wr.Credentials = System.Net.CredentialCache.DefaultCredentials; + + var rs = wr.GetRequestStream(); + + string formdataTemplate = "Content-Disposition: form-data; name=\"{0}\"\r\n\r\n{1}"; + foreach (string key in nvc.Keys) + { + rs.Write(boundarybytes, 0, boundarybytes.Length); + string formitem = string.Format(formdataTemplate, key, nvc[key]); + byte[] formitembytes = System.Text.Encoding.UTF8.GetBytes(formitem); + rs.Write(formitembytes, 0, formitembytes.Length); + } + rs.Write(boundarybytes, 0, boundarybytes.Length); + + string headerTemplate = "Content-Disposition: form-data; name=\"{0}\"; filename=\"{1}\"\r\nContent-Type: {2}\r\n\r\n"; + string header = string.Format(headerTemplate, paramName, fullFileName, contentType); + byte[] headerbytes = System.Text.Encoding.UTF8.GetBytes(header); + rs.Write(headerbytes, 0, headerbytes.Length); + + var fileStream = new FileStream(fullFileName, FileMode.Open, FileAccess.Read); + byte[] buffer = new byte[4096]; + int bytesRead = 0; + while ((bytesRead = fileStream.Read(buffer, 0, buffer.Length)) != 0) + { + rs.Write(buffer, 0, bytesRead); + } + fileStream.Close(); + + byte[] trailer = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "--\r\n"); + rs.Write(trailer, 0, trailer.Length); + rs.Close(); + + WebResponse wresp = null; + try + { + wresp = wr.GetResponse(); + Stream stream2 = wresp.GetResponseStream(); + StreamReader reader2 = new StreamReader(stream2); + + string result = reader2.ReadToEnd(); + if (RequestName == "ZigbeeDataShare/AddShareData") + { + return result; + } + + var data = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.ResponsePack>(result); + + bool flage = UserCenterLogic.CheckNotEorrorMsg(data, requestUrl); + if (flage == true) + { + return "1"; + } + return "0"; + } + catch + { + return "-1"; + } + finally + { + if (wresp != null) + { + wresp.Close(); + wresp = null; + } + wr = null; + } + } + #endregion @@ -712,7 +1172,7 @@ foreach (string fileName in listFile) { //鐢熸垚鐨勬枃浠跺叏閮ㄥ垹闄�,鎴块棿鏂囦欢鐨勮瘽,涓嬮潰浼氶噸鏂扮敓鎴� - HdlShardLogic.Current.DeleteShardFile(fileName); + this.DeleteShardFile(fileName); } foreach (var roomKeys in memberShardInfo.dicShardRoom.Keys) @@ -728,7 +1188,7 @@ memberShardInfo.dicShardRoom[roomKeys].SceneUIFilePathList.AddRange(dicBackScene[roomKeys]); //瑕嗙洊鎴块棿鏂囦欢 - HdlShardLogic.Current.AddShardFile(memberShardInfo.dicShardRoom[roomKeys]); + this.AddShardFile(memberShardInfo.dicShardRoom[roomKeys]); } } @@ -759,10 +1219,7 @@ var listMark = new List<string>(); //瑕佸垹闄ょ殑鏂囦欢鍚嶅瓧 var listDeleteFile = new List<string>(); - //杩欎釜鏄彧绉婚櫎缂撳瓨鐨勬枃浠跺悕瀛� - var listDeleteFileEx = new List<string>(); - //浜戠鐨勬寚瀹氭埧闂寸殑鍏变韩鏂囦欢鍒楄〃 - var dicShardFile = memberShardInfo.dicAllMemberShard[nowRoom.FileName]; + //闄や簡瑕佸垹闄ょ殑鐩爣澶栵紝杩樺垎浜殑鏁版嵁 var listHadShard = this.GetAllShardedFileNameFromDictionary(memberShardInfo, nowRoom, listDevice, listSceneUI); @@ -775,13 +1232,12 @@ roomTemp.DeviceUIFilePathList.Remove($"DeviceUI_{device.FilePath}"); if (listHadShard.Contains(deviceFileName) == true) { - //鍏朵粬鎴块棿鍒嗕韩鏈夎繖涓澶�,鎵�浠ヤ笉鍒犻櫎杩欎釜璁惧鐨勬牴婧愭枃浠�,鍙槸鎶婃埧闂寸殑璁惧鍒楄〃璺緞绉婚櫎 - listDeleteFileEx.Add(deviceFileName); + //鍏朵粬鍦烘櫙鍒嗕韩鏈夎繖涓澶�,鎵�浠ヤ笉鍒犻櫎杩欎釜璁惧鐨勬牴婧愭枃浠�,鍙槸鎶婃埧闂寸殑璁惧鍒楄〃璺緞绉婚櫎 continue; } //璁惧涓婚敭 - if (dicShardFile.Contains(deviceFileName) == true) + if (memberShardInfo.dicAllShardKeys.ContainsKey(deviceFileName) == true) { listMark.Add(memberShardInfo.dicAllShardKeys[deviceFileName]); } @@ -798,21 +1254,31 @@ //浣嗘槸瀹冪粦瀹氱殑璁惧鐩爣瑕佸垹闄� if (listHadShard.Contains(sceneUI.FileName) == true) { - listDeleteFileEx.Add(sceneUI.FileName); + continue; } - else + //鑾峰彇瑕佸垹闄ょ殑鍒嗕韩涓婚敭 + if (memberShardInfo.dicAllShardKeys.ContainsKey(sceneUI.FileName) == true) { - //鑾峰彇瑕佸垹闄ょ殑鍒嗕韩涓婚敭 - if (dicShardFile.Contains(sceneUI.FileName) == true) + listMark.Add(memberShardInfo.dicAllShardKeys[sceneUI.FileName]); + } + listDeleteFile.Add(sceneUI.FileName); + + //鍒犻櫎鑷畾涔夊浘鐗�,瀹冨瓨鍦ㄤ簬鏈湴,浣嗘槸瀹冩槸鍏ㄨ矾寰� + if (sceneUI.IconPathType != 0) + { + string[] Arry = sceneUI.IconPath.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries); + string sceneFile = Arry[Arry.Length - 1]; + listDeleteFile.Add(sceneFile); + if (memberShardInfo.dicAllShardKeys.ContainsKey(sceneFile) == true) { - listMark.Add(memberShardInfo.dicAllShardKeys[sceneUI.FileName]); + listMark.Add(memberShardInfo.dicAllShardKeys[sceneFile]); } - listDeleteFile.Add(sceneUI.FileName); } //鎵ц鍒犻櫎宓屽鐨勮澶� var listTemp = new HashSet<string>(); - this.GetSceneBindFileName(sceneUI, ref listTemp); + var dicBindScene = new Dictionary<string, SceneUI>(); + this.GetSceneBindFileName(sceneUI, ref listTemp, ref dicBindScene); foreach (var fileName in listTemp) { if (listHadShard.Contains(fileName) == true) @@ -820,19 +1286,47 @@ continue; } //鑾峰彇瑕佸垹闄ょ殑鍒嗕韩涓婚敭 - if (dicShardFile.Contains(fileName) == true) + if (memberShardInfo.dicAllShardKeys.ContainsKey(fileName) == true) { listMark.Add(memberShardInfo.dicAllShardKeys[fileName]); } listDeleteFile.Add(fileName); + + if (dicBindScene.ContainsKey(fileName) == true && dicBindScene[fileName].IconPathType != 0) + { + //鍒犻櫎鑷畾涔夊満鏅浘鐗�,瀹冨瓨鍦ㄤ簬鏈湴,浣嗘槸瀹冩槸鍏ㄨ矾寰� + string[] Arry = dicBindScene[fileName].IconPath.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries); + string sceneFile = Arry[Arry.Length - 1]; + listDeleteFile.Add(sceneFile); + if (memberShardInfo.dicAllShardKeys.ContainsKey(sceneFile) == true) + { + listMark.Add(memberShardInfo.dicAllShardKeys[sceneFile]); + } + } } } //濡傛灉杩欎釜鎴块棿鐨勫垎浜澶囧拰鍦烘櫙鍏ㄩ儴鍒犻櫎鐨勮瘽,鎶婂垎浜埧闂存枃浠朵篃涓�璧峰垹闄� if (roomTemp.DeviceUIFilePathList.Count == 0 && roomTemp.SceneUIFilePathList.Count == 0) { - listMark.Add(memberShardInfo.dicAllShardKeys[nowRoom.FileName]); + //鎴块棿鍒犻櫎 + if (memberShardInfo.dicAllShardKeys.ContainsKey(nowRoom.FileName) == true) + { + listMark.Add(memberShardInfo.dicAllShardKeys[nowRoom.FileName]); + } listDeleteFile.Add(nowRoom.FileName); + + if (nowRoom.BackgroundImageType != 0) + { + //鍒犻櫎鑷畾涔夋埧闂村浘鐗�,瀹冨瓨鍦ㄤ簬鏈湴,浣嗘槸瀹冩槸鍏ㄨ矾寰� + string[] Arry = nowRoom.BackgroundImage.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries); + string roomFile = Arry[Arry.Length - 1]; + listDeleteFile.Add(roomFile); + if (memberShardInfo.dicAllShardKeys.ContainsKey(roomFile) == true) + { + listMark.Add(memberShardInfo.dicAllShardKeys[roomFile]); + } + } } //鎵ц绉婚櫎鍒嗕韩鏁版嵁 @@ -840,21 +1334,28 @@ //鍚屾鎴块棿鏂囦欢 if (result == true && listDeleteFile.Contains(roomTemp.FileName) == false) { - //鎵ц涓婁紶瀵硅薄 + //鎵ц涓婁紶鎴块棿瀵硅薄 result = await this.DoUploadRoomObject(memberShardInfo, roomTemp); } - if (result == true) + //鍚屾妤煎眰鏁版嵁 + if (result == true && listDeleteFile.Contains(roomTemp.FileName) == true) { - foreach (var exFile in listDeleteFileEx) + int floorCount = 0; + foreach (var myRoom in memberShardInfo.dicShardRoom.Values) { - //鍙Щ闄ょ紦瀛�,涓嶅垹闄や簯绔� - if (dicShardFile.Contains(exFile) == true) - { - dicShardFile.Remove(exFile); - } + if (myRoom.FloorId == roomTemp.FloorId) { floorCount++; } } + if (floorCount == 0) + { + //濡傛灉璇ユゼ灞傚凡缁忓垹瀹屾埧闂翠簡,鍒欐洿鏂版ゼ灞� + memberShardInfo.dicShardFloor.Remove(roomTemp.FloorId); + //鎵ц涓婁紶瀵硅薄 + result = await this.DoUploadFloorObject(memberShardInfo); + } + } - else + + if (result == false) { //鎭㈠ roomTemp.DeviceUIFilePathList.Clear(); @@ -909,8 +1410,7 @@ } //鍏抽棴杩涘害鏉� ProgressBar.Close(); - - var dicShard = memberShardInfo.dicAllMemberShard[nowRoom.FileName]; + ; for (int i = 0; i < listDeleteFile.Count; i++) { string fileName = listDeleteFile[i]; @@ -918,16 +1418,50 @@ { //鏈�鍚庝竴涓浐瀹氬彲鑳芥槸鎴块棿鏂囦欢,鐩存帴绉婚櫎鏁翠釜瀵硅薄 memberShardInfo.dicShardRoom.Remove(fileName); - memberShardInfo.dicAllMemberShard.Remove(fileName); - } - else - { - //绉婚櫎鎸囧畾鏂囦欢 - dicShard.Remove(fileName); } memberShardInfo.dicAllShardKeys.Remove(fileName); - HdlShardLogic.Current.DeleteShardFile(fileName); + this.DeleteShardFile(fileName); + } + return true; + } + + /// <summary> + /// 鎵ц绉婚櫎鍒嗕韩鏁版嵁 + /// </summary> + /// <param name="memberShardInfo">鎴愬憳鐨勫垎浜唴瀹�</param> + /// <param name="listDelFile">鍒犻櫎鐨勬枃浠�</param> + /// <returns></returns> + private async Task<bool> DoDeleteSharedContent(MemberShardInfoData memberShardInfo, List<string> listDelFile) + { + if (listDelFile.Count == 0) + { + return true; + } + + var info = new DeleteShardInfo(); + foreach (var fileName in listDelFile) + { + if (memberShardInfo.dicAllShardKeys.ContainsKey(fileName) == false) + { + //鎴戜篃涓嶇煡閬撲负浠�涔堜細鎵句笉鍒颁富閿� + continue; + } + + info.DistributedMark = memberShardInfo.dicAllShardKeys[fileName]; + //鎵ц鍒犻櫎 + var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/DeleteShareData", false, info); + if (result == false) + { + return false; + } + } + for (int i = 0; i < listDelFile.Count; i++) + { + string fileName = listDelFile[i]; + memberShardInfo.dicAllShardKeys.Remove(fileName); + + this.DeleteShardFile(fileName); } return true; } @@ -944,6 +1478,10 @@ /// <returns></returns> private async Task<bool> DoUploadRoomObject(MemberShardInfoData memberShardInfo, Common.Room upDateRoom) { + if (upDateRoom.Id == "Other") + { + return true; + } var info = new EditorShardContent(); info.DistributedMark = memberShardInfo.dicAllShardKeys[upDateRoom.FileName]; info.ShareName = upDateRoom.FileName; @@ -958,7 +1496,37 @@ return false; } //灏嗘埧闂村璞″簭鍒楀寲鍒扮紦瀛� - HdlShardLogic.Current.AddShardFile(upDateRoom); + this.AddShardFile(upDateRoom); + + return true; + } + + #endregion + + #region 鈻� 涓婁紶妤煎眰瀵硅薄_______________________ + + /// <summary> + /// 涓婁紶妤煎眰瀵硅薄 + /// </summary> + /// <param name="memberShardInfo">鎴愬憳鐨勫叡浜唴瀹�</param> + /// <returns></returns> + private async Task<bool> DoUploadFloorObject(MemberShardInfoData memberShardInfo) + { + var info = new EditorShardContent(); + info.DistributedMark = memberShardInfo.dicAllShardKeys[DirNameResourse.ShardFloorFile]; + info.ShareName = DirNameResourse.ShardFloorFile; + info.SubAccountDistributedMark = memberShardInfo.SubAccountDistributedMark; + + var data = Newtonsoft.Json.JsonConvert.SerializeObject(memberShardInfo.dicShardFloor); + var byteData = System.Text.Encoding.UTF8.GetBytes(data); + info.ShareDataBytes = byteData; + var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeDataShare/EditShareData", false, info); + if (result == false) + { + return false; + } + //灏嗘埧闂村璞″簭鍒楀寲鍒扮紦瀛� + this.AddShardFile(memberShardInfo.dicShardFloor); return true; } @@ -993,20 +1561,21 @@ //鑾峰彇杩樺浜庡垎浜姸鎬佺殑鏂囦欢 foreach (var roomTemp in memberShardInfo.dicShardRoom.Values) { - bool flage = roomTemp.FileName == nowRoom.FileName; //璁惧 foreach (var deviceUi in roomTemp.DeviceUIFilePathList) { string deviceFile = deviceUi.Replace("DeviceUI_", string.Empty); - if (flage == true && listDeleteFile.Contains(deviceFile) == true) + if (listDeleteFile.Contains(deviceFile) == true) { - //褰撳墠鎴块棿鐨勮鐗规畩澶勭悊锛屽鏋滄槸鍒犻櫎鐩爣锛屽垯涓嶆坊鍔� + //鍥犱负涓�涓洖璺彧鑳藉垎閰嶄竴涓尯鍩�,鎵�浠ュ彲浠ョ洿鎺ュ垽鏂� continue; } if (listShardFile.Contains(deviceFile) == false) { + //杩欎釜鏂囦欢杩樺垎浜潃 listShardFile.Add(deviceFile); } + } //鍦烘櫙 foreach (var scene in roomTemp.SceneUIList) @@ -1016,14 +1585,19 @@ //杩欎釜鍦烘櫙宸茬粡琚垹闄� continue; } - if (flage == true && listDeleteFile.Contains(scene.FileName) == true) + if (roomTemp.FileName == nowRoom.FileName) { - //褰撳墠鎴块棿鐨勮鐗规畩澶勭悊锛屽鏋滄槸鍒犻櫎鐩爣锛屽垯涓嶆坊鍔� - continue; + //濡傛灉寰幆鍒颁簡褰撳墠鎴块棿 + if (listDeleteFile.Contains(scene.FileName) == true) + { + //濡傛灉鏄垹闄ょ洰鏍囷紝鍒欎笉娣诲姞 + continue; + } } //鑾峰彇鍦烘櫙閲岄潰鐨勫叏閮ㄧ洰鏍� var listTemp = new HashSet<string>(); - this.GetSceneBindFileName(scene, ref listTemp); + var dicTemp = new Dictionary<string, SceneUI>(); + this.GetSceneBindFileName(scene, ref listTemp, ref dicTemp); if (listShardFile.Contains(scene.FileName) == false) { @@ -1047,7 +1621,8 @@ /// </summary> /// <param name="scene">鍦烘櫙</param> /// <param name="listFile">鏂囦欢鍒楄〃(閲岄潰瀛樼殑鏄澶嘦I鏂囦欢鍜岃澶囨枃浠跺拰鍦烘櫙鏂囦欢)</param> - private void GetSceneBindFileName(Common.SceneUI scene, ref HashSet<string> listFile) + /// <param name="dicBindScene">缁戝畾鐨勫満鏅璞�</param> + private void GetSceneBindFileName(Common.SceneUI scene, ref HashSet<string> listFile,ref Dictionary<string, SceneUI> dicBindScene) { foreach (var data in scene.AddSceneMemberDataList) { @@ -1055,17 +1630,28 @@ if (data.Type == 0) { var device = Common.LocalDevice.Current.GetDevice(data.DeviceAddr, data.Epoint); - if (device != null&& listFile.Contains(device.FilePath) == false) + if (device != null && listFile.Contains(device.FilePath) == false) { listFile.Add(device.FilePath); } } if (data.Type == 1) { - var sceneTemp = Room.CurrentRoom.GetSceneUIBySceneId(data.ElseScenesId); - if (sceneTemp != null && listFile.Contains(sceneTemp.FileName)) + var temp = new SceneUI(); + temp.Id = data.ElseScenesId; + var byteData = this.GetShardFileContent(temp.FileName); + if (byteData != null) { - listFile.Add(sceneTemp.FileName); + string valueData = System.Text.Encoding.UTF8.GetString(byteData); + var roomTemp = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.SceneUI>(valueData); + if (roomTemp != null) + { + dicBindScene[roomTemp.FileName] = roomTemp; + if (listFile.Contains(roomTemp.FileName) == false) + { + listFile.Add(roomTemp.FileName); + } + } } } } @@ -1144,6 +1730,20 @@ public string SubAccountDistributedMark = string.Empty; } + /// <summary> + /// 鎺ユ敹鍒嗕韩鏁版嵁 + /// </summary> + private class ReceiveShardInfoResult + { + /// <summary> + /// 鏂囦欢鍚嶅瓧 + /// </summary> + public string ShareName = string.Empty; + /// <summary> + /// 涓婚敭 + /// </summary> + public string DistributedMark = string.Empty; + } #endregion } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs index 04a1926..7d859aa 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs @@ -850,11 +850,11 @@ ProgressBar.SetAppendText(string.Empty); //0:宸茬粡鍚屾杩囷紝涓嶉渶瑕佸悓姝�,杩欎釜鏃跺�欓渶瑕佹彁绀哄浠� - if (result == 0) - { - //寮�鍚嚜鍔ㄥ浠芥彁绀� - //HdlAutoBackupLogic.ShowAutoBackupPromptedForm(); - } + //if (result == 0) + //{ + // //寮�鍚嚜鍔ㄥ浠芥彁绀� + // HdlAutoBackupLogic.ShowAutoBackupPromptedForm(); + //} } //鎭㈠鍙叧闂繘搴︽潯 @@ -1153,7 +1153,7 @@ Global.CreateEmptyDirectory(directory); //鐢ㄦ埛鍥剧墖鐩綍璺緞銆愭枃浠跺す銆� - if (!System.IO.Directory.Exists(UserCenterResourse.Option.UserPictruePath)) + if (UserCenterResourse.Option.UserPictruePath != string.Empty && !System.IO.Directory.Exists(UserCenterResourse.Option.UserPictruePath)) { System.IO.Directory.CreateDirectory(UserCenterResourse.Option.UserPictruePath); } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs index 5ef4428..2e07518 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs @@ -106,5 +106,9 @@ /// 淇濆瓨Log鐨勩�愭枃浠跺す銆� /// </summary> public const string LogDirectory = "820c65b54b6f3f2a"; + /// <summary> + /// 鍒嗕韩妤煎眰鐨勩�愭枃浠躲�� + /// </summary> + public const string ShardFloorFile = "5f05f7a6f26c51d1b096dc777f6c02f2"; } } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs index c6b48bf..45b01f3 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs @@ -245,7 +245,7 @@ { menuCount = 2; } - var frame = new TopRightMenuControl(this, menuCount); + var frame = new TopRightMenuControl(menuCount); if (canTest == true) { //瀹氫綅 diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFirmwareInfoForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFirmwareInfoForm.cs index dd3e8ed..ff48dfc 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFirmwareInfoForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFirmwareInfoForm.cs @@ -97,7 +97,7 @@ /// </summary> private void ShowTopRightMenu() { - var frame = new TopRightMenuControl(this, 1); + var frame = new TopRightMenuControl(1); //鍘嗗彶鐗堟湰 var deviceMenu = Language.StringByID(R.MyInternationalizationString.uHistoryVersion); frame.AddRowMenu(deviceMenu, "", "", () => diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs index 15b929a..4c7a4f8 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs @@ -238,7 +238,7 @@ { menuCount = 2; } - var frame = new TopRightMenuControl(this, menuCount); + var frame = new TopRightMenuControl(menuCount); if (canTest == true) { //瀹氫綅 diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs index c6654c0..c9501cb 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs @@ -325,8 +325,13 @@ btnRow.AddRightArrow(); //搴曠嚎 btnRow.AddBottomLine(); + var doorLock = this.listNewDevice[0] as ZigBee.Device.DoorLock; btnRow.ButtonClickEvent += (sender, e) => { + var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "DoorLockTime"); + Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage); + Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; + tempPage.Show(); }; } } @@ -618,7 +623,7 @@ { menuCount = 2; } - var frame = new TopRightMenuControl(this, menuCount); + var frame = new TopRightMenuControl(menuCount); if (canTest == true) { //瀹氫綅 diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs index 9975b3d..766d806 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs @@ -63,7 +63,7 @@ btnDelete.InitControl(); btnDelete.ButtonClickEvent += (sender, e) => { - var form = new TopRightMenuControl(this, 1, 449); + var form = new TopRightMenuControl(1, 449); //娓呯┖璁板綍 form.AddRowMenu(Language.StringByID(R.MyInternationalizationString.uClearLog), "Item/DeleteIcon2.png", "Item/DeleteIcon2Selected.png", () => { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs index d942395..4b551d7 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs @@ -215,7 +215,7 @@ { menuCount = 2; } - var frame = new TopRightMenuControl(this, menuCount); + var frame = new TopRightMenuControl(menuCount); if (canTest == true) { //瀹氫綅 diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs index 422cf86..e86a667 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs @@ -238,7 +238,7 @@ { menuCount = 2; } - var frame = new TopRightMenuControl(this, menuCount); + var frame = new TopRightMenuControl(menuCount); if (canTest == true) { //瀹氫綅 diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodFailedTip.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodFailedTip.cs index 7f19f0c..1908c89 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodFailedTip.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodFailedTip.cs @@ -221,7 +221,7 @@ var localDoorLockObj = new ZigBee.Device.DoorLock.LocaDoorLockObj() { }; localDoorLockObj.UserID = ProgrammingEventNotificationData.UserID; localDoorLockObj.UnlockType = ProgrammingEventNotificationData.ProgramEventSoure; - var entryTime = ZigBee.Device.DoorLock.GetLocalTime(ProgrammingEventNotificationData.ZigbeeLocalTime, false); + var entryTime = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetLocalTime(ProgrammingEventNotificationData.ZigbeeLocalTime); localDoorLockObj.EntryTime = entryTime; doorLock.localDoorLockUserList.Add(ProgrammingEventNotificationData.UserID, localDoorLockObj); } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs index 86e098e..b6ddc9d 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs @@ -218,7 +218,7 @@ var localDoorLockObj = new ZigBee.Device.DoorLock.LocaDoorLockObj() { }; localDoorLockObj.UserID = ProgrammingEventNotificationData.UserID; localDoorLockObj.UnlockType = ProgrammingEventNotificationData.ProgramEventSoure; - var entryTime = ZigBee.Device.DoorLock.GetLocalTime(ProgrammingEventNotificationData.ZigbeeLocalTime, false); + var entryTime = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetLocalTime(ProgrammingEventNotificationData.ZigbeeLocalTime); localDoorLockObj.EntryTime = entryTime; if (!doorLock.localDoorLockUserList.ContainsKey(localDoorLockObj.UserID)) { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs index 43f56ba..c66ac64 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs @@ -6,20 +6,58 @@ { public class DoorLockCommonInfo : ZigBee.Device.DoorLock { - public DoorLockCommonInfo() + #region 鏈湴鍙橀噺 + public static bool InTempPasswordVisiable = false; + public static int ValidDateYear = 0; + public static int ValidDateMonth = 0; + public static int ValidDateDay = 0; + public static int ValidDateHour = 100; + public static int ValidDateMinute = 100; + public static int ValidDateSecond = 0; + public static int InValidDateYear = 0; + public static int InValidDateMonth = 0; + public static int InValidDateDay = 0; + public static int InValidDateHour = 100; + public static int InValidDateMinute = 100; + public static int InValidDateSecond = 0; + #endregion + /// <summary> + /// 鐢熸垚6浣嶄复鏃跺瘑鐮� + /// </summary> + /// <returns></returns> + public static string GetTempPassword() { + string password = ""; + password = new Random().Next(100000, 999999).ToString(); + return password; } - public class DoorLockFingerprintInfo + /// <summary> + /// 灏哢NIX鏃堕棿鎴宠浆鎹㈡垚绯荤粺鏃堕棿(绮剧‘鍒扮) + /// <returns></returns> + public static DateTime GetLocalTime(int unixTimeStamp) { - /// <summary> - /// 鎸囩汗澶囨敞 - /// </summary> - public string fingerprintRemark = string.Empty; - /// <summary> - /// 鎸囩汗鍥剧墖 - /// </summary> - public string fingerprintImage = string.Empty; + DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); + long lTime = long.Parse(unixTimeStamp + "0000000"); + TimeSpan toNow = new TimeSpan(lTime); + DateTime dtResult = dtStart.Add(toNow); + return dtResult; + } + + /// <summary> + /// 灏嗙郴缁熸椂闂磋浆鎹㈡垚UNIX鏃堕棿鎴�(绮剧‘鍒扮) + /// </summary> + /// <param name="dateTime">鍖椾含鏃堕棿</param> + /// <param name="accurateToMilliseconds">绮剧‘鍒版绉掞紝鍚﹀埌绉�</param> + /// <returns>杩斿洖涓�涓暱鏁存暟鏃堕棿鎴�</returns> + public static string GetUnixTimeStamp(DateTime dateTime) + { + DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); + //DateTime dtNow = DateTime.Parse(DateTime.Now.ToString()); + TimeSpan toNow = dateTime.Subtract(dtStart); + string timeStamp = toNow.Ticks.ToString(); + timeStamp = timeStamp.Substring(0, timeStamp.Length - 7); + return timeStamp; } /// <summary> diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs index aa8a2a9..6812b14 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs @@ -13,13 +13,62 @@ #region 鈼� 鍙橀噺鐢虫槑__________________________ public FrameLayout topFrameLayout = new FrameLayout { Height = Application.GetRealHeight(184), BackgroundColor = ZigbeeColor.Current.XMTopFrameLayout }; public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1921 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout }; - public FrameLayout bottomRadiusFrameLayout = new FrameLayout() + + #region 鈼� 搴曢儴鏈夊渾瑙掑竷灞�__________________________ + public FrameLayout shadowRadiusFrameLayout = new FrameLayout { BackgroundColor = 0x0f000000 }; + public FrameLayout bottomRadiusFrameLayout1 = new FrameLayout() { Height = Application.GetRealHeight(100), Y = Application.GetRealHeight(930), Radius = 17, BackgroundColor = ZigbeeColor.Current.XMWhite, }; + public FrameLayout bottomRadiusFrameLayout2 = new FrameLayout() + { + Height = Application.GetRealHeight(806 - 50), + Y = Application.GetRealHeight(930 + 48), + BackgroundColor = ZigbeeColor.Current.XMWhite, + }; + public FrameLayout bottomRadiusFrameLayout = new FrameLayout() + { + Height = Application.GetRealHeight(806), + Y = Application.GetRealHeight(930), + }; + + public Button btnCancel = new Button + { + X = Application.GetRealWidth(81), + Y = Application.GetRealHeight(40), + Height = Application.GetRealHeight(58), + Width = Application.GetRealWidth(101), + Text = Language.StringByID(R.MyInternationalizationString.Cancel), + TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, + TextSize = 14, + }; + + public Button btnBottomTitle = new Button + { + X = Application.GetRealWidth(446 - 50), + Y = Application.GetRealHeight(35), + Height = Application.GetRealHeight(63), + Width = Application.GetRealWidth(284), + Text = Language.StringByID(R.MyInternationalizationString.MatchPerson), + TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, + TextSize = 16, + }; + + public Button btnFinish = new Button + { + X = Application.GetRealWidth(919), + Y = Application.GetRealHeight(40), + Height = Application.GetRealHeight(58), + Width = Application.GetRealWidth(101), + Text = Language.StringByID(R.MyInternationalizationString.Complete), + TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, + TextSize = 14, + }; + #endregion + public FrameLayout titleFrameLayout = new FrameLayout { Y = Application.GetRealHeight(92), @@ -101,7 +150,6 @@ /// <param name="frameLayout"></param> public void MidFrameLayout(FrameLayout frameLayout) { - //midFrameLayout.BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCBackgroundColor; midFrameLayout.Y = topFrameLayout.Bottom; this.AddChidren(midFrameLayout); } @@ -122,10 +170,24 @@ } /// <summary> + /// 闂ㄩ攣搴曢儴甯﹀渾瑙掑竷灞� + /// </summary> + /// <param name="frameLayout"></param> + public void BottomRadiusFrameLayout(FrameLayout frameLayout) + { + this.shadowRadiusFrameLayout.AddChidren(this.bottomRadiusFrameLayout1); + this.shadowRadiusFrameLayout.AddChidren(this.bottomRadiusFrameLayout2); + this.shadowRadiusFrameLayout.AddChidren(this.bottomRadiusFrameLayout); + this.bottomRadiusFrameLayout.AddChidren(btnCancel); + this.bottomRadiusFrameLayout.AddChidren(btnBottomTitle); + this.bottomRadiusFrameLayout.AddChidren(btnFinish); + } + + /// <summary> /// 杩滅▼鎺у埗鏉冮檺澶勭悊 /// </summary> /// <param name="btnNext"></param> - public void RemotePasswordDialog(ZigBee.Device.DoorLock doorLock, Button btnNext) + public void RemotePasswordDialog(ZigBee.Device.DoorLock doorLock, Button btnNext = null) { var dialog = new Dialog { }; var doorDialog = new Shared.Phone.UserCenter.DoorLock.DoorlockDialog(dialog, Language.StringByID(R.MyInternationalizationString.BindDoorLock)); @@ -153,7 +215,10 @@ doorDialog.dialogBtnCancel.MouseUpEventHandler += (sender1, e1) => { - btnNext.IsSelected = false; + if (btnNext != null) + { + btnNext.IsSelected = false; + } dialog.Close(); }; DateTime oldTime = DateTime.MaxValue; @@ -201,8 +266,10 @@ oldTime = DateTime.MaxValue; CommonPage.Loading.Hide(); dialog.Close(); - btnNext.IsSelected = true; - + if (btnNext != null) + { + btnNext.IsSelected = true; + } if (!UserCenterResourse.Option.DoorUnLockByRemote) { var dialog2 = new Dialog { }; @@ -259,13 +326,13 @@ } /// <summary> - /// + /// 杩滅▼寮�閿佽姹� /// </summary> /// <param name="doorLock">闂ㄩ攣璁惧</param> /// <param name="action">浜屾楠岃瘉鐨勭粨鏋滄垚鍔熷悗鐨勯�氱煡</param> /// <param name="progressButton">闂ㄩ攣寮�鎴栧叧鏃惰繘搴︽樉绀�</param> /// <param name="btnDoorLockPic">闂ㄩ攣鍥剧墖寮�/鍏虫樉绀�</param> - public void RemoteUnlockRequest(ZigBee.Device.DoorLock doorLock, Action action, Button progressButton, Button btnDoorLockPic, Button btnStatus) + public void RemoteUnlockRequest(ZigBee.Device.DoorLock doorLock, Action action, Button progressButton = null, Button btnDoorLockPic = null, Button btnStatus = null) { if (ZigBee.Device.DoorLock.RemoteUnlockPassword == "") { @@ -360,27 +427,52 @@ action = async () => { //杩滅▼寮�閿� - progressButton.Y = Application.GetRealHeight(10); - btnDoorLockPic.IsSelected = true; - btnStatus.Text = Language.StringByID(R.MyInternationalizationString.Opening); + if (progressButton != null) + { + progressButton.Y = Application.GetRealHeight(10); + } + if (btnDoorLockPic != null) + { + btnDoorLockPic.IsSelected = true; + } + if (btnStatus != null) + { + btnStatus.Text = Language.StringByID(R.MyInternationalizationString.Opening); + } Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); }); var remoteControlResult = await doorLock.RemoteControlAsync(ZigBee.Device.DoorLock.RemoteUnlockPassword); if (remoteControlResult != null && remoteControlResult.responseData != null && remoteControlResult.responseData.status == 0) { - btnStatus.Text = Language.StringByID(R.MyInternationalizationString.Opening); - System.Threading.Thread.Sleep(2000); - btnStatus.Text = Language.StringByID(R.MyInternationalizationString.DoorLockOpen); - System.Threading.Thread.Sleep(3000); - progressButton.Y = Application.GetRealHeight(347); - btnDoorLockPic.IsSelected = false; - btnStatus.Text = Language.StringByID(R.MyInternationalizationString.CLose); + + if (progressButton != null) + { + progressButton.Y = Application.GetRealHeight(347); + } + if (btnDoorLockPic != null) + { + btnDoorLockPic.IsSelected = false; + } + if (btnStatus != null) + { + System.Threading.Thread.Sleep(2000); + //btnStatus.Text = Language.StringByID(R.MyInternationalizationString.DoorLockOpen); + System.Threading.Thread.Sleep(3000); + btnStatus.Text = Language.StringByID(R.MyInternationalizationString.CLose); + } CommonPage.Loading.Hide(); } else { - progressButton.Y = Application.GetRealHeight(347); - btnDoorLockPic.IsSelected = false; + if (progressButton != null) + { + progressButton.Y = Application.GetRealHeight(347); + } + if (btnDoorLockPic != null) + { + btnDoorLockPic.IsSelected = false; + } + CommonPage.Loading.Hide(); } }; diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorlockDialog.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorlockDialog.cs index 9d870a5..35fec25 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorlockDialog.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorlockDialog.cs @@ -1,5 +1,5 @@ 锘縰sing System; -using Android.Icu.Lang; +//using Android.Icu.Lang; namespace Shared.Phone.UserCenter.DoorLock { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs index ed813a1..f5ebf11 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs @@ -215,7 +215,7 @@ } addLockInfo.OpenLockMode = doorLock.doorLockProgrammingEventNotificationCommand.ProgramEventSoure; addLockInfo.DoorLockLocalUserId = doorLock.doorLockProgrammingEventNotificationCommand.UserID.ToString(); - var entryTime = ZigBee.Device.DoorLock.GetLocalTime(doorLock.doorLockProgrammingEventNotificationCommand.ZigbeeLocalTime, false); + var entryTime = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetLocalTime(doorLock.doorLockProgrammingEventNotificationCommand.ZigbeeLocalTime); addLockInfo.EntryTime = entryTime; if (btnPasswordRemarkContent.Text != "") { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs index 9548ee7..c3cd244 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs @@ -136,15 +136,12 @@ { btnName.Y = Application.GetRealHeight(204); btnName.Text = Language.StringByID(R.MyInternationalizationString.DeviceName) + ":"; - btnNextFrameLayout.Width = btnNext.Width = Application.GetRealWidth(789 - 58); btnNextFrameLayout.Y = btnName.Y; btnNextFrameLayout.X = btnName.Right; - btnNext.TextAlignment = TextAlignment.CenterLeft; btnNext.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; btnNext.Text = "鏅鸿兘闂ㄩ攣"; - btnLine.Visible = true; btnLine.Y = Application.GetRealHeight(308); } @@ -152,7 +149,6 @@ { btnName.Y = Application.GetRealHeight(343); btnName.Text = Language.StringByID(R.MyInternationalizationString.BelongZone) + ":"; - var btnArea = new Button() { Width = Application.GetRealWidth(789 - 109 - 58), @@ -164,17 +160,10 @@ TextAlignment = TextAlignment.CenterLeft, }; bottomFrameLayout2.AddChidren(btnArea); - btnNextFrameLayout.Y = btnName.Y; btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; - btnLine.Visible = true; btnLine.Y = Application.GetRealHeight(446); - - btnNext.MouseDownEventHandler += (sender, e) => - { - - }; } else if (i == 2) { @@ -207,16 +196,13 @@ { btnName.Y = Application.GetRealHeight(723 + 35); btnName.Text = Language.StringByID(R.MyInternationalizationString.RemotelyUnlock); - btnNextFrameLayout.Y = btnName.Y; btnNext.Width = Application.GetRealWidth(104); btnNext.Height = Application.GetRealHeight(63); btnNext.UnSelectedImagePath = "DoorLock/Switch.png"; btnNext.SelectedImagePath = "DoorLock/SwitchOn.png"; - btnLine.Visible = true; btnLine.Y = Application.GetRealHeight(723 + 127); - if (ZigBee.Device.DoorLock.RemoteUnlockPassword == "") { btnNext.IsSelected = false; @@ -225,8 +211,39 @@ { btnNext.IsSelected = true; } - - EventHandler<MouseEventArgs> eHandlerRemotelyUnlock = (sender, e) => + } + else if (i == 5) + { + btnName.Y = Application.GetRealHeight(861 + 35); + btnName.Text = Language.StringByID(R.MyInternationalizationString.DoorLockTime); + btnNextFrameLayout.Y = btnName.Y; + btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; + btnLine.Visible = true; + btnLine.Y = Application.GetRealHeight(861 + 127); + } + else if (i == 6) + { + btnName.Y = Application.GetRealHeight(999 + 35); + btnName.Text = Language.StringByID(R.MyInternationalizationString.Shared); + btnNextFrameLayout.Y = btnName.Y; + btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; + btnLine.Visible = true; + btnLine.Y = Application.GetRealHeight(999 + 127); + } + int currentIndex = i; + EventHandler<MouseEventArgs> eHandler = (sender, e) => + { + if (currentIndex == 1) + { + } + else if (currentIndex == 3) + { + var temporaryPassword = new Shared.Phone.UserCenter.DoorLock.TemporaryPassword(doorLock); + Shared.Phone.UserView.HomePage.Instance.AddChidren(temporaryPassword); + Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; + temporaryPassword.Show(); + } + else if (currentIndex == 4) { btnNext.IsSelected = !btnNext.IsSelected; if (btnNext.IsSelected) @@ -236,44 +253,25 @@ RemotePasswordDialog(doorLock, btnNext); } } - return; - }; - btnNext.MouseDownEventHandler += eHandlerRemotelyUnlock; - btnName.MouseDownEventHandler += eHandlerRemotelyUnlock; - btnNextFrameLayout.MouseDownEventHandler += eHandlerRemotelyUnlock; - } - else if (i == 5) - { - btnName.Y = Application.GetRealHeight(861 + 35); - btnName.Text = Language.StringByID(R.MyInternationalizationString.DoorLockTime); - - btnNextFrameLayout.Y = btnName.Y; - btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; - - btnLine.Visible = true; - btnLine.Y = Application.GetRealHeight(861 + 127); - EventHandler<MouseEventArgs> eHandlerDoorLockTime = (sender, e) => + else + { + ZigBee.Device.DoorLock.RemoteUnlockPassword = ""; + } + } + else if (currentIndex == 5) { - var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "InValidTime"); + var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "DoorLockTime"); Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage); Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; tempPage.Show(); - }; - btnNext.MouseDownEventHandler += eHandlerDoorLockTime; - btnName.MouseDownEventHandler += eHandlerDoorLockTime; - btnNextFrameLayout.MouseDownEventHandler += eHandlerDoorLockTime; - } - else if (i == 6) - { - btnName.Y = Application.GetRealHeight(999 + 35); - btnName.Text = Language.StringByID(R.MyInternationalizationString.Shared); - - btnNextFrameLayout.Y = btnName.Y; - btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; - - btnLine.Visible = true; - btnLine.Y = Application.GetRealHeight(999 + 127); - } + } + else if (currentIndex == 6) + { + } + }; + btnNext.MouseDownEventHandler += eHandler; + btnName.MouseDownEventHandler += eHandler; + btnNextFrameLayout.MouseDownEventHandler += eHandler; #endregion } } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberFrozenPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberFrozenPage.cs index b7687de..cfe003b 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberFrozenPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MemberFrozenPage.cs @@ -143,7 +143,10 @@ } else if (currentIndex == 1) { - //閫昏緫 + } + else if (currentIndex == 2) + { + } }; btnRightFrameLayout.MouseUpEventHandler += eHandler; diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TempPasswordTimePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TempPasswordTimePage.cs new file mode 100755 index 0000000..d8bb81e --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TempPasswordTimePage.cs @@ -0,0 +1,10 @@ +锘縰sing System; +namespace Shared.Phone.UserCenter.DoorLock +{ + public class TempPasswordTimePage + { + public TempPasswordTimePage() + { + } + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs index 6f7e2f3..79b7e9e 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs @@ -1,4 +1,5 @@ 锘縰sing System; +using Java.Sql; using Shared.Common; using ZigBee.Device; @@ -21,6 +22,7 @@ ZigBee.Device.DoorLock doorLock; public System.Collections.Generic.List<Button> pawButtonList = new System.Collections.Generic.List<Button> { };//涓存椂瀵嗙爜涓殑6浣嶆暟瀛� Button passwordText; //涓存椂瀵嗙爜 + FrameLayout MidTopFrameLayout; #endregion /// <summary> @@ -38,67 +40,154 @@ this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack; this.MidFrameLayout(this); - MidFrameLayoutContent(); - - } - - /// <summary> - /// 璇婚棬閿佷复鏃跺瘑鐮佷俊鎭� - /// </summary> - /// <param name="door_lock">Door lock.</param> - void readStatus() - { - System.Threading.Tasks.Task.Run(() => + var btnDelFrameLayout = new FrameLayout { + X = Application.GetRealWidth(953), + Height = Application.GetRealHeight(69), + Width = Application.GetRealWidth(1080 - 953), + }; + this.titleFrameLayout.AddChidren(btnDelFrameLayout); - }); + var btnDelIcon = new Button + { + Height = Application.GetRealHeight(69), + Width = Application.GetRealWidth(69), + UnSelectedImagePath = "DoorLock/DelIcon.png", + }; + btnDelFrameLayout.AddChidren(btnDelIcon); + + EventHandler<MouseEventArgs> eHandler = (sender, e) => + { + var dialog = new Dialog { }; + dialog.Show(); + + var flMain = new FrameLayout { BackgroundColor = 0x00000000 }; + dialog.AddChidren(flMain); + flMain.MouseUpEventHandler += (sender11, e11) => + { + dialog.Close(); + }; + + var delBackgroundFrameLayout = new FrameLayout + { + X = Application.GetRealWidth(596), + Y = Application.GetRealHeight(164), + Height = Application.GetRealHeight(173), + Width = Application.GetRealWidth(449), + BackgroundImagePath = "DoorLock/DelBackground.png", + }; + flMain.AddChidren(delBackgroundFrameLayout); + + var btnDelIcon2 = new Button + { + Height = Application.GetRealHeight(81), + Width = Application.GetRealWidth(81), + X = Application.GetRealWidth(81), + Y = Application.GetRealHeight(55), + UnSelectedImagePath = "DoorLock/DelIcon.png", + }; + delBackgroundFrameLayout.AddChidren(btnDelIcon2); + + var btnDelText = new Button + { + Height = Application.GetRealHeight(58), + Width = Application.GetRealWidth(311), + X = Application.GetRealWidth(173), + Y = Application.GetRealHeight(69), + TextAlignment = TextAlignment.CenterLeft, + Text = Language.StringByID(R.MyInternationalizationString.ClearTempPassword), + TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText, + TextSize = 12, + }; + delBackgroundFrameLayout.AddChidren(btnDelText); + + EventHandler<MouseEventArgs> eHandler2 = (sender2, e2) => + { + ZigBee.Device.DoorLock.LocalTempPassword = ""; + dialog.Close(); + }; + delBackgroundFrameLayout.MouseDownEventHandler += eHandler2; + btnDelIcon2.MouseDownEventHandler += eHandler2; + btnDelText.MouseDownEventHandler += eHandler2; + }; + btnDelFrameLayout.MouseDownEventHandler += eHandler; + btnDelIcon.MouseDownEventHandler += eHandler; + + MidTopFrameLayout = new FrameLayout() + { + X = Application.GetRealWidth(181), + Y = Application.GetRealHeight(92), + Width = Application.GetRealWidth(717), + Height = Application.GetRealHeight(570), + BackgroundImagePath = "DoorLock/TempPasswordBackground.png", + }; + this.midFrameLayout.AddChidren(MidTopFrameLayout); + MidFrameLayoutContent(); } public void MidFrameLayoutContent() { - var MidTopFrameLayout = new FrameLayout() + MidTopFrameLayout.RemoveAll(); + var TempPasswordBackground1 = new Button() { - X = Application.GetRealWidth(196), - Y = Application.GetRealHeight(276), - Width = Application.GetRealWidth(668), - Height = Application.GetRealHeight(527), - BackgroundColor = ZigbeeColor.Current.XMWhite, + Height = Application.GetRealHeight(43), + Width = Application.GetRealWidth(259), + X = Application.GetRealWidth(230), + Y = Application.GetRealHeight(418), + UnSelectedImagePath = "DoorLock/TempPasswordBackground1.png", }; - this.midFrameLayout.AddChidren(MidTopFrameLayout); + MidTopFrameLayout.AddChidren(TempPasswordBackground1); + + var topMidTopFrameLayout = new FrameLayout() + { + Height = Application.GetRealHeight(313), + }; + MidTopFrameLayout.AddChidren(topMidTopFrameLayout); var topPic = new Button() { - Height = Application.GetRealHeight(184), - Width = Application.GetRealWidth(184), - X = Application.GetRealWidth(449), - Y = Application.GetRealHeight(58), + Height = Application.GetRealHeight(81), + Y = Application.GetRealHeight(48), TextAlignment = TextAlignment.Center, - Text = Language.StringByID(R.MyInternationalizationString.RandomPasword), - TextColor = Shared.Common.ZigbeeColor.Current.XMGray1, + Text = Language.StringByID(R.MyInternationalizationString.ClickGenerate), + TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText, + TextSize = 12, }; - this.midFrameLayout.AddChidren(topPic); + topMidTopFrameLayout.AddChidren(topPic); var randomPassword = new EditText() { + X = Application.GetRealWidth(233), Y = Application.GetRealHeight(153), Height = Application.GetRealHeight(84), - TextAlignment = TextAlignment.Center, - TextColor = Shared.Common.ZigbeeColor.Current.XMOrange, + Width = Application.GetRealWidth(251), + TextAlignment = TextAlignment.CenterRight, TextSize = 24, - Text = GetTempPassword(), + SecureTextEntry = false, + Enable = false, }; - MidTopFrameLayout.AddChidren(randomPassword); + topMidTopFrameLayout.AddChidren(randomPassword); + + var temPasswordVisiable = new Button() + { + Height = Application.GetRealHeight(92), + Width = Application.GetRealWidth(92), + X = Application.GetRealWidth(495), + Y = Application.GetRealHeight(153), + UnSelectedImagePath = "DoorLock/TemPasswordInvisiable.png", + SelectedImagePath = "DoorLock/TemPasswordVisiable.png", + }; + topMidTopFrameLayout.AddChidren(temPasswordVisiable); var validTime = new Button() { Height = Application.GetRealHeight(55), Width = Application.GetRealWidth(115), - X = Application.GetRealWidth(78), + X = Application.GetRealWidth(92), Y = Application.GetRealHeight(386), - Text = "12:00", TextColor = Shared.Common.ZigbeeColor.Current.XMGray2, TextAlignment = TextAlignment.CenterLeft, - TextSize = 12, + TextSize = 14, }; MidTopFrameLayout.AddChidren(validTime); @@ -106,23 +195,23 @@ { Height = Application.GetRealHeight(49), Width = Application.GetRealWidth(135), - X = Application.GetRealWidth(69), + X = Application.GetRealWidth(84), Y = Application.GetRealHeight(441), TextColor = Shared.Common.ZigbeeColor.Current.XMGray2, - Text = "8" + Language.StringByID(R.MyInternationalizationString.Month) + "1" + Language.StringByID(R.MyInternationalizationString.Day), + TextSize = 10, }; MidTopFrameLayout.AddChidren(validTimeDate); var inValidTime = new Button() { Height = Application.GetRealHeight(55), - Width = Application.GetRealWidth(115), - X = Application.GetRealWidth(492), - Y = Application.GetRealHeight(386), + Width = Application.GetRealWidth(118), + X = Application.GetRealWidth(507), + Y = Application.GetRealHeight(389), Text = "10:00", TextColor = Shared.Common.ZigbeeColor.Current.XMGray2, TextAlignment = TextAlignment.CenterLeft, - TextSize = 12, + TextSize = 14, }; MidTopFrameLayout.AddChidren(inValidTime); @@ -130,121 +219,168 @@ { Height = Application.GetRealHeight(49), Width = Application.GetRealWidth(135), - X = Application.GetRealWidth(484), - Y = Application.GetRealHeight(441), + X = Application.GetRealWidth(508), + Y = Application.GetRealHeight(444), TextColor = Shared.Common.ZigbeeColor.Current.XMGray2, TextAlignment = TextAlignment.CenterLeft, - Text = "8" + Language.StringByID(R.MyInternationalizationString.Month) + "2" + Language.StringByID(R.MyInternationalizationString.Day), + TextSize = 10, }; MidTopFrameLayout.AddChidren(inValidTimeDate); - //var inputCountText = new EditText() - //{ - // Width = Application.GetRealWidth(780), - // Height = Application.GetRealHeight(100), - // X = Application.GetRealWidth(80), - // Y = validCountText.Bottom + Application.GetRealHeight(10), - // PlaceholderText = doorLock.tempPasswordObj.times.ToString(), - // PlaceholderTextColor = 0xffc1c1c1, - // TextAlignment = TextAlignment.Center, - // //UnSelectedImagePah = "Register/Register_Kuang.png", - // BackgroundColor = 0xff00ff00, - //}; - //this.midFrameLayout.AddChidren(inputCountText); - - //var unitCount = new Button() - //{ - // Height = Application.GetRealHeight(50), - // Width = Application.GetRealWidth(100), - // X = inputCountText.Right + Application.GetRealWidth(2), - // Y = Application.GetRealHeight(490), - // Text = Language.StringByID(R.MyInternationalizationString.Ci), - // TextAlignment = TextAlignment.CenterLeft, - // TextSize = 12, - // TextColor = 0xff000000, - //}; - //this.midFrameLayout.AddChidren(unitCount); - - //var remindPic2 = new Button() - //{ - // Height = Application.GetRealHeight(40), - // Width = Application.GetRealWidth(40), - // X = Application.GetRealWidth(80), - // Y = inputCountText.Bottom + Application.GetRealHeight(18), - // //UnSelectedImagePath = "DoorLockPic/door_lock_alert.png", - // BackgroundColor = 0xff0000ff, - //}; - //this.midFrameLayout.AddChidren(remindPic2); - - //var maxValidCount = new Button() - //{ - // Width = Application.GetRealWidth(550), - // Height = Application.GetRealHeight(80), - // X = remindPic2.Right + Application.GetRealWidth(8), - // Y = inputCountText.Bottom, - // Text = Language.StringByID(R.MyInternationalizationString.MaxValicCount), - // TextAlignment = TextAlignment.CenterLeft, - // TextSize = 10, - // TextColor = 0xff000000, - //}; - //this.midFrameLayout.AddChidren(maxValidCount); - - //var remindFrameLayout = new FrameLayout() - //{ - // Height = Application.GetRealHeight(350), - // Y = remindPic2.Bottom + Application.GetRealHeight(90), - // BackgroundColor = 0xff00ffff, - //}; - //this.midFrameLayout.AddChidren(remindFrameLayout); - - //var TempPasswordText = new Button() - //{ - // X = Application.GetRealWidth(80), - // Y = Application.GetRealHeight(10), - // Width = Application.GetRealWidth(300), - // Height = Application.GetRealHeight(80), - // TextAlignment = TextAlignment.CenterLeft, - // Text = Language.StringByID(R.MyInternationalizationString.DynamicTempPassword), - // TextColor = 0xffff0000, - //}; - //remindFrameLayout.AddChidren(TempPasswordText); - - //for (int i = 0; i < 6; i++) - //{ - // passwordText = new Button() - // { - // Height = Application.GetRealHeight(150), - // Width = Application.GetRealWidth(80), - // TextAlignment = TextAlignment.Center, - // Y = TempPasswordText.Bottom + Application.GetRealHeight(10), - // TextSize = 28, - // BackgroundColor = 0xff0000ff, - // }; - // remindFrameLayout.AddChidren(passwordText); - // if (i == 0) - // { - // passwordText.X = Application.GetRealWidth(90); - // } - // else - // { - // passwordText.X = (i + 1) * Application.GetRealWidth(90) + (i + 1) * Application.GetRealWidth(10); - // } - // if (i == 1 || i == 3 || i == 5) - // { - // passwordText.BackgroundColor = 0xff00ff00; - // } - // pawButtonList.Add(passwordText); - //} - BottomFrameLayoutContent(); - } + #region 鏁版嵁澶勭悊 + string hour = ""; + string minute = ""; + if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour < 10) + { + hour = "0" + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour; + } + else + { + hour = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour.ToString(); + } + if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute < 10) + { + minute = "0" + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute; + } + else + { + minute = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute.ToString(); + } + //鏈夋晥鏃堕棿 + if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour == 100) + { + validTime.Text = "00:00"; + } + else + { + validTime.Text = hour + ":" + minute; + } + + if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour < 10) + { + hour = "0" + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour; + } + else + { + hour = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour.ToString(); + } + if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMinute < 10) + { + minute = "0" + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMinute; + } + else + { + minute = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute.ToString(); + } + + if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour == 100) + { + inValidTime.Text = "00:00"; + } + else + { + inValidTime.Text = hour + ":" + minute; + } + validTimeDate.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth + Language.StringByID(R.MyInternationalizationString.Month) + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateDay + Language.StringByID(R.MyInternationalizationString.Day); + inValidTimeDate.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMonth + Language.StringByID(R.MyInternationalizationString.Month) + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateDay + Language.StringByID(R.MyInternationalizationString.Day); + + if (string.IsNullOrEmpty(ZigBee.Device.DoorLock.LocalTempPassword)) + { + randomPassword.Text = "- - - - - -"; + temPasswordVisiable.Visible = false; + randomPassword.X = Application.GetRealWidth(215); + randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMGray4; + } + else + { + randomPassword.Text = ZigBee.Device.DoorLock.LocalTempPassword; + temPasswordVisiable.Visible = true; + } + if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InTempPasswordVisiable) + { + randomPassword.SecureTextEntry = false; + temPasswordVisiable.IsSelected = true; + randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMOrange; + } + else + { + randomPassword.SecureTextEntry = true; + temPasswordVisiable.IsSelected = false; + randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMGray4; + } + + topPic.MouseUpEventHandler += (sender, e) => + { + randomPassword.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetTempPassword(); + ZigBee.Device.DoorLock.LocalTempPassword = randomPassword.Text; + temPasswordVisiable.IsSelected = true; + temPasswordVisiable.Visible = true; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InTempPasswordVisiable = true; + randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMOrange; + }; + temPasswordVisiable.MouseUpEventHandler += (sender, e) => + { + temPasswordVisiable.IsSelected = !temPasswordVisiable.IsSelected; + if (!temPasswordVisiable.IsSelected) + { + randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMGray4; + randomPassword.SecureTextEntry = true; + } + else + { + randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMOrange; + randomPassword.SecureTextEntry = false; + } + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InTempPasswordVisiable = !randomPassword.SecureTextEntry; + }; + topPic.MouseUpEventHandler += (sender, e) => + { + randomPassword.Text = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetTempPassword(); + ZigBee.Device.DoorLock.LocalTempPassword = randomPassword.Text; + randomPassword.SecureTextEntry = false; + temPasswordVisiable.IsSelected = true; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InTempPasswordVisiable = true; + randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMOrange; + }; + + EventHandler<MouseEventArgs> handerValidTimeDateSet = (sender, e) => + { + var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "ValidTime"); + Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage); + Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; + tempPage.Show(); + + tempPage.timeSetAction += () => + { + MidFrameLayoutContent(); + }; + }; + validTimeDate.MouseUpEventHandler += handerValidTimeDateSet; + validTime.MouseUpEventHandler += handerValidTimeDateSet; + EventHandler<MouseEventArgs> handerInValidTimeSet = (sender, e) => + { + var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "InValidTime"); + Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage); + Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; + tempPage.Show(); + tempPage.timeSetAction += () => + { + MidFrameLayoutContent(); + }; + }; + inValidTime.MouseUpEventHandler += handerInValidTimeSet; + inValidTimeDate.MouseUpEventHandler += handerInValidTimeSet; + #endregion + } + //搴曢儴鐣岄潰鍜屾暟鎹鐞� public void BottomFrameLayoutContent() { var bottomFrameLayout = new FrameLayout() { Height = Application.GetRealHeight(1025), - Y = Application.GetRealHeight(896), + Y = Application.GetRealHeight(711), BackgroundColor = ZigbeeColor.Current.XMWhite, }; this.midFrameLayout.AddChidren(bottomFrameLayout); @@ -257,32 +393,53 @@ Text = Language.StringByID(R.MyInternationalizationString.InformationEdit), TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, TextAlignment = TextAlignment.CenterLeft, - TextSize = 12, + TextSize = 15, }; bottomFrameLayout.AddChidren(informationEdit); - for (int i = 0; i < 3; i++) + + for (int i = 0; i < 2; i++) { var btnValidTime = new Button() { - Width = Application.GetRealWidth(743), + Width = Application.GetRealWidth(453), Height = Application.GetRealHeight(58), X = Application.GetRealWidth(58), Text = Language.StringByID(R.MyInternationalizationString.ValidTime), - TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, + TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, TextAlignment = TextAlignment.CenterLeft, - TextSize = 12, + TextSize = 14, }; bottomFrameLayout.AddChidren(btnValidTime); + + var btnModifyText = new Button() + { + Width = Application.GetRealWidth(448), + Height = Application.GetRealHeight(58), + X = btnValidTime.Right, + Text = Language.StringByID(R.MyInternationalizationString.Modify), + TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, + TextAlignment = TextAlignment.CenterRight, + TextSize = 14, + }; + bottomFrameLayout.AddChidren(btnModifyText); + + var btnNextFrameLayout = new FrameLayout() + { + Width = Application.GetRealWidth(58 * 2), + Height = Application.GetRealHeight(58), + X = Application.GetRealWidth(956), + Y = Application.GetRealHeight(204), + }; + bottomFrameLayout.AddChidren(btnNextFrameLayout); var btnNext = new Button() { Width = Application.GetRealWidth(58), Height = Application.GetRealHeight(58), - X = Application.GetRealWidth(956), - Y = Application.GetRealHeight(204), - BackgroundColor = ZigbeeColor.Current.XMOrange, + UnSelectedImagePath = "Item/Next.png", + SelectedImagePath = "Item/Down.png", }; - bottomFrameLayout.AddChidren(btnNext); + btnNextFrameLayout.AddChidren(btnNext); var btnLine = new FrameLayout() { @@ -297,83 +454,119 @@ { btnValidTime.Y = Application.GetRealHeight(204); btnValidTime.Text = Language.StringByID(R.MyInternationalizationString.ValidTime); - btnNext.Y = btnValidTime.Y; + btnModifyText.Y = btnNextFrameLayout.Y = btnValidTime.Y; btnLine.Y = Application.GetRealHeight(308); - btnNext.MouseDownEventHandler += (sender, e) => - { - var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "ValidTime"); - Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage); - Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; - tempPage.Show(); - }; } else if (i == 1) { btnValidTime.Y = Application.GetRealHeight(343); btnValidTime.Text = Language.StringByID(R.MyInternationalizationString.InValidTime); - btnNext.Y = btnValidTime.Y; + btnModifyText.Y = btnNextFrameLayout.Y = btnValidTime.Y; btnLine.Y = Application.GetRealHeight(446); - btnNext.MouseDownEventHandler += (sender, e) => + } + int curIndex = i; + EventHandler<MouseEventArgs> hander = (sender, e) => + { + if (curIndex == 0) + { + var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "ValidTime"); + Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage); + Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; + tempPage.Show(); + tempPage.timeSetAction += () => + { + MidFrameLayoutContent(); + }; + } + if (curIndex == 1) { var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "InValidTime"); Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage); Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; tempPage.Show(); - }; - } - else if (i == 2) - { - btnValidTime.Y = Application.GetRealHeight(481); - btnValidTime.Text = Language.StringByID(R.MyInternationalizationString.ClearTempPassword); - btnNext.Y = btnValidTime.Y; - btnLine.Y = Application.GetRealHeight(1025 - 449); - } + tempPage.timeSetAction += () => + { + MidFrameLayoutContent(); + }; + } + }; + btnValidTime.MouseDownEventHandler += hander; + btnModifyText.MouseDownEventHandler += hander; + btnNextFrameLayout.MouseDownEventHandler += hander; + btnNext.MouseDownEventHandler += hander; } + var btnFinifh = new Button() + { + Width = Application.GetRealWidth(907), + Height = Application.GetRealHeight(127), + X = Application.GetRealWidth(86), + Y = Application.GetRealHeight(760), + Radius = (uint)Application.GetRealHeight(120) / 2, + TextID = R.MyInternationalizationString.Confrim, + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, + //BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect, + TextColor = Shared.Common.ZigbeeColor.Current.XMWhite, + TextSize = 16, + }; + bottomFrameLayout.AddChidren(btnFinifh); - //var bottomLine = new Button() - //{ - // Height = Application.GetRealHeight(1), - // BackgroundColor = 0xff000000, - //}; - //bottomFrameLayout.AddChidren(bottomLine); + btnFinifh.MouseUpEventHandler += async (sender, e) => + { + FinifhEventHandler(btnFinifh); + }; - //var generateTempPassword = new Button() - //{ - // Y = bottomLine.Bottom, - // Height = Application.GetRealHeight(180), - // TextID = R.MyInternationalizationString.GenerateTemporaryPassword, - // TextSize = 15, - // BackgroundColor = 0xFF121212, - // SelectedBackgroundColor = 0xFFFC5806, - //}; - //bottomFrameLayout.AddChidren(generateTempPassword); - //string tempPaw = ""; - //generateTempPassword.MouseUpEventHandler += (sender, e) => - //{ - // tempPaw = GetTempPassword(); - // for (int i = 0; i < tempPaw.Length; i++) - // { - // for (int j = 0; j < pawButtonList.Count; j++) - // { - // if (i == j) - // { - // pawButtonList[j].Text = tempPaw[i].ToString(); - // } - // } - // } - //}; } - /// <summary> - /// 鐢熸垚6浣嶄复鏃跺瘑鐮� - /// </summary> - /// <returns></returns> - public string GetTempPassword() + //纭畾浜嬩欢澶勭悊 + async private void FinifhEventHandler(Button btnFinifh) { - string password = ""; - password = new Random().Next(100000, 999999).ToString(); - return password; + if (ZigBee.Device.DoorLock.LocalTempPassword == "") + { + //璇�"鐐瑰嚮鐢熸垚"涓存椂瀵嗙爜锛� + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip1), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); + return; + } + if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour == 100) + { + //璇疯缃敓鏁堟椂闂达紱 + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip2), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); + return; + } + if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth == 0) + { + //璇疯缃敓鏁堟棩鏈燂紱 + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip3), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); + return; + } + if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour == 100) + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip4), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); + return; + } + if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMonth == 0) + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip5), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); + return; + } + var dNow = DateTime.Now; + var validDateTime = new DateTime(dNow.Year, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateDay, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute, dNow.Second); + var inValidDateTime = new DateTime(dNow.Year, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMonth, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateDay, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMinute, dNow.Second); + var result = await doorLock.TempPasswordAsync(ZigBee.Device.DoorLock.LocalTempPassword, validDateTime, inValidDateTime); + if (result != null && result.responseData != null && result.responseData.status == 0) + { + var aa = 0; + } + else + { + //澶辫触 + } + } + + //鐢熸垚闅忔満鏁颁簨浠跺鐞� + private void RandomPasswordMouseUpEventHandler(Button randomPassword) + { + } #region 鈼� 鎺ュ彛瀹炵幇__________________________ diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TimeSettignPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TimeSettignPage.cs index cbcbdf3..2a2736e 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TimeSettignPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TimeSettignPage.cs @@ -1,4 +1,7 @@ 锘縰sing System; +using System.Collections.Generic; +using Com.Autonavi.Amap.Mapcore; +using Java.Security; using Shared.Common; using ZigBee.Device; @@ -6,6 +9,44 @@ { public class TimeSettignPage : DoorLockCommonLayout, ZigBee.Common.IStatus { + /// <summary> + /// 澶勭悊鍙樺寲浜嬩欢 + /// </summary> + /// <param name="common"></param> + /// <param name="typeTag"></param> + public void DeviceInfoChange(CommonDevice common, string typeTag) + { + if (typeTag == "DeviceStatusReport" && common != null) + { + var tempDevice = (CommonDevice)common; + if (tempDevice.DeviceEpoint == doorLock.DeviceEpoint + && tempDevice.DeviceAddr == doorLock.DeviceAddr) + { + var door = tempDevice as ZigBee.Device.DoorLock; + if (door != null && door.DeviceStatusReport != null && door.DeviceStatusReport.AttriBute != null) + { + var dataReport = door.DeviceStatusReport.AttriBute[0]; + if (door.DeviceStatusReport.CluterID == 10 && dataReport.AttributeId == 0) + { + CurentDoorLockTime = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetLocalTime(dataReport.AttriButeData); + Application.RunOnMainThread(() => + { + textDisplayDate.Text = CurentDoorLockTime.Year + Language.StringByID(R.MyInternationalizationString.Year) + CurentDoorLockTime.Month + Language.StringByID(R.MyInternationalizationString.Month) + CurentDoorLockTime.Day + Language.StringByID(R.MyInternationalizationString.Day); + if (CurentDoorLockTime.Minute < 10) + { + textDisplayTime.Text = CurentDoorLockTime.Hour + ":" + "0" + CurentDoorLockTime.Minute; + } + else + { + textDisplayTime.Text = CurentDoorLockTime.Hour + ":" + CurentDoorLockTime.Minute; + } + }); + } + } + } + } + } + /// <summary> /// 鏋勯�犲嚱鏁� /// </summary> @@ -21,9 +62,26 @@ #region 鈼� 鍙橀噺鐢虫槑__________________________ ZigBee.Device.DoorLock doorLock; string setTimeType = ""; - Action<string> dateAction; //鏃ユ湡閫氱煡 - Action<string> timeAction; //鏃堕棿閫氱煡 + DateTime CurentDoorLockTime; + Button textDisplayDate; + Button textDisplayTime; + int curYear = 0; + int curMonth = 0; + int curDay = 0; + int curHour = 0; + int curMin = 0; + int curSec = 0; + public Action timeSetAction; #endregion + + /// <summary> + /// 閲嶅啓绉婚櫎鏂规硶 + /// </summary> + public override void RemoveFromParent() + { + ZbGateway.StatusList.Remove(this); + base.RemoveFromParent(); + } /// <summary> /// UI鏄剧ず @@ -34,15 +92,18 @@ { this.TopFrameLayout(this, Language.StringByID(R.MyInternationalizationString.ValidTime)); } - else + else if (setTimeType == "InValidTime") { this.TopFrameLayout(this, Language.StringByID(R.MyInternationalizationString.InValidTime)); - + } + else + { + this.TopFrameLayout(this, Language.StringByID(R.MyInternationalizationString.DoorLockTime)); } EventHandler<MouseEventArgs> eHandlerBack = (sender, e) => { - RemoveFromParent(); + this.RemoveFromParent(); }; this.btnBack.MouseUpEventHandler += eHandlerBack; this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack; @@ -53,17 +114,31 @@ public void MidFrameLayoutContent() { + if (setTimeType == "DoorLockTime") + { + new System.Threading.Thread(() => + { + while (this.Parent != null) + { + doorLock.ReadAttri(ZigBee.Device.Cluster_ID.DoorLock, ZigBee.Device.AttriButeId.DoorLock); + System.Threading.Thread.Sleep(5 * 1000); + } + }) + { IsBackground = true }.Start(); + } + var MidTopFrameLayout = new FrameLayout() { BackgroundColor = ZigbeeColor.Current.XMWhite, }; this.midFrameLayout.AddChidren(MidTopFrameLayout); + var dtNow = DateTime.Now; for (int i = 0; i < 2; i++) { var btnDateTime = new Button() { - Width = Application.GetRealWidth(743 - 300), + Width = Application.GetRealWidth(560), Height = Application.GetRealHeight(58), X = Application.GetRealWidth(58), TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, @@ -72,28 +147,30 @@ }; MidTopFrameLayout.AddChidren(btnDateTime); - var textDisplay = new Button() + var textDisplayDateFrameLayout = new FrameLayout() { - Width = Application.GetRealWidth(300), + Width = Application.GetRealWidth(333), Height = Application.GetRealHeight(58), - X = Application.GetRealWidth(580), - TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, - TextAlignment = TextAlignment.CenterRight, - TextSize = 12, + X = Application.GetRealWidth(620), }; - MidTopFrameLayout.AddChidren(textDisplay); + MidTopFrameLayout.AddChidren(textDisplayDateFrameLayout); + + var btnNextFrameLayout = new FrameLayout() + { + Width = Application.GetRealWidth(116), + Height = Application.GetRealHeight(58), + X = Application.GetRealWidth(956), + }; + MidTopFrameLayout.AddChidren(btnNextFrameLayout); var btnNext = new Button() { Width = Application.GetRealWidth(58), Height = Application.GetRealHeight(58), - X = Application.GetRealWidth(956), - Y = Application.GetRealHeight(204), - //BackgroundColor = ZigbeeColor.Current.XMOrange, UnSelectedImagePath = "Item/Next.png", SelectedImagePath = "Item/Down.png", }; - MidTopFrameLayout.AddChidren(btnNext); + btnNextFrameLayout.AddChidren(btnNext); var btnLine = new FrameLayout() { @@ -105,92 +182,368 @@ }; MidTopFrameLayout.AddChidren(btnLine); + if (setTimeType != "DoorLockTime") + { + textDisplayDateFrameLayout.Width = 0; + } + if (i == 0) { btnDateTime.Y = Application.GetRealHeight(50); - btnDateTime.Text = Language.StringByID(R.MyInternationalizationString.Date); btnLine.Y = Application.GetRealHeight(23 + 127); - textDisplay.Text = "8鏈�6鏃�"; - textDisplay.Y = btnNext.Y = btnDateTime.Y; - EventHandler<MouseEventArgs> stattimeclick = (sender1, e1) => + textDisplayDate = new Button() { - var flMain = new FrameLayout { BackgroundColor = 0x00000000 }; - this.midFrameLayout.AddChidren(flMain); - - flMain.MouseUpEventHandler += (sender11, e11) => - { - flMain.RemoveFromParent(); - }; - - var timeview = new DateView - { - Y = Application.GetRealHeight(1920 - 800), - Height = Application.GetRealHeight(800), - BackgroundColor = ZigbeeColor.Current.LogicTimeViewColor, - Width = Application.GetRealWidth(1080), - }; - flMain.AddChidren(timeview); - - var btnSave = new Button - { - Y = Application.GetRealHeight(1920 - 800), - Width = Application.GetRealWidth(200), - Height = Application.GetRealHeight(150), - Text = "瀹屾垚", - TextColor = ZigbeeColor.Current.LogicTimeViewSaveButton, - X = Application.GetRealWidth(1080 - 200), - }; - flMain.AddChidren(btnSave); + TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, + TextAlignment = TextAlignment.CenterRight, + TextSize = 12, }; - btnNext.MouseDownEventHandler += stattimeclick; + textDisplayDateFrameLayout.AddChidren(textDisplayDate); + textDisplayDateFrameLayout.Y = btnNextFrameLayout.Y = btnDateTime.Y; + + if (setTimeType != "DoorLockTime") + { + btnDateTime.Text = Language.StringByID(R.MyInternationalizationString.Date); + } + else + { + btnDateTime.Text = Language.StringByID(R.MyInternationalizationString.CurrentDate); + } } else if (i == 1) { btnDateTime.Y = Application.GetRealHeight(200); - btnDateTime.Text = Language.StringByID(R.MyInternationalizationString.Time); btnLine.Y = Application.GetRealHeight(40 + 127 + 127); - textDisplay.Text = "12 : 00"; - textDisplay.Y = btnNext.Y = btnDateTime.Y; - - EventHandler<MouseEventArgs> endtimeclick = (sender, e) => + textDisplayTime = new Button() { - var flMain = new FrameLayout { BackgroundColor = 0x00000000 }; - this.midFrameLayout.AddChidren(flMain); - flMain.MouseUpEventHandler += (sender11, e11) => - { - flMain.RemoveFromParent(); - }; - - var timeview = new TimeView() - { - Y = Application.GetRealHeight(1920 - 800), - Height = Application.GetRealHeight(800), - BackgroundColor = ZigbeeColor.Current.LogicTimeViewColor, - Width = Application.GetRealWidth(1080), - }; - flMain.AddChidren(timeview); - - var btnSave = new Button - { - Y = Application.GetRealHeight(1920 - 800), - Width = Application.GetRealWidth(200), - Height = Application.GetRealHeight(150), - Text = "瀹屾垚", - TextColor = ZigbeeColor.Current.LogicTimeViewSaveButton, - X = Application.GetRealWidth(1080 - 200), - }; - flMain.AddChidren(btnSave); - - btnSave.MouseUpEventHandler += (sender2, e2) => - { - flMain.RemoveFromParent(); - }; + TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, + TextAlignment = TextAlignment.CenterRight, + TextSize = 12, }; + textDisplayDateFrameLayout.AddChidren(textDisplayTime); + textDisplayDateFrameLayout.Y = btnNextFrameLayout.Y = btnDateTime.Y; - btnNext.MouseDownEventHandler += endtimeclick; + if (setTimeType != "DoorLockTime") + { + btnDateTime.Text = Language.StringByID(R.MyInternationalizationString.Time); + } + else + { + btnDateTime.Text = Language.StringByID(R.MyInternationalizationString.CurrentTime); + } } + int curIndex = i; + EventHandler<MouseEventArgs> hander = (sender, e) => + { + this.midFrameLayout.AddChidren(this.shadowRadiusFrameLayout); + this.BottomRadiusFrameLayout(this); + + var mUIPickerView = new UIPickerView() + { + X = Application.GetRealWidth(0), + }; + this.bottomRadiusFrameLayout.AddChidren(mUIPickerView); + + if (curIndex == 0) + { + //鏃ユ湡 + if (setTimeType != "DoorLockTime") + { + this.btnBottomTitle.TextID = R.MyInternationalizationString.Date; + } + else + { + this.btnBottomTitle.TextID = R.MyInternationalizationString.CurrentDate; + } + + mUIPickerView.Y = Application.GetRealWidth(110); + var mList1 = new List<string>(); + var mList2 = new List<string>(); + var mList3 = new List<string>(); + var oldMonth = dtNow.Month; + + int year = dtNow.Year + 1; + int days = DateTime.DaysInMonth(dtNow.Year, dtNow.Month); + + for (int y = dtNow.Year - 10; y < dtNow.Year + 1; y++) + { + mList1.Add(y.ToString()); + } + for (int m = 1; m < 13; m++) + { + mList2.Add(m.ToString()); + } + for (int d = 1; d < days; d++) + { + mList3.Add(d.ToString()); + } + + if (setTimeType != "DoorLockTime") + { + mUIPickerView.setNPicker(mList2, mList3, null); + mUIPickerView.setCurrentItems(dtNow.Month - 1, dtNow.Day - 1, 0); + curMonth = dtNow.Month; + curDay = dtNow.Day; + + if (setTimeType == "ValidTime") + { + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateYear = dtNow.Year; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth = curMonth; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateDay = curDay; + } + else + { + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateYear = dtNow.Year; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMonth = curMonth; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateDay = curDay; + } + var btnOk = new Button + { + X = Application.GetRealWidth(919), + Y = Application.GetRealHeight(40), + Height = Application.GetRealHeight(58), + Width = Application.GetRealWidth(101), + Text = Language.StringByID(R.MyInternationalizationString.Complete), + TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, + TextSize = 14, + }; + this.bottomRadiusFrameLayout.AddChidren(btnOk); + btnOk.MouseUpEventHandler += (sender1, e1) => + { + if (setTimeType == "ValidTime") + { + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateYear = dtNow.Year; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth = curMonth; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateDay = curDay; + } + else + { + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateYear = dtNow.Year; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMonth = curMonth; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateDay = curDay; + } + if (timeSetAction != null) + { + timeSetAction(); + } + this.shadowRadiusFrameLayout.RemoveFromParent(); + }; + } + else + { + mUIPickerView.setNPicker(mList1, mList2, mList3); + mUIPickerView.setCurrentItems(dtNow.Year, dtNow.Month - 1, dtNow.Day - 1); + curYear = dtNow.Year; + curMonth = dtNow.Month; + curDay = dtNow.Day; + if (CurentDoorLockTime != null) + { + curHour = CurentDoorLockTime.Hour; + curMin = CurentDoorLockTime.Minute; + curSec = CurentDoorLockTime.Second; + } + else + { + curHour = dtNow.Hour; + curMin = dtNow.Minute; + curSec = dtNow.Second; + } + } + + Action dAction = () => + { + if (curMonth != oldMonth) + { + oldMonth = curMonth; + days = DateTime.DaysInMonth(curYear, curMonth); + mList3.Clear(); + + for (int d = 1; d < days + 1; d++) + { + mList3.Add(d.ToString()); + } + + if (setTimeType != "DoorLockTime") + { + mUIPickerView.setNPicker(mList2, mList3, null); + mUIPickerView.setCurrentItems(curMonth - 1, curDay - 1, 0); + } + else + { + mUIPickerView.setNPicker(mList1, mList2, mList3); + mUIPickerView.setCurrentItems(curYear, curMonth - 1, curDay - 1); + } + } + }; + mUIPickerView.OnSelectChangeEvent += (y, m, d) => + { + if (setTimeType != "DoorLockTime") + { + curYear = dtNow.Year; + curMonth = y + 1; + curDay = m + 1; + } + else + { + curYear = y + 2009; + curMonth = m + 1; + curDay = d + 1; + } + dAction(); + }; + } + if (curIndex == 1) + { + //鏃堕棿 + if (setTimeType != "DoorLockTime") + { + this.btnBottomTitle.TextID = R.MyInternationalizationString.Time; + } + else + { + this.btnBottomTitle.TextID = R.MyInternationalizationString.CurrentTime; + } + mUIPickerView.Y = Application.GetRealWidth(95); + var mList1 = new List<string>(); + var mList2 = new List<string>(); + for (int h = 0; h < 24; h++) + { + if (h < 10) + { + mList1.Add("0" + h.ToString()); + } + else + { + mList1.Add(h.ToString()); + } + } + for (int m = 0; m < 60; m++) + { + if (m < 10) + { + mList2.Add("0" + m.ToString()); + } + else + { + mList2.Add(m.ToString()); + } + } + mUIPickerView.setNPicker(mList1, mList2, null); + mUIPickerView.setCurrentItems(dtNow.Hour, dtNow.Minute, 0); + if (CurentDoorLockTime != null) + { + curYear = CurentDoorLockTime.Year; + curMonth = CurentDoorLockTime.Month; + curDay = CurentDoorLockTime.Day; + } + else + { + curYear = dtNow.Year; + curMonth = dtNow.Month; + curDay = dtNow.Day; + } + curHour = dtNow.Hour; + curMin = dtNow.Minute; + curSec = dtNow.Second; + mUIPickerView.OnSelectChangeEvent += (h, m, s) => + { + curHour = h; + curMin = m; + curSec = dtNow.Second; + }; + if (setTimeType == "ValidTime") + { + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour = curHour; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute = curMin; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateSecond = curSec; + } + else + { + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour = curHour; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMinute = curMin; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateSecond = curSec; + } + + var btnOk = new Button + { + X = Application.GetRealWidth(919), + Y = Application.GetRealHeight(40), + Height = Application.GetRealHeight(58), + Width = Application.GetRealWidth(101), + Text = Language.StringByID(R.MyInternationalizationString.Complete), + TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, + TextSize = 14, + }; + this.bottomRadiusFrameLayout.AddChidren(btnOk); + btnOk.MouseUpEventHandler += (sender1, e1) => + { + if (setTimeType == "ValidTime") + { + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour = curHour; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute = curMin; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateSecond = curSec; + } + else + { + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour = curHour; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMinute = curMin; + Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateSecond = curSec; + } + if (timeSetAction != null) + { + timeSetAction(); + } + this.shadowRadiusFrameLayout.RemoveFromParent(); + }; + } + }; + btnDateTime.MouseDownEventHandler += hander; + textDisplayDateFrameLayout.MouseDownEventHandler += hander; + btnNextFrameLayout.MouseDownEventHandler += hander; + btnNext.MouseDownEventHandler += hander; } + + btnCancel.MouseUpEventHandler += (sender1, e1) => + { + this.shadowRadiusFrameLayout.RemoveFromParent(); + }; + btnFinish.MouseUpEventHandler += async (sender1, e1) => + { + if (setTimeType == "DoorLockTime") + { + var curDateTime = new DateTime(curYear, curMonth, curDay, curHour, curMin, curSec); + var setTimestamp = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetUnixTimeStamp(curDateTime); + try + { + CommonPage.Loading.Start(""); + var rectifyResult = await doorLock.RectifyDoorLockTimeAsync(int.Parse(setTimestamp)); + if (rectifyResult != null && rectifyResult.setWritableValueResponData != null && rectifyResult.setWritableValueResponData.Status == 0) + { + this.shadowRadiusFrameLayout.RemoveFromParent(); + // new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.RectifySuccess), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinish); + } + else + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.RectifyFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinish); + } + } + catch { } + finally + { + System.Threading.Thread.Sleep(3000); + CommonPage.Loading.Hide(); + } + } + }; + this.shadowRadiusFrameLayout.MouseUpEventHandler += (sender1, e1) => + { + this.shadowRadiusFrameLayout.RemoveFromParent(); + }; + + //绛夊緟浠庨棬閿佷笂闈㈠姞杞藉嚭鐨勬椂闂� + //System.Threading.Thread.Sleep(1500); + //CommonPage.Loading.Hide(); + } #region 鈼� 鎺ュ彛瀹炵幇__________________________ @@ -202,14 +555,6 @@ public void Changed(CommonDevice common) { - } - /// <summary> - /// 澶勭悊鍙樺寲浜嬩欢 - /// </summary> - /// <param name="common"></param> - /// <param name="typeTag"></param> - public void DeviceInfoChange(CommonDevice common, string typeTag) - { } /// <summary> /// Changeds the IL ogic status. diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs index b5accd6..e1fb9f2 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs @@ -35,7 +35,7 @@ { System.Threading.Tasks.Task.Run(async () => { - Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); }); + Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); }); try { // 璇诲彇璁惧涓殑淇℃伅 diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs index 180c7d7..9727d69 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs @@ -265,7 +265,7 @@ public void MatchUsersFrameLayout(ZigBee.Device.DoorLock.LocaDoorLockObj curDoorLockUser) { #region UI - var flMain = new FrameLayout { BackgroundColor = 0x0f000000 }; + FrameLayout flMain = new FrameLayout { BackgroundColor = 0x0f000000 }; this.midFrameLayout.AddChidren(flMain); flMain.MouseUpEventHandler += (sender11, e11) => { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/GatewayInfoAddForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/GatewayInfoAddForm.cs deleted file mode 100755 index b43ab8a..0000000 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/GatewayInfoAddForm.cs +++ /dev/null @@ -1,225 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Text; -using ZigBee.Device; - -namespace Shared.Phone.UserCenter.GatewayAdd -{ - /// <summary> - /// 缂栬緫鏂版坊鍔犵殑缃戝叧淇℃伅鐨勭敾闈I - /// </summary> - public class GatewayInfoAddForm : EditorCommonForm - { - #region 鈻� 鍙橀噺澹版槑___________________________ - - /// <summary> - /// 缃戝叧鍚嶇О鎺т欢 - /// </summary> - private FrameCaptionInputControl rowGateway = null; - /// <summary> - /// 缃戝叧鍚嶅瓧淇敼鍚庣殑鍥炶皟鍑芥暟 - /// </summary> - public Action<ZbGateway> ActionGatewayReName = null; - /// <summary> - /// 褰撳墠閫夋嫨鐨勭綉鍏� - /// </summary> - private ZbGateway zbGateway = null; - /// <summary> - /// 璁惧鏄庣粏鍒楄〃鎺т欢鐨勬甯� - /// </summary> - private DeviceInformationListControl listDeviceControl = null; - - #endregion - - #region 鈻� 鍒濆鍖朹____________________________ - - /// <summary> - /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) - /// </summary> - /// <param name="i_zbGateway">褰撳墠閫夋嫨鐨勭綉鍏�</param> - public void ShowForm(ZbGateway i_zbGateway) - { - this.zbGateway = i_zbGateway; - - //璁剧疆鏍囬淇℃伅 - base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uEditorGatewayInformation)); - - //缃戝叧瀹氫綅 - var btnIcon = new MostRightIconControl(69, 69); - btnIcon.UnSelectedImagePath = "Item/Test.png"; - topFrameLayout.AddChidren(btnIcon); - btnIcon.InitControl(); - - btnIcon.ButtonClickEvent += (sender, e) => - { - //娴嬭瘯 - HdlGatewayLogic.Current.SetTestCommand(i_zbGateway); - }; - - //鍒濆鍖栦腑閮ㄦ帶浠� - this.InitMiddleFrame(); - } - - /// <summary> - /// 鍒濆鍖栦腑閮ㄦ帶浠� - /// </summary> - private void InitMiddleFrame() - { - //娓呯┖bodyFrame - this.ClearBodyFrame(); - - //鍥剧墖涓婁笅鐨勯棿璺�(涓婁笅闂磋窛涓�鑷�) - int picSpcae = Application.GetRealHeight(100); - //鍥剧墖 - var btnImage = new PicViewControl(838, 530, true); - btnImage.Y = picSpcae; - btnImage.Gravity = Gravity.CenterHorizontal; - HdlGatewayLogic.Current.SetRealGatewayPictrue(btnImage, zbGateway); - bodyFrameLayout.AddChidren(btnImage); - - //瀹屾垚鎸夐挳 - var btnFinish = new BottomClickButton(); - btnFinish.TextID = R.MyInternationalizationString.uFinish; - bodyFrameLayout.AddChidren(btnFinish); - btnFinish.MouseUpEventHandler += (sender, e) => - { - //瀹屾垚鎸夐挳鎸変笅 - this.FinishButtonClick(); - }; - - //鐧借壊搴曢儴鑳屾櫙 - var frameBottomWhite = new FrameLayout(); - frameBottomWhite.Y = btnFinish.Y - ControlCommonResourse.BottomButtonAndListViewSpace; - frameBottomWhite.Height = bodyFrameLayout.Height - btnFinish.Y + ControlCommonResourse.BottomButtonAndListViewSpace; - frameBottomWhite.BackgroundColor = UserCenterColor.Current.White; - bodyFrameLayout.AddChidren(frameBottomWhite); - //灏嗗畬鎴愭寜閽疆椤� - btnFinish.BringToFront(); - - //鑷畾涔夌殑璁惧鍒楄〃瀹瑰櫒 - this.listDeviceControl = new DeviceInformationListControl(); - //鍒楄〃鎺т欢鏈�澶х殑楂樺害(瀹屾垚鎸夐挳鐨刌杞� - 璁剧疆鐨勯棿闅� - 鍥剧墖Y杞� - 鍥剧墖鐨勪笁鍒嗕箣涓�) - int listViewMaxHeight = btnFinish.Y - ControlCommonResourse.BottomButtonAndListViewSpace - btnImage.Y - btnImage.Height / 3; - //鏄庣粏Frame鐨勬渶灏忛珮搴�(搴曢儴frame鐨刌杞� - 鍥剧墖搴曢儴 - 鍥剧墖涓庡姬搴﹀渾鐨勯棿璺� - 寮у害鍦嗛珮搴�) - int minDetailHeight = frameBottomWhite.Y - btnImage.Bottom - picSpcae - listDeviceControl.halfRoundHeigth; - //鍒濆鍖栨帶浠� - listDeviceControl.InitControl(bodyFrameLayout, frameBottomWhite.Height, listViewMaxHeight, minDetailHeight, 3); - - //璁惧缂栬緫 - var btnTitle = new DetailTitleControl(Application.GetRealWidth(800), listDeviceControl.titleHeight, false); - btnTitle.TextID = R.MyInternationalizationString.uDeviceEditor; - listDeviceControl.AddChidren(btnTitle); - - //娣诲姞鍏ㄩ儴鑿滃崟琛� - this.AddAllMenuRow(); - } - - #endregion - - #region 鈻� 娣诲姞鍏ㄩ儴鑿滃崟琛宊____________________ - - /// <summary> - /// 娣诲姞鍏ㄩ儴鑿滃崟琛� - /// </summary> - private void AddAllMenuRow() - { - //缃戝叧鍚嶇О - string caption = Language.StringByID(R.MyInternationalizationString.uGatewayName); - string nameValue = HdlGatewayLogic.Current.GetGatewayName(zbGateway); - this.rowGateway = new FrameCaptionInputControl(caption, nameValue); - listDeviceControl.AddChidren(rowGateway); - rowGateway.InitControl(); - rowGateway.AddBottomLine(); - - //缃戝叧IP - caption = Language.StringByID(R.MyInternationalizationString.uGatewayIP); - nameValue = HdlGatewayLogic.Current.GetGatewayBaseInfoAttribute(zbGateway, "IpAddress").ToString(); - var btnIp = new FrameCaptionViewControl(caption, nameValue); - listDeviceControl.AddChidren(btnIp); - btnIp.InitControl(); - btnIp.txtView.TextColor = UserCenterColor.Current.TextGrayColor; - btnIp.AddBottomLine(); - - //缃戝叧绫诲瀷 - caption = Language.StringByID(R.MyInternationalizationString.uGatewayType); - nameValue = HdlGatewayLogic.Current.GetGatewayImageText(this.zbGateway); - var btnObject = new FrameCaptionViewControl(caption, nameValue); - listDeviceControl.AddChidren(btnObject); - btnObject.InitControl(); - btnObject.txtView.TextColor = UserCenterColor.Current.TextGrayColor; - btnObject.AddBottomLine(); - } - - #endregion - - #region 鈻� 瀹屾垚鎸夐挳鎸変笅_______________________ - - /// <summary> - /// 瀹屾垚鎸夐挳鎸変笅 - /// </summary> - private void FinishButtonClick() - { - if (string.IsNullOrEmpty(this.rowGateway.Text) == true) - { - //璇疯緭鍏ョ綉鍏冲悕绉� - this.rowGateway.Text = string.Empty; - string msg = Language.StringByID(R.MyInternationalizationString.uGatewayNameMastInput); - this.ShowMassage(ShowMsgType.Error, msg); - return; - } - string nameValue = HdlGatewayLogic.Current.GetGatewayName(zbGateway); - if (nameValue == this.rowGateway.Text) - { - //鍚屽悕涓嶉渶瑕佸鐞� - this.CloseForm(); - return; - } - //淇敼鍚嶅瓧 - this.SetGatewayName(this.rowGateway.Text); - } - - #endregion - - #region 鈻� 淇敼鍚嶅瓧___________________________ - - /// <summary> - /// 璁剧疆缃戝叧鍚嶅瓧 - /// </summary> - /// <param name="gatewayName">缃戝叧鍚嶇О</param> - private async void SetGatewayName(string gatewayName) - { - //鎵撳紑杩涘害鏉� - this.ShowProgressBar(); - //淇敼鏈湴缃戝叧鍚� - var result = await HdlGatewayLogic.Current.ReName(zbGateway, gatewayName); - //鍏抽棴杩涘害鏉� - this.CloseProgressBar(); - - //缃戝叧淇敼澶辫触 - if (result == false) - { - return; - } - Application.RunOnMainThread(() => - { - this.ActionGatewayReName?.Invoke(zbGateway); - //鍏抽棴鐣岄潰 - this.CloseForm(); - }); - } - #endregion - - #region 鈻� 鍏抽棴鐣岄潰___________________________ - - /// <summary> - /// 鐢婚潰鍏抽棴 - /// </summary> - public override void CloseForm() - { - this.ActionGatewayReName = null; - base.CloseForm(); - } - - #endregion - } -} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/GatewayProductInfoForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/GatewayProductInfoForm.cs new file mode 100755 index 0000000..ea27de1 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/GatewayProductInfoForm.cs @@ -0,0 +1,220 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using ZigBee.Device; + +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// 缃戝叧浜у搧淇℃伅鐨勭晫闈� + /// </summary> + public class GatewayProductInfoForm : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 褰撳墠閫夋嫨鐨勭綉鍏� + /// </summary> + private ZbGateway zbGateway = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_zbGateway">褰撳墠閫夋嫨鐨勭綉鍏�</param> + public void ShowForm(ZbGateway i_zbGateway) + { + this.zbGateway = i_zbGateway; + + //璁剧疆鏍囬淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddGateway)); + + //鍒濆鍖栦腑閮ㄦ帶浠� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄦ帶浠� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + bool gateWayExist = HdlGatewayLogic.Current.IsGatewayExist(zbGateway); + + //鍥剧墖 + var btnImage = new PicViewControl(855, 570, true); + btnImage.Y = Application.GetRealHeight(58); + btnImage.Gravity = Gravity.CenterHorizontal; + HdlGatewayLogic.Current.SetRealGatewayPictrue(btnImage, zbGateway); + bodyFrameLayout.AddChidren(btnImage); + + //鍒濆鍖栨甯� + var tableContr = new InformationEditorControl(); + var listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 708, 1028); + + //璁惧澶囨敞(濡傛灉杩欎釜缃戝叧娌℃湁缁戝畾鐨勮瘽,鍙厑璁告煡鐪�,涓嶈兘鏇存敼) + string caption = Language.StringByID(R.MyInternationalizationString.uDeviceNote); + string deviceName = HdlGatewayLogic.Current.GetGatewayName(zbGateway); + FrameCaptionInputControl btnGateName = null; + if (gateWayExist == true) + { + btnGateName = new FrameCaptionInputControl(caption, deviceName, listview.rowSpace / 2); + listview.AddChidren(btnGateName); + btnGateName.InitControl(); + //鍒掔嚎 + btnGateName.AddBottomLine(); + btnGateName.txtInput.FinishInputEvent += () => + { + string oldName = HdlGatewayLogic.Current.GetGatewayName(zbGateway); + if (btnGateName.Text == string.Empty) + { + btnGateName.Text = oldName; + } + if (oldName != btnGateName.Text) + { + //淇敼鍚嶅瓧 + this.SetGatewayName(btnGateName.Text, false); + } + }; + } + else + { + var btnNote = new FrameCaptionViewControl(caption, deviceName, listview.rowSpace / 2); + btnNote.UseClickStatu = false; + listview.AddChidren(btnNote); + btnNote.InitControl(); + //鍒掔嚎 + btnNote.AddBottomLine(); + } + + //璁惧绫诲瀷 + caption = Language.StringByID(R.MyInternationalizationString.uDeviceType); + var btnType = new FrameCaptionViewControl(caption, string.Empty, listview.rowSpace / 2); + btnType.UseClickStatu = false; + listview.AddChidren(btnType); + btnType.InitControl(); + //鍒掔嚎 + btnType.AddBottomLine(); + HdlGatewayLogic.Current.SetGatewayImageText(btnType.txtView, zbGateway); + + //鎵�灞炲尯鍩� + caption = Language.StringByID(R.MyInternationalizationString.uBelongArea); + var btnBeloneArea = new FrameCaptionViewControl(caption, Common.Config.Instance.Home.Name, listview.rowSpace / 2); + btnBeloneArea.UseClickStatu = false; + listview.AddChidren(btnBeloneArea); + btnBeloneArea.InitControl(); + //鍒掔嚎 + btnBeloneArea.AddBottomLine(); + + //瀹屾垚鍒濆鍖栨甯� + tableContr.FinishInitControl(bodyFrameLayout, listview); + + if (gateWayExist == true) + { + //鏇村閰嶇疆 + var btnHelp = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(49), false); + btnHelp.Y = Application.GetRealHeight(1388); + btnHelp.TextSize = 12; + btnHelp.TextAlignment = TextAlignment.Center; + btnHelp.TextColor = UserCenterColor.Current.TextOrangeColor; + btnHelp.Text = Language.StringByID(R.MyInternationalizationString.uMoreSettion); + btnHelp.ButtonClickEvent += (sender, e) => + { + }; + bodyFrameLayout.AddChidren(btnHelp); + //搴曠嚎 + int lineWidth = btnHelp.GetRealWidthByText(12); + var btnLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false); + btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor; + btnLine.Gravity = Gravity.CenterHorizontal; + btnLine.Y = btnHelp.Bottom - Application.GetRealHeight(8); + bodyFrameLayout.AddChidren(btnLine); + } + + //瀹屾垚鎸夐挳 + var btnFinish = new BottomClickButton(); + btnFinish.TextID = R.MyInternationalizationString.uFinish; + bodyFrameLayout.AddChidren(btnFinish); + btnFinish.MouseUpEventHandler += (sender, e) => + { + if (gateWayExist == false) + { + //濡傛灉杩欎釜缃戝叧杩樻病鏈夌粦瀹�,鍒欑洿鎺ュ叧闂晫闈� + this.CloseForm(); + } + //瀹屾垚鎸夐挳鎸変笅 + this.FinishButtonClick(btnGateName.Text); + }; + } + + #endregion + + #region 鈻� 瀹屾垚鎸夐挳鎸変笅_______________________ + + /// <summary> + /// 瀹屾垚鎸夐挳鎸変笅 + /// </summary> + /// <param name="gwName">缃戝叧鍚嶅瓧</param> + private void FinishButtonClick(string gwName) + { + if (string.IsNullOrEmpty(gwName) == true) + { + //璇疯緭鍏ョ綉鍏冲悕绉� + string msg = Language.StringByID(R.MyInternationalizationString.uGatewayNameMastInput); + this.ShowMassage(ShowMsgType.Error, msg); + return; + } + string nameValue = HdlGatewayLogic.Current.GetGatewayName(zbGateway); + if (nameValue == gwName) + { + //鍚屽悕涓嶉渶瑕佸鐞� + this.CloseForm(); + return; + } + HdlThreadLogic.Current.RunThread(() => + { + //淇敼鍚嶅瓧 + this.SetGatewayName(gwName, true); + }); + } + + #endregion + + #region 鈻� 淇敼鍚嶅瓧___________________________ + + /// <summary> + /// 璁剧疆缃戝叧鍚嶅瓧 + /// </summary> + /// <param name="gatewayName">缃戝叧鍚嶇О</param> + /// <param name="closeForm">鍏抽棴鐣岄潰</param> + private async void SetGatewayName(string gatewayName, bool closeForm) + { + //鎵撳紑杩涘害鏉� + this.ShowProgressBar(); + //淇敼鏈湴缃戝叧鍚� + var result = await HdlGatewayLogic.Current.ReName(zbGateway, gatewayName); + //鍏抽棴杩涘害鏉� + this.CloseProgressBar(); + + //缃戝叧淇敼澶辫触 + if (result == false) + { + return; + } + if (closeForm == true) + { + HdlThreadLogic.Current.RunMain(() => + { + //鐣岄潰鍏抽棴 + this.CloseForm(); + }); + } + } + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs new file mode 100755 index 0000000..b923c44 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs @@ -0,0 +1,64 @@ +锘縰sing System; +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// 娣诲姞缃戝叧鐨勯�夋嫨鐢婚潰 + /// </summary> + public class NewGateWayMenuSelectForm : EditorCommonForm + { + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddGateway)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + var listView = new VerticalListControl(29); + listView.Height = Application.GetRealHeight(340); + listView.BackgroundColor = UserCenterColor.Current.White; + bodyFrameLayout.AddChidren(listView); + + //鏈夌嚎缃戝叧 + var row1 = new FrameRowControl(listView.rowSpace / 2); + listView.AddChidren(row1); + var btnIcon1 = row1.AddLeftIcon(81); + btnIcon1.UnSelectedImagePath = "Gateway/WiredGateway.png"; + var btntext1 = row1.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uWiredGateway), 500); + btntext1.TextSize = 15; + row1.AddRightArrow(); + row1.AddBottomLine(); + row1.ButtonClickEvent += (sender, e) => + { + var form = new WiredGatewayDirectionForm(); + form.AddForm(); + }; + + //鏃犵嚎缃戝叧 + var row2 = new FrameRowControl(listView.rowSpace / 2); + listView.AddChidren(row2); + var btnIcon2 = row2.AddLeftIcon(81); + btnIcon2.UnSelectedImagePath = "Gateway/WirelessGateway.png"; + var btntext2 = row2.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uWirelessGateway), 500); + btntext2.TextSize = 15; + row2.AddRightArrow(); + row2.ButtonClickEvent += (sender, e) => + { + var form = new WirelessGwAddDirectionForm(); + form.AddForm(); + }; + } + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWaySelectForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWaySelectForm.cs deleted file mode 100755 index 4888634..0000000 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWaySelectForm.cs +++ /dev/null @@ -1,77 +0,0 @@ -锘縰sing System; -namespace Shared.Phone.UserCenter.GatewayAdd -{ - /// <summary> - /// 娣诲姞缃戝叧鐨勯�夋嫨鐢婚潰 - /// </summary> - public class NewGateWaySelectForm : EditorCommonForm - { - /// <summary> - /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) - /// </summary> - public void ShowForm() - { - //璁剧疆澶撮儴淇℃伅 - base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddGateway)); - - //鍒濆鍖栦腑閮ㄤ俊鎭� - //this.InitMiddleFrame(); - } - - ///// <summary> - ///// 鍒濆鍖栦腑閮ㄤ俊鎭� - ///// </summary> - //private void InitMiddleFrame() - //{ - // //娓呯┖bodyFrame - // this.ClearBodyFrame(); - - // var row1 = new StatuRowLayout(); - // bodyFrameLayout.AddChidren(row1); - // //鏈夌嚎缃戝叧鐨勫崟鍑讳簨浠� - // row1.MouseUpEvent += (sender, e) => - // { - // var form = new AddWiredGwDirectionForm(); - // base.AddFromAndRemoveNowForm(form); - // }; - - // //鏈夌嚎缃戝叧鍥炬爣 - // var btnIcon1 = new RowLeftIconView(); - // btnIcon1.UnSelectedImagePath = "Gateway/WiredGateway.png"; - // btnIcon1.SelectedImagePath = "Gateway/WiredGatewaySelected.png"; - // row1.AddChidren(btnIcon1); - - // //鏈夌嚎缃戝叧 - // var btntext1 = new RowCenterView(); - // btntext1.TextID = R.MyInternationalizationString.uWiredGateway; - // row1.AddChidren(btntext1); - - // //鍚戝彸鍥炬爣 - // row1.AddRightArrow(); - - // var row2 = new StatuRowLayout(); - // row2.Y = row1.Bottom; - // bodyFrameLayout.AddChidren(row2); - // //鏃犵嚎缃戝叧鐨勫崟鍑讳簨浠� - // row2.MouseUpEvent += (sender, e) => - // { - // var form = new AddWirelessGwDirectionForm(); - // this.AddFromAndRemoveNowForm(form); - // }; - - // //鏃犵嚎缃戝叧鍥炬爣 - // var btnIcon2 = new RowLeftIconView(); - // btnIcon2.UnSelectedImagePath = "Gateway/WirelessGateway.png"; - // btnIcon2.SelectedImagePath = "Gateway/WirelessGatewaySelected.png"; - // row2.AddChidren(btnIcon2); - - // //鏃犵嚎缃戝叧 - // var btntext2 = new RowCenterView(); - // btntext2.TextID = R.MyInternationalizationString.uWirelessGateway; - // row2.AddChidren(btntext2); - - // //鍚戝彸鍥炬爣 - // row2.AddRightArrow(); - //} - } -} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewayDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewayDirectionForm.cs new file mode 100755 index 0000000..4b6e89c --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewayDirectionForm.cs @@ -0,0 +1,87 @@ +锘縰sing System; +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// 娣诲姞鏈夌嚎缃戝叧鐨勬寚绀哄浘鐢婚潰 + /// </summary> + public class WiredGatewayDirectionForm : EditorCommonForm + { + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆鏍囬淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddWiredGateway)); + + //鍒濆鍖栦腑閮ㄦ帶浠� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄦ帶浠� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鍥炬爣 + var btnimage = new PicViewControl(533, 884, true); + btnimage.Y = Application.GetRealHeight(173); + btnimage.Gravity = Gravity.CenterHorizontal; + btnimage.UnSelectedImagePath = "Gateway/WiredGatewayInstruct.png"; + bodyFrameLayout.AddChidren(btnimage); + + //璇风‘淇濈綉鍏充笌缃戠嚎杩炴帴{0}绯荤粺鐏瘡绉掗棯鐑佷竴娆� + string[] strMsg = Language.StringByID(R.MyInternationalizationString.ConfirmLineConnectMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + var btnMsg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + btnMsg1.TextColor = UserCenterColor.Current.TextGrayColor3; + btnMsg1.TextAlignment = TextAlignment.Center; + btnMsg1.Text = strMsg[0]; + btnMsg1.Y = btnimage.Bottom + Application.GetRealHeight(101); + bodyFrameLayout.AddChidren(btnMsg1); + if (strMsg.Length > 1) + { + var btnMsg2= new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor3; + btnMsg2.TextAlignment = TextAlignment.Center; + btnMsg2.Text = strMsg[1]; + btnMsg2.Y = btnMsg1.Bottom; + bodyFrameLayout.AddChidren(btnMsg2); + } + + //鏌ョ湅甯姪 + var btnHelp = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(49), false); + btnHelp.Y = Application.GetRealHeight(1388); + btnHelp.TextSize = 12; + btnHelp.TextAlignment = TextAlignment.Center; + btnHelp.TextColor = UserCenterColor.Current.TextOrangeColor; + btnHelp.Text = Language.StringByID(R.MyInternationalizationString.uSearchHelp); + btnHelp.ButtonClickEvent += (sender, e) => + { + var form = new DeviceDirection.DeviceDirectionHelpForm(); + form.AddForm(string.Empty); + }; + bodyFrameLayout.AddChidren(btnHelp); + //搴曠嚎 + int lineWidth = btnHelp.GetRealWidthByText(12); + var btnLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false); + btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor; + btnLine.Gravity = Gravity.CenterHorizontal; + btnLine.Y = btnHelp.Bottom - Application.GetRealHeight(8); + bodyFrameLayout.AddChidren(btnLine); + + //涓嬩竴姝� + var btnNext = new BottomClickButton(); + btnNext.TextID = R.MyInternationalizationString.uNextway; + bodyFrameLayout.AddChidren(btnNext); + + btnNext.MouseUpEventHandler += (sender, e) => + { + var form = new WiredGatewaySearchForm(); + this.AddFromAndRemoveNowForm(form); + }; + } + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewayListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewayListForm.cs new file mode 100755 index 0000000..64412de --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewayListForm.cs @@ -0,0 +1,168 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using ZigBee.Device; + +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// 鎼滅储寰楀埌鐨勬湁绾跨綉鍏崇殑鍒楄〃鐣岄潰 + /// </summary> + public class WiredGatewayListForm : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鎼滅储鍒扮殑缃戝叧鍒楄〃 + /// </summary> + private List<ZbGateway> listZbGateway = null; + /// <summary> + /// 鎼滅储鍒扮殑缃戝叧绫诲埆 0:绗竴娆$粦瀹� 1:宸茬粡缁戝畾 2:闇�瑕佹崲缁� + /// </summary> + private Dictionary<string, int> dicZbGatewayDiv = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_listZbGateway">鎼滅储鍒扮殑缃戝叧鍒楄〃</param> + /// <param name="i_dicZbGatewayDiv">鎼滅储鍒扮殑缃戝叧绫诲埆 0:绗竴娆$粦瀹� 1:宸茬粡缁戝畾 2:闇�瑕佹崲缁�</param> + public void ShowForm(List<ZbGateway> i_listZbGateway, Dictionary<string, int> i_dicZbGatewayDiv) + { + this.listZbGateway = i_listZbGateway; + this.dicZbGatewayDiv = i_dicZbGatewayDiv; + + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddGateway)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + var frameBack = new FrameLayout(); + frameBack.Height = Application.GetRealHeight(23); + frameBack.BackgroundColor = UserCenterColor.Current.White; + bodyFrameLayout.AddChidren(frameBack); + + var listView = new VerticalListControl(12); + listView.Y = frameBack.Bottom; + listView.BackgroundColor = UserCenterColor.Current.White; + listView.Height = bodyFrameLayout.Height - frameBack.Height; + bodyFrameLayout.AddChidren(listView); + + HdlThreadLogic.Current.RunMainInThread(() => + { + //娣诲姞缃戝叧琛� + for (int i = 0; i < listZbGateway.Count; i++) + { + this.AddGatewayRow(listView, listZbGateway[i], i != listZbGateway.Count - 1); + } + listView.AdjustRealHeight(Application.GetRealHeight(23)); + }); + } + + #endregion + + #region 鈻� 娣诲姞缃戝叧琛宊________________________ + + /// <summary> + /// 娣诲姞缃戝叧琛� + /// </summary> + /// <param name="listView"></param> + /// <param name="gateway"></param> + /// <param name="addLine"></param> + private void AddGatewayRow(VerticalListControl listView, ZbGateway gateway, bool addLine) + { + string gwid = HdlGatewayLogic.Current.GetGatewayId(gateway); + + var frameRow = new RowLayoutControl(listView.rowSpace / 2); + listView.AddChidren(frameRow); + //鍥炬爣 + var btnIcon = frameRow.frameTable.AddLeftIcon(81); + HdlGatewayLogic.Current.SetGatewayIcon(btnIcon, gateway); + //缃戝叧鍚� + var wayName = HdlGatewayLogic.Current.GetGatewayName(gateway); + if (wayName == string.Empty) + { + //鏃犳硶璇嗗埆鐨勭綉鍏宠澶� + wayName = Language.StringByID(R.MyInternationalizationString.uUnDistinguishTheGatewayDevice); + } + if (dicZbGatewayDiv[gwid] == 0) + { + //xxx(鏂�) + wayName += Language.StringByID(R.MyInternationalizationString.uNewTip1); + } + var btnName = frameRow.frameTable.AddLeftCaption(wayName, 700); + btnName.TextSize = 15; + //鍙崇澶� + frameRow.frameTable.AddRightArrow(); + if (addLine == true) + { + //搴曠嚎 + frameRow.frameTable.AddBottomLine(); + } + + if (dicZbGatewayDiv[gwid] == 2) + { + //鎹㈢粦 + var btnBind = new NormalViewControl(Application.GetRealWidth(184), frameRow.Height, false); + btnBind.BackgroundColor = 0xfffb744a; + btnBind.TextAlignment = TextAlignment.Center; + btnBind.TextColor = UserCenterColor.Current.White; + btnBind.TextSize = 12; + btnBind.TextID = R.MyInternationalizationString.uReBindAgain; + frameRow.AddRightView(btnBind); + btnBind.ButtonClickEvent += (sender, e) => + { + //纭缁戝畾鏃х綉鍏筹紵 + string msg = Language.StringByID(R.MyInternationalizationString.uRebindGatewayMsg); + this.ShowMassage(ShowMsgType.Confirm, msg, () => + { + var form = new WiredGatewayRebindForm(); + form.AddForm(gateway, dicZbGatewayDiv); + }); + }; + } + //瀹氫綅 + var btnPosition = new NormalViewControl(Application.GetRealWidth(184), frameRow.Height, false); + btnPosition.BackgroundColor = 0xff4a4a4a; + btnPosition.TextAlignment = TextAlignment.Center; + btnPosition.TextColor = UserCenterColor.Current.White; + btnPosition.TextSize = 12; + btnPosition.TextID = R.MyInternationalizationString.uFixedPosition; + frameRow.AddRightView(btnPosition); + btnPosition.ButtonClickEvent += (sender, e) => + { + //鍙戦�佸畾浣嶅懡浠� + HdlGatewayLogic.Current.SetFixedPositionCommand(gateway); + }; + } + + #endregion + + #region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________ + + /// <summary> + /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠� + /// </summary> + public override int FormActionAgainEvent() + { + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + return 1; + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewayRebindForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewayRebindForm.cs new file mode 100755 index 0000000..3b5f660 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewayRebindForm.cs @@ -0,0 +1,66 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using ZigBee.Device; + +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// 閲嶆柊缁戝畾缃戝叧鐨勭晫闈� + /// </summary> + public class WiredGatewayRebindForm : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_gateway">鎹㈢粦鐨勭綉鍏冲璞�</param> + /// <param name="i_dicZbGatewayDiv">鎼滅储鍒扮殑缃戝叧绫诲埆 0:绗竴娆$粦瀹� 1:宸茬粡缁戝畾 2:闇�瑕佹崲缁�</param> + public void ShowForm(ZbGateway i_gateway, Dictionary<string, int> i_dicZbGatewayDiv) + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddGateway)); + + //姝e湪鎹㈢粦缃戝叧锛岃绋嶅�欌�� + var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + btnMsg.Y = Application.GetRealHeight(979); + btnMsg.TextAlignment = TextAlignment.Center; + btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3; + bodyFrameLayout.AddChidren(btnMsg); + + HdlThreadLogic.Current.RunThread(async () => + { + await System.Threading.Tasks.Task.Delay(1000); + int value = await HdlGatewayLogic.Current.ReBindNewGateway(i_gateway, btnMsg); + if (value == 1) + { + //鎴愬姛 + i_dicZbGatewayDiv[HdlGatewayLogic.Current.GetGatewayId(i_gateway)] = 1; + } + else if (value == 0) + { + //缃戝叧缁戝畾鍦ㄥ綋鍓嶈处鍙蜂笅鐨勫叾浠栦綇瀹呴噷\r\n璇疯В闄ょ粦瀹氬悗鍐嶈瘯 + string msg = Language.StringByID(R.MyInternationalizationString.uTheGatewayInOtherResidenceMsg); + if (msg.Contains("{0}") == true) + { + msg = string.Format(msg, "\r\n"); + } + this.ShowMassage(ShowMsgType.Tip, msg); + } + + HdlThreadLogic.Current.RunMain(() => + { + //鎴愬姛鎴栬�呭け璐ラ兘鍏抽棴鐣岄潰 + this.CloseForm(); + }); + }); + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs index f751770..dd788ba 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGatewaySearchForm.cs @@ -14,29 +14,21 @@ #region 鈻� 鍙橀噺澹版槑___________________________ /// <summary> - /// 鍒楄〃鎺т欢 - /// </summary> - private VerticalScrolViewLayout listView = null; - /// <summary> - /// 杩欐槸涓�忔槑鐨勬帶浠� - /// </summary> - private FrameLayout frameTransparent = null; - /// <summary> - /// 绾跨▼鎵ц涓� - /// </summary> - private bool IsThreadAction = true; - /// <summary> - /// 鎼滅储鏃堕棿 - /// </summary> - private int searchTime = 60; - /// <summary> - /// 鍋滄鎼滅储鐨勬寜閿� - /// </summary> - private BottomClickButton btnStop = null; - /// <summary> /// 缃戝叧鐨勪富閿�(value:鍓╀綑妫�娴嬫鏁�,鐢ㄤ簬瀵瑰簲寮傚父鐨勭綉鍏�) /// </summary> - private Dictionary<string, int> dicGatewayId = new Dictionary<string, int>(); + private Dictionary<string, int> dicIdCheckCount = new Dictionary<string, int>(); + /// <summary> + /// 鎼滅储鍒扮殑缃戝叧鍒楄〃 + /// </summary> + private List<ZbGateway> listZbGateway = new List<ZbGateway>(); + /// <summary> + /// 鎼滅储鍒扮殑缃戝叧绫诲埆 0:绗竴娆$粦瀹� 1:宸茬粡缁戝畾 2:闇�瑕佹崲缁� + /// </summary> + private Dictionary<string, int> dicZbGatewayDiv = new Dictionary<string, int>(); + /// <summary> + /// 鑾峰彇寰楀埌浜嗘柊缃戝叧 + /// </summary> + private bool newGatewayGetting = false; #endregion @@ -50,142 +42,237 @@ //璁剧疆鏍囬淇℃伅 base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddWiredGateway)); - //鍒濆鍖栦腑閮ㄦ帶浠� - this.InitMiddleFrame(); - - //寮�鍚嚎绋� - this.StartThread(); + //鍒濆鍖栧垵濮嬩腑閮ㄦ帶浠� + this.InitDefultMiddleFrame(); } /// <summary> - /// 鍒濆鍖栦腑閮ㄦ帶浠� + /// 鍒濆鍖栧垵濮嬩腑閮ㄦ帶浠� /// </summary> - private void InitMiddleFrame() + private void InitDefultMiddleFrame() { //娓呯┖bodyFrame this.ClearBodyFrame(); - //缃戝叧鍒楄〃锛岃繖涓帶浠剁疆浜庤儗閮� - listView = new VerticalScrolViewLayout(); - listView.Height = ControlCommonResourse.ListViewRowHeight * 5; - bodyFrameLayout.AddChidren(listView); + //鍥炬爣 + var picGwImage = new FrameLayout(); + picGwImage.Width = Application.GetMinRealAverage(861); + picGwImage.Height = Application.GetMinRealAverage(478); + picGwImage.Y = Application.GetRealWidth(251); + picGwImage.Gravity = Gravity.CenterHorizontal; + picGwImage.BackgroundImagePath = "Gateway/WiredGatewaySearching.png"; + bodyFrameLayout.AddChidren(picGwImage); - //鍥剧墖,鑳屾櫙瑕侀�忔槑 - frameTransparent = new FrameLayout + //姝e湪鎼滅储缃戝叧鈥� + var btnMsg = new NormalViewControl(bodyFrameLayout.Width, false); + btnMsg.TextID = R.MyInternationalizationString.uGatewaySearching; + btnMsg.Y = Application.GetRealHeight(1008); + btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3; + btnMsg.TextAlignment = TextAlignment.Center; + bodyFrameLayout.AddChidren(btnMsg); + + //鍒濆鍖栬繛鎺ョ殑鍋囨兂鍔ㄧ敾鏁堟灉 + this.InitConcetionAnimete(picGwImage, btnMsg); + } + + /// <summary> + /// 鍒濆鍖栧け璐ユā寮忕殑涓儴鎺т欢 + /// </summary> + private void InitFailMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鍥炬爣 + var picGwImage = new FrameLayout(); + picGwImage.Width = Application.GetMinRealAverage(861); + picGwImage.Height = Application.GetMinRealAverage(478); + picGwImage.Y = Application.GetRealWidth(158); + picGwImage.Gravity = Gravity.CenterHorizontal; + picGwImage.BackgroundImagePath = "Gateway/WiredGatewaySearching.png"; + bodyFrameLayout.AddChidren(picGwImage); + var btnFailIcon = new PicViewControl(66, 66); + btnFailIcon.UnSelectedImagePath = "Item/FailIcon.png"; + btnFailIcon.Gravity = Gravity.CenterHorizontal; + btnFailIcon.Y = Application.GetMinRealAverage(181); + picGwImage.AddChidren(btnFailIcon); + //鎼滅储澶辫触 + var btnFailView = new NormalViewControl(300, 60, true); + btnFailView.TextAlignment = TextAlignment.Center; + btnFailView.Y = Application.GetMinRealAverage(305); + btnFailView.Gravity = Gravity.CenterHorizontal; + btnFailView.TextColor = UserCenterColor.Current.TextGrayColor3; + btnFailView.TextID = R.MyInternationalizationString.uSearchFail; + picGwImage.AddChidren(btnFailView); + + //瑙e喅鏂规硶锛屽彲閫夋嫨鎵ц浠ヤ笅浠绘剰涓�绉嶆柟寮忥細 + var btnMsg1 = new NormalViewControl(930, 60, true); + btnMsg1.X = Application.GetRealWidth(75); + btnMsg1.Y = picGwImage.Bottom + Application.GetRealHeight(112); + btnMsg1.TextID = R.MyInternationalizationString.uSearchGatewayFailMsg1; + bodyFrameLayout.AddChidren(btnMsg1); + //1.闀挎寜ZB/RST閿�20绉掞紝缃戝叧鎭㈠鍑哄巶璁剧疆锛屾寚绀虹伅鍏ㄩ儴鐔剓0}鐏悗锛岄噸鏂板叆缃戙�� + var btnMsg2 = new NormalViewControl(930, 100, true); + btnMsg2.X = Application.GetRealWidth(75); + btnMsg2.Y = btnMsg1.Bottom + Application.GetRealHeight(35); + btnMsg2.Text = Language.StringByID(R.MyInternationalizationString.uSearchGatewayFailMsg2).Replace("{0}", "\r\n"); + btnMsg2.TextSize = 12; + btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor1; + btnMsg2.IsMoreLines = true; + bodyFrameLayout.AddChidren(btnMsg2); + //2.鐐规寜HID/WCFG閿紝杩涘叆缃戝叧鎹㈢粦妯″紡锛岀郴缁熸寚绀虹伅蹇棯{0}5绉掋�� + var btnMsg3 = new NormalViewControl(930, 100, true); + btnMsg3.X = Application.GetRealWidth(75); + btnMsg3.Y = btnMsg2.Bottom + Application.GetRealHeight(12); + btnMsg3.Text = Language.StringByID(R.MyInternationalizationString.uSearchGatewayFailMsg3).Replace("{0}", "\r\n"); + btnMsg3.TextSize = 12; + btnMsg3.TextColor = UserCenterColor.Current.TextGrayColor1; + btnMsg3.IsMoreLines = true; + bodyFrameLayout.AddChidren(btnMsg3); + //3.璇烽噸璇曪紝閲嶆柊娣诲姞缃戝叧銆� + var btnMsg4 = new NormalViewControl(930, 50, true); + btnMsg4.X = Application.GetRealWidth(75); + btnMsg4.Y = btnMsg3.Bottom + Application.GetRealHeight(12); + btnMsg4.Text = Language.StringByID(R.MyInternationalizationString.uSearchGatewayFailMsg4); + btnMsg4.TextSize = 12; + btnMsg4.TextColor = UserCenterColor.Current.TextGrayColor1; + bodyFrameLayout.AddChidren(btnMsg4); + //4.杩斿洖缃戝叧绠$悊銆� + var btnMsg5 = new NormalViewControl(930, 50, true); + btnMsg5.X = Application.GetRealWidth(75); + btnMsg5.Y = btnMsg4.Bottom + Application.GetRealHeight(12); + btnMsg5.Text = Language.StringByID(R.MyInternationalizationString.uSearchGatewayFailMsg5); + btnMsg5.TextSize = 12; + btnMsg5.TextColor = UserCenterColor.Current.TextGrayColor1; + bodyFrameLayout.AddChidren(btnMsg5); + + //閲嶈瘯 + var frameback = new FrameLayoutControl(); + frameback.UseClickStatu = false; + frameback.Y = Application.GetRealHeight(1259); + frameback.Gravity = Gravity.CenterHorizontal; + frameback.Width = Application.GetRealWidth(746); + frameback.Height = Application.GetRealHeight(184); + frameback.BackgroundImagePath = "Item/BottomButtonGround.png"; + bodyFrameLayout.AddChidren(frameback); + var btnReDo = new NormalViewControl(300, 65, true); + btnReDo.TextColor = UserCenterColor.Current.White; + btnReDo.TextSize = 16; + btnReDo.Y = Application.GetRealHeight(49); + btnReDo.Gravity = Gravity.CenterHorizontal; + btnReDo.TextAlignment = TextAlignment.Center; + btnReDo.TextID = R.MyInternationalizationString.uReDoAgain; + frameback.AddChidren(btnReDo, ChidrenBindMode.BindEventOnly); + frameback.ButtonClickEvent += (sender, e) => { - Width = bodyFrameLayout.Width, - Height = bodyFrameLayout.Height, - Gravity = Gravity.CenterHorizontal, - BackgroundColor = UserCenterColor.Current.Transparent + //鍒濆鍖栧垵濮嬩腑閮ㄦ帶浠� + this.InitDefultMiddleFrame(); }; - bodyFrameLayout.AddChidren(frameTransparent); - //鍥剧墖 - var btnimage = new PicViewControl(620, 620); - btnimage.Y = ControlCommonResourse.ListViewRowHeight * 2; - btnimage.Gravity = Gravity.CenterHorizontal; - btnimage.UnSelectedImagePath = "Gateway/SearchGateway.png"; - frameTransparent.AddChidren(btnimage); - - //鏅鸿兘缃戝叧閰嶇疆缃戠粶涓� - var btnText1 = new NormalViewControl(bodyFrameLayout.Width, false); - btnText1.Y = btnimage.Bottom + Application.GetRealHeight(60); - btnText1.Gravity = Gravity.CenterHorizontal; - btnText1.TextID = R.MyInternationalizationString.uGatewaySetting; - frameTransparent.AddChidren(btnText1); - - //璇风◢鍊� - var btnText2 = new NormalViewControl(bodyFrameLayout.Width, false); - btnText2.Y = btnText1.Bottom + Application.GetRealHeight(30); - btnText2.Gravity = Gravity.CenterHorizontal; - btnText2.TextID = R.MyInternationalizationString.uPleaseWait; - frameTransparent.AddChidren(btnText2); - - //鍋滄鎼滅储 - btnStop = new BottomClickButton(); - btnStop.TextID = R.MyInternationalizationString.uStopSearch; - frameTransparent.AddChidren(btnStop); - - btnStop.MouseUpEventHandler += this.btnStop_MouseClick; + //杩斿洖缃戝叧绠$悊 + var btnGoBack = new BottomClickButton(688); + btnGoBack.Y = Application.GetRealHeight(1495); + btnGoBack.TextID = R.MyInternationalizationString.uGobackGatewayManage; + bodyFrameLayout.AddChidren(btnGoBack); + btnGoBack.ButtonClickEvent += (sender, e) => + { + this.CloseForm(); + //鍏抽棴鎸囧畾鐣岄潰 + this.CloseFormByFormName("NewGateWayMenuSelectForm"); + }; } #endregion - #region 鈻� 寮�鍚嚎绋媉__________________________ + #region 鈻� 鍋囨兂鍔ㄧ敾(缃戝叧妫�娴�)_________________ /// <summary> - /// 寮�鍚悳绱㈢綉鍏崇殑瀛愮嚎绋� + /// 鍒濆鍖栬繛鎺ョ殑鍋囨兂鍔ㄧ敾鏁堟灉 /// </summary> - private void StartThread() + private void InitConcetionAnimete(FrameLayout picGwImage, NormalViewControl btnMsg) { - string textValue = btnStop.Text; - //娓呯┖淇濆瓨鐨勪富閿� - this.dicGatewayId.Clear(); - //绾跨▼杩愯涓� - this.IsThreadAction = true; + //棣栨牸鐨刋杞� + int firstPoint = Application.GetMinRealAverage(288); + //涓�鏍肩殑瀹藉害 + int width = Application.GetMinRealAverage(22); + //闂磋窛澶у皬 + int space = Application.GetMinRealAverage(12); - //娓呯┖鍏ㄩ儴鍒楄〃 - HdlGatewayLogic.Current.ClearAllRealGateway(); - ZigBee.Common.Application.IsSearchingGateway = true; + //鐢熸垚鏍煎瓙鍧愭爣 + var listPoint = new List<int>(); + for (int i = 0; i < 9; i++) + { + listPoint.Add(firstPoint + (width + space) * i); + } - //寮�鍚�掕鏃剁嚎绋� - this.StartTimeCountThread(textValue); + //寮�鍚繛鎺ョ殑鍋囨兂鍔ㄧ敾鏁堟灉绾跨▼ + var btnRound = new PicViewControl(width, width, false); + btnRound.Radius = (uint)width / 2; + btnRound.BackgroundColor = UserCenterColor.Current.ConcetionRoundColor; + btnRound.Y = Application.GetMinRealAverage(202); + btnRound.X = listPoint[0]; + picGwImage.AddChidren(btnRound); + string strMsg = btnMsg.Text; HdlThreadLogic.Current.RunThread(async () => { - while (this.IsThreadAction) + //娓呯┖鍏ㄩ儴鍒楄〃 + HdlGatewayLogic.Current.ClearAllRealGateway(); + ZigBee.Common.Application.IsSearchingGateway = true; + + int index = 1; + int maxCount = 120 * 2; + int timeCount = 120; + while (picGwImage.Parent != null) { - await Task.Delay(2500); - //寮傛缃戝叧妫�娴嬩腑(鍏堢瓑涓�5绉掞紝鐒跺悗绛塵qtt杩炴帴) - if (this.searchTime > 55) + System.Threading.Thread.Sleep(500); + maxCount--; + if (maxCount % 4 == 0) { - continue; + //姣�2绉掓娴嬫悳绱㈠埌鐨勭綉鍏� + await this.CheckZbGatewayAndSetRow(); } - - //妫�娴嬫悳绱㈠埌鐨勭綉鍏筹紝鐒跺悗娣诲姞鍒扮敾闈㈢殑琛岄噷闈� - await this.CheckZbGatewayAndSetRow(); - } - }); - } - - /// <summary> - /// 寮�鍚�掕鏃剁嚎绋� - /// </summary> - /// <param name="textValue"></param> - private void StartTimeCountThread(string textValue) - { - //鎼滅储鏃堕棿 - this.searchTime = 60; - - HdlThreadLogic.Current.RunThread(() => - { - while (this.IsThreadAction) - { - System.Threading.Thread.Sleep(1000); - - this.searchTime--; - if (this.searchTime == 0 || this.IsThreadAction == false) + if (this.newGatewayGetting == true) { - //鏃堕棿鎴 - this.btnStop_MouseClick(null, null); + //鑾峰彇寰楀埌鏂扮綉鍏�,鍒欎腑鏂嚎绋� + break; + } + if (maxCount % 2 == 0) + { + timeCount--; + } + if (maxCount <= 0) + { break; } Application.RunOnMainThread(() => { - if (btnStop != null) + btnRound.X = listPoint[index]; + index++; + if (index == listPoint.Count) { - //鍊掕鏃舵樉绀� - btnStop.Text = textValue + "(" + searchTime + ")"; + index = 0; } + //姝e湪鎼滅储缃戝叧鈥Xs + btnMsg.Text = strMsg + timeCount + "s"; }); } - Application.RunOnMainThread(() => + if (maxCount <= 0) { - if (btnStop != null) + HdlThreadLogic.Current.RunMain(() => { - btnStop.Text = textValue; - } - }); + //鍒濆鍖栧け璐ユā寮忕殑涓儴鎺т欢 + this.InitFailMiddleFrame(); + }); + } + else + { + HdlThreadLogic.Current.RunMain(() => + { + var form = new WiredGatewayListForm(); + this.AddFromAndRemoveNowForm(form, listZbGateway, dicZbGatewayDiv); + }); + } }); } @@ -209,16 +296,16 @@ } string gwId = HdlGatewayLogic.Current.GetGatewayId(ZbGateway.GateWayList[i]); //閲嶅娣诲姞妫�娴� - if (this.dicGatewayId.ContainsKey(gwId) == false) + if (this.dicIdCheckCount.ContainsKey(gwId) == false) { //鍏佽浜旀妫�娴� - this.dicGatewayId[gwId] = 5; + this.dicIdCheckCount[gwId] = 5; listId.Add(gwId); } - else if (this.dicGatewayId[gwId] > 0) + else if (this.dicIdCheckCount[gwId] > 0) { //濡傛灉鍓嶄竴娆℃娴嬪け璐ヤ簡鐨勮瘽锛屽畠鐨勬鏁�-1 - this.dicGatewayId[gwId] = this.dicGatewayId[gwId] - 1; + this.dicIdCheckCount[gwId] = this.dicIdCheckCount[gwId] - 1; listId.Add(gwId); } } @@ -234,145 +321,58 @@ { continue; } + //鏀堕泦缃戝叧瀵硅薄 + this.listZbGateway.Add(way); + //缃戝叧缁戝畾妯″紡 GatewayBindMode mode = GatewayBindMode.BindAgain; - if (way.getGatewayBaseInfo.HomeId == Common.Config.Instance.HomeId) - { - //宸茬粡缁戝畾杩囦簡 - mode = GatewayBindMode.Binded; - } - else if (HdlGatewayLogic.Current.HomeIdIsEmpty(way) == true) + if (HdlGatewayLogic.Current.HomeIdIsEmpty(way) == true) { //绗竴娆$粦瀹�,涔熷氨鏄綉鍏充綇瀹匢D涓虹┖ mode = GatewayBindMode.First; + this.dicZbGatewayDiv[listId[i]] = 0; + //鑾峰彇鍒颁簡鏂扮綉鍏� + this.newGatewayGetting = true; + } + else if (way.getGatewayBaseInfo.HomeId == Common.Config.Instance.HomeId) + { + //宸茬粡缁戝畾杩囦簡 + this.dicZbGatewayDiv[listId[i]] = 1; + mode = GatewayBindMode.Binded; + } + else + { + //闇�瑕佹崲缁� + this.dicZbGatewayDiv[listId[i]] = 2; + mode = GatewayBindMode.BindAgain; } //鏈湴鏄惁鏈夎繖涓綉鍏� bool isExist = HdlGatewayLogic.Current.IsGatewayExist(way); - //濡傛灉 if (mode != GatewayBindMode.BindAgain) { //娣诲姞鎼滅储鍒扮殑缃戝叧鍒扮紦瀛�(鎵ц缃戝叧淇濆瓨鎿嶄綔) - ShowErrorMode showMode = this.dicGatewayId[listId[i]] == 0 ? ShowErrorMode.YES : ShowErrorMode.NO; - var result = await this.DoSaveGateway(way, showMode, mode); + ShowErrorMode showMode = this.dicIdCheckCount[listId[i]] == 0 ? ShowErrorMode.YES : ShowErrorMode.NO; + var result = await this.DoSaveGateway(way, showMode); if (result == false) { - //褰撲娇鐢ㄥ畬娆℃暟涔嬪悗锛屽苟涓旀湰鍦颁笉瀛樺湪鐨勶紝鎵嶆樉绀哄嚭鏉� - if (this.dicGatewayId[listId[i]] == 0 && isExist == false) - { - Application.RunOnMainThread(() => - { - //娣诲姞澶辫触鐨勭綉鍏冲埌鐢婚潰 - this.AddFailRowLayout(way); - }); - } continue; } } //濡傛灉瀹冨凡缁忓畬鍏ㄦ垚鍔熶簡鐨勮瘽锛屽垯灏嗗畠鐨勫墿浣欐鏁扮疆闆� - this.dicGatewayId[listId[i]] = 0; + this.dicIdCheckCount[listId[i]] = 0; if (isExist == true) { //宸茬粡缁戝畾杩囦簡鐨勶紝鍒欎笉鍐嶆樉绀� continue; } - if (mode != GatewayBindMode.BindAgain) { //鎴戣寰楄繖閲岄渶瑕佽幏鍙栦竴涓嬫柊缃戝叧鐨勮澶囧垪琛� await Common.LocalDevice.Current.SetDeviceToMemmoryByGateway(way); } - - Application.RunOnMainThread(() => - { - if (this.Parent != null) - { - //娣诲姞鎼滅储鍒扮殑缃戝叧鍒扮敾闈� - this.AddRowLayout(way, mode); - } - }); } return true; - } - - #endregion - - #region 鈻� 娣诲姞缃戝叧琛屾帶浠禵____________________ - - /// <summary> - /// 娣诲姞鎼滅储鍒扮殑缃戝叧鍒扮敾闈� - /// </summary> - /// <param name="zbGateway">Zb gateway.</param> - /// <param name="mode">缃戝叧缁戝畾妯″紡</param> - private void AddRowLayout(ZbGateway zbGateway, GatewayBindMode mode) - { - if (listView == null) - { - return; - } - //缃戝叧鍒楄〃鎺т欢 - var gatewayRow = new GatewayRowControl(zbGateway); - listView.AddChidren(gatewayRow); - gatewayRow.InitControl(69); - //涓嶉渶瑕佸湪绾挎帶浠� - gatewayRow.btnOnline.RemoveFromParent(); - gatewayRow.btnOnline = null; - gatewayRow.frameTable.ButtonClickEvent += (sender, e) => - { - //鎵撳紑缃戝叧缂栬緫鐣岄潰 - this.OpenEditorGatewayForm(gatewayRow, mode); - }; - //鍚戝彸鍥炬爣 - gatewayRow.frameTable.AddRightArrow(); - - //缁戝畾 - var btnBind = gatewayRow.frameTable.AddMostRightView("", 300); - if (mode != GatewayBindMode.BindAgain) - { - //宸茬粦瀹� - btnBind.TextID = R.MyInternationalizationString.uBinded; - btnBind.TextColor = UserCenterColor.Current.Green; - } - else - { - //闇�閲嶆柊缁戝畾 - btnBind.TextID = R.MyInternationalizationString.uNeedReBinding; - btnBind.TextColor = UserCenterColor.Current.Red; - - //杩欓噷鍙槸涓存椂杩藉姞锛屽悗闈㈠彲浠ヤ細绉诲姩鍒板埆鐨勫湴鏂� - var btnConfirm = new NormalViewControl(Application.GetRealWidth(184), gatewayRow.Height, false); - btnConfirm.Text = "缃戝叧璇嗗埆"; - gatewayRow.AddRightView(btnConfirm); - btnConfirm.MouseUpEventHandler += (sender, e) => - { - HdlGatewayLogic.Current.SetTestCommand(zbGateway); - }; - } - gatewayRow.AddTag("btnBind", btnBind); - } - - /// <summary> - /// 娣诲姞鎼滅储鍒扮殑缃戝叧鍒扮敾闈㈢殑琛� - /// </summary> - /// <param name="zbGateway">Zb gateway.</param> - private void AddFailRowLayout(ZbGateway zbGateway) - { - if (listView == null) - { - return; - } - //缃戝叧鍒楄〃鎺т欢 - var gatewayRow = new GatewayRowControl(zbGateway); - listView.AddChidren(gatewayRow); - gatewayRow.InitControl(69); - //涓嶉渶瑕佸湪绾挎帶浠� - gatewayRow.btnOnline.RemoveFromParent(); - gatewayRow.btnOnline = null; - - //鏅鸿兘璺宠繃 - var btnBind = gatewayRow.frameTable.AddMostRightView("", 300); - btnBind.TextID = R.MyInternationalizationString.uIntelligentSkip; - btnBind.TextColor = UserCenterColor.Current.Red; } #endregion @@ -384,21 +384,12 @@ /// </summary> /// <param name="zbGateway">缃戝叧瀵硅薄</param> /// <param name="mode">鏄惁鏄剧ず閿欒</param> - /// <param name="bindMode">缁戝畾鏂瑰紡</param> /// <returns></returns> - private async Task<bool> DoSaveGateway(ZbGateway zbGateway, ShowErrorMode mode, GatewayBindMode bindMode) + private async Task<bool> DoSaveGateway(ZbGateway zbGateway, ShowErrorMode mode) { //娣诲姞鎼滅储鍒扮殑缃戝叧鍒扮紦瀛� //1:姝e父 -1:寮傚父 0:褰撳墠鐨勭綉鍏崇粦瀹氬湪浜嗗綋鍓嶈处鍙蜂笅鐨勪笉鍚屼綇瀹呴噷闈� - int result = 0; - if (bindMode == GatewayBindMode.BindAgain) - { - result = await HdlGatewayLogic.Current.ReBindNewGateway(zbGateway); - } - else - { - result = await HdlGatewayLogic.Current.AddNewGateway(zbGateway, mode); - } + int result = await HdlGatewayLogic.Current.AddNewGateway(zbGateway, mode); if (result == -1) { return false; @@ -424,121 +415,6 @@ #endregion - #region 鈻� 鎵撳紑缂栬緫鐣岄潰_______________________ - - /// <summary> - /// 鎵撳紑缃戝叧缂栬緫鐣岄潰 - /// </summary> - /// <param name="viewRow"></param> - /// <param name="mode"></param> - private void OpenEditorGatewayForm(GatewayRowControl viewRow, GatewayBindMode mode) - { - //宸茬粡缁戝畾浜嗭紝灏变笉鐢ㄥ啀鏄剧ず鎻愮ず - if (mode == GatewayBindMode.BindAgain && viewRow.GetTagByKey("btnBind") != null) - { - //鏄惁閲嶆柊缁戝畾缃戝叧? - string msg = Language.StringByID(R.MyInternationalizationString.uRebindGatewayMsg); - this.ShowMassage(ShowMsgType.Confirm, msg, () => - { - this.ShowConfirmMsgBeforShowForm(viewRow); - }); - } - else - { - //鎵撳紑缃戝叧鍚嶇О缂栬緫鐢婚潰 - var form = new GatewayInfoAddForm(); - form.AddForm(viewRow.zbGateway); - form.ActionGatewayReName += ((way) => - { - viewRow.RefreshControl(way); - }); - } - } - - /// <summary> - /// 鍦ㄦ墦寮�缂栬緫鐢婚潰涔嬪墠锛屽脊鍑虹‘璁ょ獥鍙�(閲嶆柊缁戝畾涓撶敤) - /// </summary> - /// <param name="viewRow"></param> - private async void ShowConfirmMsgBeforShowForm(GatewayRowControl viewRow) - { - var realway = ZbGateway.GateWayList.Find((obj) => - HdlGatewayLogic.Current.GetGatewayId(obj) == HdlGatewayLogic.Current.GetGatewayId(viewRow.zbGateway)); - - //鏄剧ず杩涘害鏉� - this.ShowProgressBar(); - - var result = await this.DoSaveGateway(realway, ShowErrorMode.YES, GatewayBindMode.BindAgain); - if (result == false) - { - //鍏抽棴杩涘害鏉� - this.CloseProgressBar(); - return; - } - //鑾峰彇璁惧鍒楄〃涓�,璇风◢鍚� - this.SetProgressValue(Language.StringByID(R.MyInternationalizationString.uDeviceIsGettingPleaseWait)); - //鎴戣寰楄繖閲岄渶瑕佽幏鍙栦竴涓嬫柊缃戝叧鐨勮澶囧垪琛� - result = await Common.LocalDevice.Current.SetDeviceToMemmoryByGateway(realway); - //鍏抽棴杩涘害鏉� - this.CloseProgressBar(); - - Application.RunOnMainThread(() => - { - //宸茬粦瀹� - var btnBind = (NormalViewControl)viewRow.GetTagByKey("btnBind"); - btnBind.TextID = R.MyInternationalizationString.uBinded; - btnBind.TextColor = UserCenterColor.Current.Green; - viewRow.RemoveTag("btnBind"); - - //鎵撳紑缃戝叧鍚嶇О缂栬緫鐢婚潰 - var form = new GatewayInfoAddForm(); - form.AddForm(viewRow.zbGateway); - form.ActionGatewayReName += ((way) => - { - viewRow.RefreshControl(way); - }); - }); - } - - #endregion - - #region 鈻� 鎸夐挳浜嬩欢___________________________ - - /// <summary> - /// 鍋滄鎸夐挳鎸変笅 - /// </summary> - /// <param name="sender">Sender.</param> - /// <param name="e">E.</param> - private void btnStop_MouseClick(object sender, MouseEventArgs e) - { - //瀛樺湪璇寜鐨勫彲鑳斤紝鐢婚潰寮�鍚殑2绉掑墠锛岀姝㈡寜涓嬪仠姝㈡寜閽� - if (this.searchTime >= 58 || this.Parent == null) - { - return; - } - //瓒呮椂 - if (e == null && listView.ChildrenCount == 0) - { - //娌℃湁鍙戠幇鏂扮綉鍏�,璇锋鏌ョ綉鍏抽摼鎺ユ槸鍚︽甯� - string msg = Language.StringByID(R.MyInternationalizationString.uNotFoundNewGatewayPleaseCheckMsg); - this.ShowMassage(ShowMsgType.Tip, msg); - } - Application.RunOnMainThread(() => - { - this.IsThreadAction = false; - if (frameTransparent != null) - { - frameTransparent.Visible = false; - } - if (listView != null) - { - listView.Height = bodyFrameLayout.Height - Application.GetRealHeight(18); - } - this.searchTime = 60; - }); - } - - #endregion - #region 鈻� 鐣岄潰鍏抽棴___________________________ /// <summary> @@ -546,8 +422,6 @@ /// </summary> public override void CloseForm() { - this.IsThreadAction = false; - ZigBee.Common.Application.IsSearchingGateway = false; //鏂紑娌℃湁鎵ц缁戝畾鐨勭綉鍏崇殑mqtt var list = new List<ZbGateway>(); @@ -574,10 +448,6 @@ base.CloseForm(); } - - #endregion - - #region 鈻� 涓�鑸柟娉昣__________________________ #endregion } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGwAddDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGwAddDirectionForm.cs deleted file mode 100755 index 4ee221d..0000000 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WiredGwAddDirectionForm.cs +++ /dev/null @@ -1,54 +0,0 @@ -锘縰sing System; -namespace Shared.Phone.UserCenter.GatewayAdd -{ - /// <summary> - /// 娣诲姞鏈夌嚎缃戝叧鐨勬寚绀哄浘鐢婚潰 - /// </summary> - public class WiredGwAddDirectionForm : EditorCommonForm - { - /// <summary> - /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) - /// </summary> - public void ShowForm() - { - //璁剧疆鏍囬淇℃伅 - base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddWiredGateway)); - - //鍒濆鍖栦腑閮ㄦ帶浠� - this.InitMiddleFrame(); - } - - /// <summary> - /// 鍒濆鍖栦腑閮ㄦ帶浠� - /// </summary> - private void InitMiddleFrame() - { - //娓呯┖bodyFrame - this.ClearBodyFrame(); - - //鍥炬爣 - var btnimage = new PicViewControl(915, 492, true); - btnimage.Y = Application.GetRealHeight(80); - btnimage.Gravity = Gravity.CenterHorizontal; - btnimage.UnSelectedImagePath = "Gateway/WiredGatewayInstruct.png"; - bodyFrameLayout.AddChidren(btnimage); - - //璇风‘淇濈綉鍏冲凡鐢ㄧ綉绾胯繛鎺� - var btnText = new NormalViewControl(bodyFrameLayout.Width, false); - btnText.TextID = R.MyInternationalizationString.ConfirmLineConnectMsg; - btnText.Y = btnimage.Bottom + Application.GetRealHeight(60); - bodyFrameLayout.AddChidren(btnText); - - //涓嬩竴姝� - var btnNext = new BottomClickButton(); - btnNext.TextID = R.MyInternationalizationString.uNextway; - bodyFrameLayout.AddChidren(btnNext); - - btnNext.MouseUpEventHandler += (sender, e) => - { - var form = new WiredGatewaySearchForm(); - base.AddFromAndRemoveNowForm(form); - }; - } - } -} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessGatewaySearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessGatewaySearchForm.cs index 18a1bbc..ed9d6cd 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessGatewaySearchForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessGatewaySearchForm.cs @@ -59,7 +59,7 @@ //鏅鸿兘缃戝叧姝e湪閰嶇疆缃戠粶涓� var btnMsg1 = new NormalViewControl(bodyFrameLayout.Width, false); - btnMsg1.TextID = R.MyInternationalizationString.uGatewaySetting; + btnMsg1.TextID = R.MyInternationalizationString.uGatewaySearching; btnMsg1.Y = Application.GetRealHeight(1036); btnMsg1.TextAlignment = TextAlignment.Center; bodyFrameLayout.AddChidren(btnMsg1); @@ -259,8 +259,8 @@ //鎼滅储寰楀埌鏃犵嚎缃戝叧 if (mode != GatewayBindMode.Binded) { - var form = new GatewayInfoAddForm(); - this.AddFromAndRemoveNowForm(form, realWay); + //var form = new GatewayInfoAddForm(); + //this.AddFromAndRemoveNowForm(form, realWay); } } }); diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayFirmwareUpdateForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayFirmwareUpdateForm.cs index ca03a01..3ac6add 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayFirmwareUpdateForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayFirmwareUpdateForm.cs @@ -58,7 +58,7 @@ btnIcon.ButtonClickEvent += (sender, e) => { //鑿滃崟鎺т欢 - var frameMenu = new TopRightMenuControl(this, 1); + var frameMenu = new TopRightMenuControl(1); //鍘嗗彶鐗堟湰 string menu1 = Language.StringByID(R.MyInternationalizationString.uHistoryVersion); frameMenu.AddRowMenu(menu1, "", "", () => diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs index d2ecb43..0a5103d 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs @@ -48,7 +48,7 @@ btnIcon.ButtonClickEvent += (sender, e) => { //娴嬭瘯 - HdlGatewayLogic.Current.SetTestCommand(i_zbGateway); + HdlGatewayLogic.Current.SetFixedPositionCommand(i_zbGateway); }; //鍒濆鍖栦腑閮ㄦ帶浠� @@ -146,7 +146,7 @@ //缃戝叧绫诲瀷 caption = Language.StringByID(R.MyInternationalizationString.uGatewayType); - nameValue = HdlGatewayLogic.Current.GetGatewayImageText(this.zbGateway); + //nameValue = HdlGatewayLogic.Current.GetGatewayImageText(this.zbGateway); var btnObject = new FrameCaptionViewControl(caption, nameValue); listDeviceControl.AddChidren(btnObject); btnObject.InitControl(); diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs index d32bd4c..7662561 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Text; +using System.Threading.Tasks; using ZigBee.Device; namespace Shared.Phone.UserCenter.GatewayManage @@ -45,7 +46,7 @@ btnAdd.InitControl(); btnAdd.ButtonClickEvent += (sender, e) => { - var form = new GatewayAdd.NewGateWaySelectForm(); + var form = new GatewayAdd.NewGateWayMenuSelectForm(); form.AddForm(); }; @@ -67,8 +68,11 @@ listview.BackgroundColor = UserCenterColor.Current.White; bodyFrameLayout.AddChidren(listview); - //璁惧畾涓儴淇℃伅 - this.SetMiddleFrameInfo(); + HdlThreadLogic.Current.RunMainInThread(() => + { + //璁惧畾涓儴淇℃伅 + this.SetMiddleFrameInfo(); + }); } /// <summary> @@ -83,24 +87,32 @@ List<ZbGateway> listway = HdlGatewayLogic.Current.GetAllLocalGateway(); if (listway.Count == 0) { + //杩樻病鏈夌粦瀹氱綉鍏冲摝 + var btnPic = new PicViewControl(683, 392); + btnPic.UnSelectedImagePath = "Item/NoFunction.png"; + btnPic.Y = (int)(bodyFrameLayout.Height * 0.382) - Application.GetRealHeight(392 / 2); + btnPic.Gravity = Gravity.CenterHorizontal; + bodyFrameLayout.AddChidren(btnPic); + + var btnView = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false); + btnView.Y = btnPic.Bottom + Application.GetRealHeight(32); + btnView.TextID = R.MyInternationalizationString.uHadNotBindGatewayMsg; + btnView.TextAlignment = TextAlignment.Center; + btnView.TextSize = 12; + btnView.TextColor = UserCenterColor.Current.TextGrayColor1; + bodyFrameLayout.AddChidren(btnView); return; } - int count = listway.Count - 1; for (int i = 0; i < listway.Count; i++) { //娣诲姞琛� var gwId = HdlGatewayLogic.Current.GetGatewayId(listway[i]); - this.AddRowLayout(gwId, i != count); + this.AddRowLayout(gwId, i != listway.Count - 1); } + //璋冩暣鍒楄〃鎺т欢鐨勯珮搴� - var realHeight = listview.ChildrenCount * listview.GetChildren(listview.ChildrenCount - 1).Height; - realHeight += Application.GetRealHeight(23); - if (realHeight < listview.Height) - { - //缂╁皬鎺т欢楂樺害 - listview.Height = realHeight; - } + this.listview.AdjustRealHeight(Application.GetRealHeight(23)); //璁剧疆鎺ュ彈鍦ㄧ嚎鐘舵�佹帹閫� this.AddGatewayOnlinePush(); @@ -120,64 +132,78 @@ private void AddRowLayout(string strWayId, bool addLine) { //缃戝叧鎺т欢 - var Gateway = HdlGatewayLogic.Current.GetLocalGateway(strWayId); - var gatewayRow = new GatewayRowControl(Gateway, listview.rowSpace / 2); + var gateway = HdlGatewayLogic.Current.GetLocalGateway(strWayId); + var gatewayRow = new GatewayRowControl(gateway, listview.rowSpace / 2); listview.AddChidren(gatewayRow); gatewayRow.InitControl(81); //鍚戝彸鍥炬爣 gatewayRow.frameTable.AddRightArrow(); - //娣诲姞鍦ㄧ嚎鐘舵�� - gatewayRow.AddOnLineControl(); if (addLine == true) { gatewayRow.frameTable.AddBottomLine(); } - //鎻愮ず鏈夋柊鐗堟湰 - var btnNew = new InformationTipView(gatewayRow.btnIcon); + var btnNew = new RowNewVersionTipView(); btnNew.Visible = false; gatewayRow.frameTable.AddChidren(btnNew, ChidrenBindMode.BindEventOnly); gatewayRow.AddTag("btnNew", btnNew); - - this.dicRowContr[strWayId] = gatewayRow; - - //璁剧疆涓�涓�夋嫨缃戝叧鐨勯粯璁ゅ�� - if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == true && gatewayRow.IsOnline == true) + //鍗曞嚮浜嬩欢 + gatewayRow.frameTable.ButtonClickEvent += (sender, e) => { - this.SaveGatewayIdToLocation(strWayId); - } - //缂栬緫鎸夐挳 - var btnEditor = new NormalViewControl(Application.GetRealWidth(177), gatewayRow.Height, false); - btnEditor.BackgroundColor = UserCenterColor.Current.RowEditorButtonColor; - btnEditor.TextAlignment = TextAlignment.Center; - btnEditor.TextColor = UserCenterColor.Current.White; - btnEditor.TextID = R.MyInternationalizationString.uEditor; - gatewayRow.AddRightView(btnEditor); - btnEditor.ButtonClickEvent += (sender, e) => - { - //濡傛灉鐐瑰嚮鐨勬槸涓嶅湪绾跨殑缃戝叧锛屽垯褰撲粈涔堜簨閮芥病鏈夊彂鐢� - if (gatewayRow.IsOnline == false) - { - //鎸囧畾鐨勭綉鍏充笉鍦ㄧ嚎 - this.ShowMassage(ShowMsgType.Normal, Language.StringByID(R.MyInternationalizationString.uTheGatewayIsNotOnline)); - return; - } - //鐐瑰嚮缂栬緫鐨勮瘽锛岀洿鎺ラ殣钘� - btnNew.Visible = false; - - var form = new GatewayInfoEditorForm(); - form.AddForm(Gateway); }; - //瑙i櫎缁戝畾 - var btnUnBind = new NormalViewControl(Application.GetRealWidth(177), gatewayRow.Height, false); - btnUnBind.BackgroundColor = UserCenterColor.Current.RowDeleteButtonColor; - btnUnBind.TextAlignment = TextAlignment.Center; - btnUnBind.TextColor = UserCenterColor.Current.White; - btnUnBind.TextID = R.MyInternationalizationString.uUnBinded; - gatewayRow.AddRightView(btnUnBind); - btnUnBind.ButtonClickEvent += (sender, e) => + //鍒囨崲 + var btnSwitch = new NormalViewControl(Application.GetRealWidth(184), gatewayRow.Height, false); + btnSwitch.BackgroundColor = 0xfffb744a; + btnSwitch.TextAlignment = TextAlignment.Center; + btnSwitch.TextColor = UserCenterColor.Current.White; + btnSwitch.TextSize = 12; + btnSwitch.TextID = R.MyInternationalizationString.uSwitch1; + if (strWayId == GatewayResourse.AppOldSelectGatewayId) + { + btnSwitch.TextID = R.MyInternationalizationString.uRefresh; + } + gatewayRow.AddRightView(btnSwitch); + btnSwitch.ButtonClickEvent += (sender, e) => + { + //鏄惁鍒囨崲鍒皗0}缃戝叧? + string msg = string.Format(Language.StringByID(R.MyInternationalizationString.uConfirmWantToSwitchTheGateway), "[" + gatewayRow.btnName.Text + "]"); + if (strWayId == GatewayResourse.AppOldSelectGatewayId) + { + //鏄惁閲嶆柊鍒锋柊{0}缃戝叧? + msg = string.Format(Language.StringByID(R.MyInternationalizationString.uConfirmWantToRefreshTheGateway), "[" + gatewayRow.btnName.Text + "]"); + } + this.ShowMassage(ShowMsgType.Confirm, msg, () => + { + //鎵ц鍒囨崲缃戝叧鎿嶄綔 + this.DoSwitchGateway(strWayId, gatewayRow.IsOnline); + }); + }; + + //瀹氫綅 + var btnPosition = new NormalViewControl(Application.GetRealWidth(184), gatewayRow.Height, false); + btnPosition.BackgroundColor = 0xff4a4a4a; + btnPosition.TextAlignment = TextAlignment.Center; + btnPosition.TextColor = UserCenterColor.Current.White; + btnPosition.TextSize = 12; + btnPosition.TextID = R.MyInternationalizationString.uFixedPosition; + gatewayRow.AddRightView(btnPosition); + btnPosition.ButtonClickEvent += (sender, e) => + { + //鍙戦�佸畾浣嶅懡浠� + HdlGatewayLogic.Current.SetFixedPositionCommand(gateway); + }; + + //鍒犻櫎 + var btnDelete = new NormalViewControl(Application.GetRealWidth(184), gatewayRow.Height, false); + btnDelete.BackgroundColor = 0xfff75858; + btnDelete.TextAlignment = TextAlignment.Center; + btnDelete.TextColor = UserCenterColor.Current.White; + btnDelete.TextSize = 12; + btnDelete.TextID = R.MyInternationalizationString.uDelete; + gatewayRow.AddLeftView(btnDelete); + btnDelete.ButtonClickEvent += (sender, e) => { //濡傜Щ闄ょ綉鍏筹紝璇ョ綉鍏崇粦瀹氱殑璁惧鍒楄〃{0}灏嗘竻绌猴紝纭缁х画鎵ц璇ユ搷浣滐紵 string msg = Language.StringByID(R.MyInternationalizationString.uUnBindedMsg); @@ -191,42 +217,12 @@ }); }; - //鍗曞嚮浜嬩欢 - gatewayRow.frameTable.ButtonClickEvent += (sender, e) => + this.dicRowContr[strWayId] = gatewayRow; + //璁剧疆涓�涓�夋嫨缃戝叧鐨勯粯璁ゅ�� + if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == true && gatewayRow.IsOnline == true) { - //濡傛灉鐐瑰嚮鐨勬槸涓嶅湪绾跨殑缃戝叧锛屽垯褰撲粈涔堜簨閮芥病鏈夊彂鐢� - if (gatewayRow.IsOnline == false) - { - //鎸囧畾鐨勭綉鍏充笉鍦ㄧ嚎 - this.ShowMassage(ShowMsgType.Normal, Language.StringByID(R.MyInternationalizationString.uTheGatewayIsNotOnline)); - return; - } - //濡傛灉瀛樺湪鏂扮増鏈�,骞朵笖鍗曞嚮浠栫殑璇� - if (btnNew.Visible == true) - { - if (sender is InformationTipView || sender is IconViewControl) - { - //鎵撳紑缂栬緫鐣岄潰 - btnNew.Visible = false; - var form = new GatewayInfoEditorForm(); - form.AddForm(Gateway); - return; - } - } - - //鏄惁鍒囨崲鍒皗0}缃戝叧? - string msg = string.Format(Language.StringByID(R.MyInternationalizationString.uConfirmWantToSwitchTheGateway), "[" + gatewayRow.btnName.Text + "]"); - if (strWayId == GatewayResourse.AppOldSelectGatewayId) - { - //鏄惁閲嶆柊鍒锋柊{0}缃戝叧? - msg = string.Format(Language.StringByID(R.MyInternationalizationString.uConfirmWantToRefreshTheGateway), "[" + gatewayRow.btnName.Text + "]"); - } - this.ShowMassage(ShowMsgType.Confirm, msg, () => - { - //鎵ц鍒囨崲缃戝叧鎿嶄綔 - this.DoSwitchGateway(strWayId); - }); - }; + this.SaveGatewayIdToLocation(strWayId); + } } #endregion @@ -270,7 +266,44 @@ /// 鎵ц鍒囨崲缃戝叧鎿嶄綔 /// </summary> /// <param name="gatewayId"></param> - private async void DoSwitchGateway(string gatewayId) + /// <param name="online"></param> + private async void DoSwitchGateway(string gatewayId,bool online) + { + if (online == true) + { + //閲嶆柊鑾峰彇鍦ㄧ嚎缃戝叧鐨勪俊鎭� + var result = await this.GetOnlineGatewayInfo(gatewayId); + if (result == false) + { + return; + } + } + //鍒囨崲缃戝叧,淇濆瓨缂撳瓨 + this.SaveGatewayIdToLocation(gatewayId); + //濡傛灉閫夋嫨浜嗗埛鏂扮殑缃戝叧锛屽垯涓嶅叧闂鐞嗙晫闈� + this.closeDeviceManagForm = false; + + if (UserCenterResourse.DicActionForm.ContainsKey("DeviceListMainForm") == false) + { + //鍒锋柊涓荤敾闈� + var form = new Device.DeviceListMainForm(); + this.AddFromAndRemoveNowForm(form); + } + else + { + //鍏抽棴鐣岄潰 + this.CloseForm(); + //鍒锋柊涓荤敾闈�(涓嶉噸鏂拌幏鍙栬澶囩姸鎬�) + this.LoadFormMethodByName("DeviceListMainForm", "InitMiddleFrame", false); + } + } + + /// <summary> + /// 鑾峰彇鍦ㄧ嚎缃戝叧淇℃伅 + /// </summary> + /// <param name="gatewayId"></param> + /// <returns></returns> + private async Task<bool> GetOnlineGatewayInfo(string gatewayId) { //鏄剧ず杩涘害鏉� this.ShowProgressBar(); @@ -297,7 +330,7 @@ { //鍏抽棴杩涘害鏉� this.CloseProgressBar(); - return; + return false; } //閲嶆柊缁戝畾缃戝叧閲岄潰宸茬粡閲嶆柊鑾峰彇浜嗙綉鍏充俊鎭� getGatewayInfo = false; @@ -312,7 +345,7 @@ { //鍏抽棴杩涘害鏉� this.CloseProgressBar(); - return; + return false; } } @@ -322,27 +355,9 @@ this.CloseProgressBar(); if (result == false) { - return; + return false; } - - //鍒囨崲缃戝叧,淇濆瓨缂撳瓨 - this.SaveGatewayIdToLocation(gatewayId); - //濡傛灉閫夋嫨浜嗗埛鏂扮殑缃戝叧锛屽垯涓嶅叧闂鐞嗙晫闈� - this.closeDeviceManagForm = false; - - if (UserCenterResourse.DicActionForm.ContainsKey("DeviceListMainForm") == false) - { - //鍒锋柊涓荤敾闈� - var form = new Device.DeviceListMainForm(); - this.AddFromAndRemoveNowForm(form); - } - else - { - //鍏抽棴鐣岄潰 - this.CloseForm(); - //鍒锋柊涓荤敾闈�(涓嶉噸鏂拌幏鍙栬澶囩姸鎬�) - this.LoadFormMethodByName("DeviceListMainForm", "InitMiddleFrame", false); - } + return true; } /// <summary> @@ -371,11 +386,14 @@ /// <param name="listway"></param> private void StartGatewayOnlieCheckThread(List<ZbGateway> listway) { - var timeValue = (DateTime.Now - oldGetOnlineTime).Milliseconds; - if (timeValue <= 10000) + if (oldGetOnlineTime.Year != 1900) { - //鏈�灏戣闂撮殧鍗佺,鎵嶅幓閲嶆柊鑾峰彇 - return; + var timeValue = (DateTime.Now - oldGetOnlineTime).TotalSeconds; + if (timeValue < 10) + { + //鏈�灏戣闂撮殧鍗佺,鎵嶅幓閲嶆柊鑾峰彇 + return; + } } oldGetOnlineTime = DateTime.Now; @@ -454,7 +472,7 @@ { if (this.dicRowContr.ContainsKey(gwid) == true && this.dicRowContr[gwid] != null) { - var btnNew = (InformationTipView)this.dicRowContr[gwid].GetTagByKey("btnNew"); + var btnNew = (RowNewVersionTipView)this.dicRowContr[gwid].GetTagByKey("btnNew"); if (btnNew != null) { btnNew.Visible = true; diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackUpForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackUpForm.cs index 02888e6..d50e463 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackUpForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlAutoBackUpForm.cs @@ -197,7 +197,7 @@ btnIcon.InitControl(); btnIcon.ButtonClickEvent += (sender, e) => { - var menuForm = new TopRightMenuControl(this, 2); + var menuForm = new TopRightMenuControl(2); menuForm.AddRowMenu(Language.StringByID(R.MyInternationalizationString.uUpLoadAutoBackUpButton), "", "", () => { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayListBackUpForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayListBackUpForm.cs index 8c39464..fa5b511 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayListBackUpForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlGatewayListBackUpForm.cs @@ -104,7 +104,7 @@ gatewayRow.frameTable.AddRightArrow(); //鎻愮ず鏈夋柊鐗堟湰 - var btnNew = new InformationTipView(gatewayRow.btnIcon); + var btnNew = new RowNewVersionTipView(); btnNew.Visible = false; gatewayRow.frameTable.AddChidren(btnNew, ChidrenBindMode.BindEventOnly); gatewayRow.AddTag("btnNew", btnNew); @@ -231,7 +231,7 @@ { if (this.dicRowContr.ContainsKey(gwid) == true) { - var btnNew = (InformationTipView)this.dicRowContr[gwid].GetTagByKey("btnNew"); + var btnNew = (RowNewVersionTipView)this.dicRowContr[gwid].GetTagByKey("btnNew"); btnNew.Visible = true; } }); diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs index c013c61..cbfe08e 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs @@ -34,7 +34,7 @@ titleIcon.InitControl(); titleIcon.ButtonClickEvent += (sender, e) => { - var menuContr = new TopRightMenuControl(this, 2, 449); + var menuContr = new TopRightMenuControl(2, 449); //鎵弿浜岀淮鐮� string msg1 = Language.StringByID(R.MyInternationalizationString.uScanQRcode); menuContr.AddRowMenu(msg1, "Item/ScanQRcodeIcon.png", "Item/ScanQRcodeIconSelected.png", () => @@ -192,12 +192,17 @@ { if (listCheck.Contains(infoRes.DistributedMark) == true || infoRes.Account == UserCenterResourse.UserInfo.Phone - || infoRes.Account == UserCenterResourse.UserInfo.Email - || infoRes.AccountType != 0) + || infoRes.Account == UserCenterResourse.UserInfo.Email) { - //濡傛灉鏄畠鑷繁鐨勮瘽,鎴栬�呮潈闄愮瓑绾ф瘮浠栭珮鐨勶紝涓嶆樉绀� + //濡傛灉鏄畠鑷繁鐨勮瘽锛屼笉鏄剧ず continue; } + if (UserCenterResourse.UserInfo.AuthorityNo != 1 && infoRes.AccountType != 0) + { + //涓嶈兘澶熻幏鍙栨潈闄愮瓑绾ф瘮浠栭珮鐨�(涓讳汉鑷繁鍙互鏃犺杩欎釜鍒ゆ柇) + continue; + } + listCheck.Add(infoRes.DistributedMark); //娣诲姞鎴愬憳淇℃伅鐨勭紦瀛� UserCenterResourse.ListMemberInfo.Add(infoRes); diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs index 0934bee..b35bb71 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs @@ -263,7 +263,7 @@ var memberShardInfo = new MemberShardInfoData(); row.ButtonClickEvent += (sender, e) => { - var form = new SharedContent.SearchConfigureSharedListRoomForm(); + var form = new SharedContent.LookSharedListRoomForm(); form.AddForm(memberInfo, memberShardInfo); }; } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs index 9ff8a6a..bcfc50f 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs @@ -233,9 +233,9 @@ } }; - if (info.IsOthreShare == true && info.AccountType != 1) + if (info.IsOthreShare == true) { - //鍒嗕韩鐨勶紝鍙堜笉鎷ユ湁绠$悊鍛樻潈闄愮殑,涓嶈兘鏇存敼 + //鍒嗕韩鐨�,涓嶈兘鏇存敼 return; } //鏇存敼 diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs index 3570f6e..73fb7b5 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs @@ -347,7 +347,7 @@ btnIcon.InitControl(); btnIcon.ButtonClickEvent += ((sender, e) => { - var frame = new TopRightMenuControl(this, 1); + var frame = new TopRightMenuControl(1); //鍒犻櫎浣忓畢 frame.AddRowMenu(Language.StringByID(R.MyInternationalizationString.uDeleteResidence), "Item/DeleteIcon2.png", "Item/DeleteIcon2Selected.png", () => { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs index 25ee7ff..47ea583 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs @@ -175,7 +175,7 @@ btnIcon.ButtonClickEvent += (sender, e) => { //鑿滃崟鎺т欢 - var frameMenu = new TopRightMenuControl(this, 2); + var frameMenu = new TopRightMenuControl(2); //闃插尯鍒楄〃 string menu1 = Language.StringByID(R.MyInternationalizationString.uGarrisonAreaList); frameMenu.AddRowMenu(menu1, "Item/GarrisonList.png", "Item/GarrisonListSelected.png", () => @@ -444,11 +444,14 @@ { return; } - var timeValue = (DateTime.Now - oldGetOnlineTime).Milliseconds; - if (timeValue <= 10000) + if (oldGetOnlineTime.Year != 1900) { - //鏈�灏戣闂撮殧鍗佺,鎵嶅幓閲嶆柊鑾峰彇 - return; + var timeValue = (DateTime.Now - oldGetOnlineTime).TotalSeconds; + if (timeValue < 10) + { + //鏈�灏戣闂撮殧鍗佺,鎵嶅幓閲嶆柊鑾峰彇 + return; + } } oldGetOnlineTime = DateTime.Now; diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs new file mode 100755 index 0000000..5749ce1 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs @@ -0,0 +1,807 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using ZigBee.Device; + +namespace Shared.Phone.UserCenter.SharedContent +{ + /// <summary> + /// 閰嶇疆鏂板叡浜唴瀹圭殑涓荤晫闈� + /// </summary> + public class AddNewSharedContentForm : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + ///// <summary> + ///// 璁惧鍒楄〃鎺т欢 + ///// </summary> + //private VerticalScrolViewLayout listDeviceView = null; + ///// <summary> + ///// 鍦烘櫙鍒楄〃鎺т欢 + ///// </summary> + //private VerticalScrolViewLayout listSceneView = null; + ///// <summary> + ///// 鎴愬憳淇℃伅 + ///// </summary> + //private MemberInfoRes memberResult = null; + + ///// <summary> + ///// 鎴块棿瀵硅薄 + ///// </summary> + //private Common.Room room = null; + ///// <summary> + ///// Tab鐨勯�夋嫨銆�1锛氬姛鑳絋ab 2锛氬満鏅疶ab + ///// </summary> + //private int TabSelectIndex = 1; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + ///// <summary> + ///// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + ///// </summary> + ///// <param name="i_room">鎴块棿瀵硅薄</param> + ///// <param name="i_memberResult">鎴愬憳淇℃伅</param> + ///// <param name="i_memberShardInfo">鎴愬憳鐨勫垎浜暟鎹�</param> + //public void ShowForm(Common.Room i_room, MemberInfoRes i_memberResult, MemberShardInfoData i_memberShardInfo) + //{ + // this.memberResult = i_memberResult; + // this.memberShardInfo = i_memberShardInfo; + // this.room = i_room; + + // //璁剧疆澶撮儴淇℃伅 + // base.SetTitleText(this.room.Name); + + // //鍒嗕韩 + // //var btnShard = new TopLayoutFinshView(); + // //btnShard.TextID = R.MyInternationalizationString.uShared; + // //topFrameLayout.AddChidren(btnShard); + // //btnShard.MouseUpEventHandler += (sender, e) => + // //{ + // // HdlThreadLogic.Current.Run(() => + // // { + // // //纭鍒嗕韩 + // // this.DoSaveSharedContent(); + // // }); + // //}; + + // ////鍒濆鍖栦腑閮ㄤ俊鎭� + // //this.InitMiddleFrame(); + //} + + ///// <summary> + ///// 鍒濆鍖栦腑閮ㄤ俊鎭� + ///// </summary> + //private void InitMiddleFrame() + //{ + // //娓呯┖bodyFrame + // this.ClearBodyFrame(); + + // //鍒濆鍖朤ab鎺т欢 + // var frame = this.InitTabControl(); + + // this.listDeviceView = new VerticalScrolViewLayout(); + // listDeviceView.Y = frame.Bottom; + // listDeviceView.Height = bodyFrameLayout.Height - frame.Bottom; + // listDeviceView.Visible = this.TabSelectIndex == 1; + // bodyFrameLayout.AddChidren(listDeviceView); + + // this.listSceneView = new VerticalScrolViewLayout(); + // listSceneView.Y = frame.Bottom; + // listSceneView.Height = bodyFrameLayout.Height - frame.Bottom; + // listSceneView.Visible = this.TabSelectIndex == 2; + // bodyFrameLayout.AddChidren(listSceneView); + + // HdlThreadLogic.Current.Run(() => + // { + // //鍒濆鍖栧姛鑳絋ab鍒楄〃 + // this.InitFunctionTabList(); + // //鍒濆鍖栧満鏅疶ab鍒楄〃 + // this.InitSceneTabList(); + // }); + //} + + #endregion + + //#region 鈻� 鍒濆鍖朤ab鎺т欢______________________ + + ///// <summary> + ///// 鍒濆鍖朤ab鎺т欢 + ///// </summary> + ///// <returns></returns> + //private FrameLayout InitTabControl() + //{ + // //Tab鍒囨崲鎺т欢 + // var frameSwich = new FrameLayout(); + // frameSwich.Height = Application.GetRealHeight(150); + // frameSwich.BackgroundColor = UserCenterColor.Current.TopFrameLayout; + // bodyFrameLayout.AddChidren(frameSwich); + + // //鍔熻兘 + // var btnFunction = new NormalViewControl(frameSwich.Width / 2, Application.GetRealHeight(100)); + // btnFunction.Gravity = Gravity.CenterVertical; + // btnFunction.TextID = R.MyInternationalizationString.uFunction; + // btnFunction.TextAlignment = TextAlignment.Center; + // btnFunction.TextColor = UserCenterColor.Current.SelectTextColor; + // btnFunction.TextAlignment = TextAlignment.Center; + // frameSwich.AddChidren(btnFunction); + + // //鍦烘櫙 + // var btnScene = new NormalViewControl(frameSwich.Width / 2, Application.GetRealHeight(100)); + // btnScene.Gravity = Gravity.CenterVertical; + // btnScene.X = frameSwich.Width / 2; + // btnScene.TextID = R.MyInternationalizationString.uScence; + // btnScene.TextAlignment = TextAlignment.Center; + // frameSwich.AddChidren(btnScene); + + // //绾� + // var btnLine = new ProgressLine(); + // btnLine.Gravity = Gravity.BottomLeft; + // frameSwich.AddChidren(btnLine); + // btnLine.SetValue(50, true); + + // if (this.TabSelectIndex == 2) + // { + // btnScene.TextColor = UserCenterColor.Current.SelectTextColor; + // btnFunction.TextColor = Common.ZigbeeColor.Current.TextColor; + // btnLine.SetValue(50, false); + // } + + // //鍔熻兘Tab + // btnFunction.MouseUpEventHandler += (sender, e) => + // { + // if (this.TabSelectIndex == 1) + // { + // return; + // } + // btnScene.TextColor = Common.ZigbeeColor.Current.TextColor; + // btnFunction.TextColor = UserCenterColor.Current.SelectTextColor; + // btnLine.SetValue(50); + // this.TabSelectIndex = 1; + + // //闅愯棌鍦烘櫙鍒楄〃鎺т欢,鏄剧ず璁惧鍒楄〃鎺т欢 + // this.listSceneView.Visible = false; + // this.listDeviceView.Visible = true; + // }; + + // //鍦烘櫙Tab + // btnScene.MouseUpEventHandler += (sender, e) => + // { + // if (this.TabSelectIndex == 2) + // { + // return; + // } + // btnScene.TextColor = UserCenterColor.Current.SelectTextColor; + // btnFunction.TextColor = Common.ZigbeeColor.Current.TextColor; + // btnLine.SetValue(50, false); + // this.TabSelectIndex = 2; + + // //闅愯棌璁惧鍒楄〃鎺т欢,鏄剧ず鍦烘櫙鍒楄〃鎺т欢 + // this.listDeviceView.Visible = false; + // this.listSceneView.Visible = true; + // }; + + // return frameSwich; + //} + + //#endregion + + //#region 鈻� 鏄剧ず鍔熻兘Tab鍒楄〃____________________ + + ///// <summary> + ///// 鍒濆鍖栧姛鑳絋ab鍒楄〃 + ///// </summary> + //private void InitFunctionTabList() + //{ + // if (memberShardInfo.dicAllMemberShard.ContainsKey(this.room.FileName) == false) + // { + // memberShardInfo.dicAllMemberShard[this.room.FileName] = new HashSet<string>(); + // } + // var listCheck = memberShardInfo.dicAllMemberShard[this.room.FileName]; + + // foreach (var deviceUi in this.room.DeviceUIList) + // { + // var device = deviceUi.CommonDevice; + // if (device == null || listCheck.Contains(device.FilePath) == true) + // { + // //寮傚父锛屾垨鑰呭凡缁忓垎浜簡鐨勶紝涓嶅啀鏄剧ず + // continue; + // } + // Application.RunOnMainThread(() => + // { + // if (this.listDeviceView != null) + // { + // //娣诲姞璁惧琛� + // var deviceRow = new DeviceSelectControl(device); + // this.listDeviceView.AddChidren(deviceRow); + // deviceRow.InitControl(); + // //涓嶉渶瑕佹埧闂存帶浠� + // deviceRow.RemoveRoomControl(); + // } + // }); + // } + //} + + //#endregion + + //#region 鈻� 鏄剧ず鍦烘櫙Tab鍒楄〃____________________ + + ///// <summary> + ///// 鍒濆鍖栧満鏅疶ab鍒楄〃 + ///// </summary> + //private void InitSceneTabList() + //{ + // if (memberShardInfo.dicAllMemberShard.ContainsKey(this.room.FileName) == false) + // { + // memberShardInfo.dicAllMemberShard[this.room.FileName] = new HashSet<string>(); + // } + // var listCheck = memberShardInfo.dicAllMemberShard[this.room.FileName]; + + // foreach (var sceneUi in this.room.SceneUIList) + // { + // if (sceneUi == null || listCheck.Contains(sceneUi.FileName) == true) + // { + // //寮傚父锛屾垨鑰呭凡缁忓垎浜簡鐨勶紝涓嶅啀鏄剧ず + // continue; + // } + // Application.RunOnMainThread(() => + // { + // if (this.listSceneView != null) + // { + // //娣诲姞鍦烘櫙琛� + // var sceneRow = new SceneSelectRow(this.listSceneView, sceneUi); + // } + // }); + // } + //} + + //#endregion + + //#region 鈻� 鑾峰彇閫夋嫨鐨勮澶嘷____________________ + + ///// <summary> + ///// 鑾峰彇閫夋嫨鐨勮澶� + ///// </summary> + ///// <param name="listCheck">閲嶅妫�娴�</param> + ///// <returns></returns> + //private List<CommonDevice> GetSelectedDevice(HashSet<string> listCheck) + //{ + // var listDevice = new List<CommonDevice>(); + // for (int i = 0; i < listDeviceView.ChildrenCount; i++) + // { + // var myView = listDeviceView.GetChildren(i); + // var selectRow = (DeviceSelectControl)myView; + // if (selectRow.IsSelected == true && listCheck.Contains(selectRow.device.FilePath) == false) + // { + // listCheck.Add(selectRow.device.FilePath); + // listDevice.Add(selectRow.device); + // } + // } + // return listDevice; + //} + + //#endregion + + //#region 鈻� 鑾峰彇閫夋嫨鐨勫満鏅痏____________________ + + ///// <summary> + ///// 鑾峰彇閫夋嫨鐨勫満鏅� + ///// </summary> + ///// <param name="listCheck">閲嶅妫�娴�</param> + ///// <returns></returns> + //private List<Common.SceneUI> GetSelectedSceneUI(HashSet<string> listCheck) + //{ + // var listSceneUI = new List<Common.SceneUI>(); + // for (int i = 0; i < listSceneView.ChildrenCount; i++) + // { + // var myView = listSceneView.GetChildren(i); + // var selectRow = (SceneSelectRow)myView; + // if (selectRow.IsSelected == true && listCheck.Contains(selectRow.sceneUI.Id.ToString()) == false) + // { + // listCheck.Add(selectRow.sceneUI.Id.ToString()); + // listSceneUI.Add(selectRow.sceneUI); + // } + // } + // return listSceneUI; + //} + + //#endregion + + //#region 鈻� 纭鍒嗕韩___________________________ + + ///// <summary> + ///// 纭鍒嗕韩 + ///// </summary> + //private async void DoSaveSharedContent() + //{ + // var listCheck = new HashSet<string>(); + // //閫夋嫨鐨勮澶� + // var listSelectDevice = this.GetSelectedDevice(listCheck); + // //閫夋嫨鐨勫満鏅� + // var listSelectScene = this.GetSelectedSceneUI(listCheck); + // if (listSelectDevice.Count == 0 && listSelectScene.Count == 0) + // { + // //璇烽�夋嫨鐩爣鍚庡啀鎵ц鍒嗕韩鎿嶄綔 + // string msg = Language.StringByID(R.MyInternationalizationString.uNotSelectDeviceBeforeSave); + // this.ShowErrorMsg(msg); + // return; + // } + // //鎵ц涓婁紶鍒嗕韩鍐呭 + // var result = await HdlShardLogic.Current.DoUploadSharedContent(memberShardInfo, this.room, listSelectDevice, listSelectScene); + // if (result == true) + // { + // Application.RunOnMainThread(() => + // { + // //閲嶆柊鍒锋柊鐣岄潰 + // this.InitMiddleFrame(); + // //鍒嗕韩鎴愬姛 + // string msg = Language.StringByID(R.MyInternationalizationString.uShardSuccess); + // this.ShowMassage(msg); + // }); + // } + //} + + //#endregion + + + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鏌ョ湅鐨勬埧闂村璞� + /// </summary> + private Common.Room lookRoom = null; + /// <summary> + /// 鎴愬憳鐨勫垎浜暟鎹� + /// </summary> + private MemberShardInfoData memberShardInfo = null; + /// <summary> + /// 褰撳墠閫夋嫨鐨勫垎鏀紝1锛氬満鏅� 2锛氬姛鑳� + /// </summary> + private int nowSelectIndex = 1; + /// <summary> + /// 璁惧妗屽竷鎺т欢 + /// </summary> + private FrameLayout frameDeviceTable = null; + /// <summary> + /// 璁惧妗屽竷鎺т欢 + /// </summary> + private FrameLayout frameSceneTable = null; + /// <summary> + /// 鍔熻兘鎸夐挳 + /// </summary> + private BottomClickButton btnShard = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_room">鏌ョ湅鐨勬埧闂村璞�</param> + public void ShowForm(Common.Room i_room, MemberShardInfoData i_memberShardInfo) + { + this.lookRoom = i_room; + this.memberShardInfo = i_memberShardInfo; + + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddShared)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鍒濆鍖栧垎鏀帶浠� + this.InitSwitchControl(); + + //鍒濆鍖栨甯冩帶浠� + this.frameSceneTable = new FrameLayout(); + frameSceneTable.Y = Application.GetRealHeight(132); + frameSceneTable.Height = bodyFrameLayout.Height - Application.GetRealHeight(132); + bodyFrameLayout.AddChidren(frameSceneTable); + + this.frameDeviceTable = new FrameLayout(); + frameDeviceTable.Y = frameSceneTable.Y; + frameDeviceTable.Height = frameSceneTable.Height; + bodyFrameLayout.AddChidren(frameDeviceTable); + frameDeviceTable.Visible = false; + + //鎴块棿 + var btnRoom = new NormalViewControl(400, 63, true); + btnRoom.Y = Application.GetRealHeight(40); + btnRoom.X = bodyFrameLayout.Width - Application.GetRealWidth(58 + 400); + btnRoom.Text = this.lookRoom.Name; + btnRoom.TextAlignment = TextAlignment.CenterRight; + bodyFrameLayout.AddChidren(btnRoom); + + this.btnShard = new BottomClickButton(); + btnShard.TextID = R.MyInternationalizationString.uShared2; + bodyFrameLayout.AddChidren(btnShard); + btnShard.Visible = false; + btnShard.ButtonClickEvent += (sender, e) => + { + }; + + //鍒濆鍖栧満鏅垪琛� + this.InitSceneList(); + //鍒濆鍔熻兘鍒楄〃 + this.InitFunctionList(); + } + + /// <summary> + /// 鍒濆鍖栧垎鏀帶浠� + /// </summary> + private void InitSwitchControl() + { + var btnTemp = new NormalViewControl(10, 10, false); + btnTemp.TextID = R.MyInternationalizationString.uScence; + + //鍦烘櫙妗�(鐐瑰嚮鑼冨洿鏈夌偣灏忥紝闇�瑕佹墿澶у畠鐨勭偣鍑昏寖鍥�) + var frameScene = new FrameLayoutControl(); + frameScene.UseClickStatu = false; + frameScene.Height = Application.GetRealHeight(90); + frameScene.Width = btnTemp.GetRealWidthByText(16); + frameScene.X = ControlCommonResourse.XXLeft; + frameScene.Y = Application.GetRealHeight(40); + bodyFrameLayout.AddChidren(frameScene); + //鍦烘櫙 + var btnScene = new NormalViewControl(frameScene.Width, Application.GetRealHeight(63), false); + btnScene.Text = btnTemp.Text; + btnScene.TextSize = 16; + btnScene.TextColor = UserCenterColor.Current.TextColor2; + frameScene.AddChidren(btnScene, ChidrenBindMode.BindEventOnly); + //搴曠嚎 + var btnSceneLine = new NormalViewControl(40, 10, true); + btnSceneLine.Y = btnScene.Bottom + Application.GetRealHeight(14); + btnSceneLine.X = btnScene.X + btnScene.Width / 2 - Application.GetRealWidth(40) / 2; + btnSceneLine.Radius = (uint)Application.GetRealHeight(10) / 2; + btnSceneLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor; + frameScene.AddChidren(btnSceneLine, ChidrenBindMode.BindEventOnly); + + btnTemp.TextID = R.MyInternationalizationString.uFunction; + //鍔熻兘妗�(鐐瑰嚮鑼冨洿鏈夌偣灏忥紝闇�瑕佹墿澶у畠鐨勭偣鍑昏寖鍥�) + var frameFunc = new FrameLayoutControl(); + frameFunc.UseClickStatu = false; + frameFunc.Height = Application.GetRealHeight(90); + frameFunc.Width = btnTemp.GetRealWidthByText(16); + frameFunc.X = frameScene.Right + Application.GetRealWidth(58); + frameFunc.Y = Application.GetRealHeight(40); + bodyFrameLayout.AddChidren(frameFunc); + //鍔熻兘 + var btnFunc = new NormalViewControl(frameFunc.Width, Application.GetRealHeight(63), false); + btnFunc.Text = btnTemp.Text; + btnFunc.TextColor = UserCenterColor.Current.TextGrayColor3; + frameFunc.AddChidren(btnFunc, ChidrenBindMode.BindEventOnly); + //搴曠嚎 + var btnFuncLine = new NormalViewControl(40, 10, true); + btnFuncLine.Y = btnFunc.Bottom + Application.GetRealHeight(14); + btnFuncLine.X = btnFunc.X + btnFunc.Width / 2 - Application.GetRealWidth(40) / 2; + btnFuncLine.Radius = (uint)Application.GetRealHeight(10) / 2; + btnFuncLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor; + frameFunc.AddChidren(btnFuncLine, ChidrenBindMode.BindEventOnly); + btnFuncLine.Visible = false; + + frameScene.ButtonClickEvent += (sender, e) => + { + //鍦烘櫙鍒嗘敮閫夋嫨 + if (this.nowSelectIndex == 1) + { + return; + } + this.nowSelectIndex = 1; + + btnScene.TextSize = 16; + btnScene.TextColor = UserCenterColor.Current.TextColor2; + btnFunc.TextSize = 14; + btnFunc.TextColor = UserCenterColor.Current.TextGrayColor3; + btnSceneLine.Visible = true; + btnFuncLine.Visible = false; + + //鏄剧ず鍦烘櫙鍒楄〃 + this.frameSceneTable.Visible = true; + this.frameDeviceTable.Visible = false; + }; + + frameFunc.ButtonClickEvent += (sender, e) => + { + //鍔熻兘鍒嗘敮閫夋嫨 + if (this.nowSelectIndex == 2) + { + return; + } + this.nowSelectIndex = 2; + + btnScene.TextSize = 14; + btnScene.TextColor = UserCenterColor.Current.TextGrayColor3; + btnFunc.TextSize = 16; + btnFunc.TextColor = UserCenterColor.Current.TextColor2; + btnFuncLine.Visible = true; + btnSceneLine.Visible = false; + + //鏄剧ず鍔熻兘鍒楄〃 + this.frameSceneTable.Visible = false; + this.frameDeviceTable.Visible = true; + }; + } + + #endregion + + #region 鈻� 鍦烘櫙鏄剧ず___________________________ + + /// <summary> + /// 鍒濆鍖栧満鏅垪琛� + /// </summary> + private void InitSceneList() + { + //娓呯┖妗屽竷 + this.frameSceneTable.RemoveAll(); + + var listView = new VerticalFrameControl(29); + listView.Y = Application.GetRealHeight(53); + listView.Height = bodyFrameLayout.Height - Application.GetRealHeight(187); + frameSceneTable.AddChidren(listView); + + HdlThreadLogic.Current.RunMainInThread(() => + { + foreach (var data in lookRoom.SceneUIList) + { + //鍦烘櫙鍥剧墖 + var frameContr = new FrameLayoutControl(); + frameContr.UseClickStatu = false; + frameContr.Width = Application.GetRealWidth(878); + frameContr.Height = Application.GetRealHeight(440); + frameContr.Gravity = Gravity.CenterHorizontal; + frameContr.BackgroundImagePath = data.IconPath; + listView.AddChidrenFrame(frameContr); + + var btnSelect = new IconViewControl(58); + btnSelect.UnSelectedImagePath = "Item/ItemUnSelected.png"; + btnSelect.SelectedImagePath = "Item/ItemSelected.png"; + btnSelect.X = Application.GetRealWidth(786); + btnSelect.Y = Application.GetRealHeight(35); + frameContr.AddChidren(btnSelect, ChidrenBindMode.BindEventOnly); + frameContr.ButtonClickEvent += (sender, e) => + { + btnSelect.IsSelected = !btnSelect.IsSelected; + }; + } + }); + } + + #endregion + + #region 鈻� 鍔熻兘鏄剧ず___________________________ + + /// <summary> + /// 鍒濆鍖栧姛鑳藉垪琛� + /// </summary> + private void InitFunctionList() + { + //娓呯┖妗屽竷 + this.frameDeviceTable.RemoveAll(); + + var frameBack = new FrameLayoutControl(false); + frameBack.X = ControlCommonResourse.XXLeft; + frameBack.Y = Application.GetRealHeight(178); + frameBack.BackgroundColor = UserCenterColor.Current.White; + frameBack.Width = bodyFrameLayout.Width; + frameBack.Height = Application.GetRealHeight(1650); + frameBack.RadiusEx = 20; + frameDeviceTable.AddChidren(frameBack); + + var listView = new VerticalListControl(23); + listView.Y = Application.GetRealHeight(23); + listView.Height = Application.GetRealHeight(1437 - 23); + frameBack.AddChidren(listView); + + HdlThreadLogic.Current.RunMainInThread(() => + { + //鑾峰彇鍒嗙粍鍚庣殑璁惧鍒楄〃 + var dicGroupDevice = this.GetAllGroupDevice(); + //鍒濆鍖栬澶囩被鍨嬭 + this.InitDeviceObjectRow(dicGroupDevice, listView); + }); + } + + #endregion + + #region 鈻� 鍒濆鍖栬澶囩被鍨嬭___________________ + + /// <summary> + /// 鍒濆鍖栬澶囩被鍨嬭 + /// </summary> + /// <param name="dicData"></param> + /// <param name="listView"></param> + private void InitDeviceObjectRow(Dictionary<int, List<CommonDevice>> dicData, VerticalListControl listView) + { + var scrolContr = new HorizontalScrolViewLayout(); + scrolContr.X = ControlCommonResourse.XXLeft / 2; + scrolContr.Width = bodyFrameLayout.Width - ControlCommonResourse.XXLeft / 2; + scrolContr.Height = Application.GetRealHeight(160); + this.frameDeviceTable.AddChidren(scrolContr); + + int oldTextId = 0; + FrameLayout oldFrameBack = null; + NormalViewControl oldBtnText = null; + + foreach (int textId in dicData.Keys) + { + var frameMain = new FrameLayout(); + frameMain.Height = scrolContr.Height; + frameMain.Width = Application.GetRealWidth(250) + ControlCommonResourse.XXLeft; + scrolContr.AddChidren(frameMain); + var frameBack = new FrameLayoutControl(); + frameBack.UseClickStatu = false; + frameBack.Gravity = Gravity.CenterHorizontal; + frameBack.Height = frameMain.Height; + frameBack.Width = Application.GetRealWidth(187); + if (scrolContr.ChildrenCount == 1) + { + oldTextId = textId; + frameBack.BackgroundImagePath = "Item/RoomIconBackgroundSelected.png"; + oldFrameBack = frameBack; + } + else + { + frameBack.BackgroundImagePath = "Item/RoomIconBackground.png"; + } + frameMain.AddChidren(frameBack); + var btnText = new NormalViewControl(frameBack.Width - frameBack.Height, frameBack.Height, false); + btnText.Gravity = Gravity.CenterHorizontal; + btnText.TextID = textId; + btnText.TextSize = 12; + btnText.TextAlignment = TextAlignment.Center; + if (scrolContr.ChildrenCount == 1) + { + btnText.TextColor = UserCenterColor.Current.White; + oldBtnText = btnText; + } + else + { + btnText.TextColor = UserCenterColor.Current.TextGrayColor1; + } + frameBack.AddChidren(btnText, ChidrenBindMode.BindEventOnly); + + frameBack.ButtonClickEvent += (sender, e) => + { + if (oldTextId == textId) + { + //鍚屼竴涓笢瑗� + return; + } + oldTextId = textId; + + //鐘舵�佸彉鏇� + frameBack.BackgroundImagePath = "Room/RoomIconBackgroundSelected.png"; + btnText.TextColor = UserCenterColor.Current.White; + + oldFrameBack.BackgroundImagePath = "Room/RoomIconBackground.png"; + oldBtnText.TextColor = UserCenterColor.Current.TextGrayColor1; + oldFrameBack = frameBack; + oldBtnText = btnText; + //娣诲姞璁惧琛� + this.AddDeviceRow(dicData[textId], listView); + }; + } + + //娣诲姞璁惧琛� + foreach (int textId in dicData.Keys) + { + this.AddDeviceRow(dicData[textId], listView); + break; + } + } + + #endregion + + #region 鈻� 娣诲姞璁惧琛宊________________________ + + /// <summary> + /// 娣诲姞璁惧琛� + /// </summary> + /// <param name="listDevice"></param> + /// <param name="listView"></param> + private void AddDeviceRow(List<CommonDevice> listDevice, VerticalListControl listView) + { + listView.RemoveAll(); + + foreach (var device in listDevice) + { + var frameRow = new FrameRowControl(listView.rowSpace / 2); + frameRow.UseClickStatu = false; + frameRow.LeftOffset = Application.GetRealWidth(46) - ControlCommonResourse.XXLeft; + frameRow.RightOffset = -ControlCommonResourse.XXLeft; + listView.AddChidren(frameRow); + //鍥炬爣 + var btnIcon = frameRow.AddLeftIcon(81); + Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, device); + //鍚嶇О + var btnView = frameRow.AddLeftCaption(string.Empty, 600); + btnView.Text = Common.LocalDevice.Current.GetDeviceEpointName(device); + btnView.TextSize = 15; + //搴曠嚎 + frameRow.AddBottomLine(); + //閫夋嫨 + var btnSelect = frameRow.AddMostRightEmptyIcon(69, 69); + btnSelect.UnSelectedImagePath = "Item/ItemUnSelected.png"; + btnSelect.SelectedImagePath = "Item/ItemSelected.png"; + frameRow.ChangedChidrenBindMode(btnSelect, ChidrenBindMode.NotBind); + btnSelect.ButtonClickEvent += (sender, e) => + { + btnSelect.IsSelected = !btnSelect.IsSelected; + }; + } + } + + #endregion + + #region 鈻� 鏁村悎璁惧___________________________ + + /// <summary> + /// 鑾峰彇鍒嗙粍鍚庣殑璁惧 + /// </summary> + /// <returns></returns> + private Dictionary<int, List<CommonDevice>> GetAllGroupDevice() + { + //鍏ㄩ儴鐨勮澶� + var listDevice = lookRoom.GetRoomListDevice(); + var dic = new Dictionary<int, List<CommonDevice>>(); + foreach (var device in listDevice) + { + var typeInfo = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<ZigBee.Device.CommonDevice>() { device }); + if (device.Type == DeviceType.IASZone) + { + //杩欎釜寮哄埗涓轰紶鎰熷櫒 + typeInfo.BeloneTextId = R.MyInternationalizationString.uDeviceBelongId1200; + typeInfo.ConcreteType = Common.DeviceConcreteType.Sensor; + } + if (device.Type == DeviceType.OnOffOutput) + { + //缁х數鍣ㄧ殑鏃跺��,闇�瑕佺壒娈婂鐞� + if (device.DfunctionType == DeviceFunctionType.A寮�鍏�) + { + typeInfo.BeloneTextId = R.MyInternationalizationString.uSwitch; + } + else if (device.DfunctionType == DeviceFunctionType.A鎻掑骇) + { + typeInfo.BeloneTextId = R.MyInternationalizationString.uSocket1; + } + else if (device.DfunctionType == DeviceFunctionType.A鐏厜) + { + typeInfo.BeloneTextId = R.MyInternationalizationString.uLight; + } + else + { + //缁х數鍣� + typeInfo.BeloneTextId = R.MyInternationalizationString.uDeviceBelongId2300; + } + if (dic.ContainsKey(typeInfo.BeloneTextId) == false) + { + dic[typeInfo.BeloneTextId] = new List<CommonDevice>(); + } + } + else + { + if (dic.ContainsKey(typeInfo.BeloneTextId) == false) + { + dic[typeInfo.BeloneTextId] = new List<CommonDevice>(); + } + } + dic[typeInfo.BeloneTextId].Add(device); + } + return dic; + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs new file mode 100755 index 0000000..de98c4b --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs @@ -0,0 +1,503 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using ZigBee.Device; + +namespace Shared.Phone.UserCenter.SharedContent +{ + /// <summary> + /// 閰嶇疆鏂板叡浜唴瀹圭殑涓荤晫闈� + /// </summary> + public class AddNewSharedListRoomForm : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鍒楄〃鎺т欢 + /// </summary> + private VerticalListControl listView = null; + /// <summary> + /// 鍒嗕韩鎸夐挳 + /// </summary> + private BottomClickButton btnShard = null; + /// <summary> + /// 鎴愬憳淇℃伅 + /// </summary> + private MemberInfoRes memberResult = null; + /// <summary> + /// 鎴愬憳鐨勫垎浜暟鎹� + /// </summary> + private MemberShardInfoData memberShardInfo = null; + /// <summary> + /// 閫夋嫨鐨勬埧闂� + /// </summary> + private Dictionary<string, Common.Room> dicSelectRoom = new Dictionary<string, Common.Room>(); + /// <summary> + /// 褰撳墠閫夋嫨鐨勬ゼ灞侷D + /// </summary> + private string nowSelectFloorId = string.Empty; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_memberResult">鎴愬憳淇℃伅</param> + /// <param name="i_memberShardInfo">鎴愬憳鐨勫叡浜俊鎭�</param> + public void ShowForm(MemberInfoRes i_memberResult, MemberShardInfoData i_memberShardInfo) + { + this.memberResult = i_memberResult; + this.memberShardInfo = i_memberShardInfo; + + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddShared)); + + //鍒濆鍖栧彸涓婅鐨勬帶浠� + this.InitTopRightMenuControl(); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + var frameBack = new FrameLayout(); + frameBack.Height = Application.GetRealHeight(141); + frameBack.BackgroundColor = UserCenterColor.Current.White; + bodyFrameLayout.AddChidren(frameBack); + //鎴块棿鍒楄〃 + var btnTitle = new NormalViewControl(800, 60, true); + btnTitle.X = ControlCommonResourse.XXLeft; + btnTitle.Y = Application.GetRealHeight(52); + btnTitle.TextID = R.MyInternationalizationString.RoomList; + btnTitle.TextColor = UserCenterColor.Current.TextColor2; + btnTitle.TextSize = 15; + frameBack.AddChidren(btnTitle); + + this.listView = new VerticalListControl(29); + listView.Y = frameBack.Bottom; + listView.Height = bodyFrameLayout.Height - frameBack.Bottom; + listView.BackgroundColor = UserCenterColor.Current.White; + bodyFrameLayout.AddChidren(listView); + + this.btnShard = new BottomClickButton(); + btnShard.TextID = R.MyInternationalizationString.uShared2; + bodyFrameLayout.AddChidren(btnShard); + btnShard.Visible = false; + btnShard.ButtonClickEvent += (sender, e) => + { + var listRoom = new List<Common.Room>(); + foreach (var room in this.dicSelectRoom.Values) + { + listRoom.Add(room); + } + //鎵ц鍒嗕韩鎸囧畾鍖哄煙 + this.DoSharedContentByRoom(listRoom); + }; + + HdlThreadLogic.Current.RunThread(() => + { + //鍒濆鍖栧尯鍩熷垪琛� + this.InitAreaListRow(this.nowSelectFloorId); + }); + } + + /// <summary> + /// 鍒濆鍖栧彸涓婅鐨勬帶浠� + /// </summary> + private void InitTopRightMenuControl() + { + //鑾峰彇妤煎眰 + var dicFloor = Common.Room.CurrentRoom.GetFloorSortList(); + if (dicFloor.Count == 0) + { + return; + } + var btnIconContr = new MostRightIconControl(69, 69); + btnIconContr.UnSelectedImagePath = "Item/Drop_Down.png"; + topFrameLayout.AddChidren(btnIconContr); + btnIconContr.InitControl(); + + var btnFloor = new NormalViewControl(300, 69, true); + btnFloor.Gravity = Gravity.CenterVertical; + btnFloor.X = btnIconContr.X + btnIconContr.btnIcon.X - Application.GetRealWidth(300); + btnFloor.TextAlignment = TextAlignment.CenterRight; + topFrameLayout.AddChidren(btnFloor); + + foreach (var floorId in dicFloor.Keys) + { + //绗竴涓ゼ灞� + this.nowSelectFloorId = floorId; + btnFloor.Text = dicFloor[floorId]; + break; + } + + btnIconContr.ButtonClickEvent += (sender, e) => + { + //妤煎眰鑿滃崟 + var contr = new TopRightMenuControl(dicFloor.Count, 449, Language.StringByID(R.MyInternationalizationString.SelectFloor)); + foreach (var floorId in dicFloor.Keys) + { + contr.AddRowMenu(dicFloor[floorId], "Floor/Floor.png", "Floor/FloorSelected.png", () => + { + //璁板綍璧烽�夋嫨鐨処D + this.nowSelectFloorId = floorId; + btnFloor.Text = dicFloor[this.nowSelectFloorId]; + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + }); + } + }; + } + + #endregion + + #region 鈻� 鍖哄煙鍒楄〃___________________________ + + /// <summary> + /// 鍒濆鍖栧尯鍩熷垪琛� + /// </summary> + /// <param name="floorId">妤煎眰ID</param> + private void InitAreaListRow(string floorId) + { + dicSelectRoom.Clear(); + var listRoom = Common.Room.CurrentRoom.GetFloorSortRoom(floorId, false); + HdlThreadLogic.Current.RunMain(() => + { + var listDataRoom = new List<Common.Room>(); + for (int i = 0; i < listRoom.Count; i++) + { + //妫�娴嬭兘鍚︽樉绀鸿鎴块棿 + if (this.CheckCanShowRow(listRoom[i]) == true) + { + listDataRoom.Add(listRoom[i]); + } + } + for (int i = 0; i < listDataRoom.Count; i++) + { + //娣诲姞鎴块棿琛� + this.AddRoomRow(listDataRoom[i], i != listDataRoom.Count - 1); + } + + //璋冩暣鐪熷疄楂樺害 + listView.AdjustRealHeight(Application.GetRealHeight(23)); + if (listView.Y + listView.Height > btnShard.Y) + { + //褰撹繖涓垪琛ㄦ帶浠剁殑楂樺害宸茬粡瓒呰繃浜嗐�愬垎浜寜閽�戞椂,灏嗗畠鐨勯珮搴︾洿鎺ユ墿澶у埌鏈�澶у寲 + listView.RecoverHeight(); + //鐒跺悗鍐嶆坊鍔犱竴涓┖鐧界殑鎺т欢,淇冧娇瀹冭兘澶熷悜涓婃粦鍔� + var frameTemp = new FrameLayout(); + frameTemp.Height = bodyFrameLayout.Height - btnShard.Y; + listView.AddChidren(frameTemp); + } + if (listView.ChildrenCount == 0) + { + //濡傛灉娌℃湁鑳藉鍏变韩鐨勬埧闂� + bodyFrameLayout.RemoveAll(); + + //鍥剧墖 + var btnPic = new PicViewControl(383, 279); + btnPic.Gravity = Gravity.CenterHorizontal; + btnPic.Y = Application.GetRealHeight(498); + btnPic.UnSelectedImagePath = "Item/NotShardPic.png"; + bodyFrameLayout.AddChidren(btnPic); + + //鏃犲彲鍏变韩鐨勬埧闂� + var btnMsg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false); + btnMsg1.Y = Application.GetRealHeight(962); + btnMsg1.TextAlignment = TextAlignment.Center; + btnMsg1.TextSize = 12; + btnMsg1.TextColor = UserCenterColor.Current.TextGrayColor1; + btnMsg1.TextID = R.MyInternationalizationString.uNotShardDeviceInAllRoomMsg; + bodyFrameLayout.AddChidren(btnMsg1); + } + }); + } + + /// <summary> + /// 娣诲姞鎴块棿琛� + /// </summary> + /// <param name="room"></param> + /// <param name="addLine"></param> + private void AddRoomRow(Common.Room room, bool addLine) + { + var row = new FrameRowControl(listView.rowSpace / 2); + row.MainKeys = room.Id; + listView.AddChidren(row); + //鍥炬爣 + var btnIcon = row.AddLeftIcon(81); + btnIcon.UnSelectedImagePath = "Item/RoomIcon.png"; + //鎴块棿鍚� + var btnName = row.AddLeftCaption(room.Name, 650); + btnName.TextSize = 15; + if (addLine == true) + { + //搴曠嚎 + row.AddBottomLine(); + } + row.ButtonClickEvent += (sender, e) => + { + var form = new AddNewSharedContentForm(); + form.AddForm(room, memberShardInfo); + }; + + + //閫夋嫨 + var btnSelect = row.AddMostRightEmptyIcon(69, 69); + btnSelect.UnSelectedImagePath = "Item/ItemUnSelected.png"; + btnSelect.SelectedImagePath = "Item/ItemSelected.png"; + row.ChangedChidrenBindMode(btnSelect, ChidrenBindMode.NotBind); + btnSelect.ButtonClickEvent += (sender, e) => + { + if (btnSelect.IsSelected == true) + { + btnSelect.IsSelected = false; + dicSelectRoom.Remove(room.Id); + if (dicSelectRoom.Count == 0) + { + btnShard.Visible = false; + } + } + else + { + btnSelect.IsSelected = true; + dicSelectRoom[room.Id] = room; + if (btnShard.Visible == false) + { + btnShard.Visible = true; + } + } + }; + } + + #endregion + + #region 鈻� 鍒嗕韩鎸囧畾鍖哄煙_______________________ + + /// <summary> + /// 鎵ц鍒嗕韩鎸囧畾鍖哄煙 + /// </summary> + /// <param name="room">鎸囧畾瑕佸垎浜殑鎴块棿</param> + public void DoSharedContentByRoom(List<Common.Room> listRoom) + { + //鑾峰彇闇�瑕佷笂浼犵殑璁惧(鎸夋埧闂碙ist椤哄簭鍒嗙粍) + var dicDevice = new Dictionary<int, List<CommonDevice>>(); + //鑾峰彇闇�瑕佷笂浼犵殑鍦烘櫙,杩欎釜涓滆タ涓嶈鑾峰彇瀹冪殑缁戝畾鐩爣(鎸夋埧闂碙ist椤哄簭鍒嗙粍) + var dicScene = new Dictionary<int, List<Common.SceneUI>>(); + //鑾峰彇闇�瑕佷笂浼犵殑鎴块棿鏁版嵁 + int fileCount = this.GetUpLoadRoomData(listRoom, dicDevice, dicScene); + + var listCheckFile = new HashSet<string>(); + HdlThreadLogic.Current.RunThread(async () => + { + //鎵撳紑杩涘害鏉� + this.ShowProgressBar(); + + for (int index = 0; index < listRoom.Count; index++) + { + //鎵ц涓婁紶 + var result = await HdlShardLogic.Current.DoUploadSharedContent(memberShardInfo, listRoom[index], dicDevice[index], dicScene[index], fileCount, listCheckFile); + if (result == false) + { + break; + } + } + //鍏抽棴杩涘害鏉� + this.CloseProgressBar(); + + //涓嶇鎴愬姛杩樻槸澶辫触,閮藉埛鏂扮晫闈� + Application.RunOnMainThread(() => + { + if (this.Parent != null) + { + //閲嶆柊鍒锋柊鐣岄潰 + this.InitMiddleFrame(); + } + }); + }); + } + + /// <summary> + /// 鑾峰彇闇�瑕佷笂浼犵殑鎴块棿鏁版嵁 + /// </summary> + /// <param name="listRoom">闇�瑕佷笂浼犵殑鎴块棿鍒楄〃</param> + /// <param name="dicDevice">鑾峰彇闇�瑕佷笂浼犵殑璁惧(鎸夋埧闂碙ist椤哄簭鍒嗙粍)</param> + /// <param name="dicScene">鑾峰彇闇�瑕佷笂浼犵殑鍦烘櫙,杩欎釜涓滆タ涓嶈鑾峰彇瀹冪殑缁戝畾鐩爣(鎸夋埧闂碙ist椤哄簭鍒嗙粍)</param> + /// <returns></returns> + private int GetUpLoadRoomData(List<Common.Room> listRoom, Dictionary<int, List<CommonDevice>> dicDevice, Dictionary<int, List<Common.SceneUI>> dicScene) + { + var listAllFile = new HashSet<string>(); + for (int i = 0; i < listRoom.Count; i++) + { + //鎸夋埧闂碙ist椤哄簭鍒嗙粍鐨勮澶囧垪琛� + var listDevice = new List<CommonDevice>(); + dicDevice[i] = listDevice; + //鎸夋埧闂碙ist椤哄簭鍒嗙粍鐨勫満鏅垪琛� + var listScene = new List<Common.SceneUI>(); + dicScene[i] = listScene; + + //鑾峰彇鎴块棿鍏ㄩ儴璁惧 + foreach (var deviceUi in listRoom[i].DeviceUIList) + { + var device = deviceUi.CommonDevice; + if (device == null || memberShardInfo.dicAllShardKeys.ContainsKey(device.FilePath) == true) + { + //寮傚父 + continue; + } + string deviceFile = device.FilePath; + if (memberShardInfo.dicAllShardKeys.ContainsKey(deviceFile) == false) + { + //鎴栬�呭凡缁忓垎浜簡鐨勶紝涓嶅啀鏄剧ず + listDevice.Add(device); + if (listAllFile.Contains(deviceFile) == false) + { + listAllFile.Add(deviceFile); + } + } + } + + //鑾峰彇鍦烘櫙閲岄潰宓屽鐨勫瓙璁惧鍜屽瓙鍦烘櫙(璁$畻鎬绘暟鐢�) + var listCheck = new HashSet<string>(); + var listChirdDevice = new List<CommonDevice>(); + var listChirdScene = new List<Common.SceneUI>(); + //鑾峰彇鎴块棿鍏ㄩ儴鍦烘櫙 + foreach (var sceneUi in listRoom[i].SceneUIList) + { + if (sceneUi == null || memberShardInfo.dicAllShardKeys.ContainsKey(sceneUi.FileName) == true) + { + //寮傚父锛屾垨鑰呭凡缁忓垎浜簡鐨勶紝涓嶅啀鏄剧ず + continue; + } + listScene.Add(sceneUi); + //浠庣紦瀛樿幏鍙栧満鏅殑鎵ц鐩爣(杩欎釜鍑芥暟鏄绠楁�绘暟鐢�) + HdlShardLogic.Current.GetSceneDeviceList(sceneUi, listCheck, listChirdScene, listChirdDevice); + if (listAllFile.Contains(sceneUi.FileName) == false) + { + listAllFile.Add(sceneUi.FileName); + } + } + foreach (var device in listChirdDevice) + { + //宓屽瀛愯澶囩殑鏂囦欢鍚嶅瓧(璁$畻鎬绘暟鐢�) + string deviceFile = device.FilePath; + if (listAllFile.Contains(deviceFile) == false) + { + listAllFile.Add(deviceFile); + } + } + foreach (var secene in listChirdScene) + { + //宓屽瀛愬満鏅殑鏂囦欢鍚嶅瓧(璁$畻鎬绘暟鐢�) + if (listAllFile.Contains(secene.FileName) == false) + { + listAllFile.Add(secene.FileName); + } + } + //鎴块棿鏂囦欢 + listAllFile.Add(listRoom[i].FileName); + } + //濡傛灉鏈夋ゼ灞傜殑璇� + if (Common.Config.Instance.Home.FloorDics.Count > 0) + { + return listAllFile.Count + 1; + } + return listAllFile.Count; + } + + #endregion + + #region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________ + + /// <summary> + /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠� + /// </summary> + public override int FormActionAgainEvent() + { + //閲嶆柊鍒锋柊鐣岄潰 + this.InitMiddleFrame(); + return 1; + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 妫�娴嬭鎴块棿鑳藉惁鏄剧ず + /// </summary> + /// <param name="room"></param> + /// <returns></returns> + private bool CheckCanShowRow(Common.Room room) + { + if (room.DeviceUIList.Count == 0 && room.SceneUIList.Count == 0) + { + return false; + } + if (room.IsLove == true) + { + return false; + } + if (memberShardInfo.dicShardRoom.ContainsKey(room.FileName) == false) + { + //娌℃湁杩欎釜鎴块棿 + return true; + } + foreach (var deviceUi in room.DeviceUIList) + { + if (deviceUi.CommonDevice == null) + { + continue; + } + if (memberShardInfo.dicAllShardKeys.ContainsKey(deviceUi.CommonDevice.FilePath) == false) + { + //瀛樺湪鏈垎浜殑璁惧鐨勮瘽锛屾鎴块棿鍙互鏄剧ず + return true; + } + } + foreach (var sceneUi in room.SceneUIList) + { + if (sceneUi == null) + { + continue; + } + if (memberShardInfo.dicAllShardKeys.ContainsKey(sceneUi.FileName) == false) + { + //瀛樺湪鏈垎浜殑鍦烘櫙鐨勮瘽锛屾鎴块棿鍙互鏄剧ず + return true; + } + } + return false; + } + + #endregion + + #region 鈻� 缁撴瀯浣揰____________________________ + + /// <summary> + /// 鎺ユ敹鍒嗕韩鏁版嵁 + /// </summary> + private class MemberShardInfoResult + { + /// <summary> + /// 鏂囦欢鍚嶅瓧 + /// </summary> + public string ShareName = string.Empty; + /// <summary> + /// 涓婚敭 + /// </summary> + public string DistributedMark = string.Empty; + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedListRoomForm.cs deleted file mode 100755 index a633d1a..0000000 --- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedListRoomForm.cs +++ /dev/null @@ -1,299 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; -using ZigBee.Device; - -namespace Shared.Phone.UserCenter.SharedContent -{ - /// <summary> - /// 閰嶇疆鏂板叡浜唴瀹圭殑涓荤晫闈� - /// </summary> - public class ConfigureNewSharedListRoomForm : EditorCommonForm - { - #region 鈻� 鍙橀噺澹版槑___________________________ - - /// <summary> - /// 鍒楄〃鎺т欢 - /// </summary> - private VerticalScrolViewLayout listView = null; - /// <summary> - /// 鎴愬憳淇℃伅 - /// </summary> - private MemberInfoRes memberResult = null; - /// <summary> - /// 鎴愬憳鐨勫垎浜暟鎹� - /// </summary> - private MemberShardInfoData memberShardInfo = null; - - #endregion - - #region 鈻� 鍒濆鍖朹____________________________ - - /// <summary> - /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) - /// </summary> - /// <param name="i_memberResult">鎴愬憳淇℃伅</param> - /// <param name="i_memberShardInfo">鎴愬憳鐨勫叡浜俊鎭�</param> - public void ShowForm(MemberInfoRes i_memberResult, MemberShardInfoData i_memberShardInfo) - { - this.memberResult = i_memberResult; - this.memberShardInfo = i_memberShardInfo; - this.memberShardInfo.SubAccountDistributedMark = this.memberResult.SubAccountDistributedMark; - - //璁剧疆澶撮儴淇℃伅 - base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddShared)); - - //鍒濆鍖栦腑閮ㄤ俊鎭� - //this.InitMiddleFrame(); - } - - ///// <summary> - ///// 鍒濆鍖栦腑閮ㄤ俊鎭� - ///// </summary> - //private void InitMiddleFrame() - //{ - // //娓呯┖bodyFrame - // this.ClearBodyFrame(); - - // //鍖哄煙鍒楄〃 - // var btnTitle = new NormalViewControl(1000, true); - // btnTitle.X = ControlCommonResourse.XXLeft; - // btnTitle.TextID = R.MyInternationalizationString.uAreaList; - // btnTitle.Y = Application.GetRealHeight(30); - // bodyFrameLayout.AddChidren(btnTitle); - - // this.listView = new VerticalScrolViewLayout(); - // listView.Y = btnTitle.Bottom + Application.GetRealHeight(30); - // listView.Height = bodyFrameLayout.Height - Application.GetRealHeight(30) - btnTitle.Bottom; - // bodyFrameLayout.AddChidren(listView); - - // HdlThreadLogic.Current.Run(() => - // { - // //鍒濆鍖栧尯鍩熷垪琛� - // this.InitAreaListRow(); - // }); - //} - - #endregion - - //#region 鈻� 鍖哄煙鍒楄〃___________________________ - - ///// <summary> - ///// 鍒濆鍖栧尯鍩熷垪琛� - ///// </summary> - //private void InitAreaListRow() - //{ - // bool hadShard = false; - // foreach (var room in Shared.Common.Room.Lists) - // { - // if (this.CheckCanShowRow(room) == false) - // { - // //妫�娴嬭兘鍚︽樉绀鸿鎴块棿 - // continue; - // } - // hadShard = true; - // Application.RunOnMainThread(() => - // { - // if (this.Parent != null) - // { - // this.AddRoomRow(room); - // } - // }); - // } - // if (hadShard == false) - // { - // Application.RunOnMainThread(() => - // { - // if (bodyFrameLayout != null) - // { - // bodyFrameLayout.RemoveAll(); - // //鍏ㄩ儴鍖哄煙鏃犲彲鍏变韩鐨勮澶� - // var btnMsg = new MsgViewControl(bodyFrameLayout.Width, false); - // btnMsg.Gravity = Gravity.CenterVertical; - // btnMsg.TextID = R.MyInternationalizationString.uNotShardDeviceInAllRoomMsg; - // bodyFrameLayout.AddChidren(btnMsg); - // } - // }); - // } - //} - - ///// <summary> - ///// 娣诲姞鎴块棿琛� - ///// </summary> - ///// <param name="room"></param> - //private void AddRoomRow(Common.Room room) - //{ - // var row = new StatuRowLayout(listView); - // //鎴块棿鍚� - // var btnName = new RowCenterView(false); - // btnName.Text = room.Name; - // row.AddChidren(btnName); - - // row.AddRightArrow(); - - // //鍒嗕韩 - // var btnShard = new RowEditorButton(); - // btnShard.TextID = R.MyInternationalizationString.uShared; - // row.AddRightView(btnShard); - // btnShard.MouseUpEventHandler += (sender, e) => - // { - // //纭畾鍏变韩璇ュ尯鍩燂紵 - // string msg = Language.StringByID(R.MyInternationalizationString.uConfirmShardRoomContent); - // this.ShowConfirmMsg(msg, "DoSharedContentByRoom", room); - // }; - - // row.MouseUpEvent += (sender, e) => - // { - // var form = new ConfigureNewSharedMainForm(); - // form.AddForm(room, memberResult, memberShardInfo); - // }; - //} - - ///// <summary> - ///// 妫�娴嬭鎴块棿鑳藉惁鏄剧ず - ///// </summary> - ///// <param name="room"></param> - ///// <returns></returns> - //private bool CheckCanShowRow(Common.Room room) - //{ - // if (room.DeviceUIList.Count == 0 && room.SceneUIList.Count == 0) - // { - // return false; - // } - // if (room.IsLove == true) - // { - // return false; - // } - // if (memberShardInfo.dicAllMemberShard.ContainsKey(room.FileName) == false) - // { - // //娌℃湁杩欎釜鎴块棿 - // return true; - // } - // var listCheck = memberShardInfo.dicAllMemberShard[room.FileName]; - // foreach (var deviceUi in room.DeviceUIList) - // { - // if (deviceUi.CommonDevice == null) - // { - // continue; - // } - // if (listCheck.Contains(deviceUi.CommonDevice.FilePath) == false) - // { - // //瀛樺湪鏈垎浜殑璁惧鐨勮瘽锛屾鎴块棿鍙互鏄剧ず - // return true; - // } - // } - // foreach (var sceneUi in room.SceneUIList) - // { - // if (sceneUi == null) - // { - // continue; - // } - // if (listCheck.Contains(sceneUi.FileName) == false) - // { - // //瀛樺湪鏈垎浜殑鍦烘櫙鐨勮瘽锛屾鎴块棿鍙互鏄剧ず - // return true; - // } - // } - // return false; - //} - - //#endregion - - //#region 鈻� 鍒嗕韩鎸囧畾鍖哄煙_______________________ - - ///// <summary> - ///// 鎵ц鍒嗗垎浜寚瀹氬尯鍩� - ///// </summary> - ///// <param name="room">鎸囧畾瑕佸垎浜殑鎴块棿</param> - //public void DoSharedContentByRoom(Common.Room room) - //{ - // if (memberShardInfo.dicAllMemberShard.ContainsKey(room.FileName) == false) - // { - // memberShardInfo.dicAllMemberShard[room.FileName] = new HashSet<string>(); - // } - // //閲嶅妫�娴嬬敤 - // var listCheck = memberShardInfo.dicAllMemberShard[room.FileName]; - // //鑾峰彇鍏ㄩ儴璁惧 - // var listDevice = new List<CommonDevice>(); - // foreach (var deviceUi in room.DeviceUIList) - // { - // var device = deviceUi.CommonDevice; - // if (device == null || listCheck.Contains(device.FilePath) == true) - // { - // //寮傚父锛屾垨鑰呭凡缁忓垎浜簡鐨勶紝涓嶅啀鏄剧ず - // continue; - // } - // listDevice.Add(device); - // } - // //鑾峰彇鍏ㄩ儴鍦烘櫙 - // var listScene = new List<Common.SceneUI>(); - // foreach (var sceneUi in room.SceneUIList) - // { - // if (sceneUi == null || listCheck.Contains(sceneUi.FileName) == true) - // { - // //寮傚父锛屾垨鑰呭凡缁忓垎浜簡鐨勶紝涓嶅啀鏄剧ず - // continue; - // } - // listScene.Add(sceneUi); - // } - - // HdlThreadLogic.Current.Run(async () => - // { - // //鎵ц涓婁紶 - // var result = await HdlShardLogic.Current.DoUploadSharedContent(memberShardInfo, room, listDevice, listScene); - // if (result == true) - // { - // //鍒嗕韩鎴愬姛 - // string msg = Language.StringByID(R.MyInternationalizationString.uShardSuccess); - // this.ShowMassage(msg); - - // Application.RunOnMainThread(() => - // { - // if (this.Parent != null) - // { - // //閲嶆柊鍒锋柊鐣岄潰 - // this.InitMiddleFrame(); - // } - // }); - // } - // }); - //} - - //#endregion - - //#region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________ - - ///// <summary> - ///// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠� - ///// </summary> - //public override void FormActionAgainEvent() - //{ - // //涓嶈鍒犻櫎杩欎釜鍑芥暟 - // base.FormActionAgainEvent(); - // //閲嶆柊鍒锋柊鐣岄潰 - // this.InitMiddleFrame(); - //} - - //#endregion - - //#region 鈻� 缁撴瀯浣揰____________________________ - - ///// <summary> - ///// 鎺ユ敹鍒嗕韩鏁版嵁 - ///// </summary> - //private class MemberShardInfoResult - //{ - // /// <summary> - // /// 鏂囦欢鍚嶅瓧 - // /// </summary> - // public string ShareName = string.Empty; - // /// <summary> - // /// 涓婚敭 - // /// </summary> - // public string DistributedMark = string.Empty; - //} - - //#endregion - } -} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedMainForm.cs deleted file mode 100755 index 3345b21..0000000 --- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/ConfigureNewSharedMainForm.cs +++ /dev/null @@ -1,352 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; -using ZigBee.Device; - -namespace Shared.Phone.UserCenter.SharedContent -{ - /// <summary> - /// 閰嶇疆鏂板叡浜唴瀹圭殑涓荤晫闈� - /// </summary> - public class ConfigureNewSharedMainForm : EditorCommonForm - { - #region 鈻� 鍙橀噺澹版槑___________________________ - - /// <summary> - /// 璁惧鍒楄〃鎺т欢 - /// </summary> - private VerticalScrolViewLayout listDeviceView = null; - /// <summary> - /// 鍦烘櫙鍒楄〃鎺т欢 - /// </summary> - private VerticalScrolViewLayout listSceneView = null; - /// <summary> - /// 鎴愬憳淇℃伅 - /// </summary> - private MemberInfoRes memberResult = null; - /// <summary> - /// 鎴愬憳鐨勫垎浜暟鎹� - /// </summary> - private MemberShardInfoData memberShardInfo = null; - /// <summary> - /// 鎴块棿瀵硅薄 - /// </summary> - private Common.Room room = null; - /// <summary> - /// Tab鐨勯�夋嫨銆�1锛氬姛鑳絋ab 2锛氬満鏅疶ab - /// </summary> - private int TabSelectIndex = 1; - - #endregion - - #region 鈻� 鍒濆鍖朹____________________________ - - /// <summary> - /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) - /// </summary> - /// <param name="i_room">鎴块棿瀵硅薄</param> - /// <param name="i_memberResult">鎴愬憳淇℃伅</param> - /// <param name="i_memberShardInfo">鎴愬憳鐨勫垎浜暟鎹�</param> - public void ShowForm(Common.Room i_room, MemberInfoRes i_memberResult, MemberShardInfoData i_memberShardInfo) - { - this.memberResult = i_memberResult; - this.memberShardInfo = i_memberShardInfo; - this.room = i_room; - - //璁剧疆澶撮儴淇℃伅 - base.SetTitleText(this.room.Name); - - //鍒嗕韩 - //var btnShard = new TopLayoutFinshView(); - //btnShard.TextID = R.MyInternationalizationString.uShared; - //topFrameLayout.AddChidren(btnShard); - //btnShard.MouseUpEventHandler += (sender, e) => - //{ - // HdlThreadLogic.Current.Run(() => - // { - // //纭鍒嗕韩 - // this.DoSaveSharedContent(); - // }); - //}; - - ////鍒濆鍖栦腑閮ㄤ俊鎭� - //this.InitMiddleFrame(); - } - - ///// <summary> - ///// 鍒濆鍖栦腑閮ㄤ俊鎭� - ///// </summary> - //private void InitMiddleFrame() - //{ - // //娓呯┖bodyFrame - // this.ClearBodyFrame(); - - // //鍒濆鍖朤ab鎺т欢 - // var frame = this.InitTabControl(); - - // this.listDeviceView = new VerticalScrolViewLayout(); - // listDeviceView.Y = frame.Bottom; - // listDeviceView.Height = bodyFrameLayout.Height - frame.Bottom; - // listDeviceView.Visible = this.TabSelectIndex == 1; - // bodyFrameLayout.AddChidren(listDeviceView); - - // this.listSceneView = new VerticalScrolViewLayout(); - // listSceneView.Y = frame.Bottom; - // listSceneView.Height = bodyFrameLayout.Height - frame.Bottom; - // listSceneView.Visible = this.TabSelectIndex == 2; - // bodyFrameLayout.AddChidren(listSceneView); - - // HdlThreadLogic.Current.Run(() => - // { - // //鍒濆鍖栧姛鑳絋ab鍒楄〃 - // this.InitFunctionTabList(); - // //鍒濆鍖栧満鏅疶ab鍒楄〃 - // this.InitSceneTabList(); - // }); - //} - - #endregion - - //#region 鈻� 鍒濆鍖朤ab鎺т欢______________________ - - ///// <summary> - ///// 鍒濆鍖朤ab鎺т欢 - ///// </summary> - ///// <returns></returns> - //private FrameLayout InitTabControl() - //{ - // //Tab鍒囨崲鎺т欢 - // var frameSwich = new FrameLayout(); - // frameSwich.Height = Application.GetRealHeight(150); - // frameSwich.BackgroundColor = UserCenterColor.Current.TopFrameLayout; - // bodyFrameLayout.AddChidren(frameSwich); - - // //鍔熻兘 - // var btnFunction = new NormalViewControl(frameSwich.Width / 2, Application.GetRealHeight(100)); - // btnFunction.Gravity = Gravity.CenterVertical; - // btnFunction.TextID = R.MyInternationalizationString.uFunction; - // btnFunction.TextAlignment = TextAlignment.Center; - // btnFunction.TextColor = UserCenterColor.Current.SelectTextColor; - // btnFunction.TextAlignment = TextAlignment.Center; - // frameSwich.AddChidren(btnFunction); - - // //鍦烘櫙 - // var btnScene = new NormalViewControl(frameSwich.Width / 2, Application.GetRealHeight(100)); - // btnScene.Gravity = Gravity.CenterVertical; - // btnScene.X = frameSwich.Width / 2; - // btnScene.TextID = R.MyInternationalizationString.uScence; - // btnScene.TextAlignment = TextAlignment.Center; - // frameSwich.AddChidren(btnScene); - - // //绾� - // var btnLine = new ProgressLine(); - // btnLine.Gravity = Gravity.BottomLeft; - // frameSwich.AddChidren(btnLine); - // btnLine.SetValue(50, true); - - // if (this.TabSelectIndex == 2) - // { - // btnScene.TextColor = UserCenterColor.Current.SelectTextColor; - // btnFunction.TextColor = Common.ZigbeeColor.Current.TextColor; - // btnLine.SetValue(50, false); - // } - - // //鍔熻兘Tab - // btnFunction.MouseUpEventHandler += (sender, e) => - // { - // if (this.TabSelectIndex == 1) - // { - // return; - // } - // btnScene.TextColor = Common.ZigbeeColor.Current.TextColor; - // btnFunction.TextColor = UserCenterColor.Current.SelectTextColor; - // btnLine.SetValue(50); - // this.TabSelectIndex = 1; - - // //闅愯棌鍦烘櫙鍒楄〃鎺т欢,鏄剧ず璁惧鍒楄〃鎺т欢 - // this.listSceneView.Visible = false; - // this.listDeviceView.Visible = true; - // }; - - // //鍦烘櫙Tab - // btnScene.MouseUpEventHandler += (sender, e) => - // { - // if (this.TabSelectIndex == 2) - // { - // return; - // } - // btnScene.TextColor = UserCenterColor.Current.SelectTextColor; - // btnFunction.TextColor = Common.ZigbeeColor.Current.TextColor; - // btnLine.SetValue(50, false); - // this.TabSelectIndex = 2; - - // //闅愯棌璁惧鍒楄〃鎺т欢,鏄剧ず鍦烘櫙鍒楄〃鎺т欢 - // this.listDeviceView.Visible = false; - // this.listSceneView.Visible = true; - // }; - - // return frameSwich; - //} - - //#endregion - - //#region 鈻� 鏄剧ず鍔熻兘Tab鍒楄〃____________________ - - ///// <summary> - ///// 鍒濆鍖栧姛鑳絋ab鍒楄〃 - ///// </summary> - //private void InitFunctionTabList() - //{ - // if (memberShardInfo.dicAllMemberShard.ContainsKey(this.room.FileName) == false) - // { - // memberShardInfo.dicAllMemberShard[this.room.FileName] = new HashSet<string>(); - // } - // var listCheck = memberShardInfo.dicAllMemberShard[this.room.FileName]; - - // foreach (var deviceUi in this.room.DeviceUIList) - // { - // var device = deviceUi.CommonDevice; - // if (device == null || listCheck.Contains(device.FilePath) == true) - // { - // //寮傚父锛屾垨鑰呭凡缁忓垎浜簡鐨勶紝涓嶅啀鏄剧ず - // continue; - // } - // Application.RunOnMainThread(() => - // { - // if (this.listDeviceView != null) - // { - // //娣诲姞璁惧琛� - // var deviceRow = new DeviceSelectControl(device); - // this.listDeviceView.AddChidren(deviceRow); - // deviceRow.InitControl(); - // //涓嶉渶瑕佹埧闂存帶浠� - // deviceRow.RemoveRoomControl(); - // } - // }); - // } - //} - - //#endregion - - //#region 鈻� 鏄剧ず鍦烘櫙Tab鍒楄〃____________________ - - ///// <summary> - ///// 鍒濆鍖栧満鏅疶ab鍒楄〃 - ///// </summary> - //private void InitSceneTabList() - //{ - // if (memberShardInfo.dicAllMemberShard.ContainsKey(this.room.FileName) == false) - // { - // memberShardInfo.dicAllMemberShard[this.room.FileName] = new HashSet<string>(); - // } - // var listCheck = memberShardInfo.dicAllMemberShard[this.room.FileName]; - - // foreach (var sceneUi in this.room.SceneUIList) - // { - // if (sceneUi == null || listCheck.Contains(sceneUi.FileName) == true) - // { - // //寮傚父锛屾垨鑰呭凡缁忓垎浜簡鐨勶紝涓嶅啀鏄剧ず - // continue; - // } - // Application.RunOnMainThread(() => - // { - // if (this.listSceneView != null) - // { - // //娣诲姞鍦烘櫙琛� - // var sceneRow = new SceneSelectRow(this.listSceneView, sceneUi); - // } - // }); - // } - //} - - //#endregion - - //#region 鈻� 鑾峰彇閫夋嫨鐨勮澶嘷____________________ - - ///// <summary> - ///// 鑾峰彇閫夋嫨鐨勮澶� - ///// </summary> - ///// <param name="listCheck">閲嶅妫�娴�</param> - ///// <returns></returns> - //private List<CommonDevice> GetSelectedDevice(HashSet<string> listCheck) - //{ - // var listDevice = new List<CommonDevice>(); - // for (int i = 0; i < listDeviceView.ChildrenCount; i++) - // { - // var myView = listDeviceView.GetChildren(i); - // var selectRow = (DeviceSelectControl)myView; - // if (selectRow.IsSelected == true && listCheck.Contains(selectRow.device.FilePath) == false) - // { - // listCheck.Add(selectRow.device.FilePath); - // listDevice.Add(selectRow.device); - // } - // } - // return listDevice; - //} - - //#endregion - - //#region 鈻� 鑾峰彇閫夋嫨鐨勫満鏅痏____________________ - - ///// <summary> - ///// 鑾峰彇閫夋嫨鐨勫満鏅� - ///// </summary> - ///// <param name="listCheck">閲嶅妫�娴�</param> - ///// <returns></returns> - //private List<Common.SceneUI> GetSelectedSceneUI(HashSet<string> listCheck) - //{ - // var listSceneUI = new List<Common.SceneUI>(); - // for (int i = 0; i < listSceneView.ChildrenCount; i++) - // { - // var myView = listSceneView.GetChildren(i); - // var selectRow = (SceneSelectRow)myView; - // if (selectRow.IsSelected == true && listCheck.Contains(selectRow.sceneUI.Id.ToString()) == false) - // { - // listCheck.Add(selectRow.sceneUI.Id.ToString()); - // listSceneUI.Add(selectRow.sceneUI); - // } - // } - // return listSceneUI; - //} - - //#endregion - - //#region 鈻� 纭鍒嗕韩___________________________ - - ///// <summary> - ///// 纭鍒嗕韩 - ///// </summary> - //private async void DoSaveSharedContent() - //{ - // var listCheck = new HashSet<string>(); - // //閫夋嫨鐨勮澶� - // var listSelectDevice = this.GetSelectedDevice(listCheck); - // //閫夋嫨鐨勫満鏅� - // var listSelectScene = this.GetSelectedSceneUI(listCheck); - // if (listSelectDevice.Count == 0 && listSelectScene.Count == 0) - // { - // //璇烽�夋嫨鐩爣鍚庡啀鎵ц鍒嗕韩鎿嶄綔 - // string msg = Language.StringByID(R.MyInternationalizationString.uNotSelectDeviceBeforeSave); - // this.ShowErrorMsg(msg); - // return; - // } - // //鎵ц涓婁紶鍒嗕韩鍐呭 - // var result = await HdlShardLogic.Current.DoUploadSharedContent(memberShardInfo, this.room, listSelectDevice, listSelectScene); - // if (result == true) - // { - // Application.RunOnMainThread(() => - // { - // //閲嶆柊鍒锋柊鐣岄潰 - // this.InitMiddleFrame(); - // //鍒嗕韩鎴愬姛 - // string msg = Language.StringByID(R.MyInternationalizationString.uShardSuccess); - // this.ShowMassage(msg); - // }); - // } - //} - - //#endregion - - } -} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs similarity index 99% rename from ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedMainForm.cs rename to ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs index 9e8b9cd..fe50a89 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedMainForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs @@ -9,7 +9,7 @@ /// <summary> /// 鏌ョ湅宸查厤缃叡浜唴瀹圭殑涓荤晫闈� /// </summary> - public class SearchConfigureSharedMainForm : EditorCommonForm + public class LookSharedContentForm : EditorCommonForm { #region 鈻� 鍙橀噺澹版槑___________________________ diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs new file mode 100755 index 0000000..ef235e2 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs @@ -0,0 +1,354 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using ZigBee.Device; + +namespace Shared.Phone.UserCenter.SharedContent +{ + /// <summary> + /// 鏌ョ湅宸插叡浜唴瀹圭殑鎴块棿鍒楄〃鐣岄潰鈽� + /// </summary> + public class LookSharedListRoomForm : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鍒楄〃鎺т欢 + /// </summary> + private VerticalFrameControl listView = null; + /// <summary> + /// 鎴愬憳淇℃伅 + /// </summary> + private MemberInfoRes memberResult = null; + /// <summary> + /// 鎴愬憳鐨勫垎浜暟鎹� + /// </summary> + private MemberShardInfoData memberShardInfo = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_memberResult">鎴愬憳淇℃伅</param> + /// <param name="i_memberShardInfo">鎴愬憳鐨勫叡浜俊鎭�</param> + public void ShowForm(MemberInfoRes i_memberResult, MemberShardInfoData i_memberShardInfo) + { + this.memberResult = i_memberResult; + this.memberShardInfo = i_memberShardInfo; + this.memberShardInfo.SubAccountDistributedMark = this.memberResult.SubAccountDistributedMark; + + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uShared2)); + + //娣诲姞鍥炬爣 + var btnAdd = new MostRightIconControl(69, 69); + btnAdd.UnSelectedImagePath = "Item/Add.png"; + btnAdd.ButtonClickEvent += (sender, e) => + { + var form = new AddNewSharedListRoomForm(); + form.AddForm(this.memberResult, this.memberShardInfo); + }; + topFrameLayout.AddChidren(btnAdd); + btnAdd.InitControl(); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + HdlThreadLogic.Current.RunThread(async () => + { + //鑾峰彇鎴愬憳鐨勫叡浜垪琛� + var result = await HdlShardLogic.Current.GetMemberShardContentListAndSetToLocation(memberShardInfo); + if (result == false) + { + //鏄剧ず閲嶆柊鍔犺浇鐨勭晫闈� + this.ShowReLoadView(); + return; + } + //浠庢湰鍦拌幏鍙栨垚鍛樼殑鍒嗕韩鍒楄〃 + HdlShardLogic.Current.GetMemberShardContentListFromLocal(memberShardInfo); + //鍒濆鍖栧尯鍩熷垪琛� + this.InitAreaListRow(); + + }); + } + + #endregion + + #region 鈻� 鍖哄煙鍒楄〃___________________________ + + /// <summary> + /// 鍒濆鍖栧尯鍩熷垪琛� + /// </summary> + private void InitAreaListRow() + { + if (memberShardInfo.dicShardRoom.Count == 0) + { + HdlThreadLogic.Current.RunMain(() => + { + //鏄剧ず娌℃湁鍒嗕韩鏁版嵁妯″紡 + this.ShowNotShardMode(); + }); + } + else + { + //鍚堝苟鍚屼竴妤煎眰鐨勬埧闂� + var dicGroup = new Dictionary<string, List<Common.Room>>(); + foreach (var room in memberShardInfo.dicShardRoom.Values) + { + if (dicGroup.ContainsKey(room.FloorId) == false) + { + dicGroup[room.FloorId] = new List<Common.Room>(); + } + dicGroup[room.FloorId].Add(room); + } + + HdlThreadLogic.Current.RunMain(() => + { + bodyFrameLayout.RemoveAll(); + + this.listView = new VerticalFrameControl(29); + listView.Height = bodyFrameLayout.Height; + bodyFrameLayout.AddChidren(listView); + + //鎺掑簭妤煎眰 + var dicSort = Common.Room.CurrentRoom.GetFloorSortList(); + foreach (var floorId in dicSort.Keys) + { + if (dicGroup.ContainsKey(floorId) == true) + { + //娣诲姞鍚勮嚜妤煎眰鐨勬埧闂村垪琛� + this.AddRoomListRow(floorId, dicGroup[floorId]); + dicGroup.Remove(floorId); + } + } + //娣诲姞鍚勮嚜妤煎眰鐨勬埧闂村垪琛�(杩欓噷鏄寚瀹氭ゼ灞傚苟涓嶅湪鎺掑簭璁板綍閲岄潰鐨�) + foreach (var floorId in dicGroup.Keys) + { + this.AddRoomListRow(floorId, dicGroup[floorId]); + } + }); + } + } + + /// <summary> + /// 娣诲姞鎴块棿鍒楄〃琛� + /// </summary> + /// <param name="listRoom"></param> + private void AddRoomListRow(string floorId, List<Common.Room> listRoom) + { + var frameBack = new FrameListControl(29); + frameBack.BackgroundColor = UserCenterColor.Current.White; + frameBack.Height = 10; + this.listView.AddChidrenFrame(frameBack); + + //妤煎眰 + if (string.IsNullOrEmpty(floorId) == false) + { + var btnFloor = new NormalViewControl(800, 60, true); + btnFloor.X = ControlCommonResourse.XXLeft; + btnFloor.Y = Application.GetRealHeight(52); + btnFloor.TextColor = UserCenterColor.Current.TextColor2; + btnFloor.TextSize = 15; + frameBack.AddChidren(btnFloor); + if (memberShardInfo.dicShardFloor.ContainsKey(floorId) == true) + { + btnFloor.Text = memberShardInfo.dicShardFloor[floorId]; + } + else if (floorId == "Other") + { + //鏈垎閰嶅尯鍩� + btnFloor.Text = Language.StringByID(R.MyInternationalizationString.uDeviceNotAssignedRoom); + } + else + { + btnFloor.Text = "UnKnown"; + } + } + //鎴块棿鎺掑簭 + var listSortRoom = Common.Room.CurrentRoom.GetFloorSortRoom(floorId, false); + var listSort = new HashSet<string>(); + foreach (var room in listSortRoom) + { + //鏀堕泦鐜版湁鐨勬帓搴廔D + listSort.Add(room.Id); + } + var dicRoom = new Dictionary<string, Common.Room>(); + foreach (var room in listRoom) + { + //淇濆瓨闇�瑕佹樉绀哄嚭鏉ョ殑鎴块棿 + dicRoom[room.Id] = room; + if (listSort.Contains(room.Id) == false) + { + //涓嶅啀鎺掑簭璁板綍鍐�,鍒欏湪灏鹃儴杩藉姞 + listSort.Add(room.Id); + } + } + + foreach(var roomId in listSort) + { + if (dicRoom.ContainsKey(roomId) == false) + { + continue; + } + var room = dicRoom[roomId]; + dicRoom.Remove(roomId); + + var frameRow = new RowLayoutControl(frameBack.rowSpace / 2); + frameBack.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 (dicRoom.Count != 0) + { + //搴曠嚎 + frameRow.frameTable.AddBottomLine(); + } + frameRow.frameTable.ButtonClickEvent += (sender, e) => + { + }; + + //鍒犻櫎 + 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) => + { + //纭鍒犻櫎鍏变韩鎴块棿锛� + string msg = Language.StringByID(R.MyInternationalizationString.uDeleteShardRoomMsg); + this.ShowMassage(ShowMsgType.Confirm, msg, () => + { + //鍒犻櫎鍏变韩鍖哄煙 + this.DoDeleteShardContentByRoom(room); + }); + }; + } + //璋冩暣瀛愭帶浠禙rame楂樺害 + this.listView.AdjustChidrenFrameHeight(frameBack, Application.GetRealHeight(29)); + } + #endregion + + #region 鈻� 鍒犻櫎鍏变韩鍖哄煙_______________________ + + /// <summary> + /// 鍒犻櫎鍏变韩鍖哄煙 + /// </summary> + /// <param name="room">鎸囧畾瑕佸垹闄ょ殑鍏变韩鍖哄煙</param> + public void DoDeleteShardContentByRoom(Common.Room room) + { + //鑾峰彇鍏ㄩ儴璁惧 + var listDevice = new List<CommonDevice>(); + foreach (var deviceUi in room.DeviceUIList) + { + var device = deviceUi.CommonDevice; + if (device == null) + { + string deviceFile = deviceUi.FileName.Replace("DeviceUI_", string.Empty); + var byteData = HdlShardLogic.Current.GetShardFileContent(deviceFile); + if (byteData == null) + { + continue; + } + device = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice>(System.Text.Encoding.UTF8.GetString(byteData)); + } + listDevice.Add(device); + } + //鑾峰彇鍏ㄩ儴鍦烘櫙 + var listScene = new List<Common.SceneUI>(); + foreach (var sceneUi in room.SceneUIList) + { + listScene.Add(sceneUi); + } + + HdlThreadLogic.Current.RunThread(async () => + { + //鎵ц鍒犻櫎 + var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, room, listDevice, listScene); + if (result == true) + { + HdlThreadLogic.Current.RunMain(() => + { + //閲嶆柊鍒锋柊鐣岄潰 + this.InitMiddleFrame(); + }); + } + }); + } + + #endregion + + #region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________ + + /// <summary> + /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠� + /// </summary> + public override int FormActionAgainEvent() + { + //閲嶆柊鍒锋柊鐣岄潰 + this.InitMiddleFrame(); + return 1; + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 鏄剧ず娌℃湁鍒嗕韩鏁版嵁妯″紡 + /// </summary> + private void ShowNotShardMode() + { + bodyFrameLayout.RemoveAll(); + //鍥剧墖 + var btnPic = new PicViewControl(383, 279); + btnPic.Gravity = Gravity.CenterHorizontal; + btnPic.Y = Application.GetRealHeight(498); + btnPic.UnSelectedImagePath = "Item/NotShardPic.png"; + bodyFrameLayout.AddChidren(btnPic); + + //杩樻病鏈夊叡浜尯鍩熺粰鎴愬憳{0}鍙偣鍑诲彸涓婅鈥�+鈥濇坊鍔� + string msg = Language.StringByID(R.MyInternationalizationString.uNotShardComtentMsg); + string[] Arry = msg.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + var btnMsg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false); + btnMsg1.Y = Application.GetRealHeight(962); + btnMsg1.TextAlignment = TextAlignment.Center; + btnMsg1.TextSize = 12; + btnMsg1.TextColor = UserCenterColor.Current.TextGrayColor1; + btnMsg1.Text = Arry[0]; + bodyFrameLayout.AddChidren(btnMsg1); + if (Arry.Length > 1) + { + var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false); + btnMsg2.Y = btnMsg1.Bottom; + btnMsg2.TextAlignment = TextAlignment.Center; + btnMsg2.TextSize = 12; + btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor1; + btnMsg2.Text = Arry[1]; + bodyFrameLayout.AddChidren(btnMsg2); + } + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedListRoomForm.cs deleted file mode 100755 index fba4234..0000000 --- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedListRoomForm.cs +++ /dev/null @@ -1,517 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; -using ZigBee.Device; - -namespace Shared.Phone.UserCenter.SharedContent -{ - /// <summary> - /// 鏌ョ湅宸插叡浜唴瀹圭殑鎴块棿鍒楄〃鐣岄潰鈽� - /// </summary> - public class SearchConfigureSharedListRoomForm : EditorCommonForm - { - #region 鈻� 鍙橀噺澹版槑___________________________ - - /// <summary> - /// 鍒楄〃鎺т欢 - /// </summary> - private VerticalFrameControl listView = null; - /// <summary> - /// 鎴愬憳淇℃伅 - /// </summary> - private MemberInfoRes memberResult = null; - /// <summary> - /// 鎴愬憳鐨勫垎浜暟鎹� - /// </summary> - private MemberShardInfoData memberShardInfo = null; - - #endregion - - #region 鈻� 鍒濆鍖朹____________________________ - - /// <summary> - /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) - /// </summary> - /// <param name="i_memberResult">鎴愬憳淇℃伅</param> - /// <param name="i_memberShardInfo">鎴愬憳鐨勫叡浜俊鎭�</param> - public void ShowForm(MemberInfoRes i_memberResult, MemberShardInfoData i_memberShardInfo) - { - this.memberResult = i_memberResult; - this.memberShardInfo = i_memberShardInfo; - this.memberShardInfo.SubAccountDistributedMark = this.memberResult.SubAccountDistributedMark; - - //璁剧疆澶撮儴淇℃伅 - base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uShared2)); - - //娣诲姞鍥炬爣 - var btnAdd = new MostRightIconControl(69, 69); - btnAdd.UnSelectedImagePath = "Item/Add.png"; - btnAdd.ButtonClickEvent += (sender, e) => - { - var form = new ConfigureNewSharedListRoomForm(); - form.AddForm(this.memberResult, this.memberShardInfo); - }; - topFrameLayout.AddChidren(btnAdd); - btnAdd.InitControl(); - - //鍒濆鍖栦腑閮ㄤ俊鎭� - this.InitMiddleFrame(); - } - - /// <summary> - /// 鍒濆鍖栦腑閮ㄤ俊鎭� - /// </summary> - private void InitMiddleFrame() - { - //娓呯┖bodyFrame - this.ClearBodyFrame(); - - HdlThreadLogic.Current.RunThread(async () => - { - //鑾峰彇鎴愬憳鐨勫叡浜垪琛� - var result = await this.GetMemberShardContentListAndSetToLocation(); - if (result == false) - { - return; - } - //浠庢湰鍦拌幏鍙栨垚鍛樼殑鍒嗕韩鍒楄〃 - this.GetMemberShardContentListFromLocal(); - //鍒濆鍖栧尯鍩熷垪琛� - this.InitAreaListRow(); - - }); - } - - #endregion - - #region 鈻� 鍖哄煙鍒楄〃___________________________ - - /// <summary> - /// 鍒濆鍖栧尯鍩熷垪琛� - /// </summary> - private void InitAreaListRow() - { - if (memberShardInfo.dicShardRoom.Count == 0) - { - HdlThreadLogic.Current.RunMain(() => - { - //鏄剧ず娌℃湁鍒嗕韩鏁版嵁妯″紡 - this.ShowNotShardMode(); - }); - } - else - { - //鍚堝苟鍚屼竴妤煎眰鐨勬埧闂� - var dicGroup = new Dictionary<string, List<Common.Room>>(); - foreach (var room in memberShardInfo.dicShardRoom.Values) - { - if (dicGroup.ContainsKey(room.FloorId) == false) - { - dicGroup[room.FloorId] = new List<Common.Room>(); - } - dicGroup[room.FloorId].Add(room); - } - - HdlThreadLogic.Current.RunMain(() => - { - bodyFrameLayout.RemoveAll(); - - this.listView = new VerticalFrameControl(29); - listView.Height = bodyFrameLayout.Height; - bodyFrameLayout.AddChidren(listView); - - //娣诲姞鍚勮嚜妤煎眰鐨勬埧闂村垪琛� - foreach (var floorId in dicGroup.Keys) - { - this.AddRoomListRow(floorId, dicGroup[floorId]); - } - }); - } - } - - /// <summary> - /// 娣诲姞鎴块棿鍒楄〃琛� - /// </summary> - /// <param name="listRoom"></param> - private void AddRoomListRow(string floorId, List<Common.Room> listRoom) - { - var frameBack = new FrameListControl(29); - frameBack.BackgroundColor = UserCenterColor.Current.White; - frameBack.Height = 10; - this.listView.AddChidrenFrame(frameBack); - - //妤煎眰 - if (string.IsNullOrEmpty(floorId) == false) - { - var btnFloor = new NormalViewControl(800, 60, true); - btnFloor.X = ControlCommonResourse.XXLeft; - btnFloor.Y = Application.GetRealHeight(52); - btnFloor.TextColor = UserCenterColor.Current.TextColor2; - btnFloor.TextSize = 15; - frameBack.AddChidren(btnFloor); - if (memberShardInfo.dicShardFloor.ContainsKey(floorId) == true) - { - btnFloor.Text = memberShardInfo.dicShardFloor[floorId]; - } - else - { - btnFloor.Text = "UnKnown"; - } - } - - for (int i = 0; i < listRoom.Count; i++) - { - var room = listRoom[i]; - var frameRow = new RowLayoutControl(frameBack.rowSpace / 2); - frameBack.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 (i != listRoom.Count - 1) - { - //搴曠嚎 - frameRow.frameTable.AddBottomLine(); - } - frameRow.frameTable.ButtonClickEvent += (sender, e) => - { - }; - - //鍒犻櫎 - 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) => - { - //纭鍒犻櫎鍏变韩鎴块棿锛� - string msg = Language.StringByID(R.MyInternationalizationString.uDeleteShardRoomMsg); - this.ShowMassage(ShowMsgType.Confirm, msg, () => - { - //鍒犻櫎鍏变韩鍖哄煙 - this.DoDeleteShardContentByRoom(room); - }); - }; - } - //璋冩暣瀛愭帶浠禙rame楂樺害 - this.listView.AdjustChidrenFrameHeight(frameBack, Application.GetRealHeight(29)); - } - #endregion - - #region 鈻� 鍒犻櫎鍏变韩鍖哄煙_______________________ - - /// <summary> - /// 鍒犻櫎鍏变韩鍖哄煙 - /// </summary> - /// <param name="room">鎸囧畾瑕佸垹闄ょ殑鍏变韩鍖哄煙</param> - public void DoDeleteShardContentByRoom(Common.Room room) - { - //鑾峰彇鍏ㄩ儴璁惧 - var listDevice = new List<CommonDevice>(); - foreach (var deviceUi in room.DeviceUIList) - { - var device = deviceUi.CommonDevice; - if (device == null) - { - string deviceFile = deviceUi.FileName.Replace("DeviceUI_", string.Empty); - var byteData = HdlShardLogic.Current.GetShardFileContent(deviceFile); - if (byteData == null) - { - continue; - } - device = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice>(System.Text.Encoding.UTF8.GetString(byteData)); - } - listDevice.Add(device); - } - //鑾峰彇鍏ㄩ儴鍦烘櫙 - var listScene = new List<Common.SceneUI>(); - foreach (var sceneUi in room.SceneUIList) - { - listScene.Add(sceneUi); - } - - HdlThreadLogic.Current.RunThread(async () => - { - //鎵ц鍒犻櫎 - var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, room, listDevice, listScene); - if (result == true) - { - HdlThreadLogic.Current.RunMain(() => - { - //閲嶆柊鍒锋柊鐣岄潰 - this.InitMiddleFrame(); - }); - } - }); - } - - #endregion - - #region 鈻� 鑾峰彇鎴愬憳鍏变韩鍒楄〃___________________ - - /// <summary> - /// 鑾峰彇鎴愬憳鍏变韩鍒楄〃鐒跺悗淇濆瓨鍒版湰鍦� - /// </summary> - /// <returns></returns> - private async Task<bool> GetMemberShardContentListAndSetToLocation() - { - if (this.memberShardInfo.Refresh == false) - { - return true; - } - this.memberShardInfo.Refresh = false; - - //寮�鍚繘搴︽潯 - this.ShowProgressBar(); - - var infoPra = new - { - DistributedMark = memberResult.SubAccountDistributedMark, - HouseDistributedMark = Shared.Common.Config.Instance.HomeId, - IsOtherAccountControl = Common.Config.Instance.isAdministrator - }; - var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra); - if (result == null) - { - //鍏抽棴杩涘害鏉� - this.CloseProgressBar(ShowReLoadMode.YES); - return false; - } - var listData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ReceiveShardInfoResult>>(result); - //鍏堟竻绌哄叡浜枃浠跺す - HdlShardLogic.Current.ClearShardDirectory(); - - var listMark = new List<string>(); - foreach (var data in listData) - { - //鎬ц兘浼樺寲锛氬鏋滄湰鍦版嫢鏈夎繖涓枃浠剁殑璇�,鐩存帴浣跨敤閭d釜鏂囦欢 - string fileName = data.ShareName; - //璁板綍璧峰畠鐨勪富閿� - memberShardInfo.dicAllShardKeys[fileName] = data.DistributedMark; - - if (fileName.StartsWith("Room_") == true || fileName.StartsWith("Scene_") == true) - { - //鎴块棿鏂囦欢鍜屽満鏅枃浠堕渶瑕侀噸鏂板弽搴忓垪鍖� - listMark.Add(data.DistributedMark); - continue; - } - if (Shared.Common.Global.IsExistsByHomeId(fileName) == true) - { - //鍏朵粬鏂囦欢鐨勮瘽锛屽鏋滄湰鍦板瓨鍦紝鍒欎互鏈湴鏂囦欢涓哄噯 - HdlShardLogic.Current.AddShardFile(fileName); - continue; - } - listMark.Add(data.DistributedMark); - } - - //灏嗗垎浜殑鏁版嵁瀛樺叆鏈湴,杩斿洖鐨勬槸鏂囦欢鍚嶅瓧(寮傚父鏃惰繑鍥瀗ull) - var listFile = await HdlShardLogic.Current.SetShardFileToLocation(listMark); - if (listFile == null) - { - //鍏抽棴杩涘害鏉� - this.CloseProgressBar(ShowReLoadMode.YES); - return false; - } - //鍏抽棴杩涘害鏉� - this.CloseProgressBar(); - - return true; - } - - /// <summary> - /// 浠庢湰鍦拌幏鍙栨垚鍛樼殑鍒嗕韩鍒楄〃 - /// </summary> - private void GetMemberShardContentListFromLocal() - { - memberShardInfo.dicShardRoom = new Dictionary<string, Common.Room>(); - - var listFile = HdlShardLogic.Current.GetLocalAllShardFile(); - //璁惧鏂囦欢(鍒嗕韩鐨�,鑰屼笉鏄湰鍦扮殑) - var dicDeviceFile = new Dictionary<string, string>(); - //鍏堝垵濮嬪寲鎴块棿 - foreach (string fileName in listFile) - { - if (fileName.StartsWith("Room_") == true) - { - var byteData = HdlShardLogic.Current.GetShardFileContent(fileName); - if (byteData == null) - { - continue; - } - string valueData = System.Text.Encoding.UTF8.GetString(byteData); - var roomTemp = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.Room>(valueData); - memberShardInfo.dicShardRoom[fileName] = roomTemp; - - if (memberShardInfo.dicAllMemberShard.ContainsKey(fileName) == false) - { - memberShardInfo.dicAllMemberShard[fileName] = new HashSet<string>(); - } - } - else if (fileName.StartsWith("Device_") == true) - { - //璁惧鏂囦欢 - string[] MyArry = fileName.Split(new string[] { "_" }, StringSplitOptions.RemoveEmptyEntries); - if (MyArry.Length == 4) - { - string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(MyArry[2], Convert.ToInt32(MyArry[3])); - dicDeviceFile[mainKeys] = fileName; - } - } - } - - //璁剧疆鎴块棿閲岄潰璁惧鐨刄I瀵硅薄(鍥犱负杩欎釜涓滆タ鏄弽搴忓垪鍖栧嚭鏉ョ殑,璁惧UI瀵硅薄鏄笉搴忓垪鍖栧璞�) - foreach (var tempRoom in memberShardInfo.dicShardRoom.Values) - { - var listShard = memberShardInfo.dicAllMemberShard[tempRoom.FileName]; - listShard.Clear(); - //娣诲姞鎴块棿 - listShard.Add(tempRoom.FileName); - - //杩樺師璁惧瀵硅薄 - tempRoom.DeviceUIList.Clear(); - foreach (string uiPath in tempRoom.DeviceUIFilePathList) - { - string deviceFile = uiPath.Replace("DeviceUI_", string.Empty); - if (HdlShardLogic.Current.IsFileExists(deviceFile) == false) - { - continue; - } - tempRoom.DeviceUIList.Add(Common.LocalDevice.Current.GetDeviceUI(uiPath)); - //璁惧 - listShard.Add(deviceFile); - } - //杩樺師鍦烘櫙瀵硅薄 - tempRoom.SceneUIList.Clear(); - foreach (string uiPath in tempRoom.SceneUIFilePathList) - { - var byteData = HdlShardLogic.Current.GetShardFileContent(uiPath); - if (byteData == null) - { - continue; - } - string valueData = System.Text.Encoding.UTF8.GetString(byteData); - var tempUi = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.SceneUI>(valueData); - tempRoom.SceneUIList.Add(tempUi); - - //鍦烘櫙鐨勪富閿� - listShard.Add(tempUi.FileName); - //浠庡満鏅璞¢噷闈㈣幏鍙栧叏閮ㄧ殑缁戝畾鐩爣鐨勬枃浠跺悕瀛� - this.GetSceneBindFileName(tempUi, dicDeviceFile, ref listShard); - } - } - } - - /// <summary> - /// 浠庡満鏅璞¢噷闈㈣幏鍙栧叏閮ㄧ殑缁戝畾鐩爣鐨勬枃浠跺悕瀛� - /// </summary> - /// <param name="scene">鍦烘櫙</param> - /// <param name="dicDeviceFile">鍒嗕韩鐨勮澶囨枃浠�</param> - /// <param name="listFile">鏂囦欢鍒楄〃(閲岄潰瀛樼殑鏄澶嘦I鏂囦欢鍜岃澶囨枃浠跺拰鍦烘櫙鏂囦欢)</param> - private void GetSceneBindFileName(Common.SceneUI scene, Dictionary<string, string> dicDeviceFile, ref HashSet<string> listFile) - { - foreach (var data in scene.AddSceneMemberDataList) - { - //璁惧 - if (data.Type == 0) - { - var mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(data.DeviceAddr, data.Epoint); - if (dicDeviceFile.ContainsKey(mainKeys) == true && listFile.Contains(dicDeviceFile[mainKeys]) == false) - { - listFile.Add(dicDeviceFile[mainKeys]); - } - } - if (data.Type == 1) - { - var sceneTemp = new Common.SceneUI(); - sceneTemp.Id = data.ElseScenesId; - if (listFile.Contains(sceneTemp.FileName)) - { - listFile.Add(sceneTemp.FileName); - } - } - } - } - - #endregion - - #region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________ - - /// <summary> - /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠� - /// </summary> - public override int FormActionAgainEvent() - { - //閲嶆柊鍒锋柊鐣岄潰 - this.InitMiddleFrame(); - return 1; - } - - #endregion - - #region 鈻� 涓�鑸柟娉昣__________________________ - - /// <summary> - /// 鏄剧ず娌℃湁鍒嗕韩鏁版嵁妯″紡 - /// </summary> - private void ShowNotShardMode() - { - bodyFrameLayout.RemoveAll(); - //鍥剧墖 - var btnPic = new PicViewControl(383, 279); - btnPic.Gravity = Gravity.CenterHorizontal; - btnPic.Y = Application.GetRealHeight(498); - btnPic.UnSelectedImagePath = "Item/NotShardPic.png"; - bodyFrameLayout.AddChidren(btnPic); - - //杩樻病鏈夊叡浜尯鍩熺粰鎴愬憳{0}鍙偣鍑诲彸涓婅鈥�+鈥濇坊鍔� - string msg = Language.StringByID(R.MyInternationalizationString.uNotShardComtentMsg); - string[] Arry = msg.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); - var btnMsg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false); - btnMsg1.Y = Application.GetRealHeight(962); - btnMsg1.TextAlignment = TextAlignment.Center; - btnMsg1.TextSize = 12; - btnMsg1.TextColor = UserCenterColor.Current.TextGrayColor1; - btnMsg1.Text = Arry[0]; - bodyFrameLayout.AddChidren(btnMsg1); - if (Arry.Length > 1) - { - var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false); - btnMsg2.Y = btnMsg1.Bottom; - btnMsg2.TextAlignment = TextAlignment.Center; - btnMsg2.TextSize = 12; - btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor1; - btnMsg2.Text = Arry[1]; - bodyFrameLayout.AddChidren(btnMsg2); - } - } - - #endregion - - #region 鈻� 缁撴瀯浣揰____________________________ - - /// <summary> - /// 鎺ユ敹鍒嗕韩鏁版嵁 - /// </summary> - private class ReceiveShardInfoResult - { - /// <summary> - /// 鏂囦欢鍚嶅瓧 - /// </summary> - public string ShareName = string.Empty; - /// <summary> - /// 涓婚敭 - /// </summary> - public string DistributedMark = string.Empty; - } - - #endregion - } -} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs index 77ba2cb..cc179ac 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs @@ -22,6 +22,14 @@ /// 鐢ㄦ埛韬唤 /// </summary> private NormalViewControl btnAuthority = null; + /// <summary> + /// 鐢ㄦ埛澶村儚 + /// </summary> + private IconViewControl btnUserIcon = null; + /// <summary> + /// 鐨囧啝 + /// </summary> + private IconViewControl btnImperialCrown = null; #endregion @@ -99,7 +107,7 @@ private void InitUserInfoControl(FrameLayout frameWhite) { //鐢ㄦ埛澶村儚 - var btnUserIcon = new IconViewControl(280); + this.btnUserIcon = new IconViewControl(280); btnUserIcon.X = Application.GetRealWidth(121); btnUserIcon.UnSelectedImagePath = UserCenterResourse.UserInfo.UserIconFile; bodyFrameLayout.AddChidren(btnUserIcon); @@ -113,7 +121,7 @@ if (UserCenterResourse.UserInfo.AuthorityNo == 1) { //鐨囧啝 - var btnImperialCrown = new IconViewControl(60); + this.btnImperialCrown = new IconViewControl(60); btnImperialCrown.X = Application.GetRealWidth(346); btnImperialCrown.Y = Application.GetRealHeight(475); btnImperialCrown.UnSelectedImagePath = "Center/ImperialCrown.png"; @@ -121,7 +129,7 @@ } //鐢ㄦ埛鏄电О - btnUserName = new NormalViewControl(605, 60, true); + this.btnUserName = new NormalViewControl(605, 60, true); btnUserName.X = btnUserIcon.Right + Application.GetRealWidth(5); btnUserName.Y = Application.GetRealHeight(43); if (UserCenterResourse.UserInfo != null) @@ -403,8 +411,8 @@ /// </summary> public override int FormActionAgainEvent() { - //涓嶈鍒犻櫎杩欎釜鍑芥暟 - base.FormActionAgainEvent(); + //鐢ㄦ埛澶村儚 + btnUserIcon.UnSelectedImagePath = UserCenterResourse.UserInfo.UserIconFile; //鐢ㄦ埛鍚嶅瓧 btnUserName.Text = UserCenterResourse.UserInfo.UserName; if (UserCenterResourse.UserInfo != null) @@ -412,6 +420,19 @@ //鐢ㄦ埛韬唤 btnAuthority.Text = UserCenterResourse.UserInfo.AuthorityText; } + if (this.btnImperialCrown != null) + { + //鐨囧啝 + if (UserCenterResourse.UserInfo.AuthorityNo != 1) + { + this.btnImperialCrown.Visible = false; + } + else + { + this.btnImperialCrown.Visible = true; + } + } + //鍒濆鍖栦富鑿滃崟鐨勬帶浠� this.InitMainMenuInfoControl(frameWhiteBack); diff --git a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs index d67367f..7a30287 100755 --- a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs +++ b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs @@ -975,7 +975,7 @@ /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param> private void GoToAddGateWay(object sender, MouseEventArgs mouseEventArgs) { - var selectNewGateWayForm = new UserCenter.GatewayAdd.NewGateWaySelectForm { }; + var selectNewGateWayForm = new UserCenter.GatewayAdd.NewGateWayMenuSelectForm { }; selectNewGateWayForm.AddForm(selectNewGateWayForm); } @@ -1073,12 +1073,12 @@ { if ((sender as Button).IsSelected) { - Shared.Common.Room.GetLoveRoom().DeleteDevice(device.FileName); + Shared.Common.Room.CurrentRoom.GetLoveRoom().DeleteDevice(device.FileName); (sender as Button).IsSelected = false; } else { - Shared.Common.Room.GetLoveRoom().AddDevice(device.FileName); + Shared.Common.Room.CurrentRoom.GetLoveRoom().AddDevice(device.FileName); (sender as Button).IsSelected = true; } if (Room.CurrentRoom.IsLove) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs b/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs index 7354850..2ceaa14 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs @@ -281,7 +281,7 @@ public List<string> HomeFilePathList = new List<string> { }; public string HomeId = string.Empty; - + [Newtonsoft.Json.JsonIgnore] private House m_Home = null; /// <summary> diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Common/IStatus.cs b/ZigbeeApp/Shared/Phone/ZigBee/Common/IStatus.cs index 4c47bf0..4b5ed3c 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Common/IStatus.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Common/IStatus.cs @@ -13,11 +13,11 @@ void Changed(Device.CommonDevice common); /// <summary> /// 璁惧鐘舵�佹洿鏂版帴鍙� - /// <para>type锛氬鏋滀负 DeviceInComingRespon:璁惧鏂颁笂鎶�</para> - /// <para>type锛氬鏋滀负 IASInfoReport:RemoveDeviceRespon</para> - /// <para>type锛氬鏋滀负 DeviceStatusReport:璁惧涓婃姤</para> - /// <para>type锛氬鏋滀负 IASInfoReport:IAS瀹夐槻淇℃伅涓婃姤</para> - /// <para>type锛氬鏋滀负 OnlineStatusChange: 璁惧鍦ㄧ嚎鐘舵�佹洿鏂�</para> + /// <para>typeTag锛氬鏋滀负 DeviceInComingRespon:璁惧鏂颁笂鎶�</para> + /// <para>typeTag锛氬鏋滀负 IASInfoReport:RemoveDeviceRespon</para> + /// <para>typeTag锛氬鏋滀负 DeviceStatusReport:璁惧涓婃姤</para> + /// <para>typeTag锛氬鏋滀负 IASInfoReport:IAS瀹夐槻淇℃伅涓婃姤</para> + /// <para>typeTag锛氬鏋滀负 OnlineStatusChange: 璁惧鍦ㄧ嚎鐘舵�佹洿鏂�</para> /// </summary> void DeviceInfoChange(Device.CommonDevice common, string typeTag); diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs index c1bc636..bb3cf89 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs @@ -1,5 +1,6 @@ 锘縰sing System; using System.Collections.Generic; +using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -27,8 +28,32 @@ public List<Shared.Phone.UserCenter.MemberInfoRes> localAllAccountList = new List<Shared.Phone.UserCenter.MemberInfoRes> { }; public static int RemoteUnlockCount = 3;//杩滅▼寮�閿佹鏁伴檺鍒� public static string RemoteUnlockPassword = string.Empty;//杩滅▼寮�閿佸瘑鐮� + public static string LocalTempPassword = string.Empty;//鏈湴鐢熸垚鐨勪复鏃跺瘑鐮� public static DateTime maxValue = DateTime.MaxValue; public static DateTime minValue = DateTime.MinValue; + + + #region 涓存椂瀵嗙爜淇℃伅 + /// <summary> + /// 涓存椂瀵嗙爜鏈湴瀛樺偍瀵硅薄 + /// </summary> + public TempPasswordObj tempPasswordObj = new TempPasswordObj(); + /// <summary> + /// 涓存椂瀵嗙爜鏈湴瀵硅薄 + /// </summary> + [System.Serializable] + public class TempPasswordObj + { + /// <summary> + /// 闂ㄩ攣鏈夋晥鏃堕棿 + /// </summary> + public int validTime; + /// <summary> + /// 闂ㄩ攣鏃堕棿 + /// </summary> + public int times; + } + #endregion /// <summary> /// 闂ㄩ攣缂栫▼浜嬩欢閫氱煡 @@ -370,6 +395,7 @@ } #endregion + #region 涓庣綉鍏抽�氳鎺ュ彛 #region 闂ㄩ攣鎿嶄綔浜嬩欢閫氱煡 /// <summary> /// 闂ㄩ攣鎿嶄綔浜嬩欢閫氱煡 @@ -671,29 +697,137 @@ } #endregion - #region 涓存椂瀵嗙爜淇℃伅 + #region 鐭闂ㄩ攣鏃堕棿 /// <summary> - /// 涓存椂瀵嗙爜鏈湴瀛樺偍瀵硅薄 + /// 鐭闂ㄩ攣鏃堕棿 /// </summary> - public TempPasswordObj tempPasswordObj = new TempPasswordObj(); + /// <returns>The writable value async.</returns> + /// <param name="timestamp">鐭闂ㄩ攣鐨勬椂闂�</param> + public async System.Threading.Tasks.Task<SetWritableValueResponAllData> RectifyDoorLockTimeAsync(int timestamp) + { + 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", 10 }, { "Command", 120 } }; + var data = new JObject { { "Undivided", 0 }, { "AttributeId", 0 }, { "AttributeDataType", 226 }, { "AttributeData", timestamp } }; + 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 SetWritableValueResponAllData setWritableValueResponAllData; + /// <summary> + /// 缃戝叧鐗堟湰淇℃伅,缃戝叧鍙嶉淇℃伅 /// </summary> [System.Serializable] - public class TempPasswordObj + public class SetWritableValueResponAllData { /// <summary> - /// 闂ㄩ攣鏈夋晥鏃堕棿 + /// 閿欒淇℃伅 /// </summary> - public int validTime; + public string errorMessageBase; /// <summary> - /// 闂ㄩ攣鏃堕棿 + /// 缃戝叧淇℃伅閿欒鍙嶉 + /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para> /// </summary> - public int times; + public ErrorResponData errorResponData; + /// <summary> + /// 缃戝叧鐗堟湰淇℃伅 + /// </summary> + public SetWritableValueResponData setWritableValueResponData; + } + + /// <summary> + /// 璁剧疆鍙啓灞炴�х殑鍊肩殑鏁版嵁 + /// </summary> + [System.Serializable] + public class SetWritableValueResponData + { + /// <summary> + /// 閰嶇疆灞炴�ф墍鍦ㄧ殑cluster + /// </summary> + public int Cluster; + /// <summary> + /// 0锛氶厤缃垚鍔燂紙鑻ラ厤缃垚鍔燂紝涓嬮潰鐨凙ttributeId瀛楁涓嶅瓨鍦級 + ///<para>134锛氫笉鏀寔璇ュ睘鎬�</para> + ///<para>135锛氭棤鏁堢殑灞炴�у��</para> + ///<para>141锛氭棤鏁堢殑鏁版嵁绫诲瀷</para> + /// </summary> + public int Status; + } #endregion + #endregion - #region 绉佹湁鍛戒护 + #region 涓庤澶囬�氳鎺ュ彛锛堢鏈夊懡浠わ級 #region 鐢ㄦ埛绠$悊鎺у埗 ///<summary > @@ -1126,7 +1260,7 @@ tempD.command = Convert.ToInt32(data[10].ToString() + data[11].ToString() + data[12].ToString() + data[13].ToString(), 16); tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16); result = new ResponseAllData { responseData = tempD }; - System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0400_{ topic}"); + DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0400_{ topic}"); } } } @@ -1255,7 +1389,7 @@ tempD.command = Convert.ToInt32(data[10].ToString() + data[11].ToString() + data[12].ToString() + data[13].ToString(), 16); tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16); result = new TempPasswordResponseAllData { responseData = tempD }; - System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0400_{ topic}"); + DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0400_{ topic}"); } } } @@ -1318,20 +1452,35 @@ pawStr = pawStr.PadLeft(8, '0'); for (int i = 6; i >= 0; i = i - 2) { - passwordStr += passwordStr.Substring(i, 2); + passwordStr += pawStr.Substring(i, 2); } - var startTimeStr = System.Convert.ToString(GetUnixTimeStamp(startTime, false), 16); - var endTimeStr = System.Convert.ToString(GetUnixTimeStamp(endTime, false), 16); + double dStartTimeStr = startTime.ToOADate(); + Byte[] bStartTimeStr = BitConverter.GetBytes(dStartTimeStr); + StringBuilder sb = new StringBuilder(); + Array.Reverse(bStartTimeStr); + foreach (byte b in bStartTimeStr) + sb.AppendFormat("{0:x2}", b); + var startTimeStr = sb.ToString(); for (int i = 6; i >= 0; i = i - 2) { vaildTimeStr += startTimeStr.Substring(i, 2); - invalidTimeStr += endTimeStr.Substring(i, 2); + //invalidTimeStr += endTimeStr.Substring(i, 2); } + + //var startTimeStr = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetUnixTimeStamp(startTime); + //var endTimeStr = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetUnixTimeStamp(startTime); + //var startTimeInt = System.Convert.ToInt64(startTimeStr, 16).ToString(); + //var endTimeInt = System.Convert.ToInt64(endTimeStr, 16).ToString(); + + data = dataLength + dataComand1 + dataComand2 + dataSerialNum + addDataLength + passwordStr + vaildTimeStr + vaildTimeStr; } - catch { }; + catch (Exception ex) + { + var mess = ex.Message; + }; return data; } @@ -1734,30 +1883,6 @@ } #endregion - /// <summary> - /// 鑾峰彇浠庢牸鏋楀▉娌绘椂闂村埌褰撳墠鏌愪竴鏃跺埢鐨勬�绘绉掓暟 - /// </summary> - /// <param name="dateTime">鍖椾含鏃堕棿</param> - /// <param name="accurateToMilliseconds">绮剧‘鍒版绉掞紝鍚﹀埌绉�</param> - /// <returns>杩斿洖涓�涓暱鏁存暟鏃堕棿鎴�</returns> - public static long GetUnixTimeStamp(DateTime dateTime, bool accurateToMilliseconds) - { - DateTime startTime = TimeZoneInfo.ConvertTimeToUtc(new DateTime(1970, 1, 1, 8, 0, 0));//鍖椾含鎵�鍦ㄤ笢鍏尯 - DateTime endTime = TimeZoneInfo.ConvertTimeToUtc(dateTime); - return (long)(accurateToMilliseconds ? (endTime - startTime).TotalMilliseconds : (endTime - startTime).TotalSeconds); - } - - /// <summary> - /// 灏哢NIX鏃堕棿鎴宠浆涓哄寳浜椂闂� - /// </summary> - /// <param name="unixTimeStamp">鏃堕棿鎴�</param> - /// <param name="accurateToMilliseconds">绮剧‘鍒版绉�,浣涗负绉�</param> - /// <returns></returns> - public static DateTime GetLocalTime(int unixTimeStamp, bool accurateToMilliseconds) - { - DateTime startTime = TimeZoneInfo.ConvertTimeToUtc(new DateTime(1970, 1, 1, 8, 0, 0));//鍖椾含鎵�鍦ㄤ笢鍏尯 - return (accurateToMilliseconds ? startTime.AddMilliseconds(unixTimeStamp) : startTime.AddSeconds(unixTimeStamp)).ToLocalTime(); - } #endregion } } diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/Enum.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/Enum.cs index a5aa9a6..0ff39e6 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/Enum.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/Enum.cs @@ -56,7 +56,7 @@ /// <summary> /// 闂ㄩ攣鍔熻兘 /// </summary> - DoorLock = 257, + DoorLock = 10, /// <summary> /// IAS瀹夐槻鍔熻兘 /// </summary> diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs index 1997e16..08e348f 100755 --- a/ZigbeeApp/Shared/R.cs +++ b/ZigbeeApp/Shared/R.cs @@ -269,6 +269,17 @@ public readonly static int CLose = 182; public readonly static int Opening = 183; public readonly static int DoorLockOpen = 184; + public readonly static int Year = 185; + public readonly static int RectifySuccess = 186; + public readonly static int RectifyFailed = 187; + public readonly static int SetTempPasswordTip2 = 188; + public readonly static int SetTempPasswordTip3 = 189; + public readonly static int SetTempPasswordTip4 = 190; + public readonly static int SetTempPasswordTip5 = 191; + public readonly static int SetTempPasswordTip1 = 192; + + + public readonly static int RemindSetting = 548; public readonly static int AddNewUser = 650; @@ -531,330 +542,340 @@ - #region 鐧诲綍娉ㄥ唽 - /// <summary> - /// HDL Home - /// </summary> - public const int AppName = 10000; + #region 鐧诲綍娉ㄥ唽 + /// <summary> + /// HDL Home + /// </summary> + public const int AppName = 10000; + /// <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 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> + /// 娌℃湁鍦烘櫙 {\r\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; + /// <summary> + /// 缂栬緫鎴块棿 + /// </summary> + public const int EditRoom = 13105; + /// <summary> + /// 鎴块棿鍚嶇О + /// </summary> + public const int RoomName = 13106; + /// <summary> + /// 鎵�灞炴ゼ灞� + /// </summary> + public const int BelongFloor = 13107; + /// <summary> + /// 娓╁害 + /// </summary> + public const int Temperature = 13108; + /// <summary> + /// 婀垮害 + /// </summary> + public const int Humidity = 13109; + /// <summary> + /// 褰撳墠 + /// </summary> + public const int Current = 13110; + /// <summary> + /// 寮� + /// </summary> + public const int Open = 13111; + /// <summary> + /// 鍏� + /// </summary> + public const int Close = 13112; + /// <summary> + /// 涓嶅紑鍚� + /// </summary> + public const int NotOpen = 13113; + /// <summary> + /// 绉� + /// </summary> + public const int Second = 13114; + /// <summary> + /// 鍒嗛挓 + /// </summary> + public const int Minute = 13115; + /// <summary> + /// 灏忔椂 + /// </summary> + public const int Hour = 13116; + /// <summary> + /// 鏈垎閰� + /// </summary> + public const int Unallocated = 13117; + /// <summary> + /// 鍏ㄩ�� + /// </summary> + public const int AllSelect = 13118; + /// <summary> + /// 娣诲姞鍒� + /// </summary> + public const int AddTo = 13119; /// <summary> - /// 鎵嬫満鍙� - /// </summary> - public const int PhoneNum = 10100; + /// 璇ユ埧闂存槸鍒嗕韩杩囨潵鐨勶紝涓嶅厑璁歌繘琛岃鎿嶄綔 + /// </summary> + public const int TheRoomIsSharedNotAllowedToOperate = 13120; /// <summary> - /// 閭 + /// 杩樻病閫夋嫨鎴块棿锛岃鍏堥�夋嫨 /// </summary> - public const int Email = 10101; + public const int NotSelectZone = 13121; /// <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 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; + public const int SelectTimeForAction = 13122; + #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> - /// 娌℃湁鍦烘櫙 {\r\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; - /// <summary> - /// 缂栬緫鎴块棿 - /// </summary> - public const int EditRoom = 13105; - /// <summary> - /// 鎴块棿鍚嶇О - /// </summary> - public const int RoomName = 13106; - /// <summary> - /// 鎵�灞炴ゼ灞� - /// </summary> - public const int BelongFloor = 13107; - /// <summary> - /// 娓╁害 - /// </summary> - public const int Temperature = 13108; - /// <summary> - /// 婀垮害 - /// </summary> - public const int Humidity = 13109; - /// <summary> - /// 褰撳墠 - /// </summary> - public const int Current = 13110; - /// <summary> - /// 寮� - /// </summary> - public const int Open = 13111; - /// <summary> - /// 鍏� - /// </summary> - public const int Close = 13112; - /// <summary> - /// 涓嶅紑鍚� - /// </summary> - public const int NotOpen = 13113; - /// <summary> - /// 绉� - /// </summary> - public const int Second = 13114; - /// <summary> - /// 鍒嗛挓 - /// </summary> - public const int Minute = 13115; - /// <summary> - /// 灏忔椂 - /// </summary> - public const int Hour = 13116; - /// <summary> - /// 鏈垎閰� - /// </summary> - public const int Unallocated = 13117; - /// <summary> - /// 鍏ㄩ�� - /// </summary> - public const int AllSelect = 13118; - /// <summary> - /// 娣诲姞鍒� - /// </summary> - public const int AddTo = 13119; - - #endregion - - - - /// <summary> /// 鍠滅埍 @@ -862,414 +883,412 @@ public static readonly int Favorite = 100000; - public static readonly int OK = 10005; + public static readonly int OK = 10005; - public static readonly int AccountOrPasswordCanNotBeEmpty = 10006; + public static readonly int AccountOrPasswordCanNotBeEmpty = 10006; - public static readonly int IncorrectMailboxformat = 10008; - public static readonly int PasswordLengthIsLessThanSix = 10009; - + 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 ThePhoneNumberIsNotRegisteredYetPleaseRegisterFirst = 10017; - public static readonly int LoginCodeError = 10018; - public static readonly int ThisUserBelongsToDebugAccountAndIsNotEnabled = 10019; - public static readonly int PleaseGoToTheMailboxToConfirmThePasswordChange = 10020; - public static readonly int MailDeliveryFailedPleaseTryAgain = 10021; - public static readonly int TheAccountIsNotAuthorized = 10022; - public static readonly int Version = 10023; - public static readonly int QuitAccount = 10024; - public static readonly int InputNewPWD = 10025; - public static readonly int CurrentlyTheUserIshHouseIsEmptyPleaseBuildANewHouseFirst = 10026; - public static readonly int ResidentialNameCannotBeEmpty = 10027; - public static readonly int TheResidenceNameHasExist = 10028; - public static readonly int DelResidence = 10029; - public static readonly int PWDCannotBeNull = 10030; + 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 AddRoomBackgroundPicture = 10031; - public static readonly int TheRoomNameCannotBeNUll = 10032; - public static readonly int TheResidenceNameNull = 10033; + public static readonly int ThePhoneNumberIsNotRegisteredYetPleaseRegisterFirst = 10017; + public static readonly int LoginCodeError = 10018; + public static readonly int ThisUserBelongsToDebugAccountAndIsNotEnabled = 10019; + public static readonly int PleaseGoToTheMailboxToConfirmThePasswordChange = 10020; + + public static readonly int MailDeliveryFailedPleaseTryAgain = 10021; + public static readonly int TheAccountIsNotAuthorized = 10022; + public static readonly int Version = 10023; + public static readonly int QuitAccount = 10024; + public static readonly int InputNewPWD = 10025; + public static readonly int CurrentlyTheUserIshHouseIsEmptyPleaseBuildANewHouseFirst = 10026; + public static readonly int ResidentialNameCannotBeEmpty = 10027; + public static readonly int TheResidenceNameHasExist = 10028; + public static readonly int DelResidence = 10029; + public static readonly int PWDCannotBeNull = 10030; + + public static readonly int AddRoomBackgroundPicture = 10031; + public static readonly int TheRoomNameCannotBeNUll = 10032; + public static readonly int TheResidenceNameNull = 10033; - public static readonly int PleaseInputPhoneNumberOrEmail = 11000; - - //*****public static readonly int ForgotPassword = 11002; - + public static readonly int PleaseInputPhoneNumberOrEmail = 11000; - 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 ForgotPassword = 11002; - - public static readonly int PleaseInputVerificationCode = 11011; + + 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 PleaseInputVerificationCode = 11011; - public static readonly int BackToLogin = 11015; + public static readonly int BackToLogin = 11015; - 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 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 Logining = 11024; + public static readonly int Logining = 11024; - public static readonly int AddRoom = 11026; - + public static readonly int AddRoom = 11026; - 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 HadSameRoom = 11037; - //*****public static readonly int Function = 11038; + 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 HadSameRoom = 11037; + //*****public static readonly int Function = 11038; - public static readonly int Delete = 11041; - public static readonly int AddFunction = 11042; + public static readonly int Delete = 11041; + public static readonly int AddFunction = 11042; - 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 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 ConfirmAdd = 11052; + public static readonly int ConfirmAdd = 11052; - public static readonly int Add = 11054; - public static readonly int DeviceSetting = 11055; + public static readonly int Add = 11054; + public static readonly int DeviceSetting = 11055; - public static readonly int AddDeviceSuccess = 11058; + public static readonly int AddDeviceSuccess = 11058; - public static readonly int Device = 11060; - - public static readonly int ConfirmDeleteThisRoom = 11062; + public static readonly int Device = 11060; - - + public static readonly int ConfirmDeleteThisRoom = 11062; - public static readonly int NextStep = 11071; - public static readonly int SelectRoom = 11072; - public static readonly int SelectDevice = 11073; - - /// <summary> - /// 璋冨厜 - /// </summary> - public static readonly int Dimming = 11075; - public static readonly int ThisSceneHadTheDevice = 11076; - public static readonly int SceneNameCannotBeNull = 11077; - public static readonly int ModifyScene = 11078; - /// <summary> - /// 鏈縺娲� - /// </summary> - public static readonly int NOTVERIFY = 11081; - /// <summary> - /// 璇ョ敤鎴峰睘浜庤皟璇曡处鍙凤紝骞舵湭鍚敤 - /// </summary> - public static readonly int NOTENABLE = 11082; - /// <summary> - /// //鏁版嵁骞朵笉鍦ㄦHDL鍖哄煙鏈嶅姟鍣� - /// </summary> - public static readonly int YOUDATANOISLOCALREGION = 11083; - /// <summary> - /// 璐﹀彿鎴栧瘑鐮侀敊璇� - /// </summary> - public static readonly int USERNAMEORPWDERROR = 11084; - /// <summary> - /// 璐﹀彿涓嶅瓨鍦紝璇峰厛娉ㄥ唽 - /// </summary> - public static readonly int ACCOUNTNOEXISTS = 11085; - - public static readonly int YourPWDIsTooSample = 11088; - public static readonly int PleaseInputTheCorrectEmail = 11089; - /// <summary> - /// 鎿嶄綔澶辫触 - /// </summary> - public static readonly int FAIL = 11090; - /// <summary> - /// 鍙戦�侀獙璇佺爜澶辫触 - /// </summary> - public static readonly int SENDFAIL = 11091; - /// <summary> - /// 杩炴帴缃戝叧鎴栬�呰幏鍙栨暟鎹け璐� - /// </summary> - public static readonly int ConnectGWFail = 11092; - /// <summary> - /// 鏃堕棿闂撮殧 - /// </summary> - public static readonly int TimeSpan = 11093; - public static readonly int TheSceneHadExist = 11094; - public static readonly int AddSceneFail = 11095; + public static readonly int NextStep = 11071; + public static readonly int SelectRoom = 11072; + public static readonly int SelectDevice = 11073; - /// <summary> - /// 鑷畾涔� - /// </summary> - public static readonly int Custom = 11098; + /// <summary> + /// 璋冨厜 + /// </summary> + public static readonly int Dimming = 11075; + public static readonly int ThisSceneHadTheDevice = 11076; + public static readonly int SceneNameCannotBeNull = 11077; + public static readonly int ModifyScene = 11078; - /// <summary> - /// 鍙栨秷鏀惰棌 - /// </summary> - public static readonly int CancelCollect = 11101; - /// <summary> - /// 淇敼淇℃伅 - /// </summary> - public static readonly int ChangeDeviceInfo = 11102; - /// <summary> - /// 鐧惧垎姣� - /// </summary> - public static readonly int Percent = 11103; - public static readonly int Success = 11104; - - /// <summary> - /// The please confirm new password. - /// </summary> - public readonly static int PleaseConfirmNewPassword = 11106; - /// <summary> - /// 楠岃瘉鐮佸け鏁� - /// </summary> - public readonly static int NORECORD = 11107; - public static readonly int TheMainGatewayIsNotOnLine = 12000; - /// <summary> - /// 澶辫触锛岃閲嶈瘯 - /// </summary> - public static readonly int FailedPleaseTryAgain = 12001; - public static readonly int TheSceneIsNull = 12002; - /// <summary> - /// 璇ュ満鏅腑娌℃湁鎵ц鐩爣 - /// </summary> - public static readonly int ThisSceneHaveNoDevice = 12003; - public static readonly int TheAppVersionIsNewest = 12004; - public static readonly int Update = 12005; - public static readonly int UpdateContent = 12006; - public static readonly int UpdateAppFail = 12007; - public static readonly int ControlSceneFail = 12008; - public static readonly int DeleteSceneFail = 12009; - public static readonly int SaveTheNewRoomOrNo = 12010; - public static readonly int Updating = 12011; - public static readonly int CancelUpdating = 12012; - /// <summary> - /// 鏂瑰悜涓庨檺浣� - /// </summary> - public static readonly int DirectionLimit = 12013; - /// <summary> - /// 缁存姢妯″紡 - /// </summary> - public static readonly int MaintenanceMode = 12014; - /// <summary> - /// 鍚姩/绂佹鎵嬫媺寮�鍏� - /// </summary> - public static readonly int Start_Forbid_Hand_Pull_Switch=12015; - /// <summary> - /// 璧峰鏂瑰悜 - /// </summary> - public static readonly int InitialDirection = 12016; - /// <summary> - /// 姝e悜 - /// </summary> - public static readonly int ForwardDirection = 12017; - /// <summary> - /// 鍙嶅悜 - /// </summary> - public static readonly int ReverseDirection = 12018; - /// <summary> - /// 闄愪綅 - /// </summary> - public static readonly int Limit = 12019; - /// <summary> - /// 寮�濮� - /// </summary> - public static readonly int Start = 12020; - /// <summary> - /// 缁撴潫 - /// </summary> - public static readonly int End = 12021; - /// <summary> - /// 鎭㈠琛岀▼璁剧疆 - /// </summary> - public static readonly int RestoreTravelSettings = 12022; - /// <summary> - /// 鎭㈠琛岀▼璁剧疆鍚庯紝褰撳墠璁剧疆灏嗚鍒濆鍖栵紝纭畾缁х画鍚楋紵 - /// </summary> - public static readonly int IsCancelRestoreTravelSettings = 12023; - /// <summary> - /// 鍒囨崲缁存姢妯″紡澶辫触 - /// </summary> - public static readonly int ChangeMaintenanceMode_Fail = 12024; - /// <summary> - /// 鏄惁璁剧疆褰撳墠浣嶇疆涓哄紑濮嬮檺浣嶏紵 - /// </summary> - public static readonly int SettingStartLimit = 12025; - /// <summary> - /// 鏄惁璁剧疆褰撳墠浣嶇疆涓虹粨鏉熼檺浣嶏紵 - /// </summary> - public static readonly int SettingEndLimit = 12026; - /// <summary> - /// 璁剧疆寮�濮嬮檺浣� - /// </summary> - public static readonly int SetStartLimit = 12027; - /// <summary> - /// 璁剧疆缁撴潫闄愪綅 - /// </summary> - public static readonly int SetEndLimit = 12028; - /// <summary> - /// 瀵艰建绉诲姩涓紝璇风瓑寰呫�傘�傘�� - /// </summary> - public static readonly int PleaseWaitWhileTheGuidewayIsMoving = 12029; - /// <summary> - /// 鎮ㄧ殑璐﹀彿宸插湪鍙︿竴鍙拌澶囩櫥褰曪紝鎮ㄥ凡琚己鍒朵笅绾� - /// </summary> - public static readonly int YouHaveBeenSignOut = 12030; - - /// <summary> - /// 鍦烘櫙涓凡鍖呭惈璇ュ満鏅� - /// </summary> - public static readonly int ThisSceneHadTheScene = 12032; - /// <summary> - /// 褰撳墠娌℃悳绱㈠埌缃戝叧锛岃鍏堟坊鍔犵綉鍏� - /// </summary> - public static readonly int NoGateway = 12033; - /// <summary> - ///褰撳墠娌℃湁鍙互娣诲姞鍒拌鎴块棿鐨勮澶� - /// </summary> - public static readonly int NoDeviceCanAddToRoom = 12034; - /// <summary> - /// 閫夋嫨椋庨�� - /// </summary> - public static readonly int SelectFanMode = 12035; - /// <summary> - /// 浣庨 - /// </summary> - public static readonly int Fan_Low = 12036; - /// <summary> - /// 涓 - /// </summary> - public static readonly int Fan_Middle = 12037; - /// <summary> - /// 楂橀 - /// </summary> - public static readonly int Fan_Height = 12038; - /// <summary> - /// 閫夋嫨妯″紡 - /// </summary> - public static readonly int SelectMode = 12039; - /// <summary> - /// 鑷姩 - /// </summary> - public static readonly int Mode_Auto = 12040; - /// <summary> - /// 鍒跺喎 - /// </summary> - public static readonly int Mode_Cool = 12041; - /// <summary> - /// 鍒剁儹 - /// </summary> - public static readonly int Mode_Heat = 12042; - /// <summary> - /// 闄ゆ箍 - /// </summary> - public static readonly int Mode_Dry = 12043; - /// <summary> - /// 閫侀 - /// </summary> - public static readonly int Mode_FanOnly = 12044; - /// <summary> - /// 瀹ゆ俯 - /// </summary> - public static readonly int IndoorTemperature = 12045; - /// <summary> - /// 绌鸿皟宸茬粡鍏抽棴锛岃鍏堟墦寮� - /// </summary> - public static readonly int TheACIsClose = 12046; - /// <summary> - /// 璇ユ埧闂存槸鍒嗕韩杩囨潵鐨勶紝涓嶅厑璁歌繘琛岃鎿嶄綔 - /// </summary> - public static readonly int TheRoomIsSharedNotAllowedToOperate = 12047; + /// <summary> + /// 鏈縺娲� + /// </summary> + public static readonly int NOTVERIFY = 11081; + /// <summary> + /// 璇ョ敤鎴峰睘浜庤皟璇曡处鍙凤紝骞舵湭鍚敤 + /// </summary> + public static readonly int NOTENABLE = 11082; + /// <summary> + /// //鏁版嵁骞朵笉鍦ㄦHDL鍖哄煙鏈嶅姟鍣� + /// </summary> + public static readonly int YOUDATANOISLOCALREGION = 11083; + /// <summary> + /// 璐﹀彿鎴栧瘑鐮侀敊璇� + /// </summary> + public static readonly int USERNAMEORPWDERROR = 11084; + /// <summary> + /// 璐﹀彿涓嶅瓨鍦紝璇峰厛娉ㄥ唽 + /// </summary> + public static readonly int ACCOUNTNOEXISTS = 11085; - #region 璁惧绫诲瀷 - /// <summary> - /// 鏈煡璁惧 - /// </summary> - public static readonly int UnknowDevice = 12100; - /// <summary> - /// 鎺у埗闈㈡澘 - /// </summary> - public static readonly int OnOffSwitch = 12101; - /// <summary> - /// 缁х數鍣� - /// </summary> - public static readonly int OnOffOutput = 12102; - /// <summary> - /// 璋冨厜鐏� - /// </summary> - public static readonly int DimmableLight = 12103; - /// <summary> - /// 绐楀笜 - /// </summary> - public static readonly int WindowCoveringDevice = 12104; - /// <summary> - /// 绌鸿皟 - /// </summary> - public static readonly int Thermostat = 12105; - /// <summary> - /// 浼犳劅鍣� - /// </summary> - public static readonly int IASZone = 12106; - /// <summary> - /// 绌烘皵寮�鍏� - /// </summary> - public static readonly int AirSwitch = 12107; - /// <summary> - /// 褰╃伅 - /// </summary> - public static readonly int ColorDimmableLight = 12108; - /// <summary> - /// 涓户鍣� - /// </summary> - public static readonly int Repeater = 12109; - #endregion + public static readonly int YourPWDIsTooSample = 11088; + public static readonly int PleaseInputTheCorrectEmail = 11089; + /// <summary> + /// 鎿嶄綔澶辫触 + /// </summary> + public static readonly int FAIL = 11090; + /// <summary> + /// 鍙戦�侀獙璇佺爜澶辫触 + /// </summary> + public static readonly int SENDFAIL = 11091; + /// <summary> + /// 杩炴帴缃戝叧鎴栬�呰幏鍙栨暟鎹け璐� + /// </summary> + public static readonly int ConnectGWFail = 11092; + /// <summary> + /// 鏃堕棿闂撮殧 + /// </summary> + public static readonly int TimeSpan = 11093; + public static readonly int TheSceneHadExist = 11094; + public static readonly int AddSceneFail = 11095; - /// <summary> - /// 褰撳墠鎴块棿娌℃湁璁惧鍙互娣诲姞鍒板満鏅� - /// </summary> - public static readonly int TheRoomNoDeviceAddToScene = 12500; + /// <summary> + /// 鑷畾涔� + /// </summary> + public static readonly int Custom = 11098; - /// <summary> - /// 寰�涓婄Щ鍔� - /// </summary> - public static readonly int RollerShadeUp = 12501; - /// <summary> - /// 寰�涓嬬Щ鍔� - /// </summary> - public static readonly int RollerShadeDown = 12502; + /// <summary> + /// 鍙栨秷鏀惰棌 + /// </summary> + public static readonly int CancelCollect = 11101; + /// <summary> + /// 淇敼淇℃伅 + /// </summary> + public static readonly int ChangeDeviceInfo = 11102; + /// <summary> + /// 鐧惧垎姣� + /// </summary> + public static readonly int Percent = 11103; + public static readonly int Success = 11104; - /// <summary> - /// 瀵嗙爜闀垮害涓簕0}涓瓧绗� - /// </summary> - public const int PswLengthMsg = 15000; + /// <summary> + /// The please confirm new password. + /// </summary> + public readonly static int PleaseConfirmNewPassword = 11106; + /// <summary> + /// 楠岃瘉鐮佸け鏁� + /// </summary> + public readonly static int NORECORD = 11107; + + public static readonly int TheMainGatewayIsNotOnLine = 12000; + /// <summary> + /// 澶辫触锛岃閲嶈瘯 + /// </summary> + public static readonly int FailedPleaseTryAgain = 12001; + public static readonly int TheSceneIsNull = 12002; + /// <summary> + /// 璇ュ満鏅腑娌℃湁鎵ц鐩爣 + /// </summary> + public static readonly int ThisSceneHaveNoDevice = 12003; + public static readonly int TheAppVersionIsNewest = 12004; + public static readonly int Update = 12005; + public static readonly int UpdateContent = 12006; + public static readonly int UpdateAppFail = 12007; + public static readonly int ControlSceneFail = 12008; + public static readonly int DeleteSceneFail = 12009; + public static readonly int SaveTheNewRoomOrNo = 12010; + public static readonly int Updating = 12011; + public static readonly int CancelUpdating = 12012; + /// <summary> + /// 鏂瑰悜涓庨檺浣� + /// </summary> + public static readonly int DirectionLimit = 12013; + /// <summary> + /// 缁存姢妯″紡 + /// </summary> + public static readonly int MaintenanceMode = 12014; + /// <summary> + /// 鍚姩/绂佹鎵嬫媺寮�鍏� + /// </summary> + public static readonly int Start_Forbid_Hand_Pull_Switch = 12015; + /// <summary> + /// 璧峰鏂瑰悜 + /// </summary> + public static readonly int InitialDirection = 12016; + /// <summary> + /// 姝e悜 + /// </summary> + public static readonly int ForwardDirection = 12017; + /// <summary> + /// 鍙嶅悜 + /// </summary> + public static readonly int ReverseDirection = 12018; + /// <summary> + /// 闄愪綅 + /// </summary> + public static readonly int Limit = 12019; + /// <summary> + /// 寮�濮� + /// </summary> + public static readonly int Start = 12020; + /// <summary> + /// 缁撴潫 + /// </summary> + public static readonly int End = 12021; + /// <summary> + /// 鎭㈠琛岀▼璁剧疆 + /// </summary> + public static readonly int RestoreTravelSettings = 12022; + /// <summary> + /// 鎭㈠琛岀▼璁剧疆鍚庯紝褰撳墠璁剧疆灏嗚鍒濆鍖栵紝纭畾缁х画鍚楋紵 + /// </summary> + public static readonly int IsCancelRestoreTravelSettings = 12023; + /// <summary> + /// 鍒囨崲缁存姢妯″紡澶辫触 + /// </summary> + public static readonly int ChangeMaintenanceMode_Fail = 12024; + /// <summary> + /// 鏄惁璁剧疆褰撳墠浣嶇疆涓哄紑濮嬮檺浣嶏紵 + /// </summary> + public static readonly int SettingStartLimit = 12025; + /// <summary> + /// 鏄惁璁剧疆褰撳墠浣嶇疆涓虹粨鏉熼檺浣嶏紵 + /// </summary> + public static readonly int SettingEndLimit = 12026; + /// <summary> + /// 璁剧疆寮�濮嬮檺浣� + /// </summary> + public static readonly int SetStartLimit = 12027; + /// <summary> + /// 璁剧疆缁撴潫闄愪綅 + /// </summary> + public static readonly int SetEndLimit = 12028; + /// <summary> + /// 瀵艰建绉诲姩涓紝璇风瓑寰呫�傘�傘�� + /// </summary> + public static readonly int PleaseWaitWhileTheGuidewayIsMoving = 12029; + /// <summary> + /// 鎮ㄧ殑璐﹀彿宸插湪鍙︿竴鍙拌澶囩櫥褰曪紝鎮ㄥ凡琚己鍒朵笅绾� + /// </summary> + public static readonly int YouHaveBeenSignOut = 12030; + + /// <summary> + /// 鍦烘櫙涓凡鍖呭惈璇ュ満鏅� + /// </summary> + public static readonly int ThisSceneHadTheScene = 12032; + /// <summary> + /// 褰撳墠娌℃悳绱㈠埌缃戝叧锛岃鍏堟坊鍔犵綉鍏� + /// </summary> + public static readonly int NoGateway = 12033; + /// <summary> + ///褰撳墠娌℃湁鍙互娣诲姞鍒拌鎴块棿鐨勮澶� + /// </summary> + public static readonly int NoDeviceCanAddToRoom = 12034; + /// <summary> + /// 閫夋嫨椋庨�� + /// </summary> + public static readonly int SelectFanMode = 12035; + /// <summary> + /// 浣庨 + /// </summary> + public static readonly int Fan_Low = 12036; + /// <summary> + /// 涓 + /// </summary> + public static readonly int Fan_Middle = 12037; + /// <summary> + /// 楂橀 + /// </summary> + public static readonly int Fan_Height = 12038; + /// <summary> + /// 閫夋嫨妯″紡 + /// </summary> + public static readonly int SelectMode = 12039; + /// <summary> + /// 鑷姩 + /// </summary> + public static readonly int Mode_Auto = 12040; + /// <summary> + /// 鍒跺喎 + /// </summary> + public static readonly int Mode_Cool = 12041; + /// <summary> + /// 鍒剁儹 + /// </summary> + public static readonly int Mode_Heat = 12042; + /// <summary> + /// 闄ゆ箍 + /// </summary> + public static readonly int Mode_Dry = 12043; + /// <summary> + /// 閫侀 + /// </summary> + public static readonly int Mode_FanOnly = 12044; + /// <summary> + /// 瀹ゆ俯 + /// </summary> + public static readonly int IndoorTemperature = 12045; + /// <summary> + /// 绌鸿皟宸茬粡鍏抽棴锛岃鍏堟墦寮� + /// </summary> + public static readonly int TheACIsClose = 12046; + + + #region 璁惧绫诲瀷 + /// <summary> + /// 鏈煡璁惧 + /// </summary> + public static readonly int UnknowDevice = 12100; + /// <summary> + /// 鎺у埗闈㈡澘 + /// </summary> + public static readonly int OnOffSwitch = 12101; + /// <summary> + /// 缁х數鍣� + /// </summary> + public static readonly int OnOffOutput = 12102; + /// <summary> + /// 璋冨厜鐏� + /// </summary> + public static readonly int DimmableLight = 12103; + /// <summary> + /// 绐楀笜 + /// </summary> + public static readonly int WindowCoveringDevice = 12104; + /// <summary> + /// 绌鸿皟 + /// </summary> + public static readonly int Thermostat = 12105; + /// <summary> + /// 浼犳劅鍣� + /// </summary> + public static readonly int IASZone = 12106; + /// <summary> + /// 绌烘皵寮�鍏� + /// </summary> + public static readonly int AirSwitch = 12107; + /// <summary> + /// 褰╃伅 + /// </summary> + public static readonly int ColorDimmableLight = 12108; + /// <summary> + /// 涓户鍣� + /// </summary> + public static readonly int Repeater = 12109; + + #endregion + + /// <summary> + /// 褰撳墠鎴块棿娌℃湁璁惧鍙互娣诲姞鍒板満鏅� + /// </summary> + public static readonly int TheRoomNoDeviceAddToScene = 12500; + + /// <summary> + /// 寰�涓婄Щ鍔� + /// </summary> + public static readonly int RollerShadeUp = 12501; + /// <summary> + /// 寰�涓嬬Щ鍔� + /// </summary> + public static readonly int RollerShadeDown = 12502; + + + /// <summary> + /// 瀵嗙爜闀垮害涓簕0}涓瓧绗� + /// </summary> + public const int PswLengthMsg = 15000; /// <summary> /// 1涓皬鍐欏瓧姣� /// </summary> @@ -1463,15 +1482,15 @@ /// </summary> public const int uStopSearch = 15050; /// <summary> - /// 鏅鸿兘缃戝叧閰嶇疆缃戠粶涓� + /// 姝e湪鎼滅储缃戝叧鈥� /// </summary> - public const int uGatewaySetting = 15051; + public const int uGatewaySearching = 15051; /// <summary> /// 璇风◢鍊� /// </summary> public const int uPleaseWait = 15052; /// <summary> - /// 璇风‘淇濈綉鍏冲凡鐢ㄧ綉绾胯繛鎺� + /// 璇风‘淇濈綉鍏充笌缃戠嚎杩炴帴{0}绯荤粺鐏瘡绉掗棯鐑佷竴娆� /// </summary> public const int ConfirmLineConnectMsg = 15053; /// <summary> @@ -1507,9 +1526,9 @@ /// </summary> public const int NormalTip = 15061; /// <summary> - /// 闇�閲嶆柊缁戝畾 + /// 鎹㈢粦 /// </summary> - public const int uNeedReBinding = 15062; + public const int uReBindAgain = 15062; /// <summary> /// 宸茬粦瀹� /// </summary> @@ -2679,7 +2698,7 @@ /// </summary> public const int uAppAutoBackup = 15400; /// <summary> - /// 瀛愮綉鍏� + /// 浠庣綉鍏� /// </summary> public const int uChidrenGateway = 15401; /// <summary> @@ -2995,7 +3014,7 @@ /// </summary> public const int uGetGatewayTagartFail = 15491; /// <summary> - /// 鏄惁閲嶆柊缁戝畾缃戝叧? + /// 纭缁戝畾鏃х綉鍏筹紵 /// </summary> public const int uRebindGatewayMsg = 15492; /// <summary> @@ -3263,7 +3282,7 @@ /// </summary> public const int uHadSharedContent = 15564; /// <summary> - /// 鏂板鍏变韩 + /// 鍒涘缓鏂板叡浜� /// </summary> public const int uAddShared = 15565; /// <summary> @@ -3327,7 +3346,7 @@ /// </summary> public const int uCanNotAddDeviceInGarrisonMode = 15582; /// <summary> - /// 鍏ㄩ儴鍖哄煙鏃犲彲鍏变韩鐨勮澶� + /// 鏃犲彲鍏变韩鐨勬埧闂� /// </summary> public const int uNotShardDeviceInAllRoomMsg = 15583; /// <summary> @@ -4070,6 +4089,50 @@ /// 纭鍒犻櫎鍏变韩鎴块棿锛� /// </summary> public const int uDeleteShardRoomMsg = 15777; + /// <summary> + /// 杩樻病缁戝畾缃戝叧鍝� + /// </summary> + public const int uHadNotBindGatewayMsg = 15778; + /// <summary> + /// 瑙e喅鏂规硶锛屽彲閫夋嫨鎵ц浠ヤ笅浠绘剰涓�绉嶆柟寮忥細 + /// </summary> + public const int uSearchGatewayFailMsg1 = 15779; + /// <summary> + /// 1.闀挎寜ZB/RST閿�20绉掞紝缃戝叧鎭㈠鍑哄巶璁剧疆锛屾寚绀虹伅鍏ㄩ儴鐔剓0}鐏悗锛岄噸鏂板叆缃戙�� + /// </summary> + public const int uSearchGatewayFailMsg2 = 15780; + /// <summary> + /// 2.鐐规寜HID/WCFG閿紝杩涘叆缃戝叧鎹㈢粦妯″紡锛岀郴缁熸寚绀虹伅蹇棯{0}5绉掋�� + /// </summary> + public const int uSearchGatewayFailMsg3 = 15781; + /// <summary> + /// 3.璇烽噸璇曪紝閲嶆柊娣诲姞缃戝叧銆� + /// </summary> + public const int uSearchGatewayFailMsg4 = 15782; + /// <summary> + /// 4.杩斿洖缃戝叧绠$悊銆� + /// </summary> + public const int uSearchGatewayFailMsg5 = 15783; + /// <summary> + /// 閲嶈瘯 + /// </summary> + public const int uReDoAgain = 15784; + /// <summary> + /// 杩斿洖缃戝叧绠$悊 + /// </summary> + public const int uGobackGatewayManage = 15785; + /// <summary> + /// 鎼滅储澶辫触 + /// </summary> + public const int uSearchFail = 15786; + /// <summary> + /// (鏂�) + /// </summary> + public const int uNewTip1 = 15787; + /// <summary> + /// 姝e湪鎹㈢粦缃戝叧锛岃绋嶅�欌�� + /// </summary> + public const int uIsReBindingPleaseWaiting = 15788; //鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽� /// <summary> diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems index fcfb7be..19ed78d 100755 --- a/ZigbeeApp/Shared/Shared.projitems +++ b/ZigbeeApp/Shared/Shared.projitems @@ -32,12 +32,12 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\CategorySceneSelectCurtainSetting.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\CategorySceneSelectDevice.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\CategorySceneSelectDeviceByRoom.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\CategorySceneSelectedDelayTime.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\CategorySceneSelectedDimmableLightSetting.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\CategorySceneSelectedScene.cs" /> <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\SelectDelayTime.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" /> @@ -62,6 +62,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\RowLayoutDeleteButton.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\RowLayoutEditButton.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SceneMainView.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SceneTargetRow.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SelectedStatuButton.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SelectFunctionView.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SelectTime.cs" /> @@ -136,11 +137,15 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\RemotelyUnlock.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\SubAccountManagementPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\TemporaryPassword.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\TempPasswordTimePage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\TimeSettignPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UndistributeDoorlockUserPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UnLockMethod.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UserDoorLockPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UserManagement.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\GatewayProductInfoForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\WiredGatewayListForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\WiredGatewayRebindForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Member\MemberNotEsixtForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\CheckNewPhoneForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\CheckOldPhoneForm.cs" /> @@ -227,7 +232,6 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Manage\GatewayCoordinatorInfoForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Manage\GatewayFirmwareInfoForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Manage\GatewayHistoryFirmwareVersionForm.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\GatewayInfoAddForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Manage\GatewayLinuxInfoForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Manage\GatewayListForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Manage\GatewayVirtualDriveInfoForm.cs" /> @@ -296,10 +300,10 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Safety\SectorsSettionMenuForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Safety\SensorDeviceSettionListForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Safety\UserPasswordListForm.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\SharedContent\ConfigureNewSharedListRoomForm.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\SharedContent\ConfigureNewSharedMainForm.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\SharedContent\SearchConfigureSharedListRoomForm.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\SharedContent\SearchConfigureSharedMainForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\SharedContent\AddNewSharedListRoomForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\SharedContent\AddNewSharedContentForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\SharedContent\LookSharedListRoomForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\SharedContent\LookSharedContentForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\CheckNewEmailForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\CheckOldEmailForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\EditorAccountPasswordForm.cs" /> @@ -322,8 +326,8 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Member\MemberManagementForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\UserMain\UserInformationForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\UserMain\UserMainForm.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\NewGateWaySelectForm.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\WiredGwAddDirectionForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\NewGateWayMenuSelectForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\WiredGatewayDirectionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\WiredGatewaySearchForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Manage\GatewayInfoEditorForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Account\AccountLogin.cs" /> @@ -412,7 +416,6 @@ <Folder Include="$(MSBuildThisFileDirectory)Phone\Device\Curtain\" /> <Folder Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\PirSensor\" /> <Folder Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Curtain\" /> - <Folder Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\" /> </ItemGroup> <ItemGroup> <None Include="$(MSBuildThisFileDirectory)DLL\Elian.iOS.dll" /> -- Gitblit v1.8.0