From a1b0ab7044100daaa7e0f1da2d2ca45e38098963 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 29 三月 2021 09:13:25 +0800
Subject: [PATCH] 2021-3-29-2
---
HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs | 166 +++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 147 insertions(+), 19 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs
index 718ffed..fd199d8 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs
@@ -1,6 +1,8 @@
锘縰sing System;
using Shared;
using HDL_ON.Entity;
+using HDL_ON.DriverLayer;
+using System.Collections.Generic;
namespace HDL_ON.UI
{
@@ -16,9 +18,9 @@
//鍥為��鍒锋柊淇℃伅浜嬩欢
actionRefresh = () => {
- btnFunctionName.Text = btnFunctionName_Out.Text = tv.name;
- btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = tv.GetRoomListName();
- tv.SaveFunctionData(true);
+ btnFunctionName.Text = btnFunctionName_Out.Text = function.name;
+ btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
+ function.UpdataFuncitonInfo();
};
}
@@ -28,8 +30,8 @@
void LoadCollectionEvent()
{
btnCollection.MouseUpEventHandler += (sender, e) => {
- btnCollection.IsSelected = tv.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected;
- tv.CollectFunction();
+ btnCollection.IsSelected = function.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected;
+ function.CollectFunction();
};
}
@@ -40,32 +42,95 @@
{
btnChangeTVAV.MouseUpEventHandler = (sender, e) =>
{
- tv.ControlTV(InfraredCode_TV.AV_TV);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("av_tv", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.AV_TV, function);
+ }
};
btnChlPlus.MouseUpEventHandler = (sender, e) =>
{
- tv.ControlTV(InfraredCode_TV.ChannelUp);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("ch+", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.ChannelUp, function);
+ }
};
btnChlReduce.MouseUpEventHandler = (sender, e) =>
{
- tv.ControlTV(InfraredCode_TV.ChannelDown);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("ch-", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.ChannelDown, function);
+ }
};
btnVolPlus.MouseUpEventHandler = (sender, e) =>
{
- tv.ControlTV(InfraredCode_TV.VolUp);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("volume+", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.VolUp, function);
+ }
};
btnVolReduce.MouseUpEventHandler = (sender, e) =>
{
- tv.ControlTV(InfraredCode_TV.VolDown);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("volume-", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.VolDown, function);
+ }
};
btnBack.MouseUpEventHandler = (sender, e) =>
{
- tv.ControlTV(InfraredCode_TV.Back);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("return", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.Back, function);
+ }
};
btnMenu.MouseUpEventHandler = (sender, e) =>
{
- tv.ControlTV(InfraredCode_TV.Menu);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("menu", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.Menu, function);
+ }
};
btn123.MouseUpEventHandler = (sender, e) =>
{
@@ -73,27 +138,90 @@
};
btnMute.MouseUpEventHandler = (sender, e) =>
{
- tv.ControlTV(InfraredCode_TV.Mute);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("mute", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.Mute, function);
+ }
};
btnPower.MouseUpEventHandler = (sender, e) =>
{
- tv.ControlTV(InfraredCode_TV.Power);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("on_off", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.Power, function);
+ }
};
btnTopMenuUp.MouseUpEventHandler = (sender, e) => {
- tv.ControlTV(InfraredCode_TV.Up);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("up", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.Up, function);
+ }
};
btnTopMenuLeft.MouseUpEventHandler = (sender, e) => {
- tv.ControlTV(InfraredCode_TV.Left);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("left", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.Left, function);
+ }
};
btnTopMenuRight.MouseUpEventHandler = (sender, e) => {
- tv.ControlTV(InfraredCode_TV.Right);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("right", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.Right, function);
+ }
};
btnTopMenuDown.MouseUpEventHandler = (sender, e) => {
- tv.ControlTV(InfraredCode_TV.Down);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("down", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.Down, function);
+ }
};
btnOk.MouseUpEventHandler = (sender, e) => {
- tv.ControlTV(InfraredCode_TV.Confrim);
+ if (DB_ResidenceData.Instance.GatewayType == 1)
+ {
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add("ok", "");
+ Control.Ins.SendWriteCommand(function, d);
+ }
+ else
+ {
+ tvTemp.ControlTV(InfraredCode_TV.Confrim, function);
+ }
};
}
--
Gitblit v1.8.0