wei
2020-12-08 62d77d3bb8e7215d9da9ecf6f5aeda0b69f805f8
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
using System;
using Shared;
using HDL_ON.Entity;
 
namespace HDL_ON.UI
{
    public partial class TVPage
    {
        /// <summary>
        /// 加载事件列表
        /// </summary>
        void LoadEventList()
        {
            LoadControlEvent();
            LoadCollectionEvent();
 
            //回退刷新信息事件
            actionRefresh = () => {
                btnFunctionName.Text = btnFunctionName_Out.Text = tv.name;
                btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = tv.GetRoomListName();
                tv.SaveFunctionData(true);
            };
        }
 
        /// <summary>
        /// 收藏功能按钮事件
        /// </summary>
        void LoadCollectionEvent()
        {
            btnCollection.MouseUpEventHandler += (sender, e) => {
                btnCollection.IsSelected = tv.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected;
                tv.SaveFunctionData(true);
            };
        }
 
        /// <summary>
        /// 加载控制事件
        /// </summary>
        void LoadControlEvent()
        {
            btnChangeTVAV.MouseUpEventHandler = (sender, e) =>
            {
                tv.ControlTV(InfraredCode_TV.AV_TV);
            };
            btnChlPlus.MouseUpEventHandler = (sender, e) =>
            {
                tv.ControlTV(InfraredCode_TV.ChannelUp);
            };
            btnChlReduce.MouseUpEventHandler = (sender, e) =>
            {
                tv.ControlTV(InfraredCode_TV.ChannelDown);
            };
            btnVolPlus.MouseUpEventHandler = (sender, e) =>
            {
                tv.ControlTV(InfraredCode_TV.VolUp);
            };
            btnVolReduce.MouseUpEventHandler = (sender, e) =>
            {
                tv.ControlTV(InfraredCode_TV.VolDown);
            };
            btnBack.MouseUpEventHandler = (sender, e) =>
            {
                tv.ControlTV(InfraredCode_TV.Back);
            };
 
            btnMenu.MouseUpEventHandler = (sender, e) =>
            {
                tv.ControlTV(InfraredCode_TV.Menu);
            };
            btn123.MouseUpEventHandler = (sender, e) =>
            {
                ShowNumberView();
            };
            btnMute.MouseUpEventHandler = (sender, e) =>
            {
                tv.ControlTV(InfraredCode_TV.Mute);
            };
            btnPower.MouseUpEventHandler = (sender, e) =>
            {
                tv.ControlTV(InfraredCode_TV.Power);
            };
 
            btnTopMenuUp.MouseUpEventHandler = (sender, e) => {
                tv.ControlTV(InfraredCode_TV.Up);
            };
            btnTopMenuLeft.MouseUpEventHandler = (sender, e) => {
                tv.ControlTV(InfraredCode_TV.Left);
            };
            btnTopMenuRight.MouseUpEventHandler = (sender, e) => {
                tv.ControlTV(InfraredCode_TV.Right);
            };
            btnTopMenuDown.MouseUpEventHandler = (sender, e) => {
                tv.ControlTV(InfraredCode_TV.Down);
            };
            btnOk.MouseUpEventHandler = (sender, e) => {
                tv.ControlTV(InfraredCode_TV.Confrim);
            };
        }
 
    }
}