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 控件列表
|
/// <summary>
|
/// 当前窗体
|
/// </summary>
|
static FrameLayout bodyView;
|
/// <summary>
|
/// 楼层选择下拉图标
|
/// </summary>
|
Button btnFloorDownIcon;
|
/// <summary>
|
/// 楼层显示
|
/// </summary>
|
Button btnFloor;
|
/// <summary>
|
/// 功能列表集合显示区域
|
/// </summary>
|
static VerticalScrolViewLayout functionListView;
|
#endregion
|
|
List<Function> functionList;
|
|
public AddLightScene()
|
{
|
bodyView = this;
|
functionList = new List<Function>();
|
}
|
|
public void LoadPage(int titleId)
|
{
|
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
|
new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
|
|
/// <summary>
|
/// 房间内容显示区域
|
/// </summary>
|
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());
|
|
|
}
|
|
}
|
}
|