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 = function.name;
|
btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
|
function.UpdataFuncitonInfo();
|
};
|
}
|
|
/// <summary>
|
/// 收藏功能按钮事件
|
/// </summary>
|
void LoadCollectionEvent()
|
{
|
btnCollection.MouseUpEventHandler += (sender, e) => {
|
btnCollection.IsSelected = function.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected;
|
function.CollectFunction();
|
};
|
}
|
|
/// <summary>
|
/// 加载控制事件
|
/// </summary>
|
void LoadControlEvent()
|
{
|
btnChangeTVAV.MouseUpEventHandler = (sender, e) =>
|
{
|
tvTemp.ControlTV(InfraredCode_TV.AV_TV,function);
|
};
|
btnChlPlus.MouseUpEventHandler = (sender, e) =>
|
{
|
tvTemp.ControlTV(InfraredCode_TV.ChannelUp, function);
|
};
|
btnChlReduce.MouseUpEventHandler = (sender, e) =>
|
{
|
tvTemp.ControlTV(InfraredCode_TV.ChannelDown, function);
|
};
|
btnVolPlus.MouseUpEventHandler = (sender, e) =>
|
{
|
tvTemp.ControlTV(InfraredCode_TV.VolUp, function);
|
};
|
btnVolReduce.MouseUpEventHandler = (sender, e) =>
|
{
|
tvTemp.ControlTV(InfraredCode_TV.VolDown, function);
|
};
|
btnBack.MouseUpEventHandler = (sender, e) =>
|
{
|
tvTemp.ControlTV(InfraredCode_TV.Back, function);
|
};
|
|
btnMenu.MouseUpEventHandler = (sender, e) =>
|
{
|
tvTemp.ControlTV(InfraredCode_TV.Menu, function);
|
};
|
btn123.MouseUpEventHandler = (sender, e) =>
|
{
|
ShowNumberView();
|
};
|
btnMute.MouseUpEventHandler = (sender, e) =>
|
{
|
tvTemp.ControlTV(InfraredCode_TV.Mute, function);
|
};
|
btnPower.MouseUpEventHandler = (sender, e) =>
|
{
|
tvTemp.ControlTV(InfraredCode_TV.Power, function);
|
};
|
|
btnTopMenuUp.MouseUpEventHandler = (sender, e) => {
|
tvTemp.ControlTV(InfraredCode_TV.Up, function);
|
};
|
btnTopMenuLeft.MouseUpEventHandler = (sender, e) => {
|
tvTemp.ControlTV(InfraredCode_TV.Left, function);
|
};
|
btnTopMenuRight.MouseUpEventHandler = (sender, e) => {
|
tvTemp.ControlTV(InfraredCode_TV.Right, function);
|
};
|
btnTopMenuDown.MouseUpEventHandler = (sender, e) => {
|
tvTemp.ControlTV(InfraredCode_TV.Down, function);
|
};
|
btnOk.MouseUpEventHandler = (sender, e) => {
|
tvTemp.ControlTV(InfraredCode_TV.Confrim, function);
|
};
|
}
|
|
}
|
}
|