| | |
| | | |
| | | #region 房间顶部切换显示区域 |
| | | room = new Room(); |
| | | if (DB_ResidenceData.residenceData.rooms.Count > 0) |
| | | if (DB_ResidenceData.rooms.Count > 0) |
| | | { |
| | | room = DB_ResidenceData.residenceData.rooms[0]; |
| | | room = DB_ResidenceData.rooms[0]; |
| | | } |
| | | btnFoorDownIcon = new Button() |
| | | { |
| | |
| | | contentView.AddChidren(sensorListView); |
| | | |
| | | int index = 0; |
| | | foreach(var sensor in DB_ResidenceData.residenceData.functionList.sensorsEnvironmentalScience) |
| | | foreach(var sensor in DB_ResidenceData.functionList.sensorsEnvironmentalScience) |
| | | { |
| | | if ( sensor.functionType == FunctionType.WindPower) |
| | | { |
| | | continue; |
| | | } |
| | | LoadSensorDiv(sensor, index); |
| | | index++; |
| | | } |
| | |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | if ( sensor.functionType != FunctionType.WindPower) |
| | | var btnInfoIcon = new Button() |
| | | { |
| | | var btnInfoIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(120), |
| | | Width = Application.GetRealWidth(28), |
| | | Height = Application.GetRealWidth(28), |
| | | UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/TipInfoIcon.png", |
| | | }; |
| | | sensorView.AddChidren(btnInfoIcon); |
| | | btnInfoIcon.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | LoadInfo(sensor); |
| | | }; |
| | | } |
| | | X = Application.GetRealWidth(120), |
| | | Width = Application.GetRealWidth(28), |
| | | Height = Application.GetRealWidth(28), |
| | | UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/TipInfoIcon.png", |
| | | }; |
| | | sensorView.AddChidren(btnInfoIcon); |
| | | btnInfoIcon.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | LoadInfo(sensor); |
| | | }; |
| | | |
| | | var btnSensorValues = new Button() |
| | | { |
| | |
| | | |
| | | switch (sensor.functionType) |
| | | { |
| | | case FunctionType.PM10: |
| | | btnTitle.Text = "PM1.0(ug/m²)"; |
| | | break; |
| | | case FunctionType.PM25: |
| | | btnTitle.Text = "PM2.5(ug/m²)"; |
| | | break; |
| | | case FunctionType.WindPower: |
| | | |
| | | break; |
| | | //case FunctionType.Noise: |
| | | // break; |
| | | case FunctionType.Temp: |
| | | btnTitle.Text = Language.StringByID(StringId.Temp) + "(°C)"; |
| | | break; |
| | |
| | | }; |
| | | dispalyView.AddChidren(contentView); |
| | | |
| | | if (DB_ResidenceData.residenceData.rooms.Count < 2) |
| | | if (DB_ResidenceData.rooms.Count < 2) |
| | | { |
| | | } |
| | | else if (DB_ResidenceData.residenceData.rooms.Count < 3) |
| | | else if (DB_ResidenceData.rooms.Count < 3) |
| | | { |
| | | dispalyView = new FrameLayout() |
| | | { |
| | |
| | | contentView.Height = Application.GetRealHeight(45 * 3); |
| | | dispalyView.AddChidren(contentView); |
| | | } |
| | | else if (DB_ResidenceData.residenceData.rooms.Count < 4) |
| | | else if (DB_ResidenceData.rooms.Count < 4) |
| | | { |
| | | dispalyView = new FrameLayout() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | foreach (var roomTemp in DB_ResidenceData.residenceData.rooms) |
| | | foreach (var roomTemp in DB_ResidenceData.rooms) |
| | | { |
| | | string roomName = roomTemp.name; |
| | | var btnRoomName = new Button() |