| | |
| | | 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); |
| | |
| | | /// 加载该区域所有设备视图方法 |
| | | /// </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(); |
| | |
| | | /// </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; |
| | | } |
| | |
| | | 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, |
| | |
| | | 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; |