From ddb46a700775aacfb6cc82d9586302a38c8fa0a7 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期一, 23 十二月 2019 09:13:37 +0800 Subject: [PATCH] 2019.12.23 --- ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png | 0 ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs | 269 +++++++--- ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionForWinRow.cs | 2 ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs | 19 ZigbeeApp/GateWay.Droid/Assets/Language.ini | 3 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png | 0 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png | 0 ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionRow.cs | 2 ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs | 8 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png | 0 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png | 0 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29.png | 0 ZigbeeApp/Shared/R.cs | 8 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40.png | 0 ZigbeeApp/Shared/Phone/Device/Category/Category.cs | 7 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76.png | 0 ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithPickViewRow.cs | 16 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png | 0 ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs | 7 ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide | 0 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png | 0 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png | 0 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png | 0 ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs | 46 + ZigbeeApp/Shared/Phone/Device/CommonForm/SelectSceneRow.cs | 1 ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs | 2 ZigbeeApp/Shared/Common/Device.cs | 351 +++++++++++--- ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Next.png | 0 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png | 0 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png | 0 ZigbeeApp/Shared/Phone/Device/Category/SelectScene.cs | 27 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/Contents.json | 368 ++++---------- ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionRow.cs | 4 ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs | 246 +++++---- ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml | 39 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png | 0 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-1024.png | 0 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png | 0 ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png | 0 /dev/null | 0 ZigbeeApp/Shared/Phone/Device/CommonForm/SelectSceneStatuRow.cs | 5 ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs | 4 ZigbeeApp/Shared/Phone/Device/CommonForm/CompleteButton.cs | 2 43 files changed, 839 insertions(+), 597 deletions(-) diff --git a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml index 6965d09..d3b4c74 100644 --- a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml +++ b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml @@ -1,17 +1,17 @@ 锘�<Properties StartupConfiguration="{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}|Default"> - <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.M7BBB18B19152766" /> + <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.SelectDevice" /> <MonoDevelop.Ide.ItemProperties.GateWay.Ios automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.8c0bdb303f25d82c2a42fb8bfca449bfaca00260" /> <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.M7BBB18B19152766" /> - <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Common/Device.cs"> + <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Room/UnallocatedRoom.cs"> <Files> - <File FileName="Shared/R.cs" Line="761" Column="56" /> + <File FileName="Shared/R.cs" Line="957" Column="43" /> <File FileName="GateWay.Droid/Assets/Language.ini" /> - <File FileName="Shared/Phone/Device/Category/Category.cs" Line="1672" Column="22" /> - <File FileName="Shared/Phone/Device/Room/UnallocatedRoom.cs" Line="359" Column="30" /> - <File FileName="Shared/Phone/UserView/UserHomeView.cs" Line="1" Column="1" /> - <File FileName="Shared/Phone/Device/CommonForm/SelectFunctionView.cs" Line="41" Column="21" /> - <File FileName="Shared/Common/Device.cs" Line="2284" Column="33" /> - <File FileName="Shared/Phone/Device/CommonForm/FunctionButton.cs" Line="87" Column="32" /> + <File FileName="Shared/Phone/Device/Category/Category.cs" /> + <File FileName="Shared/Phone/Device/Category/SelectDevice.cs" /> + <File FileName="Shared/Phone/Device/Room/UnallocatedRoom.cs" Line="697" Column="1" /> + <File FileName="Shared/Common/Device.cs" /> + <File FileName="Shared/Phone/UserView/UserHomeView.cs" /> + <File FileName="Shared/Phone/Device/Category/CategoryAddScene.cs" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -20,21 +20,28 @@ <Node name="GateWay.Droid" expanded="True"> <Node name="Assets" expanded="True"> <Node name="Phone" expanded="True"> - <Node name="Logo" expanded="True" /> + <Node name="Item" expanded="True" /> </Node> </Node> </Node> + <Node name="Home.IOS" expanded="True" /> <Node name="Shared" expanded="True"> - <Node name="Common" expanded="True"> - <Node name="Device.cs" selected="True" /> - </Node> + <Node name="Common" expanded="True" /> <Node name="Phone" expanded="True"> <Node name="Device" expanded="True"> <Node name="Category" expanded="True" /> <Node name="CommonForm" expanded="True" /> - <Node name="Room" expanded="True" /> + <Node name="Room" expanded="True"> + <Node name="UnallocatedRoom.cs" selected="True" /> + </Node> + </Node> + <Node name="UserCenter" expanded="True"> + <Node name="Password" expanded="True" /> </Node> <Node name="UserView" expanded="True" /> + <Node name="ZigBee" expanded="True"> + <Node name="Device" expanded="True" /> + </Node> </Node> </Node> </Node> @@ -46,9 +53,7 @@ <MonoDevelop.Ide.DebuggingService.PinnedWatches /> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhoneSimulator" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> - <BreakpointStore> - <Breakpoint file="/Users/guoxuecheng/Desktop/HomeApp/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs" relfile="Shared/Phone/UserView/UserHomeView.cs" line="1603" column="1" /> - </BreakpointStore> + <BreakpointStore /> </MonoDevelop.Ide.DebuggingService.Breakpoints> <MultiItemStartupConfigurations /> </Properties> \ No newline at end of file diff --git a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide index 3ea4467..98f8ad0 100644 --- a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide +++ b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini index 828d2ff..d17a646 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini +++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini @@ -708,6 +708,9 @@ 11032=閫夋嫨鍖哄煙 11033=閫夋嫨鍦烘櫙鍥剧墖 11034=纭畾瑕佺Щ闄よ鍔熻兘锛� +11035=娣诲姞鍔熻兘 +11036=娣诲姞寤舵椂 + 12100=鏈煡璁惧 diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Next.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Next.png index 5a7036e..9d94b68 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Next.png +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Next.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/Contents.json b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/Contents.json old mode 100755 new mode 100644 index c8e5caa..728e6c3 --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,252 +1,122 @@ { - "images": [ - { - "filename": "icon-20@2x.png", - "size": "20x20", - "scale": "2x", - "idiom": "iphone" - }, - { - "filename": "icon-20@3x.png", - "size": "20x20", - "scale": "3x", - "idiom": "iphone" - }, - { - "filename": "icon-29@2x.png", - "size": "29x29", - "scale": "2x", - "idiom": "iphone" - }, - { - "filename": "icon-29@3x.png", - "size": "29x29", - "scale": "3x", - "idiom": "iphone" - }, - { - "filename": "icon-40@2x.png", - "size": "40x40", - "scale": "2x", - "idiom": "iphone" - }, - { - "filename": "icon-40@3x.png", - "size": "40x40", - "scale": "3x", - "idiom": "iphone" - }, - { - "filename": "icon-60@2x.png", - "size": "60x60", - "scale": "2x", - "idiom": "iphone" - }, - { - "filename": "icon-60@3x.png", - "size": "60x60", - "scale": "3x", - "idiom": "iphone" - }, - { - "filename": "icon-20-ipad.png", - "size": "20x20", - "scale": "1x", - "idiom": "ipad" - }, - { - "filename": "icon-20@2x-ipad.png", - "size": "20x20", - "scale": "2x", - "idiom": "ipad" - }, - { - "filename": "icon-29-ipad.png", - "size": "29x29", - "scale": "1x", - "idiom": "ipad" - }, - { - "filename": "icon-29@2x-ipad.png", - "size": "29x29", - "scale": "2x", - "idiom": "ipad" - }, - { - "filename": "icon-40.png", - "size": "40x40", - "scale": "1x", - "idiom": "ipad" - }, - { - "filename": "icon-40@2x-1.png", - "size": "40x40", - "scale": "2x", - "idiom": "ipad" - }, - { - "filename": "icon-83.5@2x.png", - "size": "83.5x83.5", - "scale": "2x", - "idiom": "ipad" - }, - { - "filename": "icon-76.png", - "size": "76x76", - "scale": "1x", - "idiom": "ipad" - }, - { - "filename": "icon-76@2x.png", - "size": "76x76", - "scale": "2x", - "idiom": "ipad" - }, - { - "filename": "icon-1024.png", - "size": "1024x1024", - "scale": "1x", - "idiom": "ios-marketing" - }, - { - "size": "60x60", - "scale": "2x", - "idiom": "car" - }, - { - "size": "60x60", - "scale": "3x", - "idiom": "car" - }, - { - "role": "notificationCenter", - "size": "24x24", - "subtype": "38mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "notificationCenter", - "size": "27.5x27.5", - "subtype": "42mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "companionSettings", - "size": "29x29", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "companionSettings", - "size": "29x29", - "scale": "3x", - "idiom": "watch" - }, - { - "role": "appLauncher", - "size": "40x40", - "subtype": "38mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "appLauncher", - "size": "44x44", - "subtype": "40mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "appLauncher", - "size": "50x50", - "subtype": "44mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "quickLook", - "size": "86x86", - "subtype": "38mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "quickLook", - "size": "98x98", - "subtype": "42mm", - "scale": "2x", - "idiom": "watch" - }, - { - "role": "quickLook", - "size": "108x108", - "subtype": "44mm", - "scale": "2x", - "idiom": "watch" - }, - { - "size": "1024x1024", - "scale": "1x", - "idiom": "watch-marketing" - }, - { - "size": "16x16", - "scale": "1x", - "idiom": "mac" - }, - { - "size": "16x16", - "scale": "2x", - "idiom": "mac" - }, - { - "size": "32x32", - "scale": "1x", - "idiom": "mac" - }, - { - "size": "32x32", - "scale": "2x", - "idiom": "mac" - }, - { - "size": "128x128", - "scale": "1x", - "idiom": "mac" - }, - { - "size": "128x128", - "scale": "2x", - "idiom": "mac" - }, - { - "size": "256x256", - "scale": "1x", - "idiom": "mac" - }, - { - "size": "256x256", - "scale": "2x", - "idiom": "mac" - }, - { - "size": "512x512", - "scale": "1x", - "idiom": "mac" - }, - { - "size": "512x512", - "scale": "2x", - "idiom": "mac" + "images": [ + { + "size": "20x20", + "idiom": "iphone", + "filename": "icon-20@2x.png", + "scale": "2x" + }, + { + "size": "20x20", + "idiom": "iphone", + "filename": "icon-20@3x.png", + "scale": "3x" + }, + { + "size": "29x29", + "idiom": "iphone", + "filename": "icon-29.png", + "scale": "1x" + }, + { + "size": "29x29", + "idiom": "iphone", + "filename": "icon-29@2x.png", + "scale": "2x" + }, + { + "size": "29x29", + "idiom": "iphone", + "filename": "icon-29@3x.png", + "scale": "3x" + }, + { + "size": "40x40", + "idiom": "iphone", + "filename": "icon-40@2x.png", + "scale": "2x" + }, + { + "size": "40x40", + "idiom": "iphone", + "filename": "icon-40@3x.png", + "scale": "3x" + }, + { + "size": "60x60", + "idiom": "iphone", + "filename": "icon-60@2x.png", + "scale": "2x" + }, + { + "size": "60x60", + "idiom": "iphone", + "filename": "icon-60@3x.png", + "scale": "3x" + }, + { + "size": "20x20", + "idiom": "ipad", + "filename": "icon-20-ipad.png", + "scale": "1x" + }, + { + "size": "20x20", + "idiom": "ipad", + "filename": "icon-20@2x-ipad.png", + "scale": "2x" + }, + { + "size": "29x29", + "idiom": "ipad", + "filename": "icon-29-ipad.png", + "scale": "1x" + }, + { + "size": "29x29", + "idiom": "ipad", + "filename": "icon-29@2x-ipad.png", + "scale": "2x" + }, + { + "size": "40x40", + "idiom": "ipad", + "filename": "icon-40.png", + "scale": "1x" + }, + { + "size": "40x40", + "idiom": "ipad", + "filename": "icon-40@2x.png", + "scale": "2x" + }, + { + "size": "76x76", + "idiom": "ipad", + "filename": "icon-76.png", + "scale": "1x" + }, + { + "size": "76x76", + "idiom": "ipad", + "filename": "icon-76@2x.png", + "scale": "2x" + }, + { + "size": "83.5x83.5", + "idiom": "ipad", + "filename": "icon-83.5@2x.png", + "scale": "2x" + }, + { + "size": "1024x1024", + "idiom": "ios-marketing", + "filename": "icon-1024.png", + "scale": "1x" + } + ], + "info": { + "version": 1, + "author": "icon.wuruihong.com" } - ], - "info": { - "version": 1, - "author": "xcode" - }, - "properties": { - "pre-rendered": true - } } \ No newline at end of file diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-1024.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-1024.png old mode 100755 new mode 100644 index 731e237..cd71df7 --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-1024.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-1024.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png old mode 100755 new mode 100644 index a070305..7222c6b --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png old mode 100755 new mode 100644 index 0d936a9..dd8484b --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png old mode 100755 new mode 100644 index 81c414d..f1e3ace --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png old mode 100755 new mode 100644 index 1a2b9bc..f369e54 --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png old mode 100755 new mode 100644 index 5ec7082..50e5d52 --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29.png new file mode 100644 index 0000000..1d13130 --- /dev/null +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png old mode 100755 new mode 100644 index 60679d1..1e92c26 --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png old mode 100755 new mode 100644 index e4e59cd..4f727b0 --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png old mode 100755 new mode 100644 index 13da1d2..e4e085e --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40.png old mode 100755 new mode 100644 index 0d936a9..dd8484b --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png deleted file mode 100755 index 3bb92e2..0000000 --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png +++ /dev/null Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png old mode 100755 new mode 100644 index 3bb92e2..b6110a5 --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png old mode 100755 new mode 100644 index 30cc699..39b6b04 --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png old mode 100755 new mode 100644 index 923748e..39b6b04 --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png old mode 100755 new mode 100644 index 131f750..b20e576 --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76.png old mode 100755 new mode 100644 index 2259bd3..ef3ba5f --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png old mode 100755 new mode 100644 index 03ebbfa..7349c28 --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png old mode 100755 new mode 100644 index 9d890c0..c690bdc --- a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png +++ b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png Binary files differ diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs index afae20f..a22b9e3 100644 --- a/ZigbeeApp/Shared/Common/Device.cs +++ b/ZigbeeApp/Shared/Common/Device.cs @@ -72,6 +72,10 @@ /// </summary> private Dictionary<string, string> dicDeviceModelIdChanged = null; /// <summary> + /// 鍥剧墖鍏辨湁(keys:鎸囧畾璁惧鐨勫叿浣撶被鍨� value:鎸囧畾鍏辨湁瀵硅薄鐨勫叿浣撶被鍨�) + /// </summary> + private Dictionary<string, string> dicPictrueShard = null; + /// <summary> /// 鏈湴鎵�鏈夎澶囩殑缂撳瓨(闈炲叕寮�) /// </summary> private Dictionary<string, CommonDevice> dicAllDevice = new Dictionary<string, CommonDevice>(); @@ -107,8 +111,14 @@ List<string> listFile = this.GetAllDeviceFile(); foreach (string file in listFile) { + CommonDevice device = null; //鍙嶅簭鍒楀寲涓烘寚瀹氱殑绫伙紝涓嶇劧鏁版嵁浼氫涪澶辫�屽鑷存棤娉曞己杞� - var device = ZigBee.Device.CommonDevice.CommonDeviceByFilePath(file); + try + { + device = CommonDevice.CommonDeviceByFilePath(file); + } + catch (Exception ex) { HdlLogLogic.Current.WriteLog(ex); } + if (device == null || device.CurrentGateWayId == null) { #if DEBUG @@ -533,6 +543,12 @@ /// <param name="deleteRoom">鏄惁浠庢埧闂村垹闄�</param> public void DeleteMemmoryDevice(CommonDevice device, bool deleteRoom = true) { + if (deleteRoom == true && Room.CurrentRoom != null) + { + //浠庢埧闂翠腑鍒犻櫎 + Room.CurrentRoom.DeleteDevice(device); + } + //鍒犻櫎缂撳瓨 string mainKeys = this.GetDeviceMainKeys(device); lock (dicAllDevice) @@ -582,12 +598,6 @@ } } this.dicOTADevice.Remove(otaKeys); - } - - if (deleteRoom == true && Room.CurrentRoom != null) - { - //浠庢埧闂翠腑鍒犻櫎 - Room.CurrentRoom.DeleteDevice(device); } } @@ -715,11 +725,12 @@ } /// <summary> - /// 鏍规嵁MAC鍦板潃,鑾峰彇鍏ㄩ儴鍥炶矾鐨勮澶囧璞�(宸茬粡鎺掑簭) + /// 鏍规嵁MAC鍦板潃,鑾峰彇鍏ㄩ儴鍥炶矾鐨勮澶囧璞� /// </summary> /// <param name="DeviceAddr">Mac鍦板潃</param> + /// <param name="sort">鏄惁鎺掑簭</param> /// <returns></returns> - public List<CommonDevice> GetDevicesByMac(string DeviceAddr) + public List<CommonDevice> GetDevicesByMac(string DeviceAddr, bool sort = true) { var list = new List<CommonDevice>(); if (dicDeviceEpoint.ContainsKey(DeviceAddr) == false) @@ -734,6 +745,11 @@ list.Add(device); } } + if (sort == false) + { + return list; + } + //鎺掑簭 list.Sort((obj1, obj2) => { @@ -1032,7 +1048,14 @@ { //鑾峰彇瀹冨睘浜庝粈涔堢被鍨嬬殑璁惧 var myDeviceType = this.GetMyDeviceEnumInfo(listdevice); - string strConcrete = Enum.GetName(typeof(DeviceConcreteType), myDeviceType.ConcreteType); + string strConcrete = Enum.GetName(typeof(DeviceConcreteType), myDeviceType.ConcreteType); + + //鍥剧墖鍏辨湁 + if (this.dicPictrueShard.ContainsKey(strConcrete) == true) + { + strConcrete = this.dicPictrueShard[strConcrete]; + } + string strType = strConcrete.Replace("_", string.Empty); //灏嗙被鍨嬭浆涓哄浘鐗囧湴鍧� string imageFilePath = "RealDevice/" + strType + ".png"; @@ -1105,6 +1128,12 @@ { //灏嗗叿浣撶被鍨嬭浆瀛楃涓� string strSpecific = Enum.GetName(typeof(DeviceConcreteType), specificType); + //鍥剧墖鍏辨湁 + if (this.dicPictrueShard.ContainsKey(strSpecific) == true) + { + strSpecific = this.dicPictrueShard[strSpecific]; + } + string strType = strSpecific.Replace("_", string.Empty); //灏嗙被鍨嬭浆涓哄浘鐗囧湴鍧� string imageFilePath = "Device/" + strType + ".png"; @@ -1193,7 +1222,7 @@ return info; } //鑾峰彇绗笁鏂硅澶囩殑銆愯澶囩被鍨嬨�� - return this.GetNotHdlMyDeviceEnumInfo(listdevice); + return this.GetNotHdlMyDeviceEnumInfo(listdevice, false); } /// <summary> @@ -1223,7 +1252,7 @@ else { //鑾峰彇绗笁鏂硅澶囩殑銆愯澶囩被鍨嬨�� - var myDeviceType = this.GetNotHdlMyDeviceEnumInfo(listDevice); + var myDeviceType = this.GetNotHdlMyDeviceEnumInfo(listDevice, false); strName = Language.StringByID(myDeviceType.ConcreteTextId); } if (ApendFalge == true && listDevice[0].DriveCode > 0) @@ -1291,9 +1320,29 @@ /// <summary> /// 鑾峰彇绗笁鏂硅澶囩殑銆愯澶囩被鍨嬨�� /// </summary> - /// <param name="listdevice"></param> + /// <param name="device">璁惧鍥炶矾</param> + /// <param name="margeSensor"> + /// <para>鏄惁灏嗘墍鏈夌被鍨嬬殑浼犳劅鍣ㄩ兘褰掍负銆愪紶鎰熷櫒銆�,</para> + /// <para>false鐨勬椂鍊欙細銆怌oncreteType銆戝拰銆怌oncreteTextId銆戝彲鑳戒細鏈変笉鍚岀殑鍊�</para> + /// <para>true鐨勬椂鍊欙細銆怌oncreteType銆戠粺涓�涓篠ensor,銆怌oncreteTextId銆戠粺涓�涓轰紶鎰熷櫒</para> + /// </param> /// <returns></returns> - public DeviceEnumInfo GetNotHdlMyDeviceEnumInfo(List<CommonDevice> listdevice) + public DeviceEnumInfo GetNotHdlMyDeviceEnumInfo(CommonDevice device, bool margeSensor = true) + { + return this.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice>() { device }, margeSensor); + } + + /// <summary> + /// 鑾峰彇绗笁鏂硅澶囩殑銆愯澶囩被鍨嬨��(涓嶅缓璁娇鐢�) + /// </summary> + /// <param name="listdevice">Mac閮戒竴鏍风殑璁惧鍒楄〃</param> + /// <param name="margeSensor"> + /// <para>鏄惁灏嗘墍鏈夌被鍨嬬殑浼犳劅鍣ㄩ兘褰掍负銆愪紶鎰熷櫒銆�,</para> + /// <para>false鐨勬椂鍊欙細銆怌oncreteType銆戝拰銆怌oncreteTextId銆戝彲鑳戒細鏈変笉鍚岀殑鍊�</para> + /// <para>true鐨勬椂鍊欙細銆怌oncreteType銆戠粺涓�涓篠ensor,銆怌oncreteTextId銆戠粺涓�涓轰紶鎰熷櫒</para> + /// </param> + /// <returns></returns> + public DeviceEnumInfo GetNotHdlMyDeviceEnumInfo(List<CommonDevice> listdevice, bool margeSensor = true) { var dicType = new Dictionary<DeviceType, CommonDevice>(); foreach (CommonDevice device in listdevice) @@ -1308,9 +1357,18 @@ //1鍖呭惈闈㈡澘鐨勮瘽,褰撻潰鏉垮鐞� if (dicType.ContainsKey(DeviceType.OnOffSwitch) == true) { - info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId200; - info.BeloneType = DeviceBeloneType.A鎸夐敭闈㈡澘; - info.ConcreteType = DeviceConcreteType.ButtonPanel; + if (listdevice.Count > 1) + { + info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId200; + info.BeloneType = DeviceBeloneType.A鎸夐敭闈㈡澘; + info.ConcreteType = DeviceConcreteType.ButtonPanel; + } + else + { + //info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId16; + info.BeloneType = DeviceBeloneType.A骞叉帴鐐�; + info.ConcreteType = DeviceConcreteType.DryContact; + } } //3鍖呭惈绐楀笜鐨勮瘽,褰撶獥甯樺鐞� else if (dicType.ContainsKey(DeviceType.WindowCoveringDevice) == true) @@ -1322,16 +1380,56 @@ //4绌烘皵寮�鍏� else if (dicType.ContainsKey(DeviceType.AirSwitch) == true) { + //榛樿鍊� info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId4100; - info.BeloneType = DeviceBeloneType.A绌烘皵寮�鍏�; + info.BeloneType = DeviceBeloneType.A鏅鸿兘绌哄紑; info.ConcreteType = DeviceConcreteType.AirSwitch; + + if (dicType[DeviceType.AirSwitch].DfunctionType == DeviceFunctionType.A寮�鍏�) + { + //info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId13; + info.BeloneType = DeviceBeloneType.A寮�鍏�; + info.ConcreteType = DeviceConcreteType.Switch; + } + else if (dicType[DeviceType.AirSwitch].DfunctionType == DeviceFunctionType.A鎻掑骇) + { + //info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId14; + info.BeloneType = DeviceBeloneType.A鎻掑骇; + info.ConcreteType = DeviceConcreteType.Socket1; + } + else if (dicType[DeviceType.AirSwitch].DfunctionType == DeviceFunctionType.A鐏厜) + { + //info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId15; + info.BeloneType = DeviceBeloneType.A鐏厜; + info.ConcreteType = DeviceConcreteType.Light; + } } //5缁х數鍣� else if (dicType.ContainsKey(DeviceType.OnOffOutput) == true) { + //榛樿鍊� info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId2300; info.BeloneType = DeviceBeloneType.A缁х數鍣�; info.ConcreteType = DeviceConcreteType.Relay; + + if (dicType[DeviceType.OnOffOutput].DfunctionType == DeviceFunctionType.A寮�鍏�) + { + //info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId13; + info.BeloneType = DeviceBeloneType.A寮�鍏�; + info.ConcreteType = DeviceConcreteType.Switch; + } + else if (dicType[DeviceType.OnOffOutput].DfunctionType == DeviceFunctionType.A鎻掑骇) + { + //info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId14; + info.BeloneType = DeviceBeloneType.A鎻掑骇; + info.ConcreteType = DeviceConcreteType.Socket1; + } + else if (dicType[DeviceType.OnOffOutput].DfunctionType == DeviceFunctionType.A鐏厜) + { + //info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId15; + info.BeloneType = DeviceBeloneType.A鐏厜; + info.ConcreteType = DeviceConcreteType.Light; + } } //6璋冨厜鍣� else if (dicType.ContainsKey(DeviceType.DimmableLight) == true) @@ -1378,16 +1476,23 @@ //12鍖呭惈浼犳劅鍣ㄧ殑璇�,褰撲紶鎰熷櫒澶勭悊 else if (dicType.ContainsKey(DeviceType.IASZone) == true) { - //璁剧疆浼犳劅鍣ㄥ叿浣撶殑绫诲瀷 info.BeloneType = DeviceBeloneType.A浼犳劅鍣�; - this.SetSensorDeviceSpecificType(ref info, listdevice); + info.ConcreteType = DeviceConcreteType.Sensor; + info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId1200; + if (margeSensor == false) + { + //璁剧疆浼犳劅鍣ㄥ叿浣撶殑绫诲瀷 + this.SetSensorDeviceSpecificType(ref info, listdevice); + } } //13鍖呭惈娓╁害浼犳劅鍣ㄧ殑璇� else if (dicType.ContainsKey(DeviceType.TemperatureSensor) == true) { bool temperatrue = false; bool humidity = false; - foreach (var device in listdevice) + //鑾峰彇鍏ㄩ儴鐨勫洖璺� + var listTemp = this.GetDevicesByMac(listdevice[0].DeviceAddr, false); + foreach (var device in listTemp) { if (device is TemperatureSensor) { @@ -1447,10 +1552,6 @@ /// <param name="listdevice">璁惧瀵硅薄</param> private void SetSensorDeviceSpecificType(ref DeviceEnumInfo info, List<CommonDevice> listdevice) { - //榛樿鍚嶅瓧:浼犳劅鍣� - info.ConcreteType = DeviceConcreteType.Sensor; - info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId1200; - //濡傛灉杩欎釜璁惧鎷ユ湁澶氫釜鍥炶矾鐨勮瘽,鎴戜篃涓嶇煡閬撴�庝箞鍛藉悕,鍙兘缁欎釜榛樿鍚嶅瓧 if (listdevice.Count > 1) { @@ -1639,16 +1740,16 @@ /// <returns></returns> public string AppendVersion(int versionValue) { - //杞负16杩涘埗 - string txt64 = Convert.ToString(versionValue, 16).PadLeft(4, '0'); + //鐩存帴鏄�10杩涘埗 + string txt10 = Convert.ToString(versionValue).PadLeft(4, '0'); //杩欎釜鏄皬鏁扮偣鍓嶉潰鐨勫�� - int value1 = Convert.ToInt32(txt64.Substring(0, 2), 16); + int value1 = Convert.ToInt32(txt10.Substring(0, txt10.Length - 2)); //杩欎釜鏄皬鏁扮偣鍚庨潰鐨勫�� - int value2 = Convert.ToInt32(txt64.Substring(2, 2), 16); + int value2 = Convert.ToInt32(txt10.Substring(txt10.Length - 2, 2)); //Ver. string ver = Language.StringByID(R.MyInternationalizationString.uVersionAbbreviation); - return ver + value1 + "." + value2.ToString().PadLeft(3, '0'); + return ver + value1 + "." + value2.ToString().PadLeft(2, '0'); } /// <summary> @@ -1745,53 +1846,61 @@ int receiveCount = 0; //璁惧鍒楄〃 var listDevice = new List<CommonDevice>(); - + //缃戝叧閲岄潰鏈夊彲鑳戒細鏈夐噸澶嶇殑鍥炶矾 + var listCheck = new HashSet<string>(); Action<string, string> getDeviceAction = (topic, message) => { - try + if (topic == gatewayID + "/" + "DeviceInfoRespon") { - if (topic == gatewayID + "/" + "DeviceInfoRespon") + try { - TimeOut = 0; - var jobject = Newtonsoft.Json.Linq.JObject.Parse(message); - var totalNum = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["TotalNum"].ToString()); - if (totalNum == 0) + lock (listDevice) { - //杩欎釜缃戝叧娌℃湁璁惧 - canBreak = true; - return; - } - if (deviceCount == -1) - { - //璁剧疆闇�瑕佹帴鏀跺灏戜釜璁惧 - deviceCount = totalNum; - } - //璁惧鎺ユ敹鏁� - receiveCount++; + //璁惧鎺ユ敹鏁� + receiveCount++; - var deviceID = (DeviceType)jobject.Value<int>("Device_ID"); - //鏍规嵁璁惧绫诲瀷鍒涘缓璁惧瀵硅薄鐨勫疄渚� - var device = this.NewDeviceObjectByDeviceId(deviceID, jobject, zbGateway); - if (device != null) - { - try + TimeOut = 0; + var jobject = Newtonsoft.Json.Linq.JObject.Parse(message); + var totalNum = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["TotalNum"].ToString()); + if (totalNum == 0) { - //鍥炶皟鍑芥暟 - deviceComingAction?.Invoke(device); + //杩欎釜缃戝叧娌℃湁璁惧 + canBreak = true; + return; } - //Log鍑哄姏 - catch (Exception ex) { HdlLogLogic.Current.WriteLog(ex); } + if (deviceCount == -1) + { + //璁剧疆闇�瑕佹帴鏀跺灏戜釜璁惧 + deviceCount = totalNum; + } - listDevice.Add(device); - } - if (deviceCount == receiveCount) - { - //璁惧鍏ㄩ儴鎺ユ敹瀹屾垚 - canBreak = true; + var deviceID = (DeviceType)jobject.Value<int>("Device_ID"); + //鏍规嵁璁惧绫诲瀷鍒涘缓璁惧瀵硅薄鐨勫疄渚� + var device = this.NewDeviceObjectByDeviceId(deviceID, jobject, zbGateway); + if (device != null) + { + string mainkeys = this.GetDeviceMainKeys(device); + //缃戝叧閲岄潰鏈夊彲鑳戒細鏈夐噸澶嶇殑鍥炶矾 + if (listCheck.Contains(mainkeys) == false) + { + //鍥炶皟鍑芥暟 + deviceComingAction?.Invoke(device); + listDevice.Add(device); + + listCheck.Add(mainkeys); + } + } } } + //Log鍑哄姏 + catch (Exception ex) { HdlLogLogic.Current.WriteLog(ex); } + + if (receiveCount == deviceCount && deviceCount != -1) + { + //璁惧鍏ㄩ儴鎺ユ敹瀹屾垚 + canBreak = true; + } } - catch { } }; realWay.Actions += getDeviceAction; @@ -2027,6 +2136,14 @@ //瀹氫箟瑙勫垯锛氭ā鍧桰D(宸茬炕璇�)=璁惧鍏蜂綋绫诲瀷鍊�-璁惧鎵�灞炵被鍨嬪��(鑷畾涔夌殑鍊�,鍢�,鍙涓嶉噸澶嶅氨鍙互) //绗竴涓�兼槸:DeviceConcreteType 绗簩涓�兼槸:DeviceBeloneType + //********************************************************************* + //鏂拌澶囨坊鍔犳柟娉曪細 + //1銆佸湪杩欓噷濉啓涓婃ā鍧桰D锛岀劧鍚庢槸 DeviceConcreteType 锛岀劧鍚庢槸 DeviceBeloneType + //2銆佺劧鍚庡湪鏈�涓嬮潰娣诲姞銆愯澶囩殑鍏蜂綋绫诲瀷銆戯紝銆愯澶囩殑鎵�灞炵被鍨嬨�� + //3銆佸凡璁惧鐨勫叿浣撶被鍨嬩负鍚嶅瓧(鍘绘帀銆�-銆�)娣诲姞璁惧鐨勩�愭墍灞炲浘鐗囥�戯紝銆愮湡瀹炵墿鐞嗗浘鐗囥�戙�傚洖璺浘鐗囬渶瑕佺壒娈婂鐞� + //4銆佹坊鍔燫鏂囦欢,娣诲姞Language鏂囦欢 + //********************************************************************* + //=========鈽呪槄寮�鍚堝笜绫�(100-199)鈽呪槄========= this.dicDeviceModelIdEnum["MWM65B-ZB.20"] = "100-100";//鏅鸿兘寮�鍚堝笜鐢垫満 this.dicDeviceModelIdEnum["MVSM35B-ZB.20"] = "101-100";//鏅鸿兘绠$姸鐢垫満 @@ -2037,6 +2154,9 @@ this.dicDeviceModelIdEnum["MPT2/R2-ZB.18"] = "202-200";//2鎸夐敭瑙︽懜闈㈡澘 this.dicDeviceModelIdEnum["MPT1/R1-ZB.18"] = "203-200";//12鎸夐敭瑙︽懜闈㈡澘 this.dicDeviceModelIdEnum["MPT4-ZB.18"] = "210-200";//4鎸夐敭瑙︽懜闈㈡澘(鍙甫鐢垫簮搴曞骇) + this.dicDeviceModelIdEnum["MPT4R4L/S-ZB1.8"] = "220-200";//绠�绾�4鎸夐敭闈㈡澘 + this.dicDeviceModelIdEnum["MPT3R3L/S-ZB1.8"] = "221-200";//绠�绾�3鎸夐敭闈㈡澘 + this.dicDeviceModelIdEnum["MPT2R2L/S-ZB1.8"] = "222-200";//绠�绾�2鎸夐敭闈㈡澘 //=========鈽呪槄PIR浼犳劅鍣ㄧ被(1200-1299)鈽呪槄========= this.dicDeviceModelIdEnum["MSPIR01-ZB.10"] = "1200-1200";//pir浼犳劅鍣�220 @@ -2071,7 +2191,7 @@ this.dicDeviceModelIdEnum["MBUS/GW-ZB.10"] = "4200-4200";//zigbee杞琤uspro鍗忚杞崲鍣� this.dicDeviceModelIdEnum["M485/GW-ZB.10"] = "4201-4200";//zigbee杞�485鍗忚杞崲鍣� - //闇�瑕佷氦鎹㈢殑妯″潡ID + //鉁┾湬鉁┾湬鉁╅渶瑕佷氦鎹㈢殑妯″潡ID鉁┾湬鉁┾湬鉁� this.dicDeviceModelIdChanged = new Dictionary<string, string>(); //=========鈽呪槄瀹夐槻绫讳紶鎰熷櫒绫烩槄鈽�========= this.dicDeviceModelIdChanged["MULTI-GASE--EA07"] = "MSG01/M-ZB.10";//鐕冩皵浼犳劅鍣� @@ -2080,6 +2200,12 @@ this.dicDeviceModelIdChanged["MULTI-MOTI--EA04"] = "MSPIR01/M-ZB.10";//绾㈠浼犳劅鍣� this.dicDeviceModelIdChanged["MULTI-WATE--EA02"] = "MSW01/M-ZB.10";//姘存蹈浼犳劅鍣� this.dicDeviceModelIdChanged["MULTI-BURO--EA06"] = "MBU01/M-ZB.10";//绱ф�ユ寜閿� + + //鉁┾湬鉁┾湬鉁╅渶瑕佸叡鏈夌殑鍥剧墖瀵硅薄鉁┾湬鉁┾湬鉁� + this.dicPictrueShard = new Dictionary<string, string>(); + this.dicPictrueShard["ButtonPanel_SimpleFour"] = "ButtonPanel_Four";//绠�绾�4鎸夐敭闈㈡澘 娌跨敤 4鎸夐敭鐨勫浘鏍� + this.dicPictrueShard["ButtonPanel_SimpleThree"] = "ButtonPanel_Three";//绠�绾�3鎸夐敭闈㈡澘 娌跨敤 3鎸夐敭鐨勫浘鏍� + this.dicPictrueShard["ButtonPanel_SimpleTwo"] = "ButtonPanel_Two";//绠�绾�2鎸夐敭闈㈡澘 娌跨敤 2鎸夐敭鐨勫浘鏍� } #endregion @@ -2139,6 +2265,18 @@ /// 4鎸夐敭澶氬姛鑳借Е鎽搁潰鏉匡紙鍙甫鐢垫簮搴曞骇锛� 闀滃儚id锛�210 /// </summary> ButtonPanel_FourNotPower = 210, + /// <summary> + /// 绠�绾�4鎸夐敭闈㈡澘 闀滃儚id锛�220 + /// </summary> + ButtonPanel_SimpleFour = 220, + /// <summary> + /// 绠�绾�3鎸夐敭闈㈡澘 闀滃儚id锛�221 + /// </summary> + ButtonPanel_SimpleThree = 221, + /// <summary> + /// 绠�绾�2鎸夐敭闈㈡澘 闀滃儚id锛�222 + /// </summary> + ButtonPanel_SimpleTwo = 222, //=========鈽呪槄PIR浼犳劅鍣ㄧ被(1200-1299)鈽呪槄========= /// <summary> @@ -2254,11 +2392,11 @@ //=========鈽呪槄绌烘皵寮�鍏崇被(4100-????)鈽呪槄========= /// <summary> - /// 鏅鸿兘绌烘皵寮�鍏� + /// 鏅鸿兘绌哄紑 /// </summary> AirSwitch = -4100, /// <summary> - /// 寰柇浜戞帶鍒跺櫒 闀滃儚id锛�4100 + /// 鏅鸿兘绌哄紑 闀滃儚id锛�4100 /// </summary> AirSwitch_CloudContr = 4100, @@ -2275,6 +2413,24 @@ /// zigbee杞琤uspro鍗忚杞崲鍣� /// </summary> Converter_ZbBuspro = 4201, + + //=========鈽呪槄鍏朵粬绫�(????-????)鈽呪槄========= + /// <summary> + /// 骞叉帴鐐� + /// </summary> + DryContact = -10000, + /// <summary> + /// 鐏厜(娉ㄦ剰,瀹冭緭鍏ュ叾浠栫被,涓嶆槸璁惧绫诲瀷) + /// </summary> + Light = -10001, + /// <summary> + /// 鎻掑骇 + /// </summary> + Socket1 = -10002, + /// <summary> + /// 寮�鍏� + /// </summary> + Switch = -10003, } /// <summary> @@ -2314,20 +2470,51 @@ /// <summary> /// 绌鸿皟(3600-3899) /// </summary> - A绌鸿皟 = 3600, - /// <summary> /// 涓户鍣�(3900-3999) /// </summary> A涓户鍣� = 3900, - /// <summary> /// 鏅鸿兘绌哄紑(4100-4199) /// </summary> A鏅鸿兘绌哄紑 = 4100, - /// <summary> /// 杞崲鍣�(4200-4699) /// </summary> A杞崲鍣� = 4200, - /// <summary> /// 褰╃伅 /// </summary> A褰╃伅 = 9, - /// <summary> /// 娓╂箍搴︿紶鎰熷櫒 /// </summary> A娓╂箍搴︿紶鎰熷櫒 = 10, - /// <summary> /// 娓╁害浼犳劅鍣� /// </summary> A娓╁害浼犳劅鍣� = 11, - /// <summary> /// 婀垮害浼犳劅鍣� /// </summary> A婀垮害浼犳劅鍣� = 12, - /// <summary> /// 寮�鍏� /// </summary> A寮�鍏� = 13, - /// <summary> /// 鎻掑骇 /// </summary> A鎻掑骇 = 14, - /// <summary> /// 鐏厜 /// </summary> A鐏厜 = 15, - /// <summary> /// 骞叉帴鐐� /// </summary> A骞叉帴鐐� = 16, - A绌烘皵寮�鍏� - + A绌鸿皟 = 3600, + /// <summary> + /// 涓户鍣�(3900-3999) + /// </summary> + A涓户鍣� = 3900, + /// <summary> + /// 鏅鸿兘绌哄紑(4100-4199) + /// </summary> + A鏅鸿兘绌哄紑 = 4100, + /// <summary> + /// 杞崲鍣�(4200-4699) + /// </summary> + A杞崲鍣� = 4200, + /// <summary> + /// 褰╃伅 + /// </summary> + A褰╃伅 = 9, + /// <summary> + /// 娓╂箍搴︿紶鎰熷櫒 + /// </summary> + A娓╂箍搴︿紶鎰熷櫒 = 10, + /// <summary> + /// 娓╁害浼犳劅鍣� + /// </summary> + A娓╁害浼犳劅鍣� = 11, + /// <summary> + /// 婀垮害浼犳劅鍣� + /// </summary> + A婀垮害浼犳劅鍣� = 12, + /// <summary> + /// 寮�鍏� + /// </summary> + A寮�鍏� = 13, + /// <summary> + /// 鎻掑骇 + /// </summary> + A鎻掑骇 = 14, + /// <summary> + /// 鐏厜 + /// </summary> + A鐏厜 = 15, + /// <summary> + /// 骞叉帴鐐� + /// </summary> + A骞叉帴鐐� = 16 } #endregion diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs index bfd2973..9ebea2a 100644 --- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs @@ -911,9 +911,9 @@ deviceListScrolView = new VerticalScrolViewLayout { X = Application.GetRealWidth(CommonFormResouce.X_Left), - Y = Application.GetRealHeight(35+275), + Y = Application.GetRealHeight(35+279), Width = Application.GetRealWidth(1028), - Height = Application.GetRealHeight(939), + Height = Application.GetRealHeight(942), BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; functionSceneBodyView.AddChidren(deviceListScrolView); @@ -1670,7 +1670,6 @@ roomBtn.IsSelected = true; this.curRoom = room; curBtn = roomBtn; - if(sceneBtn.IsSelected) { RefreshScene(room); @@ -1720,8 +1719,8 @@ /// <param name="room"></param> public void RefreshScene(Common.Room room) { + RefreshData(room); functionSceneBodyView.RemoveAll(); - var sceneList = room.SceneUIList; if (sceneList.Count == 0) { ShowNoSceneTip(); diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs index 4e3beee..27134cf 100644 --- a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs @@ -357,7 +357,8 @@ TextID = R.MyInternationalizationString.EditInfo, TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor, TextAlignment = TextAlignment.CenterLeft, - TextSize = 14 + TextSize = 15, + IsBold=true }; infoFL.AddChidren(infoEdit); @@ -404,7 +405,8 @@ TextAlignment = TextAlignment.CenterLeft, TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextID = R.MyInternationalizationString.AddScentTargetAction, - Gravity = Gravity.CenterVertical + Gravity = Gravity.CenterVertical, + TextSize=15 }; addTargetFL.AddChidren(target); @@ -484,24 +486,25 @@ Height = Application.GetRealHeight(450), Width = Application.GetRealWidth(selectRow_Width), Gravity = Gravity.CenterHorizontal, - Radius = (uint)Application.GetRealHeight(17), + Radius = (uint)Application.GetRealHeight(35), BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor }; selectFL.AddChidren(itemFL); - itemFL.Animate = Animate.DownToUp; + //itemFL.Animate = Animate.DownToUp; var selectLocalPicture = new Button() { Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.LocalPicture, - TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + TextSize=17 }; itemFL.AddChidren(selectLocalPicture); var selectLocalLine = new Button() { Y = selectLocalPicture.Bottom, Height = 1, - BackgroundColor = ZigbeeColor.Current.GXCLineColor + BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2 }; itemFL.AddChidren(selectLocalLine); @@ -510,14 +513,15 @@ Y = selectLocalLine.Bottom, Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.Photograph, - TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + TextSize=17 }; itemFL.AddChidren(selectPhotographBtn); var selectPhotographLine = new Button() { Y = selectPhotographBtn.Bottom, Height = 1, - BackgroundColor = ZigbeeColor.Current.GXCLineColor, + BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2, }; itemFL.AddChidren(selectPhotographLine); @@ -526,7 +530,8 @@ Y = selectPhotographLine.Bottom, Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.MyAblums, - TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + TextSize=17 }; itemFL.AddChidren(selectAblumsBtn); @@ -539,7 +544,8 @@ TextID = R.MyInternationalizationString.Cancel, TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor, - Radius = (uint)Application.GetRealHeight(17) + Radius = (uint)Application.GetRealHeight(35), + TextSize=17 }; selectFL.AddChidren(cancelBtn); @@ -700,24 +706,25 @@ Height = Application.GetRealHeight(450), Width = Application.GetRealWidth(selectRow_Width), Gravity=Gravity.CenterHorizontal, - Radius = (uint)Application.GetRealHeight(17), + Radius = (uint)Application.GetRealHeight(35), BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor }; selectFL.AddChidren(itemFL); - itemFL.Animate = Animate.DownToUp; + //itemFL.Animate = Animate.DownToUp; var selectedFunctionBtn = new Button() { Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.Function, - TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + TextSize=17 }; itemFL.AddChidren(selectedFunctionBtn); var selectedFunctionLine = new Button() { Y = selectedFunctionBtn.Bottom, Height = 1, - BackgroundColor = ZigbeeColor.Current.GXCLineColor + BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2 }; itemFL.AddChidren(selectedFunctionLine); @@ -726,14 +733,15 @@ Y = selectedFunctionLine.Bottom, Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.Scence, - TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + TextSize=17 }; itemFL.AddChidren(selectedSceneBtn); var selectedSceneLine = new Button() { Y = selectedSceneBtn.Bottom, Height = 1, - BackgroundColor = ZigbeeColor.Current.GXCLineColor, + BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2, }; itemFL.AddChidren(selectedSceneLine); @@ -742,7 +750,8 @@ Y = selectedSceneLine.Bottom, Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.Delay, - TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + TextSize=17 }; itemFL.AddChidren(selectedTimerBtn); @@ -756,7 +765,8 @@ TextID = R.MyInternationalizationString.Cancel, TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor, - Radius = (uint)Application.GetRealHeight(17) + Radius = (uint)Application.GetRealHeight(35), + TextSize=17 }; selectFL.AddChidren(cancelBtn); diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs index 3394193..227faea 100644 --- a/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs @@ -67,7 +67,7 @@ var top = new TopFrameLayout(); AddChidren(top); top.InitTopview(); - top.SetTopTitle(R.MyInternationalizationString.AddScence); + top.SetTopTitle(R.MyInternationalizationString.AddDelayTime); top.backButton.MouseUpEventHandler += (sender, e) => { RemoveFromParent(); @@ -113,7 +113,7 @@ Height = Application.GetMinRealAverage(124), Width = Application.GetMinRealAverage(124), Gravity = Gravity.Center, - Radius = (uint)Application.GetRealHeight(124 / 2), + Radius = (uint)Application.GetRealHeight(58), UnSelectedImagePath = "Item/Timer.png" }; bg1.AddChidren(timeImg); @@ -126,6 +126,7 @@ Gravity = Gravity.CenterHorizontal, TextID = R.MyInternationalizationString.SelectTimeForAction, TextColor = ZigbeeColor.Current.GXCTextBlackColor, + TextSize=15, IsMoreLines = true }; bodyFrameLayout.AddChidren(tip); @@ -135,7 +136,7 @@ Y = Application.GetRealHeight(611), Height = Application.GetRealHeight(1126), BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, - Radius = (uint)Application.GetRealHeight(17), + Radius = (uint)Application.GetRealHeight(58), }; bodyFrameLayout.AddChidren(midFL); diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs index da0dedc..19d08f7 100644 --- a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs @@ -3,6 +3,7 @@ using Shared.Common; using Shared.Phone.Device.CommonForm; using Shared.Phone.UserView; +using ZigBee.Device; namespace Shared.Phone.Device.Category { @@ -56,11 +57,11 @@ /// <summary> /// 璁惧绫诲瀷RowLayout /// </summary> - private FrameLayout typeRowLayout; + //private FrameLayout typeRowLayout; /// <summary> /// 鍔熻兘绫诲瀷鎸夐挳 /// </summary> - private FunctionButton functionTypeIMG; + //private FunctionButton functionTypeIMG; /// <summary> /// 娓╁害 /// </summary> @@ -74,9 +75,28 @@ /// </summary> private int fanid; + /// <summary> + /// dList + /// </summary> + private List<DeviceUI> devList; + /// <summary> + /// 鐩稿悓绫诲瀷鐨勮澶囧垪琛� + /// </summary> + private Dictionary<int, List<DeviceUI>> typeDeviceDic; + /// <summary> + /// 璁惧绫诲瀷鐨勫浘id + /// </summary> + private Dictionary<int, DeviceConcreteType> typeIdDic; + /// <summary> + /// 褰撳墠閫変腑鎴块棿 + /// </summary> + private Common.Room curRoom; #endregion + /// <summary> + /// RemoveFromParent + /// </summary> public override void RemoveFromParent() { HomePage.Instance.ScrollEnabled = true; @@ -96,6 +116,8 @@ /// </summary> public void Show() { + InitData(); + if (sceneTargetDevice == null) { sceneTargetDevice = new SceneTargetDeviceUI { Type = 0 }; @@ -107,6 +129,45 @@ RefreshBodyView(Config.Instance.Home.CurrentFloorId); } + /// <summary> + /// InitData + /// </summary> + private void InitData() + { + typeDeviceDic = new Dictionary<int, List<DeviceUI>> { }; + typeIdDic = new Dictionary<int, DeviceConcreteType> { }; + } + + /// <summary> + /// RefreshData + /// </summary> + private void RefreshData(Common.Room room) + { + devList = room.DeviceUIList; + typeDeviceDic.Clear(); + typeIdDic.Clear(); + foreach (var device in devList) + { + var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device.CommonDevice }); + if (info.BeloneType == DeviceBeloneType.A寮�鍏� || info.BeloneType == DeviceBeloneType.A褰╃伅 + || info.BeloneType == DeviceBeloneType.A鎻掑骇 || info.BeloneType == DeviceBeloneType.A鏅鸿兘绌哄紑 + || info.BeloneType == DeviceBeloneType.A鐏厜 || info.BeloneType == DeviceBeloneType.A绌鸿皟 + || info.BeloneType == DeviceBeloneType.A绐楀笜 || info.BeloneType == DeviceBeloneType.A缁х數鍣�) + { + if (typeDeviceDic.ContainsKey(info.BeloneTextId) == false) + { + var sameDevList = new List<DeviceUI> { }; + sameDevList.Add(device); + typeDeviceDic[info.BeloneTextId] = sameDevList; + } + else + { + typeDeviceDic[info.BeloneTextId].Add(device); + } + typeIdDic[info.BeloneTextId] = info.ConcreteType; + } + } + } #region Add____________________________________ /// <summary> @@ -117,7 +178,7 @@ var top = new TopFrameLayout(); AddChidren(top); top.InitTopview(); - top.SetTopTitle(R.MyInternationalizationString.AddScence); + top.SetTopTitle(R.MyInternationalizationString.AddFunction); top.backButton.MouseUpEventHandler += (sender, e) => { RemoveFromParent(); @@ -131,6 +192,8 @@ Gravity = Gravity.CenterVertical, TextAlignment = TextAlignment.CenterRight, TextColor = ZigbeeColor.Current.GXCTextBlackColor, + TextSize=14, + IsBold=true }; selectFloorBtn = new Button() @@ -210,7 +273,7 @@ functionSceneBodyView = new FrameLayout() { Y = roomFL.Bottom, - Height = Application.GetRealHeight(910 + 622), + Height = Application.GetRealHeight(279+35+1218), BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor }; bodyFrameLayout.AddChidren(functionSceneBodyView); @@ -245,7 +308,7 @@ { roomBtn.IsSelected = true; curBtn = roomBtn; - + this.curRoom = room; RefreshFunction(room); } roomBtn.MouseUpEventHandler += (sender, e) => @@ -257,7 +320,7 @@ (sender as Button).IsSelected = true; curBtn.IsSelected = false; curBtn = sender as Button; - + this.curRoom = room; RefreshFunction(room); }; } @@ -275,112 +338,130 @@ /// <param name="room"></param> private void RefreshFunction(Common.Room room) { + RefreshData(room); functionSceneBodyView.RemoveAll(); - if (room.DeviceUIList.Count == 0) + if (typeDeviceDic.Count == 0) { ShowNoFunctionTip(); } else { + var functionTypeView1 = new FrameLayout + { + X = Application.GetRealWidth(CommonFormResouce.X_Left), + Height = Application.GetRealHeight(160), + Width = Application.GetRealWidth(1028), + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor + }; + functionSceneBodyView.AddChidren(functionTypeView1); + functionTypeView1.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopLeft); + + var functionTypeView2 = new FrameLayout + { + X = Application.GetRealWidth(CommonFormResouce.X_Left), + Y = Application.GetRealHeight(150), + Height = Application.GetRealHeight(279 - 150), + Width = Application.GetRealWidth(1028), + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor + }; + functionSceneBodyView.AddChidren(functionTypeView2); + functionTypeView2.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerBottomLeft); + functionTypeScrowView = new HorizontalScrolViewLayout { X = Application.GetRealWidth(CommonFormResouce.X_Left), Height = Application.GetRealHeight(279), - Width = Application.GetRealWidth(1028), - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor + Width = Application.GetRealWidth(1028) }; functionSceneBodyView.AddChidren(functionTypeScrowView); deviceListScrolView = new VerticalScrolViewLayout { X = Application.GetRealWidth(CommonFormResouce.X_Left), - Y = functionTypeScrowView.Bottom + Application.GetRealHeight(50), + Y = Application.GetRealHeight(35 + 275), Width = Application.GetRealWidth(1028), - Height = functionSceneBodyView.Height - Application.GetRealHeight(279 + 50) - 1, + Height = Application.GetRealHeight(1218), BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; functionSceneBodyView.AddChidren(deviceListScrolView); + deviceListScrolView.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft); + tempFunctionTypeBtn = new FunctionButton(); tempFunctionTypeBtn.Init("",""); - EventHandler<MouseEventArgs> ShowSameTypeFunction = (object typeSender, MouseEventArgs mouseEventArgs) => + foreach (var deviceType in typeIdDic) { - tempFunctionTypeBtn.IsSelected = false; - tempFunctionTypeBtn = (typeSender as Button).Parent as FunctionButton; - ((typeSender as Button).Parent as FunctionButton).IsSelected = true; - - deviceListScrolView.RemoveAll(); - - var sameTypeList = new List<DeviceUI> { }; - foreach (var devieceUI in room.DeviceUIList) + var typeRowLayout = new FrameLayout() { - if (devieceUI == null || devieceUI.CommonDevice == null) - { - continue; - } - if (devieceUI.CommonDevice.Type.ToString() == (typeSender as Button).Tag.ToString()) - { - if (!sameTypeList.Contains(devieceUI)) - { - sameTypeList.Add(devieceUI); - } - } - } - foreach (var device in sameTypeList) - { - if (beforeSceneTargetDeviceUIs.Find((obj) => obj.DeviceUI.DeviceEpoint == device.DeviceEpoint && obj.DeviceUI.DeviceAddr == device.DeviceAddr) != null) - { - continue; - } - var deviceTypeRowLayout = new FrameLayout() - { - Height = Application.GetRealHeight(127 + 35), - Tag = device - }; - deviceListScrolView.AddChidren(deviceTypeRowLayout); - - var deviceRow = new FunctionRow(0, 35); - deviceTypeRowLayout.AddChidren(deviceRow); - deviceRow.Init(device.IconPath, device.OnlineIconPath,true); - deviceRow.SetTitle(device.CommonDevice.DeviceEpointName); - deviceRow.SetStatu(device.CommonDevice.IsOnline == 1); - deviceRow.HideSwitchBtn(false); - - deviceRow.ClickBtn.MouseUpEventHandler += (sender, e) => - { - ShowSelectAction(device, sceneTargetDevice); - }; - } - }; - - foreach (var deviceType in Common.Room.GetdeviceTypes(room)) - { - typeRowLayout = new FrameLayout() - { - Width = Application.GetRealWidth(CommonPage.AppRealWidth / 5), - Tag = deviceType + Width = Application.GetRealWidth(220), }; functionTypeScrowView.AddChidren(typeRowLayout); - functionTypeIMG = new FunctionButton() + var functionTypeIMG = new FunctionButton() { - Tag = deviceType + Tag = deviceType.Key }; - functionTypeIMG.Init(DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType), DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType)); - functionTypeIMG.SetTitle(DeviceUI.GetDeviceTypeName(deviceType)); + string imgPath = string.Empty; + string imgSeletedPath = string.Empty; + Common.LocalDevice.Current.GetDeviceBeloneIcon(deviceType.Value, ref imgPath, ref imgSeletedPath); + functionTypeIMG.Init(imgPath, imgSeletedPath); + functionTypeIMG.SetTitle(deviceType.Key); typeRowLayout.AddChidren(functionTypeIMG); functionTypeIMG.ClickBtn.MouseUpEventHandler += ShowSameTypeFunction; - - if (deviceType == room.DeviceUIList[0].CommonDevice.Type) + if (functionTypeScrowView.ChildrenCount == 1) { - ShowSameTypeFunction(functionTypeIMG.ClickBtn, null); + ShowSameTypeFunction(functionTypeIMG.ImageBtn, null); } } } } + + /// <summary> + /// 鏄剧ず鐩稿悓绫诲瀷鐨勫姛鑳� + /// </summary> + /// <param name="typeSender">typeSender.</param> + /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param> + private void ShowSameTypeFunction(object typeSender, MouseEventArgs mouseEventArgs) + { + tempFunctionTypeBtn.IsSelected = false; + tempFunctionTypeBtn = (typeSender as Button).Parent as FunctionButton; + ((typeSender as Button).Parent as FunctionButton).IsSelected = true; + + deviceListScrolView.RemoveAll(); + + var sameTypeList = new List<DeviceUI> { }; + sameTypeList = typeDeviceDic[int.Parse((typeSender as Button).Tag.ToString())]; + + foreach (var device in sameTypeList) + { + if (beforeSceneTargetDeviceUIs.Find((obj) => obj.DeviceUI.DeviceEpoint == device.DeviceEpoint && obj.DeviceUI.DeviceAddr == device.DeviceAddr) != null) + { + continue; + } + var deviceTypeRowLayout = new FrameLayout() + { + Height = Application.GetRealHeight(127 + 35), + Tag = device + }; + deviceListScrolView.AddChidren(deviceTypeRowLayout); + + var deviceRow = new FunctionRow(0, 35); + deviceTypeRowLayout.AddChidren(deviceRow); + deviceRow.Init(device.IconPath, device.OnlineIconPath, true); + deviceRow.SetTitle(device.CommonDevice.DeviceEpointName); + deviceRow.IsSelected = true; + deviceRow.HideSwitchBtn(false); + + deviceRow.ClickBtn.MouseUpEventHandler += (sender, e) => + { + ShowSelectAction(device, sceneTargetDevice); + }; + } + } + /// <summary> /// 鎻愮ず娌℃湁鍔熻兘 @@ -403,7 +484,7 @@ Height = Application.GetRealHeight(200), Width = Application.GetRealWidth(700), Gravity = Gravity.CenterHorizontal, - Text = Language.StringByID(R.MyInternationalizationString.NoFunction).Replace("{\\r\\n}", "\r\n"), + Text = Language.StringByID(R.MyInternationalizationString.NoFunction_Tip).Replace("{\\r\\n}", "\r\n"), TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor, TextAlignment = TextAlignment.Center, IsMoreLines = true @@ -464,12 +545,12 @@ Height = Application.GetRealHeight(530), }; dialog.AddChidren(selectFL); - selectFL.Animate = Animate.DownToUp; + //selectFL.Animate = Animate.DownToUp; var titleBG = new FrameLayout { Height = Application.GetRealHeight(138 * 2), - Radius = (uint)Application.GetRealHeight(20), + Radius = (uint)Application.GetRealHeight(58), BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; selectFL.AddChidren(titleBG); @@ -493,7 +574,7 @@ X = Application.GetRealWidth(80), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextGrayColor, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterLeft, TextID = R.MyInternationalizationString.Cancel }; @@ -504,8 +585,7 @@ Width = Application.GetRealWidth(400), Gravity = Gravity.CenterHorizontal, TextColor = ZigbeeColor.Current.GXCTextBlackColor, - TextSize = 15, - TextAlignment = TextAlignment.CenterLeft, + TextSize = 16, Text = device.CommonDevice.DeviceEpointName }; titleFL.AddChidren(deviceName); @@ -515,7 +595,7 @@ X = Application.GetRealWidth(800), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextSelectedColor2, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterRight, TextID = R.MyInternationalizationString.Complete }; @@ -621,12 +701,12 @@ Height = Application.GetRealHeight(752), }; dialog.AddChidren(selectFL); - selectFL.Animate = Animate.DownToUp; + //selectFL.Animate = Animate.DownToUp; var titleBG = new FrameLayout { Height = Application.GetRealHeight(138 * 2), - Radius = (uint)Application.GetRealHeight(20), + Radius = (uint)Application.GetRealHeight(58), BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; selectFL.AddChidren(titleBG); @@ -650,7 +730,7 @@ X = Application.GetRealWidth(80), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextGrayColor, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterLeft, TextID = R.MyInternationalizationString.Cancel }; @@ -661,8 +741,7 @@ Width = Application.GetRealWidth(400), Gravity = Gravity.CenterHorizontal, TextColor = ZigbeeColor.Current.GXCTextBlackColor, - TextSize = 15, - TextAlignment = TextAlignment.CenterLeft, + TextSize = 16, Text = device.CommonDevice.DeviceEpointName }; titleFL.AddChidren(deviceName); @@ -672,7 +751,7 @@ X = Application.GetRealWidth(800), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextSelectedColor2, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterRight, TextID = R.MyInternationalizationString.Complete }; @@ -787,12 +866,12 @@ Height = Application.GetRealHeight(752), }; dialog.AddChidren(selectFL); - selectFL.Animate = Animate.DownToUp; + //selectFL.Animate = Animate.DownToUp; var titleBG = new FrameLayout { Height = Application.GetRealHeight(138 * 2), - Radius = (uint)Application.GetRealHeight(20), + Radius = (uint)Application.GetRealHeight(58), BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; selectFL.AddChidren(titleBG); @@ -816,7 +895,7 @@ X = Application.GetRealWidth(80), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextGrayColor, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterLeft, TextID = R.MyInternationalizationString.Cancel }; @@ -827,7 +906,7 @@ Width = Application.GetRealWidth(400), Gravity = Gravity.CenterHorizontal, TextColor = ZigbeeColor.Current.GXCTextBlackColor, - TextSize = 15, + TextSize = 16, TextAlignment = TextAlignment.CenterLeft, Text = device.CommonDevice.DeviceEpointName }; @@ -838,7 +917,7 @@ X = Application.GetRealWidth(800), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextSelectedColor2, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterRight, TextID = R.MyInternationalizationString.Complete }; @@ -953,12 +1032,12 @@ Height = Application.GetRealHeight(1106), }; dialog.AddChidren(selectFL); - selectFL.Animate = Animate.DownToUp; + //selectFL.Animate = Animate.DownToUp; var titleBG = new FrameLayout { Height = Application.GetRealHeight(138 * 2), - Radius = (uint)Application.GetRealHeight(20), + Radius = (uint)Application.GetRealHeight(58), BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; selectFL.AddChidren(titleBG); @@ -982,7 +1061,7 @@ X = Application.GetRealWidth(80), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextGrayColor, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterLeft, TextID = R.MyInternationalizationString.Cancel }; @@ -993,7 +1072,7 @@ Width = Application.GetRealWidth(400), Gravity = Gravity.CenterHorizontal, TextColor = ZigbeeColor.Current.GXCTextBlackColor, - TextSize = 15, + TextSize = 16, TextAlignment = TextAlignment.CenterLeft, Text = device.CommonDevice.DeviceEpointName }; @@ -1004,7 +1083,7 @@ X = Application.GetRealWidth(800), Width = Application.GetRealWidth(200), TextColor = ZigbeeColor.Current.GXCTextSelectedColor2, - TextSize = 15, + TextSize = 14, TextAlignment = TextAlignment.CenterRight, TextID = R.MyInternationalizationString.Complete }; diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectScene.cs index 74a7512..c789c3e 100644 --- a/ZigbeeApp/Shared/Phone/Device/Category/SelectScene.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectScene.cs @@ -23,7 +23,7 @@ /// <summary> /// BeforesceneTargetDeviceUIs /// </summary> - public List<SceneTargetDeviceUI> beforeSceneTargetDeviceUIs=new List<SceneTargetDeviceUI> { }; + public List<SceneTargetDeviceUI> beforeSceneTargetDeviceUIs = new List<SceneTargetDeviceUI> { }; /// <summary> /// 妤煎眰 /// </summary> @@ -96,6 +96,8 @@ Gravity = Gravity.CenterVertical, TextAlignment = TextAlignment.CenterRight, TextColor = ZigbeeColor.Current.GXCTextBlackColor, + TextSize = 14, + IsBold = true }; selectFloorBtn = new Button() @@ -151,7 +153,7 @@ confirmBtn.SetTitle(R.MyInternationalizationString.Save); confirmBtn.MouseUpEventHandler += (sender, e) => { - sceneTargetDevice.ElseScenesId = sceneUI.Id ; + sceneTargetDevice.ElseScenesId = sceneUI.Id; sceneTargetDevice.SceneUI = sceneUI; sceneTargetDevice.SceneName = sceneUI.Name; selectedAction?.Invoke(sceneTargetDevice); @@ -187,7 +189,7 @@ functionSceneBodyView = new FrameLayout() { Y = roomFL.Bottom, - Height = Application.GetRealHeight(910+622), + Height = Application.GetRealHeight(1080 + 452), BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor }; bodyFrameLayout.AddChidren(functionSceneBodyView); @@ -260,9 +262,11 @@ { //Y = Application.GetRealHeight(58) }; + functionSceneBodyView.AddChidren(sceneScrolView); SelectSceneRow tempSceneRow = new SelectSceneRow(); - EventHandler<MouseEventArgs> selectScene = (sender, e) => { + EventHandler<MouseEventArgs> selectScene = (sender, e) => + { tempSceneRow.IsSelected = false; tempSceneRow = ((sender as Button).Parent as SelectSceneRow); ((sender as Button).Parent as SelectSceneRow).IsSelected = true; @@ -311,11 +315,22 @@ sceneRowLayout.IsSelected = true; } } - + sceneRowLayout.ClickButton.MouseUpEventHandler += selectScene; } + + if (sceneList.Count > 8) + { + var frame = new FrameLayout + { + Height = Application.GetRealHeight(300) + }; + sceneScrolView.AddChidren(frame); + } + } } + /// <summary> /// 鏄剧ず娌℃湁鍦烘櫙 @@ -338,7 +353,7 @@ Height = Application.GetRealHeight(200), Width = Application.GetRealWidth(700), Gravity = Gravity.CenterHorizontal, - Text = Language.StringByID(R.MyInternationalizationString.NoScene).Replace("{\\r\\n}", "\r\n"), + Text = Language.StringByID(R.MyInternationalizationString.NoScene_Tip).Replace("{\\r\\n}", "\r\n"), TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor, TextAlignment = TextAlignment.Center, IsMoreLines = true diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionForWinRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionForWinRow.cs index d31b0e0..4611109 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionForWinRow.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionForWinRow.cs @@ -75,7 +75,7 @@ Y = Application.GetRealHeight(y); Width = Application.GetRealWidth(1022); Height = Application.GetRealHeight(127); - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; + //BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; } /// <summary> diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionRow.cs index b73178f..521e49e 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionRow.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionRow.cs @@ -66,7 +66,7 @@ Y = Application.GetRealHeight(y); Width = Application.GetRealWidth(1022); Height = Application.GetRealHeight(127); - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; + //BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; } /// <summary> diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/CompleteButton.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/CompleteButton.cs index 1745281..dbc70fa 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/CompleteButton.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/CompleteButton.cs @@ -26,6 +26,8 @@ TextID = R.MyInternationalizationString.Complete; BackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor; TextColor = ZigbeeColor.Current.GXCTextWhiteColor; + IsBold = true; + TextSize = 16; Gravity = Gravity.CenterHorizontal; Radius = (uint)Application.GetRealHeight(height / 2); } diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs index 55df7e1..3004d7d 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs @@ -71,8 +71,8 @@ Width = Application.GetMinRealAverage(100), Height = Application.GetMinRealAverage(100), Gravity = Gravity.CenterVertical, - SelectedImagePath="Item/Next.png", - UnSelectedImagePath= "Item/NextSelected.png" + SelectedImagePath= "Item/NextSelected.png", + UnSelectedImagePath= "Item/Next.png" }; AddChidren(NextBtn); diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionRow.cs index 8fe24e8..6c6f502 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionRow.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionRow.cs @@ -62,7 +62,6 @@ Y = Application.GetRealHeight(y); Width = Application.GetRealWidth(1080); Height = Application.GetRealHeight(127); - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; } /// <summary> @@ -106,7 +105,8 @@ TextColor = ZigbeeColor.Current.GXCTextBlackColor, SelectedTextColor = ZigbeeColor.Current.GXCTextSelectedColor, TextAlignment = TextAlignment.CenterLeft, - Tag = Tag + Tag = Tag, + TextSize=14 }; AddChidren(NameBtn); diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithPickViewRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithPickViewRow.cs index 609b606..8d5cf18 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithPickViewRow.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithPickViewRow.cs @@ -89,6 +89,7 @@ Height = Application.GetRealHeight(80), TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextAlignment = TextAlignment.CenterLeft, + TextSize=14 }; AddChidren(NameBtn); SelectBtn = new Button() @@ -100,6 +101,17 @@ Visible = false }; AddChidren(SelectBtn); + + var line1 = new Button() + { + X = Application.GetRealWidth(81), + Y = Application.GetRealHeight(127), + Width = Application.GetRealWidth(919), + Height = 1, + BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor, + }; + AddChidren(line1); + ClickButton = new Button { @@ -147,9 +159,9 @@ line = new Button() { X = Application.GetRealWidth(81), - Y = this.Height - 2, + Y = this.Height - 1, Width = Application.GetRealWidth(919), - Height = 2, + Height = 1, BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor, }; AddChidren(line); diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs index d32c138..727b09a 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs @@ -84,6 +84,7 @@ Height = Application.GetRealHeight(80), TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextAlignment = TextAlignment.CenterLeft, + TextSize=14 }; AddChidren(NameBtn); @@ -124,16 +125,17 @@ Width = Application.GetRealWidth(200), Gravity = Gravity.CenterHorizontal, Text = $"{(int)(SeekBar.Progress * 1.0 / MaxLevel * 100)} %", - TextColor = ZigbeeColor.Current.GXCTextGrayColor + TextColor = ZigbeeColor.Current.GXCTextGrayColor, + TextSize=12 }; AddChidren(SeekBarTitle); line = new Button() { X = Application.GetRealWidth(81), - Y = this.Height - 2, + Y = this.Height - 1, Width = Application.GetRealWidth(919), - Height = 2, + Height = 1, BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor, }; AddChidren(line); diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectSceneRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectSceneRow.cs index 262a2f8..48a7679 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectSceneRow.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectSceneRow.cs @@ -88,6 +88,7 @@ Gravity = Gravity.CenterVertical, TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextAlignment = TextAlignment.CenterLeft, + TextSize=15 }; AddChidren(NameBtn); diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectSceneStatuRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectSceneStatuRow.cs index 5598511..7949d81 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectSceneStatuRow.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectSceneStatuRow.cs @@ -73,6 +73,7 @@ Height = Application.GetRealHeight(80), TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextAlignment = TextAlignment.CenterLeft, + TextSize=14 }; AddChidren(NameBtn); @@ -96,9 +97,9 @@ line = new Button() { X = Application.GetRealWidth(81), - Y = this.Height - 2, + Y = this.Height - 1, Width = Application.GetRealWidth(919), - Height = 2, + Height = 1, BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor, }; AddChidren(line); diff --git a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs index 94d2e87..5fb2f52 100644 --- a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs +++ b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs @@ -478,7 +478,7 @@ BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor }; selectFL.AddChidren(itemFL); - itemFL.Animate = Animate.DownToUp; + //itemFL.Animate = Animate.DownToUp; var selectLocalPicture = new Button() { diff --git a/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs index 5c79774..1d85f6a 100644 --- a/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs +++ b/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs @@ -15,15 +15,13 @@ /// bodyFrameLayout /// </summary> private FrameLayout bodyFrameLayout; - - private Button addBtn; + /// <summary> + /// top + /// </summary> + private TopFrameLayout top; + private Button selectAllBtn; private FrameLayout itemView; - /// <summary> - /// editStatus - /// </summary> - private bool SelectAll; - /// <summary> /// low_High /// </summary> @@ -116,12 +114,17 @@ private void RefreshData() { devList = Shared.Common.Room.CurrentRoom.GetUnalloctedDeviceUIs(); - sceneList = Shared.Common.Room.CurrentRoom.GetUnalloctedScenes(); + //sceneList = Shared.Common.Room.CurrentRoom.GetUnalloctedScenes(); + sceneList = Shared.Common.Room.CurrentRoom.GetLoveRoom().SceneUIList; typeDeviceDic.Clear(); typeIdDic.Clear(); + if (devList == null) + { + return; + } foreach (var device in devList) { - var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device.CommonDevice }); + var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device?.CommonDevice }); if (typeDeviceDic.ContainsKey(info.BeloneTextId) == false) { var sameDevList = new List<DeviceUI> { }; @@ -152,7 +155,7 @@ /// </summary> public void AddTop() { - var top = new TopFrameLayout(); + top = new TopFrameLayout(); AddChidren(top); top.InitTopview(); top.SetTopTitle(R.MyInternationalizationString.Unallocated); @@ -161,20 +164,7 @@ RemoveFromParent(); }; - addBtn = new Button() - { - X = Application.GetRealWidth(1080-150-80), - Width = Application.GetRealWidth(150), - Height = Application.GetRealHeight(80), - Gravity = Gravity.CenterVertical, - TextColor = ZigbeeColor.Current.GXCTextBlackColor, - TextSize = CommonFormResouce.TopTitle_TextSize, - TextAlignment = TextAlignment.CenterRight, - TextID = R.MyInternationalizationString.AllSelect - }; - top.topView.AddChidren(addBtn); - - addBtn.MouseUpEventHandler += Edit_MouseUpEventHandler; + } /// <summary> @@ -254,35 +244,6 @@ RefreshBodyView(); } - /// <summary> - /// 缂栬緫 - /// </summary> - /// <param name="sender"></param> - /// <param name="mouseEventArgs"></param> - private void Edit_MouseUpEventHandler(object sender, MouseEventArgs mouseEventArgs) - { - SelectAll = !SelectAll; - if (SelectAll) - { - addBtn.TextID = R.MyInternationalizationString.Cancel; - } - else - { - addBtn.TextID = R.MyInternationalizationString.AllSelect; - } - - if (functionBtn.IsSelected) - { - functionSceneBodyView.RemoveAll(); - ShowFunction(SelectAll); - } - else if (sceneBtn.IsSelected) - { - functionSceneBodyView.RemoveAll(); - ShowScene(SelectAll); - } - } - #endregion #region 鈼� 鍒锋柊____________________________ @@ -292,14 +253,14 @@ public void RefreshBodyView() { functionSceneBodyView.RemoveAll(); - SelectAll = false; + if (functionBtn.IsSelected) { - ShowFunction(SelectAll); + ShowFunction(); } else if (sceneBtn.IsSelected) { - ShowScene(SelectAll); + ShowScene(); } } @@ -309,9 +270,8 @@ /// <summary> /// 鍔熻兘 /// </summary> - public void ShowFunction(bool selectAll) + public void ShowFunction() { - SelectAll = selectAll; if (typeIdDic.Count == 0) { ShowNoFunctionTip(); @@ -389,6 +349,7 @@ ShowSameTypeFunction(functionTypeIMG.ImageBtn, null); } } + } } @@ -410,10 +371,6 @@ var selectedList = new List<DeviceUI> { }; sameTypeList = typeDeviceDic[int.Parse((typeSender as Button).Tag.ToString())]; - if (SelectAll) - { - selectedList.AddRange(sameTypeList); - } foreach (var deviceUI in sameTypeList) { var deviceTypeRowLayout = new FrameLayout() @@ -426,7 +383,6 @@ var deviceRow = new SelectFunctionView(0, 35); deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); - deviceRow.IsSelected = SelectAll; deviceTypeRowLayout.AddChidren(deviceRow); EventHandler<MouseEventArgs> eventHandler = (sender, e) => @@ -448,44 +404,85 @@ } }; deviceRow.ClickBtn.MouseUpEventHandler += eventHandler; - - var addBackground = new Button - { - Y = Application.GetRealHeight(1405), - Width = Application.GetMinRealAverage(1080), - Height = Application.GetMinRealAverage(202), - UnSelectedImagePath = "Room/AddBackground.png" - }; - functionSceneBodyView.AddChidren(addBackground); - var add = new Button - { - Y = Application.GetRealHeight(1428), - Width = Application.GetRealWidth(1034), - Height = Application.GetRealHeight(156), - BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, - TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, - Radius = (uint)Application.GetRealHeight(35), - TextID = R.MyInternationalizationString.AddTo, - Gravity = Gravity.CenterHorizontal, - TextSize=17 - }; - functionSceneBodyView.AddChidren(add); - add.MouseUpEventHandler += (sender, e) => - { - var selectZone = new SelectZone(); - AddChidren(selectZone); - selectZone.Init(); - selectZone.ZoneAction = (r) => - { - foreach (var d in selectedList) - { - r.AddDevice(d.CommonDevice,true); - deviceListScrolView.RemoveViewByTag(d); - } - RefreshData(); - }; - }; } + + selectAllBtn?.RemoveFromParent(); + selectAllBtn = new Button() + { + X = Application.GetRealWidth(1080 - 150 - 80), + Width = Application.GetRealWidth(150), + Height = Application.GetRealHeight(80), + Gravity = Gravity.CenterVertical, + TextColor = ZigbeeColor.Current.GXCTextBlackColor, + SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor, + TextSize = CommonFormResouce.TopTitle_TextSize, + TextAlignment = TextAlignment.CenterRight, + TextID = R.MyInternationalizationString.AllSelect + }; + top.topView.AddChidren(selectAllBtn); + selectAllBtn.MouseUpEventHandler += (sender, e) => + { + try + { + (sender as Button).IsSelected = !(sender as Button).IsSelected; + for (int i = 0; i < deviceListScrolView.ChildrenCount; i++) + { + var frame = deviceListScrolView.GetChildren(i) as FrameLayout; + (frame.GetChildren(0) as SelectFunctionView).IsSelected = (sender as Button).IsSelected; + } + if ((sender as Button).IsSelected) + { + (sender as Button).TextID = R.MyInternationalizationString.Cancel; + selectedList.AddRange(sameTypeList); + } + else + { + (sender as Button).TextID = R.MyInternationalizationString.AllSelect; + selectedList.Clear(); + } + } + catch + { + + } + }; + + var addBackground = new Button + { + Y = Application.GetRealHeight(1405), + Width = Application.GetMinRealAverage(1080), + Height = Application.GetMinRealAverage(202), + UnSelectedImagePath = "Room/AddBackground.png" + }; + functionSceneBodyView.AddChidren(addBackground); + var add = new Button + { + Y = Application.GetRealHeight(1428), + Width = Application.GetRealWidth(1034), + Height = Application.GetRealHeight(156), + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + Radius = (uint)Application.GetRealHeight(35), + TextID = R.MyInternationalizationString.AddTo, + Gravity = Gravity.CenterHorizontal, + TextSize = 17 + }; + functionSceneBodyView.AddChidren(add); + add.MouseUpEventHandler += (sender, e) => + { + var selectZone = new SelectZone(); + AddChidren(selectZone); + selectZone.Init(); + selectZone.ZoneAction = (r) => + { + foreach (var d in selectedList) + { + r.AddDevice(d.CommonDevice, true); + deviceListScrolView.RemoveViewByTag(d); + } + RefreshData(); + }; + }; } /// <summary> @@ -524,13 +521,9 @@ /// <summary> /// 閫夋嫨鍦烘櫙--鎵�鏈夋埧闂寸殑鎵�鏈夊満鏅� /// </summary> - public void ShowScene(bool selectAll) + public void ShowScene() { List<SceneUI> selectedList = new List<SceneUI>(); - if(selectAll) - { - selectedList.AddRange(sceneList); - } if (sceneList == null || sceneList.Count == 0) { ShowNoSceneTip(); @@ -575,7 +568,6 @@ Height = Application.GetMinRealAverage(60), UnSelectedImagePath = "Room/ItemUnSelected.png", SelectedImagePath = "Room/ItemSelected.png", - IsSelected = selectAll }; sceneFL.AddChidren(selectedBtn); @@ -633,6 +625,48 @@ sceneImg.MouseUpEventHandler += eventHandler; } + selectAllBtn?.RemoveFromParent(); + selectAllBtn = new Button() + { + X = Application.GetRealWidth(1080 - 150 - 80), + Width = Application.GetRealWidth(150), + Height = Application.GetRealHeight(80), + Gravity = Gravity.CenterVertical, + TextColor = ZigbeeColor.Current.GXCTextBlackColor, + SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor, + TextSize = CommonFormResouce.TopTitle_TextSize, + TextAlignment = TextAlignment.CenterRight, + TextID = R.MyInternationalizationString.AllSelect + }; + top.topView.AddChidren(selectAllBtn); + selectAllBtn.MouseUpEventHandler += (sender, e) => + { + try + { + (sender as Button).IsSelected = !(sender as Button).IsSelected; + for (int i = 0; i < sceneScrolView.ChildrenCount; i++) + { + var frame = sceneScrolView.GetChildren(i) as FrameLayout; + (frame.GetChildren(1) as Button).IsSelected = (sender as Button).IsSelected; + } + + if ((sender as Button).IsSelected) + { + (sender as Button).TextID = R.MyInternationalizationString.Cancel; + selectedList.AddRange(sceneList); + } + else + { + (sender as Button).TextID = R.MyInternationalizationString.AllSelect; + selectedList.Clear(); + } + } + catch + { + + } + }; + var addBackground = new Button { Y = Application.GetRealHeight(1405), diff --git a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs index 454b8cb..9c011fd 100644 --- a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs +++ b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs @@ -88,6 +88,8 @@ /// sceneScrolView /// </summary> private VerticalScrolViewLayout sceneScrolView ; + + #endregion #region 鈼� 鎺ュ彛____________________________ @@ -924,14 +926,25 @@ } else { + var dList = new List<DeviceUI> { }; + foreach(var device in deviceList) + { + var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device.CommonDevice }); + if (info.BeloneType == DeviceBeloneType.A骞叉帴鐐� || info.BeloneType == DeviceBeloneType.A涓户鍣�) + { + continue; + } + dList.Add(device); + } + deviceVerticalScrolViewLayout = new VerticalScrolViewLayout { }; functionSceneBodyView.AddChidren(deviceVerticalScrolViewLayout); - for (int i = 0; i < deviceList.Count; i++) + for (int i = 0; i < dList.Count; i++) { - var device = deviceList[i]; + var device = dList[i]; //new System.Threading.Thread(() => //{ - Application.RunOnMainThread(() => + Application.RunOnMainThread(() => { try { diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs index d4a8816..d51b603 100644 --- a/ZigbeeApp/Shared/R.cs +++ b/ZigbeeApp/Shared/R.cs @@ -959,6 +959,14 @@ /// 纭畾瑕佺Щ闄よ鍔熻兘锛� /// </summary> public const int DeleteFunction = 11034; + /// <summary> + /// 娣诲姞鍔熻兘 + /// </summary> + public const int AddFunction = 11035; + /// <summary> + /// 娣诲姞寤舵椂 + /// </summary> + public const int AddDelayTime = 11036; #region 璁惧绫诲瀷 /// <summary> -- Gitblit v1.8.0