wxr
2020-10-14 6c8946b21635246355ec41f216426783685a14b2
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
using System;
using HDL_ON.UI.Music;
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.Music.View
{
    public class MyListView : FrameLayout
    {
        /// <summary>
        /// 主控件
        /// </summary>
        public FrameLayout popFra = new FrameLayout()
        {
            BackgroundColor = UI.Music.MusicColor.PopupBackgroundColor,
        };
        /// <summary>
        /// 整个白色控件父
        /// </summary>
        public FrameLayout dialogFra = new FrameLayout()
        {
            X = Application.GetRealWidth(16),
            Y = Application.GetRealHeight(187),
            Width = Application.GetRealWidth(344),
            Height = Application.GetRealHeight(460),
            BackgroundColor = UI.Music.MusicColor.WhiteColor,
            Radius = (uint)Application.GetRealHeight(12),
        };
 
        /// <summary>
        /// 头部父控件
        /// </summary>
        public FrameLayout topFra = new FrameLayout()
        {
            Width = Application.GetRealWidth(344),
            Height = Application.GetRealHeight(50),
        };
        /// <summary>
        /// 模式图标控件
        /// </summary>
        public Button orderIconBtn = new Button
        {
            X = Application.GetRealWidth(16),
            Y = Application.GetRealHeight(11),
            Width = Application.GetMinRealAverage(28),
            Height = Application.GetMinRealAverage(28),
        };
        /// <summary>
        /// 模式文本控件
        /// </summary>
        public Button orderTxetBtn = new Button
        {
            X = Application.GetRealWidth(60),
            Y = Application.GetRealHeight(14),
            Width = Application.GetRealWidth(120),
            Height = Application.GetRealHeight(22),
            TextColor = UI.Music.MusicColor.TextColor,
            TextSize = UI.Music.TextSize.Text16,
            TextAlignment = TextAlignment.CenterLeft,
        };
        /// <summary>
        /// 关闭控件
        /// </summary>
        public Button backIextBtn = new Button
        {
            X = Application.GetRealWidth(288),//300
            Y = Application.GetRealHeight(15),
            Width = Application.GetRealWidth(28 + 12),//28
            Height = Application.GetRealHeight(20),
            TextID = StringId.cancelMusic,
            TextColor = UI.Music.MusicColor.MusicNoTxetColor,
            TextSize = UI.Music.TextSize.Text14,
            TextAlignment = TextAlignment.CenterLeft,
        };
        /// <summary>
        /// 线条控价
        /// </summary>
        public Button lineBtn = new Button
        {
            // Y = topFra.Height - 1,
            Width = Application.GetRealWidth(344),
            //Height = UI.Music.H_W.Line,
            BackgroundColor = UI.Music.MusicColor.LineColor,
        };
        /// <summary>
        ///显示歌曲列表父控件
        /// </summary>
        public VerticalRefreshLayout verticalScrolViewLayout = new VerticalRefreshLayout
        {
            Y = Application.GetRealHeight(50),
            Height = Application.GetRealHeight(410),
            Width = Application.GetRealWidth(344),
        };
        public void frameLayout(FrameLayout frame,A31MusicModel a31MusicModel)
        {
            switch (a31MusicModel.A31PlayStatus.loop)
            {
                //0列表循环,1单曲循环,2随机播放;
                case "0":
                    orderIconBtn.UnSelectedImagePath = "MusicIcon/list.png";
                    orderTxetBtn.Text = Language.StringByID(StringId.listMode);
                    break;
 
                case "1":
                    orderIconBtn.UnSelectedImagePath = "MusicIcon/single.png";
                    orderTxetBtn.Text = Language.StringByID(StringId.singleMode);
 
                    break;
                case "2":
                    orderIconBtn.UnSelectedImagePath = "MusicIcon/random.png";
                    orderTxetBtn.Text = Language.StringByID(StringId.randomMode);
                    break;
            }
            frame.AddChidren(popFra);
            popFra.AddChidren(dialogFra);
            dialogFra.AddChidren(topFra);
            topFra.AddChidren(orderIconBtn);
            topFra.AddChidren(orderTxetBtn);
            topFra.AddChidren(backIextBtn);
            lineBtn.Y = topFra.Height - 1;
            lineBtn.Height = UI.Music.H_W.Line;
            topFra.AddChidren(lineBtn);
            dialogFra.AddChidren(verticalScrolViewLayout);
           
        }
    }
}