using System;
|
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
|
using Shared;
|
|
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
|
{
|
public class ControlView
|
{
|
/// <summary>
|
/// 父控件
|
/// </summary>
|
public RowLayout funControlRow = new RowLayout
|
{
|
Width = Application.GetRealWidth(375 - 16 * 2),
|
Height = Application.GetRealHeight(50),
|
LineColor = CSS.CSS_Color.textWhiteColor,
|
SubViewWidth = Application.GetRealWidth(68),
|
};
|
/// <summary>
|
/// 遥控器名称
|
/// </summary>
|
public Button nameBtn = new Button
|
{
|
X = Application.GetRealWidth(16),
|
Width = Application.GetRealWidth(150),
|
Height = Application.GetRealHeight(20),
|
//Text = control.name,
|
TextAlignment = TextAlignment.CenterLeft,
|
TextSize = TextSize.text14,
|
TextColor = CSS.CSS_Color.textColor,
|
Gravity = Gravity.CenterVertical,
|
};
|
|
/// <summary>
|
/// 遥控器区域
|
/// </summary>
|
public Button areaBtn = new Button
|
{
|
X = Application.GetRealWidth(311 + 16 - (40 + 100)),
|
Width = Application.GetRealWidth(100),
|
Height = Application.GetRealHeight(17),
|
//Text = Intelligence.Automation.LogicMethod.GetGetRoomName(control),
|
TextAlignment = TextAlignment.CenterRight,
|
TextSize = TextSize.text12,
|
TextColor = CSS.CSS_Color.textCancelColor,
|
Gravity = Gravity.CenterVertical,
|
};
|
|
/// <summary>
|
/// 下一级图标
|
/// </summary>
|
public Button nextIconBtn = new Button
|
{
|
X = Application.GetRealWidth(295 + 16),
|
Width = Application.GetRealWidth(16),
|
Height = Application.GetRealWidth(16),
|
UnSelectedImagePath = "PirIcon/next.png",
|
Gravity = Gravity.CenterVertical,
|
};
|
|
|
/// <summary>
|
/// 删除
|
/// </summary>
|
public Button delBtn = new Button
|
{
|
Width = Application.GetRealWidth(50),
|
Height = Application.GetRealHeight(22),
|
TextID = StringId.Del,
|
TextAlignment = TextAlignment.Center,
|
TextSize = TextSize.text16,
|
TextColor = CSS.CSS_Color.textWhiteColor,
|
IsBold = true,
|
BackgroundColor = CSS.CSS_Color.textRedColor,
|
//Tag = control,
|
};
|
|
/// <summary>
|
/// 线
|
/// </summary>
|
public Button line1Btn = new Button
|
{
|
Y = Application.GetRealHeight(50 - 2),
|
X = Application.GetRealWidth(16),
|
Width = Application.GetRealWidth(311),
|
Height = 1,
|
BackgroundColor = CSS.CSS_Color.viewLine,
|
};
|
/// <summary>
|
/// 点击事件
|
/// </summary>
|
public Button clickBtn = new Button
|
{
|
Width = Application.GetRealWidth(375 - 16 * 2),
|
Height = Application.GetRealHeight(50),
|
};
|
/// <summary>
|
/// view方法
|
/// </summary>
|
/// <param name="frame"></param>
|
public void Show(FrameLayout frame, int i)
|
{
|
funControlRow.Y = Application.GetRealHeight(92 + (50 * i));
|
frame.AddChidren(funControlRow);
|
funControlRow.AddChidren(nameBtn);
|
funControlRow.AddChidren(areaBtn);
|
funControlRow.AddChidren(nextIconBtn);
|
funControlRow.AddRightView(delBtn);
|
funControlRow.AddChidren(line1Btn);
|
funControlRow.AddChidren(clickBtn);
|
}
|
}
|
}
|