| | |
| | | { |
| | | |
| | | #region 控件集合 |
| | | FrameLayout bodyView; |
| | | static DimmerPage bodyView; |
| | | /// <summary> |
| | | /// 控制界面加载区域 |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | Button btnCollection; |
| | | /// <summary> |
| | | /// 调光控件 |
| | | /// </summary> |
| | | WaveSeekBar dimmerBar; |
| | | /// <summary> |
| | | /// 开关按钮 |
| | | /// </summary> |
| | | Button btnSwitch; |
| | |
| | | Button btnCollection_Out; |
| | | Button btnFunctionName_Out; |
| | | Button btnFromFloor_Out; |
| | | bool onDimmerBar = false; |
| | | /// <summary> |
| | | /// 刷新显示信息 |
| | | /// </summary> |
| | | Action actionRefresh; |
| | | #endregion |
| | | |
| | | public override void RemoveFromParent() |
| | | { |
| | | base.RemoveFromParent(); |
| | | bodyView = null; |
| | | } |
| | | |
| | | public DimmerPage(Light func) |
| | | { |
| | |
| | | }; |
| | | controlView.AddChidren(btnCollection); |
| | | |
| | | var diyImageSeekBar = new WaveSeekBar() |
| | | dimmerBar = new WaveSeekBar() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(74+16), |
| | | Width = Application.GetRealWidth(168-40), |
| | | Height = Application.GetRealHeight(288-16-16), |
| | | WaveColor = CSS_Color.AuxiliaryColor1, |
| | | Y = Application.GetRealHeight(74 + 16), |
| | | Width = Application.GetRealWidth(168 - 40), |
| | | Height = Application.GetRealHeight(288 - 16 - 16), |
| | | WaveColor = light.on_off == "on" ? CSS_Color.AuxiliaryColor1 : CSS_Color.DividingLineColor, |
| | | WaveBorderColor = CSS_Color.PromptingColor2, |
| | | BorderColor = 0x00000000, |
| | | CornerRadius = Application.GetRealWidth(1), |
| | | BorderWidth = 0, |
| | | WavePadding =Application.GetRealWidth(-5), |
| | | WavePadding = Application.GetRealWidth(-5), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(40), |
| | | |
| | | Progress = light.brightness, |
| | | }; |
| | | controlView.AddChidren(diyImageSeekBar); |
| | | controlView.AddChidren(dimmerBar); |
| | | |
| | | #region 渐变时间调节 |
| | | var btnGradualChangeText = new Button() |
| | |
| | | controlView.AddChidren(btnGradualChangeMaxValuesText); |
| | | #endregion |
| | | |
| | | |
| | | btnSwitch = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | |
| | | Height = Application.GetMinRealAverage(40), |
| | | UnSelectedImagePath = "Public/PowerClose.png", |
| | | SelectedImagePath = "Public/PowerOpen.png", |
| | | IsSelected = light.state != 0 |
| | | IsSelected = light.on_off == "on", |
| | | //Tag = |
| | | }; |
| | | controlView.AddChidren(btnSwitch); |
| | | |