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
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 TvPage : BaseFramLayout
    {
        public TvPage()
        {
        }
        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.TV);
            });
 
        }
 
        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.dianshi,
            };
            this.AddChidren(btnTitle);
 
            cornerTopFram = new CornerFramLayout(343, 452, 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> { 5, 6 });
 
 
 
            NumberFrameLayout numberFrame = new NumberFrameLayout();
            numberFrame.layout.X = Application.GetRealWidth(16);
            numberFrame.layout.Y = cornerTopFram.Bottom + Application.GetRealHeight(16);
            numberFrame.AddView(this);
 
            //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.dianshi;
 
            this.AdjustRealHeight(16);
        }
    }
}