gxc
2019-12-23 ddb46a700775aacfb6cc82d9586302a38c8fa0a7
2019.12.23
1个文件已添加
1个文件已删除
41个文件已修改
1436 ■■■■■ 已修改文件
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Language.ini 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Next.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/Contents.json 368 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-1024.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/Device.cs 351 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/Category.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs 269 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/SelectScene.cs 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionForWinRow.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionRow.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/CompleteButton.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/FunctionRow.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithPickViewRow.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectDeviceWithSeekBarRow.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectSceneRow.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectSceneStatuRow.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs 246 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/R.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
Binary files differ
ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -708,6 +708,9 @@
11032=选择区域
11033=选择场景图片
11034=确定要移除该功能?
11035=添加功能
11036=添加延时
12100=未知设备
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Next.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/Contents.json
old mode 100755 new mode 100644
@@ -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
  }
}
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-1024.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29.png
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png
Binary files differ
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png

ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png

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的时候:【ConcreteType】和【ConcreteTextId】可能会有不同的值</para>
        /// <para>true的时候:【ConcreteType】统一为Sensor,【ConcreteTextId】统一为传感器</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的时候:【ConcreteType】和【ConcreteTextId】可能会有不同的值</para>
        /// <para>true的时候:【ConcreteType】统一为Sensor,【ConcreteTextId】统一为传感器</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 @@
            //定义规则:模块ID(已翻译)=设备具体类型值-设备所属类型值(自定义的值,嘛,只要不重复就可以)
            //第一个值是:DeviceConcreteType  第二个值是:DeviceBeloneType
            //*********************************************************************
            //新设备添加方法:
            //1、在这里填写上模块ID,然后是 DeviceConcreteType ,然后是 DeviceBeloneType
            //2、然后在最下面添加【设备的具体类型】,【设备的所属类型】
            //3、已设备的具体类型为名字(去掉【-】)添加设备的【所属图片】,【真实物理图片】。回路图片需要特殊处理
            //4、添加R文件,添加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转buspro协议转换器
            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转buspro协议转换器
        /// </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
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();
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);
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);
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
            };
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
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>
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>
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);
        }
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);
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);
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);
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);
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);
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);
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()
            {
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),
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
                            {
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>