using System;
using System.Collections.Generic;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI
{
public class AddLightScene : FrameLayout
{
#region 控件列表
///
/// 当前窗体
///
static FrameLayout bodyView;
///
/// 楼层选择下拉图标
///
Button btnFloorDownIcon;
///
/// 楼层显示
///
Button btnFloor;
///
/// 功能列表集合显示区域
///
static VerticalScrolViewLayout functionListView;
#endregion
List functionList;
public AddLightScene()
{
bodyView = this;
functionList = new List();
}
public void LoadPage(int titleId)
{
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
///
/// 房间内容显示区域
///
var roomFloorChangeView = new FrameLayout()
{
Y = Application.GetRealHeight(64),
Height = Application.GetRealHeight(52),
};
bodyView.AddChidren(roomFloorChangeView);
#region 房间顶部切换显示区域
btnFloorDownIcon = new Button()
{
Width = Application.GetMinRealAverage(16),
Height = Application.GetMinRealAverage(16),
X = Application.GetRealWidth(16),
Y = Application.GetRealHeight(18),
UnSelectedImagePath = "Public/DownIcon.png",
};
roomFloorChangeView.AddChidren(btnFloorDownIcon);
btnFloor = new Button()
{
X = btnFloorDownIcon.Right,
Y = Application.GetRealHeight(18),
Width = Application.GetRealWidth(200),
Height = Application.GetMinRealAverage(16),
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
TextAlignment = TextAlignment.CenterLeft,
Text = DB_ResidenceData.Instance.CurFloor.roomName,
};
roomFloorChangeView.AddChidren(btnFloor);
#endregion
functionListView = new VerticalScrolViewLayout()
{
Y = Application.GetRealHeight(64 + 52),
Height = Application.GetRealHeight(603 - 12 - 52),
};
bodyView.AddChidren(functionListView);
functionList.AddRange(FunctionList.List.GetLightList());
}
}
}