| | |
| | | //2020-12-03 修改图片加载方法 |
| | | ImageUtlis.Current.LoadLocalOrNetworkImages(room.backgroundImage, roomViewbg); |
| | | |
| | | var roomViewbgColor = new Button() |
| | | { |
| | | Height = Application.GetRealWidth(192), |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BackgroundColor = 0xFFFFFFFF, |
| | | }; |
| | | roomView.AddChidren(roomViewbgColor); |
| | | |
| | | var btnFloorAndRoomName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | |
| | | Text = room.floorName + room.roomName, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextSize = CSS_FontSize.HeadlineFontSize, |
| | | IsBold = true, |
| | | }; |
| | | roomView.AddChidren(btnFloorAndRoomName); |
| | | |
| | | #region 环境数据 |
| | | //var environmentalView = new FrameLayout() |
| | | //{ |
| | | // Y = Application.GetRealHeight(2) + btnFloorAndRoomName.Bottom, |
| | | // Height = Application.GetRealHeight(32), |
| | | // Tag = "EnvironmentalView", |
| | | //}; |
| | | //roomView.AddChidren(environmentalView); |
| | | |
| | | //Button btnTempIcon = new Button() |
| | | //{ |
| | | // X = Application.GetRealWidth(12), |
| | | // Gravity = Gravity.CenterVertical, |
| | | // Width = Application.GetMinRealAverage(16), |
| | | // Height = Application.GetMinRealAverage(16), |
| | | // UnSelectedImagePath = "Public/DeviceInfoIcon/TempIcon.png", |
| | | //}; |
| | | //environmentalView.AddChidren(btnTempIcon); |
| | | |
| | | //var btnTempValues = new Button() |
| | | //{ |
| | | // X = btnTempIcon.Right + Application.GetRealWidth(4), |
| | | // Width = Application.GetRealWidth(30), |
| | | // Gravity = Gravity.CenterVertical, |
| | | // TextColor = CSS_Color.MainBackgroundColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | // Text = "--°", |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // Tag = "TempValues" |
| | | //}; |
| | | //environmentalView.AddChidren(btnTempValues); |
| | | |
| | | //Button btnHumidityIcon = new Button() |
| | | //{ |
| | | // X = btnTempValues.Right + Application.GetRealWidth(2), |
| | | // Gravity = Gravity.CenterVertical, |
| | | // Width = Application.GetMinRealAverage(16), |
| | | // Height = Application.GetMinRealAverage(16), |
| | | // UnSelectedImagePath = "Public/DeviceInfoIcon/HumidityIcon.png", |
| | | //}; |
| | | //environmentalView.AddChidren(btnHumidityIcon); |
| | | |
| | | //var btnHumidityValues = new Button() |
| | | //{ |
| | | // X = btnHumidityIcon.Right + Application.GetRealWidth(4), |
| | | // Width = Application.GetRealWidth(30), |
| | | // Gravity = Gravity.CenterVertical, |
| | | // TextColor = CSS_Color.MainBackgroundColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | // Text = "--%", |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // Tag = "HumidityValues" |
| | | //}; |
| | | //environmentalView.AddChidren(btnHumidityValues); |
| | | |
| | | //Button btnPm25Icon = new Button() |
| | | //{ |
| | | // X = btnHumidityValues.Right + Application.GetRealWidth(2), |
| | | // Gravity = Gravity.CenterVertical, |
| | | // Width = Application.GetMinRealAverage(16), |
| | | // Height = Application.GetMinRealAverage(16), |
| | | // UnSelectedImagePath = "Public/DeviceInfoIcon/Pm25Icon.png", |
| | | //}; |
| | | //environmentalView.AddChidren(btnPm25Icon); |
| | | |
| | | //var btnPm25Values = new Button() |
| | | //{ |
| | | // X = btnPm25Icon.Right + Application.GetRealWidth(4), |
| | | // Width = Application.GetRealWidth(30), |
| | | // Gravity = Gravity.CenterVertical, |
| | | // TextColor = CSS_Color.MainBackgroundColor, |
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | // Text = "--", |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // Tag = "Pm25Values" |
| | | //}; |
| | | //environmentalView.AddChidren(btnPm25Values); |
| | | //roomView.AddChidren(environmentalView); |
| | | #endregion |
| | | |
| | | var roomViewbgColor = new Button() |
| | | { |
| | | Height = Application.GetRealWidth(192), |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BackgroundColor = 0x19333333, |
| | | }; |
| | | roomView.AddChidren(roomViewbgColor); |
| | | |
| | | var btnAllClose = new Button() |
| | | { |
| | |
| | | }; |
| | | roomView.AddChidren(btnAllClose); |
| | | LoadEvent_CloseAllFunction(btnAllClose, room); |
| | | |
| | | //var btn = new Button() |
| | | //{ |
| | | // Y = Application.GetRealWidth(192), |
| | | // Height = Application.GetRealWidth(20), |
| | | // BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | //}; |
| | | //roomView.AddChidren(btn); |
| | | |
| | | roomViewbgColor.MouseUpEventHandler += (sender, e) => |
| | | { |