wjc
2023-08-01 f8283c8ebef3e0af8bd990c3e86cc9d010ba528e
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
using System;
using System.Collections.Generic;
using HDL_ON.UI.Music;
using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
using Shared;
using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage;
 
namespace HDL_ON.UI.UI2.FuntionControlView.Aks
{
    /// <summary>
    /// 播放器界面
    /// </summary>
    public class AksMusicPage : BaseFramLayout
    {
        public AksMusicPage()
        {
        }
        
        public Action<IntType> action;
        CornerFramLayout cornerFram;
        TypeSingleFramLayout typeSingleFramLayout;
        MenuFramLayout menuFram;
        TypeMultiFramLayout typeMultiFramLayout;
 
        public void Show()
        {
            //初始化UI
            this.InitUI();
            //初始化事件
            this.EventListener();
            //读取数据
            this.ReadData();
 
        }
 
        private void ReadData()
        {
 
        }
 
        private void EventListener()
        {
            cornerFram.LoadButtonPage(4, (value) =>
            {
                Console.WriteLine("1");
            });
 
            typeSingleFramLayout.SetClickListener((f) =>
            {
                Console.WriteLine("2");
            });
 
            menuFram.SetTopClickListener((b) =>
            {
                Console.WriteLine("5");
            });
            menuFram.SetBottomClickListener((b) =>
             {
                 Console.WriteLine("6");
             });
            menuFram.SetLeftClickListener((b) =>
            {
                Console.WriteLine("7");
            });
            menuFram.SetRightClickListener((b) =>
            {
                Console.WriteLine("8");
            });
            menuFram.SetOkClickListener((b) =>
            {
                Console.WriteLine("9");
            });
 
            typeMultiFramLayout.SetLeftFlClickListener((f) =>
            {
                Console.WriteLine("3");
            });
 
            typeMultiFramLayout.SetRightFlClickListener((f) =>
            {
                Console.WriteLine("4");
                action?.Invoke(IntType.Player);
            });
 
        }
 
        private void InitUI()
        {
            this.BackgroundColor = MusicColor.ViewColor;
            Button btnTitle = new Button
            {
                Y = Application.GetRealHeight(16),
                X = Application.GetRealWidth(16),
                Height = Application.GetRealHeight(22),
                Width = Application.GetRealWidth(200),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = MusicColor.TextColor,
                TextSize = TextSize.Text16,
                TextID = StringId.bofangqi,
            };
            this.AddChidren(btnTitle);
 
            cornerFram = new CornerFramLayout(343, 452);
            cornerFram.X = Application.GetRealWidth(16);
            cornerFram.Y = btnTitle.Bottom + Application.GetRealHeight(16);
            this.AddChidren(cornerFram);
            cornerFram.SetList(cornerFram.GetTestList(17));
            cornerFram.SetMargin(16, 0, 16, 0);
 
 
            CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 364);
            cornerBottomFram.X = Application.GetRealWidth(16);
            cornerBottomFram.Y = cornerFram.Bottom + Application.GetRealHeight(16);
            cornerBottomFram.BackgroundColor = MusicColor.WhiteColor;
            cornerBottomFram.Radius = (uint)Application.GetRealHeight(17);
            this.AddChidren(cornerBottomFram);
 
            typeSingleFramLayout = new TypeSingleFramLayout();
            typeSingleFramLayout.singleFramLayout.Y = Application.GetRealHeight(24);
            typeSingleFramLayout.AddView(cornerBottomFram);
 
            menuFram = new MenuFramLayout();
            menuFram.Y = typeSingleFramLayout.singleFramLayout.Bottom + Application.GetRealHeight(32);
            menuFram.AddView(cornerBottomFram);
 
            typeMultiFramLayout = new TypeMultiFramLayout();
            typeMultiFramLayout.multiFramLayout.Y = menuFram.Bottom + Application.GetRealHeight(32);
            typeMultiFramLayout.AddView(cornerBottomFram);
 
 
 
            this.AdjustRealHeight(20);
        }
 
 
    }
}