From c7c61c603b16c0bf2582d81561bdfbe48ab9440c Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期五, 19 三月 2021 09:42:37 +0800 Subject: [PATCH] 1.电视控制修改 --- HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs | 42 +++++++++++++++++++++++++++--------------- 1 files changed, 27 insertions(+), 15 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs index b9bc1a6..824fc89 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs @@ -2,6 +2,9 @@ using Shared; using HDL_ON.UI.CSS; using HDL_ON.Entity; +using System.Collections.Generic; +using HDL_ON.DriverLayer; + namespace HDL_ON.UI { public partial class TVPage : FrameLayout @@ -125,7 +128,7 @@ { Y = Application.GetRealHeight(8), Gravity = Gravity.CenterHorizontal, - Width = Application.GetRealWidth(78), + Width = Application.GetRealWidth(90), Height = Application.GetRealHeight(49), Text = "TV/AV", TextAlignment = TextAlignment.Center, @@ -198,12 +201,12 @@ X = Application.GetRealWidth(26), Y = Application.GetRealHeight(246), Width = Application.GetRealWidth(44), - Height = Application.GetRealHeight(102), + Height = Application.GetRealWidth(102), BackgroundImagePath = "FunctionIcon/Electrical/TV/MenuBgIcon.png", }; controlView.AddChidren(channleView); - btnChlReduce = new Button() + btnChlPlus = new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(10), @@ -211,7 +214,7 @@ Height = Application.GetRealWidth(24), UnSelectedImagePath = "FunctionIcon/Electrical/TV/PlusIcon.png" }; - channleView.AddChidren(btnChlReduce); + channleView.AddChidren(btnChlPlus); Button btnChlText; btnChlText = new Button() @@ -225,27 +228,27 @@ }; channleView.AddChidren(btnChlText); - btnChlPlus = new Button() + btnChlReduce = new Button() { Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(66), + Y = Application.GetRealWidth(66), Width = Application.GetRealWidth(24), Height = Application.GetRealWidth(24), UnSelectedImagePath = "FunctionIcon/Electrical/TV/ReduceIcon.png" }; - channleView.AddChidren(btnChlPlus); + channleView.AddChidren(btnChlReduce); volView = new FrameLayout() { X = Application.GetRealWidth(257), Y = Application.GetRealHeight(246), Width = Application.GetRealWidth(44), - Height = Application.GetRealHeight(102), + Height = Application.GetRealWidth(102), BackgroundImagePath = "FunctionIcon/Electrical/TV/MenuBgIcon.png", }; controlView.AddChidren(volView); - btnVolReduce = new Button() + btnVolPlus = new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(10), @@ -253,7 +256,7 @@ Height = Application.GetRealWidth(24), UnSelectedImagePath = "FunctionIcon/Electrical/TV/PlusIcon.png" }; - volView.AddChidren(btnVolReduce); + volView.AddChidren(btnVolPlus); Button btnVolText; btnVolText = new Button() @@ -267,15 +270,15 @@ }; volView.AddChidren(btnVolText); - btnVolPlus = new Button() + btnVolReduce = new Button() { Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(66), + Y = Application.GetRealWidth(66), Width = Application.GetRealWidth(24), Height = Application.GetRealWidth(24), UnSelectedImagePath = "FunctionIcon/Electrical/TV/ReduceIcon.png" }; - volView.AddChidren(btnVolPlus); + volView.AddChidren(btnVolReduce); @@ -368,7 +371,6 @@ for (int i = 0; i < 10; i++) { - Button btn = new Button() { Width = Application.GetRealWidth(98), @@ -420,8 +422,18 @@ } numberView.AddChidren(btn); btn.MouseUpEventHandler = (sender, e) => { + string index = (sender as Button ).Text; btn.IsSelected = false; - tvTemp.ControlTV(i,function); + if (DB_ResidenceData.Instance.GatewayType == 1) + { + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add($"number_{index}", ""); + Control.Ins.SendWriteCommand(function, d); + } + else + { + tvTemp.ControlTV(i, function); + } }; btn.MouseDownEventHandler = (sender, e) => { btn.IsSelected = true; -- Gitblit v1.8.0