| | |
| | | int attrViewHight = Application.GetRealHeight(18 + 22); |
| | | |
| | | |
| | | //只有继电器 |
| | | if (!hadDimming && !hadCCT && !hadRGB) |
| | | { |
| | | attrViewHight += Application.GetRealHeight(50); |
| | | if (hadRGB) |
| | | { |
| | | attrViewHight += Application.GetRealHeight(248); |
| | | hadDimming = true; |
| | | } |
| | | if (hadCCT) |
| | | { |
| | | attrViewHight += Application.GetRealHeight(75 + 11); |
| | | hadDimming = true; |
| | | } |
| | | if (hadDimming) |
| | | { |
| | | attrViewHight += Application.GetRealHeight(54 + 11); |
| | | } |
| | | attrView.Height = attrViewHight; |
| | | contentView.AddChidren(attrView); |
| | | attrView.AddChidren(new Button() { Height = Application.GetRealHeight(18) }); |
| | | |
| | | |
| | | if (hadDimming) |
| | | { |
| | | LoadDimmingAttrView(attrView); |
| | | } |
| | | if (hadCCT) |
| | | { |
| | | LoadCctAttrView(attrView); |
| | | } |
| | | if (hadRGB) |
| | | { |
| | | LoadRgbAttrView(attrView); |
| | | } |
| | | |
| | | var view = new FrameLayout() |
| | | { |
| | |
| | | group.Control(d); |
| | | }; |
| | | |
| | | } |
| | | |
| | | else |
| | | { |
| | | if (hadRGB) |
| | | { |
| | | attrViewHight += Application.GetRealHeight(248); |
| | | hadDimming = true; |
| | | } |
| | | if (hadCCT) |
| | | { |
| | | attrViewHight += Application.GetRealHeight(54 + 11); |
| | | hadDimming = true; |
| | | } |
| | | if (hadDimming) |
| | | { |
| | | attrViewHight += Application.GetRealHeight(54 + 11); |
| | | } |
| | | attrView.Height = attrViewHight; |
| | | contentView.AddChidren(attrView); |
| | | attrView.AddChidren(new Button() { Height = Application.GetRealHeight(18) }); |
| | | |
| | | |
| | | if (hadDimming) |
| | | { |
| | | LoadDimmingAttrView(attrView); |
| | | } |
| | | if (hadCCT) |
| | | { |
| | | LoadCctAttrView(attrView); |
| | | } |
| | | if (hadRGB) |
| | | { |
| | | LoadRgbAttrView(attrView); |
| | | } |
| | | } |
| | | |
| | | contentView.Height = Application.GetRealHeight(52 + 44) + attrViewHight; |
| | | contentView.Gravity = Gravity.Center; |
| | |
| | | #region 色温 |
| | | var cctView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(54 + 11) |
| | | Height = Application.GetRealHeight(75 + 11) |
| | | }; |
| | | attrView.AddChidren(cctView); |
| | | |
| | |
| | | btnTempClolor.X = Application.GetRealWidth(35); |
| | | btnTempClolor.Y = Application.GetRealHeight(1); |
| | | btnTempClolor.Width = Application.GetRealWidth(224); |
| | | btnTempClolor.Height = Application.GetRealHeight(21); |
| | | btnTempClolor.Height = Application.GetRealHeight(42); |
| | | btnTempClolor.TextAlignment = TextAlignment.CenterLeft; |
| | | btnTempClolor.TextColor = CSS_Color.FirstLevelTitleColor; |
| | | btnTempClolor.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; |