using System; using Shared; using HDL_ON.Entity; using HDL_ON.UI.CSS; namespace HDL_ON.UI { public class AddCombineDimmingPage : FrameLayout { FrameLayout bodyView; public AddCombineDimmingPage() { bodyView = this; } public void LoadPage() { new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView(); var contentView = new FrameLayout() { Y = Application.GetRealHeight(64), BackgroundColor = CSS_Color.MainBackgroundColor, Height = Application.GetRealHeight(550), }; bodyView.AddChidren(contentView); #region 住宅名称 FrameLayout residenceNameRow; residenceNameRow = new FrameLayout() { Y = Application.GetRealHeight(72), Height = Application.GetRealHeight(50), BackgroundColor = CSS_Color.MainBackgroundColor, }; contentView.AddChidren(residenceNameRow); Button btnResidenceNameTitle = new Button() { X = Application.GetRealWidth(16), Width = Application.GetRealWidth(78), TextID = StringId.ResidenceName, TextAlignment = TextAlignment.CenterLeft, TextSize = CSS_FontSize.SubheadingFontSize, TextColor = CSS_Color.FirstLevelTitleColor, }; residenceNameRow.AddChidren(btnResidenceNameTitle); var btnResidenceName = new Button() { X = Application.GetRealWidth(2) + btnResidenceNameTitle.Right, Width = Application.GetRealWidth(200), Text = DB_ResidenceData.Instance.CurrentRegion.homeName, TextSize = CSS_FontSize.TextFontSize, TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.TextualColor, }; residenceNameRow.AddChidren(btnResidenceName); var btnEditResidenceNameIcon = new Button() { X = Application.GetRealWidth(333), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(28), Height = Application.GetMinRealAverage(28), UnSelectedImagePath = "Public/Edit.png", }; residenceNameRow.AddChidren(btnEditResidenceNameIcon); #endregion residenceNameRow.AddChidren( new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor, }); #region 住宅地址 var residenceAddressRow = new FrameLayout() { Y = residenceNameRow.Bottom, Height = Application.GetRealHeight(50), BackgroundColor = CSS_Color.MainBackgroundColor, }; contentView.AddChidren(residenceAddressRow); var btnResidenceAddressTitle = new Button() { X = Application.GetRealWidth(16), Width = Application.GetRealWidth(78), TextID = StringId.ResidenceAddress, TextAlignment = TextAlignment.CenterLeft, TextSize = CSS_FontSize.SubheadingFontSize, TextColor = CSS_Color.FirstLevelTitleColor, }; residenceAddressRow.AddChidren(btnResidenceAddressTitle); var btnLocationAddressIcon = new Button() { X = Application.GetRealWidth(333), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(28), Height = Application.GetMinRealAverage(28), //UnSelectedImagePath = "Public/LocationAddressIcon.png", UnSelectedImagePath = "Public/Edit.png", }; residenceAddressRow.AddChidren(btnLocationAddressIcon); var btnResidenceAddress = new Button() { X = Application.GetRealWidth(2) + btnResidenceNameTitle.Right, Width = Application.GetRealWidth(200), Text = DB_ResidenceData.Instance.CurrentRegion.homeAddress, TextSize = CSS_FontSize.TextFontSize, TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.TextualColor, }; residenceAddressRow.AddChidren(btnResidenceAddress); #endregion contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); } } }