From 0bf9e65bc3ba98391e7835c922b15baab3c77876 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 01 六月 2020 14:59:39 +0800 Subject: [PATCH] 上传一个合并的版本 --- ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorPMTwoPointFiveSelected.png | 0 ZigbeeApp/GateWay.Droid/Assets/Language.ini | 33 ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs | 492 ++-- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs | 18 ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/MiniGatewayDirection.png | 0 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs | 11 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs | 51 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs | 147 + ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs | 44 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs | 3 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleEnvironmentSelected2.png | 0 ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleMultifunctionSelected.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleEnvironmentSelected.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs | 6 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleMultifunctionSelected2.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewaySearchForm.cs | 413 +++ ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/AddGatewayHelpForm.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs | 101 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs | 1 ZigbeeApp/Home.Ios/Resources/Phone/Instruct/ButtonPanelSimpleMultifunction.png | 0 ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorPMTwoPointFiveSelected2.png | 0 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceColorLightCardControl.cs | 20 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs | 2 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAcRowControl.cs | 1 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressRowBar.cs | 212 + ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleEnvironment.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs | 33 ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/ButtonPanelSimpleEnvironment.png | 0 ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs | 58 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs | 5 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewaySelectNetworkForm.cs | 143 + ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs | 25 ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs | 12 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs | 47 ZigbeeApp/Home.Ios/Resources/Phone/RealDevice/ButtonPanelSimpleEnvironment.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs | 23 ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleEnvironmentSelected.png | 0 ZigbeeApp/Home.Ios/Resources/Phone/Gateway/RealGateway11.png | 0 ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs | 75 ZigbeeApp/Home.Ios/Resources/Phone/Instruct/ButtonPanelSimpleEnvironment.png | 0 ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelFangyueFreshAirSelected2.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs | 19 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirSwitchCardControl.cs | 1 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs | 39 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/MiniNightLight.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/BottomItemSelectForm.cs | 2 ZigbeeApp/Home.Ios/Resources/Phone/Device/MiniNightLight.png | 0 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs | 91 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs | 9 ZigbeeApp/Home.Ios/Resources/Phone/Gateway/MiniGatewaySearching.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameRefreshControl.cs | 101 ZigbeeApp/Shared/Shared.projitems | 15 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelSimpleEnvironmentDirectionForm.cs | 74 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs | 7 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelSimpleMultifunctionDirectionForm.cs | 83 ZigbeeApp/Home.Ios/Resources/Phone/Gateway/MiniGatewayDirection.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorPMTwoPointFiveSelected2.png | 0 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs | 1 ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs | 2 ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/RealGateway11.png | 0 ZigbeeApp/Home.Ios/Resources/Phone/Device/MiniNightLightSelected2.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleMultifunction.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection1Form.cs | 79 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs | 54 ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/ButtonPanelSimpleMultifunction.png | 0 ZigbeeApp/Home.Ios/Resources/Phone/RealDevice/ButtonPanelSimpleMultifunction.png | 0 ZigbeeApp/Home.Ios/Resources/Phone/DeviceItem/MiniNightLightDevice.png | 0 ZigbeeApp/Shared/Phone/MainPage/ControlForm/Base/DeviceDetailCardCommonForm.cs | 34 ZigbeeApp/GateWay.Droid/Assets/Phone/Instruct/ButtonPanelSimpleEnvironment.png | 0 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceFreshAirCardControl.cs | 1 ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs | 26 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs | 3 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionTargetsForm.cs | 10 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/NormalFrameLayout.cs | 14 ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj | 71 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs | 1 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorPMTwoPointFiveSelected.png | 0 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs | 20 ZigbeeApp/Shared/Common/CommonPage.cs | 2 ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleEnvironment.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/GatewayIcon11.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs | 34 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/MiniNightLightSelected.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs | 11 ZigbeeApp/Home.Ios/Resources/Phone/Device/MiniNightLightSelected.png | 0 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceMiniLightDetailCardForm.cs | 376 +++ ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs | 74 ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelCurtainSelected2.png | 0 ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/MiniGatewaySearching.png | 0 ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleMultifunction.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs | 16 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentTargetsForm.cs | 10 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection2Form.cs | 119 + ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/MiniGateway.png | 0 ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml | 2 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAcCardControl.cs | 1 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionBindSensorForm.cs | 1890 ++++++++++++++++ ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelFangyueFreshAirSelected2.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs | 2 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs | 11 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs | 172 + ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs | 5 ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleMultifunctionSelected2.png | 0 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs | 7 ZigbeeApp/Shared/Phone/UserCenter/Device/Light/MiniNightLightFunctionSettionForm.cs | 139 + ZigbeeApp/Home.Ios/Resources/Language.ini | 33 ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleEnvironmentSelected2.png | 0 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceCurtainCardControl.cs | 1 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs | 10 ZigbeeApp/Home.Ios/Resources/Phone/Gateway/MiniGateway.png | 0 ZigbeeApp/Home.Ios/Home.IOS.csproj | 25 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs | 104 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs | 1 ZigbeeApp/GateWay.Droid/Assets/Phone/Instruct/ButtonPanelSimpleMultifunction.png | 0 ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs | 45 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs | 19 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs | 6 ZigbeeApp/Shared/R.cs | 81 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/RowLayoutBase.cs | 11 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs | 4 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelCurtainSelected2.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomClickButton.cs | 23 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionInputControl.cs | 5 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/MiniNightLightSelected2.png | 0 ZigbeeApp/Shared/Common/Device.cs | 108 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs | 25 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection3Form.cs | 112 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DevicePmSensorRowControl.cs | 1 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs | 100 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs | 110 ZigbeeApp/Home.Ios/Resources/Phone/Gateway/GatewayIcon11.png | 0 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceRelayCardControl.cs | 1 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs | 10 ZigbeeApp/GateWay.Droid/Assets/Phone/DeviceItem/MiniNightLightDevice.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs | 15 /dev/null | 118 - ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 5 ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleMultifunctionSelected.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs | 226 + 141 files changed, 5,830 insertions(+), 979 deletions(-) diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini index cd9328d..90368fb 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini +++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini @@ -253,7 +253,7 @@ 249=鎮ㄧ殑甯稿紑妯″紡灏嗚鍙栨秷 250=淇濇寔甯稿紑 251=纭鍙栨秷 -252=(鏈鎿嶄綔浠呬负鍗曟鍙栨秷锛岃嫢闇�瑕佸仠姝㈡墽琛岃嚜鍔ㄥ寲锛岃閫夋嫨鍒嗙被-鑷姩鍖栬繘琛岃缃�) +252=(鏈鎿嶄綔浠呬负鍗曟鍙栨秷锛岃嫢闇�瑕佸仠姝㈡墽琛岃嚜鍔ㄥ寲锛岃鍒板父寮�鑷姩鍖栬缃�) 253=鑾峰彇闂ㄩ攣甯稿紑妯″紡澶辫触 254=鎵撳紑闂ㄩ攣甯稿紑妯″紡鎴愬姛 255=鎵撳紑闂ㄩ攣甯稿紑妯″紡澶辫触 @@ -323,6 +323,12 @@ 320=涓害姹℃煋 321=閲嶅害姹℃煋 322=涓ラ噸姹℃煋 +323=鑷姩鍖栧叧闂�愰棬閿佸父寮�妯″紡銆戯紝闂ㄩ攣宸插叧 +324=鍏ョ綉 +;娉ㄦ剰鈥滃叆缃戔�濈殑鑻辨枃鈥淐onnection",鍥犱负灞忓箷涓婃槸杩欐牱鏄剧ず鐨� +325=鎵撳紑闈㈡澘涓昏彍鍗曪紝鍙充笂瑙掔偣鍑粄0}璁剧疆鎸夐挳锛岀偣鍑诲叆缃� +326=闀挎寜鈥滃紑鍏斥�濇寜閿�5绉掞紝鎵�鏈夌伅姣忚繘琛寋0}2娆′寒鏆楀垏鎹紝鍗冲叆缃戞垚鍔� +327=闀挎寜鈥滃紑鍏斥�濇寜閿�5绉� 5097=鍙栨秷 5098=纭畾 @@ -603,8 +609,7 @@ 5402=鏃舵晥鎬у父寮�灏嗚 5403=鍒嗗叧闂� 5404=鏃� - - +5405=绫� 10000=HDL Home 10001=甯哥敤 @@ -1163,7 +1168,7 @@ 15391=鏄惁閲嶆柊鍒锋柊{0}缃戝叧? 15392=鍥炶矾 15393=鐕冩皵娉勬紡 -15394=鏈変笉鏄庣墿浣撶粡杩� +15394=鏈変汉缁忚繃 15395=绱ф�ユ寜閽鎸変笅 15396=瑙﹀彂浼犳劅鍣ㄦ姤璀� 15397=缂栬緫缃戝叧淇℃伅 @@ -1719,7 +1724,7 @@ 15978=閫氫俊閾炬帴澶辫触 15979=鑾峰彇缃戠粶SSID澶辫触 15980=瀵嗙爜鍙戦�佸け璐� -15981=閫夋嫨hdlZigbeeGW-xxxx缃戠粶 +15981=璇烽�夋嫨hdlZigbeeGW-xxxx缃戠粶 15982=璇疯繛鎺ュ搴璚iFi 15983=姝e湪鑾峰彇鍒嗕韩鏁版嵁 15984=璇峰厛鍘昏缃墜鏈鸿繛鎺ュ埌璺敱鍣▄0}鐒跺悗闀挎寜缃戝叧HID/WCFG鎸夐敭澶ф20绉抺0}鐩村埌绯荤粺鎸囩ず鐏揩闂獅0}缃戝叧杩涘叆UDP妯″紡WIFI閰嶇綉 @@ -1860,6 +1865,14 @@ 16119=DATA缁胯壊鎸囩ず鐏棯鐑� 16120=鑱旂郴鏂瑰紡 16121=璇疯緭鍏ユ偍鐨勮仈绯绘柟寮� +16122=璇ュ唴瀹逛笉鑳界渷鐣� +16123=Mini缃戝叧 +16124=娣诲姞Mini缃戝叧 +16125=鎻掔數鍚�,闀挎寜缃戝叧HID/WCFG鎸夐敭5绉抺0}绯荤粺鐏父浜�60绉掑悗鍒欒繘鍏ラ厤缃戠姸鎬� +16126=璇烽�夋嫨widora-xxxx缃戠粶 +16127=鎵嬫満鍘昏缃繛鎺ョ綉鍏崇儹鐐箋0}閫夋嫨widora-xxxx缃戠粶 +16128=鑹叉俯 +16129=Mini澶滅伅 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽� 18004=鎸囧畾缃戝叧宸茬粡琚粦瀹� @@ -1989,6 +2002,9 @@ 30038=鏂规偊鏂伴灏忔ā鍧� 30039=Zigbee鍚搁《鐕冩皵浼犳劅鍣� 30040=PM2.5绌烘皵璐ㄩ噺浼犳劅鍣� +30041=绠�绾﹀鍔熻兘闈㈡澘 +30042=绠�绾︾幆澧冮潰鏉� +30043=Mini缃戝叧 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄澶囨墍灞炵绫荤殑缈昏瘧鍚嶅瓧,浠�40000寮�濮嬧槄鈽呪槄鈽� 40000=閬槼 @@ -2054,6 +2070,9 @@ 50038=鏂伴鎺у埗灏忔ā鍧� 50039=Zigbee鍚搁《鐕冩皵浼犳劅鍣� 50040=PM2.5绌烘皵璐ㄩ噺浼犳劅鍣� +50041=绠�绾﹀鍔熻兘闈㈡澘 +50042=绠�绾︾幆澧冮潰鏉� +50043=Mini缃戝叧 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勮澶囩被鍨嬪悕瀛�,浠�60000寮�濮�.娉�:瀹冨苟涓嶉渶瑕佸啀R.cs鏂囦欢涓畾涔夆槄鈽呪槄鈽� 60000=浼犳劅鍣� @@ -2096,4 +2115,6 @@ 70023=涓户鍣� 70024=鏅鸿兘绌哄紑 70025=鍚搁《鐕冩皵浼犳劅鍣� -70026=PM2.5绌烘皵璐ㄩ噺浼犳劅鍣� \ No newline at end of file +70026=PM2.5绌烘皵璐ㄩ噺浼犳劅鍣� +70027=绠�绾﹀鍔熻兘闈㈡澘 +70028=绠�绾︾幆澧冮潰鏉� \ No newline at end of file diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelCurtainSelected2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelCurtainSelected2.png new file mode 100755 index 0000000..6e4c3ab --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelCurtainSelected2.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelFangyueFreshAirSelected2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelFangyueFreshAirSelected2.png new file mode 100755 index 0000000..400f73c --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelFangyueFreshAirSelected2.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleEnvironment.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleEnvironment.png new file mode 100755 index 0000000..b600be5 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleEnvironment.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleEnvironmentSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleEnvironmentSelected.png new file mode 100755 index 0000000..470608c --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleEnvironmentSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleEnvironmentSelected2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleEnvironmentSelected2.png new file mode 100755 index 0000000..0432723 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleEnvironmentSelected2.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleMultifunction.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleMultifunction.png new file mode 100755 index 0000000..e295871 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleMultifunction.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleMultifunctionSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleMultifunctionSelected.png new file mode 100755 index 0000000..347ffc4 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleMultifunctionSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleMultifunctionSelected2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleMultifunctionSelected2.png new file mode 100755 index 0000000..e6c8858 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/ButtonPanelSimpleMultifunctionSelected2.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/MiniNightLight.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/MiniNightLight.png new file mode 100755 index 0000000..2dd6011 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/MiniNightLight.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/MiniNightLightSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/MiniNightLightSelected.png new file mode 100755 index 0000000..b818891 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/MiniNightLightSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/MiniNightLightSelected2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/MiniNightLightSelected2.png new file mode 100755 index 0000000..28ed84b --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/MiniNightLightSelected2.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorPMTwoPointFiveSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorPMTwoPointFiveSelected.png new file mode 100755 index 0000000..61f33fa --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorPMTwoPointFiveSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorPMTwoPointFiveSelected2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorPMTwoPointFiveSelected2.png new file mode 100755 index 0000000..1628d3d --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Device/SensorPMTwoPointFiveSelected2.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/DeviceItem/MiniNightLightDevice.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/DeviceItem/MiniNightLightDevice.png new file mode 100755 index 0000000..5adfc32 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/DeviceItem/MiniNightLightDevice.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/GatewayIcon11.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/GatewayIcon11.png new file mode 100755 index 0000000..2dd6011 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/GatewayIcon11.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/MiniGateway.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/MiniGateway.png new file mode 100755 index 0000000..2dd6011 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/MiniGateway.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/MiniGatewayDirection.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/MiniGatewayDirection.png new file mode 100755 index 0000000..2286140 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/MiniGatewayDirection.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/MiniGatewaySearching.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/MiniGatewaySearching.png new file mode 100755 index 0000000..b1a3fd7 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/MiniGatewaySearching.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/RealGateway1.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/RealGateway1.png deleted file mode 100755 index 9214cf4..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/RealGateway1.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/RealGateway11.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/RealGateway11.png new file mode 100755 index 0000000..bd7d1ed --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/RealGateway11.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/RealGateway6.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/RealGateway6.png deleted file mode 100755 index c338f88..0000000 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Gateway/RealGateway6.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Instruct/ButtonPanelSimpleEnvironment.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Instruct/ButtonPanelSimpleEnvironment.png new file mode 100755 index 0000000..0d3e5d7 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Instruct/ButtonPanelSimpleEnvironment.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Instruct/ButtonPanelSimpleMultifunction.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Instruct/ButtonPanelSimpleMultifunction.png new file mode 100755 index 0000000..1f24e24 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Instruct/ButtonPanelSimpleMultifunction.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/ButtonPanelSimpleEnvironment.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/ButtonPanelSimpleEnvironment.png new file mode 100755 index 0000000..eb8b51e --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/ButtonPanelSimpleEnvironment.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/ButtonPanelSimpleMultifunction.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/ButtonPanelSimpleMultifunction.png new file mode 100755 index 0000000..981b1f5 --- /dev/null +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/RealDevice/ButtonPanelSimpleMultifunction.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj index 15159bf..631fa08 100644 --- a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj +++ b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj @@ -423,8 +423,6 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\9IconSelected.png" /> <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon6.png" /> <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon_6.png" /> - <AndroidAsset Include="Assets\Phone\Gateway\RealGateway1.png" /> - <AndroidAsset Include="Assets\Phone\Gateway\RealGateway6.png" /> <AndroidAsset Include="Assets\Phone\Gateway\WiredGateway.png" /> <AndroidAsset Include="Assets\Phone\Gateway\WiredGatewayInstruct.png" /> <AndroidAsset Include="Assets\Phone\Instruct\DeviceSearch.png" /> @@ -2163,6 +2161,75 @@ <ItemGroup> <AndroidAsset Include="Assets\Phone\Logo\Logo.png" /> </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Gateway\MiniGateway.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Gateway\MiniGatewayDirection.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Gateway\MiniGatewaySearching.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Gateway\RealGateway11.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon11.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\DeviceItem\MiniNightLightDevice.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Device\MiniNightLight.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Device\MiniNightLightSelected.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Device\MiniNightLightSelected2.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Device\ButtonPanelCurtainSelected2.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Device\ButtonPanelFangyueFreshAirSelected2.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Device\ButtonPanelSimpleEnvironment.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Device\ButtonPanelSimpleEnvironmentSelected.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Device\ButtonPanelSimpleEnvironmentSelected2.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Device\ButtonPanelSimpleMultifunction.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Device\ButtonPanelSimpleMultifunctionSelected.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Device\ButtonPanelSimpleMultifunctionSelected2.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Device\SensorPMTwoPointFiveSelected.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Device\SensorPMTwoPointFiveSelected2.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Instruct\ButtonPanelSimpleEnvironment.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Instruct\ButtonPanelSimpleMultifunction.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\RealDevice\ButtonPanelSimpleEnvironment.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\RealDevice\ButtonPanelSimpleMultifunction.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 be6eda8..47ae5c7 100644 --- a/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml +++ b/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="2020051301" android:installLocation="auto" android:versionName="1.0.20051301"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="2020060101" android:installLocation="auto" android:versionName="1.1.0.2020060101"> <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="26" /> <permission android:name="com.hdl.home.permission.JPUSH_MESSAGE" android:protectionLevel="signature" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> diff --git a/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs b/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs index 3082e05..012ca3c 100644 --- a/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs +++ b/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs @@ -3003,12 +3003,6 @@ // aapt resource value: 0x7f090028 public const int CTRL = 2131296296; - // aapt resource value: 0x7f09008e - public const int Custom = 2131296398; - - // aapt resource value: 0x7f09008d - public const int CustomLabel = 2131296397; - // aapt resource value: 0x7f090054 public const int FILL = 2131296340; @@ -3030,23 +3024,8 @@ // aapt resource value: 0x7f090051 public const int MatchLayout = 2131296337; - // aapt resource value: 0x7f090088 - public const int Notice = 2131296392; - - // aapt resource value: 0x7f09008c - public const int Password = 2131296396; - - // aapt resource value: 0x7f09008b - public const int PasswordLabel = 2131296395; - // aapt resource value: 0x7f09002b public const int SHIFT = 2131296299; - - // aapt resource value: 0x7f09008a - public const int SSID = 2131296394; - - // aapt resource value: 0x7f090089 - public const int SSIDLabel = 2131296393; // aapt resource value: 0x7f090056 public const int STROKE = 2131296342; @@ -3060,8 +3039,8 @@ // aapt resource value: 0x7f090053 public const int Translate = 2131296339; - // aapt resource value: 0x7f0900cb - public const int action0 = 2131296459; + // aapt resource value: 0x7f0900c0 + public const int action0 = 2131296448; // aapt resource value: 0x7f090079 public const int action_bar = 2131296377; @@ -3084,17 +3063,17 @@ // aapt resource value: 0x7f090057 public const int action_bar_title = 2131296343; - // aapt resource value: 0x7f0900c8 - public const int action_container = 2131296456; + // aapt resource value: 0x7f0900bd + public const int action_container = 2131296445; // aapt resource value: 0x7f09007a public const int action_context_bar = 2131296378; - // aapt resource value: 0x7f0900cf - public const int action_divider = 2131296463; + // aapt resource value: 0x7f0900c4 + public const int action_divider = 2131296452; - // aapt resource value: 0x7f0900c9 - public const int action_image = 2131296457; + // aapt resource value: 0x7f0900be + public const int action_image = 2131296446; // aapt resource value: 0x7f090003 public const int action_menu_divider = 2131296259; @@ -3111,11 +3090,11 @@ // aapt resource value: 0x7f090059 public const int action_mode_close_button = 2131296345; - // aapt resource value: 0x7f0900ca - public const int action_text = 2131296458; + // aapt resource value: 0x7f0900bf + public const int action_text = 2131296447; - // aapt resource value: 0x7f0900d8 - public const int actions = 2131296472; + // aapt resource value: 0x7f0900cd + public const int actions = 2131296461; // aapt resource value: 0x7f09005a public const int activity_chooser_view_content = 2131296346; @@ -3147,17 +3126,17 @@ // aapt resource value: 0x7f090032 public const int bottom = 2131296306; - // aapt resource value: 0x7f0900b3 - public const int btnCancel = 2131296435; + // aapt resource value: 0x7f0900a8 + public const int btnCancel = 2131296424; - // aapt resource value: 0x7f0900b5 - public const int btnSubmit = 2131296437; + // aapt resource value: 0x7f0900aa + public const int btnSubmit = 2131296426; // aapt resource value: 0x7f090060 public const int buttonPanel = 2131296352; - // aapt resource value: 0x7f0900cc - public const int cancel_action = 2131296460; + // aapt resource value: 0x7f0900c1 + public const int cancel_action = 2131296449; // aapt resource value: 0x7f09003a public const int center = 2131296314; @@ -3171,8 +3150,8 @@ // aapt resource value: 0x7f090070 public const int checkbox = 2131296368; - // aapt resource value: 0x7f0900d4 - public const int chronometer = 2131296468; + // aapt resource value: 0x7f0900c9 + public const int chronometer = 2131296457; // aapt resource value: 0x7f090043 public const int clip_horizontal = 2131296323; @@ -3183,20 +3162,20 @@ // aapt resource value: 0x7f09002e public const int collapseActionView = 2131296302; - // aapt resource value: 0x7f090099 - public const int container = 2131296409; + // aapt resource value: 0x7f09008e + public const int container = 2131296398; - // aapt resource value: 0x7f0900e4 - public const int contentFrame = 2131296484; + // aapt resource value: 0x7f0900d9 + public const int contentFrame = 2131296473; // aapt resource value: 0x7f090063 public const int contentPanel = 2131296355; - // aapt resource value: 0x7f0900b7 - public const int content_container = 2131296439; + // aapt resource value: 0x7f0900ac + public const int content_container = 2131296428; - // aapt resource value: 0x7f09009a - public const int coordinator = 2131296410; + // aapt resource value: 0x7f09008f + public const int coordinator = 2131296399; // aapt resource value: 0x7f09006a public const int custom = 2131296362; @@ -3204,8 +3183,8 @@ // aapt resource value: 0x7f090069 public const int customPanel = 2131296361; - // aapt resource value: 0x7f0900c3 - public const int day = 2131296451; + // aapt resource value: 0x7f0900b8 + public const int day = 2131296440; // aapt resource value: 0x7f090077 public const int decor_content_parent = 2131296375; @@ -3213,23 +3192,23 @@ // aapt resource value: 0x7f09005d public const int default_activity_button = 2131296349; - // aapt resource value: 0x7f090094 - public const int description = 2131296404; + // aapt resource value: 0x7f090089 + public const int description = 2131296393; - // aapt resource value: 0x7f09009c - public const int design_bottom_sheet = 2131296412; + // aapt resource value: 0x7f090091 + public const int design_bottom_sheet = 2131296401; - // aapt resource value: 0x7f0900a3 - public const int design_menu_item_action_area = 2131296419; + // aapt resource value: 0x7f090098 + public const int design_menu_item_action_area = 2131296408; - // aapt resource value: 0x7f0900a2 - public const int design_menu_item_action_area_stub = 2131296418; + // aapt resource value: 0x7f090097 + public const int design_menu_item_action_area_stub = 2131296407; - // aapt resource value: 0x7f0900a1 - public const int design_menu_item_text = 2131296417; + // aapt resource value: 0x7f090096 + public const int design_menu_item_text = 2131296406; - // aapt resource value: 0x7f0900a0 - public const int design_navigation_view = 2131296416; + // aapt resource value: 0x7f090095 + public const int design_navigation_view = 2131296405; // aapt resource value: 0x7f090015 public const int disableHome = 2131296277; @@ -3240,8 +3219,8 @@ // aapt resource value: 0x7f090025 public const int end = 2131296293; - // aapt resource value: 0x7f0900da - public const int end_padder = 2131296474; + // aapt resource value: 0x7f0900cf + public const int end_padder = 2131296463; // aapt resource value: 0x7f090034 public const int enterAlways = 2131296308; @@ -3267,8 +3246,8 @@ // aapt resource value: 0x7f09003d public const int fill_vertical = 2131296317; - // aapt resource value: 0x7f090095 - public const int fingerprint_icon = 2131296405; + // aapt resource value: 0x7f09008a + public const int fingerprint_icon = 2131296394; // aapt resource value: 0x7f090049 public const int @fixed = 2131296329; @@ -3276,56 +3255,56 @@ // aapt resource value: 0x7f09004d public const int forever = 2131296333; - // aapt resource value: 0x7f0900a8 - public const int gd_btn_back = 2131296424; - - // aapt resource value: 0x7f0900b1 - public const int gd_btn_myLocation = 2131296433; - - // aapt resource value: 0x7f0900b0 - public const int gd_btn_save = 2131296432; - - // aapt resource value: 0x7f0900ad - public const int gd_img_search_delete = 2131296429; - - // aapt resource value: 0x7f0900af - public const int gd_ll_myhome = 2131296431; - - // aapt resource value: 0x7f0900ab - public const int gd_ll_search = 2131296427; - - // aapt resource value: 0x7f0900aa - public const int gd_mapView = 2131296426; - - // aapt resource value: 0x7f0900a7 - public const int gd_rl_topview = 2131296423; - - // aapt resource value: 0x7f0900a9 - public const int gd_tv_activity_title = 2131296425; - - // aapt resource value: 0x7f0900ae - public const int gd_tv_radius = 2131296430; - - // aapt resource value: 0x7f0900ac - public const int gd_tv_search_title = 2131296428; - - // aapt resource value: 0x7f0900a5 - public const int hdl_gallery_rootView = 2131296421; + // aapt resource value: 0x7f09009d + public const int gd_btn_back = 2131296413; // aapt resource value: 0x7f0900a6 - public const int hdl_gallery_viewPager = 2131296422; + public const int gd_btn_myLocation = 2131296422; - // aapt resource value: 0x7f0900b9 - public const int hdl_options1 = 2131296441; + // aapt resource value: 0x7f0900a5 + public const int gd_btn_save = 2131296421; - // aapt resource value: 0x7f0900ba - public const int hdl_options2 = 2131296442; + // aapt resource value: 0x7f0900a2 + public const int gd_img_search_delete = 2131296418; - // aapt resource value: 0x7f0900bb - public const int hdl_options3 = 2131296443; + // aapt resource value: 0x7f0900a4 + public const int gd_ll_myhome = 2131296420; - // aapt resource value: 0x7f0900b8 - public const int hdl_pickerview_ll = 2131296440; + // aapt resource value: 0x7f0900a0 + public const int gd_ll_search = 2131296416; + + // aapt resource value: 0x7f09009f + public const int gd_mapView = 2131296415; + + // aapt resource value: 0x7f09009c + public const int gd_rl_topview = 2131296412; + + // aapt resource value: 0x7f09009e + public const int gd_tv_activity_title = 2131296414; + + // aapt resource value: 0x7f0900a3 + public const int gd_tv_radius = 2131296419; + + // aapt resource value: 0x7f0900a1 + public const int gd_tv_search_title = 2131296417; + + // aapt resource value: 0x7f09009a + public const int hdl_gallery_rootView = 2131296410; + + // aapt resource value: 0x7f09009b + public const int hdl_gallery_viewPager = 2131296411; + + // aapt resource value: 0x7f0900ae + public const int hdl_options1 = 2131296430; + + // aapt resource value: 0x7f0900af + public const int hdl_options2 = 2131296431; + + // aapt resource value: 0x7f0900b0 + public const int hdl_options3 = 2131296432; + + // aapt resource value: 0x7f0900ad + public const int hdl_pickerview_ll = 2131296429; // aapt resource value: 0x7f090005 public const int home = 2131296261; @@ -3333,14 +3312,14 @@ // aapt resource value: 0x7f090016 public const int homeAsUp = 2131296278; - // aapt resource value: 0x7f0900c4 - public const int hour = 2131296452; + // aapt resource value: 0x7f0900b9 + public const int hour = 2131296441; // aapt resource value: 0x7f09005f public const int icon = 2131296351; - // aapt resource value: 0x7f0900d9 - public const int icon_group = 2131296473; + // aapt resource value: 0x7f0900ce + public const int icon_group = 2131296462; // aapt resource value: 0x7f09002f public const int ifRoom = 2131296303; @@ -3348,8 +3327,8 @@ // aapt resource value: 0x7f09005c public const int image = 2131296348; - // aapt resource value: 0x7f0900d5 - public const int info = 2131296469; + // aapt resource value: 0x7f0900ca + public const int info = 2131296458; // aapt resource value: 0x7f09004e public const int italic = 2131296334; @@ -3357,8 +3336,8 @@ // aapt resource value: 0x7f090000 public const int item_touch_helper_previous_elevation = 2131296256; - // aapt resource value: 0x7f090098 - public const int largeLabel = 2131296408; + // aapt resource value: 0x7f09008d + public const int largeLabel = 2131296397; // aapt resource value: 0x7f09003e public const int left = 2131296318; @@ -3375,35 +3354,35 @@ // aapt resource value: 0x7f09005e public const int list_item = 2131296350; - // aapt resource value: 0x7f0900e6 - public const int masked = 2131296486; + // aapt resource value: 0x7f0900db + public const int masked = 2131296475; - // aapt resource value: 0x7f0900ce - public const int media_actions = 2131296462; + // aapt resource value: 0x7f0900c3 + public const int media_actions = 2131296451; - // aapt resource value: 0x7f0900e0 - public const int message = 2131296480; + // aapt resource value: 0x7f0900d5 + public const int message = 2131296469; // aapt resource value: 0x7f090026 public const int middle = 2131296294; - // aapt resource value: 0x7f0900c5 - public const int min = 2131296453; + // aapt resource value: 0x7f0900ba + public const int min = 2131296442; // aapt resource value: 0x7f090048 public const int mini = 2131296328; - // aapt resource value: 0x7f0900c2 - public const int month = 2131296450; + // aapt resource value: 0x7f0900b7 + public const int month = 2131296439; // aapt resource value: 0x7f09001c public const int multiply = 2131296284; - // aapt resource value: 0x7f0900c7 - public const int myButton = 2131296455; + // aapt resource value: 0x7f0900bc + public const int myButton = 2131296444; - // aapt resource value: 0x7f09009f - public const int navigation_header_container = 2131296415; + // aapt resource value: 0x7f090094 + public const int navigation_header_container = 2131296404; // aapt resource value: 0x7f090030 public const int never = 2131296304; @@ -3414,29 +3393,29 @@ // aapt resource value: 0x7f090013 public const int normal = 2131296275; - // aapt resource value: 0x7f0900d7 - public const int notification_background = 2131296471; + // aapt resource value: 0x7f0900cc + public const int notification_background = 2131296460; - // aapt resource value: 0x7f0900d1 - public const int notification_main_column = 2131296465; + // aapt resource value: 0x7f0900c6 + public const int notification_main_column = 2131296454; - // aapt resource value: 0x7f0900d0 - public const int notification_main_column_container = 2131296464; + // aapt resource value: 0x7f0900c5 + public const int notification_main_column_container = 2131296453; - // aapt resource value: 0x7f0900bd - public const int options1 = 2131296445; + // aapt resource value: 0x7f0900b2 + public const int options1 = 2131296434; - // aapt resource value: 0x7f0900be - public const int options2 = 2131296446; + // aapt resource value: 0x7f0900b3 + public const int options2 = 2131296435; - // aapt resource value: 0x7f0900bf - public const int options3 = 2131296447; + // aapt resource value: 0x7f0900b4 + public const int options3 = 2131296436; - // aapt resource value: 0x7f0900bc - public const int optionspicker = 2131296444; + // aapt resource value: 0x7f0900b1 + public const int optionspicker = 2131296433; - // aapt resource value: 0x7f0900b6 - public const int outmost_container = 2131296438; + // aapt resource value: 0x7f0900ab + public const int outmost_container = 2131296427; // aapt resource value: 0x7f090041 public const int parallax = 2131296321; @@ -3459,14 +3438,14 @@ // aapt resource value: 0x7f09003f public const int right = 2131296319; - // aapt resource value: 0x7f0900d6 - public const int right_icon = 2131296470; + // aapt resource value: 0x7f0900cb + public const int right_icon = 2131296459; - // aapt resource value: 0x7f0900d2 - public const int right_side = 2131296466; + // aapt resource value: 0x7f0900c7 + public const int right_side = 2131296455; - // aapt resource value: 0x7f0900b2 - public const int rv_topbar = 2131296434; + // aapt resource value: 0x7f0900a7 + public const int rv_topbar = 2131296423; // aapt resource value: 0x7f09001d public const int screen = 2131296285; @@ -3516,8 +3495,8 @@ // aapt resource value: 0x7f090086 public const int search_voice_btn = 2131296390; - // aapt resource value: 0x7f0900c6 - public const int second = 2131296454; + // aapt resource value: 0x7f0900bb + public const int second = 2131296443; // aapt resource value: 0x7f090087 public const int select_dialog_listview = 2131296391; @@ -3534,14 +3513,14 @@ // aapt resource value: 0x7f09001a public const int showTitle = 2131296282; - // aapt resource value: 0x7f090097 - public const int smallLabel = 2131296407; + // aapt resource value: 0x7f09008c + public const int smallLabel = 2131296396; - // aapt resource value: 0x7f09009e - public const int snackbar_action = 2131296414; + // aapt resource value: 0x7f090093 + public const int snackbar_action = 2131296403; - // aapt resource value: 0x7f09009d - public const int snackbar_text = 2131296413; + // aapt resource value: 0x7f090092 + public const int snackbar_text = 2131296402; // aapt resource value: 0x7f090038 public const int snap = 2131296312; @@ -3561,41 +3540,29 @@ // aapt resource value: 0x7f090020 public const int src_over = 2131296288; - // aapt resource value: 0x7f0900db - public const int srl_classics_arrow = 2131296475; + // aapt resource value: 0x7f0900d0 + public const int srl_classics_arrow = 2131296464; - // aapt resource value: 0x7f0900de - public const int srl_classics_center = 2131296478; + // aapt resource value: 0x7f0900d3 + public const int srl_classics_center = 2131296467; - // aapt resource value: 0x7f0900dd - public const int srl_classics_progress = 2131296477; + // aapt resource value: 0x7f0900d2 + public const int srl_classics_progress = 2131296466; - // aapt resource value: 0x7f0900dc - public const int srl_classics_title = 2131296476; + // aapt resource value: 0x7f0900d1 + public const int srl_classics_title = 2131296465; - // aapt resource value: 0x7f0900df - public const int srl_classics_update = 2131296479; + // aapt resource value: 0x7f0900d4 + public const int srl_classics_update = 2131296468; // aapt resource value: 0x7f090040 public const int start = 2131296320; - // aapt resource value: 0x7f09008f - public const int startV1 = 2131296399; + // aapt resource value: 0x7f09008b + public const int status = 2131296395; - // aapt resource value: 0x7f090091 - public const int startV1V4 = 2131296401; - - // aapt resource value: 0x7f090090 - public const int startV4 = 2131296400; - - // aapt resource value: 0x7f090096 - public const int status = 2131296406; - - // aapt resource value: 0x7f0900cd - public const int status_bar_latest_event_content = 2131296461; - - // aapt resource value: 0x7f090092 - public const int stop = 2131296402; + // aapt resource value: 0x7f0900c2 + public const int status_bar_latest_event_content = 2131296450; // aapt resource value: 0x7f090073 public const int submenuarrow = 2131296371; @@ -3603,8 +3570,8 @@ // aapt resource value: 0x7f090084 public const int submit_area = 2131296388; - // aapt resource value: 0x7f090093 - public const int subtitle = 2131296403; + // aapt resource value: 0x7f090088 + public const int subtitle = 2131296392; // aapt resource value: 0x7f090014 public const int tabMode = 2131296276; @@ -3621,8 +3588,8 @@ // aapt resource value: 0x7f090066 public const int textSpacerNoTitle = 2131296358; - // aapt resource value: 0x7f0900a4 - public const int text_input_password_toggle = 2131296420; + // aapt resource value: 0x7f090099 + public const int text_input_password_toggle = 2131296409; // aapt resource value: 0x7f09000a public const int textinput_counter = 2131296266; @@ -3630,11 +3597,11 @@ // aapt resource value: 0x7f09000b public const int textinput_error = 2131296267; - // aapt resource value: 0x7f0900d3 - public const int time = 2131296467; + // aapt resource value: 0x7f0900c8 + public const int time = 2131296456; - // aapt resource value: 0x7f0900c0 - public const int timepicker = 2131296448; + // aapt resource value: 0x7f0900b5 + public const int timepicker = 2131296437; // aapt resource value: 0x7f090011 public const int title = 2131296273; @@ -3651,20 +3618,20 @@ // aapt resource value: 0x7f09006b public const int topPanel = 2131296363; - // aapt resource value: 0x7f09009b - public const int touch_outside = 2131296411; + // aapt resource value: 0x7f090090 + public const int touch_outside = 2131296400; - // aapt resource value: 0x7f0900b4 - public const int tvTitle = 2131296436; + // aapt resource value: 0x7f0900a9 + public const int tvTitle = 2131296425; - // aapt resource value: 0x7f0900e2 - public const int tv_zxing_back = 2131296482; + // aapt resource value: 0x7f0900d7 + public const int tv_zxing_back = 2131296471; - // aapt resource value: 0x7f0900e3 - public const int tv_zxing_flash = 2131296483; + // aapt resource value: 0x7f0900d8 + public const int tv_zxing_flash = 2131296472; - // aapt resource value: 0x7f0900e1 - public const int tv_zxing_scan = 2131296481; + // aapt resource value: 0x7f0900d6 + public const int tv_zxing_scan = 2131296470; // aapt resource value: 0x7f090022 public const int uniform = 2131296290; @@ -3678,8 +3645,8 @@ // aapt resource value: 0x7f09000c public const int view_offset_helper = 2131296268; - // aapt resource value: 0x7f0900e5 - public const int visible = 2131296485; + // aapt resource value: 0x7f0900da + public const int visible = 2131296474; // aapt resource value: 0x7f090031 public const int withText = 2131296305; @@ -3687,8 +3654,8 @@ // aapt resource value: 0x7f090023 public const int wrap_content = 2131296291; - // aapt resource value: 0x7f0900c1 - public const int year = 2131296449; + // aapt resource value: 0x7f0900b6 + public const int year = 2131296438; static Id() { @@ -3831,157 +3798,154 @@ public const int abc_select_dialog_material = 2130968602; // aapt resource value: 0x7f04001b - public const int activity_elian = 2130968603; + public const int biometric_prompt_dialog_content = 2130968603; // aapt resource value: 0x7f04001c - public const int biometric_prompt_dialog_content = 2130968604; + public const int design_bottom_navigation_item = 2130968604; // aapt resource value: 0x7f04001d - public const int design_bottom_navigation_item = 2130968605; + public const int design_bottom_sheet_dialog = 2130968605; // aapt resource value: 0x7f04001e - public const int design_bottom_sheet_dialog = 2130968606; + public const int design_layout_snackbar = 2130968606; // aapt resource value: 0x7f04001f - public const int design_layout_snackbar = 2130968607; + public const int design_layout_snackbar_include = 2130968607; // aapt resource value: 0x7f040020 - public const int design_layout_snackbar_include = 2130968608; + public const int design_layout_tab_icon = 2130968608; // aapt resource value: 0x7f040021 - public const int design_layout_tab_icon = 2130968609; + public const int design_layout_tab_text = 2130968609; // aapt resource value: 0x7f040022 - public const int design_layout_tab_text = 2130968610; + public const int design_menu_item_action_area = 2130968610; // aapt resource value: 0x7f040023 - public const int design_menu_item_action_area = 2130968611; + public const int design_navigation_item = 2130968611; // aapt resource value: 0x7f040024 - public const int design_navigation_item = 2130968612; + public const int design_navigation_item_header = 2130968612; // aapt resource value: 0x7f040025 - public const int design_navigation_item_header = 2130968613; + public const int design_navigation_item_separator = 2130968613; // aapt resource value: 0x7f040026 - public const int design_navigation_item_separator = 2130968614; + public const int design_navigation_item_subheader = 2130968614; // aapt resource value: 0x7f040027 - public const int design_navigation_item_subheader = 2130968615; + public const int design_navigation_menu = 2130968615; // aapt resource value: 0x7f040028 - public const int design_navigation_menu = 2130968616; + public const int design_navigation_menu_item = 2130968616; // aapt resource value: 0x7f040029 - public const int design_navigation_menu_item = 2130968617; + public const int design_text_input_password_icon = 2130968617; // aapt resource value: 0x7f04002a - public const int design_text_input_password_icon = 2130968618; + public const int hdl_gallery_banner_view_layout = 2130968618; // aapt resource value: 0x7f04002b - public const int hdl_gallery_banner_view_layout = 2130968619; + public const int hdl_widget_activity_crop_image = 2130968619; // aapt resource value: 0x7f04002c - public const int hdl_widget_activity_crop_image = 2130968620; + public const int hdl_widget_activity_geofence_round = 2130968620; // aapt resource value: 0x7f04002d - public const int hdl_widget_activity_geofence_round = 2130968621; + public const int hdl_widget_air_button = 2130968621; // aapt resource value: 0x7f04002e - public const int hdl_widget_air_button = 2130968622; + public const int hdl_widget_include_pickerview_topbar = 2130968622; // aapt resource value: 0x7f04002f - public const int hdl_widget_include_pickerview_topbar = 2130968623; + public const int hdl_widget_layout_basepickerview = 2130968623; // aapt resource value: 0x7f040030 - public const int hdl_widget_layout_basepickerview = 2130968624; + public const int hdl_widget_pickerview = 2130968624; // aapt resource value: 0x7f040031 - public const int hdl_widget_pickerview = 2130968625; + public const int hdl_widget_pickerview_options = 2130968625; // aapt resource value: 0x7f040032 - public const int hdl_widget_pickerview_options = 2130968626; + public const int hdl_widget_pickerview_time = 2130968626; // aapt resource value: 0x7f040033 - public const int hdl_widget_pickerview_time = 2130968627; + public const int Main = 2130968627; // aapt resource value: 0x7f040034 - public const int Main = 2130968628; + public const int notification_action = 2130968628; // aapt resource value: 0x7f040035 - public const int notification_action = 2130968629; + public const int notification_action_tombstone = 2130968629; // aapt resource value: 0x7f040036 - public const int notification_action_tombstone = 2130968630; + public const int notification_media_action = 2130968630; // aapt resource value: 0x7f040037 - public const int notification_media_action = 2130968631; + public const int notification_media_cancel_action = 2130968631; // aapt resource value: 0x7f040038 - public const int notification_media_cancel_action = 2130968632; + public const int notification_template_big_media = 2130968632; // aapt resource value: 0x7f040039 - public const int notification_template_big_media = 2130968633; + public const int notification_template_big_media_custom = 2130968633; // aapt resource value: 0x7f04003a - public const int notification_template_big_media_custom = 2130968634; + public const int notification_template_big_media_narrow = 2130968634; // aapt resource value: 0x7f04003b - public const int notification_template_big_media_narrow = 2130968635; + public const int notification_template_big_media_narrow_custom = 2130968635; // aapt resource value: 0x7f04003c - public const int notification_template_big_media_narrow_custom = 2130968636; + public const int notification_template_custom_big = 2130968636; // aapt resource value: 0x7f04003d - public const int notification_template_custom_big = 2130968637; + public const int notification_template_icon_group = 2130968637; // aapt resource value: 0x7f04003e - public const int notification_template_icon_group = 2130968638; + public const int notification_template_lines_media = 2130968638; // aapt resource value: 0x7f04003f - public const int notification_template_lines_media = 2130968639; + public const int notification_template_media = 2130968639; // aapt resource value: 0x7f040040 - public const int notification_template_media = 2130968640; + public const int notification_template_media_custom = 2130968640; // aapt resource value: 0x7f040041 - public const int notification_template_media_custom = 2130968641; + public const int notification_template_part_chronometer = 2130968641; // aapt resource value: 0x7f040042 - public const int notification_template_part_chronometer = 2130968642; + public const int notification_template_part_time = 2130968642; // aapt resource value: 0x7f040043 - public const int notification_template_part_time = 2130968643; + public const int select_dialog_item_material = 2130968643; // aapt resource value: 0x7f040044 - public const int select_dialog_item_material = 2130968644; + public const int select_dialog_multichoice_material = 2130968644; // aapt resource value: 0x7f040045 - public const int select_dialog_multichoice_material = 2130968645; + public const int select_dialog_singlechoice_material = 2130968645; // aapt resource value: 0x7f040046 - public const int select_dialog_singlechoice_material = 2130968646; + public const int srl_classics_footer = 2130968646; // aapt resource value: 0x7f040047 - public const int srl_classics_footer = 2130968647; + public const int srl_classics_header = 2130968647; // aapt resource value: 0x7f040048 - public const int srl_classics_header = 2130968648; + public const int support_simple_spinner_dropdown_item = 2130968648; // aapt resource value: 0x7f040049 - public const int support_simple_spinner_dropdown_item = 2130968649; + public const int tooltip = 2130968649; // aapt resource value: 0x7f04004a - public const int tooltip = 2130968650; + public const int zxing_layout = 2130968650; // aapt resource value: 0x7f04004b - public const int zxing_layout = 2130968651; + public const int zxingscanneractivitylayout = 2130968651; // aapt resource value: 0x7f04004c - public const int zxingscanneractivitylayout = 2130968652; - - // aapt resource value: 0x7f04004d - public const int zxingscannerfragmentlayout = 2130968653; + public const int zxingscannerfragmentlayout = 2130968652; static Layout() { diff --git a/ZigbeeApp/Home.Ios/Home.IOS.csproj b/ZigbeeApp/Home.Ios/Home.IOS.csproj index 75bf261..b35a4ba 100644 --- a/ZigbeeApp/Home.Ios/Home.IOS.csproj +++ b/ZigbeeApp/Home.Ios/Home.IOS.csproj @@ -227,6 +227,7 @@ <BundleResource Include="Resources\Phone\Instruct\AirSwitchCloudContr.png" /> <BundleResource Include="Resources\Phone\Instruct\SensorTemperatureHumidity.png" /> <BundleResource Include="Resources\Phone\Instruct\PanelFangyueTwoButton.png" /> + <BundleResource Include="Resources\Phone\Instruct\ButtonPanelSimpleEnvironment.png" /> <BundleResource Include="Resources\Phone\Instruct\PanelCurtain.png" /> <BundleResource Include="Resources\Phone\Instruct\PanelFangyueFourButton.png" /> <BundleResource Include="Resources\Phone\Instruct\PanelFourButton.png" /> @@ -234,6 +235,7 @@ <BundleResource Include="Resources\Phone\Instruct\SensorCeilingGas.png" /> <BundleResource Include="Resources\Phone\Instruct\IntelligentLocksH06C.png" /> <BundleResource Include="Resources\Phone\Instruct\SensorDoorWindow.png" /> + <BundleResource Include="Resources\Phone\Instruct\ButtonPanelSimpleMultifunction.png" /> <BundleResource Include="Resources\Phone\Instruct\SensorFire.png" /> <BundleResource Include="Resources\Phone\Instruct\SensorPMTwoPointFive.png" /> <BundleResource Include="Resources\Phone\Instruct\PanelThreeButton.png" /> @@ -344,6 +346,7 @@ <BundleResource Include="Resources\Phone\SceneCardIcon\3.png" /> <BundleResource Include="Resources\Phone\SceneCardIcon\1.png" /> <BundleResource Include="Resources\Phone\SceneCardIcon\0.png" /> + <BundleResource Include="Resources\Phone\DeviceItem\MiniNightLightDevice.png" /> <BundleResource Include="Resources\Phone\DeviceItem\PanelFangyueTwoButtonTable.png" /> <BundleResource Include="Resources\Phone\DeviceItem\PanelTable.png" /> <BundleResource Include="Resources\Phone\DeviceItem\PanelFangyueEightButtonTable.png" /> @@ -693,6 +696,8 @@ <BundleResource Include="Resources\Phone\Device\ButtonPanelTwo.png" /> <BundleResource Include="Resources\Phone\Device\RelayEpointSelected2.png" /> <BundleResource Include="Resources\Phone\Device\ConverterZb485Selected2.png" /> + <BundleResource Include="Resources\Phone\Device\ButtonPanelSimpleMultifunctionSelected2.png" /> + <BundleResource Include="Resources\Phone\Device\ButtonPanelCurtainSelected2.png" /> <BundleResource Include="Resources\Phone\Device\DimmableLightSelected2.png" /> <BundleResource Include="Resources\Phone\Device\SensorPir.png" /> <BundleResource Include="Resources\Phone\Device\SensorFireSelected2.png" /> @@ -751,6 +756,7 @@ <BundleResource Include="Resources\Phone\Device\RelaySelected.png" /> <BundleResource Include="Resources\Phone\Device\Socket1Selected.png" /> <BundleResource Include="Resources\Phone\Device\IntelligentLocks.png" /> + <BundleResource Include="Resources\Phone\Device\ButtonPanelSimpleEnvironment.png" /> <BundleResource Include="Resources\Phone\Device\ConverterZb485Selected.png" /> <BundleResource Include="Resources\Phone\Device\ColorLightSelected.png" /> <BundleResource Include="Resources\Phone\Device\AirSwitch.png" /> @@ -765,14 +771,20 @@ <BundleResource Include="Resources\Phone\Device\ButtonPanelFangyueEightSelected.png" /> <BundleResource Include="Resources\Phone\Device\ButtonPanelFangyueEnvironment.png" /> <BundleResource Include="Resources\Phone\Device\ButtonPanelOneSelected2.png" /> + <BundleResource Include="Resources\Phone\Device\ButtonPanelSimpleMultifunctionSelected.png" /> <BundleResource Include="Resources\Phone\Device\AirConditionerEpoint.png" /> <BundleResource Include="Resources\Phone\Device\SensorTemperatureHumiditySelected2.png" /> <BundleResource Include="Resources\Phone\Device\AirConditionerEpointSelected2.png" /> + <BundleResource Include="Resources\Phone\Device\SensorPMTwoPointFiveSelected2.png" /> <BundleResource Include="Resources\Phone\Device\DryContactSelected.png" /> <BundleResource Include="Resources\Phone\Device\CurtainSelected.png" /> + <BundleResource Include="Resources\Phone\Device\MiniNightLight.png" /> + <BundleResource Include="Resources\Phone\Device\ButtonPanelSimpleEnvironmentSelected.png" /> <BundleResource Include="Resources\Phone\Device\Converter.png" /> + <BundleResource Include="Resources\Phone\Device\MiniNightLightSelected.png" /> <BundleResource Include="Resources\Phone\Device\AirConditioner.png" /> <BundleResource Include="Resources\Phone\Device\SensorFireSelected.png" /> + <BundleResource Include="Resources\Phone\Device\MiniNightLightSelected2.png" /> <BundleResource Include="Resources\Phone\Device\ColorLight.png" /> <BundleResource Include="Resources\Phone\Device\AirConditionerZbGatewaySelected.png" /> <BundleResource Include="Resources\Phone\Device\AirQualitySensorEpointSelected2.png" /> @@ -793,9 +805,11 @@ <BundleResource Include="Resources\Phone\Device\ButtonPanelThreeSelected.png" /> <BundleResource Include="Resources\Phone\Device\IntelligentLocksH06C.png" /> <BundleResource Include="Resources\Phone\Device\ButtonPanelFangyueEightSelected2.png" /> + <BundleResource Include="Resources\Phone\Device\SensorPMTwoPointFiveSelected.png" /> <BundleResource Include="Resources\Phone\Device\IntelligentLocksSelected2.png" /> <BundleResource Include="Resources\Phone\Device\CurtainSiphonateSelected.png" /> <BundleResource Include="Resources\Phone\Device\SensorDoorWindow.png" /> + <BundleResource Include="Resources\Phone\Device\ButtonPanelSimpleMultifunction.png" /> <BundleResource Include="Resources\Phone\Device\ButtonPanelOne.png" /> <BundleResource Include="Resources\Phone\Device\ButtonPanelFangyueEight.png" /> <BundleResource Include="Resources\Phone\Device\CurtainAutoOpenSelected2.png" /> @@ -821,6 +835,7 @@ <BundleResource Include="Resources\Phone\Device\DimmableLightOneLoad.png" /> <BundleResource Include="Resources\Phone\Device\SensorHumiditySelected2.png" /> <BundleResource Include="Resources\Phone\Device\SensorPirSelected2.png" /> + <BundleResource Include="Resources\Phone\Device\ButtonPanelSimpleEnvironmentSelected2.png" /> <BundleResource Include="Resources\Phone\Device\AirSwitchCloudContrSelected.png" /> <BundleResource Include="Resources\Phone\Device\ButtonPanelFangyueTwo.png" /> <BundleResource Include="Resources\Phone\Device\RelayEpoint.png" /> @@ -829,6 +844,7 @@ <BundleResource Include="Resources\Phone\Device\SensorWater.png" /> <BundleResource Include="Resources\Phone\Device\ButtonPanelThreeSelected2.png" /> <BundleResource Include="Resources\Phone\Device\SensorSelected.png" /> + <BundleResource Include="Resources\Phone\Device\ButtonPanelFangyueFreshAirSelected2.png" /> <BundleResource Include="Resources\Phone\Device\SensorTemperatureHumiditySelected.png" /> <BundleResource Include="Resources\Phone\Device\ButtonPanelFangyueFourSelected2.png" /> <BundleResource Include="Resources\Phone\Device\ButtonPanelFangyueEnvironmentSelected2.png" /> @@ -1002,12 +1018,14 @@ <BundleResource Include="Resources\Phone\RealDevice\Repeater.png" /> <BundleResource Include="Resources\Phone\RealDevice\SensorTemperatrueHumidity.png" /> <BundleResource Include="Resources\Phone\RealDevice\ButtonPanelFangyueFour.png" /> + <BundleResource Include="Resources\Phone\RealDevice\ButtonPanelSimpleEnvironment.png" /> <BundleResource Include="Resources\Phone\RealDevice\CommonDevice.png" /> <BundleResource Include="Resources\Phone\RealDevice\ButtonPanelFangyueEnvironment.png" /> <BundleResource Include="Resources\Phone\RealDevice\AirConditionerZbGateway.png" /> <BundleResource Include="Resources\Phone\RealDevice\SensorCeilingGas.png" /> <BundleResource Include="Resources\Phone\RealDevice\IntelligentLocksH06C.png" /> <BundleResource Include="Resources\Phone\RealDevice\SensorDoorWindow.png" /> + <BundleResource Include="Resources\Phone\RealDevice\ButtonPanelSimpleMultifunction.png" /> <BundleResource Include="Resources\Phone\RealDevice\ButtonPanelFangyueEight.png" /> <BundleResource Include="Resources\Phone\RealDevice\SensorFire.png" /> <BundleResource Include="Resources\Phone\RealDevice\ButtonPanelThree.png" /> @@ -1017,15 +1035,18 @@ <BundleResource Include="Resources\Phone\RealDevice\ButtonPanelFangyueTwo.png" /> <BundleResource Include="Resources\Phone\RealDevice\SensorWater.png" /> <BundleResource Include="Resources\Phone\Gateway\WiredGatewaySearching.png" /> + <BundleResource Include="Resources\Phone\Gateway\MiniGatewaySearching.png" /> <BundleResource Include="Resources\Phone\Gateway\WirelessGatewaySearching.png" /> + <BundleResource Include="Resources\Phone\Gateway\MiniGateway.png" /> + <BundleResource Include="Resources\Phone\Gateway\MiniGatewayDirection.png" /> <BundleResource Include="Resources\Phone\Gateway\GatewayIcon_6.png" /> - <BundleResource Include="Resources\Phone\Gateway\RealGateway6.png" /> <BundleResource Include="Resources\Phone\Gateway\RealGateway.png" /> - <BundleResource Include="Resources\Phone\Gateway\RealGateway1.png" /> <BundleResource Include="Resources\Phone\Gateway\WiredGatewayInstruct.png" /> <BundleResource Include="Resources\Phone\Gateway\WirelessApDirection.png" /> + <BundleResource Include="Resources\Phone\Gateway\GatewayIcon11.png" /> <BundleResource Include="Resources\Phone\Gateway\GatewayIcon1.png" /> <BundleResource Include="Resources\Phone\Gateway\WirelessApGatewaySearching.png" /> + <BundleResource Include="Resources\Phone\Gateway\RealGateway11.png" /> <BundleResource Include="Resources\Phone\Gateway\GatewayIcon6.png" /> <BundleResource Include="Resources\Phone\Gateway\WiredGateway.png" /> <BundleResource Include="Resources\Phone\Gateway\WirelessGateway.png" /> diff --git a/ZigbeeApp/Home.Ios/Resources/Language.ini b/ZigbeeApp/Home.Ios/Resources/Language.ini index cd9328d..90368fb 100755 --- a/ZigbeeApp/Home.Ios/Resources/Language.ini +++ b/ZigbeeApp/Home.Ios/Resources/Language.ini @@ -253,7 +253,7 @@ 249=鎮ㄧ殑甯稿紑妯″紡灏嗚鍙栨秷 250=淇濇寔甯稿紑 251=纭鍙栨秷 -252=(鏈鎿嶄綔浠呬负鍗曟鍙栨秷锛岃嫢闇�瑕佸仠姝㈡墽琛岃嚜鍔ㄥ寲锛岃閫夋嫨鍒嗙被-鑷姩鍖栬繘琛岃缃�) +252=(鏈鎿嶄綔浠呬负鍗曟鍙栨秷锛岃嫢闇�瑕佸仠姝㈡墽琛岃嚜鍔ㄥ寲锛岃鍒板父寮�鑷姩鍖栬缃�) 253=鑾峰彇闂ㄩ攣甯稿紑妯″紡澶辫触 254=鎵撳紑闂ㄩ攣甯稿紑妯″紡鎴愬姛 255=鎵撳紑闂ㄩ攣甯稿紑妯″紡澶辫触 @@ -323,6 +323,12 @@ 320=涓害姹℃煋 321=閲嶅害姹℃煋 322=涓ラ噸姹℃煋 +323=鑷姩鍖栧叧闂�愰棬閿佸父寮�妯″紡銆戯紝闂ㄩ攣宸插叧 +324=鍏ョ綉 +;娉ㄦ剰鈥滃叆缃戔�濈殑鑻辨枃鈥淐onnection",鍥犱负灞忓箷涓婃槸杩欐牱鏄剧ず鐨� +325=鎵撳紑闈㈡澘涓昏彍鍗曪紝鍙充笂瑙掔偣鍑粄0}璁剧疆鎸夐挳锛岀偣鍑诲叆缃� +326=闀挎寜鈥滃紑鍏斥�濇寜閿�5绉掞紝鎵�鏈夌伅姣忚繘琛寋0}2娆′寒鏆楀垏鎹紝鍗冲叆缃戞垚鍔� +327=闀挎寜鈥滃紑鍏斥�濇寜閿�5绉� 5097=鍙栨秷 5098=纭畾 @@ -603,8 +609,7 @@ 5402=鏃舵晥鎬у父寮�灏嗚 5403=鍒嗗叧闂� 5404=鏃� - - +5405=绫� 10000=HDL Home 10001=甯哥敤 @@ -1163,7 +1168,7 @@ 15391=鏄惁閲嶆柊鍒锋柊{0}缃戝叧? 15392=鍥炶矾 15393=鐕冩皵娉勬紡 -15394=鏈変笉鏄庣墿浣撶粡杩� +15394=鏈変汉缁忚繃 15395=绱ф�ユ寜閽鎸変笅 15396=瑙﹀彂浼犳劅鍣ㄦ姤璀� 15397=缂栬緫缃戝叧淇℃伅 @@ -1719,7 +1724,7 @@ 15978=閫氫俊閾炬帴澶辫触 15979=鑾峰彇缃戠粶SSID澶辫触 15980=瀵嗙爜鍙戦�佸け璐� -15981=閫夋嫨hdlZigbeeGW-xxxx缃戠粶 +15981=璇烽�夋嫨hdlZigbeeGW-xxxx缃戠粶 15982=璇疯繛鎺ュ搴璚iFi 15983=姝e湪鑾峰彇鍒嗕韩鏁版嵁 15984=璇峰厛鍘昏缃墜鏈鸿繛鎺ュ埌璺敱鍣▄0}鐒跺悗闀挎寜缃戝叧HID/WCFG鎸夐敭澶ф20绉抺0}鐩村埌绯荤粺鎸囩ず鐏揩闂獅0}缃戝叧杩涘叆UDP妯″紡WIFI閰嶇綉 @@ -1860,6 +1865,14 @@ 16119=DATA缁胯壊鎸囩ず鐏棯鐑� 16120=鑱旂郴鏂瑰紡 16121=璇疯緭鍏ユ偍鐨勮仈绯绘柟寮� +16122=璇ュ唴瀹逛笉鑳界渷鐣� +16123=Mini缃戝叧 +16124=娣诲姞Mini缃戝叧 +16125=鎻掔數鍚�,闀挎寜缃戝叧HID/WCFG鎸夐敭5绉抺0}绯荤粺鐏父浜�60绉掑悗鍒欒繘鍏ラ厤缃戠姸鎬� +16126=璇烽�夋嫨widora-xxxx缃戠粶 +16127=鎵嬫満鍘昏缃繛鎺ョ綉鍏崇儹鐐箋0}閫夋嫨widora-xxxx缃戠粶 +16128=鑹叉俯 +16129=Mini澶滅伅 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽� 18004=鎸囧畾缃戝叧宸茬粡琚粦瀹� @@ -1989,6 +2002,9 @@ 30038=鏂规偊鏂伴灏忔ā鍧� 30039=Zigbee鍚搁《鐕冩皵浼犳劅鍣� 30040=PM2.5绌烘皵璐ㄩ噺浼犳劅鍣� +30041=绠�绾﹀鍔熻兘闈㈡澘 +30042=绠�绾︾幆澧冮潰鏉� +30043=Mini缃戝叧 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄澶囨墍灞炵绫荤殑缈昏瘧鍚嶅瓧,浠�40000寮�濮嬧槄鈽呪槄鈽� 40000=閬槼 @@ -2054,6 +2070,9 @@ 50038=鏂伴鎺у埗灏忔ā鍧� 50039=Zigbee鍚搁《鐕冩皵浼犳劅鍣� 50040=PM2.5绌烘皵璐ㄩ噺浼犳劅鍣� +50041=绠�绾﹀鍔熻兘闈㈡澘 +50042=绠�绾︾幆澧冮潰鏉� +50043=Mini缃戝叧 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勮澶囩被鍨嬪悕瀛�,浠�60000寮�濮�.娉�:瀹冨苟涓嶉渶瑕佸啀R.cs鏂囦欢涓畾涔夆槄鈽呪槄鈽� 60000=浼犳劅鍣� @@ -2096,4 +2115,6 @@ 70023=涓户鍣� 70024=鏅鸿兘绌哄紑 70025=鍚搁《鐕冩皵浼犳劅鍣� -70026=PM2.5绌烘皵璐ㄩ噺浼犳劅鍣� \ No newline at end of file +70026=PM2.5绌烘皵璐ㄩ噺浼犳劅鍣� +70027=绠�绾﹀鍔熻兘闈㈡澘 +70028=绠�绾︾幆澧冮潰鏉� \ No newline at end of file diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelCurtainSelected2.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelCurtainSelected2.png new file mode 100755 index 0000000..6e4c3ab --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelCurtainSelected2.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelFangyueFreshAirSelected2.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelFangyueFreshAirSelected2.png new file mode 100755 index 0000000..400f73c --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelFangyueFreshAirSelected2.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleEnvironment.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleEnvironment.png new file mode 100755 index 0000000..b600be5 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleEnvironment.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleEnvironmentSelected.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleEnvironmentSelected.png new file mode 100755 index 0000000..470608c --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleEnvironmentSelected.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleEnvironmentSelected2.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleEnvironmentSelected2.png new file mode 100755 index 0000000..0432723 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleEnvironmentSelected2.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleMultifunction.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleMultifunction.png new file mode 100755 index 0000000..e295871 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleMultifunction.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleMultifunctionSelected.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleMultifunctionSelected.png new file mode 100755 index 0000000..347ffc4 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleMultifunctionSelected.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleMultifunctionSelected2.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleMultifunctionSelected2.png new file mode 100755 index 0000000..e6c8858 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/ButtonPanelSimpleMultifunctionSelected2.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/MiniNightLight.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/MiniNightLight.png new file mode 100755 index 0000000..2dd6011 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/MiniNightLight.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/MiniNightLightSelected.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/MiniNightLightSelected.png new file mode 100755 index 0000000..b818891 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/MiniNightLightSelected.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/MiniNightLightSelected2.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/MiniNightLightSelected2.png new file mode 100755 index 0000000..28ed84b --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/MiniNightLightSelected2.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorPMTwoPointFiveSelected.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorPMTwoPointFiveSelected.png new file mode 100755 index 0000000..61f33fa --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorPMTwoPointFiveSelected.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorPMTwoPointFiveSelected2.png b/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorPMTwoPointFiveSelected2.png new file mode 100755 index 0000000..1628d3d --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorPMTwoPointFiveSelected2.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/DeviceItem/MiniNightLightDevice.png b/ZigbeeApp/Home.Ios/Resources/Phone/DeviceItem/MiniNightLightDevice.png new file mode 100755 index 0000000..5adfc32 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/DeviceItem/MiniNightLightDevice.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/GatewayIcon11.png b/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/GatewayIcon11.png new file mode 100755 index 0000000..2dd6011 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/GatewayIcon11.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/MiniGateway.png b/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/MiniGateway.png new file mode 100755 index 0000000..2dd6011 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/MiniGateway.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/MiniGatewayDirection.png b/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/MiniGatewayDirection.png new file mode 100755 index 0000000..2286140 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/MiniGatewayDirection.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/MiniGatewaySearching.png b/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/MiniGatewaySearching.png new file mode 100755 index 0000000..b1a3fd7 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/MiniGatewaySearching.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/RealGateway1.png b/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/RealGateway1.png deleted file mode 100755 index 9214cf4..0000000 --- a/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/RealGateway1.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/RealGateway11.png b/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/RealGateway11.png new file mode 100755 index 0000000..bd7d1ed --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/RealGateway11.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/RealGateway6.png b/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/RealGateway6.png deleted file mode 100755 index c338f88..0000000 --- a/ZigbeeApp/Home.Ios/Resources/Phone/Gateway/RealGateway6.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Instruct/ButtonPanelSimpleEnvironment.png b/ZigbeeApp/Home.Ios/Resources/Phone/Instruct/ButtonPanelSimpleEnvironment.png new file mode 100755 index 0000000..0d3e5d7 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Instruct/ButtonPanelSimpleEnvironment.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Instruct/ButtonPanelSimpleMultifunction.png b/ZigbeeApp/Home.Ios/Resources/Phone/Instruct/ButtonPanelSimpleMultifunction.png new file mode 100755 index 0000000..1f24e24 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Instruct/ButtonPanelSimpleMultifunction.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/RealDevice/ButtonPanelSimpleEnvironment.png b/ZigbeeApp/Home.Ios/Resources/Phone/RealDevice/ButtonPanelSimpleEnvironment.png new file mode 100755 index 0000000..eb8b51e --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/RealDevice/ButtonPanelSimpleEnvironment.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/RealDevice/ButtonPanelSimpleMultifunction.png b/ZigbeeApp/Home.Ios/Resources/Phone/RealDevice/ButtonPanelSimpleMultifunction.png new file mode 100755 index 0000000..981b1f5 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Resources/Phone/RealDevice/ButtonPanelSimpleMultifunction.png Binary files differ diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs index da9f199..1c7957a 100755 --- a/ZigbeeApp/Shared/Common/CommonPage.cs +++ b/ZigbeeApp/Shared/Common/CommonPage.cs @@ -50,7 +50,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string CodeIDString = "1.0.20051901"; + public static string CodeIDString = "1.1.0.2020060101"; /// <summary> /// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee) /// </summary> diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs index 6431441..3bc9e9e 100755 --- a/ZigbeeApp/Shared/Common/Device.cs +++ b/ZigbeeApp/Shared/Common/Device.cs @@ -680,22 +680,26 @@ /// <param name="listdevice">璁惧瀵硅薄(MAC鍦板潃蹇呴』瑕佺浉鍚�)</param> public async Task<bool> DeleteDevice(List<CommonDevice> listdevice) { - var data = new CommonDevice.RemoveDeviceData(); - var info = new CommonDevice.RemoveDeviceListInfo(); - info.DeviceAddr = listdevice[0].DeviceAddr; - data.DeviceAddrList.Add(info); - - //鍒犱竴娆$殑鏃跺�欙紝瀹冧細鎶奙AC鍦板潃涓嬮潰鍏ㄩ儴鐨勮澶囬兘鍒犻櫎 - var result = await listdevice[0].DeleteDeviceAsync(data); - if (result == null || result.removeDeviceResponseData == null || result.removeDeviceResponseData.Result != 0) + //铏氭嫙浣忓畢鐨勮瘽,涓嶉渶瑕佸垹闄ょ綉鍏崇殑璁惧 + if (Config.Instance.Home.IsVirtually == false) { - //璁惧鍒犻櫎澶辫触 - string msg = Language.StringByID(R.MyInternationalizationString.uDeviceDeleteFail); - //鎷兼帴涓娿�愮綉鍏冲洖澶嶈秴鏃躲�戠殑Msg - msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result); + var data = new CommonDevice.RemoveDeviceData(); + var info = new CommonDevice.RemoveDeviceListInfo(); + info.DeviceAddr = listdevice[0].DeviceAddr; + data.DeviceAddrList.Add(info); - this.ShowErrorMsg(msg); - return false; + //鍒犱竴娆$殑鏃跺�欙紝瀹冧細鎶奙AC鍦板潃涓嬮潰鍏ㄩ儴鐨勮澶囬兘鍒犻櫎 + var result = await listdevice[0].DeleteDeviceAsync(data); + if (result == null || result.removeDeviceResponseData == null || result.removeDeviceResponseData.Result != 0) + { + //璁惧鍒犻櫎澶辫触 + string msg = Language.StringByID(R.MyInternationalizationString.uDeviceDeleteFail); + //鎷兼帴涓娿�愮綉鍏冲洖澶嶈秴鏃躲�戠殑Msg + msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result); + + this.ShowErrorMsg(msg); + return false; + } } //鍒犻櫎缂撳瓨鐨凮ta璁惧 @@ -979,6 +983,47 @@ } /// <summary> + /// 鏍规嵁MAC鍦板潃,鑾峰彇绠�绾﹂潰鏉垮叏閮ㄥ洖璺殑璁惧瀵硅薄 + /// </summary> + /// <param name="listDevice"></param> + /// <returns></returns> + public List<CommonDevice> GetMutilfunctionPanelByMac(List<CommonDevice> listDevice, bool sort = true) + { + //鍜屽姜鍝ャ�佽澶囧拰浜у搧閮ㄥ悓浜嬬‘璁わ細 + //绠�绾﹀鍔熻兘闈㈡澘[涓嶆樉绀哄浣欑殑鍥炶矾锛屽彧鏄剧ず鎼哄甫鐨�2涓户鐢靛櫒鍜�1涓俯婀垮害浼犳劅鍣� + var list = new List<CommonDevice>(); + foreach (var dev in listDevice) + { + if (dev.Type == DeviceType.TemperatureSensor) + { + if (dev.DeviceEpoint == 64) + { + list.Add(dev); + } + } + else if (dev.Type == DeviceType.OnOffOutput) + { + list.Add(dev); + } + } + + if (sort == false) + { + return list; + } + list.Sort((obj1, obj2) => + { + if (obj1.DeviceEpoint > obj2.DeviceEpoint) + { + return 1; + } + return -1; + }); + + return list; + } + + /// <summary> /// 鏍规嵁MAC鍦板潃,鑾峰彇鍏ㄩ儴鍥炶矾鐨勮澶囧璞�(寮哄埗鎺掑簭) /// </summary> /// <param name="DeviceAddr">Mac鍦板潃</param> @@ -1107,6 +1152,12 @@ { return dName; } + if (this.IsMiniLight(device) == true) + { + //Mini澶滅伅 + return Language.StringByID(R.MyInternationalizationString.uMiniNightLight); + } + //濡傛灉杩欎釜璁惧鍙湁涓�涓洖璺殑璇�,杩斿洖Mac鍚嶅瓧缁欏畠 if (this.GetDevicesCountByMac(device.DeviceAddr) <= 1) { @@ -2075,7 +2126,7 @@ { //2020.05.18杩藉姞:濡傛灉璁板綍鐨勬埧闂碔D鏄笉瀛樺湪鐨勮瘽,鍒欓噸鏂拌鐩� var room = HdlRoomLogic.Current.GetRoomById(this.dicDeviceRoomId[listDevice[0].DeviceAddr]); - if (room == null) + if (room == null || this.dicDeviceRoomId[listDevice[0].DeviceAddr] != roomId) { this.dicDeviceRoomId[listDevice[0].DeviceAddr] = roomId; save = true; @@ -2363,6 +2414,16 @@ public bool IsHdlDevice(CommonDevice device) { return device.ManufacturerName == "HDL"; + } + + /// <summary> + /// 鏄惁鏄疢ini澶滅伅 + /// </summary> + /// <param name="device"></param> + /// <returns></returns> + public bool IsMiniLight(CommonDevice device) + { + return device.DeviceAddr == "3737363534333231"; } /// <summary> @@ -2723,6 +2784,11 @@ if (mainDevice.IsCustomizeImage == false) { mainDevice.IconPath = "Device/Light.png"; + if (this.IsMiniLight(mainDevice) == true) + { + //mini澶滅伅 + mainDevice.IconPath = "Device/MiniNightLight.png"; + } } } //濡傛灉鏄笁璺户鐢靛櫒鐨勫洖璺殑璇�,榛樿涓虹伅鍏� @@ -2872,6 +2938,9 @@ this.dicDeviceModelIdEnum["MPFA/TILE-ZB.18"] = "250-200-60003";//鏂规偊鏂伴闈㈡澘 this.dicDeviceModelIdEnum["MPTE3/TILE-ZB.18"] = "253-200-60003";//鏂规偊鐜闈㈡澘 this.dicDeviceModelIdEnum["MP2W/TILE-ZB.18"] = "256-200-60003";//绐楀笜闈㈡澘 + this.dicDeviceModelIdEnum["MPTL4C/S-ZB.18"] = "212-200-60003";//绠�绾﹀鍔熻兘闈㈡澘 + this.dicDeviceModelIdEnum["MPTE3/S-ZB.18"] = "230-200-60003";//绠�绾︾幆澧冮潰鏉� + //=========鈽呪槄PIR浼犳劅鍣ㄧ被(1200-1299)鈽呪槄========= this.dicDeviceModelIdEnum["MSPIR01-ZB.10"] = "1200-1200-60000";//pir浼犳劅鍣�220 @@ -3046,7 +3115,14 @@ /// 绐楀笜闈㈡澘 闀滃儚id锛�256 /// </summary> ButtonPanel_Curtain = 256, - + /// <summary> + /// 绠�绾﹀鍔熻兘闈㈡澘 闀滃儚ID锛�212 + /// </summary> + ButtonPanel_SimpleMultifunction = 212, + /// <summary> + /// 绠�绾︾幆澧冮潰鏉� + /// </summary> + ButtonPanel_SimpleEnvironment = 230, //=========鈽呪槄PIR浼犳劅鍣ㄧ被(1200-1299)鈽呪槄========= /// <summary> /// 浼犳劅鍣� diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs index 737c569..72003f2 100755 --- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs +++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs @@ -394,7 +394,7 @@ this.ResponeResult = 0; HdlThreadLogic.Current.RunThread(() => { - int waitime = 30; + int waitime = 40; while (waitime > 0) { System.Threading.Thread.Sleep(100); @@ -404,8 +404,15 @@ break; } waitime--; + //2绉掔殑鏃跺��,杩樻槸鎺ュ彈涓嶅埌鐨勮瘽,寮哄埗鍐嶆鍒锋柊璁惧鐘舵�� + if (waitime == 20) + { + //浠庢柊鍙戦�佽幏鍙栬澶囩殑鐘舵��(寮哄埗) + this.device.HadReadDeviceStatu = false; + this.SendStatuComand(); + } } - if (waitime <= 0) + if (waitime <= 0 && this.Parent != null) { //娌℃湁鑾峰彇寰楀埌缁撴灉 HdlThreadLogic.Current.RunMain(() => diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAcRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAcRowControl.cs index 3ea4dc9..7bae3fb 100755 --- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAcRowControl.cs +++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAcRowControl.cs @@ -63,6 +63,7 @@ { //绌鸿皟绫诲瀷鐨勬繁搴﹀崱鐗囩晫闈� var form = new MainPage.ControlForm.DeviceAcDetailCardForm(); + form.RowOrCardControl = this; form.AddForm(i_device, this.nowSelectRoom, 965, 1457); form.FormCloseEvent += this.CardDetailInfoBackEvent; }; diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs index 9f813fa..7cee13d 100755 --- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs +++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs @@ -85,6 +85,7 @@ //缁х數鍣ㄧ被鍨嬬殑娣卞害鍗$墖鐣岄潰(鍚┖姘斿紑鍏�) var form = new MainPage.ControlForm.DeviceRelayDetailCardForm(); + form.RowOrCardControl = this; form.AddForm(i_device, this.nowSelectRoom, 965, backHeight); form.FormCloseEvent += this.CardDetailInfoBackEvent; }; diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs index 35c8dc4..ab3ad5e 100755 --- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs +++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs @@ -69,10 +69,22 @@ //娣卞害鍗$墖淇℃伅 this.frameTable.ButtonClickEvent += (sender, e) => { - //褰╃伅,璋冨厜鍣ㄧ被鍨嬬殑娣卞害鍗$墖鐣岄潰 - var form = new MainPage.ControlForm.DeviceColorLightDetailCardForm(); - form.AddForm(i_device, this.nowSelectRoom, 965, 1316); - form.FormCloseEvent += this.CardDetailInfoBackEvent; + //濡傛灉鏄疢ini澶滅伅 + if (Common.LocalDevice.Current.IsMiniLight(i_device) == true) + { + var form = new MainPage.ControlForm.DeviceMiniLightDetailCardForm(); + form.RowOrCardControl = this; + form.AddForm(i_device, this.nowSelectRoom, 965, 1466); + form.FormCloseEvent += this.CardDetailInfoBackEvent; + } + else + { + //褰╃伅,璋冨厜鍣ㄧ被鍨嬬殑娣卞害鍗$墖鐣岄潰 + var form = new MainPage.ControlForm.DeviceColorLightDetailCardForm(); + form.RowOrCardControl = this; + form.AddForm(i_device, this.nowSelectRoom, 965, 1316); + form.FormCloseEvent += this.CardDetailInfoBackEvent; + } }; } diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs index 9688346..76535ea 100755 --- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs +++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs @@ -116,6 +116,7 @@ { //绐楀笜绫诲瀷鐨勬繁搴﹀崱鐗囩晫闈� var form = new MainPage.ControlForm.DeviceCurtainDetailCardForm(); + form.RowOrCardControl = this; form.AddForm(i_device, this.nowSelectRoom, 965, 1316); form.FormCloseEvent += this.CardDetailInfoBackEvent; }; diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs index de6520e..ab46529 100755 --- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs +++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs @@ -57,6 +57,7 @@ { //鏂伴绫诲瀷鐨勬繁搴﹀崱鐗囩晫闈� var form = new MainPage.ControlForm.DeviceFreshAirDetailCardForm(); + form.RowOrCardControl = this; form.AddForm(i_device, this.nowSelectRoom, 965, 1374); form.FormCloseEvent += this.CardDetailInfoBackEvent; }; diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DevicePmSensorRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DevicePmSensorRowControl.cs index 1663fae..3e5886c 100755 --- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DevicePmSensorRowControl.cs +++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DevicePmSensorRowControl.cs @@ -32,6 +32,7 @@ { //PM2.5浼犳劅鍣ㄧ被鍨嬬殑娣卞害鍗$墖鐣岄潰 var form = new MainPage.ControlForm.DevicePmSensorDetailCardForm(); + form.RowOrCardControl = this; form.AddForm(i_device, this.nowSelectRoom, 965, 1374); form.FormCloseEvent += this.CardDetailInfoBackEvent; }; diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs index 38a38bc..6f63bc2 100755 --- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs +++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs @@ -86,6 +86,7 @@ //缁х數鍣ㄧ被鍨嬬殑娣卞害鍗$墖鐣岄潰(鍚┖姘斿紑鍏�) var form = new MainPage.ControlForm.DeviceRelayDetailCardForm(); + form.RowOrCardControl = this; form.AddForm(i_device, this.nowSelectRoom, 965, backHeight); form.FormCloseEvent += this.CardDetailInfoBackEvent; }; diff --git a/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs b/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs index 5c002e7..e6cc62c 100755 --- a/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs +++ b/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs @@ -143,7 +143,8 @@ /// </summary> /// <param name="gateWay">缃戝叧瀵硅薄</param> /// <param name="online">鍦ㄧ嚎鐘舵�佸彉鏇村悗鐨勭姸鎬�</param> - public virtual void GatewayOnlinePush(ZigBee.Device.ZbGateway gateWay, bool online) + /// <param name="hadGwOnline">2020.05.25杩藉姞:姝や綇瀹呮槸鍚︽嫢鏈夌綉鍏冲湪绾�</param> + public virtual void GatewayOnlinePush(ZigBee.Device.ZbGateway gateWay, bool online, bool hadGwOnline) { } @@ -289,6 +290,61 @@ #endregion + #region 鈻� 妫�娴嬮敊璇痏__________________________ + + /// <summary> + /// 妫�娴嬬晫闈㈢殑閿欒 + /// </summary> + /// <returns></returns> + public bool CheckForm() + { + //妫�娴嬫帶浠� + return this.CheckControl(this); + } + + /// <summary> + /// 妫�娴嬫帶浠� + /// </summary> + /// <param name="view"></param> + /// <returns></returns> + private bool CheckControl(View view) + { + //绗竴涓繘鏉ヨ偗瀹氭槸 ViewGroup + if (view is ViewGroup) + { + var viewGroup = (ViewGroup)view; + for (int i = 0; i < viewGroup.ChildrenCount; i++) + { + var myView = viewGroup.GetChildren(i); + if (myView is ViewGroup) + { + //閫掑綊妫�娴� + bool result = this.CheckControl(myView); + if (result == false) + { + return false; + } + continue; + } + if (myView is TextInputControl) + { + //妫�娴嬭緭鍏ユ鐨勯敊璇� + var error = ((TextInputControl)myView).CheckError(); + if (error != null) + { + this.ShowMassage(ShowMsgType.Tip, error); + ((TextInputControl)myView).OnError = true; + return false; + } + ((TextInputControl)myView).OnError = false; + } + } + } + return true; + } + + #endregion + #region 鈻� 鍙嶅皠鏂规硶___________________________ /// <summary> diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs b/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs index c9f4318..511bc75 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs @@ -334,7 +334,7 @@ var ignoreTime = new IgnoreTime(); UserView.HomePage.Instance.AddChidren(ignoreTime); UserView.HomePage.Instance.PageIndex += 1; - ignoreTime.Show(common, closeView.titleBtn.Text, edit, timevalue); + ignoreTime.Show(common, closeView.titleBtn.Text, edit, timevalue, _if[1]); } @@ -378,7 +378,7 @@ var ignoreTime = new IgnoreTime(); UserView.HomePage.Instance.AddChidren(ignoreTime); UserView.HomePage.Instance.PageIndex += 1; - ignoreTime.Show(common, timeoutView.titleBtn.Text, edit, timevalue); + ignoreTime.Show(common, timeoutView.titleBtn.Text, edit, timevalue, _if[1]); }; @@ -387,7 +387,7 @@ break; case 40: { - + openView.titleBtn.TextID = MyInternationalizationString.smokescreen; openView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; completeView.Show(1).AddChidren(openView.Show()); @@ -437,27 +437,30 @@ { if (devices["AttriButeId"] == "1281") { - if (devices["AttriButeData1"] == "1") + if (devices.ContainsKey("IgnoreTime")) { - openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; - closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; - openView.selectedIconBtn.Visible = true; - closeView.selectedIconBtn.Visible = false; + timevalue = int.Parse(devices["IgnoreTime"]); } else { - if (devices.ContainsKey("IgnoreTime")) + if (devices["AttriButeData1"] == "1") { - timevalue = int.Parse(devices["IgnoreTime"]); + openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; + closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; + openView.selectedIconBtn.Visible = true; + closeView.selectedIconBtn.Visible = false; } else { openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; openView.selectedIconBtn.Visible = false; - closeView.titleBtn.Visible = true; + closeView.selectedIconBtn.Visible = true; } + } + + } diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs index 6e7edf2..55df661 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs @@ -99,31 +99,7 @@ continue; } Common.Logic.LockLogicList.Add(logic); - //bool yes = false; - //for (int a = 0; a < logic.Accounts.Count; a++) - //{ - // //Option4鏄澶噈ac锛汷ption2鏄澶囩鍙o紱 - // if (logic.Accounts[a]["Option4"].ToString() != Send.CurrentDoorLock.DeviceAddr) - // { - // //鏌ユ壘鏄惁鏄偅涓棬閿侊紱 - // //濡傛灉涓嶆槸璇ラ棬閿佽仈鍔ㄤ簨浠朵笉鏄剧ず鍑烘潵; - // yes = false; - // } - // else - // { - // yes = true; - // } - // //if (logic.Accounts[a]["Account"].ToString() == Config.Instance.Guid) - // //{ - // // //鏌ユ壘鑷繁璐﹀彿涓嬬殑鍒涘缓鑱斿姩浜嬩欢锛� - // // yes = true; - // // break; - // //} - //} - //if (yes) - //{ - // Common.Logic.LockLogicList.Add(listlogic[j]); - //} + } } } diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs b/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs index 1c3300a..20e4cce 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs @@ -16,7 +16,7 @@ } Button selectedIcon = new Button(); - public void Show(CommonDevice common, string name, bool edit, int timevalue) + public void Show(CommonDevice common, string name, bool edit, int timevalue,string _if) { #region 涓婇潰鐨勫竷灞�浠g爜 @@ -107,7 +107,7 @@ PickerView.ShowNormal(minuteList, secondList, null, (Index1, Index2, Index3) => { selectetimedvalue = int.Parse(minuteList[Index1].Split(' ')[0]) * 60 + int.Parse(secondList[Index2].Split(' ')[0]); - TimeMethod(common, selectetimedvalue, timevalue, edit); + TimeMethod(common, selectetimedvalue, timevalue, edit, _if); }, selectIndex1, selectIndex2, 0, Language.StringByID(MyInternationalizationString.logiccustom)); } else @@ -120,11 +120,11 @@ saveView.clickviewBtn.MouseUpEventHandler += (sender, e) => { - TimeMethod(common, selectetimedvalue, timevalue, edit); + TimeMethod(common, selectetimedvalue, timevalue, edit,_if); }; } - public void TimeMethod(CommonDevice common, int selectetimedvalue, int timevalue, bool edit) + public void TimeMethod(CommonDevice common, int selectetimedvalue, int timevalue, bool edit,string _if) { var deviceConditionsInfo = new Dictionary<string, string>(); @@ -134,9 +134,9 @@ deviceConditionsInfo.Add("Epoint", common.DeviceEpoint.ToString()); deviceConditionsInfo.Add("Cluster_ID", "1280"); deviceConditionsInfo.Add("AttriButeId", "1281"); - deviceConditionsInfo.Add("AttriButeData1", "0"); + deviceConditionsInfo.Add("AttriButeData1", "1"); deviceConditionsInfo.Add("AttriButeData2", "0"); - deviceConditionsInfo.Add("Range", "1"); + deviceConditionsInfo.Add("Range", "5"); if (selectetimedvalue != 0) { if (timevalue != selectetimedvalue) @@ -163,10 +163,35 @@ } } - var logicCommunalPage = new LogicCommunalPage(); - UserView.HomePage.Instance.AddChidren(logicCommunalPage); - UserView.HomePage.Instance.PageIndex += 1; - logicCommunalPage.Show(() => { }); + + switch (_if) + { + case "logic": + { + //鑷姩鍖� + var logicCommunalPage = new LogicCommunalPage(); + UserView.HomePage.Instance.AddChidren(logicCommunalPage); + UserView.HomePage.Instance.PageIndex += 1; + logicCommunalPage.Show(() => { }); + } + break; + case "mould": + { + //鑷姩鍖栨帹鑽愭ā鏉� + var templatePage = new TemplatePage(); + UserView.HomePage.Instance.AddChidren(templatePage); + UserView.HomePage.Instance.PageIndex += 1; + templatePage.Show(); + } + break; + + } + + + //var logicCommunalPage = new LogicCommunalPage(); + //UserView.HomePage.Instance.AddChidren(logicCommunalPage); + //UserView.HomePage.Instance.PageIndex += 1; + //logicCommunalPage.Show(() => { }); } } diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs index 97b170b..57bd780 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs @@ -312,11 +312,7 @@ { case 13: { - if (intvalue == "1") - { - state=Language.StringByID( MyInternationalizationString.someone); - } - else + if (conditions.ContainsKey("IgnoreTime")) { int minute = int.Parse(conditions["IgnoreTime"]) / 60; int second = int.Parse(conditions["IgnoreTime"]) % 60; @@ -340,48 +336,55 @@ } } + else + { + state = Language.StringByID(MyInternationalizationString.someone); + } + } break; case 21: case 22: { - if (intvalue == "1") + if (conditions.ContainsKey("IgnoreTime")) { - state =Language.StringByID( MyInternationalizationString.logicopen); - } - else - { - if (conditions.ContainsKey("IgnoreTime")) + + int minute = int.Parse(conditions["IgnoreTime"]) / 60; + int second = int.Parse(conditions["IgnoreTime"]) % 60; + if (minute != 0 && second != 0) { - - int minute = int.Parse(conditions["IgnoreTime"]) / 60; - int second = int.Parse(conditions["IgnoreTime"]) % 60; - if (minute != 0 && second != 0) - { - state = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime); - - } - else - { - if (minute == 0 && second != 0) - { - state = second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime); - - } - if (minute != 0 && second == 0) - { - state = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.closetime); - - } - - } + state = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime); } else { - state =Language.StringByID(MyInternationalizationString.logicclose); + if (minute == 0 && second != 0) + { + state = second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime); + + } + if (minute != 0 && second == 0) + { + state = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.closetime); + + } + } + } + else + { + if (intvalue == "1") + { + state = Language.StringByID(MyInternationalizationString.logicopen); + } + else + { + state = Language.StringByID(MyInternationalizationString.logicclose); + } + + } + } break; case 40: @@ -563,11 +566,11 @@ { if (conditions["AtHome"] == "1") { - state = Language.StringByID(MyInternationalizationString.athome) + radius["Radius"] + "绫�"; + state = Language.StringByID(MyInternationalizationString.athome) + radius["Radius"] + Language.StringByID(MyInternationalizationString.mi); } else { - state = Language.StringByID(MyInternationalizationString.leavehome) + radius["Radius"] + "绫�"; + state = Language.StringByID(MyInternationalizationString.leavehome) + radius["Radius"] + Language.StringByID(MyInternationalizationString.mi); } } } diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs index 4e0ee88..1c7f1b2 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs @@ -20,7 +20,6 @@ { case 0: { - //new涓�涓柊閫昏緫瀵硅薄锛� //鏂板姝e父鑷姩鍖栧叆鍙� Common.Logic.CurrentLogic = new Common.Logic(); @@ -31,7 +30,6 @@ UserView.HomePage.Instance.AddChidren(addLogicPage); UserView.HomePage.Instance.PageIndex += 1; addLogicPage.Show(); - } break; case 1: @@ -65,8 +63,6 @@ } } - - #region 鈼� 鑷姩鍖朹_________________________ /// <summary> /// 鑷姩鍖栧姛鑳戒唬鐮佸叆鍙� @@ -764,37 +760,32 @@ /// </summary> public static async System.Threading.Tasks.Task<int> Exist(int valueInt, ZigBee.Device.DoorLock doorLock) { + int exist = 0; - var Idlist = await Send.GetLogicId(valueInt); - if (Idlist.Count != 0) + var IdList = await Send.GetLogicId(valueInt); + if (IdList.Count != 0) { - //榛樿鍙栫涓�涓�昏緫ID - var id = Idlist[0]; - if (valueInt != 3) + for (int i = 0; i < IdList.Count; i++) { - exist = id; - } - else - { - var logic = await Send.GetLogic(id, 3); + var id = IdList[i]; + var logic = await Send.GetLogic(id, valueInt); if (logic != null) { if (ExistLogic(logic, doorLock)) { exist = id; - } - else - { - exist = 0; + ///鎵惧埌閫�鍑� + break; } } + } } return exist; } ///<summary> - ///鑾峰彇闂ㄩ攣閫昏緫淇℃伅 + ///鑾峰彇闂ㄩ攣鏃舵晥鎬ч�昏緫淇℃伅 /// 杩斿洖鍊硷細null涓嶅瓨鍦�;鍏跺畠鍊奸兘瀛樺湪; /// </summary> public static async System.Threading.Tasks.Task<Common.Logic> GetLogicIfon(ZigBee.Device.DoorLock doorLock) @@ -818,14 +809,12 @@ ///鍒犻櫎璇ラ棬閿佹墍鏈夋椂鏁堟�ц嚜鍔ㄥ寲 /// 杩斿洖鍊硷細true鎴愬姛;false澶辫触; /// </summary> - public static async System.Threading.Tasks.Task<bool> GetLogicAll(ZigBee.Device.DoorLock doorLock) + public static async System.Threading.Tasks.Task<bool> DelAllLogic(ZigBee.Device.DoorLock doorLock) { bool _if = false; var Idlist = await Send.GetLogicId(3); if (Idlist.Count != 0) { - _if = true; - for (int i = 0; i < Idlist.Count; i++) { int id = Idlist[i]; @@ -836,7 +825,16 @@ { //鏈潵鍙湁涓�鏉℃椂鏁堟�ц嚜鍔ㄥ寲锛� //闃叉鐗规畩鎯呭喌,鎵惧埌灏卞垹闄ゆ帀; + //var valueInt = await Send.DelLogic(id); + //if (valueInt == 0) + //{ + // _if = true; + //} + //(鑰冭檻鎬ц兘榛樿鍒犻櫎鎴愬姛锛岀洿鎺ヨ繑鍥炴垚鍔熺粨鏋渢rue) + _if = true; Send.DelLogic(id); + + } } } @@ -852,7 +850,7 @@ { for (int j = 0; j < logic.Accounts.Count; j++) { - //Option4鏄澶噈ac锛汷ption2鏄澶囩鍙o紱 + //Option4鏄澶噈ac锛� if (logic.Accounts[j]["Option4"].ToString() == doorLock.DeviceAddr) { //鏌ユ壘鏄惁鏄偅涓棬閿侊紱 diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs index ca7438c..dc21175 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs @@ -17,6 +17,8 @@ } /// 缁欏緪姊呭埛鏂扮晫闈㈢敤鐨� public Action<bool> action; + // 鍒锋柊涓婃姤鐣岄潰鐨凙ction + public Action<string, bool> updateCurrentDoorlockActionTemp; ///绗簩鍧楃涓�绾х埗鎺т欢 FrameLayout fLayout = new FrameLayout(); ///绗笁鍧楃涓�绾х埗鎺т欢 @@ -32,16 +34,12 @@ /// </summary> public int timeValue = 0; /// <summary> - /// 鏍囪鏄剧ず鎵ц鏃ユ湡(鐢ㄧ綉鍏崇殑锛岃繕鏄敤绯荤粺鐨勬椂闂�) + /// 璁板綍鏃堕棿鎴� /// </summary> - public bool _if = false; - /// <summary> - /// 鏃堕棿鎴� - /// </summary> - public long timeLong = 0; + public int timeLong = 0; public async void Show() { - + #region 鐣岄潰鐨勫竷灞�浠g爜 UserView.HomePage.Instance.ScrollEnabled = false;//閿佷綇宸︽粦 TopView view = new TopView(); @@ -58,7 +56,7 @@ action(Send.CurrentDoorLock.IsDoorLockNormallyMode); } }; - + var middle = new FrameLayout { Y = view.topRowLayout.Bottom, @@ -68,7 +66,6 @@ this.AddChidren(middle); #endregion //鏄父寮�妯″紡鍐嶅幓璇诲彇 - if (Send.CurrentDoorLock.IsDoorLockNormallyMode) { //杩涙潵鏇存柊涓�娆� @@ -81,8 +78,7 @@ //杩涙潵鏇存柊涓�娆″�� logicId = logic.LogicId; timeValue = int.Parse(logic.Conditions[0]["DoorLockOpenDelayTime"]) / 3600; - timeLong = long.Parse(logic.Conditions[0]["TriggerTime"]); - + timeLong = int.Parse(logic.Conditions[0]["TriggerTime"]); } catch { } } @@ -227,6 +223,23 @@ catch { } }; + updateCurrentDoorlockActionTemp = (DoorlockKey, _bool) => + { + var key = Send.CurrentDoorLock.DeviceAddr; + if (DoorlockKey == key) + { + try + { + Application.RunOnMainThread(() => + { + Send.CurrentDoorLock.IsDoorLockNormallyMode = _bool; + ModeView(); + }); + } + catch { } + } + }; + UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction += updateCurrentDoorlockActionTemp; } /// <summary> /// 甯稿紑妯″紡寮�鍏冲垏鎹㈠浘鏍囩晫闈� @@ -285,7 +298,6 @@ Send.DelLogic(logicId); } Send.CurrentDoorLock.IsDoorLockNormallyMode = false; - _if = false; ModeView(); } else @@ -304,7 +316,7 @@ } }; - + if (logicId != 0) { ///鏄剧ず澶辨晥璁剧疆鏃堕棿鏂囨湰鎺т欢 @@ -312,7 +324,7 @@ { Y = Application.GetRealHeight(127 + 69), X = Application.GetRealWidth(80),//125 - Width = Application.GetRealWidth(907+12),//634 + 200 + Width = Application.GetRealWidth(907 + 12),//634 + 200 Height = Application.GetRealHeight(60), TextSize = 15, TextColor = ZigbeeColor.Current.LogicTextBlackColor, @@ -331,22 +343,23 @@ int hour = 0; int minute = 0; - if (_if) + if (timeLong != 0) { - ///绗竴娆¤繘鏉ヨ鍙栫綉鍏虫椂闂达紱 + ///璇诲彇缃戝叧鏃堕棿锛� var datetime = GetLocalTime(timeLong); ///鏈夋椂鏁堟�у父寮�鎵嶆樉绀烘椂闂存潯浠舵枃鏈� year = datetime.Year.ToString();//閭d竴骞� month = datetime.Month.ToString();//閭d竴鏈� - days = int.Parse(datetime.ToString("dd"));//閭d竴澶� - hour = int.Parse(datetime.ToString("HH"));//灏忔椂 + var d = int.Parse(datetime.ToString("dd"));//閭d竴澶� + var h = int.Parse(datetime.ToString("HH"));//灏忔椂 + int dayInt = (h + timeValue) / 24;//璁剧疆鏃堕棿+褰撳墠绯荤粺鏃堕棿鏄惁瓒呭嚭24灏忔椂 + hour = (h + timeValue) % 24;//璁剧疆鏃堕棿+褰撳墠绯荤粺鏃堕棿鏄惁瓒呭嚭24灏忔椂鍓╀笅澶氬皯灏忔椂 + days = d + dayInt;//褰撳墠绯荤粺澶╂暟+鎵ц鍚庡ぉ鏁� minute = datetime.Minute;//鍒嗛挓 } else { - - - ///鍦ㄥ綋鍓嶇晫闈㈢紪杈戞樉绀虹郴缁熸椂闂�(涓嶈兘姣忎竴娆$紪杈戦兘鍘荤綉鍏虫嬁鏁版嵁) + ///璇诲彇绯荤粺鏃堕棿 year = DateTime.Now.Year.ToString();//閭d竴骞� month = DateTime.Now.Month.ToString();//閭d竴鏈� var d = DateTime.Now.ToString("dd");//閭d竴澶� @@ -417,6 +430,7 @@ {///鍐嶆纭 LogicView.TipView.ShowInputTip(true, async (str) => {///纭鍙戦�佸懡浠� + CommonPage.Loading.Start(); try { @@ -430,7 +444,7 @@ else { ///鍥犱负鏈夊父寮�妯″紡涓嬫墠鍙互鍒涘缓澶辨晥閫昏緫锛� - SkipView.GetLogicAll(Send.CurrentDoorLock);//鍒犻櫎涔嬪墠鎵�鏈夊け鏁堥�昏緫 + SkipView.DelAllLogic(Send.CurrentDoorLock);//鍒犻櫎涔嬪墠鎵�鏈夊け鏁堥�昏緫 var addResult = await SkipView.LockAddModifyLogic(int.Parse(str), Send.CurrentDoorLock);//娣诲姞涓�鏉″け鏁堥�昏緫 if (addResult == 0) { @@ -445,7 +459,6 @@ logicId = addResult; timeValue = int.Parse(str); Send.CurrentDoorLock.IsDoorLockNormallyMode = true; - _if = false; ModeView(); ///娣诲姞APP寮�鍚父寮�妯″紡鐨勫巻鍙茶褰� UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(Send.CurrentDoorLock, 9001, string.Empty); @@ -715,16 +728,13 @@ /// </summary> /// <param name="unixTimeStamp">鏃堕棿鎴�</param> /// <returns></returns> - public DateTime GetLocalTime(long unixTimeStamp) + public DateTime GetLocalTime(int unixTimeStamp) { - //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; - - System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 褰撳湴鏃跺尯 - return startTime.AddMilliseconds(unixTimeStamp); + 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; } } diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs index 9c244a8..2d5b82d 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs @@ -229,11 +229,8 @@ { case 13: { - if (intvalue == "1") - { - selecteddevice.selecetddevicestateBtn.TextID = MyInternationalizationString.someone; - } - else + + if (conditions.ContainsKey("IgnoreTime")) { int minute = int.Parse(conditions["IgnoreTime"]) / 60; int second = int.Parse(conditions["IgnoreTime"]) % 60; @@ -257,6 +254,11 @@ } } + else + { + selecteddevice.selecetddevicestateBtn.TextID = MyInternationalizationString.someone; + } + } break; } diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/Base/DeviceDetailCardCommonForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/Base/DeviceDetailCardCommonForm.cs index 974445d..4e1e63a 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/Base/DeviceDetailCardCommonForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/Base/DeviceDetailCardCommonForm.cs @@ -26,6 +26,10 @@ /// </summary> public Common.Room nowSelectRoom = null; /// <summary> + /// 鏍囪瀹冩槸鐢卞摢涓帶浠惰皟璧风殑 + /// </summary> + public ViewGroup RowOrCardControl = null; + /// <summary> /// 鐘舵�佹帶浠� /// </summary> private NormalViewControl btnStatu = null; @@ -237,7 +241,7 @@ HdlThreadLogic.Current.RunThread(() => { - int waitime = 30; + int waitime = 40; while (waitime > 0) { System.Threading.Thread.Sleep(100); @@ -247,8 +251,18 @@ break; } waitime--; + //2绉掔殑鏃跺��,杩樻槸鎺ュ彈涓嶅埌鐨勮瘽,寮哄埗鍐嶆鍒锋柊璁惧鐘舵�� + if (waitime == 20) + { + //浠庢柊鍙戦�佽幏鍙栬澶囩殑鐘舵��(寮哄埗) + this.device.HadReadDeviceStatu = false; + if (this.RowOrCardControl != null) + { + this.RowOrCardControl.GetType().InvokeMember("SendStatuComand", System.Reflection.BindingFlags.InvokeMethod, null, this.RowOrCardControl, null); + } + } } - if (waitime <= 0) + if (waitime <= 0 && this.Parent != null) { //娌℃湁鑾峰彇寰楀埌缁撴灉 HdlThreadLogic.Current.RunMain(() => @@ -292,22 +306,6 @@ private void AddDeviceReportEvent() { string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(this.device); - //鑺傜偣鍙嶉 - HdlGatewayReceiveLogic.Current.AddAttributeEvent("DeviceDetailCardControl" + mainKeys, ReceiveComandDiv.A鑺傜偣鎺у埗鍙嶉, (report) => - { - string mainKey2 = Common.LocalDevice.Current.GetDeviceMainKeys(report); - if (mainKeys != mainKey2) - { - //涓嶆槸鍚屼竴涓笢瑗� - return; - } - //妫�娴嬬粨鏋� - if (this.CheckResponeResultStatu(ReceiveComandDiv.A鑺傜偣鎺у埗鍙嶉, report) == true) - { - //缁撴灉宸茬粡鎺ユ敹鍒� - this.ResponeResult = 1; - } - }); //灞炴�т笂鎶� HdlGatewayReceiveLogic.Current.AddAttributeEvent("DeviceDetailCardAttribute" + mainKeys, ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (report) => { diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs index 1204b2f..faab0df 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs @@ -161,7 +161,9 @@ else { //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鐩存帴鏀圭紦瀛� - ((DimmableLight)this.device).Level = value; + ((DimmableLight)this.device).Level = value * MaxLevel / 100; + //浜害 XX + this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uBrightness) + " " + HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device)); } }; @@ -218,8 +220,8 @@ { HdlThreadLogic.Current.RunMain(() => { - //娌℃湁鎺ユ敹鍒扮綉鍏冲洖澶� - if (result == false) + //鎺ユ敹鍒扮綉鍏冲洖澶� + if (result == true) { bool statu = ((LightBase)this.device).OnOffStatus == 1; //鍒锋柊寮�鍏崇姸鎬� @@ -239,16 +241,12 @@ listControl[0].IsSelected = !listControl[0].IsSelected; if (isOpen == true) { - waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarColor_Start, ZigbeeColor.Current.GXCWaveSeekBarColor_End); //鎵撳紑 - this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uOpen1)); this.device.SwitchControl(1); } else { - waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor); //鍏抽棴 - this.SetStatuText(Language.StringByID(R.MyInternationalizationString.Close)); this.device.SwitchControl(0); } } @@ -265,17 +263,14 @@ /// <returns></returns> public override bool CheckResponeResultStatu(ReceiveComandDiv comandDiv, CommonDevice report) { - if (comandDiv == ReceiveComandDiv.A鑺傜偣鎺у埗鍙嶉) - { - return true; - } - else if (comandDiv == ReceiveComandDiv.A璁惧灞炴�т笂鎶�) + if (comandDiv == ReceiveComandDiv.A璁惧灞炴�т笂鎶�) { HdlThreadLogic.Current.RunMain(() => { //鍒锋柊寮�鍏崇姸鎬� this.RefreshSwitchStatu(((LightBase)this.device).OnOffStatus == 1); }); + return true; } return false; } diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs index 27098e8..9c67d14 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs @@ -395,11 +395,7 @@ /// <returns></returns> public override bool CheckResponeResultStatu(ReceiveComandDiv comandDiv, CommonDevice report) { - if (comandDiv == ReceiveComandDiv.A鑺傜偣鎺у埗鍙嶉) - { - return true; - } - else if (comandDiv == ReceiveComandDiv.A璁惧灞炴�т笂鎶�) + if (comandDiv == ReceiveComandDiv.A璁惧灞炴�т笂鎶�) { HdlThreadLogic.Current.RunMain(() => { @@ -418,6 +414,7 @@ } } }); + return true; } return false; } diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceMiniLightDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceMiniLightDetailCardForm.cs new file mode 100755 index 0000000..66122d1 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceMiniLightDetailCardForm.cs @@ -0,0 +1,376 @@ +锘縰sing Shared.Common; +using Shared.Phone.UserCenter; +using System; +using System.Collections.Generic; +using System.Text; +using ZigBee.Device; + +namespace Shared.Phone.MainPage.ControlForm +{ + /// <summary> + /// 褰╃伅(璋冨厜鍣�)绫诲瀷鐨勬繁搴﹀崱鐗囩晫闈� + /// </summary> + public class DeviceMiniLightDetailCardForm : DeviceDetailCardCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鐣岄潰涓婂彲浠ユ搷浣滅殑鎺т欢 + /// </summary> + private List<ButtonBase> listControl = new List<ButtonBase>(); + /// <summary> + /// MaxLevel + /// </summary> + private const int MaxLevel = 254; + /// <summary> + /// 褰╃伅鎺т欢 + /// </summary> + private WaveSeekBar waveSeekBar = null; + /// <summary> + /// 杩涘害鍊兼槸鍚﹀湪鏀瑰彉涓� + /// </summary> + private bool isProgressing = false; + /// <summary> + /// 鑳藉惁鍙戦�佽繘搴﹀�� + /// </summary> + private bool canSetProgressValue = true; + /// <summary> + /// 褰╃伅鏄惁鏄墦寮�鐘舵��(涓嶈兘鐢ㄦ帶浠剁殑Select鏉ュ垽鏂�,澶潙) + /// </summary> + private bool IsLightOpen = false; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 搴曞眰鍒濆鍖栦腑閮ㄦ帶浠跺畬鎴愪箣鍚� + /// </summary> + /// <param name="frameWhiteBack"></param> + public override void InitMiddleFrameAfter(FrameLayout frameWhiteBack) + { + //宸︽粦涓嶈兘 + this.ScrollEnabled = false; + //鍏堟竻绌� + this.listControl = new List<ButtonBase>(); + //璁剧疆鐘舵�佹枃瀛� + if (((LightBase)this.device).OnOffStatus == 1) + { + //浜害 XX + this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uBrightness) + " " + HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device)); + } + else + { + //鍏抽棴 + this.SetStatuText(Language.StringByID(R.MyInternationalizationString.Close)); + } + + //褰╃伅鎺т欢 + this.waveSeekBar = new WaveSeekBar(); + waveSeekBar.Y = Application.GetRealHeight(233); + waveSeekBar.Width = this.GetPictrueRealSize(253); + waveSeekBar.Height = this.GetPictrueRealSize(516); + waveSeekBar.Gravity = Gravity.CenterHorizontal; + waveSeekBar.WavePadding = Application.GetRealWidth(8); + waveSeekBar.MaxValue = 100; + waveSeekBar.Progress = (int)(((DimmableLight)this.device).Level * 1.0 / MaxLevel * 100); + waveSeekBar.CornerRadius = Application.GetRealHeight(58); + frameWhiteBack.AddChidren(waveSeekBar); + + //寮�鍏� + var btnSwitch = new IconViewControl(81); + btnSwitch.UnSelectedImagePath = "Item/Switch.png"; + btnSwitch.SelectedImagePath = "Item/SwitchSelected.png"; + btnSwitch.Y = waveSeekBar.Bottom + Application.GetRealHeight(418); + btnSwitch.Gravity = Gravity.CenterHorizontal; + frameWhiteBack.AddChidren(btnSwitch); + listControl.Add(btnSwitch); + btnSwitch.ButtonClickEvent += (sender, e) => + { + //鍙戦�佸紑鍏冲懡浠� + this.SetSwitchCommand(!btnSwitch.IsSelected); + }; + + //璁剧疆鍒濆鐘舵�� + this.IsLightOpen = ((LightBase)this.device).OnOffStatus == 1; + this.canSetProgressValue = this.IsLightOpen; + if (IsLightOpen == true) + { + btnSwitch.IsSelected = true; + waveSeekBar.IsClickable = true; + waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarColor_Start, ZigbeeColor.Current.GXCWaveSeekBarColor_End); + } + else + { + waveSeekBar.IsClickable = false; + waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor); + } + + //褰╃伅鎺т欢閲岄潰鐨勯偅涓樉绀虹櫨鍒嗘瘮鐨勬帶浠� + int progressY = waveSeekBar.Y - Application.GetMinReal(154); + var btnProgress = new NormalViewControl(Application.GetMinReal(135), Application.GetMinReal(104), false); + btnProgress.Y = progressY; + btnProgress.UnSelectedImagePath = "Item/ProgressBubbles.png"; + btnProgress.IsBold = true; + btnProgress.TextColor = UserCenterColor.Current.White; + btnProgress.Gravity = Gravity.CenterHorizontal; + btnProgress.TextAlignment = TextAlignment.Center; + frameWhiteBack.AddChidren(btnProgress); + btnProgress.Visible = false; + + //寮�濮嬫粦鍔ㄧ殑浜嬩欢 + waveSeekBar.OnStartTrackingTouchEvent += (sender, e) => + { + //杩涘害鍊煎紑濮嬪彉鏇� + this.isProgressing = true; + //鍙樻洿杩涘害鐧惧垎姣旂殑鏄剧ず + btnProgress.Y = progressY + waveSeekBar.NowProgressY; + btnProgress.Text = waveSeekBar.Progress + "%"; + waveSeekBar.IsProgressTextShow = false; + if (btnProgress.Visible == false) + { + btnProgress.Visible = true; + } + }; + + //缁撴潫婊戝姩鐨勪簨浠� + waveSeekBar.OnStopTrackingTouchEvent += (sender, e) => + { + //杩涘害鍊煎紑濮嬬粨鏉� + this.isProgressing = false; + btnProgress.Visible = false; + waveSeekBar.IsProgressTextShow = true; + }; + + //婊戝姩杩囩▼涓� + int oldProgressValue = waveSeekBar.Progress;//涔嬪墠鐨勫�� + int nowProgressValue = oldProgressValue;//鍙樻洿鐨勫�� + waveSeekBar.OnProgressChangedEvent += (sender, value) => + { + //鍙樻洿杩涘害鐧惧垎姣旂殑鏄剧ず + btnProgress.Y = progressY + waveSeekBar.NowProgressY; + btnProgress.Text = value + "%"; + if (Common.Config.Instance.Home.IsVirtually == false) + { + nowProgressValue = value; + } + else + { + //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鐩存帴鏀圭紦瀛� + ((DimmableLight)this.device).Level = value * MaxLevel / 100; + //浜害 XX + this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uBrightness) + " " + HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device)); + } + }; + + //鑹叉俯 + var btnColor = new NormalViewControl(300, 50, true); + btnColor.X = Application.GetRealWidth(132); + btnColor.Y = Application.GetRealHeight(829); + btnColor.TextSize = 12; + btnColor.Text = Language.StringByID(R.MyInternationalizationString.uColorTemperature) + "锛�"; + btnColor.TextColor = UserCenterColor.Current.TextGrayColor3; + frameWhiteBack.AddChidren(btnColor); + //涓婇儴鏄剧ず鏂囨湰 + var btnColorView = new NormalViewControl(150, 60, true); + btnColorView.Y = btnColor.Bottom; + btnColorView.TextAlignment = TextAlignment.Center; + btnColorView.TextSize = 15; + btnColorView.Gravity = Gravity.CenterHorizontal; + btnColorView.TextColor = UserCenterColor.Current.TextGrayColor3; + frameWhiteBack.AddChidren(btnColorView); + //杩涘害鏉�(鑹叉俯鐨勮寖鍥存槸 3400~6000) + var seekBar1 = new SeekBarControl(683); + seekBar1.Y = btnColorView.Bottom; + seekBar1.MinValue = 34; + seekBar1.MaxValue = 60; + seekBar1.ProgressBarColor = 0xff707070; + seekBar1.SeekBarViewHeight = Application.GetRealHeight(19); + frameWhiteBack.AddChidren(seekBar1); + + int oldColorValue = 0; + int nowColorValue = 0; + seekBar1.ProgressChangedEvent += (div, value) => + { + //鏁版嵁鍙樻洿 + btnColorView.Text = value * 100 + "K"; + if (Common.Config.Instance.Home.IsVirtually == false) + { + nowColorValue = value; + } + }; + //璁剧疆鍒濆鍊� + seekBar1.Progress = 34; + btnColorView.Text = 34 * 100 + "K"; + + //寮�涓�涓嚎绋�,鐩戣鏄惁婊戝姩鐨勬粦鍔ㄦ潯,姣忕妫�娴嬩竴娆� + HdlThreadLogic.Current.RunThread(() => + { + while (this.Parent != null) + { + System.Threading.Thread.Sleep(1000); + //鑳藉鍙戦�� + if (this.canSetProgressValue == true) + { + //鍙戦�佷寒搴﹀�� + if (nowProgressValue != oldProgressValue) + { + oldProgressValue = nowProgressValue; + ((DimmableLight)this.device).SetLevel((int)(oldProgressValue * MaxLevel / 100.0)); + } + //鍙戦�佽壊娓╁�� + if (nowColorValue != oldColorValue) + { + oldColorValue = nowColorValue; + } + } + } + //鐣岄潰鍏抽棴鏃� + if (nowProgressValue != oldProgressValue) + { + //鍙戦�佷寒搴﹀�� + ((DimmableLight)this.device).SetLevel((int)(nowProgressValue * MaxLevel / 100.0)); + } + if (nowColorValue != oldColorValue) + { + //鍙戦�佽壊娓╁�� + } + }); + } + + #endregion + + #region 鈻� 鍙戦�佸紑鍏冲懡浠______________________ + + /// <summary> + /// 鍙戦�佸紑鍏冲懡浠� + /// </summary> + /// <param name="isOpen"></param> + private void SetSwitchCommand(bool isOpen) + { + //濡傛灉浣忓畢鏄櫄鎷熶綇瀹� + if (Common.Config.Instance.Home.IsVirtually == true) + { + ((LightBase)this.device).OnOffStatus = isOpen == true ? 1 : 0; + //鍒锋柊寮�鍏崇姸鎬� + this.RefreshSwitchStatu(isOpen); + return; + } + + //褰撴寜涓嬪紑鍏虫寜閽椂,涓嶈兘鍐嶅彂閫佽繘搴﹀�� + this.canSetProgressValue = false; + + //妫�娴嬫槸鍚﹁幏鍙栫綉鍏冲弽棣堢殑缁撴灉,濡傛灉缃戝叧娌℃湁鍥炲,鍒欎細寮瑰嚭娑堟伅 + this.StartCheckResponeResult(this.listControl, (result) => + { + HdlThreadLogic.Current.RunMain(() => + { + //鎺ユ敹鍒扮綉鍏冲洖澶� + if (result == true) + { + bool statu = ((LightBase)this.device).OnOffStatus == 1; + //鍒锋柊寮�鍏崇姸鎬� + this.RefreshSwitchStatu(statu); + if (statu == true) + { + //绛夊緟缁撴灉缁撴潫鍚�,褰╃伅鎺т欢鍙互婊戝姩 + waveSeekBar.IsClickable = true; + } + } + }); + }); + + //鍙戦�佺瓑寰呯殑鏃堕棿鍐�,涓嶈兘婊戝姩褰╃伅鎺т欢 + waveSeekBar.IsClickable = false; + //鐘舵�佸彇鍙� + listControl[0].IsSelected = !listControl[0].IsSelected; + if (isOpen == true) + { + //鎵撳紑 + this.device.SwitchControl(1); + } + else + { + //鍏抽棴 + this.device.SwitchControl(0); + } + } + + #endregion + + #region 鈻� 鏄惁鑾峰彇缃戝叧鍙嶉鐨勭粨鏋淿____________ + + /// <summary> + /// 妫�娴嬬綉鍏崇殑鍙嶉缁撴灉(灞炴�т笂鎶ョ殑瀵硅薄锛歞evice.DeviceStatusReport) + /// </summary> + /// <param name="comandDiv">鍛戒护鍖哄垎</param> + /// <param name="report">涓婃姤鏁版嵁</param> + /// <returns></returns> + public override bool CheckResponeResultStatu(ReceiveComandDiv comandDiv, CommonDevice report) + { + if (comandDiv == ReceiveComandDiv.A璁惧灞炴�т笂鎶�) + { + HdlThreadLogic.Current.RunMain(() => + { + //鍒锋柊寮�鍏崇姸鎬� + this.RefreshSwitchStatu(((LightBase)this.device).OnOffStatus == 1); + }); + return true; + } + return false; + } + + #endregion + + #region 鈻� 鍒锋柊寮�鍏崇姸鎬乢______________________ + + /// <summary> + /// 鍒锋柊寮�鍏崇姸鎬� + /// </summary> + /// <param name="isOpen">鎵撳紑鐘舵��</param> + private void RefreshSwitchStatu(bool isOpen) + { + if (isOpen == true) + { + //浜害鏄繀椤昏鍒锋柊鐨� 浜害 XX + this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uBrightness) + " " + HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device)); + if (this.isProgressing == false) + { + //褰撹繘搴﹀�煎湪鎵嬪姩鍙樻洿涓椂,涓嶆帴鏀舵帹閫� + waveSeekBar.Progress = (int)(((DimmableLight)this.device).Level * 1.0 / MaxLevel * 100); + } + } + if (isOpen == false && this.IsLightOpen == true) + { + //鐘舵�佷笉涓�鏍�,鎵嶅彉鏇村瓧鏍�:鍏抽棴 + this.SetStatuText(Language.StringByID(R.MyInternationalizationString.Close)); + } + + if (listControl[0].IsSelected != isOpen) + { + //寮�鍏崇姸鎬佸彉鏇� + listControl[0].IsSelected = isOpen; + } + + //鐘舵�佷笉涓�鏍锋墠鍙樻洿 + if (this.IsLightOpen != isOpen) + { + if (isOpen == true) + { + waveSeekBar.IsClickable = true; + waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarColor_Start, ZigbeeColor.Current.GXCWaveSeekBarColor_End); + } + else + { + waveSeekBar.IsClickable = false; + waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor); + } + } + this.IsLightOpen = isOpen; + //鍥炲鐨勭粨鏋滆,澶勪簬鎵撳紑鐘舵�佹墠鑳藉彂閫� + this.canSetProgressValue = this.IsLightOpen; + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs index 7790e40..f216dfe 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs @@ -72,7 +72,7 @@ btnHumidityText.TextAlignment = TextAlignment.Center; frameHumidityPic.AddChidren(btnHumidityText); - //婀垮害鏁版嵁锛堢1涓紝listControl銆�0銆戯級 + //婀垮害鏁版嵁 var btnHumidityStatus = new NormalViewControl(193, 92, true); btnHumidityStatus.Y = Application.GetRealHeight(181); btnHumidityStatus.Text = "20"; @@ -80,12 +80,11 @@ btnHumidityStatus.TextColor = ZigbeeColor.Current.XMWhite; btnHumidityStatus.TextAlignment = TextAlignment.CenterRight; frameHumidityPic.AddChidren(btnHumidityStatus); - this.listControl.Add(btnHumidityStatus); //婀垮害鍗曚綅 - var btnHumidityUnit = new NormalViewControl(37 + 81, 40, true); + var btnHumidityUnit = new NormalViewControl(60, 40, true); btnHumidityUnit.Y = Application.GetRealHeight(181 + 46); - btnHumidityUnit.X = Application.GetRealWidth(180); + btnHumidityUnit.X = btnHumidityStatus.Right; btnHumidityUnit.Text = "%"; btnHumidityUnit.TextSize = 14; btnHumidityUnit.TextColor = ZigbeeColor.Current.XMWhite; @@ -109,7 +108,7 @@ btnTemperatureText.TextAlignment = TextAlignment.Center; frameTemperaturePic.AddChidren(btnTemperatureText); - //娓╁害鏁版嵁锛堢2涓紝listControl銆�1銆戯級 + //娓╁害鏁版嵁 var btnTemperatureStatus = new NormalViewControl(193, 92, true); btnTemperatureStatus.Y = Application.GetRealHeight(181); btnTemperatureStatus.Text = "20"; @@ -117,12 +116,11 @@ btnTemperatureStatus.TextColor = ZigbeeColor.Current.XMWhite; btnTemperatureStatus.TextAlignment = TextAlignment.CenterRight; frameTemperaturePic.AddChidren(btnTemperatureStatus); - this.listControl.Add(btnTemperatureStatus); //娓╁害鍗曚綅 - var btnTemperatureUnit = new NormalViewControl(40 + 81, 40, true); + var btnTemperatureUnit = new NormalViewControl(50, 40, true); btnTemperatureUnit.Y = Application.GetRealHeight(181 + 46); - btnTemperatureUnit.X = Application.GetRealWidth(180); + btnTemperatureUnit.X = btnTemperatureStatus.Right; btnTemperatureUnit.Text = "鈩�"; btnTemperatureUnit.TextSize = 14; btnTemperatureUnit.TextColor = ZigbeeColor.Current.XMWhite; @@ -146,7 +144,7 @@ btnPmText.TextAlignment = TextAlignment.Center; framePmPic.AddChidren(btnPmText); - //PM2.5鏁版嵁锛堢3涓紝listControl銆�2銆戯級 + //PM2.5鏁版嵁 var btnPmStatus = new NormalViewControl(162, 92, true); btnPmStatus.Y = Application.GetRealHeight(181); btnPmStatus.Text = "155"; @@ -154,18 +152,24 @@ btnPmStatus.TextColor = ZigbeeColor.Current.XMWhite; btnPmStatus.TextAlignment = TextAlignment.CenterRight; framePmPic.AddChidren(btnPmStatus); - this.listControl.Add(btnPmStatus); //PM2.5鍗曚綅 锛堢4涓紝listControl銆�3銆戯級 - var btnPmUnit = new NormalViewControl(120 + 26, 43, true); - btnPmUnit.Y = Application.GetRealHeight(181 + 46); - btnPmUnit.X = Application.GetRealWidth(153); + var btnPmUnit = new NormalViewControl(144, 48, true); + btnPmUnit.Y = Application.GetRealHeight(181 + 41); + btnPmUnit.X = btnPmStatus.Right; btnPmUnit.Text = "渭g/m鲁"; btnPmUnit.TextSize = 14; btnPmUnit.TextColor = ZigbeeColor.Current.XMWhite; btnPmUnit.TextAlignment = TextAlignment.CenterLeft; framePmPic.AddChidren(btnPmUnit); - this.listControl.Add(btnPmUnit); + + this.listControl.Add(btnHumidityStatus);//锛堢1涓紝listControl銆�0銆戯級 + this.listControl.Add(btnTemperatureStatus);//锛堢2涓紝listControl銆�1銆戯級 + this.listControl.Add(btnPmStatus);//锛堢3涓紝listControl銆�2銆戯級 + this.listControl.Add(btnPmUnit);//锛堢4涓紝listControl銆�3銆戯級 + this.listControl.Add(btnHumidityUnit);//锛堢5涓紝listControl銆�4銆戯級 + this.listControl.Add(btnTemperatureUnit);//锛堢6涓紝listControl銆�5銆戯級 + } #endregion @@ -244,12 +248,46 @@ private void UpdateStatus() { //璁剧疆鐘舵�佹枃瀛� - this.listControl[0].Text = pMSensor.currentTemperature.ToString(); - this.listControl[1].Text = pMSensor.currentHumidity.ToString(); + this.listControl[0].Text = pMSensor.currentHumidity.ToString(); + this.listControl[1].Text = pMSensor.currentTemperature.ToString(); this.listControl[2].Text = pMSensor.currentPmData.ToString(); //璁剧疆鐘舵�佹枃瀛� var curText = Language.StringByID(R.MyInternationalizationString.AirQuality) + QuailityType(); this.SetStatuText(curText); + + + if (pMSensor.currentHumidity <= 9 && pMSensor.currentHumidity >= 0) + { + this.listControl[0].Width = Application.GetRealWidth(168); + this.listControl[4].X = this.listControl[0].Right; + } + else if (pMSensor.currentHumidity < 100 && pMSensor.currentHumidity >= 10) + { + this.listControl[0].Width = Application.GetRealWidth(184); + this.listControl[4].X = this.listControl[0].Right; + } + else + { + this.listControl[0].Width = Application.GetRealWidth(188 + 30); + this.listControl[4].X = this.listControl[0].Right; + } + + if (pMSensor.currentTemperature <= 9 && pMSensor.currentTemperature >= 0) + { + this.listControl[1].Width = Application.GetRealWidth(168); + this.listControl[5].X = this.listControl[1].Right; + } + else if (pMSensor.currentTemperature < 100 && pMSensor.currentTemperature >= 10) + { + this.listControl[1].Width = Application.GetRealWidth(190); + this.listControl[5].X = this.listControl[1].Right; + } + else + { + this.listControl[1].Width = Application.GetRealWidth(188 + 30); + this.listControl[5].X = this.listControl[1].Right; + } + } /// <summary> @@ -265,60 +303,60 @@ if (pMSensor.currentPmData < 10) { - this.listControl[2].Width = Application.GetRealWidth(188 - 70); - this.listControl[3].X = Application.GetRealWidth(180 - 70); + this.listControl[2].Width = Application.GetRealWidth(125); + this.listControl[3].X = this.listControl[2].Right; } else { - this.listControl[2].Width = Application.GetRealWidth(193 - 40); - this.listControl[3].X = Application.GetRealWidth(137); + this.listControl[2].Width = Application.GetRealWidth(145); + this.listControl[3].X = this.listControl[2].Right; } } else if (pMSensor.currentPmData <= 75 && pMSensor.currentPmData > 35) { - curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality); - this.listControl[2].Width = Application.GetRealWidth(193 - 40); - this.listControl[3].X = Application.GetRealWidth(137); + curQuality = Language.StringByID(R.MyInternationalizationString.GoodAirQuality); + this.listControl[2].Width = Application.GetRealWidth(145); + this.listControl[3].X = this.listControl[2].Right; } else if (pMSensor.currentPmData <= 115 && pMSensor.currentPmData > 75) { - curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality); + curQuality = Language.StringByID(R.MyInternationalizationString.LightPollution); if (pMSensor.currentPmData < 100) { - this.listControl[2].Width = Application.GetRealWidth(193 - 40); - this.listControl[3].X = Application.GetRealWidth(137); + this.listControl[2].Width = Application.GetRealWidth(145); + this.listControl[3].X = this.listControl[2].Right; } else { this.listControl[2].Width = Application.GetRealWidth(162); - this.listControl[3].X = Application.GetRealWidth(153); + this.listControl[3].X = this.listControl[2].Right; } } else if (pMSensor.currentPmData <= 150 && pMSensor.currentPmData > 115) { - curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality); + curQuality = Language.StringByID(R.MyInternationalizationString.Moderatelyolluted); this.listControl[2].Width = Application.GetRealWidth(162); - this.listControl[3].X = Application.GetRealWidth(153); + this.listControl[3].X = this.listControl[2].Right; } else if (pMSensor.currentPmData <= 250 && pMSensor.currentPmData > 150) { - curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality); - this.listControl[2].Width = Application.GetRealWidth(162); - this.listControl[3].X = Application.GetRealWidth(153); + curQuality = Language.StringByID(R.MyInternationalizationString.HeavyPollution); + this.listControl[2].Width = Application.GetRealWidth(176); + this.listControl[3].X = this.listControl[2].Right; } else if (pMSensor.currentPmData > 250) { - curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality); - this.listControl[2].Width = Application.GetRealWidth(162); - this.listControl[3].X = Application.GetRealWidth(153); + curQuality = Language.StringByID(R.MyInternationalizationString.SeriousPollution); + this.listControl[2].Width = Application.GetRealWidth(176); + this.listControl[3].X = this.listControl[2].Right; } else { curQuality = ""; this.listControl[2].Width = Application.GetRealWidth(162); - this.listControl[3].X = Application.GetRealWidth(153); + this.listControl[3].X = this.listControl[2].Right; } //璁剧疆鐘舵�佹枃瀛� return curQuality; diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs index 885111b..cdb3057 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs @@ -246,11 +246,7 @@ /// <returns></returns> public override bool CheckResponeResultStatu(ReceiveComandDiv comandDiv, CommonDevice report) { - if (comandDiv == ReceiveComandDiv.A鑺傜偣鎺у埗鍙嶉) - { - return true; - } - else if (comandDiv == ReceiveComandDiv.A璁惧灞炴�т笂鎶�) + if (comandDiv == ReceiveComandDiv.A璁惧灞炴�т笂鎶�) { HdlThreadLogic.Current.RunMain(() => { @@ -259,6 +255,7 @@ //璁剧疆鐘舵�佹枃瀛� this.SetStatuText(HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device)); }); + return true; } return false; } diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs index e966a0b..4bab981 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs @@ -361,7 +361,7 @@ HdlThreadLogic.Current.RunThread(() => { - int waitime = 30; + int waitime = 40; while (waitime > 0) { System.Threading.Thread.Sleep(100); @@ -371,8 +371,15 @@ break; } waitime--; + //2绉掔殑鏃跺��,杩樻槸鎺ュ彈涓嶅埌鐨勮瘽,寮哄埗鍐嶆鍒锋柊璁惧鐘舵�� + if (waitime == 20) + { + //浠庢柊鍙戦�佽幏鍙栬澶囩殑鐘舵��(寮哄埗) + this.device.HadReadDeviceStatu = false; + this.SendStatuComand(); + } } - if (waitime <= 0) + if (waitime <= 0 && this.Parent != null) { //娌℃湁鑾峰彇寰楀埌缁撴灉 HdlThreadLogic.Current.RunMain(() => diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAcCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAcCardControl.cs index e3836a7..e3842ac 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAcCardControl.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAcCardControl.cs @@ -74,6 +74,7 @@ //绌鸿皟绫诲瀷鐨勬繁搴﹀崱鐗囩晫闈� var form = new ControlForm.DeviceAcDetailCardForm(); + form.RowOrCardControl = this; form.AddForm(i_device, this.nowSelectRoom, 965, 1457); form.FormCloseEvent += this.CardDetailInfoBackEvent; }; diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirSwitchCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirSwitchCardControl.cs index 83fa9c1..9042f4d 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirSwitchCardControl.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirSwitchCardControl.cs @@ -87,6 +87,7 @@ //缁х數鍣ㄧ被鍨嬬殑娣卞害鍗$墖鐣岄潰(鍚┖姘斿紑鍏�) var form = new ControlForm.DeviceRelayDetailCardForm(); + form.RowOrCardControl = this; form.AddForm(i_device, this.nowSelectRoom, 965, backHeight); form.FormCloseEvent += this.CardDetailInfoBackEvent; }; diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceColorLightCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceColorLightCardControl.cs index 5f4b1ad..9e3b374 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceColorLightCardControl.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceColorLightCardControl.cs @@ -71,10 +71,22 @@ { Common.CommonPage.Instance.IsDrawerLockMode = true; - //褰╃伅,璋冨厜鍣ㄧ被鍨嬬殑娣卞害鍗$墖鐣岄潰 - var form = new ControlForm.DeviceColorLightDetailCardForm(); - form.AddForm(i_device, this.nowSelectRoom, 965, 1316); - form.FormCloseEvent += this.CardDetailInfoBackEvent; + //濡傛灉鏄疢ini澶滅伅 + if (Common.LocalDevice.Current.IsMiniLight(i_device) == true) + { + var form = new ControlForm.DeviceMiniLightDetailCardForm(); + form.RowOrCardControl = this; + form.AddForm(i_device, this.nowSelectRoom, 965, 1466); + form.FormCloseEvent += this.CardDetailInfoBackEvent; + } + else + { + //褰╃伅,璋冨厜鍣ㄧ被鍨嬬殑娣卞害鍗$墖鐣岄潰 + var form = new ControlForm.DeviceColorLightDetailCardForm(); + form.RowOrCardControl = this; + form.AddForm(i_device, this.nowSelectRoom, 965, 1316); + form.FormCloseEvent += this.CardDetailInfoBackEvent; + } }; } diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceCurtainCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceCurtainCardControl.cs index 974068c..1d8c985 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceCurtainCardControl.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceCurtainCardControl.cs @@ -73,6 +73,7 @@ Common.CommonPage.Instance.IsDrawerLockMode = true; //绐楀笜绫诲瀷鐨勬繁搴﹀崱鐗囩晫闈� var form = new ControlForm.DeviceCurtainDetailCardForm(); + form.RowOrCardControl = this; form.AddForm(i_device, this.nowSelectRoom, 965, 1316); form.FormCloseEvent += this.CardDetailInfoBackEvent; }; diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceFreshAirCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceFreshAirCardControl.cs index 9ff6bb4..1bed2cc 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceFreshAirCardControl.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceFreshAirCardControl.cs @@ -71,6 +71,7 @@ //鏂伴绫诲瀷鐨勬繁搴﹀崱鐗囩晫闈� var form = new MainPage.ControlForm.DeviceFreshAirDetailCardForm(); + form.RowOrCardControl = this; form.AddForm(i_device, this.nowSelectRoom, 965, 1374); form.FormCloseEvent += this.CardDetailInfoBackEvent; }; diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceRelayCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceRelayCardControl.cs index 6d7bcb2..56ee25c 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceRelayCardControl.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceRelayCardControl.cs @@ -88,6 +88,7 @@ //缁х數鍣ㄧ被鍨嬬殑娣卞害鍗$墖鐣岄潰(鍚┖姘斿紑鍏�) var form = new ControlForm.DeviceRelayDetailCardForm(); + form.RowOrCardControl = this; form.AddForm(i_device, this.nowSelectRoom, 965, backHeight); form.FormCloseEvent += this.CardDetailInfoBackEvent; }; diff --git a/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs b/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs index 330f836..e6b064b 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs @@ -176,7 +176,7 @@ SceneBodyTableControl.AddChidren(listSceneView); var listScene = HdlSceneLogic.Current.GetUnalloctedScenes(); - if (listScene == null || listScene.Count == 0) { return; } + if (listScene.Count == 0) { return; } foreach (var data in listScene) { 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 160b6c3..3a2334a 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs @@ -37,6 +37,10 @@ { set { this.Radius = (uint)Application.GetRealHeight(value); } } + /// <summary> + /// 澹版槑姝ゅ彉閲�,鏃ㄥ湪瀛愮嚎绋嬩篃鑳藉鍘昏幏鍙栦竴涓帶浠剁殑涓婚敭 + /// </summary> + public string MainKey = string.Empty; /// <summary> /// 鐐瑰嚮鐨勫潗鏍� @@ -354,7 +358,7 @@ /// <summary> /// 璇ユ帶浠舵墍灞炵殑鐣岄潰鍚嶅瓧 /// </summary> - private string formName = null; + public string formName = null; /// <summary> /// 鎺т欢鍚嶅瓧 /// </summary> diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs index 889170d..24b5d62 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/FrameLayoutBase.cs @@ -9,6 +9,23 @@ /// </summary> public class FrameLayoutBase : FrameLayout { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 璁剧疆鑳藉惁瑙︾偣鍑讳簨浠� + /// </summary> + public bool CanClick = true; + /// <summary> + /// 澹版槑姝ゅ彉閲�,鏃ㄥ湪瀛愮嚎绋嬩篃鑳藉鍘昏幏鍙栦竴涓帶浠剁殑涓婚敭 + /// </summary> + public string MainKey = string.Empty; + /// <summary> + /// 鎺т欢鐨勭偣鍑讳簨浠�(鑷畾涔夊皝瑁呬簨浠�,姝や簨浠惰璁ゅ彲涓烘墽琛屾寜閽寜涓嬩簨浠�,鍙桟anClick灞炴�ф帶鍒�) + /// </summary> + public Action<object, MouseEventArgs> ButtonClickEvent = null; + + #endregion + #region 鈻� 鍒濆鍖朹____________________________ /// <summary> @@ -16,6 +33,45 @@ /// </summary> public FrameLayoutBase() { + //鐐瑰嚮浜嬩欢 + this.MouseUpEventHandler += ButtonBase_MouseUpEventHandler; + } + + #endregion + + #region 鈻� 鐐瑰嚮浜嬩欢___________________________ + + /// <summary> + /// 鐐瑰嚮浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ButtonBase_MouseUpEventHandler(object sender, MouseEventArgs e) + { + if (ButtonClickEvent == null) + { + this.MouseUpEventHandler -= ButtonBase_MouseUpEventHandler; + return; + } + //2020.05.14杩藉姞IsFormAdding:鐣岄潰杩樺湪鍔犺浇涓�,涓嶈兘鍐嶇偣鍑� + if (CanClick == true && ControlCommonResourse.IsFormAdding == false) + { + //Log鍑哄姏 + this.WriteLog(); + + try + { + this.ButtonClickEvent(this, e); + } + catch (Exception ex) + { + //鍑虹幇鏈煡閿欒 + var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError)); + alert.Show(); + //Log鍑哄姏 + HdlLogLogic.Current.WriteLog(ex); + } + } } #endregion @@ -32,6 +88,54 @@ return HdlControlLogic.Current.GetPictrueRealSize(i_size); } + /// <summary> + /// 鎺т欢鎽ф瘉 + /// </summary> + public override void RemoveFromParent() + { + ButtonClickEvent = null; + + if (this.Parent != null) + { + base.RemoveFromParent(); + } + } + + #endregion + + #region 鈻� Log鍑哄姏____________________________ + + /// <summary> + /// 璇ユ帶浠舵墍灞炵殑鐣岄潰鍚嶅瓧 + /// </summary> + public string formName = null; + /// <summary> + /// Log鍑哄姏 + /// </summary> + private void WriteLog() + { + if (formName == null) + { + formName = string.Empty; + View myView = this.Parent; + for (; ; ) + { + if (myView == null) + { + break; + } + else if (myView is CommonFormBase) + { + //杩欎釜鎺т欢鎵�灞炵殑鐣岄潰 + formName = ((CommonFormBase)myView).FormID; + break; + } + myView = myView.Parent; + } + } + HdlLogLogic.Current.WriteLog(1, formName + "鐨刐Y" + this.Y + "]琚偣鍑�"); + } + #endregion } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/RowLayoutBase.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/RowLayoutBase.cs index f808a9c..b911db3 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/RowLayoutBase.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/RowLayoutBase.cs @@ -32,6 +32,17 @@ return HdlControlLogic.Current.GetPictrueRealSize(i_size); } + /// <summary> + /// 鎺т欢绉婚櫎 + /// </summary> + public override void RemoveFromParent() + { + if (this.Parent != null) + { + base.RemoveFromParent(); + } + } + #endregion } } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs index c825e64..dbf1a01 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/TextInputBase.cs @@ -23,9 +23,66 @@ set { this.btnLineTemp = value; - //鍏夋爣浜嬩欢 - this.FoucsChanged -= this.TxtCode_FoucsChangedEvent; - this.FoucsChanged += this.TxtCode_FoucsChangedEvent; + } + } + + /// <summary> + /// 杈撳叆缁撴潫鐨勪簨浠� + /// </summary> + public Action FinishInputEvent = null; + /// <summary> + /// 鏈�澶ц緭鍏ラ暱搴�(鐩墠鍙拡瀵规寜涓嬪洖杞﹂敭鏃惰繘琛屾娴�,瓒呰繃鏃�,涓嶄細璋冪敤FinishInputEvent) + /// </summary> + public int MaxByte = 0; + /// <summary> + /// 鎸囧畾璇ヨ緭鍏ユ鏄惁涓轰笉鍙渷鐣�(榛樿涓篺alse) + /// </summary> + public bool MustInput = false; + + private bool m_UseFocusColor = false; + /// <summary> + /// 鍏夋爣杩涘叆鏂囨湰妗嗘椂,鏄惁璁╁瓧浣撻鑹插彉鏇�(榛樿涓嶄娇鐢�) + /// </summary> + public bool UseFocusColor + { + set + { + m_UseFocusColor = value; + if (m_UseFocusColor == true) + { + //鐏拌壊瀛椾綋 + this.TextColor = UserCenterColor.Current.TextGrayColor3; + } + } + } + + private bool m_OnError = false; + /// <summary> + /// 璁╄繖涓枃鏈鏄剧ず澶勪簬閿欒鐨勭壒鏁� + /// </summary> + public bool OnError + { + get { return m_OnError; } + set + { + if (value != m_OnError) + { + m_OnError = value; + //鏆傛椂灞忚斀姝ょ壒鏁� + //if (m_OnError == true) + //{ + // //绾㈣壊 + // this.BorderColor = UserCenterColor.Current.Red; + // this.Radius = (uint)Application.GetRealHeight(17); + // this.BorderWidth = 3; + //} + //else + //{ + // this.BorderColor = UserCenterColor.Current.Transparent; + // this.BorderWidth = 0; + // this.Radius = 0; + //} + } } } @@ -44,6 +101,11 @@ this.PlaceholderTextColor = UserCenterColor.Current.TextTipColor; this.TextColor = UserCenterColor.Current.TextColor1; this.TextAlignment = TextAlignment.CenterLeft; + + //鐒︾偣浜嬩欢 + this.FoucsChanged += this.TxtCode_FoucsChangedEvent; + //鎸変笅鍥炶溅閿簨浠� + this.EditorEnterAction += this.EditorEnterEvent; } /// <summary> @@ -115,6 +177,11 @@ { btnLineTemp.BackgroundColor = UserCenterColor.Current.ButtomLine; } + if (m_UseFocusColor == true) + { + //鐏拌壊瀛椾綋 + this.TextColor = UserCenterColor.Current.TextGrayColor3; + } } else { @@ -122,7 +189,94 @@ { btnLineTemp.BackgroundColor = UserCenterColor.Current.TextFrameSelectColor; } + if (m_UseFocusColor == true) + { + //姝e父瀛椾綋 + this.TextColor = UserCenterColor.Current.TextColor1; + } } + } + + /// <summary> + /// 杈撳叆瀹屾垚浜嬩欢 + /// </summary> + /// <param name="view"></param> + private void EditorEnterEvent(View view) + { + //妫�娴嬫渶澶ц緭鍑築yte + string msg = this.CheckMaxByte(); + if (msg != null) + { + var contr = new ShowMsgControl(ShowMsgType.Tip, msg); + contr.Show(); + return; + } + this.FinishInputEvent?.Invoke(); + } + + #endregion + + #region 鈻� 妫�娴嬮敊璇痏__________________________ + + /// <summary> + /// 妫�娴嬫纭��,瀛樺湪閿欒鏃�,杩斿洖閿欒鏂囨湰,鏃犻敊璇繑鍥瀗ull + /// </summary> + /// <returns></returns> + public string CheckError() + { + //鎵ц妫�娴嬮敊璇� + string error = this.DoCheckError(); + if (error != null) + { + //鐒︾偣鎺у埗 + this.Foucs = true; + return error; + } + return null; + } + + /// <summary> + /// 鎵ц妫�娴嬮敊璇� + /// </summary> + /// <returns></returns> + private string DoCheckError() + { + //妫�娴嬫渶澶ц緭鍑築yte + string msg = this.CheckMaxByte(); + if (msg != null) { return msg; } + + //妫�娴嬪繀椤昏緭鍏� + if (this.MustInput == true && this.Text.Trim() == string.Empty) + { + if (string.IsNullOrEmpty(this.PlaceholderText) == false) + { + return this.PlaceholderText; + } + //璇ュ唴瀹逛笉鑳界渷鐣� + return Language.StringByID(R.MyInternationalizationString.uThisContentCanNotOmitted); + } + + return null; + } + + /// <summary> + /// 妫�娴嬫渶澶ц緭鍏yte + /// </summary> + /// <returns></returns> + private string CheckMaxByte() + { + if (this.MaxByte != 0) + { + if (Encoding.UTF8.GetBytes(this.Text.Trim()).Length > this.MaxByte) + { + //杈撳叆鍐呭杩囬暱,鏈�澶0}瀛楄妭 + string msg = Language.StringByID(R.MyInternationalizationString.uInputContentIsOverLengthMsg); + msg.Replace("{0}", this.MaxByte.ToString()); + + return msg; + } + } + return null; } #endregion @@ -154,6 +308,18 @@ return HdlControlLogic.Current.GetPictrueRealSize(i_size); } + /// <summary> + /// 鎺т欢绉婚櫎 + /// </summary> + public override void RemoveFromParent() + { + this.FinishInputEvent = null; + if (this.Parent != null) + { + base.RemoveFromParent(); + } + } + #endregion } } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomClickButton.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomClickButton.cs index 855c674..e2e762f 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomClickButton.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ClickButtonControls/BottomClickButton.cs @@ -10,6 +10,14 @@ public class BottomClickButton : ClickButtonCommon { /// <summary> + /// 鎺т欢鐨勭偣鍑讳簨浠� + /// </summary> + public new Action<Button, MouseEventArgs> ButtonClickEvent = null; + /// <summary> + /// 鏄惁妫�娴嬬晫闈�(榛樿涓嶆娴�) + /// </summary> + public bool CheckForm = false; + /// <summary> /// Y杞村潗鏍� /// </summary> public int Yaxis = 0; @@ -30,6 +38,21 @@ this.Radius = (uint)Application.GetRealHeight(128) / 2; this.TextSize = 16; this.IsBold = true; + + base.ButtonClickEvent += (sender, e) => + { + if (this.CheckForm == true && UserCenterResourse.DicActionForm.ContainsKey(this.formName) == true) + { + //妫�娴嬬晫闈� + bool result = UserCenterResourse.DicActionForm[this.formName].CheckForm(); + if (result == false) + { + //妫�娴嬩笉閫氳繃 + return; + } + } + this.ButtonClickEvent?.Invoke(sender, e); + }; } } } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressRowBar.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressRowBar.cs new file mode 100755 index 0000000..aebe897 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/ProgressRowBar.cs @@ -0,0 +1,212 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter +{ + /// <summary> + /// 琛屾潯绫诲瀷鐨勮繘搴︽潯鎺т欢 + /// </summary> + public class ProgressRowBar : FrameLayout + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 浼氱Щ鍔ㄧ殑杩涘害鏉� + /// </summary> + private FrameLayout btnProgressBar = null; + /// <summary> + /// 鏁板�肩櫨鍒嗘瘮鏂囨湰鐨勫鍣� + /// </summary> + private FrameLayout frameProgressBack = null; + /// <summary> + /// 鏄剧ず鏁板�肩櫨鍒嗘瘮鐨勬帶浠� + /// </summary> + private NormalViewControl btnProgressTextView = null; + /// <summary> + /// 绾跨▼鏄惁杩愯 + /// </summary> + private bool isThreadAction = false; + /// <summary> + /// 妯″紡鍖哄垎 + /// </summary> + private int m_ModeDiv = -1; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 琛屾潯绫诲瀷鐨勮繘搴︽潯鎺т欢 + /// </summary> + /// <param name="width">闈炵湡瀹炲��</param> + /// <param name="height">闈炵湡瀹炲��</param> + public ProgressRowBar(int width, int height) + { + this.Height = Application.GetRealHeight(height); + this.Width = Application.GetRealWidth(width); + this.BackgroundColor = 0xffe6e6e6; + this.Radius = (uint)Application.GetRealHeight(height) / 2; + } + + #endregion + + #region 鈻� 妯″紡1______________________________ + + /// <summary> + /// 妯″紡1 璇ユā寮忎负锛氭墜鍔ㄥ~鍐欒繘搴﹀�� + /// </summary> + /// <param name="showText">鏄惁鍦ㄨ繘搴︽潯涓婃柟鏄剧ず鏁板�肩櫨鍒嗘瘮</param> + public void StartMode1(bool showText = false) + { + if (m_ModeDiv != -1) { return; } + this.m_ModeDiv = 1; + + //浼氱Щ鍔ㄧ殑杩涘害鏉� + this.btnProgressBar = new FrameLayout(); + btnProgressBar.Width = 0; + btnProgressBar.Height = this.Height; + btnProgressBar.BackgroundColor = 0xfffb744a; + btnProgressBar.Radius = (uint)this.Height / 2; + this.AddChidren(btnProgressBar); + + if (showText == true) + { + //杩涘害鍊兼枃鏈� + this.frameProgressBack = new FrameLayout(); + frameProgressBack.Width = Application.GetRealWidth(84); + frameProgressBack.Height = Application.GetRealHeight(60); + frameProgressBack.Y = this.Y - Application.GetRealHeight(60); + frameProgressBack.X = this.X - Application.GetRealWidth(84) / 2; + this.Parent.AddChidren(frameProgressBack); + + var btnProgressPic = new PicViewControl(84, 60); + btnProgressPic.UnSelectedImagePath = "Item/ProgressMsg.png"; + frameProgressBack.AddChidren(btnProgressPic); + this.btnProgressTextView = new NormalViewControl(84, 45, true); + btnProgressTextView.TextSize = 10; + btnProgressTextView.TextAlignment = TextAlignment.Center; + btnProgressTextView.Text = "0%"; + frameProgressBack.AddChidren(btnProgressTextView); + } + } + + /// <summary> + /// 璁剧疆杩涘害鍊� + /// </summary> + /// <param name="value">姝ゅ�间负鐧惧垎姣斿��(涔熷氨鏄皬浜庢垨鑰呯瓑浜�1鐨�)</param> + public void SetValue(decimal value) + { + this.SetValueEx(value); + } + + /// <summary> + /// 璁剧疆杩涘害鍊� + /// </summary> + /// <param name="value">杩涘害鍊�,鍐呴儴浼氶櫎浠axValue</param> + /// <param name="maxValue">鏈�澶у��</param> + public void SetValue(decimal value, decimal maxValue) + { + decimal result = value / maxValue; + this.SetValueEx(result); + } + + /// <summary> + /// 璁剧疆杩涘害鍊� + /// </summary> + /// <param name="value"></param> + private void SetValueEx(decimal value) + { + if (btnProgressBar == null || this.m_ModeDiv != 1 || value > 1) + { + return; + } + HdlThreadLogic.Current.RunMain(() => + { + int width = (int)(value * this.Width); + btnProgressBar.Width = width; + if (this.btnProgressTextView != null) + { + //鏂囨湰鏄剧ず + btnProgressTextView.Text = ((int)(value * 100)) + "%"; + //鏂囨湰鏄剧ず鐨勯偅涓浘鐗囨绉诲姩 + this.frameProgressBack.X = ControlCommonResourse.XXLeft + btnProgressBar.Right - frameProgressBack.Width / 2; + } + }); + } + + #endregion + + #region 鈻� 妯″紡2______________________________ + + /// <summary> + /// 妯″紡2 璇ユā寮忎负锛氫笉鑳芥墜鍔ㄦ寚瀹氳繘搴﹀��,鐢卞唴閮ㄧ嚎绋嬪鐞�,杩涘害鏉″湪鎸佺画鏃犻檺鐨勬潵鍥炵Щ鍔� + /// </summary> + /// <param name="proWidth">浼氱Щ鍔ㄧ殑杩涘害鏉$殑瀹藉害(闈炵湡瀹炲��)</param> + public void StartMode2(int proWidth = 100) + { + if (m_ModeDiv != -1) { return; } + this.m_ModeDiv = 2; + + //浼氱Щ鍔ㄧ殑杩涘害鏉� + this.btnProgressBar = new FrameLayout(); + btnProgressBar.Width = Application.GetRealWidth(proWidth); + btnProgressBar.Height = this.Height; + btnProgressBar.BackgroundColor = 0xfffb744a; + btnProgressBar.Radius = (uint)this.Height / 2; + this.AddChidren(btnProgressBar); + + //寮�鍚ā寮�2鐨勭嚎绋� + this.StartMode2Thread(); + } + + /// <summary> + /// 閲嶆柊寮�鍚ā寮�2 + /// </summary> + public void ReStartMode2() + { + //寮�鍚ā寮�2鐨勭嚎绋� + this.StartMode2Thread(); + } + + /// <summary> + /// 鏆傚仠妯″紡2 + /// </summary> + public void StopMode2() + { + this.isThreadAction = false; + } + + /// <summary> + /// 寮�鍚ā寮�2鐨勭嚎绋� + /// </summary> + private void StartMode2Thread() + { + if (this.isThreadAction == true) + { + return; + } + this.isThreadAction = true; + int moveLength = Application.GetRealWidth(30); + HdlThreadLogic.Current.RunThread(() => + { + while (this.Parent != null && isThreadAction == true) + { + HdlThreadLogic.Current.RunMain(() => + { + if (this.btnProgressBar.X >= this.Width) + { + //瓒呭嚭鍙宠竟涔嬪悗,鍐嶆浠庡乏杈瑰惊鐜� + this.btnProgressBar.X = -this.btnProgressBar.Width; + return; + } + this.btnProgressBar.X += moveLength; + }, ShowErrorMode.NO); + System.Threading.Thread.Sleep(150); + } + }); + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs index b503b18..6010e81 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SceneFunctionSwitchControl.cs @@ -8,7 +8,7 @@ /// <para>鍦烘櫙鍜屽姛鑳戒箣闂寸浉浜掑垏鎹㈢殑Tab鎺т欢(瀹屾垚鍒濆鍖栧悗,浼氭牴鎹粯璁ら�夋嫨璋冪敤鍥炶皟鍑芥暟)</para> /// <para>2020.03.10鍙樻洿:瀹冨彉鏇翠负鏂囧瓧鍨嬭彍鍗曟帶浠�</para> /// </summary> - public class SceneFunctionSwitchControl : FrameLayout + public class SceneFunctionSwitchControl : HorizontalScrolViewLayout { #region 鈻� 鍙橀噺澹版槑___________________________ @@ -16,6 +16,10 @@ /// 閫夋嫨浜嬩欢(浠�0寮�濮�) /// </summary> public Action<int> SelectTabEvent = null; + /// <summary> + /// 鍓嶅洖閫夋嫨鐨勭储寮� + /// </summary> + public int OldSelectIndex = 0; private int m_nowSelectIndex = 0; /// <summary> @@ -49,7 +53,6 @@ public SceneFunctionSwitchControl() { this.Height = Application.GetRealHeight(90); - this.Y = Application.GetRealHeight(40); } /// <summary> @@ -60,37 +63,47 @@ public void InitControl(List<string> listTitleText, int rightSpace = 0) { if (listTitleText.Count == 0) { return; } + this.listNameControl.Clear(); + this.listLineControl.Clear(); var btnTemp = new NormalViewControl(10, 10, false); btnTemp.TextSize = 16; //鍋氭垚澶撮儴鑿滃崟鏂囧瓧 - int XX = 0; for (int i = 0; i < listTitleText.Count; i++) { btnTemp.Text = listTitleText[i]; - //寮�濮嬪垵濮嬪寲 - XX = this.InitTitleTextControl(i, listTitleText[i], btnTemp.GetRealWidthByText(), XX); + //娣诲姞鏍囬鎺т欢 + this.AddTitleTextControl(i, listTitleText[i], btnTemp.GetRealWidthByText()); } - //璋冩暣鎺т欢瀹藉害 - this.Width = XX + Application.GetRealWidth(rightSpace); + //娣诲姞鍙宠竟绌虹櫧瀹藉害 + if (rightSpace > 0) + { + //娣诲姞涓�涓棿闅旈棿璺� + var frameSpace = new FrameLayout(); + frameSpace.Width = Application.GetRealWidth(rightSpace); + this.AddChidren(frameSpace); + } //鍥炶皟鏂规硶 this.frameDefult.ButtonClickEvent?.Invoke(null, null); } /// <summary> - /// 鍒濆鍖栨爣棰樻帶浠� + /// 娣诲姞鏍囬鎺т欢 /// </summary> /// <param name="i_index"></param> /// <param name="titleText"></param> - private int InitTitleTextControl(int i_index, string titleText, int realWidth, int XX) + private void AddTitleTextControl(int i_index, string titleText, int realWidth) { + //娣诲姞涓�涓棿闅旈棿璺� + var frameSpace = new FrameLayout(); + frameSpace.Width = Application.GetRealWidth(58); + this.AddChidren(frameSpace); + //鍦烘櫙妗�(鐐瑰嚮鑼冨洿鏈夌偣灏忥紝闇�瑕佹墿澶у畠鐨勭偣鍑昏寖鍥�) var frameBack = new FrameLayoutStatuControl(); frameBack.UseClickStatu = false; - frameBack.Height = Application.GetRealHeight(90); frameBack.Width = realWidth; - frameBack.X = XX + Application.GetRealWidth(58); this.AddChidren(frameBack); //鍚嶇О var btnName = new NormalViewControl(frameBack.Width, Application.GetRealHeight(63), false); @@ -134,6 +147,7 @@ //鎵嬪姩鐐瑰嚮鐨勬墠澶勭悊 return; } + this.OldSelectIndex = this.m_nowSelectIndex; this.m_nowSelectIndex = i_index; //褰撳墠鏂囧瓧鍙樿壊 btnName.TextSize = 16; @@ -155,9 +169,6 @@ } this.SelectTabEvent?.Invoke(i_index); }; - - //杩斿洖杩欎釜鎺т欢鐨勫彸鍧愭爣 - return frameBack.Right; } #endregion @@ -179,11 +190,21 @@ #region 鈻� 涓�鑸柟娉昣__________________________ /// <summary> - /// 璁剧疆鍒濆閫夋嫨(璇峰湪鍒濆鍖栧畬鎴愪箣鍓嶈皟鐢�) + /// 璁剧疆鍒濆閫夋嫨 /// </summary> /// <param name="index">浠�0寮�濮�</param> public void SetDefultIndex(int index) { + if (frameDefult != null && frameDefult.Parent != null) + { + if (index < this.listNameControl.Count) + { + this.ScrollToViewIndex(index * 2 + 1); + //璋冪敤鐐瑰嚮浜嬩欢 + this.listNameControl[index].ButtonClickEvent(null, null); + } + return; + } this.m_nowSelectIndex = index; } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs index da2a3c0..0d4f93f 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs @@ -232,6 +232,22 @@ } } + /// <summary> + /// 娓呯┖杈撳叆鐨勫�� + /// </summary> + public void ClearInputValue() + { + foreach (var inputText in this.dicCodeControls.Values) + { + //鍏堢Щ闄や簨浠� + inputText.TextChangeEventHandler -= TxtCode_TextChangeEvent; + //璧嬪�� + inputText.Text = string.Empty; + inputText.TextChangeEventHandler += TxtCode_TextChangeEvent; + } + dicCodeControls[0].Foucs = true; + } + #endregion #region 鈻� 鎺т欢鎽ф瘉___________________________ diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionInputControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionInputControl.cs index fabd33b..5de7ea0 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionInputControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionInputControl.cs @@ -22,7 +22,7 @@ /// <summary> /// 杈撳叆妗嗘帶浠�(鍙栧�兼垨鑰呰幏鍙栧�煎彲浠ヤ娇鐢ㄣ�怲ext銆戝睘鎬�,铏界劧杩欎釜涔熷彲浠ュ彇) /// </summary> - public TextInputExControl txtInput = null; + public TextInputControl txtInput = null; /// <summary> /// 鏍囬鎺т欢 /// </summary> @@ -47,7 +47,8 @@ btnCaption.Gravity = Gravity.CenterVertical; btnCaption.Text = i_caption + "锛�"; - txtInput = new TextInputExControl(700, true); + txtInput = new TextInputControl(700, true); + txtInput.UseFocusColor = true; txtInput.X = Application.GetRealWidth(294); txtInput.Gravity = Gravity.CenterVertical; txtInput.Text = i_text; diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs index 3ba4da1..1c9264e 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs @@ -12,10 +12,6 @@ #region 鈻� 鍙橀噺澹版槑___________________________ /// <summary> - /// 鍗曞嚮寮硅捣浜嬩欢 - /// </summary> - public Action<object, MouseEventArgs> ButtonClickEvent; - /// <summary> /// 鐘舵�佽缃殑浜嬩欢(浼氶噸杞藉簳灞傛晥鏋�) /// </summary> public Action<bool> SelectStatuEvent; @@ -23,10 +19,6 @@ /// 鏄惁鍚敤鐐逛寒鍔熻兘(榛樿鍚敤) /// </summary> public bool UseClickStatu = true; - /// <summary> - /// 鑳藉惁鐐瑰嚮 - /// </summary> - public bool CanClick = true; /// <summary> /// 鍘熸潵鐨勮儗鏅壊 /// </summary> @@ -59,6 +51,8 @@ { this.chidrenYaxis = i_ChidrenYaxis; + //缃┖搴曞眰鐨勪簨浠� + this.MouseUpEventHandler = null; this.MouseUpEventHandler += ChildrenUpEvent; this.MouseDownEventHandler += ChildrenDownEvent; } @@ -332,7 +326,6 @@ /// </summary> public override void RemoveFromParent() { - this.ButtonClickEvent = null; this.SelectStatuEvent = null; base.RemoveFromParent(); diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/NormalFrameLayout.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/NormalFrameLayout.cs new file mode 100755 index 0000000..4488827 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/NormalFrameLayout.cs @@ -0,0 +1,14 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter +{ + /// <summary> + /// 鏅�氱殑FrameLayout + /// </summary> + public class NormalFrameLayout : FrameLayoutBase + { + //鐩墠娌℃湁浠�涔堢壒娈婄殑鍔熻兘 + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs index 84f54ab..0063924 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs @@ -20,7 +20,7 @@ /// </summary> private FrameLayout m_frameTable = null; /// <summary> - /// 妗屽竷鎺т欢 + /// 妗屽竷鎺т欢(杩欎釜涓滆タ涓嶈兘鍒狅紝鍥犱负鏈変簺鐣岄潰闇�瑕佷粬鐨勬甯�) /// </summary> public FrameLayout frameTable { @@ -30,6 +30,11 @@ return m_frameTable; } } + + /// <summary> + /// 涓�涓复鏃剁殑涓滆タ + /// </summary> + private FrameLayout frameBackTemp = null; #endregion @@ -79,10 +84,11 @@ //鍒濆鍖栨甯冩帶浠� this.InitFrameTable(); - var child = this.m_frameTable.GetChildren(this.m_frameTable.ChildrenCount - 1); - if (child != null) + //鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣 + int value = this.GetLocationMostLastViewBottom(this.m_frameTable); + if (value != -1) { - frame.Y = child.Bottom + rowSpace; + frame.Y = value + rowSpace; } this.m_frameTable.AddChidren(frame); //璋冩暣妗屽竷楂樺害 @@ -97,7 +103,7 @@ #region 鈻� 涓�鑸柟娉昣__________________________ /// <summary> - /// 璋冩暣瀛怓rameLayout鐨勯珮搴� + /// 璋冩暣瀛怓rameLayout鐨勯珮搴�(鍙墿澶�,涓嶇缉灏�) /// </summary> /// <param name="frame"></param> /// <param name="buttomSpace">搴曢儴绌虹櫧闂磋窛(鐪熷疄鍊�)</param> @@ -116,10 +122,31 @@ } /// <summary> + /// 璋冩暣瀛怓rameLayout鐨勭湡瀹為珮搴� + /// </summary> + /// <param name="frame"></param> + public void AdjustChidrenFrameRealHeight(FrameLayout frame) + { + //鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣 + int value = this.GetLocationMostLastViewBottom(frame); + if (value != -1) + { + //璋冩暣妗屽竷楂樺害 + frame.Height = value; + } + } + + /// <summary> /// 璋冩暣妗屽竷楂樺害 /// </summary> public void AdjustTableHeight() { + //2020.05.25杩藉姞 + if (this.frameBackTemp != null && this.frameBackTemp.Parent != null) + { + this.frameBackTemp.RemoveFromParent(); + } + //鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣 int value = this.GetLocationMostLastViewBottom(this.m_frameTable); if (value != -1) @@ -127,14 +154,25 @@ //璋冩暣妗屽竷楂樺害 this.m_frameTable.Height = value; } + else + { + //杩樺師涓哄師鏉ョ殑楂樺害 + this.RecoverTableHeight(); + } } /// <summary> /// 閽堝搴曢儴鐐瑰嚮鎸夐挳,璋冩暣鎺т欢鐪熷疄楂樺害 /// </summary> - /// <param name="correctionsValue">Y杞磋ˉ姝e��(鐪熷疄鍊�,鍒楄〃鎺т欢涓嶅湪bodyFramelayout鐨勬椂鍊欎娇鐢�)</param> + /// <param name="correctionsValue"> + /// <para>Y杞磋ˉ姝e��(鐪熷疄鍊�,鍒楄〃鎺т欢涓嶅湪bodyFramelayout鐨勬椂鍊欎娇鐢�)</para> + /// <para>涓�鑸负姝f暟,濡傛灉涓鸿礋鏁颁唬琛╞odyFramelayout瓒呭嚭浜嗛《閮�</para> + /// </param> public void AdjustRealHeightByBottomButton(int correctionsValue = 0) { + //璋冩暣妗屽竷楂樺害 2020.05.25杩藉姞 + this.AdjustTableHeight(); + var btnTemp = new BottomClickButton(); if (btnTemp.Yaxis >= this.m_frameTable.Height + correctionsValue) { @@ -144,9 +182,11 @@ //娣诲姞涓存椂鎺т欢,鐩磋嚦鍙互婊戝姩瓒呰繃搴曢儴鎸夐挳 int oldRowSpace = this.rowSpace; this.rowSpace = 0; - var frameBackTemp = new FrameLayout(); + + this.frameBackTemp = new FrameLayout(); frameBackTemp.Height = ControlCommonResourse.BodyFrameHeight - btnTemp.Yaxis + Application.GetRealHeight(23); this.AddChidrenFrame(frameBackTemp); + this.rowSpace = oldRowSpace; } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameRefreshControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameRefreshControl.cs index 3ad73c6..2ed4d25 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameRefreshControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameRefreshControl.cs @@ -5,7 +5,7 @@ namespace Shared.Phone.UserCenter { /// <summary> - /// 鍋氭垚涓�涓噷闈㈠彧瑁匜rameLayout鐨勫垪琛ㄥ瀷鎺т欢,鏈夊埛鏂板姛鑳�(瀹冧笉浼氳皟鏁撮珮搴�) + /// 鍋氭垚涓�涓噷闈㈠彧瑁匜rameLayout鐨勫垪琛ㄥ瀷鎺т欢,鏈夊埛鏂板姛鑳�(鏈夋甯�,瀹冧笉浼氳皟鏁撮珮搴�) /// </summary> public class VerticalFrameRefreshControl : VerticalRefreshLayout { @@ -30,6 +30,11 @@ return m_frameTable; } } + + /// <summary> + /// 涓�涓复鏃剁殑涓滆タ + /// </summary> + private FrameLayout frameBackTemp = null; #endregion @@ -80,10 +85,10 @@ //鍒濆鍖栨甯冩帶浠� this.InitFrameTable(); - var child = this.m_frameTable.GetChildren(this.m_frameTable.ChildrenCount - 1); - if (child != null) + int value = this.GetLocationMostLastViewBottom(this.m_frameTable); + if (value != -1) { - frame.Y = child.Bottom + rowSpace; + frame.Y = value + rowSpace; } this.m_frameTable.AddChidren(frame); //璋冩暣妗屽竷楂樺害 @@ -102,10 +107,11 @@ //鍒濆鍖栨甯冩帶浠� this.InitFrameTable(); - var child = this.m_frameTable.GetChildren(this.m_frameTable.ChildrenCount - 1); - if (child != null) + //鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣 + int value = this.GetLocationMostLastViewBottom(this.m_frameTable); + if (value != -1) { - frame.Y = child.Bottom; + frame.Y = value; } this.m_frameTable.AddChidren(frame); if (rowSpace > 0) @@ -128,10 +134,11 @@ //鍒濆鍖栨甯冩帶浠� this.InitFrameTable(); - var child = this.m_frameTable.GetChildren(this.m_frameTable.ChildrenCount - 1); - if (child != null) + //鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣 + int value = this.GetLocationMostLastViewBottom(this.m_frameTable); + if (value != -1) { - row.Y = child.Bottom; + row.Y = value; } this.m_frameTable.AddChidren(row); if (rowSpace > 0) @@ -156,14 +163,12 @@ /// <param name="buttomSpace">搴曢儴绌虹櫧闂磋窛(鐪熷疄鍊�)</param> public void AdjustChidrenFrameHeight(FrameLayout frame, int buttomSpace) { - var child = frame.GetChildren(frame.ChildrenCount - 1); - if (child != null) + //鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣 + int value = this.GetLocationMostLastViewBottom(frame); + if (value != -1) { //璋冩暣妗屽竷楂樺害 - if (frame.Height < child.Bottom + buttomSpace) - { - frame.Height = child.Bottom + buttomSpace; - } + frame.Height = value + buttomSpace; } } @@ -173,15 +178,23 @@ /// <param name="buttomSpace">搴曢儴绌虹櫧闂磋窛(鐪熷疄鍊�)</param> public void AdjustTableHeight(int buttomSpace = 0) { - var child = this.m_frameTable?.GetChildren(this.m_frameTable.ChildrenCount - 1); - if (child != null) + //2020.05.25杩藉姞 + if (this.frameBackTemp != null && this.frameBackTemp.Parent != null) + { + this.frameBackTemp.RemoveFromParent(); + } + + //鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣 + int value = this.GetLocationMostLastViewBottom(this.m_frameTable); + if (value != -1) { //璋冩暣妗屽竷楂樺害 - this.m_frameTable.Height = child.Bottom + buttomSpace; - //if (this.m_frameTable.Height < child.Bottom) - //{ - // this.m_frameTable.Height = child.Bottom; - //} + this.m_frameTable.Height = value + buttomSpace; + } + else + { + //杩樺師涓哄師鏉ョ殑楂樺害 + this.RecoverTableHeight(); } } @@ -191,6 +204,9 @@ /// <param name="correctionsValue">Y杞磋ˉ姝e��(鐪熷疄鍊�,鍒楄〃鎺т欢涓嶅湪bodyFramelayout鐨勬椂鍊欎娇鐢�)</param> public void AdjustRealHeightByBottomButton(int correctionsValue = 0) { + //璋冩暣妗屽竷楂樺害 2020.05.25杩藉姞 + this.AdjustTableHeight(); + var btnTemp = new BottomClickButton(); if (btnTemp.Yaxis >= this.m_frameTable.Height + correctionsValue) { @@ -198,9 +214,46 @@ return; } //娣诲姞涓存椂鎺т欢,鐩磋嚦鍙互婊戝姩瓒呰繃搴曢儴鎸夐挳 - var frameBackTemp = new FrameLayout(); + int oldRowSpace = this.rowSpace; + this.rowSpace = 0; + + this.frameBackTemp = new FrameLayout(); frameBackTemp.Height = ControlCommonResourse.BodyFrameHeight - btnTemp.Yaxis + Application.GetRealHeight(23); this.AddChidrenFrame(frameBackTemp); + + this.rowSpace = oldRowSpace; + } + + /// <summary> + /// 杩樺師妗屽竷楂樺害 + /// </summary> + public void RecoverTableHeight() + { + if (this.m_frameTable != null) + { + m_frameTable.Height = this.Height; + } + } + + /// <summary> + /// 鑾峰彇鍧愭爣搴曢儴鏈�涓嬮潰鐨勯偅涓帶浠剁殑搴曢儴鍧愭爣 + /// </summary> + /// <returns></returns> + private int GetLocationMostLastViewBottom(FrameLayout frame) + { + int bottomHeight = -1; + + if (frame == null) { return bottomHeight; } + + for (int i = 0; i < frame.ChildrenCount; i++) + { + var child = frame.GetChildren(i); + if (child.Bottom > bottomHeight) + { + bottomHeight = child.Bottom; + } + } + return bottomHeight; } #endregion diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/TextInputControls/TextInputExControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/TextInputControls/TextInputExControl.cs deleted file mode 100755 index 23821be..0000000 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/TextInputControls/TextInputExControl.cs +++ /dev/null @@ -1,118 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Text; - -namespace Shared.Phone.UserCenter -{ - /// <summary> - /// 鐗规畩鐨勮緭鍏ユ,鍒濆鐘舵�佸拰杈撳叆瀹屾垚鍚�,瀛椾綋鍙樹负鐏拌壊,杈撳叆鏃朵负榛戣壊 - /// </summary> - public class TextInputExControl : TextInputBase - { - #region 鈻� 鍙橀噺澹版槑___________________________ - - /// <summary> - /// 杈撳叆缁撴潫鐨勪簨浠� - /// </summary> - public Action FinishInputEvent = null; - /// <summary> - /// 鏈�澶ц緭鍏ラ暱搴�(鐩墠鍙拡瀵规寜涓嬪洖杞﹂敭鏃惰繘琛屾娴�,瓒呰繃鏃�,涓嶄細璋冪敤FinishInputEvent) - /// </summary> - public int MaxByte = 0; - /// <summary> - /// 鏂囨湰鏄惁涓洪粦鑹插瓧浣� - /// </summary> - private bool IsTextBlack = false; - - #endregion - - #region 鈻� 鍒濆鍖朹____________________________ - - /// <summary> - /// 鐗规畩鐨勮緭鍏ユ,鍒濆鐘舵�佸拰杈撳叆瀹屾垚鍚�,瀛椾綋鍙樹负鐏拌壊,杈撳叆鏃朵负榛戣壊 - /// </summary> - /// <param name="i_Width">瀹藉害</param> - /// <param name="i_Height">楂樺害</param> - /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param> - public TextInputExControl(int i_Width, int i_Height, bool real = false) - { - this.InitSize(i_Width, i_Height, real); - this.TextColor = UserCenterColor.Current.TextGrayColor3; - - this.TextChangeEventHandler += this.TextChangeEvent; - this.EditorEnterAction += this.EditorEnterEvent; - } - - /// <summary> - /// 鐗规畩鐨勮緭鍏ユ,鍒濆鐘舵�佸拰杈撳叆瀹屾垚鍚�,瀛椾綋鍙樹负鐏拌壊,杈撳叆鏃朵负榛戣壊 - /// </summary> - /// <param name="i_Width">瀹藉害</param> - /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param> - public TextInputExControl(int i_Width, bool real = false) - { - this.InitSize(i_Width, real); - this.TextColor = UserCenterColor.Current.TextGrayColor3; - - this.TextChangeEventHandler += this.TextChangeEvent; - this.EditorEnterAction += this.EditorEnterEvent; - } - - #endregion - - #region 鈻� 杈撳叆浜嬩欢___________________________ - - /// <summary> - /// 杈撳叆瀹屾垚浜嬩欢 - /// </summary> - /// <param name="view"></param> - private void EditorEnterEvent(View view) - { - if (this.MaxByte != 0) - { - if (Encoding.UTF8.GetBytes(this.Text.Trim()).Length > this.MaxByte) - { - //杈撳叆鍐呭杩囬暱,鏈�澶0}瀛楄妭 - string msg = Language.StringByID(R.MyInternationalizationString.uInputContentIsOverLengthMsg); - msg.Replace("{0}", this.MaxByte.ToString()); - var contr = new ShowMsgControl(ShowMsgType.Error, msg); - contr.Show(); - return; - } - } - this.TextColor = UserCenterColor.Current.TextGrayColor3; - this.IsTextBlack = false; - this.FinishInputEvent?.Invoke(); - } - - /// <summary> - /// 鍊兼敼鍙樹簨浠� - /// </summary> - /// <param name="view"></param> - /// <param name="value"></param> - private void TextChangeEvent(View view, string value) - { - if (this.IsTextBlack == true || this.Foucs == false) - { - return; - } - this.IsTextBlack = true; - this.TextColor = UserCenterColor.Current.TextColor1; - } - - #endregion - - #region 鈻� 涓�鑸柟娉昣__________________________ - - /// <summary> - /// 鎺т欢閿�姣� - /// </summary> - public override void RemoveFromParent() - { - this.FinishInputEvent = null; - - base.RemoveFromParent(); - } - - #endregion - } -} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/BottomItemSelectForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/BottomItemSelectForm.cs index fbc6aeb..00c5eb4 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/BottomItemSelectForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/BottomItemSelectForm.cs @@ -20,7 +20,7 @@ /// </summary> private NormalSelectControl oldSelectContr = null; /// <summary> - /// 閫夋嫨鍙栨秷(涓嶆槸宸︿笂瑙�),骞朵笖鎸変笅纭畾閿椂,鏄惁璋冪敤鍥炶皟鍑芥暟(璋冪敤鏃朵紶閫掔殑鍙傛暟鏄� -1,榛樿涓嶅洖璋�) + /// 閫夋嫨鍙栨秷(涓嶆槸宸︿笅瑙�),骞朵笖鎸変笅纭畾閿椂,鏄惁璋冪敤鍥炶皟鍑芥暟(璋冪敤鏃朵紶閫掔殑鍙傛暟鏄� -1,榛樿涓嶅洖璋�) /// </summary> public bool CancelCallEvent = false; /// <summary> diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs index 482c652..c2a0213 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs @@ -135,7 +135,7 @@ { return Language.StringByID(R.MyInternationalizationString.uOffLine); } - if ((device as DimmableLight).OnOffStatus == 0 || (device as DimmableLight).Level == 0) + if ((device as DimmableLight).OnOffStatus == 0) { return Language.StringByID(R.MyInternationalizationString.Close); } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs index e662761..2c2beb5 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs @@ -618,7 +618,7 @@ var jObject = new JObject { { "DeviceAddr", device.DeviceAddr }, { "Epoint", 200 }, { "Cluster_ID", 64513 }, { "Command", 0 } }; var data = new JObject { { "PassData", passData } }; jObject.Add("Data", data); - var result = HdlDeviceCommonLogic.Current.SendJobjectDataToGateway2(device, jObject.ToString(), "0409", 18, 9); + var result = HdlDeviceCommonLogic.Current.SendJobjectDataToGateway2(device, jObject.ToString(), "0409", 16, 9); if (result.ErrorMsg != null) { this.ShowTipMsg(result.ErrorMsg); @@ -645,8 +645,8 @@ { energyInfo.enable = false; } - energyInfo.time = Convert.ToInt32(result.ReceiptData[14].ToString() + result.ReceiptData[15].ToString() + result.ReceiptData[12].ToString() + result.ReceiptData[13].ToString(), 16); - energyInfo.level = Convert.ToInt32(result.ReceiptData[16].ToString() + result.ReceiptData[17].ToString(), 16); + energyInfo.time = Convert.ToInt32(result.ReceiptData[12].ToString() + result.ReceiptData[13].ToString(), 16); + energyInfo.level = Convert.ToInt32(result.ReceiptData[14].ToString() + result.ReceiptData[15].ToString(), 16); return energyInfo; } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs index 50c8582..f02e380 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs @@ -716,8 +716,8 @@ this.SetBaseDataToDevice(device, 2300, 2300, "MPD0101-ZB.10", i_RoomId); } - //1涓户鐢靛櫒 - var device2 = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 8 }; + //1涓皟鍏夊櫒 + var device2 = new DimmableLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 8 }; device2.DfunctionType = DeviceFunctionType.A鐏厜; //璁剧疆璁惧鐨勫熀鏈俊鎭� this.SetBaseDataToDevice(device2, 2300, 2300, "MPD0101-ZB.10", i_RoomId); diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs index 672bc3f..c10dfa4 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs @@ -2216,7 +2216,7 @@ { int waitCount = 0; //濡傛灉浣忓畢ID鍙樻洿浜�,鍒欎笉鍐嶅鐞� - while (frameLayout.Parent != null) + while (frameLayout.Parent != null && Config.Instance.HomeId != string.Empty) { System.Threading.Thread.Sleep(1000); if (this.hadGatewayUpdate == true) @@ -2276,18 +2276,34 @@ //绛変釜2绉� System.Threading.Thread.Sleep(2000); + //2020.05.25杩藉姞:姝や綇瀹呮槸鍚︽嫢鏈夌綉鍏冲湪绾� + var hadGwOnline = false; + foreach (var way in list) + { + string gwId = this.GetGatewayId(way); + if (dicOldOnline.ContainsKey(gwId) == true) + { + if (way.GatewayOnlineFlage == true) + { + //鏈変竴涓綉鍏冲湪绾�,鍗冲湪绾� + hadGwOnline = true; + break; + } + } + } + foreach (var way in list) { string gwId = this.GetGatewayId(way); if (dicOldOnline.ContainsKey(gwId) == true) { //缃戝叧涔熶笉澶�,鐩存帴鎺ㄩ�佸惂 - this.PushGatewayOnlineStatuToForm(gwId, way.GatewayOnlineFlage); + this.PushGatewayOnlineStatuToForm(gwId, way.GatewayOnlineFlage, hadGwOnline); } else { //娌℃湁鍖呭惈,榛樿涓篺alse - this.PushGatewayOnlineStatuToForm(gwId, false); + this.PushGatewayOnlineStatuToForm(gwId, false, hadGwOnline); } } } @@ -2305,22 +2321,34 @@ dicDbGateway = new Dictionary<string, GatewayResult>(); } + //2020.05.25杩藉姞:姝や綇瀹呮槸鍚︽嫢鏈夌綉鍏冲湪绾� + var hadGwOnline = false; + foreach (var gwId in dicOldOnline.Keys) + { + //濡傛灉浜戠涓婇潰鏈夎繖涓綉鍏� + if (dicDbGateway.ContainsKey(gwId) == true + && dicDbGateway[gwId].MqttOnlineStatus == true) + { + //鏈変竴涓綉鍏冲湪绾�,鍗冲湪绾� + hadGwOnline = true; + break; + } + } + foreach (var gwId in dicOldOnline.Keys) { //濡傛灉浜戠涓婇潰鏈夎繖涓綉鍏� if (dicDbGateway.ContainsKey(gwId) == true) { //缃戝叧涔熶笉澶�,鐩存帴鎺ㄩ�� - this.PushGatewayOnlineStatuToForm(gwId, dicDbGateway[gwId].MqttOnlineStatus); + this.PushGatewayOnlineStatuToForm(gwId, dicDbGateway[gwId].MqttOnlineStatus, hadGwOnline); } else { //浜戠涓嶅寘鍚殑,褰撲笉鍦ㄧ嚎澶勭悊 - this.PushGatewayOnlineStatuToForm(gwId, false); + this.PushGatewayOnlineStatuToForm(gwId, false, hadGwOnline); } } - - } /// <summary> @@ -2355,7 +2383,8 @@ /// </summary> /// <param name="gwId"></param> /// <param name="online"></param> - private void PushGatewayOnlineStatuToForm(string gwId, bool online) + /// <param name="hadGwOnline">2020.05.25杩藉姞:姝や綇瀹呮槸鍚︽嫢鏈夌綉鍏冲湪绾�</param> + private void PushGatewayOnlineStatuToForm(string gwId, bool online, bool hadGwOnline) { try { @@ -2370,7 +2399,7 @@ var zbway = this.GetLocalGateway(gwId); zbway.GatewayOnlineFlage = online; - UserCenterResourse.DicActionForm[formId]?.GatewayOnlinePush(zbway, online); + UserCenterResourse.DicActionForm[formId]?.GatewayOnlinePush(zbway, online, hadGwOnline); } } catch { } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs index 2e8ec34..f7cd9b4 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs @@ -173,7 +173,7 @@ //璁惧鎺у埗鐘舵�佸弽棣� else if (reportTopic == "DeviceDefaultAck") { - this.DeviceControlResponePush(JObject.Parse(msgData)); + //this.DeviceControlResponePush(JObject.Parse(msgData)); } //鎾ら槻 else if (topic == gatewayId + "/Security/WithdrawMode_Respon") @@ -612,7 +612,7 @@ var info = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLockAlarmsResult>(receiveData["Data"].ToString()); if (info.Clusterid == 257) { - //216锛氶攣涓婅缃殑甯稿紑 + //216锛氶攣涓婅缃殑甯稿紑 if (info.AlarmCode == 216) { HdlThreadLogic.Current.RunMain(() => @@ -620,7 +620,7 @@ //鏇存柊闂ㄩ攣娑夊強鐨勫父寮�/甯稿叧鐨勭晫闈� if (UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction != null) { - UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction(device.DeviceAddr + device.DeviceEpoint, true); + UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction(device.DeviceAddr, true); } }); } @@ -840,12 +840,16 @@ HdlThreadLogic.Current.RunThread(async () => { - var result = await Shared.Phone.Device.Logic.SkipView.Exist(3, (ZigBee.Device.DoorLock)device[0]); HdlThreadLogic.Current.RunMain(() => { - //寮瑰嚭寰愭鐨勯偅涓獥鍙� - DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device[0], DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush, - result != 0 ? true : false, ControlCommonResourse.UpdateDoorLockStatusAction); + //鎻愮ず闂ㄩ攣宸茬粡澶辨晥 + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NormallyClosed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); + + //鏇存柊闂ㄩ攣娑夊強鐨勫父寮�/甯稿叧鐨勭晫闈� + if (UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction != null) + { + UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction(deviceAddr, false); + } }); }); } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs index 04158ce..042d257 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs @@ -922,7 +922,7 @@ #region 鈻� 妤煎眰鍜屾埧闂撮『搴忕浉鍏砡________________ /// <summary> - /// 鏍规嵁妤煎眰鐨勪富閿幏鍙栨帓搴忓悗鐨勬埧闂村垪琛�(鏀寔鏃犳ゼ灞傛ā寮�) + /// 鏍规嵁妤煎眰鐨勪富閿幏鍙栨帓搴忓悗鐨勬埧闂村垪琛�(鏀寔鏃犳ゼ灞傛ā寮�,涓嶈幏鍙栨敹钘忔埧闂�) /// </summary> /// <param name="i_floorKeys">妤煎眰鐨勪富閿�</param> /// <param name="getShard">鍒嗕韩鐨勬埧闂存槸鍚︿篃鑾峰彇</param> diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs index cab34c9..fca010c 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs @@ -730,11 +730,6 @@ sceneUIs.Add(myScene); } } - - if (sceneUIs.Count == 0) - { - return null; - } return sceneUIs; } @@ -748,6 +743,11 @@ var listAllRoom = HdlRoomLogic.Current.GetAllListRooms(); foreach (var room in listAllRoom) { + if (room.IsLove == true) + { + //涓嶅寘鍚敹钘忔埧闂� + continue; + } foreach (int sceneId in room.ListSceneId) { if (this.dicScenes.ContainsKey(sceneId) == true) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs index 1052a4c..8c68ded 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs @@ -40,7 +40,24 @@ { string myId = this.SSID; - if (myId.StartsWith("hdlZigbeeGW") == true) + if (myId != null && myId.StartsWith("hdlZigbeeGW") == true) + { + return true; + } + return false; + } + } + + /// <summary> + /// 褰撳墠鏄惁鏄疢ini缃戝叧鐑偣 + /// </summary> + public bool IsMiniGatewayHotspot + { + get + { + string myId = this.SSID; + + if (myId != null && myId.StartsWith("Widora-") == true) { return true; } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs index 2f3c31e..3d10478 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs @@ -33,7 +33,7 @@ if (UserCenterResourse.UserInfo.InitUserInfoSuccess == false) { //涓嶇缁撴灉鎬庝箞鏍�,濡傛灉璋冪敤浜嗚繖涓嚱鏁�,闇�瑕侀噸澶磋幏鍙朤oken,鎵�浠ュ繀椤昏繑鍥炲け璐� - await ReInitUserAccoutInfo(); + await ReInitUserAccoutInfo(listNotShowError); return false; } //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮� @@ -74,7 +74,7 @@ if (UserCenterResourse.UserInfo.InitUserInfoSuccess == false) { //涓嶇缁撴灉鎬庝箞鏍�,濡傛灉璋冪敤浜嗚繖涓嚱鏁�,闇�瑕侀噸澶磋幏鍙朤oken,鎵�浠ュ繀椤昏繑鍥炲け璐� - await ReInitUserAccoutInfo(); + await ReInitUserAccoutInfo(listNotShowError); return "Error"; } @@ -115,7 +115,7 @@ if (UserCenterResourse.UserInfo.InitUserInfoSuccess == false) { //涓嶇缁撴灉鎬庝箞鏍�,濡傛灉璋冪敤浜嗚繖涓嚱鏁�,闇�瑕侀噸澶磋幏鍙朤oken,鎵�浠ュ繀椤昏繑鍥炲け璐� - await ReInitUserAccoutInfo(); + await ReInitUserAccoutInfo(listNotShowError); return null; } //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮� @@ -165,7 +165,7 @@ if (UserCenterResourse.UserInfo.InitUserInfoSuccess == false) { //涓嶇缁撴灉鎬庝箞鏍�,濡傛灉璋冪敤浜嗚繖涓嚱鏁�,闇�瑕侀噸澶磋幏鍙朤oken,鎵�浠ュ繀椤昏繑鍥炲け璐� - await ReInitUserAccoutInfo(); + await ReInitUserAccoutInfo(listNotShowError); return null; } //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮� @@ -642,6 +642,8 @@ { //璁惧畾涓�涓椂闂� Config.Instance.LoginDateTime = new DateTime(1970, 1, 1); + //娓呯┖褰撳墠浣忓畢id + Config.Instance.HomeId = string.Empty; Config.Instance.Save(); //鏀惰捣宸﹁彍鍗� CommonPage.Instance.CloseLeftMenu(); @@ -673,7 +675,7 @@ Config.Instance.Save(); //娓呯┖褰撳墠浣忓畢id - Shared.Common.Config.Instance.HomeId = string.Empty; + Config.Instance.HomeId = string.Empty; HdlGatewayLogic.Current.ClearAllRealGateway(); try { @@ -801,13 +803,24 @@ string errorMsgBase = strResultData; if (errorMsgBase == null) { - Type myType = resultData.GetType(); - object errorObj = myType.InvokeMember("errorMessageBase", System.Reflection.BindingFlags.GetField, null, resultData, null); - if (errorObj == null) + if (resultData is ReceiptGatewayResult) { - return errorMsg; + errorMsgBase = string.Empty; + if (((ReceiptGatewayResult)resultData).ErrorMsgDiv == 0) + { + errorMsgBase = "鍥炲瓒呮椂"; + } } - errorMsgBase = errorObj.ToString(); + else + { + Type myType = resultData.GetType(); + object errorObj = myType.InvokeMember("errorMessageBase", System.Reflection.BindingFlags.GetField, null, resultData, null); + if (errorObj == null) + { + return errorMsg; + } + errorMsgBase = errorObj.ToString(); + } } if (errorMsgBase.Contains("鍥炲瓒呮椂") == false) @@ -881,7 +894,7 @@ //鍒濆鍖栫櫥闄嗚处鍙风殑淇℃伅 var hadNet = await InitUserAccoutInfo(true); //濡傛灉鏈夌綉缁滅殑璇� - if (hadNet == true) + if (hadNet == 1) { //閲嶆柊鍙戦�佸懡浠ゅ幓缁戝畾鏂綉鎯呭喌涓嬪浠界殑缃戝叧 HdlGatewayLogic.Current.ResetComandToBindBackupGateway(); @@ -908,7 +921,7 @@ //鍚屾鏁版嵁(浜屾璋冪敤娌″叧绯�) int result = -1; - if (hadNet == true) + if (hadNet == 1) { result = await HdlAutoBackupLogic.SynchronizeDbAutoBackupData(); } @@ -921,7 +934,7 @@ //鍒濆鍖栨埧闂�(閮洩鍩庨偅杈逛笉鍋氬鐞�,闇�瑕佽繖閲岀壒娈婃墽琛屼竴姝�) HdlRoomLogic.Current.RefreshAllRoomByLocation(); - if (hadNet == true) + if (hadNet == 1) { //鍚屾浜戠鐨勭綉鍏砳d锛屽鏋滄湰鍦版嫢鏈変簯绔笉瀛樺湪鐨刬d锛屽垯琛ㄧず搴旇琚崲缁戜簡锛岀洿鎺ュ垹闄� HdlGatewayLogic.Current.SynchronizeDbGateway(); @@ -984,11 +997,6 @@ } }); - //褰撳墠涓婚〉,鍦烘櫙鍜屽姛鑳芥墍閫夋嫨鐨勫垎鏀� 1:鍦烘櫙 2:鍔熻兘 - UserCenterResourse.ResidenceOption.HomeMainPageSwitchIndex = 1; - //褰撳墠鍒嗙被,鍦烘櫙鍜屽姛鑳芥墍閫夋嫨鐨勫垎鏀� 0:鍦烘櫙 1:鍔熻兘 2:鑷姩鍖� - UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex = 0; - //鍒囨崲浣忓畢娓呴櫎涔嬪墠閫昏緫缂撳瓨鏁版嵁; Common.Logic.LogicList.Clear(); Common.Logic.LockLogicList.Clear(); @@ -1000,11 +1008,11 @@ #region 鈻� 鍒濆鍖栫櫥闄嗚处鍙风殑淇℃伅_______________ /// <summary> - /// 鍒濆鍖栫櫥闄嗚处鍙风殑淇℃伅 + /// 鍒濆鍖栫櫥闄嗚处鍙风殑淇℃伅 -1:鏃犵綉 1:姝e父 2:鍏朵粬閿欒 /// </summary> /// <param name="reLoad">鏄惁浠庢柊浠庢湰鍦板姞杞�(閲嶆柊鍒濆鍖栫櫥闄嗚处鍙风殑淇℃伅,涓嶉渶瑕侀噸鏂板姞杞�)</param> /// <returns></returns> - private async static Task<bool> InitUserAccoutInfo(bool reLoad) + private async static Task<int> InitUserAccoutInfo(bool reLoad) { //鍒濆鍖栦釜浜轰俊鎭殑鏍囪瘑 UserCenterResourse.UserInfo.InitUserInfoSuccess = false; @@ -1023,13 +1031,13 @@ byte[] byteData = await CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync("ZigbeeUsers/GetAccountInfo", Encoding.UTF8.GetBytes(requestJson)); if (byteData == null) { - return false; + return -1; } //妫�娴嬮敊璇� var revertObj = JsonConvert.DeserializeObject<ResponsePack>(Encoding.UTF8.GetString(byteData)); if (revertObj.StateCode.ToUpper() != "SUCCESS") { - return false; + return 2; } var userInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<UserInformation>(revertObj.ResponseData.ToString()); @@ -1106,9 +1114,9 @@ UserCenterResourse.UserInfo.StringPwd = null; //鍒濆鍖栫鐞嗗憳鎺у埗涓讳汉鐨勮繛鎺ュ湴鍧�(鍥犱负杩欎釜杩炴帴Token鏄笉浼氭敼鍙樼殑,鎵�浠ュ彧闇�瑕佸垵濮嬪寲涓�娆�) - bool flage = await InitAdminConnectMainInfo(); + var flage = await InitAdminConnectMainInfo(); //鍒濆鍖栦釜浜轰俊鎭殑鏍囪瘑 - UserCenterResourse.UserInfo.InitUserInfoSuccess = flage; + UserCenterResourse.UserInfo.InitUserInfoSuccess = flage == 1; return flage; } @@ -1133,20 +1141,36 @@ /// 閲嶆柊鍒濆鍖栫櫥闄嗚处鍙风殑淇℃伅(鏃ㄥ湪瀵瑰簲閭d竴鐬棿,缃戠粶涓嶅ソ,瀵艰嚧璇垽鐨勬儏鍐�) /// </summary> /// <returns></returns> - private async static Task<bool> ReInitUserAccoutInfo() + private async static Task<bool> ReInitUserAccoutInfo(List<string> listNotShowError) { //閲嶆柊鍒濆鍖栬处鍙蜂俊鎭� var result = await InitUserAccoutInfo(false); - if (result == false) + //杩炴帴涓嶄簡澶栫綉鐨勬椂鍊� + if (result == -1) { - return result; + if (listNotShowError != null && + (listNotShowError.Contains("NotSetAgain") == true || listNotShowError.Contains("NotCheck") == true)) + { + //鏈夎繖涓や釜鏍囪瘑鏃�,涓嶆彁绀洪敊璇� + return false; + } + Application.RunOnMainThread(() => + { + //褰撳墠鏃犵綉缁滆繛鎺�,璇风‘璁ょ綉缁� + var alert = new ShowMsgControl(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uNowIsDonotNetworkAndCheckNetwork)); + alert.Show(); + }); } - //鍚屾浜戠鐨勭綉鍏砳d锛屽鏋滄湰鍦版嫢鏈変簯绔笉瀛樺湪鐨刬d锛屽垯琛ㄧず搴旇琚崲缁戜簡锛岀洿鎺ュ垹闄� - HdlGatewayLogic.Current.SynchronizeDbGateway(); - //鍒濆鍖栦釜浜轰俊鎭殑鏍囪瘑 - UserCenterResourse.UserInfo.InitUserInfoSuccess = true; + if (result == 1) + { + //鍚屾浜戠鐨勭綉鍏砳d锛屽鏋滄湰鍦版嫢鏈変簯绔笉瀛樺湪鐨刬d锛屽垯琛ㄧず搴旇琚崲缁戜簡锛岀洿鎺ュ垹闄� + HdlGatewayLogic.Current.SynchronizeDbGateway(); + //鍒濆鍖栦釜浜轰俊鎭殑鏍囪瘑 + UserCenterResourse.UserInfo.InitUserInfoSuccess = true; - return true; + return true; + } + return false; } /// <summary> @@ -1177,15 +1201,15 @@ #region 鈻� 鍒濆鍖栫鐞嗗憳鏉冮檺杩滅▼杩炴帴___________ /// <summary> - /// 鍒濆鍖栫鐞嗗憳鏉冮檺杩滅▼杩炴帴涓讳汉鐨勪俊鎭� + /// 鍒濆鍖栫鐞嗗憳鏉冮檺杩滅▼杩炴帴涓讳汉鐨勪俊鎭� -1:鏃犵綉 1:姝e父 2:鍏朵粬閿欒 /// </summary> /// <returns></returns> - private static async Task<bool> InitAdminConnectMainInfo() + private static async Task<int> InitAdminConnectMainInfo() { if (UserCenterResourse.UserInfo.AuthorityNo != 2 && UserCenterResourse.UserInfo.AuthorityNo != 3) { //鏃朵唬鍙樹簡,杩欓噷绠$悊鍛樺拰鎴愬憳閮借兘璋冪敤 - return true; + return 1; } var pra = new { @@ -1201,13 +1225,13 @@ byte[] byteData = await CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync("App/GetSharedHomeApiControl", Encoding.UTF8.GetBytes(requestJson)); if (byteData == null) { - return false; + return -1; } //妫�娴嬮敊璇� var revertObj = JsonConvert.DeserializeObject<ResponsePack>(Encoding.UTF8.GetString(byteData)); if (revertObj.StateCode.ToUpper() != "SUCCESS") { - return false; + return 2; } //鍒嗕韩閾炬帴 @@ -1215,7 +1239,7 @@ Config.Instance.AdminRequestBaseUrl = info.RequestBaseUrl; Config.Instance.AdminRequestToken = info.RequestToken; - return true; + return 1; } #endregion diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs index 7edae6d..ec57ceb 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs @@ -355,7 +355,7 @@ //璁$畻鐪熷疄楂樺害 int realHeight = this.GetPictrueRealSize(58 + 58);//涓婁笅闂磋窛 realHeight += frameBack.ChildrenCount * this.GetPictrueRealSize(124);//鍦嗗湀楂樺害 - realHeight += (frameBack.ChildrenCount-1) * this.GetPictrueRealSize(60);//鍦嗗湀闂磋窛 + realHeight += (frameBack.ChildrenCount - 1) * this.GetPictrueRealSize(60);//鍦嗗湀闂磋窛 if (realHeight > frameBack.Height) { //鍙樻洿楂樺害 @@ -427,6 +427,18 @@ //鍙鍚屼竴绉嶇被鍨嬬殑 continue; } + + //鑾峰彇璁惧灞炰簬銆愮畝绾﹀鍔熻兘闈㈡澘銆� + var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice); + if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleMultifunction) + { + if (device.Type == DeviceType.TemperatureSensor && device.DeviceEpoint == 1) + { + //绠�绾﹀鍔熻兘闈㈡澘绗�1鍥炶矾鏄竴涓粦瀹氭俯婀垮害浼犳劅鍣ㄧ绫诲瀷锛屼笉鏄湡鐨勬俯婀垮害鐨勪紶鎰熷櫒锛岄渶瑕佸睆钄芥帀 + continue; + } + } + listRelay.Add(device); if (device.DeviceEpoint == deviceObj.DeviceEpoint) { @@ -467,7 +479,6 @@ } return listIcon; } - #endregion #region 鈻� 鍥炶矾閫夋嫨___________________________ diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs index fefadb2..187bdb5 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs @@ -317,17 +317,35 @@ var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceMac); if (isShow == true) { - //灞曞紑妯″紡鏃讹紝鎵╁ぇ渚濇嵁涓�:瀹冩湁鍑犱釜瀛愭帶浠� - heightValue = (listDevice.Count + 1) * (ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace); - //鏍囬鑷繁灏辨槸涓�涓瓙鎺т欢 - if (rowInfo.frameTable.ChildrenCount == 1) + //鑾峰彇杩欎竴鍫嗚澶囨椂灞炰簬浠�涔堢被鍨嬬殑 + var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice); + if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction) { - //鑾峰彇杩欎竴鍫嗚澶囨椂灞炰簬浠�涔堢被鍨嬬殑 - var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice); - foreach (CommonDevice info in listDevice) + var listTemp = Common.LocalDevice.Current.GetMutilfunctionPanelByMac(listDevice); + //灞曞紑妯″紡鏃讹紝鎵╁ぇ渚濇嵁涓�:瀹冩湁鍑犱釜瀛愭帶浠� + heightValue = (listTemp.Count + 1) * (ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace); + //鏍囬鑷繁灏辨槸涓�涓瓙鎺т欢 + if (rowInfo.frameTable.ChildrenCount == 1) { - //鍔犺浇瀹冪殑鍒楄〃 - this.AddDeviceDetailRow(rowInfo.frameTable, info, deviceEnumInfo); + foreach (CommonDevice info in listTemp) + { + //鍔犺浇瀹冪殑鍒楄〃 + this.AddDeviceDetailRow(rowInfo.frameTable, info, deviceEnumInfo); + } + } + } + else + { + //灞曞紑妯″紡鏃讹紝鎵╁ぇ渚濇嵁涓�:瀹冩湁鍑犱釜瀛愭帶浠� + heightValue = (listDevice.Count + 1) * (ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace); + //鏍囬鑷繁灏辨槸涓�涓瓙鎺т欢 + if (rowInfo.frameTable.ChildrenCount == 1) + { + foreach (CommonDevice info in listDevice) + { + //鍔犺浇瀹冪殑鍒楄〃 + this.AddDeviceDetailRow(rowInfo.frameTable, info, deviceEnumInfo); + } } } } @@ -701,7 +719,8 @@ /// </summary> /// <param name="gateWay">缃戝叧瀵硅薄</param> /// <param name="online">鍦ㄧ嚎鐘舵�佸彉鏇村悗鐨勭姸鎬�</param> - public override void GatewayOnlinePush(ZbGateway gateWay, bool online) + /// <param name="hadGwOnline">2020.05.25杩藉姞:姝や綇瀹呮槸鍚︽嫢鏈夌綉鍏冲湪绾�</param> + public override void GatewayOnlinePush(ZbGateway gateWay, bool online, bool hadGwOnline) { if (this.gatewayViewRow == null) { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs index 8082a1b..f16f099 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs @@ -248,6 +248,20 @@ //娣诲姞銆愬鍐呮満璁剧疆銆戣(绌鸿皟涓撶敤) this.AddIndoorUnitSettionRow(); } + else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction) + { + //绠�绾﹀鍔熻兘闈㈡澘 + this.AddIBindRow(); + this.AddFunctionSettionRow(); + this.AddHumiditySourceRow(); + this.AddTemperatureSensorRow(); + + } + else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment) + { + //娣诲姞銆愮粦瀹氱洰鏍囥�戣(绠�绾︾幆澧冮潰鏉跨敤) + this.AddSimplePanelSettionRow(); + } else { //娣诲姞銆愬伐浣滄ā寮忋�戣(pir浼犳劅鍣ㄤ笓鐢�) @@ -531,6 +545,31 @@ }; } + #region 鈻� 绠�绾︾幆澧�(闈㈡澘)_____________________ + + /// <summary> + /// 娣诲姞銆愭寜閿缃�戣绠�绾︾幆澧�(闈㈡澘) + /// </summary> + private void AddSimplePanelSettionRow() + { + //鎸夐敭璁剧疆 + string caption = Language.StringByID(R.MyInternationalizationString.uPanelSettion); + var btnFunction = new FrameRowControl(listview.rowSpace / 2); + listview.AddChidren(btnFunction); + btnFunction.AddLeftCaption(caption, 600); + //鍚戝彸鍥炬爣 + btnFunction.AddRightArrow(); + //搴曠嚎 + btnFunction.AddBottomLine(); + btnFunction.ButtonClickEvent += (sender, e) => + { + var form = new DeviceBind.PanelSimpleEnvironmentTargetsForm(); + + }; + } + + #endregion + #endregion #region 鈻� 鎸夐敭璁剧疆(鏂规偊)_____________________ @@ -922,7 +961,115 @@ form.AddForm(listNewDevice[0].DeviceAddr); }; } + #endregion + #region 鈻� 绠�绾﹀鍔熻兘闈㈡澘鐢╛__________________ + /// <summary> + /// 娣诲姞銆愮粦瀹氱洰鏍囥�戣 + /// </summary> + private void AddIBindRow() + { + string bindTargets = Language.StringByID(R.MyInternationalizationString.uBindTargets); + var btnBindTargets = new FrameRowControl(listview.rowSpace / 2); + listview.AddChidren(btnBindTargets); + btnBindTargets.AddLeftCaption(bindTargets, 600); + //鍚戝彸鍥炬爣 + btnBindTargets.AddRightArrow(); + //搴曠嚎 + btnBindTargets.AddBottomLine(); + btnBindTargets.ButtonClickEvent += (sender, e) => + { + var form = new DeviceBind.PanelSimpleMutilfunctionTargetsForm(); + }; + } + + /// <summary> + /// 婀垮害鏉ユ簮琛� + /// </summary> + private void AddHumiditySourceRow() + { + //婀垮害 + var rowHumidity = new FrameRowControl(listview.rowSpace / 2); + listview.AddChidren(rowHumidity); + rowHumidity.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.HumiditySource), 600); + //搴曠嚎 + rowHumidity.AddBottomLine(); + //鍙崇澶� + rowHumidity.AddRightArrow(); + var msg = Language.StringByID(R.MyInternationalizationString.nothing); + //if (!string.IsNullOrEmpty(bindHumidityName)) + //{ + // msg = bindHumidityName; + //} + var btnHumidityStatu = rowHumidity.AddMostRightView(msg, 700); + rowHumidity.ButtonClickEvent += (sender, e) => + { + //var key = new Panel(); + //var bindHumiditySensorPage = new Shared.Phone.UserCenter.DeviceBind.PanelSimpleMutilfunctionBindSensorForm(key, bindHumidityDev, 3); + //Shared.Phone.UserView.HomePage.Instance.AddChidren(bindHumiditySensorPage); + //Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; + //bindHumiditySensorPage.Show(); + + //bindHumiditySensorPage.actionHumidityTarget += (bindName) => + //{ + // Application.RunOnMainThread(() => + // { + // if (string.IsNullOrEmpty(bindName)) + // { + // btnHumidityStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing); + // } + // else + // { + // btnHumidityStatu.Text = bindName; + // } + // }); + //}; + }; + } + + /// <summary> + /// 娓╁害鏉ユ簮琛� + /// </summary> + private void AddTemperatureSensorRow() + { + //娓╁害鏉ユ簮 + var rowTemPerature = new FrameRowControl(listview.rowSpace / 2); + listview.AddChidren(rowTemPerature); + rowTemPerature.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.TemperatureSource), 600); + //搴曠嚎 + rowTemPerature.AddBottomLine(); + //鍙崇澶� + rowTemPerature.AddRightArrow(); + var msg = Language.StringByID(R.MyInternationalizationString.nothing); + //if (!string.IsNullOrEmpty(bindTemperatureName)) + //{ + // msg = bindTemperatureName; + //} + var btnTemperatureStatu = rowTemPerature.AddMostRightView(msg, 700); + rowTemPerature.ButtonClickEvent += (sender, e) => + { + //var key = new Panel(); + //var bindTemperatureSensorPage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(key, bindTemperatureDev, 2); + //Shared.Phone.UserView.HomePage.Instance.AddChidren(bindTemperatureSensorPage); + //Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; + //bindTemperatureSensorPage.Show(); + + //bindTemperatureSensorPage.actionTemperatureTarget += (bindName) => + //{ + // Application.RunOnMainThread(() => + // { + // if (string.IsNullOrEmpty(bindName)) + // { + // btnTemperatureStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing); + // } + // else + // { + // btnTemperatureStatu.Text = bindName; + // } + // }); + //}; + }; + } #endregion #region 鈻� 鍔熻兘绫诲瀷(绌烘皵寮�鍏充笓鐢�)_____________ diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs index c7a8778..c096739 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs @@ -96,7 +96,14 @@ objectText = Language.StringByID(R.MyInternationalizationString.uDeviceDirectionName8); unSelectPic = "Device/ButtonPanelFangyueFreshAir.png"; this.AddMenuRow(objectText, unSelectPic, "PanelFangyueFreshAirDirectionForm"); - + //绠�绾﹀鍔熻兘闈㈡澘 + objectText = Language.StringByID(R.MyInternationalizationString.uDeviceDirectionName28); + unSelectPic = "Device/ButtonPanelSimpleMultifunction.png"; + this.AddMenuRow(objectText, unSelectPic, "PanelSimpleMultifunctionDirectionForm"); + //绠�绾︾幆澧冮潰鏉� + objectText = Language.StringByID(R.MyInternationalizationString.uDeviceDirectionName29); + unSelectPic = "Device/ButtonPanelSimpleEnvironment.png"; + this.AddMenuRow(objectText, unSelectPic, "PanelSimpleEnvironmentDirectionForm"); //鏂规偊鐜闈㈡澘 objectText = Language.StringByID(R.MyInternationalizationString.uDeviceDirectionName9); unSelectPic = "Device/ButtonPanelFangyueEnvironment.png"; diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelSimpleEnvironmentDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelSimpleEnvironmentDirectionForm.cs new file mode 100755 index 0000000..650a248 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelSimpleEnvironmentDirectionForm.cs @@ -0,0 +1,74 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +namespace Shared.Phone.UserCenter.DeviceDirection +{ + /// <summary> + /// 绠�绾︾幆澧冮潰鏉跨殑娣诲姞姝ラ鐣岄潰 + /// </summary> + public class PanelSimpleEnvironmentDirectionForm : DirectionCommonForm + { + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //鍥剧墖 + var framePic = new FrameLayout(); + framePic.Width = this.GetPictrueRealSize(835); + framePic.Height = this.GetPictrueRealSize(708); + framePic.Gravity = Gravity.CenterHorizontal; + framePic.Y = Application.GetRealHeight(115); + bodyFrameLayout.AddChidren(framePic); + var btnPic = new PicViewControl(framePic.Width, framePic.Height, false); + btnPic.UnSelectedImagePath = "Instruct/ButtonPanelSimpleEnvironment.png"; + framePic.AddChidren(btnPic); + + //闀挎寜鈥滃紑鍏斥�濇寜閿�5绉� + var btnPress = new NormalViewControl(this.GetPictrueRealSize(300), this.GetPictrueRealSize(45), false); + btnPress.X = this.GetPictrueRealSize(473); + btnPress.Y = this.GetPictrueRealSize(311); + btnPress.TextColor = UserCenterColor.Current.TextGrayColor3; + btnPress.TextSize = 10; + btnPress.TextID = R.MyInternationalizationString.LongPressButtonSwitch; + btnPress.TextAlignment = TextAlignment.CenterLeft; + framePic.AddChidren(btnPress); + + //鎸変綇闈㈡澘鍔熻兘(function)鎸夐敭锛屾墍鏈夋寜閿� + //鎸囩ず鐏寒璧凤紝鍒欓厤缃戞垚鍔� + string[] msgArry = Language.StringByID(R.MyInternationalizationString.AddSimpleEnvironmentMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + + var msg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + msg1.Y = Application.GetRealHeight(1037); + msg1.Text = msgArry[0]; + msg1.TextColor = UserCenterColor.Current.TextGrayColor3; + msg1.TextAlignment = TextAlignment.Center; + bodyFrameLayout.AddChidren(msg1); + var msg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + msg2.Y = msg1.Bottom; + if (msgArry.Length > 1) + { + msg2.Text = msgArry[1]; + } + msg2.TextColor = UserCenterColor.Current.TextGrayColor3; + msg2.TextAlignment = TextAlignment.Center; + bodyFrameLayout.AddChidren(msg2); + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelSimpleMultifunctionDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelSimpleMultifunctionDirectionForm.cs new file mode 100755 index 0000000..5ee4019 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelSimpleMultifunctionDirectionForm.cs @@ -0,0 +1,83 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +namespace Shared.Phone.UserCenter.DeviceDirection +{ + /// <summary> + /// 绠�绾﹀鍔熻兘闈㈡澘鐨勬坊鍔犳楠ょ晫闈� + /// </summary> + public class PanelSimpleMultifunctionDirectionForm : DirectionCommonForm + { + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //鍥剧墖 + var framePic = new FrameLayout(); + framePic.Width = this.GetPictrueRealSize(835); + framePic.Height = this.GetPictrueRealSize(708); + framePic.Gravity = Gravity.CenterHorizontal; + framePic.Y = Application.GetRealHeight(115); + bodyFrameLayout.AddChidren(framePic); + var btnPic = new PicViewControl(framePic.Width, framePic.Height, false); + btnPic.UnSelectedImagePath = "Instruct/ButtonPanelSimpleMultifunction.png"; + framePic.AddChidren(btnPic); + + //璁剧疆 + var btnSet = new NormalViewControl(this.GetPictrueRealSize(243), this.GetPictrueRealSize(45), false); + btnSet.X = this.GetPictrueRealSize(58); + btnSet.Y = this.GetPictrueRealSize(360); + btnSet.TextAlignment = TextAlignment.Center; + btnSet.TextColor = UserCenterColor.Current.TextGrayColor3; + btnSet.TextSize = 10; + btnSet.TextID = R.MyInternationalizationString.Setting; + framePic.AddChidren(btnSet); + + //鍏ョ綉 + var btnConnect = new NormalViewControl(this.GetPictrueRealSize(250), this.GetPictrueRealSize(45), false); + btnConnect.X = this.GetPictrueRealSize(458); + btnConnect.Y = this.GetPictrueRealSize(205); + btnConnect.TextColor = UserCenterColor.Current.TextGrayColor3; + btnConnect.TextSize = 10; + btnConnect.TextID = R.MyInternationalizationString.Connection; + framePic.AddChidren(btnConnect); + + //鎸変綇闈㈡澘鍔熻兘(function)鎸夐敭锛屾墍鏈夋寜閿� + //鎸囩ず鐏寒璧凤紝鍒欓厤缃戞垚鍔� + string[] msgArry = Language.StringByID(R.MyInternationalizationString.AddSimpleMultifunctionMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + + var msg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + msg1.Y = Application.GetRealHeight(1037); + msg1.Text = msgArry[0]; + msg1.TextColor = UserCenterColor.Current.TextGrayColor3; + msg1.TextAlignment = TextAlignment.Center; + bodyFrameLayout.AddChidren(msg1); + var msg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + msg2.Y = msg1.Bottom; + if (msgArry.Length > 1) + { + msg2.Text = msgArry[1]; + } + msg2.TextColor = UserCenterColor.Current.TextGrayColor3; + msg2.TextAlignment = TextAlignment.Center; + bodyFrameLayout.AddChidren(msg2); + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Light/MiniNightLightFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Light/MiniNightLightFunctionSettionForm.cs new file mode 100755 index 0000000..9ad3a8f --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Light/MiniNightLightFunctionSettionForm.cs @@ -0,0 +1,139 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using ZigBee.Device; + +namespace Shared.Phone.UserCenter.DeviceLight +{ + /// <summary> + /// mini澶滅伅鐨勫姛鑳借缃晫闈� + /// </summary> + public class MiniNightLightFunctionSettionForm : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 璁惧鐨勬煇涓�鍥炶矾 + /// </summary> + private CommonDevice device = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_device">璁惧鐨勬煇涓�鍥炶矾</param> + public void ShowForm(CommonDevice i_device) + { + this.device = i_device; + + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uFunctionSettingUp)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鍥剧墖 + var btnPic = new PicViewControl(508, 204); + btnPic.Y = Application.GetRealHeight(179); + btnPic.Gravity = Gravity.CenterHorizontal; + btnPic.UnSelectedImagePath = "DeviceItem/MiniNightLightDevice.png"; + bodyFrameLayout.AddChidren(btnPic); + + var listBackControl = new VerticalFrameControl(); + listBackControl.Height = bodyFrameLayout.Height; + bodyFrameLayout.AddChidren(listBackControl); + + //鍒濆鍖栨甯� + var tableContr = new InformationEditorControl(); + var listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1166); + + //鍥炶矾澶囨敞 + string caption = Language.StringByID(R.MyInternationalizationString.uDeviceEpointNote); + string nameValue = Common.LocalDevice.Current.GetDeviceEpointName(this.device); + var btnDeviceName = new FrameCaptionInputControl(caption, nameValue, listview.rowSpace / 2); + listview.AddChidren(btnDeviceName); + btnDeviceName.InitControl(); + btnDeviceName.AddBottomLine(); + btnDeviceName.txtInput.FinishInputEvent += () => + { + string oldName = Common.LocalDevice.Current.GetDeviceEpointName(this.device); + if (btnDeviceName.Text.Trim() == string.Empty) + { + //灏嗗悕瀛楄繕鍘� + btnDeviceName.Text = oldName; + } + if (oldName != btnDeviceName.Text.Trim()) + { + //璁惧鍚嶇О淇敼 + var result = Common.LocalDevice.Current.ReName(this.device, btnDeviceName.Text.Trim()); + if (result == false) + { + return; + } + //鍥炶矾澶囨敞淇敼鎴愬姛! + string msg = Language.StringByID(R.MyInternationalizationString.uDeviceEpointReNoteSuccess); + this.ShowMassage(ShowMsgType.Tip, msg); + } + }; + + //鎵�灞炲尯鍩� + var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2); + listview.AddChidren(rowBeloneArea); + rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uBelongArea), this.device); + //搴曠嚎 + rowBeloneArea.AddBottomLine(); + rowBeloneArea.SelectRoomEvent += (roomKeys) => + { + //鍙樻洿鎴块棿 + HdlRoomLogic.Current.ChangedRoom(this.device, roomKeys); + }; + + //鑷畾涔夊姛鑳界被鍨嬫帶浠� + var rowFunction = new DeviceFunctionTypeRowControl(this.device, listview.rowSpace / 2); + if (rowFunction.CanShowRow == true) + { + listview.AddChidren(rowFunction); + rowFunction.InitControl(); + //搴曠嚎 + rowFunction.AddBottomLine(); + } + //鍒濆鍖栨甯冨畬鎴� + tableContr.FinishInitControl(); + + //淇濆瓨 + var btnFinish = new BottomClickButton(); + btnFinish.TextID = R.MyInternationalizationString.uSave; + bodyFrameLayout.AddChidren(btnFinish); + btnFinish.ButtonClickEvent += (sender, e) => + { + string newName = btnDeviceName.Text.Trim(); + string oldName = Common.LocalDevice.Current.GetDeviceEpointName(device); + if (oldName != newName) + { + //璁惧鍚嶇О淇敼 + var result = Common.LocalDevice.Current.ReName(device, newName); + if (result == false) + { + return; + } + } + //鍏抽棴鑷韩 + this.CloseForm(); + }; + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs index 2832b5d..346a4fe 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs @@ -261,7 +261,7 @@ } if (string.IsNullOrEmpty(bDev.ESName)) { - bindFreshAirName = device.DeviceEpointName; + bindFreshAirName = Common.LocalDevice.Current.GetDeviceEpointName(device); } else { @@ -277,7 +277,7 @@ { if (string.IsNullOrEmpty(bDev.ESName)) { - bindTemperatureName = device.DeviceEpointName; + bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device); } else { @@ -289,7 +289,7 @@ { if (string.IsNullOrEmpty(bDev.ESName)) { - bindHumidityName = device.DeviceEpointName; + bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device); } else { @@ -303,7 +303,7 @@ { if (string.IsNullOrEmpty(bDev.ESName)) { - bindHumidityName = device.DeviceEpointName; + bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device); } else { @@ -328,7 +328,7 @@ { if (string.IsNullOrEmpty(bDev.ESName)) { - bindPmName = device.DeviceEpointName; + bindPmName = Common.LocalDevice.Current.GetDeviceEpointName(device); } else { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs index f0a3123..b996092 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs @@ -38,7 +38,7 @@ /// <summary> /// 鏄剧ず琚粦瀹氳澶囨垨鍦烘櫙鐨剉iew /// </summary> - VerticalFrameRefreshControl midVerticalScrolViewLayout; + VerticalRefreshLayout midVerticalScrolViewLayout; /// <summary> /// 鏄剧ず鎴块棿鐨剉iew /// </summary> @@ -221,7 +221,7 @@ btnMidTopLayout.AddChidren(btnHorizontalScrolViewLayout); //璁惧鏍� - midVerticalScrolViewLayout = new VerticalFrameRefreshControl() + midVerticalScrolViewLayout = new VerticalRefreshLayout() { Y = btnMidTopLayout.Bottom, Height = Application.GetRealHeight(1145), @@ -954,68 +954,128 @@ var delResult = new DelDeviceBindResponseAllData(); delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice); - if (delResult != null && delResult.removeBindResultResponseData != null) - { - if (delResult.removeBindResultResponseData.Result == 0) - { - switch (curDeviceBindType) - { - case 1: - if (actionFreshAirTarget != null) - { - actionFreshAirTarget(""); - } - break; - case 2: - if (actionTemperatureTarget != null) - { - actionTemperatureTarget(""); - } - break; - case 3: - if (actionHumidityTarget != null) - { - actionHumidityTarget(""); - } - break; - case 4: - if (actionPMTarget != null) - { - actionPMTarget(""); - } - break; - } - Application.RunOnMainThread(() => - { - CommonPage.Loading.Hide(); - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; - this.RemoveFromParent(); - }); - - } - else - { - Application.RunOnMainThread(() => - { - new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; - CommonPage.Loading.Hide(); - }); - return; - } - } - else + if (delResult == null) { Application.RunOnMainThread(() => { - new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.OperrateFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); btnFinifh.Enable = true; btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; CommonPage.Loading.Hide(); }); return; + } + else + { + if (delResult.removeBindResultResponseData == null) + { + if (delResult.delDeviceBindResponseData != null) + { + foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList) + { + if (d.Result == 1) + { + switch (curDeviceBindType) + { + case 1: + if (actionFreshAirTarget != null) + { + actionFreshAirTarget(""); + } + break; + case 2: + if (actionTemperatureTarget != null) + { + actionTemperatureTarget(""); + } + break; + case 3: + if (actionHumidityTarget != null) + { + actionHumidityTarget(""); + } + break; + case 4: + if (actionPMTarget != null) + { + actionPMTarget(""); + } + break; + } + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + this.RemoveFromParent(); + }); + } + else + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + } + } + } + else + { + if (delResult.removeBindResultResponseData.Result == 0) + { + switch (curDeviceBindType) + { + case 1: + if (actionFreshAirTarget != null) + { + actionFreshAirTarget(""); + } + break; + case 2: + if (actionTemperatureTarget != null) + { + actionTemperatureTarget(""); + } + break; + case 3: + if (actionHumidityTarget != null) + { + actionHumidityTarget(""); + } + break; + case 4: + if (actionPMTarget != null) + { + actionPMTarget(""); + } + break; + } + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + this.RemoveFromParent(); + }); + + } + else + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + } } } } @@ -1080,7 +1140,8 @@ var delDevice = DelBindDevice(bd); var delResult = new DelDeviceBindResponseAllData(); delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice); - if (delResult == null || delResult.removeBindResultResponseData == null) + + if (delResult == null) { Application.RunOnMainThread(() => { @@ -1090,6 +1151,29 @@ CommonPage.Loading.Hide(); }); return; + } + else + { + if (delResult.removeBindResultResponseData == null) + { + if (delResult.delDeviceBindResponseData != null) + { + foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList) + { + if (d.Result != 1) + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + } + } + } } if (delResult != null && delResult.removeBindResultResponseData != null) { @@ -1116,7 +1200,8 @@ var delDevice = DelBindDevice(curBindDevice); var delResult = new DelDeviceBindResponseAllData(); delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice); - if (delResult == null || delResult.removeBindResultResponseData == null) + + if (delResult == null) { Application.RunOnMainThread(() => { @@ -1126,6 +1211,29 @@ CommonPage.Loading.Hide(); }); return; + } + else + { + if (delResult.removeBindResultResponseData == null) + { + if (delResult.delDeviceBindResponseData != null) + { + foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList) + { + if (d.Result != 1) + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + } + } + } } if (delResult != null && delResult.removeBindResultResponseData != null) { @@ -1171,7 +1279,7 @@ addBindInfo.BindType = 0; addBindInfo.BindMacAddr = de.DeviceAddr; addBindInfo.BindEpoint = de.DeviceEpoint; - addBindeDev.BindName = de.DeviceEpointName; + addBindeDev.BindName = Common.LocalDevice.Current.GetDeviceEpointName(de); switch (curDeviceBindType) { case 2: diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentTargetsForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentTargetsForm.cs new file mode 100755 index 0000000..1bd7846 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentTargetsForm.cs @@ -0,0 +1,10 @@ +锘縰sing System; +namespace Shared.Phone.UserCenter.DeviceBind +{ + public class PanelSimpleEnvironmentTargetsForm + { + public PanelSimpleEnvironmentTargetsForm() + { + } + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionBindSensorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionBindSensorForm.cs new file mode 100755 index 0000000..c7c2992 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionBindSensorForm.cs @@ -0,0 +1,1890 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq.Expressions; +using Shared.Common; +using Shared.Phone.UserCenter.Safety; +using ZigBee.Device; +using static ZigBee.Device.BindObj; +using static ZigBee.Device.Panel; + +namespace Shared.Phone.UserCenter.DeviceBind +{ + public class PanelSimpleMutilfunctionBindSensorForm : BindCommonLayout + { + #region 鏋勯�犲嚱鏁� + /// <summary> + /// 鏋勯�犲嚱鏁� + /// </summary> + /// <param name="device"></param> + /// <param name="deviceBindType">1:娓╁害浼犳劅鍣�;2:婀垮害浼犳劅鍣� </param> + /// <param name="bindDev">缁戝畾鐩爣 </param> + public PanelSimpleMutilfunctionBindSensorForm(CommonDevice device, CommonDevice bindDev, int deviceBindType) + { + this.curControlDev = device as FreshAir; + this.curBindDevice = bindDev; + this.curDeviceBindType = deviceBindType; + } + #endregion + + #region 鍙橀噺鐢虫槑 + /// <summary> + /// 褰撳墠鏂伴闈㈡澘銆愭帶鍒惰澶囥�� + /// </summary> + FreshAir curControlDev; + /// <summary> + /// 褰撳墠琚粦璁惧 + /// </summary> + CommonDevice curBindDevice; + /// <summary> + /// 鏄剧ず琚粦瀹氳澶囨垨鍦烘櫙鐨剉iew + /// </summary> + VerticalFrameRefreshControl midVerticalScrolViewLayout; + /// <summary> + /// 鏄剧ず鎴块棿鐨剉iew + /// </summary> + HorizontalScrolViewLayout btnHorizontalScrolViewLayout; + /// <summary> + /// 鎸夐敭閰嶇疆鐨勭洰鏍囧垪琛� + /// </summary> + List<CommonDevice> targetList = new List<CommonDevice>(); + /// <summary> + /// 闈㈡澘涓凡缁忓瓨鍦ㄧ殑鐩爣鍒楄〃 + /// </summary> + List<CommonDevice> oldTargetList = new List<CommonDevice>(); + /// <summary> + /// 褰撳墠璁惧缁戝畾绫诲瀷 + /// 1:鏂伴 + /// 2:娓╁害浼犳劅鍣� + /// 3:婀垮害浼犳劅鍣� + /// 4:PM2.5浼犳劅鍣� + /// </summary> + int curDeviceBindType = 0; + /// <summary> + /// 鏈湴鎴块棿鍒楄〃 + /// </summary> + List<Room> supportRoomList = new List<Room>(); + /// <summary> + /// 淇濆瓨瀹屾垚鎸夐挳 + /// </summary> + Button btnFinifh; + /// <summary> + /// 妤煎眰鏂囨湰 + /// </summary> + Button btnFloorText; + /// <summary> + /// 妤煎眰鍒楄〃 + /// </summary> + Dictionary<string, string> dicFloorList; + /// <summary> + /// 鎵�鏈夋埧闂翠腑鏀寔琚粦瀹氱殑璁惧鍒楄〃 + /// </summary> + List<CommonDevice> currentPanelSupportBindDeviceList = new List<CommonDevice>(); + /// <summary> + /// 褰撳墠鎴块棿涓敮鎸佽缁戝畾鐨勮澶囧垪琛� + /// </summary> + List<CommonDevice> currentRoomSupportBindDeviceList = new List<CommonDevice>(); + /// <summary> + /// 闈㈡澘涓瓨鍦ㄧ殑閿�� + /// </summary> + List<String> panelBindListKey = null; + /// <summary> + /// 鏂伴缁戝畾鐩爣鍥炶皟 + /// </summary> + public Action<string> actionFreshAirTarget = null; + /// <summary> + /// 娓╁害缁戝畾鐩爣鍥炶皟 + /// </summary> + public Action<string> actionTemperatureTarget = null; + /// <summary> + /// 婀垮害缁戝畾鐩爣鍥炶皟 + /// </summary> + public Action<string> actionHumidityTarget = null; + /// <summary> + /// PM缁戝畾鐩爣鍥炶皟 + /// </summary> + public Action<string> actionPMTarget = null; + + #endregion + + #region UI璁捐 + /// <summary> + /// 鐩爣椤垫樉绀� + /// </summary> + public void Show() + { + #region 鏍囬鏍� + string titleText = ""; + switch (curDeviceBindType) + { + case 1: + titleText = Language.StringByID(R.MyInternationalizationString.BindFreshAirTarget); + break; + case 2: + titleText = Language.StringByID(R.MyInternationalizationString.TemperatureSource); + break; + case 3: + titleText = Language.StringByID(R.MyInternationalizationString.HumiditySource); + break; + case 4: + titleText = Language.StringByID(R.MyInternationalizationString.PM25Source); + break; + } + this.TopFrameLayout(this, titleText); + EventHandler<MouseEventArgs> eHandlerBack = (sender, e) => + { + RemoveFromParent(); + }; + this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 300); + this.btnBack.MouseUpEventHandler += eHandlerBack; + this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack; + this.MidFrameLayout(this); + #endregion + + //娣诲姞妤煎眰UI + BindDownFrameLayout(); + //鏍囬鏍忎笅鐨刄I + MidFrameLayoutContent(); + //鍒濆鍖栬澶囨暟鎹� + InitData(); + } + + /// <summary> + /// 娣诲姞妤煎眰UI + /// </summary> + void BindDownFrameLayout() + { + var btnAddFrameLayout = new FrameLayout + { + X = Application.GetRealWidth(619), + }; + this.titleFrameLayout.AddChidren(btnAddFrameLayout); + + btnFloorText = new Button + { + Width = Application.GetRealWidth(300 - 69 - 58), + Text = Language.StringByID(R.MyInternationalizationString.FirstFloor), + TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, + TextSize = 14, + IsBold = true, + TextAlignment = TextAlignment.CenterRight, + }; + btnAddFrameLayout.AddChidren(btnFloorText); + + var btnBindDownFrameLayout = new FrameLayout + { + Width = Application.GetMinReal(69 + 58), + X = Application.GetRealWidth(300 - 69 - 58), + }; + btnAddFrameLayout.AddChidren(btnBindDownFrameLayout); + + var btnBindDown = new Button + { + Height = Application.GetMinReal(69), + Width = Application.GetMinReal(69), + UnSelectedImagePath = "BindPic/BindDown.png", + Gravity = Gravity.CenterVertical, + }; + btnBindDownFrameLayout.AddChidren(btnBindDown); + + EventHandler<MouseEventArgs> eHandlerBindDown = (sender, e) => + { + SideslipFramelayout(); + }; + btnBindDown.MouseDownEventHandler += eHandlerBindDown; + btnBindDownFrameLayout.MouseDownEventHandler += eHandlerBindDown; + if (Common.Config.Instance.Home.FloorDics.Count == 0) + { + btnAddFrameLayout.Width = 0; + } + else + { + btnAddFrameLayout.Width = Application.GetRealWidth(300); + } + } + + /// <summary> + /// 涓儴UI銆愭爣棰樻爮涓嬬殑UI銆� + /// </summary> + async void MidFrameLayoutContent() + { + var btnMidTopLayout = new FrameLayout + { + Height = Application.GetRealHeight(389 - 184), + }; + this.midFrameLayout.AddChidren(btnMidTopLayout); + + //鎴块棿鏍� + btnHorizontalScrolViewLayout = new HorizontalScrolViewLayout + { + X = Application.GetRealWidth(58), + }; + btnMidTopLayout.AddChidren(btnHorizontalScrolViewLayout); + + //璁惧鏍� + midVerticalScrolViewLayout = new VerticalFrameRefreshControl() + { + Y = btnMidTopLayout.Bottom, + Height = Application.GetRealHeight(1145), + }; + this.midFrameLayout.AddChidren(midVerticalScrolViewLayout); + midVerticalScrolViewLayout.BeginHeaderRefreshingAction += () => + { + midVerticalScrolViewLayout.BeginHeaderRefreshing(); + InitData(); + }; + + //搴曢儴淇濆瓨鏍� + var bottomFrameLayout = new FrameLayout() + { + Width = LayoutParams.MatchParent, + Height = Application.GetRealHeight(127), + Y = Application.GetRealHeight(1472), + }; + this.midFrameLayout.AddChidren(bottomFrameLayout); + + btnFinifh = new Button() + { + Width = Application.GetRealWidth(907), + Gravity = Gravity.CenterHorizontal, + Radius = (uint)Application.GetRealHeight(127) / 2, + TextID = R.MyInternationalizationString.Save, + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, + TextColor = Shared.Common.ZigbeeColor.Current.XMWhite, + IsBold = true, + TextSize = 16, + }; + bottomFrameLayout.AddChidren(btnFinifh); + btnFinifh.MouseUpEventHandler += async (sender, e) => + { + SaveTarget(); + }; + } + + /// <summary> + /// 闈㈡澘缁戝畾鐩爣琛ㄦ樉绀� + /// </summary> + /// <param name="gateway">Gateway.</param> + /// <param name="key">Key.</param> + void RefreshRoomList() + { + Room curRoom = null; + if (supportRoomList.Count == 0) + { + return; + } + btnHorizontalScrolViewLayout.RemoveAll(); + Button curentOldRoom = null; + FrameLayout curentOldRoomFrameLayout = null; + int index = 0; + var roomTempList = GetSupportRoomList(); + Room slectedRoom = null; + + for (int i = 0; i < roomTempList.Count; i++) + { + var room = roomTempList[i]; + bool canSelect = false; + if (curControlDev.currentSelectRoomId == room.Id) + { + slectedRoom = room; + canSelect = true; + } + //鎴块棿 + var btnRoomFrameLayout = new FrameLayout + { + Height = Application.GetMinReal(159), + Width = Application.GetMinReal(255), + Y = Application.GetRealHeight(23), + X = Application.GetRealWidth(5), + BackgroundImagePath = "Item/RoomIconBackground.png", + BorderWidth = 1, + }; + btnHorizontalScrolViewLayout.AddChidren(btnRoomFrameLayout); + + var btnRoom = new Button + { + Height = Application.GetRealHeight(58), + Width = Application.GetRealWidth(127), + Y = Application.GetRealHeight(58), + X = Application.GetRealWidth(14), + Text = room.Name, + TextSize = 12, + TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, + Gravity = Gravity.Center, + }; + btnRoomFrameLayout.AddChidren(btnRoom); + + btnRoom.IsSelected = false; + if (canSelect) + { + btnRoomFrameLayout.BackgroundImagePath = "Item/RoomIconBackgroundSelected.png"; + btnRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMWhite; + curentOldRoom = btnRoom; + curentOldRoomFrameLayout = btnRoomFrameLayout; + } + + //琚粦瀹氱殑鐩爣杩樻湭鍒嗛厤鍖哄煙锛岄粯璁ゆ槸绗竴涓� + if (string.IsNullOrEmpty(curControlDev.currentSelectRoomId)) + { + if (index == 0) + { + btnRoomFrameLayout.BackgroundImagePath = "Item/RoomIconBackgroundSelected.png"; + btnRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMWhite; + curentOldRoom = btnRoom; + curentOldRoomFrameLayout = btnRoomFrameLayout; + } + } + + if (index == roomTempList.Count - 1 && index > 3) + { + var btnRoomFrameLayoutEmpty = new FrameLayout + { + Height = Application.GetMinReal(159), + Width = Application.GetMinReal(50), + Y = Application.GetRealHeight(23), + X = Application.GetRealWidth(5), + BorderWidth = 1, + }; + btnHorizontalScrolViewLayout.AddChidren(btnRoomFrameLayoutEmpty); + } + + EventHandler<MouseEventArgs> eHandlerRoom = (sender, e) => + { + if (!btnRoom.IsSelected) + { + if (curentOldRoom != null) + { + curentOldRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3; + } + curentOldRoom = btnRoom; + curentOldRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMWhite; + } + + if (btnRoomFrameLayout.BorderWidth == 1) + { + if (curentOldRoomFrameLayout != null) + { + curentOldRoomFrameLayout.BorderWidth = 1; + curentOldRoomFrameLayout.BorderColor = Shared.Common.ZigbeeColor.Current.XMOrange; + curentOldRoomFrameLayout.BackgroundImagePath = "Item/RoomIconBackground.png"; + } + curentOldRoomFrameLayout = btnRoomFrameLayout; + curentOldRoomFrameLayout.BorderWidth = 0; + curentOldRoomFrameLayout.BackgroundImagePath = "Item/RoomIconBackgroundSelected.png"; + } + curRoom = room; + + //鏂伴闈㈡澘淇濆瓨浣胯兘 + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + + RefreshDeviceList(curRoom); + }; + btnRoom.MouseUpEventHandler += eHandlerRoom; + btnRoomFrameLayout.MouseUpEventHandler += eHandlerRoom; + index++; + } + BindInfo.FinishDisplay(roomTempList, btnFinifh); + + if (roomTempList.Count == 0) + { + curRoom = new Shared.Common.Room(); + } + else + { + if (slectedRoom == null) + { + curRoom = roomTempList[0]; + } + else + { + curRoom = slectedRoom; + } + } + + RefreshDeviceList(curRoom); + } + + /// <summary> + /// 鎸夐敭缁戠洰鏍囪〃鏄剧ず + /// </summary> + /// <param name="curRoom"></param> + void RefreshDeviceList(Room curRoom) + { + midVerticalScrolViewLayout.RemoveAll(); + Button oldDevice = null; + int curIndex = 0; + + currentRoomSupportBindDeviceList = GetCurRoomSupportDeviceList(curRoom); + if (currentRoomSupportBindDeviceList.Count == 0) + { + btnFinifh.Enable = false; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; + return; + } + foreach (var device in currentRoomSupportBindDeviceList) + { + #region 缁戝畾琛║I鏄撅紙鏃犳暟鎹鐞嗭級 + var rowLayout = new FrameLayout() + { + Height = Application.GetRealHeight(23 + 127), + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite, + }; + midVerticalScrolViewLayout.AddChidren(rowLayout); + + var devicePic = new Button() + { + X = Application.GetMinRealAverage(58), + Y = Application.GetMinRealAverage(46), + Width = Application.GetMinRealAverage(81), + Height = Application.GetMinRealAverage(81), + UnSelectedImagePath = device.IconPath, + }; + rowLayout.AddChidren(devicePic); + + var btnBindName = new Button() + { + Width = Application.GetRealWidth(790), + X = devicePic.Right + Application.GetRealWidth(20), + TextColor = Shared.Common.ZigbeeColor.Current.TextBlack, + TextAlignment = TextAlignment.CenterLeft, + TextSize = 15, + Text = Common.LocalDevice.Current.GetDeviceEpointName(device), + }; + rowLayout.AddChidren(btnBindName); + + var btnChoose = new Button() + { + Width = Application.GetMinReal(60), + Height = Application.GetMinReal(60), + X = Application.GetRealWidth(861 + 81), + Y = Application.GetRealHeight(35), + SelectedImagePath = "DoorLock/SelectedIcon.png", + Visible = false, + }; + rowLayout.AddChidren(btnChoose); + + var line2 = new Button() + { + Y = rowLayout.Height - 1, + X = devicePic.Right + Application.GetRealWidth(20), + Width = Application.GetRealWidth(965 - 116), + Height = 1, + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine, + }; + rowLayout.AddChidren(line2); + + if (curIndex == currentRoomSupportBindDeviceList.Count - 1) + { + line2.Visible = false; + } + + switch (curDeviceBindType) + { + case 1: + devicePic.UnSelectedImagePath = "Device/FreshAirEpoint.png"; + break; + case 2: + devicePic.UnSelectedImagePath = "Device/SensorTemperature.png"; + if (device.Type == DeviceType.PMSensor) + { + btnBindName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor); + } + break; + case 3: + devicePic.UnSelectedImagePath = "Device/SensorHumidity.png"; + if (device.Type == DeviceType.PMSensor) + { + btnBindName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor); + } + break; + case 4: + devicePic.UnSelectedImagePath = "Device/AirQualitySensorEpoint.png"; + break; + } + #endregion + + string mianKey = device.DeviceAddr + device.DeviceEpoint; + if (targetList.Count != 0) + { + foreach (var bindedDev in targetList) + { + if (bindedDev.DeviceAddr + bindedDev.DeviceEpoint == mianKey) + { + btnChoose.IsSelected = true; + btnChoose.Visible = true; + oldDevice = btnChoose; + } + } + } + + EventHandler<MouseEventArgs> hander = (sender, e) => + { + btnChoose.IsSelected = !btnChoose.IsSelected; + if (!btnChoose.IsSelected) + { + if (oldDevice != null) + { + oldDevice.IsSelected = false; + oldDevice.Visible = false; + } + oldDevice = btnChoose; + oldDevice.IsSelected = false; + oldDevice.Visible = false; + targetList.Clear(); + } + else + { + if (oldDevice != null) + { + oldDevice.IsSelected = false; + oldDevice.Visible = false; + } + oldDevice = btnChoose; + oldDevice.IsSelected = true; + oldDevice.Visible = true; + targetList.Clear(); + targetList.Add(device); + } + + //鏂伴闈㈡澘锛氱敱浜庣洰鏍囨病鏈夋彁渚涘垹闄ゆ帴鍙o紝鎵�浠ュ彲浠ュ彇娑堥�変腑鑳戒繚瀛� + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + }; + rowLayout.MouseUpEventHandler += hander; + devicePic.MouseUpEventHandler += hander; + btnBindName.MouseUpEventHandler += hander; + btnChoose.MouseUpEventHandler += hander; + curIndex++; + } + } + + /// <summary> + /// 妤煎眰閫夋嫨鐨勪晶杈规爮 + /// </summary> + void SideslipFramelayout() + { + var dialog = new Dialog + { + }; + dialog.Show(); + + var flMain = new FrameLayout { BackgroundColor = 0x00000000 }; + dialog.AddChidren(flMain); + flMain.MouseUpEventHandler += (sender11, e11) => + { + dialog.Close(); + }; + + var sidelipFrameLayout = new FrameLayout() + { + Width = Application.GetMinReal(449), + Y = Application.GetRealHeight(161), + X = Application.GetRealWidth(596), + BackgroundImagePath = "DoorLock/SideslipPic.png", + }; + flMain.AddChidren(sidelipFrameLayout); + + var btnSelectFloor = new Button() + { + Width = Application.GetRealWidth(200), + Height = Application.GetRealHeight(58), + X = Application.GetRealWidth(81), + Y = Application.GetRealHeight(81), + TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, + TextSize = 14, + IsBold = true, + TextAlignment = TextAlignment.CenterLeft, + TextID = R.MyInternationalizationString.SelectFloor, + }; + sidelipFrameLayout.AddChidren(btnSelectFloor); + + var sidelipVerticalScrolViewLayout = new VerticalScrolViewLayout() + { + Y = btnSelectFloor.Bottom + Application.GetRealHeight(45), + Height = Application.GetRealHeight(600), + }; + sidelipFrameLayout.AddChidren(sidelipVerticalScrolViewLayout); + + Button oldbutton = null; + Button oldbuttonText = null; + int count = 0; + foreach (var floorId in dicFloorList.Keys) + { + var rowFrameLayout = new RowLayout() + { + Height = Application.GetRealHeight(152), + LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine, + X = Application.GetRealWidth(81), + }; + sidelipVerticalScrolViewLayout.AddChidren(rowFrameLayout); + + var btnAllMethod = new Button() + { + Width = Application.GetMinReal(81), + Height = Application.GetMinReal(81), + UnSelectedImagePath = "Floor/Floor.png", + SelectedImagePath = "Floor/FloorSelected.png", + Gravity = Gravity.CenterVertical, + }; + rowFrameLayout.AddChidren(btnAllMethod); + + var btnMethodText = new Button() + { + Width = Application.GetRealWidth(311), + Height = Application.GetRealHeight(58), + X = Application.GetRealWidth(92), + Gravity = Gravity.CenterVertical, + TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, + TextSize = 14, + TextAlignment = TextAlignment.CenterLeft, + Text = dicFloorList[floorId], + }; + rowFrameLayout.AddChidren(btnMethodText); + + if (curControlDev.currentSelectFloorId == floorId) + { + btnAllMethod.IsSelected = true; + btnAllMethod.IsBold = true; + btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; + } + + string curFloorId = floorId; + EventHandler<MouseEventArgs> hander = (sender, e) => + { + if (curControlDev.currentSelectFloorId == curFloorId) + { + return; + } + curControlDev.currentSelectFloorId = curFloorId; + btnFloorText.Text = dicFloorList[floorId]; + + //鑾峰彇妤煎眰涓埧闂村垪琛� + supportRoomList = GetFloorRoomList(); + if (!btnMethodText.IsSelected) + { + if (oldbutton != null) + { + oldbutton.IsSelected = false; + } + if (oldbuttonText != null) + { + oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3; + } + oldbutton = btnMethodText; + oldbuttonText = btnMethodText; + btnMethodText.IsSelected = true; + oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; + oldbuttonText.IsBold = true; + } + + int index = 0; + RefreshRoomList(); + dialog.Close(); + }; + btnAllMethod.MouseUpEventHandler += hander; + rowFrameLayout.MouseUpEventHandler += hander; + btnMethodText.MouseUpEventHandler += hander; + count++; + } + + if (count == 0) + { + sidelipFrameLayout.Height = 0; + } + else if (count <= 4 && count > 0) + { + sidelipFrameLayout.Height = Application.GetRealHeight(180) + count * Application.GetRealHeight(150); + } + else + { + sidelipFrameLayout.Height = Application.GetMinReal(780); + } + } + #endregion + + #region 鏁版嵁澶勭悊 + /// <summary> + /// 鍒濆鍖栬澶囨暟鎹� + /// </summary> + void InitData() + { + System.Threading.Tasks.Task.Run(async () => + { + try + { + Application.RunOnMainThread(() => + { + CommonPage.Loading.Start(""); + }); + //鑾峰彇琚粦鐩爣绛変俊鎭� + BindDevInfo(curBindDevice); + + //鑾峰彇妤煎眰 + dicFloorList = HdlRoomLogic.Current.GetFloorSortList(); + //鑾峰彇妤煎眰涓埧闂村垪琛� + supportRoomList = GetFloorRoomList(); + + //鑾峰彇鎵�鏈夋埧闂翠腑鍖归厤鐨勮兘缁戠殑鐩爣 + currentPanelSupportBindDeviceList = GetAllRoomSupportDeviceList(); + + //鑾峰彇闈㈡澘涓瓨鍦ㄧ殑缁戝畾鐩爣 + var panelBindListRes = HdlDeviceBindLogic.Current.GetDeviceBindAsync(curControlDev); + if (panelBindListRes != null && panelBindListRes.getAllBindResponseData != null) + { + curControlDev.bindList.Clear(); + foreach (var bDev in panelBindListRes.getAllBindResponseData.BindList) + { + curControlDev.bindList.Add(bDev); + } + } + else + { + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + midVerticalScrolViewLayout.EndHeaderRefreshing(); + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); + }); + } + + targetList.Clear(); + //閫変腑鐩爣鍒楄〃 targetList + if (currentPanelSupportBindDeviceList.Count != 0 && curControlDev.bindList.Count != 0) + { + foreach (var bindDev in curControlDev.bindList) + { + var mainKey = bindDev.BindMacAddr + bindDev.BindEpoint; + var dev = currentPanelSupportBindDeviceList.Find(obj => (obj != null) && (obj.DeviceAddr + obj.DeviceEpoint == mainKey)); + if (dev != null) + { + var device = LocalDevice.Current.GetDevice(dev.DeviceAddr, dev.DeviceEpoint); + if (device != null) + { + switch (curDeviceBindType) + { + case 1: + //鑾峰彇璁惧绫诲瀷鐨� + var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device }); + //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず + if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir) + { + continue; + } + if (device.Type == DeviceType.FreshAir) + { + targetList.Add(device); + oldTargetList.Add(device); + } + break; + case 2: + if (device.Type == DeviceType.TemperatureSensor) + { + var bDev = device as TemperatureSensor; + if (bDev.SensorDiv == 1) + { + targetList.Add(device); + oldTargetList.Add(device); + } + } + if (device.Type == DeviceType.PMSensor) + { + if (bindDev.BindCluster == 1026) + { + targetList.Add(device); + oldTargetList.Add(device); + } + } + break; + case 3: + if (device.Type == DeviceType.TemperatureSensor) + { + var bDev = device as TemperatureSensor; + if (bDev.SensorDiv == 2) + { + targetList.Add(device); + oldTargetList.Add(device); + } + } + if (device.Type == DeviceType.FreshAirHumiditySensor) + { + targetList.Add(device); + oldTargetList.Add(device); + } + if (device.Type == DeviceType.PMSensor) + { + if (bindDev.BindCluster == 1029) + { + targetList.Add(device); + oldTargetList.Add(device); + } + } + break; + case 4: + //PM2.5 + if (device.Type == DeviceType.PMSensor) + { + if (bindDev.BindCluster == 1066) + { + targetList.Add(device); + oldTargetList.Add(device); + } + } + break; + } + + } + } + } + } + } + catch (Exception ex) + { + var mess = ex.Message; + } + finally + { + Application.RunOnMainThread(() => + { + + //棣栨鏄惁鑳界偣鍑讳繚瀛� + if (targetList.Count == 0) + { + curControlDev.currentSelectFloorId = BindInfo.GetCurrentSelectFloorId(); + curControlDev.currentSelectRoomId = null; + if (BindInfo.GetCurrentSelectFloorIdName() != null) + { + Application.RunOnMainThread(() => + { + btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName(); + }); + } + btnFinifh.Enable = false; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; + } + else + { + foreach (var dev in targetList) + { + //鑾峰彇鏈湴璁惧鍒楄〃 + var localDeviceList = Shared.Common.LocalDevice.Current.listAllDevice; + var tempDev = localDeviceList.Find(obj => obj.DeviceAddr == dev.DeviceAddr && obj.DeviceEpoint == dev.DeviceEpoint); + if (tempDev != null) + { + //鑾峰彇璁惧鎵�灞炴埧闂� + var tempDevRoom = HdlRoomLogic.Current.GetRoomByDevice(tempDev); + if (tempDevRoom != null) + { + curControlDev.currentSelectRoomId = tempDevRoom.Id; + curControlDev.currentSelectFloorId = tempDevRoom.FloorId; + } + } + } + if (!string.IsNullOrEmpty(curControlDev.currentSelectFloorId)) + { + if (BindInfo.GetBindTargetsFloorIdName(curControlDev.currentSelectFloorId) != null) + { + btnFloorText.Text = BindInfo.GetBindTargetsFloorIdName(curControlDev.currentSelectFloorId); + } + } + + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + } + + + //鑾峰彇妤煎眰涓埧闂村垪琛� + if (supportRoomList.Count != 0) + { + RefreshRoomList(); + } + + CommonPage.Loading.Hide(); + midVerticalScrolViewLayout.EndHeaderRefreshing(); + }); + } + }); + } + + /// <summary> + /// 淇濆瓨鐩爣 + /// </summary> + /// <param name="curControlDev"></param> + void SaveTarget() + { + btnFinifh.Enable = false; + if (targetList.Count == 0) + { + //绌虹洰鏍� + System.Threading.Tasks.Task.Run(async () => + { + try + { + Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); }); + + if (oldTargetList.Count != 0) + { + //鍒犻櫎鍙栨秷鐨勭洰鏍� + foreach (var bd in oldTargetList) + { + var delDevice = new DelDeviceBindData(); + delDevice.DeviceAddr = curControlDev.DeviceAddr; + delDevice.Epoint = curControlDev.DeviceEpoint; + + var removeDevice = new RemoveBindListObj(); + removeDevice.BindType = 0; + switch (curDeviceBindType) + { + case 1: + removeDevice.BindCluster = 514; + break; + case 2: + removeDevice.BindCluster = 1026; + break; + case 3: + removeDevice.BindCluster = 1029; + break; + case 4: + //PM2.5 + removeDevice.BindCluster = 1066; + break; + } + removeDevice.BindMacAddr = bd.DeviceAddr; + removeDevice.BindEpoint = bd.DeviceEpoint; + delDevice.RemoveBindList.Add(removeDevice); + + var delResult = new DelDeviceBindResponseAllData(); + delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice); + if (delResult == null) + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + else + { + if (delResult.removeBindResultResponseData == null) + { + if (delResult.delDeviceBindResponseData != null) + { + foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList) + { + if (d.Result == 1) + { + switch (curDeviceBindType) + { + case 1: + if (actionFreshAirTarget != null) + { + actionFreshAirTarget(""); + } + break; + case 2: + if (actionTemperatureTarget != null) + { + actionTemperatureTarget(""); + } + break; + case 3: + if (actionHumidityTarget != null) + { + actionHumidityTarget(""); + } + break; + case 4: + if (actionPMTarget != null) + { + actionPMTarget(""); + } + break; + } + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + this.RemoveFromParent(); + }); + } + else + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + } + } + } + else + { + if (delResult.removeBindResultResponseData.Result == 0) + { + switch (curDeviceBindType) + { + case 1: + if (actionFreshAirTarget != null) + { + actionFreshAirTarget(""); + } + break; + case 2: + if (actionTemperatureTarget != null) + { + actionTemperatureTarget(""); + } + break; + case 3: + if (actionHumidityTarget != null) + { + actionHumidityTarget(""); + } + break; + case 4: + if (actionPMTarget != null) + { + actionPMTarget(""); + } + break; + } + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + this.RemoveFromParent(); + }); + + } + else + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + } + } + } + } + else + { + //娌℃湁鐩爣鎻愮ず + Application.RunOnMainThread(() => + { + var myTip = new Tip(); + myTip.Direction = AMPopTipDirection.None; + myTip.CloseTime = 2; + myTip.Text = Language.StringByID(R.MyInternationalizationString.BindDeviceTargetIsEmpty); + myTip.Show(Common.CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + } + catch (Exception ex) + { + var mess = ex.Message; + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + }); + btnFinifh.Enable = true; + } + }); + } + else + { + //閫変腑鐩爣 + //1銆佸凡缁忕粦瀹氳繃鐨勭洰鏍� + if (checkExistDevice()) + { + Application.RunOnMainThread(() => + { + var myTip = new Tip(); + myTip.Direction = AMPopTipDirection.None; + myTip.CloseTime = 2; + myTip.Text = Language.StringByID(R.MyInternationalizationString.BindExist); + myTip.Show(Common.CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + }); + return; + } + + System.Threading.Tasks.Task.Run(async () => + { + try + { + Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); }); + + //鍒犻櫎宸茬粡瀛樺湪鐨勭洰鏍� + if (oldTargetList.Count != 0) + { + foreach (var bd in oldTargetList) + { + var delDevice = DelBindDevice(bd); + var delResult = new DelDeviceBindResponseAllData(); + delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice); + + if (delResult == null) + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + else + { + if (delResult.removeBindResultResponseData == null) + { + if (delResult.delDeviceBindResponseData != null) + { + foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList) + { + if (d.Result != 1) + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + } + } + } + } + if (delResult != null && delResult.removeBindResultResponseData != null) + { + if (delResult.removeBindResultResponseData.Result != 0) + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + } + } + } + else + { + //妫�娴嬪凡缁忕粦瀹氱殑鐩爣鏄惁涓嶅湪鏈湴鎴栬�呮病鏈夊垎閰嶅埌浠讳綍鎴块棿涓� + //姝ゆ椂闇�瑕佸垹闄ゅ凡缁忚缁戝畾鍒扮洰鏍囷紝鎵嶈兘缁х画缁戝畾鏂扮洰鏍� + if (curBindDevice != null) + { + var delDevice = DelBindDevice(curBindDevice); + var delResult = new DelDeviceBindResponseAllData(); + delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice); + + if (delResult == null) + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + else + { + if (delResult.removeBindResultResponseData == null) + { + if (delResult.delDeviceBindResponseData != null) + { + foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList) + { + if (d.Result != 1) + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + } + } + } + } + if (delResult != null && delResult.removeBindResultResponseData != null) + { + if (delResult.removeBindResultResponseData.Result != 0) + { + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + CommonPage.Loading.Hide(); + }); + return; + } + } + } + } + + //2銆佹坊鍔犳柊鐨勭洰鏍� + string bindName = ""; + var addBindeDev = new AddBindData(); + addBindeDev.DeviceAddr = curControlDev.DeviceAddr; + addBindeDev.Epoint = curControlDev.DeviceEpoint; + foreach (var de in targetList) + { + var addBindInfo = new AddBindListObj(); + switch (curDeviceBindType) + { + case 1: + addBindInfo.BindCluster = 514; + break; + case 2: + addBindInfo.BindCluster = 1026; + break; + case 3: + addBindInfo.BindCluster = 1029; + break; + case 4: + //PM2.5 + addBindInfo.BindCluster = 1066; + break; + } + addBindInfo.BindType = 0; + addBindInfo.BindMacAddr = de.DeviceAddr; + addBindInfo.BindEpoint = de.DeviceEpoint; + addBindeDev.BindName = Common.LocalDevice.Current.GetDeviceEpointName(de); + switch (curDeviceBindType) + { + case 2: + if (de.Type == DeviceType.PMSensor) + { + addBindeDev.BindName = Common.LocalDevice.Current.GetDeviceEpointName(de) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor); + } + break; + case 3: + if (de.Type == DeviceType.PMSensor) + { + addBindeDev.BindName = Common.LocalDevice.Current.GetDeviceEpointName(de) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor); + } + break; + } + addBindeDev.BindList.Add(addBindInfo); + } + + var dev = new AddedDeviceBindResponseAllData(); + dev = HdlDeviceBindLogic.Current.AddDeviceBindAsync(addBindeDev); + if (dev == null || dev.addedDeviceBindResponseData == null) + { + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + return; + }); + } + else + { + if (dev.addedDeviceBindResponseData.Result == 0) + { + targetList.Clear(); + switch (curDeviceBindType) + { + case 1: + if (actionFreshAirTarget != null) + { + actionFreshAirTarget(addBindeDev.BindName); + } + break; + case 2: + if (actionTemperatureTarget != null) + { + actionTemperatureTarget(addBindeDev.BindName); + } + break; + case 3: + if (actionHumidityTarget != null) + { + actionHumidityTarget(addBindeDev.BindName); + } + break; + case 4: + if (actionPMTarget != null) + { + actionPMTarget(addBindeDev.BindName); + } + break; + } + + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + this.RemoveFromParent(); + }); + } + else if (dev.addedDeviceBindResponseData.Result == 1) + { + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + new Tip() + { + MaxWidth = 150, + Text = Language.StringByID(R.MyInternationalizationString.BindFailed), + Direction = AMPopTipDirection.None, + CloseTime = 1 + }.Show(CommonPage.Instance); + }); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + return; + } + else + { + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + new Tip() + { + MaxWidth = 150, + Text = Language.StringByID(R.MyInternationalizationString.BindUnknownError), + Direction = AMPopTipDirection.None, + CloseTime = 1 + }.Show(CommonPage.Instance); + }); + btnFinifh.Enable = true; + btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + return; + } + } + } + catch (Exception ex) + { + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + }); + btnFinifh.Enable = true; + var mess = ex.Message; + } + }); + } + } + + /// <summary> + /// 褰撳墠琚粦瀹氳澶囨墍灞炴ゼ灞傚拰鎴块棿 + /// </summary> + /// <param name="bindDev"></param> + void BindDevInfo(CommonDevice bindDev) + { + if (bindDev == null) + { + return; + } + //鑾峰彇鏈湴璁惧鍒楄〃 + var localDeviceList = Shared.Common.LocalDevice.Current.listAllDevice; + var tempDev = localDeviceList.Find(obj => obj.DeviceAddr == bindDev.DeviceAddr && obj.DeviceEpoint == bindDev.DeviceEpoint); + if (tempDev != null) + { + //鑾峰彇璁惧鎵�灞炴埧闂� + var tempDevRoom = HdlRoomLogic.Current.GetRoomByDevice(tempDev); + if (tempDevRoom != null) + { + curControlDev.currentSelectRoomId = tempDevRoom.Id; + curControlDev.currentSelectFloorId = tempDevRoom.FloorId; + } + } + } + + /// <summary> + /// 妫�娴嬬洰鏍囨槸鍚﹁缁戝畾杩� + /// </summary> + /// <returns></returns> + private bool checkExistDevice() + { + bool exist = false; + foreach (var oldDev in oldTargetList) + { + var key = oldDev.DeviceAddr + oldDev.DeviceEpoint; + var result = targetList.Find(obj => (obj != null) && (obj.DeviceAddr + obj.DeviceEpoint == key)); + if (result != null) + { + exist = true; + } + else + { + exist = false; + } + } + return exist; + } + + /// <summary> + /// 妫�娴嬪凡缁忕粦瀹氱殑鐩爣鏄惁涓嶅湪鏈湴鎴栬�呮病鏈夊垎閰嶅埌浠讳綍鎴块棿涓� + /// </summary> + /// <returns></returns> + private DelDeviceBindData DelBindDevice(CommonDevice bd) + { + var delDevice = new DelDeviceBindData(); + delDevice.DeviceAddr = curControlDev.DeviceAddr; + delDevice.Epoint = curControlDev.DeviceEpoint; + + var removeDevice = new RemoveBindListObj(); + removeDevice.BindType = 0; + switch (curDeviceBindType) + { + case 1: + removeDevice.BindCluster = 514; + break; + case 2: + removeDevice.BindCluster = 1026; + break; + case 3: + removeDevice.BindCluster = 1029; + break; + case 4: + //PM2.5 + removeDevice.BindCluster = 1066; + break; + } + removeDevice.BindMacAddr = bd.DeviceAddr; + removeDevice.BindEpoint = bd.DeviceEpoint; + delDevice.RemoveBindList.Add(removeDevice); + return delDevice; + } + + /// <summary> + /// 鑳芥樉绀虹殑鎴块棿鍒楄〃 + /// </summary> + private List<Room> GetSupportRoomList() + { + var roomTempList = new List<Room>(); + for (int i = 0; i < supportRoomList.Count; i++) + { + var room = supportRoomList[i]; + //濡傛灉鎴块棿涓哄枩鐖盵鍚庢潵鏀瑰悕涓哄父鐢ㄦ埧闂碷锛屽垯涓嶆樉绀� + if (room.IsLove == true) + { + continue; + } + + //濡傛灉鎴块棿涓病鏈夎澶囷紝鍒欎笉鏄剧ず + if (room.ListDevice.Count == 0) + { + continue; + } + else + { + List<CommonDevice> roomIncludeMatchDevice = new List<CommonDevice>(); + + //鎴块棿涓病鏈夊搴旂殑鏀寔缁戝畾鐨勭洰鏍� + switch (curDeviceBindType) + { + case 1: + foreach (var de in room.ListDevice) + { + var device = LocalDevice.Current.GetDevice(de); + + if (device != null) + { + //鑾峰彇璁惧绫诲瀷鐨� + var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device }); + //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず + if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir) + { + continue; + } + if (device.Type == DeviceType.FreshAir) + { + roomIncludeMatchDevice.Add(device); + } + } + } + break; + case 2: + roomIncludeMatchDevice = GetMatchTemperatureSensorDevice(room); + break; + case 3: + roomIncludeMatchDevice = GetMatchHumiditySensorDevice(room); + foreach (var de in room.ListDevice) + { + var device = LocalDevice.Current.GetDevice(de); + if (device != null) + { + if (device.Type == DeviceType.FreshAirHumiditySensor) + { + roomIncludeMatchDevice.Add(device); + } + } + } + break; + case 4: + foreach (var de in room.ListDevice) + { + var device = LocalDevice.Current.GetDevice(de); + if (device != null) + { + if (device.Type == DeviceType.PMSensor) + { + roomIncludeMatchDevice.Add(device); + } + } + } + break; + } + + if (roomIncludeMatchDevice.Count == 0) + { + continue; + } + + if (!string.IsNullOrEmpty(room.FloorId)) + { + //鏈夋ゼ灞� + if (room.FloorId == curControlDev.currentSelectFloorId) + { + roomTempList.Add(room); + } + } + else + { + //娌℃湁妤煎眰 + roomTempList.Add(room); + } + } + } + return roomTempList; + } + + /// <summary> + /// 鍖归厤娓╁害浼犳劅鍣� + /// </summary> + /// <param name="room"></param> + List<CommonDevice> GetMatchTemperatureSensorDevice(Room room) + { + List<CommonDevice> roomIncludeMatchTempDevice = new List<CommonDevice>(); + foreach (var de in room.ListDevice) + { + var device = LocalDevice.Current.GetDevice(de); + if (device != null) + { + //鐢垫睜璁惧涓嶆敮鎸佺粦瀹� + if (device.ZigbeeType != 1) + { + continue; + } + if (device.Type == DeviceType.TemperatureSensor) + { + var dev = device as TemperatureSensor; + if (dev.SensorDiv == 1) + { + roomIncludeMatchTempDevice.Add(device); + } + } + else if (device.Type == DeviceType.PMSensor) + { + var dev = device as PMSensor; + foreach (var clu in dev.InClusterList) + { + if (clu.InCluster == 1026) + { + roomIncludeMatchTempDevice.Add(device); + } + } + } + } + } + return roomIncludeMatchTempDevice; + } + + /// <summary> + /// 鍖归厤婀垮害浼犳劅鍣� + /// </summary> + /// <param name="room"></param> + List<CommonDevice> GetMatchHumiditySensorDevice(Room room) + { + List<CommonDevice> roomIncludeMatchHumpDevice = new List<CommonDevice>(); + foreach (var de in room.ListDevice) + { + var device = LocalDevice.Current.GetDevice(de); + if (device != null) + { + //鐢垫睜璁惧涓嶆敮鎸佺粦瀹� + if (device.ZigbeeType != 1) + { + continue; + } + if (device.Type == DeviceType.TemperatureSensor) + { + var dev = device as TemperatureSensor; + if (dev.SensorDiv == 2) + { + roomIncludeMatchHumpDevice.Add(device); + } + } + else if (device.Type == DeviceType.PMSensor) + { + var dev = device as PMSensor; + foreach (var clu in dev.InClusterList) + { + if (clu.InCluster == 1029) + { + roomIncludeMatchHumpDevice.Add(device); + } + } + } + } + } + return roomIncludeMatchHumpDevice; + } + + /// <summary> + /// 鑾峰彇妤煎眰瀵瑰簲鐨勬埧闂村垪琛� + /// </summary> + /// <returns></returns> + private List<Room> GetFloorRoomList() + { + supportRoomList.Clear(); + var supportRoomListTemp = new List<Room>(); + var listAllRoom = HdlRoomLogic.Current.GetAllListRooms(); + if (Common.Config.Instance.Home.FloorDics.Count == 0) + { + // 鑾峰彇娌℃湁妤煎眰鎴块棿 + foreach (var room in listAllRoom) + { + if (string.IsNullOrEmpty(room.FloorId)) + { + if (room.IsLove) + { + continue; + } + supportRoomListTemp.Add(room); + } + } + } + else + { + // 鑾峰彇鏀寔鐨勬埧闂� + foreach (var room in listAllRoom) + { + if (room.IsLove) + { + continue; + } + supportRoomListTemp.Add(room); + } + } + return supportRoomListTemp; + } + + /// <summary> + /// 鎵�鏈夋埧闂翠腑鍖归厤鐨勬敮鎸佺粦瀹氱殑鎵�鏈夌洰鏍囧垪琛� + /// </summary> + /// <returns></returns> + List<CommonDevice> GetAllRoomSupportDeviceList() + { + currentPanelSupportBindDeviceList.Clear(); + List<CommonDevice> currentPanelBindSupportDeviceListTemp = new List<CommonDevice>(); + switch (curDeviceBindType) + { + case 1: + foreach (var r in supportRoomList) + { + if (r.ListDevice.Count == 0) + { + continue; + } + foreach (var deviceKeys in r.ListDevice) + { + var device = LocalDevice.Current.GetDevice(deviceKeys); + if (device != null) + { + //鑾峰彇璁惧绫诲瀷鐨� + var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device }); + //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず + if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir) + { + continue; + } + if (device.Type == DeviceType.FreshAir) + { + currentPanelBindSupportDeviceListTemp.Add(device); + } + } + } + } + break; + case 2: + foreach (var r in supportRoomList) + { + if (r.ListDevice.Count == 0) + { + continue; + } + var deviceListTemp = GetMatchTemperatureSensorDevice(r); + foreach (var dev in deviceListTemp) + { + currentPanelBindSupportDeviceListTemp.Add(dev); + } + } + break; + case 3: + foreach (var r in supportRoomList) + { + if (r.ListDevice.Count == 0) + { + continue; + } + var deviceListTemp = GetMatchHumiditySensorDevice(r); + foreach (var dev in deviceListTemp) + { + currentPanelBindSupportDeviceListTemp.Add(dev); + } + foreach (var deviceKeys in r.ListDevice) + { + var device = LocalDevice.Current.GetDevice(deviceKeys); + if (device != null) + { + if (device.Type == DeviceType.FreshAirHumiditySensor) + { + currentPanelBindSupportDeviceListTemp.Add(device); + } + } + } + } + break; + case 4: + foreach (var r in supportRoomList) + { + if (r.ListDevice.Count == 0) + { + continue; + } + foreach (var deviceKeys in r.ListDevice) + { + var device = LocalDevice.Current.GetDevice(deviceKeys); + if (device != null) + { + if (device.Type == DeviceType.PMSensor) + { + currentPanelBindSupportDeviceListTemp.Add(device); + } + } + } + } + break; + } + return currentPanelBindSupportDeviceListTemp; + } + + /// <summary> + /// 鑾峰彇褰撳墠鎴块棿涓尮閰嶇殑鏀寔缁戝畾鐨勮澶囧垪琛� + /// </summary> + /// <returns></returns> + List<CommonDevice> GetCurRoomSupportDeviceList(Room curRoom) + { + currentRoomSupportBindDeviceList.Clear(); + List<CommonDevice> curRoomDeviceListTemp = new List<CommonDevice>(); + switch (curDeviceBindType) + { + case 1: + foreach (var deviceKeys in curRoom.ListDevice) + { + var device = LocalDevice.Current.GetDevice(deviceKeys); + if (device != null) + { + //鑾峰彇璁惧绫诲瀷鐨� + var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device }); + //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず + if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir) + { + continue; + } + if (device.Type == DeviceType.FreshAir) + { + curRoomDeviceListTemp.Add(device); + } + } + } + break; + case 2: + curRoomDeviceListTemp = GetMatchTemperatureSensorDevice(curRoom); + break; + case 3: + curRoomDeviceListTemp = GetMatchHumiditySensorDevice(curRoom); + foreach (var deviceKeys in curRoom.ListDevice) + { + var device = LocalDevice.Current.GetDevice(deviceKeys); + if (device != null) + { + if (device.Type == DeviceType.FreshAirHumiditySensor) + { + curRoomDeviceListTemp.Add(device); + } + } + } + break; + case 4: + foreach (var deviceKeys in curRoom.ListDevice) + { + var device = LocalDevice.Current.GetDevice(deviceKeys); + if (device != null) + { + if (device.Type == DeviceType.PMSensor) + { + curRoomDeviceListTemp.Add(device); + } + } + } + break; + } + return curRoomDeviceListTemp; + } + #endregion + + #region 绉婚櫎鏂规硶 + /// <summary> + /// 閲嶅啓绉婚櫎鏂规硶 + /// </summary> + public override void RemoveFromParent() + { + actionFreshAirTarget = null; + actionTemperatureTarget = null; + actionHumidityTarget = null; + actionPMTarget = null; + base.RemoveFromParent(); + } + #endregion + } +} + diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionTargetsForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionTargetsForm.cs new file mode 100755 index 0000000..ddcca6f --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionTargetsForm.cs @@ -0,0 +1,10 @@ +锘縰sing System; +namespace Shared.Phone.UserCenter.DeviceBind +{ + public class PanelSimpleMutilfunctionTargetsForm : BindCommonLayout + { + public PanelSimpleMutilfunctionTargetsForm() + { + } + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs index 801c052..b89d1e5 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs @@ -23,6 +23,12 @@ /// </summary> public static DateTime DoorlockZoneTime = DateTime.Now; /// <summary> + /// 鎵�鏈夐棬閿佷腑鐨勫父寮�妯″紡鍊糩鐢ㄤ簬鎺ㄩ�佹煡璇紝鎻愮ず闂ㄩ攣澶辨晥锛� + /// keys:闂ㄩ攣mac+epoint value:鏄惁甯稿紑妯″紡 + /// ture:甯稿紑锛� false:鍏抽棴 + /// </summary> + public static Dictionary<string, bool?> DoorLockNormallyMode = new Dictionary<string, bool?> { }; + /// <summary> /// 甯稿紑妯″紡鎵ц鏃堕棿 /// </summary> public static int NormallyOpenModeInvalidTime = 12; @@ -155,6 +161,14 @@ public static void NormallyOpenModeValue(ZigBee.Device.DoorLock doorLock, bool value) { doorLock.IsDoorLockNormallyMode = value; + if (DoorLockCommonInfo.DoorLockNormallyMode.ContainsKey(doorLock.DeviceAddr + doorLock.DeviceEpoint)) + { + DoorLockCommonInfo.DoorLockNormallyMode[doorLock.DeviceAddr + doorLock.DeviceEpoint] = value; + } + else + { + DoorLockCommonInfo.DoorLockNormallyMode.Add(doorLock.DeviceAddr + doorLock.DeviceEpoint, value); + } } /// <summary> @@ -162,9 +176,10 @@ /// </summary> /// <param name="doorLock">褰撳墠闂ㄩ攣</param> /// <param name="doorLockMessType">瀵艰嚧闂ㄩ攣澶辨晥鐨勬搷浣滅被鍨�</param> - /// <param name="haveLogic">缃戝叧涓槸鍚﹀瓨鍦ㄩ�昏緫甯稿紑妯″紡</param> + /// <param name="haveLogic">缃戝叧涓槸鍚﹀瓨鍦ㄩ�昏緫甯稿紑妯″紡</param> /// <param name="action">鍥炶皟澶勭悊鏇存柊鍐呭</param> - public static async void NomallyOpenModeInvalidDialog(ZigBee.Device.DoorLock doorLock, DoorLockMessType doorLockMessType, bool haveLogic, Action<bool> action = null) + /// <param name="type">1:纭甯稿紑妯″紡宸茬粡寮�鍚紱0:甯稿紑妯″紡澶辨晥鎻愮ず</param> + public static async void NomallyOpenModeInvalidDialog(ZigBee.Device.DoorLock doorLock, DoorLockMessType doorLockMessType, bool haveLogic, Action<bool> action = null, int type = 0) { //甯稿紑妯″紡鍙兘涓讳汉鎿嶄綔 if (UserCenterResourse.UserInfo.AuthorityNo != 1) @@ -202,7 +217,7 @@ if (haveLogic) { //姝ゅ鍒犻櫎娓╁眳鍩庣殑甯稿紑妯″紡鐗规畩閫昏緫 - var resTemp1 = await Shared.Phone.Device.Logic.SkipView.GetLogicAll(doorLock); + var resTemp1 = await Shared.Phone.Device.Logic.SkipView.DelAllLogic(doorLock); } } else @@ -294,7 +309,7 @@ if (haveLogic) { //姝ゅ鍒犻櫎娓╁眳鍩庣殑甯稿紑妯″紡鐗规畩閫昏緫 - var resTemp1 = await Shared.Phone.Device.Logic.SkipView.GetLogicAll(doorLock); + var resTemp1 = await Shared.Phone.Device.Logic.SkipView.DelAllLogic(doorLock); } } else @@ -343,7 +358,7 @@ if (haveLogic) { //姝ゅ鍒犻櫎娓╁眳鍩庣殑甯稿紑妯″紡鐗规畩閫昏緫 - var resTemp1 = await Shared.Phone.Device.Logic.SkipView.GetLogicAll(doorLock); + var resTemp1 = await Shared.Phone.Device.Logic.SkipView.DelAllLogic(doorLock); } Application.RunOnMainThread(() => { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs index 0562afe..9856a3c 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs @@ -25,14 +25,9 @@ ZbGateway.StatusList.Add(this); Application.RunOnMainThread(() => { - ControlCommonResourse.UpdateDoorLockStatusAction = (obj) => - { - UpdateNomallyOpenStatus(); - }; - UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction += (DoorlockKey, status) => { - var key = doorLock.DeviceAddr + doorLock.DeviceEpoint; + var key = doorLock.DeviceAddr; if (DoorlockKey == key) { DoorLockCommonInfo.NormallyOpenModeValue(this.doorLock, status); @@ -638,35 +633,6 @@ } } - //缃戝叧鎵ц閫昏緫锛屽父寮�妯″紡澶辨晥涓婃姤 - //if (typeTag == "DoorLockAlarmsSendAlarmInform" && tempDevice != null) - //{ - // var doorL = (ZigBee.Device.DoorLock)tempDevice; - - // if (doorL.DeviceAddr + doorL.DeviceEpoint == doorLock.DeviceAddr + doorLock.DeviceEpoint) - // { - // //闈炰富浜轰笉寮硅繖涓獥鍙� - // if (UserCenterResourse.UserInfo.AuthorityNo != 1) - // { - // return; - // } - // if (doorLock.IsDoorLockNormallyMode) - // { - // if (canOpenNormallyMode) - // { - // Application.RunOnMainThread(() => - // { - // Action<bool> action = (obj) => - // { - // UpdateNomallyOpenStatus(); - // }; - // DoorLockCommonInfo.NomallyOpenModeInvalidDialog(doorLock, DoorLockCommonInfo.DoorLockMessType.ServicePush, haveLogicNormallyOpenMode, action); - // }); - // } - // } - // } - //} - if (typeTag == "DeviceStatusReport" && tempDevice != null) { if (tempDevice != null) @@ -734,18 +700,18 @@ } DoorLockCommonInfo.NormallyOpenModeValue(doorLock, tempRes); - //Application.RunOnMainThread(async () => - //{ - //var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist(3, doorLock); - //if (resTemp == 1) - //{ - // haveLogicNormallyOpenMode = true; - //} - //else if (resTemp == 0) - //{ - // haveLogicNormallyOpenMode = false; - //} - //}); + Application.RunOnMainThread(async () => + { + var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist(2, doorLock); + if (resTemp == 0) + { + haveLogicNormallyOpenMode = false; + } + else + { + haveLogicNormallyOpenMode = true; + } + }); } } else @@ -1102,7 +1068,7 @@ action = () => { - //绯荤粺瀵嗙爜鏀寔鎿嶄綔闂ㄩ攣鍚庯紝璋冪敤娓╁眳鍩庣殑鐣岄潰銆愬父寮�鑷姩鍖栥�� + //WJC鐨勪唬鐮侊細绯荤粺瀵嗙爜鏀寔鎿嶄綔闂ㄩ攣鍚庯紝璋冪敤娓╁眳鍩庣殑鐣岄潰銆愬父寮�鑷姩鍖栥�� if (doorLock == null) { ///闃叉鎶涘紓甯� @@ -1120,13 +1086,25 @@ UserView.HomePage.Instance.AddChidren(addLogicPage); UserView.HomePage.Instance.PageIndex += 1; addLogicPage.Show(); - addLogicPage.action += (w) => - { - doorLock.IsDoorLockNormallyMode = w; - UpdateNomallyOpenStatus(); - //杩斿洖鎸夐敭娓呯┖褰撳墠閫昏緫瀹氫箟鐨凩ogicAction - UserCenter.DoorLock.DoorLockCommonInfo.LogicAction = null; - }; + addLogicPage.action += async (w) => + { + DoorLockCommonInfo.NormallyOpenModeValue(doorLock, w); + UpdateNomallyOpenStatus(); + //杩斿洖鎸夐敭娓呯┖褰撳墠閫昏緫瀹氫箟鐨凩ogicAction + UserCenter.DoorLock.DoorLockCommonInfo.LogicAction = null; + //鏄惁瀛樺湪甯稿紑妯″紡 + var resTemp = Shared.Common.Logic.SoneLogicList; + if (resTemp.Count == 0) + { + haveLogicNormallyOpenMode = false; + } + else + { + haveLogicNormallyOpenMode = true; + } + + UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction -= addLogicPage.updateCurrentDoorlockActionTemp; + }; }; HdlCheckLogic.Current.CheckSecondarySecurity(action); @@ -1232,9 +1210,6 @@ /// </summary> public override void RemoveFromParent() { - //寰愭鐨勯棬閿佺晫闈㈠叧闂�(缃戝叧鍏ㄥ眬鎺ユ敹鏃朵娇鐢�) - //ControlCommonResourse.IsDoorLockPageOpen = false; - ControlCommonResourse.UpdateDoorLockStatusAction = null; UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction = null; if (IsDrawerLockMode) { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/AddGatewayHelpForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/AddGatewayHelpForm.cs index 56274d2..eef428c 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/AddGatewayHelpForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/AddGatewayHelpForm.cs @@ -50,7 +50,7 @@ //鍒濆鍖栨棤绾跨綉鍏砋dp妯″紡甯姪鎺т欢 this.InitWirelessUdpGatewayHelpControl(); } - else if (i_div == "Ap") + else if (i_div == "Ap" || i_div == "Mini") { //鍒濆鍖栨棤绾跨綉鍏矨p妯″紡甯姪鎺т欢 this.InitWirelessApGatewayHelpControl(); diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection1Form.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection1Form.cs new file mode 100755 index 0000000..76609fd --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection1Form.cs @@ -0,0 +1,79 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// Mini缃戝叧鐨勮鏄庢寚绀虹晫闈�1 + /// </summary> + public class MiniGatewayDirection1Form : EditorCommonForm + { + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddMiniGateway)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鍥剧墖 + var framePic = new FrameLayout(); + framePic.Width = this.GetPictrueRealSize(395); + framePic.Height = this.GetPictrueRealSize(223); + framePic.Gravity = Gravity.CenterHorizontal; + framePic.Y = Application.GetRealHeight(464); + framePic.BackgroundImagePath = "Gateway/MiniGatewayDirection.png"; + bodyFrameLayout.AddChidren(framePic); + + //鎻掔數鍚�,闀挎寜缃戝叧HID/WCFG鎸夐敭5绉抺0}绯荤粺鐏父浜�60绉掑悗鍒欒繘鍏ラ厤缃戠姸鎬� + string[] ArryMsg = Language.StringByID(R.MyInternationalizationString.uAddMiniGatewayMsg1).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + int yy = framePic.Bottom + Application.GetRealHeight(291); + foreach (var msg in ArryMsg) + { + var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + btnMsg.Text = msg; + btnMsg.Y = yy; + btnMsg.TextAlignment = TextAlignment.Center; + btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3; + bodyFrameLayout.AddChidren(btnMsg); + yy = btnMsg.Bottom; + } + + //鏌ョ湅甯姪 + var btnHelp = this.AddHelpControl(); + btnHelp.ButtonClickEvent += (sender, e) => + { + var form = new AddGatewayHelpForm(); + form.AddForm("Mini"); + }; + + //涓嬩竴姝� + var btnNext = new BottomClickButton(); + btnNext.TextID = R.MyInternationalizationString.uNextway; + bodyFrameLayout.AddChidren(btnNext); + btnNext.ButtonClickEvent += (sender, e) => + { + this.CloseForm(); + var form = new MiniGatewayDirection2Form(); + form.AddForm(); + }; + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection2Form.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection2Form.cs new file mode 100755 index 0000000..3a9e737 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection2Form.cs @@ -0,0 +1,119 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// Mini缃戝叧鐨勮鏄庢寚绀虹晫闈�1 + /// </summary> + public class MiniGatewayDirection2Form : EditorCommonForm + { + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddMiniGateway)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //涓嬩竴姝� + var btnNext = new BottomClickButton(); + btnNext.TextID = R.MyInternationalizationString.uNextway; + bodyFrameLayout.AddChidren(btnNext); + btnNext.ButtonClickEvent += (sender, e) => + { + //濡傛灉涓嶆槸鐑偣妯″紡 + if (HdlWifiLogic.Current.IsMiniGatewayHotspot == false) + { + //璇烽�夋嫨widora-xxxx缃戠粶 + this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uPleaseSelectWidoraXXNet)); + return; + } + var errorMsg = HdlWifiLogic.Current.StartApTcpConnection(); + if (errorMsg != null) + { + //鎷ユ湁閿欒 + this.ShowMassage(ShowMsgType.Tip, errorMsg); + return; + } + this.CloseForm(); + var form = new MiniGatewaySelectNetworkForm(); + form.AddForm(); + }; + //濡傛灉涓嶆槸Mini缃戝叧鐑偣 + if (HdlWifiLogic.Current.IsMiniGatewayHotspot == false) + { + btnNext.Visible = false; + } + + //鍥剧墖 + var framePic = new FrameLayout(); + framePic.Width = this.GetPictrueRealSize(852); + framePic.Height = this.GetPictrueRealSize(478); + framePic.Gravity = Gravity.CenterHorizontal; + framePic.Y = Application.GetRealHeight(285); + framePic.BackgroundImagePath = "Gateway/WirelessGatewaySearching.png"; + bodyFrameLayout.AddChidren(framePic); + + //鎵嬫満鍘昏缃繛鎺ョ綉鍏崇儹鐐箋0}閫夋嫨widora-xxxx缃戠粶 + string[] ArryMsg = Language.StringByID(R.MyInternationalizationString.uAddMiniGatewayMsg2).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + int yy = framePic.Bottom + Application.GetRealHeight(213); + foreach (var msg in ArryMsg) + { + var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + btnMsg.Text = msg; + btnMsg.Y = yy; + btnMsg.TextAlignment = TextAlignment.Center; + btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3; + bodyFrameLayout.AddChidren(btnMsg); + yy = btnMsg.Bottom; + } + + //鍘昏缃� + var btnSettion = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false); + btnSettion.Y = yy + Application.GetRealHeight(12); + btnSettion.TextSize = 12; + btnSettion.TextAlignment = TextAlignment.Center; + btnSettion.TextColor = 0xff0075ff; + btnSettion.Text = Language.StringByID(R.MyInternationalizationString.uGotoSettion); + btnSettion.ButtonClickEvent += (sender, e) => + { + HdlWifiLogic.Current.OpenAppWifiSettion(); + btnNext.Visible = true; + }; + bodyFrameLayout.AddChidren(btnSettion); + //搴曠嚎 + int lineWidth = btnSettion.GetRealWidthByText(); + var btnLine1 = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false); + btnLine1.BackgroundColor = 0xff0075ff; + btnLine1.Gravity = Gravity.CenterHorizontal; + btnLine1.Y = btnSettion.Bottom - Application.GetRealHeight(8); + bodyFrameLayout.AddChidren(btnLine1); + + //鏌ョ湅甯姪 + var btnHelp = this.AddHelpControl(); + btnHelp.ButtonClickEvent += (sender, e) => + { + var form = new AddGatewayHelpForm(); + form.AddForm("Mini"); + }; + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection3Form.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection3Form.cs new file mode 100755 index 0000000..5acc2e1 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection3Form.cs @@ -0,0 +1,112 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// Mini缃戝叧鐨勮鏄庢寚绀虹晫闈�3 + /// </summary> + public class MiniGatewayDirection3Form : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddMiniGateway)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鏌ョ湅甯姪 + var btnHelp = this.AddHelpControl(); + btnHelp.ButtonClickEvent += (sender, e) => + { + var form = new AddGatewayHelpForm(); + form.AddForm("Mini"); + }; + + //涓嬩竴姝� + var btnNext = new BottomClickButton(); + btnNext.TextID = R.MyInternationalizationString.uNextway; + bodyFrameLayout.AddChidren(btnNext); + btnNext.ButtonClickEvent += (sender, e) => + { + //濡傛灉杩樻槸鐑偣妯″紡 + if (HdlWifiLogic.Current.IsMiniGatewayHotspot == true) + { + //璇烽摼鎺ュ搴璚ifi + this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseLinkHomeWifi)); + return; + } + this.CloseForm(); + var form = new MiniGatewaySearchForm(); + form.AddForm(); + }; + btnNext.Visible = false; + + //鍥剧墖 + var framePic = new FrameLayout(); + framePic.Width = this.GetPictrueRealSize(857); + framePic.Height = this.GetPictrueRealSize(239); + framePic.Gravity = Gravity.CenterHorizontal; + framePic.Y = Application.GetRealHeight(366); + framePic.BackgroundImagePath = "Gateway/MiniGatewaySearching.png"; + bodyFrameLayout.AddChidren(framePic); + + //鎵嬫満鍘昏缃繛鎺ヨ矾鐢卞櫒 + string[] ArryMsg = Language.StringByID(R.MyInternationalizationString.uAddApWirelessGatewayMsg3).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + int yy = framePic.Bottom + Application.GetRealHeight(369); + foreach (var msg in ArryMsg) + { + var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + btnMsg.Text = msg; + btnMsg.Y = yy; + btnMsg.TextAlignment = TextAlignment.Center; + btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3; + bodyFrameLayout.AddChidren(btnMsg); + yy = btnMsg.Bottom; + } + + //鍘昏缃� + var btnSettion = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false); + btnSettion.Y = yy + Application.GetRealHeight(12); + btnSettion.TextSize = 12; + btnSettion.TextAlignment = TextAlignment.Center; + btnSettion.TextColor = 0xff0075ff; + btnSettion.Text = Language.StringByID(R.MyInternationalizationString.uGotoSettion); + btnSettion.ButtonClickEvent += (sender, e) => + { + HdlWifiLogic.Current.OpenAppWifiSettion(); + btnNext.Visible = true; + }; + bodyFrameLayout.AddChidren(btnSettion); + //搴曠嚎 + int lineWidth = btnSettion.GetRealWidthByText(); + var btnLine1 = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false); + btnLine1.BackgroundColor = 0xff0075ff; + btnLine1.Gravity = Gravity.CenterHorizontal; + btnLine1.Y = btnSettion.Bottom - Application.GetRealHeight(8); + bodyFrameLayout.AddChidren(btnLine1); + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewaySearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewaySearchForm.cs new file mode 100755 index 0000000..0afbf47 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewaySearchForm.cs @@ -0,0 +1,413 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using ZigBee.Device; + +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// Mini缃戝叧鐨勬悳绱㈢晫闈� + /// </summary> + public class MiniGatewaySearchForm : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <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; + /// <summary> + /// 缃戝叧妫�娴嬩腑 + /// </summary> + private string isGatewayChecking = "0"; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆鏍囬淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddMiniGateway)); + + //鍒濆鍖栦腑閮ㄦ帶浠� + this.InitDefultMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄦ帶浠� + /// </summary> + private void InitDefultMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //缃戝叧濡傛灉姝e父杩炴帴璺敱鍣▄0}绯荤粺鎸囩ず鐏細1绉掗棯鐑� + string[] ArryMsg = Language.StringByID(R.MyInternationalizationString.uAddApWirelessGatewayMsg4).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + int yy = Application.GetRealHeight(1066); + foreach (var msg in ArryMsg) + { + var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + btnMsg.Text = msg; + btnMsg.Y = yy; + btnMsg.TextAlignment = TextAlignment.Center; + btnMsg.TextColor = UserCenterColor.Current.TextGrayColor1; + bodyFrameLayout.AddChidren(btnMsg); + yy = btnMsg.Bottom; + } + + //鍒濆鍖栬繛鎺ョ殑鍋囨兂鍔ㄧ敾鏁堟灉 + this.InitConcetionAnimete(); + } + + /// <summary> + /// 鍒濆鍖栧け璐ユā寮忕殑涓儴鎺т欢 + /// </summary> + private void InitFailMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鍥炬爣 + var picGwImage = new FrameLayout(); + picGwImage.Width = this.GetPictrueRealSize(857); + picGwImage.Height = this.GetPictrueRealSize(239); + picGwImage.Y = Application.GetRealWidth(236); + picGwImage.Gravity = Gravity.CenterHorizontal; + picGwImage.BackgroundImagePath = "Gateway/MiniGatewaySearching.png"; + bodyFrameLayout.AddChidren(picGwImage); + var btnFailIcon = new PicViewControl(66, 66); + btnFailIcon.UnSelectedImagePath = "Item/FailIcon.png"; + btnFailIcon.Gravity = Gravity.CenterHorizontal; + btnFailIcon.Y = this.GetPictrueRealSize(110); + picGwImage.AddChidren(btnFailIcon); + //鎼滅储澶辫触 + var btnFailView = new NormalViewControl(300, 60, true); + btnFailView.TextAlignment = TextAlignment.Center; + btnFailView.Y = picGwImage.Bottom - Application.GetRealHeight(15); + btnFailView.Gravity = Gravity.CenterHorizontal; + btnFailView.TextColor = UserCenterColor.Current.TextGrayColor3; + btnFailView.TextID = R.MyInternationalizationString.uSearchFail; + bodyFrameLayout.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.鐭寜HID/WCFG鎸夐敭锛岀郴缁熸寚绀虹伅蹇棯3绉掞紝缃戝叧杩涘叆鎹㈢粦妯″紡锛屽己鍒剁綉鍏崇粦瀹氬埌褰撳墠APP + 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.闀挎寜缃戝叧ZB/RST鎸夐敭20绉掍互涓婏紝鐩村埌鎵�鏈夋寚绀虹伅鍚屾椂鐏紝鍗虫仮澶嶅嚭鍘傝缃苟閲嶅惎 + 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 FrameLayoutStatuControl(); + 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.IsBold = 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) => + { + //鍒濆鍖栧垵濮嬩腑閮ㄦ帶浠� + this.InitDefultMiddleFrame(); + }; + + //杩斿洖缃戝叧绠$悊 + var btnGoBack = new BottomClickButton(688); + btnGoBack.Y = Application.GetRealHeight(1495); + btnGoBack.TextID = R.MyInternationalizationString.uGobackGatewayManage; + if (UserCenterResourse.DicActionForm.ContainsKey("GatewayListForm") == false) + { + //杩斿洖涓婚〉 + btnGoBack.TextID = R.MyInternationalizationString.uGobackToHomePage; + } + bodyFrameLayout.AddChidren(btnGoBack); + btnGoBack.ButtonClickEvent += (sender, e) => + { + this.CloseForm(); + //鍏抽棴鎸囧畾鐣岄潰 + this.CloseFormByFormName("NewGateWayMenuSelectForm"); + }; + } + + #endregion + + #region 鈻� 鍋囨兂鍔ㄧ敾___________________________ + + /// <summary> + /// 鍒濆鍖栬繛鎺ョ殑鍋囨兂鍔ㄧ敾鏁堟灉 + /// </summary> + private void InitConcetionAnimete() + { + //鍥炬爣 + var btnGwImage = new FrameLayout(); + btnGwImage.Width = this.GetPictrueRealSize(857); + btnGwImage.Height = this.GetPictrueRealSize(239); + btnGwImage.Y = Application.GetRealHeight(360); + btnGwImage.Gravity = Gravity.CenterHorizontal; + btnGwImage.BackgroundImagePath = "Gateway/MiniGatewaySearching.png"; + bodyFrameLayout.AddChidren(btnGwImage); + + //姝e湪鎼滅储缃戝叧鈥� + var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + btnMsg.TextID = R.MyInternationalizationString.uGatewaySearching; + btnMsg.Y = Application.GetRealHeight(821); + btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3; + btnMsg.TextAlignment = TextAlignment.Center; + bodyFrameLayout.AddChidren(btnMsg); + + //棣栨牸鐨刋杞� + int firstPoint = this.GetPictrueRealSize(275); + //涓�鏍肩殑瀹藉害 + int width = this.GetPictrueRealSize(22); + //闂磋窛澶у皬 + int space = this.GetPictrueRealSize(12); + + //鐢熸垚鏍煎瓙鍧愭爣 + var listPoint = new List<int>(); + for (int i = 0; i < 9; i++) + { + listPoint.Add(firstPoint + (width + space) * i); + } + + //寮�鍚繛鎺ョ殑鍋囨兂鍔ㄧ敾鏁堟灉绾跨▼ + var btnRound = new PicViewControl(width, width, false); + btnRound.Radius = (uint)width / 2; + btnRound.BackgroundColor = UserCenterColor.Current.ConcetionRoundColor; + btnRound.Y = this.GetPictrueRealSize(132); + btnRound.X = listPoint[0]; + btnGwImage.AddChidren(btnRound); + + string strMsg = btnMsg.Text; + HdlThreadLogic.Current.RunThread(() => + { + //娓呯┖鍏ㄩ儴鍒楄〃 + HdlGatewayLogic.Current.ClearAllRealGateway(); + ZigBee.Common.Application.IsSearchingGateway = true; + + int index = 1; + //璁℃椂鏃堕棿 + int timeCount = 0; + //瓒呮椂鏃堕棿 + int timeOut = 240; + while (btnGwImage.Parent != null) + { + timeCount++; + if (timeCount == 10) + { + //5绉掑悗娓呯┖缃戝叧鍒楄〃 + HdlGatewayLogic.Current.ClearAllRealGateway(); + ZigBee.Common.Application.IsSearchingGateway = true; + } + if (timeCount % 4 == 0 && timeCount >= 10) + { + lock (isGatewayChecking) + { + if (isGatewayChecking != "1") + { + isGatewayChecking = "1"; + HdlThreadLogic.Current.RunThread(async () => + { + //姣�2绉掓娴嬫悳绱㈠埌鐨勭綉鍏� + await this.CheckZbGatewayAndSetRow(); + lock (isGatewayChecking) + { + isGatewayChecking = "0"; + } + }); + } + } + } + if (timeCount % 2 == 0) + { + timeOut--; + } + if (this.newGatewayGetting == true || timeOut <= 0) + { + //鑾峰彇寰楀埌鏂扮綉鍏�,鍒欎腑鏂嚎绋� + break; + } + + Application.RunOnMainThread(() => + { + btnRound.X = listPoint[index]; + index++; + if (index == listPoint.Count) + { + index = 0; + } + //姝e湪鎼滅储缃戝叧鈥Xs + btnMsg.Text = strMsg + timeOut + "s"; + }); + + System.Threading.Thread.Sleep(500); + } + if (timeOut <= 0) + { + HdlThreadLogic.Current.RunMain(() => + { + //鍒濆鍖栧け璐ユā寮忕殑涓儴鎺т欢 + this.InitFailMiddleFrame(); + }); + } + else if (newGatewayGetting == true) + { + HdlThreadLogic.Current.RunMain(() => + { + if (this.Parent != null) + { + var form = new GatewayManage.GatewaySearchListForm(); + this.AddFromAndRemoveNowForm(form, listZbGateway, dicZbGatewayDiv); + } + }); + } + }); + } + + #endregion + + #region 鈻� 缃戝叧妫�娴媉__________________________ + + /// <summary> + /// 妫�娴嬫悳绱㈠埌鐨勭綉鍏� + /// </summary> + private async Task<bool> CheckZbGatewayAndSetRow() + { + for (int i = 0; i < ZbGateway.GateWayList.Count; i++) + { + var way = ZbGateway.GateWayList[i]; + var wayId = HdlGatewayLogic.Current.GetGatewayId(way); + if (dicZbGatewayDiv.ContainsKey(wayId) == true) + { + //宸茬粡澶勭悊浜� + continue; + } + + //缃戝叧缁戝畾妯″紡 + GatewayBindMode mode = GatewayBindMode.BindAgain; + //濡傛灉鏄涓�娆$粦瀹�,鎴栬�呮槸浠ュ墠宸茬粡缁戝畾杩囦簡鐨� + if (HdlGatewayLogic.Current.HomeIdIsEmpty(way) == true + || way.getGatewayBaseInfo.HomeId == Common.Config.Instance.HomeId) + { + if (way.getGatewayBaseInfo.HomeId != Common.Config.Instance.HomeId) + { + //绗竴娆$粦瀹�,涔熷氨鏄綉鍏充綇瀹匢D涓虹┖ + mode = GatewayBindMode.First; + } + else + { + //宸茬粡缁戝畾杩囦簡 + mode = GatewayBindMode.Binded; + } + //娣诲姞鎼滅储鍒扮殑缃戝叧鍒扮紦瀛�(鎵ц缃戝叧淇濆瓨鎿嶄綔) + var result = await HdlGatewayLogic.Current.AddNewGateway(way, ShowErrorMode.NO); + if (result == false) + { + continue; + } + } + //鏀堕泦缃戝叧瀵硅薄 + this.listZbGateway.Add(way); + + //鍏ㄩ儴澶勭悊OK鍚庯紝鎵嶈兘璁剧疆flage + if (mode == GatewayBindMode.First) + { + //绗竴娆$粦瀹� + this.dicZbGatewayDiv[wayId] = 0; + //鑾峰彇鍒颁簡鏂扮綉鍏� + this.newGatewayGetting = true; + } + else if (mode == GatewayBindMode.Binded) + { + //宸茬粡缁戝畾杩� + this.dicZbGatewayDiv[wayId] = 1; + } + else + { + //闇�瑕侀噸鏂扮粦瀹� + this.dicZbGatewayDiv[wayId] = 2; + //鑾峰彇鍒颁簡鏂扮綉鍏� + this.newGatewayGetting = true; + } + + if (mode == GatewayBindMode.First) + { + //鎴戣寰楄繖閲岄渶瑕佽幏鍙栦竴涓嬫柊缃戝叧鐨勮澶囧垪琛� + Common.LocalDevice.Current.SetDeviceToMemmoryByGateway(way); + } + } + return true; + } + + #endregion + + #region 鈻� 鐣岄潰鍏抽棴___________________________ + + /// <summary> + /// 鐣岄潰鍏抽棴 + /// </summary> + public override void CloseFormBefore() + { + ZigBee.Common.Application.IsSearchingGateway = false; + + base.CloseFormBefore(); + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewaySelectNetworkForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewaySelectNetworkForm.cs new file mode 100755 index 0000000..c959bbf --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewaySelectNetworkForm.cs @@ -0,0 +1,143 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// Mini缃戝叧閫夋嫨缃戠粶鐨勭晫闈� + /// </summary> + public class MiniGatewaySelectNetworkForm : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddMiniGateway)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + bodyFrameLayout.RemoveAll(); + + var frameBack = new FrameLayout(); + frameBack.Height = Application.GetRealHeight(409); + frameBack.BackgroundColor = UserCenterColor.Current.White; + bodyFrameLayout.AddChidren(frameBack); + + //璇烽�夋嫨缃戠粶 + var btnTitle = new NormalViewControl(600, 64, true); + btnTitle.X = ControlCommonResourse.XXLeft; + btnTitle.Y = Application.GetRealHeight(30); + btnTitle.TextSize = 15; + btnTitle.TextID = R.MyInternationalizationString.uPleaseSelectNetwork; + frameBack.AddChidren(btnTitle); + + //WIFI + var rowWifi = new FrameCaptionInputControl("WiFi", ""); + rowWifi.Y = Application.GetRealHeight(124); + frameBack.AddChidren(rowWifi); + rowWifi.InitControl(); + rowWifi.AddBottomLine(); + rowWifi.txtInput.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputHomeWifiAccount); + + //瀵嗙爜 + var btnPsw = new FrameCaptionInputControl(Language.StringByID(R.MyInternationalizationString.uPassword), string.Empty); + btnPsw.Y = rowWifi.Bottom + Application.GetRealHeight(9); + frameBack.AddChidren(btnPsw); + btnPsw.InitControl(); + btnPsw.txtInput.SecureTextEntry = true; + btnPsw.txtInput.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputWifiPassword); + var btnView = btnPsw.AddMostRightEmptyIcon(81, 81); + btnView.UnSelectedImagePath = "Item/HidenPWD.png"; + btnView.SelectedImagePath = "Item/UnHidenPWD.png"; + btnPsw.ChangedChidrenBindMode(btnView, ChidrenBindMode.NotBind); + btnView.ButtonClickEvent += (sender, e) => + { + btnView.IsSelected = !btnView.IsSelected; + btnPsw.txtInput.SecureTextEntry = !btnPsw.txtInput.SecureTextEntry; + }; + + var btnMsg = new NormalViewControl(btnPsw.txtInput.Width, false); + btnMsg.X = ControlCommonResourse.XXLeft; + btnMsg.Y = frameBack.Bottom + Application.GetRealHeight(23); + btnMsg.TextSize = 12; + btnMsg.Height = Application.GetRealHeight(40); + btnMsg.TextColor = UserCenterColor.Current.ErrorColor; + bodyFrameLayout.AddChidren(btnMsg); + + //鏌ョ湅甯姪 + var btnHelp = this.AddHelpControl(); + btnHelp.ButtonClickEvent += (sender, e) => + { + var form = new AddGatewayHelpForm(); + form.AddForm("Mini"); + }; + + //涓嬩竴姝� + var btnNext = new BottomClickButton(); + btnNext.TextID = R.MyInternationalizationString.uNextway; + bodyFrameLayout.AddChidren(btnNext); + + btnNext.MouseUpEventHandler += (sender, e) => + { + btnMsg.Text = string.Empty; + if (rowWifi.Text == string.Empty) + { + //璇疯緭鍏ュ搴璚IFI璐﹀彿 + btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uPleaseInputHomeWifiAccount); + return; + } + if (btnPsw.Text == string.Empty) + { + //璇疯緭鍏ifi瀵嗙爜 + btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uPleaseInputWifiPassword); + return; + } + //鍙戦�佸瘑鐮� + var result = HdlWifiLogic.Current.SendApHomeWifiPassword(rowWifi.Text, btnPsw.Text); + if (result == false) + { + //瀵嗙爜鍙戦�佸け璐� + this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uSendPasswordFail)); + return; + } + + this.CloseForm(); + var form = new MiniGatewayDirection3Form(); + form.AddForm(); + }; + } + + #endregion + + #region 鈻� 鐣岄潰鍏抽棴___________________________ + + /// <summary> + /// 鐣岄潰鍏抽棴 + /// </summary> + public override void CloseFormBefore() + { + //鍏抽棴Tcp閾炬帴 + HdlWifiLogic.Current.CloseApTcpConnection(); + + base.CloseFormBefore(); + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs index 0e493af..3b4222c 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs @@ -42,7 +42,7 @@ this.ClearBodyFrame(); var listView = new VerticalListControl(29); - listView.Height = Application.GetRealHeight(340); + listView.Height = bodyFrameLayout.Height; listView.BackgroundColor = UserCenterColor.Current.White; bodyFrameLayout.AddChidren(listView); @@ -74,6 +74,7 @@ var btntext2 = row2.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uWirelessGateway), 500); btntext2.TextSize = 15; row2.AddRightArrow(); + row2.AddBottomLine(); row2.ButtonClickEvent += (sender, e) => { //妫�娴嬩綇瀹呯粡绾害 @@ -97,6 +98,26 @@ }); }; + //Mini缃戝叧 + var row3 = new FrameRowControl(listView.rowSpace / 2); + listView.AddChidren(row3); + var btnIcon3 = row3.AddLeftIcon(81); + btnIcon3.UnSelectedImagePath = "Gateway/MiniGateway.png"; + var btntext3 = row3.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uMiniGateway), 500); + btntext3.TextSize = 15; + row3.AddRightArrow(); + row3.ButtonClickEvent += (sender, e) => + { + //妫�娴嬩綇瀹呯粡绾害 + if (this.CheckResidencePoint() == false) + { + return; + } + var form = new MiniGatewayDirection1Form(); + form.AddForm(); + }; + listView.AdjustRealHeight(Application.GetRealHeight(23)); + //濡傛灉杩樻病鏈夎缃湴鐞嗕綅缃� if (Common.Config.Instance.Home.Latitude == 0 && Common.Config.Instance.Home.Longitude == 0) { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs index 4bbb6c1..db710c9 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs @@ -118,6 +118,39 @@ //鍒掔嚎 btnBeloneArea.AddBottomLine(); + //mini缃戝叧鏈変釜鍔熻兘璁剧疆 + if (this.zbGateway.getGwInfo != null && this.zbGateway.getGwInfo.LinuxImageType == 11) + { + var listDevice = Common.LocalDevice.Current.GetDeviceByGatewayID(HdlGatewayLogic.Current.GetGatewayId(this.zbGateway)); + CommonDevice miniDevice = null; + foreach (var device in listDevice) + { + //鑾峰彇杩欎釜缃戝叧涓嬬殑灏忓鐏澶� + if (Common.LocalDevice.Current.IsMiniLight(device) == true) + { + miniDevice = device; + break; + } + } + //濡傛灉鎵惧緱鍒扮殑璇� + if (miniDevice != null) + { + //鍔熻兘璁剧疆 + var rowFunction = new RowLayoutControl(listview.rowSpace / 2); + listview.AddChidren(rowFunction); + rowFunction.frameTable.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFunctionSettingUp), 700); + //鍙冲浘鏍� + rowFunction.frameTable.AddRightArrow(); + //搴曠嚎 + rowFunction.frameTable.AddBottomLine(); + rowFunction.frameTable.ButtonClickEvent += (sender, e) => + { + var form = new DeviceLight.MiniNightLightFunctionSettionForm(); + form.AddForm(miniDevice); + }; + } + } + //鏁版嵁涓婁紶涓庝笅杞� var rowData = new RowLayoutControl(listview.rowSpace / 2); listview.AddChidren(rowData); diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs index 3ac8791..8ab794a 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs @@ -340,7 +340,7 @@ return; } bool online = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(way); - this.GatewayOnlinePush(way, online); + this.GatewayOnlinePush(way, online, true); } //缃戝叧鏂扮増鏈娴� this.CheckGatewayNewVersion(listway); @@ -352,7 +352,8 @@ /// </summary> /// <param name="gateWay">缃戝叧瀵硅薄</param> /// <param name="online">鍦ㄧ嚎鐘舵�佸彉鏇村悗鐨勭姸鎬�</param> - public override void GatewayOnlinePush(ZbGateway gateWay, bool online) + /// <param name="hadGwOnline">2020.05.25杩藉姞:姝や綇瀹呮槸鍚︽嫢鏈夌綉鍏冲湪绾�</param> + public override void GatewayOnlinePush(ZbGateway gateWay, bool online, bool hadGwOnline) { Application.RunOnMainThread(() => { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs index 1ce3a11..d19b1ff 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs @@ -56,11 +56,32 @@ framePic.Gravity = Gravity.CenterHorizontal; framePic.Y = Application.GetRealHeight(58); listBackControl.frameTable.AddChidren(framePic); + + var imageFile = "Gateway/RealGateway" + this.zbGateway.getGwInfo.LinuxImageType + ".png"; + string fullName = IO.FileUtils.GetImageFilePath(imageFile); + if (fullName == string.Empty) + { + //濡傛灉娌℃湁鎸囧畾鐨勭綉鍏崇殑鐪熷疄鍥剧墖鐨勮瘽,鍒欑敤鍏遍�氬浘鐗� + imageFile = "Gateway/RealGateway.png"; + + } +#if Android + //璁惧鍥剧墖 + var bim = Android.Graphics.BitmapFactory.DecodeFile(fullName); + var btnpictrue = new PicViewControl(bim.Width, bim.Height); +#endif +#if iOS + //璁惧鍥剧墖 + var bim = UIKit.UIImage.FromFile(fullName); + var btnpictrue = new PicViewControl((int)bim.Size.Width, (int)bim.Size.Height); +#endif + bim.Dispose(); + bim = null; + //鍥剧墖 - var btnImage = new PicViewControl(380, 328, true); - btnImage.Gravity = Gravity.Center; - btnImage.UnSelectedImagePath = "Gateway/RealGateway.png"; - framePic.AddChidren(btnImage); + btnpictrue.Gravity = Gravity.Center; + btnpictrue.UnSelectedImagePath = imageFile; + framePic.AddChidren(btnpictrue); //鍒濆鍖栨甯� var tableContr = new InformationEditorControl(); @@ -101,15 +122,14 @@ btnNote.AddBottomLine(); } - //璁惧绫诲瀷 + //璁惧绫诲瀷 (鍥哄畾鏅鸿兘缃戝叧) caption = Language.StringByID(R.MyInternationalizationString.uDeviceType); - var btnType = new FrameCaptionViewControl(caption, string.Empty, listview.rowSpace / 2); + var btnType = new FrameCaptionViewControl(caption, Language.StringByID(60004), listview.rowSpace / 2); btnType.UseClickStatu = false; listview.AddChidren(btnType); btnType.InitControl(); //鍒掔嚎 btnType.AddBottomLine(); - HdlGatewayLogic.Current.SetGatewayImageText(btnType.txtView, zbGateway); //瀹夎浣嶇疆 var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2); diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs index ea88189..29cb8ff 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewEmailForm.cs @@ -116,6 +116,9 @@ btnOk.CanClick = false; btnOk.ButtonClickEvent += (sender, e) => { + //娓呯┖杈撳叆鐨勫�� + btnCodeControl.ClearInputValue(); + this.btnErrorMsg.Visible = false; //妫�娴嬮偖绠辩殑鍦板潃 if (this.CheckEmail(txtValue.Text.Trim()) == false) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs index c55a48d..f1ae8d1 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckNewPhoneForm.cs @@ -135,6 +135,9 @@ btnOk.CanClick = false; btnOk.ButtonClickEvent += (sender, e) => { + //娓呯┖杈撳叆鐨勫�� + btnCodeControl.ClearInputValue(); + this.btnErrorMsg.Visible = false; string areaCode = btnArea.Text.Substring(1); //妫�娴嬫墜鏈哄彿鐮� diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs index 9b68f32..88a6757 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs @@ -106,6 +106,8 @@ bodyFrameLayout.AddChidren(btnNext); btnNext.ButtonClickEvent += (sender, e) => { + //娓呯┖杈撳叆鐨勫�� + btnCodeControl.ClearInputValue(); //鍙戦�侀獙璇佺爜鍒伴偖绠� this.SendCodeToEmail(btnNext); }; diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs index 6986653..c7230fe 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldPhoneForm.cs @@ -119,6 +119,8 @@ bodyFrameLayout.AddChidren(btnNext); btnNext.ButtonClickEvent += (sender, e) => { + //娓呯┖杈撳叆鐨勫�� + btnCodeControl.ClearInputValue(); //鍙戦�侀獙璇佺爜鍒版墜鏈� this.SendCodeToPhone(btnNext); }; diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs index 9a4ac4b..a82b06d 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs @@ -47,27 +47,37 @@ frameTop.BackgroundColor = UserCenterColor.Current.White; bodyFrameLayout.AddChidren(frameTop); - var rowFinger = new FrameRowControl(frameTop.rowSpace / 2); - rowFinger.UseClickStatu = false; - frameTop.AddChidren(rowFinger); - //鎸囩汗楠岃瘉 - var btnFinger = rowFinger.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFingerprintAuthentication), 400, 58); - btnFinger.Y = Application.GetRealHeight(12) + rowFinger.chidrenYaxis; - rowFinger.AddChidren(btnFinger, ChidrenBindMode.NotBind); - //浠呭鏈満鏈夋晥 - var btnEffect= rowFinger.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uOnlyEffectToThisPhone), 400, 40); - btnEffect.Y = Application.GetRealHeight(72) + rowFinger.chidrenYaxis; - btnEffect.TextSize = 12; - btnEffect.TextColor = UserCenterColor.Current.TextGrayColor1; - rowFinger.AddChidren(btnEffect, ChidrenBindMode.NotBind); - //寮�鍏虫寜閽� - var btnFingerSwicth = rowFinger.AddMostRightSwitchIcon(); - btnFingerSwicth.IsSelected = UserCenterResourse.AccountOption.FingerprintAuthentication; - //搴曠嚎 - rowFinger.AddBottomLine(); + MostRightIconControl btnFingerSwicth = null; + var touchIDSupper = TouchIDUtils.getTouchIDSupperType(); + if (touchIDSupper == TouchIDUtils.TouchIDSupperType.TouchID) + { + var rowFinger = new FrameRowControl(frameTop.rowSpace / 2); + rowFinger.UseClickStatu = false; + frameTop.AddChidren(rowFinger); + //鎸囩汗楠岃瘉 + var btnFinger = rowFinger.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFingerprintAuthentication), 400, 58); + btnFinger.Y = Application.GetRealHeight(12) + rowFinger.chidrenYaxis; + rowFinger.AddChidren(btnFinger, ChidrenBindMode.NotBind); + //浠呭鏈満鏈夋晥 + var btnEffect = rowFinger.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uOnlyEffectToThisPhone), 400, 40); + btnEffect.Y = Application.GetRealHeight(72) + rowFinger.chidrenYaxis; + btnEffect.TextSize = 12; + btnEffect.TextColor = UserCenterColor.Current.TextGrayColor1; + rowFinger.AddChidren(btnEffect, ChidrenBindMode.NotBind); + //寮�鍏虫寜閽� + btnFingerSwicth = rowFinger.AddMostRightSwitchIcon(); + btnFingerSwicth.IsSelected = UserCenterResourse.AccountOption.FingerprintAuthentication; + //搴曠嚎 + rowFinger.AddBottomLine(); + } var rowPsw = new FrameRowControl(frameTop.rowSpace / 2); frameTop.AddChidren(rowPsw); + //濡傛灉杩欎釜鎵嬫満涓嶆敮鎸乀ouchId鐨勮瘽,鍒欏鍣ㄥ噺鍘昏繖涓鐨勯珮搴� + if (touchIDSupper != TouchIDUtils.TouchIDSupperType.TouchID) + { + frameTop.Height -= rowPsw.Height; + } //瀵嗙爜楠岃瘉 rowPsw.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uPasswordAuthentication), 400); //鍙崇澶� @@ -158,40 +168,43 @@ btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor2; //鎸囩汗楠岃瘉 - btnFingerSwicth.ButtonClickEvent += (sender, e) => + if (btnFingerSwicth != null) { - if (btnFingerSwicth.IsSelected == false) + btnFingerSwicth.ButtonClickEvent += (sender, e) => { - TouchIDUtils.TouchIDSupperType type = TouchIDUtils.getTouchIDSupperType(); - if (type == TouchIDUtils.TouchIDSupperType.None) + if (btnFingerSwicth.IsSelected == false) { - //寮�鍚寚绾归獙璇佸け璐ワ紒璇峰墠寰�鎵嬫満{0}璁剧疆寮�鍚寚绾瑰紑閿侀獙璇� - string msg = Language.StringByID(R.MyInternationalizationString.uUseFingerprintAuthenticationFailMsg); - msg = msg.Replace("{0}", "\r\n"); - this.ShowMassage(ShowMsgType.Normal, msg); - return; + TouchIDUtils.TouchIDSupperType type = TouchIDUtils.getTouchIDSupperType(); + if (type == TouchIDUtils.TouchIDSupperType.None) + { + //寮�鍚寚绾归獙璇佸け璐ワ紒璇峰墠寰�鎵嬫満{0}璁剧疆寮�鍚寚绾瑰紑閿侀獙璇� + string msg = Language.StringByID(R.MyInternationalizationString.uUseFingerprintAuthenticationFailMsg); + msg = msg.Replace("{0}", "\r\n"); + this.ShowMassage(ShowMsgType.Normal, msg); + return; + } + //灏員ouch ID鐢ㄤ簬銆孼igBee銆峽0}鏇存敼瀹夐槻璁剧疆鍜屽紑鍚棬閿佹椂浣跨敤 + string msg2 = Language.StringByID(R.MyInternationalizationString.uUseFingerprintAuthenticationMsg); + msg2 = msg2.Replace("{0}", "\r\n"); + this.ShowMassage(ShowMsgType.Confirm, msg2, () => + { + //濡傛灉璁剧疆鏈夊畨鍏ㄩ獙璇�,鎯宠淇敼瀹�,蹇呴』鍏堥�氳繃瀹夊叏楠岃瘉 + //濡傛灉娌℃湁璁剧疆鏈夊畨鍏ㄩ獙璇�,鍒欐棤闇�楠岃瘉 + HdlCheckLogic.Current.CheckSecondarySecurity( + () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); },//澶勭悊鎸囩汗楠岃瘉 + () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); });//澶勭悊鎸囩汗楠岃瘉 + }); } - //灏員ouch ID鐢ㄤ簬銆孼igBee銆峽0}鏇存敼瀹夐槻璁剧疆鍜屽紑鍚棬閿佹椂浣跨敤 - string msg2 = Language.StringByID(R.MyInternationalizationString.uUseFingerprintAuthenticationMsg); - msg2 = msg2.Replace("{0}", "\r\n"); - this.ShowMassage(ShowMsgType.Confirm, msg2, () => + else { //濡傛灉璁剧疆鏈夊畨鍏ㄩ獙璇�,鎯宠淇敼瀹�,蹇呴』鍏堥�氳繃瀹夊叏楠岃瘉 //濡傛灉娌℃湁璁剧疆鏈夊畨鍏ㄩ獙璇�,鍒欐棤闇�楠岃瘉 HdlCheckLogic.Current.CheckSecondarySecurity( - () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); },//澶勭悊鎸囩汗楠岃瘉 - () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); });//澶勭悊鎸囩汗楠岃瘉 - }); - } - else - { - //濡傛灉璁剧疆鏈夊畨鍏ㄩ獙璇�,鎯宠淇敼瀹�,蹇呴』鍏堥�氳繃瀹夊叏楠岃瘉 - //濡傛灉娌℃湁璁剧疆鏈夊畨鍏ㄩ獙璇�,鍒欐棤闇�楠岃瘉 - HdlCheckLogic.Current.CheckSecondarySecurity( - () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); },//澶勭悊鎸囩汗楠岃瘉 - () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); });//澶勭悊鎸囩汗楠岃瘉 - } - }; + () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); },//澶勭悊鎸囩汗楠岃瘉 + () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); });//澶勭悊鎸囩汗楠岃瘉 + } + }; + } //瀵嗙爜楠岃瘉 rowPsw.ButtonClickEvent += (sender, e) => { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs index a51af14..881b00b 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs @@ -105,7 +105,8 @@ //鍚嶇ОView rowName.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uName), 350); //鍚嶇О杈撳叆 - var txtName = new TextInputExControl(700, true); + var txtName = new TextInputControl(700, true); + txtName.UseFocusColor = true; txtName.X = bodyFrameLayout.Width - Application.GetRealWidth(700) - ControlCommonResourse.XXLeft; txtName.Gravity = Gravity.CenterVertical; txtName.TextAlignment = TextAlignment.CenterRight; @@ -316,7 +317,7 @@ /// 鏇存柊鐢ㄦ埛鍚� /// </summary> /// <param name="txtName"></param> - private async void SaveUserName(TextInputExControl txtName, bool showMsg) + private async void SaveUserName(TextInputControl txtName, bool showMsg) { if (UserCenterResourse.UserInfo.UserName == string.Empty) { diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs index cda2d6e..43ae483 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs @@ -369,6 +369,11 @@ { //璋冨厜鍣� IconPath = "Device/Light.png"; + if (Shared.Common.LocalDevice.Current.IsMiniLight(this) == true) + { + //mini澶滅伅 + IconPath = "Device/MiniNightLight.png"; + } } else if (this.Type == DeviceType.OnOffOutput) { diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs index a78715a..02bf071 100755 --- a/ZigbeeApp/Shared/R.cs +++ b/ZigbeeApp/Shared/R.cs @@ -602,7 +602,26 @@ /// 涓ラ噸姹℃煋 /// </summary> public const int SeriousPollution = 322; - + /// <summary> + /// 闂ㄩ攣甯稿紑妯″紡宸插叧 + /// </summary> + public const int NormallyClosed = 323; + /// <summary> + /// 鍏ョ綉 + /// </summary> + public const int Connection = 324; + /// <summary> + /// 绠�绾﹀鍔熻兘闈㈡澘 -> 鎵撳紑闈㈡澘涓昏彍鍗曪紝鍙充笂瑙掔偣鍑粄0}璁剧疆鎸夐挳锛岀偣鍑诲叆缃� + /// </summary> + public const int AddSimpleMultifunctionMsg = 325; + /// <summary> + /// 绠�绾︾幆澧冮潰鏉� -> 闀挎寜鈥滃紑鍏斥�濇寜閿�5绉掞紝鎵�鏈夌伅姣忚繘琛寋0}2娆′寒鏆楀垏鎹紝鍗冲叆缃戞垚鍔� + /// </summary> + public const int AddSimpleEnvironmentMsg = 326; + /// <summary> + /// 闀挎寜鈥滃紑鍏斥�濇寜閿�5绉� + /// </summary> + public const int LongPressButtonSwitch = 327; public readonly static int cancel = 5097; public readonly static int confrim = 5098; @@ -882,6 +901,7 @@ public readonly static int timeSensitive = 5402; public readonly static int executeSone = 5403; public readonly static int hour1 = 5404; + public readonly static int mi = 5405; @@ -5252,7 +5272,7 @@ /// </summary> public const int uSendPasswordFail = 15980; /// <summary> - /// 閫夋嫨hdlZigbeeGW-xxxx缃戠粶 + /// 璇烽�夋嫨hdlZigbeeGW-xxxx缃戠粶 /// </summary> public const int uPleaseSelectGatewayXXNet = 15981; /// <summary> @@ -5815,6 +5835,38 @@ /// 璇疯緭鍏ユ偍鐨勮仈绯绘柟寮� /// </summary> public const int uPleaseInputYourContactInformation = 16121; + /// <summary> + /// 璇ュ唴瀹逛笉鑳界渷鐣� + /// </summary> + public const int uThisContentCanNotOmitted = 16122; + /// <summary> + /// Mini缃戝叧 + /// </summary> + public const int uMiniGateway = 16123; + /// <summary> + /// 娣诲姞Mini缃戝叧 + /// </summary> + public const int uAddMiniGateway = 16124; + /// <summary> + /// 鎻掔數鍚�,闀挎寜缃戝叧HID/WCFG鎸夐敭5绉抺0}绯荤粺鐏父浜�60绉掑悗鍒欒繘鍏ラ厤缃戠姸鎬� + /// </summary> + public const int uAddMiniGatewayMsg1 = 16125; + /// <summary> + /// 璇烽�夋嫨widora-xxxx缃戠粶 + /// </summary> + public const int uPleaseSelectWidoraXXNet = 16126; + /// <summary> + /// 鎵嬫満鍘昏缃繛鎺ョ綉鍏崇儹鐐箋0}閫夋嫨widora-xxxx缃戠粶 + /// </summary> + public const int uAddMiniGatewayMsg2 = 16127; + /// <summary> + /// 鑹叉俯 + /// </summary> + public const int uColorTemperature = 16128; + /// <summary> + /// Mini澶滅伅 + /// </summary> + public const int uMiniNightLight = 16129; //鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽� @@ -6216,8 +6268,20 @@ /// <summary> /// 闀滃儚ID涓�1307鐨勮澶囩殑榛樿鍚嶅瓧锛歅M2.5绌烘皵璐ㄩ噺浼犳劅鍣� /// </summary> - public const int uDeviceModelId1307 = 30040; - + public const int uDeviceModelId1307 = 30040; + /// <summary> + /// 闀滃儚ID涓�212鐨勮澶囩殑榛樿鍚嶅瓧锛氱畝绾﹀鍔熻兘闈㈡澘 + /// </summary> + public const int uDeviceModelId212 = 30041; + /// <summary> + /// 闀滃儚ID涓�230鐨勮澶囩殑榛樿鍚嶅瓧锛氱畝绾︾幆澧冮潰鏉� + /// </summary> + public const int uDeviceModelId230 = 30042; + /// <summary> + /// 闀滃儚ID涓�11鐨勮澶囩殑瀹樻柟鍚嶅瓧锛歁ini缃戝叧 + /// </summary> + public const int uDeviceModelId11 = 30043; + //鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄澶囨墍灞炵绫荤殑缈昏瘧鍚嶅瓧,浠�40000寮�濮嬧槄鈽呪槄鈽� /// <summary> /// 鑷畾涔夎澶囨墍灞濱D涓�100鐨勭炕璇戝悕瀛楋細閬槼 @@ -6412,5 +6476,14 @@ /// PM2.5绌烘皵璐ㄩ噺浼犳劅鍣� /// </summary> public const int uDeviceDirectionName27 = 70026; + /// <summary> + /// 绠�绾﹀鍔熻兘闈㈡澘 + /// </summary> + public const int uDeviceDirectionName28 = 70027; + /// <summary> + /// 绠�绾︾幆澧冮潰鏉� + /// </summary> + public const int uDeviceDirectionName29 = 70028; + } } diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems index f6b91c0..9e3fd2c 100755 --- a/ZigbeeApp/Shared/Shared.projitems +++ b/ZigbeeApp/Shared/Shared.projitems @@ -97,6 +97,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceColorLightDetailCardForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceCurtainDetailCardForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceFreshAirDetailCardForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceMiniLightDetailCardForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DevicePmSensorDetailCardForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceRelayDetailCardForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\DeviceFreshAirCardControl.cs" /> @@ -130,6 +131,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\ClickButtonControls\BottomRightClickButton.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\BelongAreaControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\ProgressFormBar.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\ProgressRowBar.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\PswGestureInputControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\InformationEditorControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\RoomDeviceGroupMenuControl.cs" /> @@ -138,6 +140,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\TopRightFloorMenuControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\VerificationCodeControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\DeviceControls\DeviceSimpleSelectControl.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\FrameLayoutControls\NormalFrameLayout.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\ListViewLayoutControls\VerticalFrameRefreshControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\ListViewLayoutControls\VerticalListRefreshControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\NormalControls\IconBigViewControl.cs" /> @@ -190,6 +193,8 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\PanelFangyueFreshAirDirectionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\PanelFangyueFreshAirModulDirectionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\PanelFangyueTwoButtonDirectionForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\PanelSimpleEnvironmentDirectionForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\PanelSimpleMultifunctionDirectionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\RepeaterZigbeeDirectionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorCarbonMonoxideDirectionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorCeilingGasDirectionForm.cs" /> @@ -200,6 +205,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorPMTwoPointFiveForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorTemperatureHumidityForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorWaterDirectionForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Light\MiniNightLightFunctionSettionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelBackLighWithSensorForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueButtonSettionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueEnvironmentButtonSettionForm.cs" /> @@ -209,6 +215,9 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueFreshAirButtonSettionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueFreshAirTargetsForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueFunctionSettionForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelSimpleEnvironmentTargetsForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelSimpleMutilfunctionBindSensorForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelSimpleMutilfunctionTargetsForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\PirSensor\PirSensorDimmingModeForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\PirSensor\PirSensorTargetSelectForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\PirSensor\PirSensorWorkModeMenuForm.cs" /> @@ -229,6 +238,11 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UserDoorLockPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UserManagement.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\AddGatewayHelpForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\MiniGatewayDirection1Form.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\MiniGatewayDirection2Form.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\MiniGatewayDirection3Form.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\MiniGatewaySearchForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\MiniGatewaySelectNetworkForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\WirelessApDirection1Form.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\WirelessApDirection2Form.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\WirelessApDirection3Form.cs" /> @@ -312,7 +326,6 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\SceneControls\SceneRoomControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\SceneControls\SceneSimpleSelectControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\TextInputControls\TextInputControl.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\TextInputControls\TextInputExControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\TopRightMenuControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\DeviceGeneralInformationForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\PanelFourButtonDirectionForm.cs" /> -- Gitblit v1.8.0