using System;
using System.Collections.Generic;
using Shared.Common;
using Shared.R;
using ZigBee.Device;
namespace Shared.Phone.Device.Logic
{
public class TopView
{
#region 最上面那块控件
///
/// 最上面块View
///
public RowLayout topRowLayout = new RowLayout
{
BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
Height = Application.GetRealHeight(184),
LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
///
/// 标题Btn
///
public Button toptitleNameBtn = new Button
{
TextSize = 17,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
X = Application.GetRealWidth(176),
Width = Application.GetRealWidth(600),
Height = Application.GetRealHeight(69),
Y = Application.GetRealHeight(92),
IsBold = true
};
///
/// 后退Btn
///
public Button backBtn = new Button
{
Width = Application.GetRealWidth(30),
Height = Application.GetRealHeight(51),
X = Application.GetRealWidth(81),
Y = Application.GetRealHeight(98),
//Gravity = Gravity.CenterVertical;
UnSelectedImagePath = "ZigeeLogic/back.png",
};
///
/// 增加热键大小Btn
///
public Button clickBtn = new Button
{
Width = Application.GetRealWidth(81 + 51),
Height = Application.GetRealHeight(58 + 40),
Y = Application.GetRealHeight(98 - 40),
};
///
/// 显示层楼Btn
///
public Button foolrnameBtn = new Button
{
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterRight,
X = Application.GetRealWidth(1080 - 400 - 120),
Width = Application.GetRealWidth(400),
Height = Application.GetRealHeight(69),
Y = Application.GetRealHeight(92),
Text = Config.Instance.Home.GetCurrentFloorName,
};
///
/// 下拉图标Btn
///
public Button dropdownBtn = new Button
{
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterRight,
X = Application.GetRealWidth(1080 - 120),
Width = Application.GetRealWidth(72),
Height = Application.GetRealHeight(72),
Y = Application.GetRealHeight(92),
UnSelectedImagePath = "ZigeeLogic/drop-down.png",
};
///
/// 增加热键大小Btn
///
public Button foolrclickBtn = new Button
{
Width = Application.GetRealWidth(400 + 120),
Height = Application.GetRealHeight(72),
Y = Application.GetRealHeight(92),
X = Application.GetRealWidth(1080 - 400 - 120),
};
///
/// 最上面的那块方法
///
///
///
public RowLayout TopRowView(bool yes = false)
{
topRowLayout.AddChidren(toptitleNameBtn);
topRowLayout.AddChidren(backBtn);
topRowLayout.AddChidren(clickBtn);
if (yes)
{
topRowLayout.AddChidren(foolrnameBtn);
topRowLayout.AddChidren(dropdownBtn);
topRowLayout.AddChidren(foolrclickBtn);
}
return topRowLayout;
}
#endregion
}
}