wxr
2020-09-10 af1cb3ecd0f4b0589e00b28f7f9edccf39e6e12b
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
using System;
using Shared;
 
namespace HDL_ON.UI.Music
{
    public class MusicView
    {
        /// <summary>
        ///父控件
        /// </summary>
        public FrameLayout muiscFl = new FrameLayout
        {
            Height = Application.GetRealHeight(12 + 139),
            Width = Application.GetRealWidth(375),
        };
        /// <summary>
        ///白色背景的控件
        /// </summary>
        public FrameLayout musicIfonFl = new FrameLayout
        {
            X = Application.GetRealWidth(16),
            Y = Application.GetRealHeight(12),
            Height = Application.GetRealHeight(139),
            Width = Application.GetRealWidth(375 - 16 * 2),
            BackgroundColor = MusicColor.WhiteColor,
            Radius= (uint)Application.GetRealHeight(12),
        };
        /// <summary>
        ///显示音乐状态图标
        /// </summary>
        public Button iconBtn = new Button
        {
            X = Application.GetRealWidth(10),
            Y = Application.GetRealHeight(15),
            Width = Application.GetMinRealAverage(32),
            Height = Application.GetMinRealAverage(32),
            UnSelectedImagePath = "MusicIcon/playStatus.png",
        };
        /// <summary>
        ///组合背景图
        /// </summary>
        public Button mergeBjBtn = new Button
        {
            X = Application.GetRealWidth(214),
            Y = Application.GetRealHeight(18),
            Width = Application.GetRealWidth(70),
            Height = Application.GetRealHeight(25),
            BackgroundColor = MusicColor.ViewColor,
            Radius = (uint)Application.GetRealHeight(12),
        };
        /// <summary>
        ///组合图标
        /// </summary>
        public Button mergeIconBtn = new Button
        {
            X = Application.GetRealWidth(214 + 13),
            Y = Application.GetRealHeight(18 + 5),
            Width = Application.GetMinRealAverage(16),
            Height = Application.GetMinRealAverage(16),
            UnSelectedImagePath = "MusicIcon/Merge.png",
        };
        /// <summary>
        ///组合文本
        /// </summary>
        public Button mergeBtn = new Button
        {
            TextID=StringId.merge,
            X = Application.GetRealWidth(214 + 33),
            Y = Application.GetRealHeight(18 + 4),
            Width = Application.GetRealWidth(24+3+5),
            Height = Application.GetRealHeight(17),
            TextColor = MusicColor.TextColor,
            TextSize=TextSize.Text12,
 
        };
        /// <summary>
        ///收藏图标
        /// </summary>
        public Button collectIconBtn = new Button
        {
            X = Application.GetRealWidth(299),
            Y = Application.GetRealHeight(10),
            Width = Application.GetMinRealAverage(40),
            Height = Application.GetMinRealAverage(40),
            UnSelectedImagePath = "MusicIcon/collect.png",
            SelectedImagePath = "MusicIcon/collectSelected.png",
        };
        /// <summary>
        /// 歌名名称
        /// </summary>
        public Button songNameBtn = new Button
        {
            X = Application.GetRealWidth(54),
            Y = Application.GetRealHeight(12),
            Width = Application.GetRealWidth(140),
            Height = Application.GetRealHeight(20),
            TextColor = MusicColor.MusicTxet14Color,
            TextSize = TextSize.Text14,
            TextAlignment = TextAlignment.CenterLeft,
        };
        /// <summary>
        /// 歌手名称
        /// </summary>
        public Button singerBtn = new Button
        {
            X = Application.GetRealWidth(54),
            Y = Application.GetRealHeight(36),
            Width = Application.GetRealWidth(120),
            Height = Application.GetRealHeight(14),
            TextColor = MusicColor.MusicNoTxetColor,
            TextSize = TextSize.Text10,
            TextAlignment = TextAlignment.CenterLeft,
 
        };
        /// <summary>
        ///  播放器名称
        /// </summary>
        public Button musicNameBtn = new Button
        {
            X = Application.GetRealWidth(54),
            Y = Application.GetRealHeight(40),//58
            Width = Application.GetRealWidth(140),
            Height = Application.GetRealHeight(17),
            TextColor = MusicColor.TextCancelColor,
            TextSize = TextSize.Text12,
            TextAlignment = TextAlignment.CenterLeft,
        };
        /// <summary>
        ///  区域名称
        /// </summary>
        public Button regionBtn = new Button
        {
            //Text = i.ToString(),
            X = Application.GetRealWidth(54),
            Y = Application.GetRealHeight(61),//79
            Width = Application.GetRealWidth(120),
            Height = Application.GetRealHeight(14),
            TextColor = MusicColor.MusicNoTxetColor,
            TextSize = TextSize.Text10,
            TextAlignment = TextAlignment.CenterLeft,
 
        };
 
        /// <summary>
        /// 点击事件
        /// </summary>
        public Button clickBtn = new Button
        {
            Width = Application.GetRealWidth(130),
            Height = Application.GetRealHeight(139),
        };
 
        /// <summary>
        /// 上一曲
        /// </summary>
        public Button prevBtn = new Button
        {
            X = Application.GetRealWidth(163),
            Y = Application.GetRealHeight(101),
            Width = Application.GetMinRealAverage(32),
            Height = Application.GetMinRealAverage(32),
            UnSelectedImagePath = "MusicIcon/prev.png",
            SelectedImagePath = "MusicIcon/prevSeletced.png",
        };
        /// <summary>
        /// 暂停/播放
        /// </summary>
        public Button playBtn = new Button
        {
            X = Application.GetRealWidth(233),
            Y = Application.GetRealHeight(101),
            Width = Application.GetMinRealAverage(32),
            Height = Application.GetMinRealAverage(32),
            UnSelectedImagePath = "MusicIcon/pause.png",
            SelectedImagePath = "MusicIcon/play.png",
        };
        /// <summary>
        /// 下一曲
        /// </summary>
        public Button nextBtn = new Button
        {
            X = Application.GetRealWidth(303),
            Y = Application.GetRealHeight(101),
            Width = Application.GetMinRealAverage(32),
            Height = Application.GetMinRealAverage(32),
            UnSelectedImagePath = "MusicIcon/next.png",
            SelectedImagePath = "MusicIcon/nextSelected.png",
        };
        /// <summary>
        /// 播放器界面的方法
        /// </summary>
        /// <param name="verticalRefresh"></param>
        public void View(VerticalRefreshLayout verticalRefresh)
        {
            verticalRefresh.AddChidren(muiscFl);
            muiscFl.AddChidren(musicIfonFl);
            musicIfonFl.AddChidren(iconBtn);
            musicIfonFl.AddChidren(mergeBjBtn);
            musicIfonFl.AddChidren(mergeIconBtn);
            musicIfonFl.AddChidren(mergeBtn);
            musicIfonFl.AddChidren(collectIconBtn);
            musicIfonFl.AddChidren(songNameBtn);
            //musicIfonFl.AddChidren(singerBtn);
            musicIfonFl.AddChidren(musicNameBtn);
            musicIfonFl.AddChidren(regionBtn);
            musicIfonFl.AddChidren(clickBtn);
            musicIfonFl.AddChidren(prevBtn);
            musicIfonFl.AddChidren(playBtn);
            musicIfonFl.AddChidren(nextBtn);
           
        }
    }
}