using System; using Shared; namespace HDL_ON.UI.UI2.Intelligence.Automation.LogicView { public class BrightnessView { /// /// 主控件 /// public FrameLayout frameLayout = new FrameLayout { Y = Application.GetRealHeight(467), Height = Application.GetRealHeight(56 + 124), Width = Application.GetRealWidth(343), X = Application.GetRealWidth(16), BackgroundColor = CSS.CSS_Color.view, Radius = (uint)Application.GetRealHeight(12), }; /// /// 标题Btn /// public Button btnTitle = new Button { TextID = StringId.timeHorizon, TextSize = TextSize.text16, TextColor = CSS.CSS_Color.textColor, IsBold = true, Width = Application.GetRealWidth(343 - (52 + 4 + 10) * 2), Height = Application.GetRealHeight(22), Y = Application.GetRealHeight(17), X = Application.GetRealWidth(52 + 4 + 10) }; /// /// 取消Btn /// public Button btnCancel = new Button { TextID = StringId.cancelSelected, TextSize = TextSize.text14, TextColor = CSS.CSS_Color.textCancelColor, Width = Application.GetRealWidth(52), Height = Application.GetRealHeight(32), Y = Application.GetRealHeight(10), X = Application.GetRealWidth(4) }; /// /// 确定Btn /// public Button btnConfirm = new Button { TextID = StringId.confirmSelected, TextSize = TextSize.text14, TextColor = CSS.CSS_Color.textConfirmColor, Width = Application.GetRealWidth(52), Height = Application.GetRealHeight(32), X = Application.GetRealWidth(343 - 4 - 52), Y = Application.GetRealHeight(10), }; /// /// 图标- /// public Button btn_subtract = new Button { Width = Application.GetRealWidth(24), Height = Application.GetRealWidth(24), X = Application.GetRealWidth(26), Y = Application.GetRealHeight(118), UnSelectedImagePath = "LogicIcon/-.png", }; /// /// 图标-扩大热键 /// public Button btn_subtract_click = new Button { Width = Application.GetMinRealAverage(24+20), Height = Application.GetMinRealAverage(24), X = Application.GetRealWidth(26-20), Y = Application.GetRealHeight(118), }; public DiyImageSeekBar seekBarVol = new DiyImageSeekBar { Y = Application.GetRealHeight(103),//进度条父控件Y坐标 X = Application.GetRealWidth(62-10),//进度条X坐标 SeekBarPadding=Application.GetRealHeight(10),//进度条实际长度=244-10*2(内边距); Width = Application.GetRealWidth(240),//进度条的长度 Height = Application.GetRealHeight(54),//进度条父控件高度 IsProgressTextShow = true,//显示百分比 IsClickable = true,//进度条是否滑动 ProgressBarColor =CSS.CSS_Color.textConfirmColor,//选中进度条颜色 ThumbImagePath = "LogicIcon/point.png",//进度条按钮图标 ThumbImageHeight = Application.GetRealHeight(54),//进度条按钮图标的高度(默认正方形:宽和高一样) ProgressTextColor = CSS.CSS_Color.textColor, ProgressTextSize = 10,//显示百分比字体大小 SeekBarViewHeight = Application.GetRealHeight(8),//进度条的高度 }; /// /// 图标+ /// public Button btn_add = new Button { Width = Application.GetRealWidth(24), Height = Application.GetRealWidth(24), X = Application.GetRealWidth(294), Y = Application.GetRealHeight(118), UnSelectedImagePath = "LogicIcon/+.png", }; /// /// 图标+扩大热键 /// public Button btn_add_click = new Button { Width = Application.GetMinRealAverage(24+20), Height = Application.GetMinRealAverage(24), X = Application.GetRealWidth(294), Y = Application.GetRealHeight(118), }; /// /// View的方法 /// /// public void FLayoutView(FrameLayout fLayout) { fLayout.AddChidren(frameLayout); frameLayout.AddChidren(btnTitle); frameLayout.AddChidren(btnCancel); frameLayout.AddChidren(btnConfirm); frameLayout.AddChidren(btn_subtract); frameLayout.AddChidren(btn_subtract_click); frameLayout.AddChidren(seekBarVol); frameLayout.AddChidren(btn_add); frameLayout.AddChidren(btn_add_click); //取消点击事件 btnCancel.MouseUpEventHandler += (sender, e1) => { //移除fLayout界面 fLayout.RemoveFromParent(); }; } } }