using System;
using Shared.Common;
namespace Shared.Phone.Device.CommonForm
{
public class SceneTargetFunctionRow : FrameLayout
{
///
/// TipBtn
///
public Button Icon;
///
/// TitleBtn
///
public Button StatuBtn;
///
/// NameBtn
///
private Button NameBtn;
///
/// ZoneBtn
///
private Button ZoneBtn;
///
/// line
///
private Button line;
///
/// SceneTargetRow
///
///
public SceneTargetFunctionRow(int y)
{
X = Application.GetRealWidth(0);
Y = Application.GetRealHeight(y);
Width = Application.GetRealWidth(1080);
Height = Application.GetRealHeight(127);
}
///
/// Init
///
public void Init()
{
Icon = new Button
{
X = Application.GetRealWidth(104),
Width = Application.GetMinRealAverage(80),
Height = Application.GetMinRealAverage(80),
Gravity = Gravity.CenterVertical
};
AddChidren(Icon);
NameBtn = new Button
{
X = Application.GetRealWidth(219),
Y = Application.GetRealHeight(14),
Width = Application.GetRealWidth(300),
Height = Application.GetRealHeight(58),
TextColor = ZigbeeColor.Current.GXCTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
TextID = R.MyInternationalizationString.Delay
};
AddChidren(NameBtn);
ZoneBtn = new Button
{
X = Application.GetRealWidth(219),
Y = Application.GetRealHeight(72),
Width = Application.GetRealWidth(200),
Height = Application.GetRealHeight(49),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2
};
AddChidren(ZoneBtn);
StatuBtn = new Button
{
X = Application.GetRealWidth(510),
Width = Application.GetRealWidth(500),
Height = Application.GetRealHeight(100),
Gravity = Gravity.CenterVertical,
TextAlignment = TextAlignment.CenterRight,
TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2
};
AddChidren(StatuBtn);
line = new Button()
{
X = Application.GetRealWidth(222),
Y = Height - 2,
Width = Application.GetRealWidth(800),
Height = 2,
BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2,
};
AddChidren(line);
}
///
/// SetStatuText
///
///
public void SetStatuText(string title)
{
StatuBtn.Text = title;
}
///
/// SetIcon
///
///
public void SetIcon(string imagePath)
{
Icon.UnSelectedImagePath = imagePath;
}
///
/// SetZoneText
///
///
public void SetZoneText(string title)
{
ZoneBtn.Text = title;
}
///
/// SetNameText
///
///
public void SetNameText(string title)
{
NameBtn.Text = title;
}
///
/// HideLine
///
///
public void HideLine(bool hiden)
{
line.Visible = hiden;
}
}
}