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
using System;
using Shared;
namespace HDL_ON.UI.Music.View
{
    public class MusicSourceView
    {
        /// <summary>
        /// 父控件View
        /// </summary>
        public FrameLayout fLayout = new FrameLayout
        {
            BackgroundColor = MusicColor.WhiteColor,
            Height = Application.GetRealHeight(50),
            Width = Application.GetRealWidth(375),
        };
        /// <summary>
        ///图标
        /// </summary>
        public Button iconBtn = new Button
        {
            X = Application.GetRealWidth(16),
            Y = Application.GetRealHeight(13),
            Width = Application.GetMinRealAverage(24),
            Height = Application.GetMinRealAverage(24),
        };
        /// <summary>
        ///文本
        /// </summary>
        public Button textBtn = new Button
        {
            X = Application.GetRealWidth(16),
            Y = Application.GetRealHeight(14),
            Width = Application.GetRealWidth(140),
            Height = Application.GetRealHeight(22),
            TextColor = MusicColor.TextColor,
            TextSize = TextSize.Text16,
            TextAlignment = TextAlignment.CenterLeft,
        };
 
        /// <summary>
        ///写入文本
        /// </summary>
        public Button inputTextBtn = new Button
        {
            X = Application.GetRealWidth(375-140-52),
            Y = Application.GetRealHeight(15),
            Width = Application.GetRealWidth(140),
            Height = Application.GetRealHeight(20),
            TextAlignment=TextAlignment.CenterRight,
            TextColor = MusicColor.MusicNoTxetColor,
            TextSize = TextSize.Text14,
        };
 
        /// <summary>
        ///下一级菜单图标
        /// </summary>
        public  Button nextLevelBtn = new Button
        {
            X = Application.GetRealWidth(339),
            Y = Application.GetRealHeight(17),
            Width = Application.GetMinRealAverage(16),
            Height = Application.GetMinRealAverage(16),
            UnSelectedImagePath = "MusicIcon/sourceNetx.png",
 
        };
        /// <summary>
        ///线
        /// </summary>
        public Button lineBtn = new Button
        {
            X = Application.GetRealWidth(16),
            Width = Application.GetRealWidth(375 - 16 - 16),
            BackgroundColor = MusicColor.LineColor,
        };
 
        /// <summary>
        /// 点击事件
        /// </summary>
        public Button clickBtn = new Button
        {
            Height = Application.GetRealHeight(50),
            Width = Application.GetRealWidth(375),
        };
 
        /// <summary>
        /// 音乐源控件的方法
        /// </summary>
        /// <param name="frameLayout"></param>
        /// <param name="IsView"></param>
        public void FrameLayoutView(FrameLayout frameLayout,bool IsView=true)
        {
            if (IsView)
            {
                fLayout.AddChidren(iconBtn);
                textBtn.X = Application.GetRealWidth(56);
                nextLevelBtn.X = Application.GetRealWidth(339);
                nextLevelBtn.Y = Application.GetRealHeight(17);
                nextLevelBtn.Width = Application.GetMinRealAverage(16);
                nextLevelBtn.Height = Application.GetMinRealAverage(16);
            }
            else
            {
                textBtn.X = Application.GetRealWidth(16);
                fLayout.AddChidren(inputTextBtn);
                nextLevelBtn.X = Application.GetRealWidth(333);
                nextLevelBtn.Y = Application.GetRealHeight(11);
                nextLevelBtn.Width = Application.GetMinRealAverage(28);
                nextLevelBtn.Height = Application.GetMinRealAverage(28);
                nextLevelBtn.UnSelectedImagePath = "MusicIcon/edit.png";
            }
            fLayout.AddChidren(textBtn);
            fLayout.AddChidren(nextLevelBtn);
            lineBtn.Y = fLayout.Height - 1;
            lineBtn.Height= H_W.Line;
            fLayout.AddChidren(lineBtn);
            fLayout.AddChidren(clickBtn);
            frameLayout.AddChidren(fLayout);
        }
    }
}