old mode 100644
new mode 100755
| | |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | #region 房间顶部切换显示区域 |
| | | room = new Room() { roomName = Language.StringByID(StringId.All), uid = ""}; |
| | | room = new Room() { roomName = Language.StringByID(StringId.All)}; |
| | | //if (DB_ResidenceData.rooms.Count > 0) |
| | | //{ |
| | | // room = DB_ResidenceData.rooms[0]; |
| | |
| | | { |
| | | sensorListView.RemoveAll(); |
| | | int index = 0; |
| | | foreach (var sensor in DB_ResidenceData.functionList.sensorsEnvironmentalScience) |
| | | foreach (var sensor in FunctionList.List.sensorsEnvironmentalScience) |
| | | { |
| | | LoadSensorDiv(sensor, index); |
| | | index++; |
| | |
| | | /// </summary> |
| | | void LoadSensorDiv(Sensor sensor,int index) |
| | | { |
| | | if (room.uid == "" || sensor.roomIds.Contains(room.uid)) |
| | | if (room.roomId == "" || sensor.roomIds.Contains(room.roomId)) |
| | | { |
| | | var sensorTag = sensor.sid; |
| | | if (sensor.bus_Data != null) |
| | | if (sensor.bus != null) |
| | | { |
| | | sensorTag = ((int)sensor.functionType % 256) + "_" + sensor.bus_Data.SubnetID + "_" + sensor.bus_Data.DeviceID + "_" + sensor.bus_Data.loopId; |
| | | sensorTag = ((int)sensor.functionType % 256) + "_" + sensor.bus.SubnetID + "_" + sensor.bus.DeviceID + "_" + sensor.bus.LoopId; |
| | | } |
| | | FrameLayout sensorView = new FrameLayout() |
| | | { |
| | |
| | | }; |
| | | dispalyView.AddChidren(contentView); |
| | | |
| | | if (DB_ResidenceData.Rooms.Count < 2) |
| | | if (SpatialInfo.CurrentSpatial.RoomList.Count < 2) |
| | | { |
| | | } |
| | | else if (DB_ResidenceData.Rooms.Count < 3) |
| | | else if (SpatialInfo.CurrentSpatial.RoomList.Count < 3) |
| | | { |
| | | dispalyView = new FrameLayout() |
| | | { |
| | |
| | | contentView.Height = Application.GetRealHeight(45 * 3); |
| | | dispalyView.AddChidren(contentView); |
| | | } |
| | | else if (DB_ResidenceData.Rooms.Count < 4) |
| | | else if (SpatialInfo.CurrentSpatial.RoomList.Count < 4) |
| | | { |
| | | dispalyView = new FrameLayout() |
| | | { |
| | |
| | | |
| | | |
| | | var showListRoom = new List<Room>(); |
| | | showListRoom.Add(new Room() { roomName = Language.StringByID(StringId.All),uid = "" }); |
| | | showListRoom.AddRange(DB_ResidenceData.Rooms); |
| | | showListRoom.Add(new Room() { roomName = Language.StringByID(StringId.All) }); |
| | | showListRoom.AddRange(SpatialInfo.CurrentSpatial.RoomList); |
| | | |
| | | foreach (var roomTemp in showListRoom) |
| | | { |