using System; using HDL_ON.UI.UI2.Intelligence.Automation.LogicView; using Shared; namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View { public class ControlView { /// /// 父控件 /// public RowLayout funControlRow = new RowLayout { Width = Application.GetRealWidth(375 - 16 * 2), Height = Application.GetRealHeight(50), LineColor = CSS.CSS_Color.textWhiteColor, SubViewWidth = Application.GetRealWidth(68), }; /// /// 遥控器名称 /// public Button nameBtn = new Button { X = Application.GetRealWidth(16), Width = Application.GetRealWidth(150), Height = Application.GetRealHeight(20), //Text = control.name, TextAlignment = TextAlignment.CenterLeft, TextSize = TextSize.text14, TextColor = CSS.CSS_Color.textColor, Gravity = Gravity.CenterVertical, }; /// /// 遥控器区域 /// public Button areaBtn = new Button { X = Application.GetRealWidth(311 + 16 - (40 + 100)), Width = Application.GetRealWidth(100), Height = Application.GetRealHeight(17), //Text = Intelligence.Automation.LogicMethod.GetGetRoomName(control), TextAlignment = TextAlignment.CenterRight, TextSize = TextSize.text12, TextColor = CSS.CSS_Color.textCancelColor, Gravity = Gravity.CenterVertical, }; /// /// 下一级图标 /// public Button nextIconBtn = new Button { X = Application.GetRealWidth(295 + 16), Width = Application.GetRealWidth(16), Height = Application.GetRealWidth(16), UnSelectedImagePath = "PirIcon/next.png", Gravity = Gravity.CenterVertical, }; /// /// 删除 /// public Button delBtn = new Button { Width = Application.GetRealWidth(50), Height = Application.GetRealHeight(22), TextID = StringId.Del, TextAlignment = TextAlignment.Center, TextSize = TextSize.text16, TextColor = CSS.CSS_Color.textWhiteColor, IsBold = true, BackgroundColor = CSS.CSS_Color.textRedColor, //Tag = control, }; /// /// 线 /// public Button line1Btn = new Button { Y = Application.GetRealHeight(50 - 2), X = Application.GetRealWidth(16), Width = Application.GetRealWidth(311), Height = 1, BackgroundColor = CSS.CSS_Color.viewLine, }; /// /// 点击事件 /// public Button clickBtn = new Button { Width = Application.GetRealWidth(375 - 16 * 2), Height = Application.GetRealHeight(50), }; /// /// view方法 /// /// public void Show(FrameLayout frame, int i) { funControlRow.Y = Application.GetRealHeight(92 + (50 * i)); frame.AddChidren(funControlRow); funControlRow.AddChidren(nameBtn); funControlRow.AddChidren(areaBtn); funControlRow.AddChidren(nextIconBtn); funControlRow.AddRightView(delBtn); funControlRow.AddChidren(line1Btn); funControlRow.AddChidren(clickBtn); } } }