using System;
|
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
|
using Shared;
|
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
|
{
|
public class PirView
|
{
|
|
/// <summary>
|
/// 父控件
|
/// </summary>
|
public FrameLayout devfLayout = new FrameLayout
|
{
|
Y = Application.GetRealHeight(12),
|
X = Application.GetRealWidth(16),
|
Width = Application.GetRealWidth(375 - 16 * 2),
|
// Height = Application.GetRealHeight(92 + (50 * pirDevice.FunctioList.Count)),
|
BackgroundColor = CSS.CSS_Color.view,
|
Radius = (uint)Application.GetRealHeight(12),
|
};
|
/// <summary>
|
/// 图标
|
/// </summary>
|
public Button priequipmentBtn = new Button
|
{
|
Y = Application.GetRealHeight(16),
|
X = Application.GetRealWidth(5),
|
Width = Application.GetRealWidth(60),
|
Height = Application.GetRealWidth(60),
|
UnSelectedImagePath = "PirIcon/priequipment.png",
|
TextAlignment = TextAlignment.Center,
|
};
|
|
/// <summary>
|
/// 名称
|
/// </summary>
|
public Button deviceNameBtn = new Button
|
{
|
Y = Application.GetRealHeight(16),
|
X = Application.GetRealWidth(72),
|
Width = Application.GetRealWidth(120+80),
|
Height = Application.GetRealHeight(20),
|
//Text = pirDevice.name,
|
TextAlignment = TextAlignment.CenterLeft,
|
TextSize = TextSize.text14,
|
TextColor = CSS.CSS_Color.textColor,
|
IsBold = true,
|
};
|
|
/// <summary>
|
/// 当前个数
|
/// </summary>
|
public TextButton geBtn = new TextButton
|
{
|
Y = Application.GetRealHeight(40),
|
X = Application.GetRealWidth(72),
|
Width = Application.GetRealWidth(120),
|
Height = Application.GetRealHeight(17),
|
//Text = pirDevice.FunctioList.Count.ToString(),
|
TextAlignment = TextAlignment.CenterLeft,
|
TextSize = TextSize.text12,
|
TextColor = CSS.CSS_Color.textConfirmColor,
|
};
|
|
/// <summary>
|
/// 总数
|
/// </summary>
|
public Button sumBtn = new Button
|
{
|
Y = Application.GetRealHeight(40),
|
Width = Application.GetRealWidth(50),
|
Height = Application.GetRealHeight(17),
|
Text = "/10",
|
TextAlignment = TextAlignment.CenterLeft,
|
TextSize = TextSize.text12,
|
TextColor = CSS.CSS_Color.textCancelColor,
|
};
|
|
/// <summary>
|
/// 状态图标
|
/// </summary>
|
public Button stateIconBtn = new Button
|
{
|
Y = Application.GetRealHeight(23),
|
X = Application.GetRealWidth(291-5),
|
Width = Application.GetRealWidth(8),
|
Height = Application.GetRealWidth(8),
|
UnSelectedImagePath ="PirIcon/offline.png",
|
SelectedImagePath = "PirIcon/online.png",
|
};
|
|
/// <summary>
|
/// 红外宝状态(在线-离线)
|
/// </summary>
|
public Button stateTextBtn = new Button
|
{
|
Y = Application.GetRealHeight(18),
|
X = Application.GetRealWidth(303-5),
|
Width = Application.GetRealWidth(30+5),
|
Height = Application.GetRealHeight(17),
|
TextID = StringId.zaixianhwb,
|
TextAlignment = TextAlignment.CenterLeft,
|
TextSize = TextSize.text12,
|
TextColor = CSS.CSS_Color.textRedColor,// CSS.CSS_Color.textColor,
|
SelectedTextColor = 0xFF67D569,
|
IsBold = true,
|
};
|
/// <summary>
|
/// 线
|
/// </summary>
|
public Button lineBtn = new Button
|
{
|
Y = Application.GetRealHeight(92) - 1,
|
X = Application.GetRealWidth(16),
|
Width = Application.GetRealWidth(343 - 16 * 2),
|
Height = 1,
|
BackgroundColor = CSS.CSS_Color.viewLine,
|
};
|
|
/// <summary>
|
/// 点击事件
|
/// </summary>
|
public Button clickBtn = new Button
|
{
|
Y = Application.GetRealHeight(12),
|
X = Application.GetRealWidth(16),
|
Width = Application.GetRealWidth(375 - 16 * 2),
|
Height = Application.GetRealHeight(92),
|
BackgroundColor = 0x00000000, //CSS.CSS_Color.view,
|
Radius = (uint)Application.GetRealHeight(12),
|
//Tag = Pir.pirDeviceList[i],
|
};
|
/// <summary>
|
/// view方法
|
/// </summary>
|
/// <param name="i"></param>
|
/// <param name="fLayout"></param>
|
public void Show(int i, FrameLayout fLayout)
|
{
|
|
|
fLayout.AddChidren(devfLayout);
|
devfLayout.Height = Application.GetRealHeight(92 + (50 * i));
|
devfLayout.AddChidren(priequipmentBtn);
|
devfLayout.AddChidren(deviceNameBtn);
|
devfLayout.AddChidren(geBtn);
|
geBtn.Width = geBtn.GetTextWidth();
|
devfLayout.AddChidren(sumBtn);
|
sumBtn.X = geBtn.Right;
|
sumBtn.TextAlignment = TextAlignment.CenterLeft;
|
devfLayout.AddChidren(stateIconBtn);
|
devfLayout.AddChidren(stateTextBtn);
|
devfLayout.AddChidren(lineBtn);
|
devfLayout.AddChidren(clickBtn);
|
}
|
}
|
}
|