using System; using Shared.Common; namespace Shared.Phone.Device.CommonForm { public class SceneTargetFunctionRow : FrameLayout { /// /// TipBtn /// public Button Icon; /// /// TitleBtn /// public Button StatuBtn; /// /// NameBtn /// private Button NameBtn; /// /// ZoneBtn /// private Button ZoneBtn; /// /// line /// private Button line; /// /// SceneTargetRow /// /// public SceneTargetFunctionRow(int y) { X = Application.GetRealWidth(0); Y = Application.GetRealHeight(y); Width = Application.GetRealWidth(1080); Height = Application.GetRealHeight(127 - 2); } /// /// Init /// public void Init() { Icon = new Button { X = Application.GetRealWidth(104), Width = Application.GetMinRealAverage(80), Height = Application.GetMinRealAverage(80), Gravity = Gravity.CenterVertical }; AddChidren(Icon); NameBtn = new Button { X = Application.GetRealWidth(219), Y = Application.GetRealHeight(14), Width = Application.GetRealWidth(400), Height = Application.GetRealHeight(58), TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextAlignment = TextAlignment.CenterLeft, TextID = R.MyInternationalizationString.Delay, TextSize = 14 }; AddChidren(NameBtn); ZoneBtn = new Button { X = Application.GetRealWidth(219), Y = Application.GetRealHeight(72), Width = Application.GetRealWidth(400), Height = Application.GetRealHeight(49), TextAlignment = TextAlignment.CenterLeft, TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2, TextSize = 12 }; AddChidren(ZoneBtn); StatuBtn = new Button { X = Application.GetRealWidth(650), Width = Application.GetRealWidth(350), Height = Application.GetRealHeight(100), Gravity = Gravity.CenterVertical, TextAlignment = TextAlignment.CenterRight, TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2, TextSize = 14 }; AddChidren(StatuBtn); line = new Button() { X = Application.GetRealWidth(222), Y = Height - 1, Width = Application.GetRealWidth(800), Height = 1, BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2, }; AddChidren(line); } /// /// SetStatuText /// /// public void SetStatuText(string title) { StatuBtn.Text = title; } /// /// SetIcon /// /// public void SetIcon(string imagePath) { Icon.UnSelectedImagePath = imagePath; } /// /// SetZoneText /// /// public void SetZoneText(string title) { ZoneBtn.Text = title; } /// /// SetNameText /// /// public void SetNameText(string title) { NameBtn.Text = title; } /// /// HideLine /// /// public void HideLine(bool hiden) { line.Visible = !hiden; } } }