New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Shared.Common; |
| | | using Shared.R; |
| | | using ZigBee.Device; |
| | | namespace Shared.Phone.Device.Logic |
| | | { |
| | | public class TopView |
| | | { |
| | | #region 最上面那块控件 |
| | | /// <summary> |
| | | /// 最上面块View |
| | | /// </summary> |
| | | public RowLayout topRowLayout = new RowLayout |
| | | { |
| | | BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor, |
| | | Height = Application.GetRealHeight(184), |
| | | LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor, |
| | | }; |
| | | /// <summary> |
| | | /// 标题Btn |
| | | /// </summary> |
| | | 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 |
| | | }; |
| | | |
| | | /// <summary> |
| | | /// 后退Btn |
| | | /// </summary> |
| | | 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", |
| | | }; |
| | | /// <summary> |
| | | /// 增加热键大小Btn |
| | | /// </summary> |
| | | public Button clickBtn = new Button |
| | | { |
| | | Width = Application.GetRealWidth(81 + 51), |
| | | Height = Application.GetRealHeight(58 + 40), |
| | | Y = Application.GetRealHeight(98 - 40), |
| | | }; |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 显示层楼Btn |
| | | /// </summary> |
| | | 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, |
| | | }; |
| | | /// <summary> |
| | | /// 下拉图标Btn |
| | | /// </summary> |
| | | 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", |
| | | }; |
| | | /// <summary> |
| | | /// 增加热键大小Btn |
| | | /// </summary> |
| | | public Button foolrclickBtn = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400 + 120), |
| | | Height = Application.GetRealHeight(72), |
| | | Y = Application.GetRealHeight(92), |
| | | X = Application.GetRealWidth(1080 - 400 - 120), |
| | | }; |
| | | /// <summary> |
| | | /// 最上面的那块方法 |
| | | /// </summary> |
| | | /// <param name="yes"></param> |
| | | /// <returns></returns> |
| | | 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 |
| | | } |
| | | } |