wjc
2023-08-03 72c7bdb62b203eeb6a590e96bf25a4e186bd45cd
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
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 TYYPage : BaseFramLayout
    {
        public TYYPage()
        {
        }
 
        public Action<IntType> action;
        CornerFramLayout cornerTopFram;
        MenuFramLayout menuFram;
        TypeMultiFramLayout typeMultiFramLayout;
 
        public void Show()
        {
            //初始化UI
            this.InitUI();
            //初始化事件
            this.EventListener();
            //读取数据
            this.ReadData();
 
        }
 
        private void ReadData()
        {
 
        }
 
        private void EventListener()
        {
            cornerTopFram.selectAction += (value) =>
            {
                Console.WriteLine("1");
            };
 
            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) =>
            {
                SxqPage sxqPage = new SxqPage();
                MainPage.BasePageView.AddChidren(sxqPage);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                sxqPage.Show();
 
            });
 
            typeMultiFramLayout.SetRightFlClickListener((f) =>
            {
                Console.WriteLine("4");
                action?.Invoke(IntType.HiFi);
            });
 
        }
 
        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.touyingyi,
            };
            this.AddChidren(btnTitle);
 
            cornerTopFram = new CornerFramLayout(343, 452 + 84, 4, 17); 
            cornerTopFram.X = Application.GetRealWidth(16);
            cornerTopFram.Y = btnTitle.Bottom + Application.GetRealHeight(16);
            this.AddChidren(cornerTopFram);
            cornerTopFram.SetList(cornerTopFram.GetTestList(17));
            cornerTopFram.SetMargin(16, 0, 16, 0);
            cornerTopFram.LoadButtonPage(new List<int> { 3, 4, 5 });
 
 
            CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 292, 0, 17);
            cornerBottomFram.X = Application.GetRealWidth(16);
            cornerBottomFram.Y = cornerTopFram.Bottom + Application.GetRealHeight(16);
            cornerBottomFram.BackgroundColor = MusicColor.WhiteColor;
            cornerBottomFram.Radius = (uint)Application.GetRealHeight(17);
            this.AddChidren(cornerBottomFram);
 
            menuFram = new MenuFramLayout();
            menuFram.Y = Application.GetRealHeight(24);
            menuFram.AddView(cornerBottomFram);
 
            typeMultiFramLayout = new TypeMultiFramLayout();
            typeMultiFramLayout.multiFramLayout.Y = menuFram.Bottom + Application.GetRealHeight(32);
            typeMultiFramLayout.AddView(cornerBottomFram);
            typeMultiFramLayout.btnBottonRightName.TextID = StringId.touyingyi;
 
            this.AdjustRealHeight(16);
        }
    }
}