WJC
2020-03-12 c47c3ec2488961b3a006aaebcb03dba582f8b19b
ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
@@ -87,8 +87,9 @@
            var roomlists = Method.GetRoomList(IfType, Config.Instance.Home.CurrentFloorId);
            if (roomlists.Count == 0)
            {
                ///没有房间直接返回去;
                return;
                //返回没有房间隐藏下面整块;
                devicetypehorizontalScrol.Height = 0;
                middle.Height = 0;
            }
            /// 设备类型列表
            var deviceTypeList = Method.GetDevice(IfType);
@@ -284,7 +285,7 @@
        /// 加载该区域所有设备视图方法
        /// </summary>0
        /// <param name="devicelist">Devicelist.</param>
        void AllDeviceTypeView(List<DeviceUI> devicelist)
        void AllDeviceTypeView(List<CommonDevice> devicelist)
        {
            var devicetypelist = Method.GetDeviceTypeList(IfType, devicelist);
            devicetypehorizontalScrol.RemoveAll();
@@ -366,18 +367,18 @@
        /// </summary>
        /// <param name="deviceTypelist">Device typelist.</param>
        /// <param name="devicelist">设备列表</param>
        void ConditionDeviceView(List<DeviceType> deviceTypelist, List<DeviceUI> devicelist)
        void ConditionDeviceView(List<DeviceType> deviceTypelist, List<CommonDevice> devicelist)
        {
            middle.RemoveAll();
            foreach (var common in devicelist)
            {
                if (deviceTypelist.Count != 0 && !deviceTypelist.Contains(common.CommonDevice.Type))
                if (deviceTypelist.Count != 0 && !deviceTypelist.Contains(common.Type))
                {
                    continue;
                }
                if (IfType == "condition_mould")
                {
                    if (common.CommonDevice.IasDeviceType != 13)
                    if (common.IasDeviceType != 13)
                    {//自动化模板只支持红外传感器
                        continue;
                    }
@@ -417,7 +418,7 @@
                deviceFramelayout.AddChidren(deviceRow);
                var devicename = new Button
                {
                    Text = common.CommonDevice.DeviceEpointName,
                    Text = LocalDevice.Current.GetDeviceEpointName(common),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                    SelectedTextColor = ZigbeeColor.Current.LogicAddColor,
@@ -437,7 +438,7 @@
                    devicename.IsSelected = true;
                    var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                    this.AddChidren(flMain);
                    CurrentDeviceState.CurrentDeviceView(flMain, common.CommonDevice, false, IfType);
                    CurrentDeviceState.CurrentDeviceView(flMain, common, false, IfType);
                };
                deviceFramelayout.MouseUpEventHandler += devicclick;