黄学彪
2020-12-17 6c0c799c1f5da2d215ec8d9df9b92b3d1948dc14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
using System;
using Shared;
namespace HDL_ON.UI.UI2.Intelligence.Automation.LogicView
{
    public class BrightnessView
    {
        /// <summary>
        /// 主控件
        /// </summary>
        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),
        };
        /// <summary>
        /// 标题Btn
        /// </summary>
        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)
        };
        /// <summary>
        /// 取消Btn
        /// </summary>
        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)
        };
        /// <summary>
        /// 确定Btn
        /// </summary>
        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),
        };
        /// <summary>
        /// 图标-
        /// </summary>
        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",
        };
        /// <summary>
        /// 图标-扩大热键
        /// </summary>
        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),//进度条的高度
        };
        /// <summary>
        /// 图标+
        /// </summary>
        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",
 
        };
        /// <summary>
        /// 图标+扩大热键
        /// </summary>
        public Button btn_add_click = new Button
        {
            Width = Application.GetMinRealAverage(24+20),
            Height = Application.GetMinRealAverage(24),
            X = Application.GetRealWidth(294),
            Y = Application.GetRealHeight(118),
        };
        /// <summary>
        /// View的方法
        /// </summary>
        /// <param name="fLayout"></param>
        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();
            };
 
        }
    }
}