using System;
|
using Shared.Common;
|
namespace Shared.Phone.Device.CommonForm
|
{
|
public class SceneTargetTimeRow:FrameLayout
|
{
|
/// <summary>
|
/// TipBtn
|
/// </summary>
|
public Button Icon;
|
/// <summary>
|
/// tipBtn
|
/// </summary>
|
public Button TipBtn;
|
/// <summary>
|
/// TitleBtn
|
/// </summary>
|
public Button TitleBtn;
|
/// <summary>
|
/// line
|
/// </summary>
|
private Button line;
|
/// <summary>
|
/// SceneTargetRow
|
/// </summary>
|
/// <param name="y"></param>
|
public SceneTargetTimeRow(int y)
|
{
|
X = Application.GetRealWidth(0);
|
Y = Application.GetRealHeight(y);
|
Width = Application.GetRealWidth(1080);
|
Height = Application.GetRealHeight(127);
|
}
|
|
/// <summary>
|
/// Init
|
/// </summary>
|
public void Init()
|
{
|
Icon = new Button
|
{
|
X = Application.GetRealWidth(104),
|
Width = Application.GetMinRealAverage(80),
|
Height = Application.GetMinRealAverage(80),
|
Gravity = Gravity.CenterVertical,
|
UnSelectedImagePath="Item/Timer.png"
|
};
|
AddChidren(Icon);
|
|
TipBtn = new Button
|
{
|
X = Application.GetRealWidth(219),
|
Width = Application.GetRealWidth(200),
|
Height = Application.GetRealHeight(100),
|
Gravity = Gravity.CenterVertical,
|
TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2,
|
TextAlignment = TextAlignment.CenterLeft,
|
TextID=R.MyInternationalizationString.Delay
|
};
|
AddChidren(TipBtn);
|
|
TitleBtn = 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(TitleBtn);
|
|
line = new Button()
|
{
|
X = Application.GetRealWidth(222),
|
Y = Height - 2,
|
Width = Application.GetRealWidth(800),
|
Height = 2,
|
BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2,
|
};
|
AddChidren(line);
|
}
|
|
/// <summary>
|
/// SetTitle
|
/// </summary>
|
/// <param name="title"></param>
|
public void SetTitle(string title)
|
{
|
TitleBtn.Text = title;
|
}
|
|
/// <summary>
|
/// HideLine
|
/// </summary>
|
/// <param name="hiden"></param>
|
public void HideLine(bool hiden)
|
{
|
line.Visible = hiden;
|
}
|
}
|
}
|