using System; using Shared.Common; using ZigBee.Device; namespace Shared.Phone.UserCenter.DeviceBind { public class BindCommonLayout : FrameLayout { public BindCommonLayout() { } #region ◆ 变量申明__________________________ public FrameLayout topFrameLayout = new FrameLayout { Height = Application.GetRealHeight(184), BackgroundColor = ZigbeeColor.Current.XMTopFrameLayout }; public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1925 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout }; public FrameLayout bottomRadiusFrameLayout = new FrameLayout() { Height = Application.GetRealHeight(100), Y = Application.GetRealHeight(930), Radius = 17, BackgroundColor = ZigbeeColor.Current.XMWhite, }; public FrameLayout titleFrameLayout = new FrameLayout { Y = Application.GetRealHeight(92), Height = Application.GetRealHeight(69), }; public Button btnTitle = new Button { TextAlignment = TextAlignment.CenterLeft, TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText, X = Application.GetRealWidth(161), Width = Application.GetRealWidth(1080 - 161), Height = Application.GetRealWidth(69), IsBold = true, TextSize = 17, }; public FrameLayout btnBackFrameLayout = new FrameLayout { X = Application.GetRealWidth(58), Height = Application.GetRealHeight(58), Width = Application.GetRealWidth(58), }; public Button btnBack = new Button { Height = Application.GetMinReal(51), Width = Application.GetMinReal(30), UnSelectedImagePath = "DoorLock/Left.png", }; public Button btnTitleLine = new Button { Y = Application.GetRealHeight(181), Height = 1, BackgroundColor = Shared.Common.ZigbeeColor.Current.XMTitleLine, }; #endregion /// /// 门锁顶部布局 /// /// public void TopFrameLayout(FrameLayout frameLayout, string titleText) { this.AddChidren(topFrameLayout); topFrameLayout.AddChidren(titleFrameLayout); topFrameLayout.AddChidren(btnTitleLine); titleFrameLayout.AddChidren(btnTitle); btnTitle.Text = titleText; titleFrameLayout.AddChidren(btnBackFrameLayout); btnBackFrameLayout.AddChidren(btnBack); } /// /// 门锁中部布局 /// /// public void MidFrameLayout(FrameLayout frameLayout) { //midFrameLayout.BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCBackgroundColor; midFrameLayout.Y = topFrameLayout.Bottom; this.AddChidren(midFrameLayout); } /// /// 门锁底部布局 /// /// public void BottomFrameLayout(FrameLayout frameLayout) { var bottomFrameLayout1 = new FrameLayout() { Height = Application.GetRealHeight(806 - 50), Y = Application.GetRealHeight(930 + 48), BackgroundColor = ZigbeeColor.Current.XMWhite, }; this.midFrameLayout.AddChidren(bottomFrameLayout1); } } }