wjc
2023-08-03 fd1f19e8479c764fa28b0da3a2f9b34a3debe772
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
using System;
using HDL_ON.UI.Music;
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView
{
    public class NumberFrameLayout
    {
        public NumberFrameLayout()
        {
        }
 
        public FrameLayout layout = new FrameLayout
        {
 
            Height = Application.GetRealHeight(368),
            Width = Application.GetRealWidth(343),
            Radius = (uint)Application.GetRealHeight(17),
            BackgroundColor = MusicColor.WhiteColor,
        };
 
        Button btn1 = new Button
        {
            Width = Application.GetRealWidth(78),
            Height = Application.GetRealHeight(84),
            Text = "1",
            TextSize = TextSize.Text20,
            TextColor = MusicColor.TextColor,
            TextAlignment = TextAlignment.Center,
            IsBold = true,
        };
        Button btn2 = new Button
        {
            Width = Application.GetRealWidth(78),
            Height = Application.GetRealHeight(84),
            Text = "2",
            TextSize = TextSize.Text20,
            TextColor = MusicColor.TextColor,
            TextAlignment = TextAlignment.Center,
            IsBold = true,
        };
        Button btn3 = new Button
        {
            Width = Application.GetRealWidth(78),
            Height = Application.GetRealHeight(84),
            Text = "3",
            TextSize = TextSize.Text20,
            TextColor = MusicColor.TextColor,
            TextAlignment = TextAlignment.Center,
            IsBold = true,
        };
 
 
 
        Button btn4 = new Button
        {
            Width = Application.GetRealWidth(78),
            Height = Application.GetRealHeight(84),
            Text = "4",
            TextSize = TextSize.Text20,
            TextColor = MusicColor.TextColor,
            TextAlignment = TextAlignment.Center,
            IsBold = true,
        };
        Button btn5 = new Button
        {
            Width = Application.GetRealWidth(78),
            Height = Application.GetRealHeight(84),
            Text = "5",
            TextSize = TextSize.Text20,
            TextColor = MusicColor.TextColor,
            TextAlignment = TextAlignment.Center,
            IsBold = true,
        };
        Button btn6 = new Button
        {
            Width = Application.GetRealWidth(78),
            Height = Application.GetRealHeight(84),
            Text = "6",
            TextSize = TextSize.Text20,
            TextColor = MusicColor.TextColor,
            TextAlignment = TextAlignment.Center,
            IsBold = true,
        };
 
        Button btn7 = new Button
        {
            Width = Application.GetRealWidth(78),
            Height = Application.GetRealHeight(84),
            Text = "7",
            TextSize = TextSize.Text20,
            TextColor = MusicColor.TextColor,
            TextAlignment = TextAlignment.Center,
            IsBold = true,
        };
        Button btn8 = new Button
        {
            Width = Application.GetRealWidth(78),
            Height = Application.GetRealHeight(84),
            Text = "8",
            TextSize = TextSize.Text20,
            TextColor = MusicColor.TextColor,
            TextAlignment = TextAlignment.Center,
            IsBold = true,
        };
        Button btn9 = new Button
        {
            Width = Application.GetRealWidth(78),
            Height = Application.GetRealHeight(84),
            Text = "9",
            TextSize = TextSize.Text20,
            TextColor = MusicColor.TextColor,
            TextAlignment = TextAlignment.Center,
            IsBold = true,
        };
        Button btn0 = new Button
        {
            Width = Application.GetRealWidth(78),
            Height = Application.GetRealHeight(84),
            Text = "0",
            TextSize = TextSize.Text20,
            TextColor = MusicColor.TextColor,
            TextAlignment = TextAlignment.Center,
            IsBold = true,
        };
 
        Button btn = new Button
        {
            Width = Application.GetRealWidth(78),
            Height = Application.GetRealHeight(84),
            Text = "-/--",
            TextSize = TextSize.Text20,
            TextColor = MusicColor.TextColor,
            TextAlignment = TextAlignment.Center,
            IsBold = true,
        };
 
        ButtonFramLayout pdjiaFramLayout = new ButtonFramLayout();
 
        ButtonFramLayout pdjianFramLayout = new ButtonFramLayout(); 
 
        /// <summary>
        /// 添加布局
        /// </summary>
        /// <param name="parent"></param>
        public void AddView(FrameLayout parent)
        {
            parent.AddChidren(layout);
            layout.AddChidren(btn1);
            layout.AddChidren(btn2);
            layout.AddChidren(btn3);
            layout.AddChidren(btn4);
            layout.AddChidren(btn5);
            layout.AddChidren(btn6);
            layout.AddChidren(btn7);
            layout.AddChidren(btn8);
            layout.AddChidren(btn9);
            layout.AddChidren(btn0);
            layout.AddChidren(btn);
            layout.AddChidren(pdjiaFramLayout);
            layout.AddChidren(pdjianFramLayout);
 
            btn1.Y = Application.GetRealHeight(16);
            btn1.X = Application.GetRealWidth(16);
            btn2.Y = Application.GetRealHeight(16);
            btn2.X = btn1.Right;
            btn3.Y = Application.GetRealHeight(16);
            btn3.X = btn2.Right;
            pdjiaFramLayout.AddImageView();
            pdjiaFramLayout.AddNameView();
            pdjiaFramLayout.Y = Application.GetRealHeight(16);
            pdjiaFramLayout.GetImageButton().Height = Application.GetRealHeight(32);
            pdjiaFramLayout.GetImageButton().Width = Application.GetRealWidth(32);
            pdjiaFramLayout.GetImageButton().UnSelectedImagePath = "AksIcon/pindao1.png";
            pdjiaFramLayout.GetNameButton().TextID = StringId.pindaojia;
            pdjiaFramLayout.X = btn3.Right;
 
            btn4.Y = btn1.Bottom;
            btn4.X = Application.GetRealWidth(16);
            btn5.Y = btn2.Bottom;
            btn5.X = btn4.Right;
            btn6.Y = btn3.Bottom;
            btn6.X = btn5.Right;
            pdjianFramLayout.AddImageView();
            pdjianFramLayout.AddNameView();
            pdjianFramLayout.Y = pdjiaFramLayout.Bottom;
            pdjianFramLayout.GetImageButton().Height = Application.GetRealHeight(32);
            pdjianFramLayout.GetImageButton().Width = Application.GetRealWidth(32);
            pdjianFramLayout.GetImageButton().UnSelectedImagePath = "AksIcon/pindao2.png";
            pdjianFramLayout.GetNameButton().TextID = StringId.pindaojian;
            pdjianFramLayout.X = btn6.Right;
 
            btn7.Y = btn6.Bottom;
            btn7.X = Application.GetRealWidth(16);
            btn8.Y = btn5.Bottom;
            btn8.X = btn7.Right;
            btn9.Y = btn6.Bottom;
            btn9.X = btn8.Right;
            btn.Y = pdjianFramLayout.Bottom;
            btn.X = btn9.Right;
 
            btn0.Y = btn8.Bottom;
            btn0.X = Application.GetRealWidth(16 + 78);
 
        }
       
 
    }
}