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/TVPage.cs | 128 ++++++++++++++++++++++++------------------
1 files changed, 73 insertions(+), 55 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs
index 3d34f22..3cf65f2 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
@@ -43,7 +46,8 @@
#endregion
#region 鍖哄煙鍙橀噺
- TV tv;
+ TV tvTemp = new TV();
+ Function function;
Button btnCollection_Out;
Button btnFunctionName_Out;
Button btnFromFloor_Out;
@@ -56,7 +60,7 @@
public TVPage(Function func)
{
bodyView = this;
- tv = func as TV;
+ function = func;
}
@@ -86,7 +90,7 @@
TextColor = CSS_Color.FirstLevelTitleColor,
TextAlignment = TextAlignment.CenterLeft,
TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
- Text = tv.name,
+ Text = function.name,
};
controlView.AddChidren(btnFunctionName);
@@ -99,7 +103,7 @@
TextColor = CSS_Color.PromptingColor1,
TextAlignment = TextAlignment.CenterLeft,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- Text = tv.GetRoomListName()
+ Text = function.GetRoomListName()
};
controlView.AddChidren(btnFromFoorAndRoom);
@@ -111,23 +115,16 @@
Height = Application.GetMinRealAverage(40),
SelectedImagePath = "Collection/CollectionIcon.png",
UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
- IsSelected = tv.collection
+ IsSelected = function.collect
};
- controlView.AddChidren(btnCollection);
-
-
- btnChangeTVAV = new Button()
+ //controlView.AddChidren(btnCollection);
+ //2020-12-16 濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳�
+ if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
{
- Y = Application.GetRealHeight(8),
- Gravity = Gravity.CenterHorizontal,
- Width = Application.GetRealWidth(78),
- Height = Application.GetRealHeight(49),
- Text = "TV/AV",
- TextAlignment = TextAlignment.Center,
- TextColor = CSS_Color.MainColor,
- TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
- };
- controlView.AddChidren(btnChangeTVAV);
+ controlView.AddChidren(btnCollection);
+ }
+
+
#region 杞洏鎺у埗鍖哄煙
topMenuView = new FrameLayout()
@@ -193,12 +190,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),
@@ -206,7 +203,7 @@
Height = Application.GetRealWidth(24),
UnSelectedImagePath = "FunctionIcon/Electrical/TV/PlusIcon.png"
};
- channleView.AddChidren(btnChlReduce);
+ channleView.AddChidren(btnChlPlus);
Button btnChlText;
btnChlText = new Button()
@@ -220,27 +217,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),
@@ -248,7 +245,7 @@
Height = Application.GetRealWidth(24),
UnSelectedImagePath = "FunctionIcon/Electrical/TV/PlusIcon.png"
};
- volView.AddChidren(btnVolReduce);
+ volView.AddChidren(btnVolPlus);
Button btnVolText;
btnVolText = new Button()
@@ -262,15 +259,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);
@@ -279,28 +276,28 @@
#region 搴曢儴鎺у埗鍖哄煙
btnBack = new Button()
{
- X = Application.GetRealWidth(30),
- Y = Application.GetRealHeight(386),
- Width = Application.GetRealWidth(40),
- Height = Application.GetRealWidth(40),
+ X = Application.GetRealWidth(52),
+ Y = Application.GetRealHeight(402),
+ Width = Application.GetRealWidth(32),
+ Height = Application.GetRealWidth(32),
UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVBackIcon.png",
};
controlView.AddChidren(btnBack);
- btnMenu = new Button()
+ btnChangeTVAV = new Button()
{
- X = Application.GetRealWidth(106),
- Y = Application.GetRealHeight(386),
- Width = Application.GetRealWidth(40),
- Height = Application.GetRealWidth(40),
- UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVMenuIcon.png",
+ X = Application.GetRealWidth(116),
+ Y = Application.GetRealHeight(402),
+ Width = Application.GetRealWidth(32),
+ Height = Application.GetRealWidth(32),
+ UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVAV.png",
};
- controlView.AddChidren(btnMenu);
+ controlView.AddChidren(btnChangeTVAV);
btn123 = new Button()
{
- X = Application.GetRealWidth(182),
- Y = Application.GetRealHeight(386),
+ X = Application.GetRealWidth(180),
+ Y = Application.GetRealHeight(402),
Width = Application.GetRealWidth(40),
Height = Application.GetRealWidth(40),
UnSelectedImagePath = "FunctionIcon/Electrical/TV/TV123Icon.png",
@@ -309,20 +306,30 @@
btnMute = new Button()
{
- X = Application.GetRealWidth(258),
- Y = Application.GetRealHeight(386),
- Width = Application.GetRealWidth(40),
- Height = Application.GetRealWidth(40),
+ X = Application.GetRealWidth(244),
+ Y = Application.GetRealHeight(402),
+ Width = Application.GetRealWidth(32),
+ Height = Application.GetRealWidth(32),
UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVMuteIcon.png",
};
controlView.AddChidren(btnMute);
+ btnMenu = new Button()
+ {
+ X = Application.GetRealWidth(116),
+ Y = Application.GetRealHeight(466),
+ Width = Application.GetRealWidth(32),
+ Height = Application.GetRealWidth(32),
+ UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVMenuIcon.png",
+ };
+ controlView.AddChidren(btnMenu);
+
btnPower = new Button()
{
- Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(462),
- Width = Application.GetRealWidth(40),
- Height = Application.GetRealWidth(40),
+ X = Application.GetRealWidth(180),
+ Y = Application.GetRealHeight(466),
+ Width = Application.GetRealWidth(32),
+ Height = Application.GetRealWidth(32),
UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVPowerIcon.png",
};
controlView.AddChidren(btnPower);
@@ -331,7 +338,8 @@
LoadEventList();
- new TopViewDiv(bodyView, Language.StringByID(StringId.TV)).LoadTopView(tv, actionRefresh);
+ new TopViewDiv(bodyView, Language.StringByID(StringId.TV)).LoadTopView_FunctionTop(function, actionRefresh);
+ DriverLayer.Control.Ins.SendReadCommand(function);
}
@@ -342,6 +350,7 @@
FrameLayout dialogView = new FrameLayout()
{
+ AnimateSpeed = 0.3f,
Animate = Animate.DownToUp,
};
dialog.AddChidren(dialogView);
@@ -361,7 +370,6 @@
for (int i = 0; i < 10; i++)
{
-
Button btn = new Button()
{
Width = Application.GetRealWidth(98),
@@ -413,8 +421,18 @@
}
numberView.AddChidren(btn);
btn.MouseUpEventHandler = (sender, e) => {
+ string index = (sender as Button ).Text;
btn.IsSelected = false;
- tv.ControlTV(i);
+ 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