From b5206a46345fa4326705b1178579e2de65edf5de Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 20 五月 2024 15:01:05 +0800
Subject: [PATCH] 目标版本更新
---
HDL_ON/UI/UI2/2-Classification/FunctionPage.cs | 86 ++++++++++++++++++++++++-------------------
1 files changed, 48 insertions(+), 38 deletions(-)
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
index eab9b27..c1e7d38 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
@@ -30,6 +30,7 @@
List<Function> functionList;
int titleId;
+ public Action DelAction;
public FunctionPage()
{
bodyView = this;
@@ -83,50 +84,24 @@
skipView.LoadPage();
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
};
- new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView_LightFunction(action);
+ var topView = new TopViewDiv(bodyView, Language.StringByID(titleId));
+ topView.maginY = 10;
+ topView.LoadTopView_LightFunction(action);
}
else
{
- new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
+ var topView = new TopViewDiv(bodyView, Language.StringByID(titleId));
+ topView.maginY = 10;
+ topView.LoadTopView();
}
-
-
-#if DEBUG
- //Button testBtn = new Button()
- //{
- // X = Application.GetRealWidth(80),
- // Height = Application.GetRealHeight(64),
- // BackgroundColor = 0xFFFF0000
- //};
- //bodyView.AddChidren(testBtn);
- //int ddd = 0;
- //testBtn.MouseUpEventHandler = (sender, e) => {
- // ddd++;
-
- // Function function_online = FunctionList.List.GetLightList().Find((obj) => obj.sid == "0001017DB92D2602020100010101");
- // if (ddd % 2 == 0)
- // {
- // function_online.online = true;
- // }
- // else
- // {
- // function_online.online = false;
- // }
- // HomePage.LoadEvent_RefreshDevcieOnline(function_online);
- // FunctionPage.UpdataOnline(function_online);
- // RoomPage.UpdataOnline(function_online);
-
-
- //};
-#endif
/// <summary>
/// 鎴块棿鍐呭鏄剧ず鍖哄煙
/// </summary>
var roomFloorChangeView = new FrameLayout()
{
- Y = Application.GetRealHeight(64),
+ Y = Application.GetRealHeight(64+10),
Height = Application.GetRealHeight(52),
};
bodyView.AddChidren(roomFloorChangeView);
@@ -157,14 +132,14 @@
functionListView = new VerticalScrolViewLayout()
{
- Y = Application.GetRealHeight(64 + 52),
- Height = Application.GetRealHeight(603 - 12 - 52),
+ Y = Application.GetRealHeight(64 + 52 +10),
+ Height = Application.GetRealHeight(603 - 12 - 52-10),
};
bodyView.AddChidren(functionListView);
if (titleId == StringId.Lights)
{
- functionList.AddRange(FunctionList.List.groupControls);
+ //functionList.AddRange(FunctionList.List.groupControls);
functionList.AddRange(FunctionList.List.GetLightList());
}
else if(titleId == StringId.HorseRaceLamp)
@@ -185,7 +160,9 @@
}
else if (titleId == StringId.Electric)
{
+
functionList.AddRange(FunctionList.List.GetElectricals());
+
}
else if (titleId == StringId.EnvironmentalScience)
{
@@ -206,6 +183,10 @@
else if (titleId == StringId.SecurityMonitoring)
{
functionList.AddRange(FunctionList.List.GetIpCamImouList());
+ }
+ else if(titleId == StringId.EnergyMonitoring)
+ {
+ functionList.AddRange(FunctionList.List.GetEnergyList());
}
functionList = functionList.OrderByDescending(o => o.controlCounter).ToList();
@@ -271,7 +252,7 @@
{
continue;
}
- if (function.spk == SPK.LightRGBW || function.spk == SPK.LightRGB || function.spk == SPK.LightDimming)
+ if (function.spk == SPK.LightCCT || function.spk == SPK.LightRGBW || function.spk == SPK.LightRGB || function.spk == SPK.LightDimming)
{
var functionDiv = new FunctionControlZone(function,null)
{
@@ -305,9 +286,38 @@
functionListView.AddChidren(functionDiv);
}
+ else if (function.spk == SPK.ElectricalTvHisense)
+ {
+ Action deviceDelAction = () =>
+ {
+ //鍒犻櫎璁惧鎴愬姛鍚庢洿鏂癠I
+ if (functionListView==null) {
+ return;
+ }
+ functionListView.RemoveAll();
+ showList.Remove(function);//鍏堢Щ闄�
+ ShowFunctionRow(showList,isAppend);
+ this.DelAction?.Invoke();
+
+ };
+ var functionDiv = new FunctionControlZone(function, deviceDelAction)
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(96),
+ Radius = (uint)Application.GetMinRealAverage(12),
+ BorderColor = 0x00FFFFFF,
+ BorderWidth = 1,
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Tag = function.spk + function.sid
+ };
+ functionDiv.LoadFunctionDiv();
+ functionDiv.OrderEvent = OrderEvent;
+ functionListView.AddChidren(functionDiv);
+ }
else
{
- var functionDiv = new FunctionControlZone(function,null)
+ var functionDiv = new FunctionControlZone(function, null)
{
Gravity = Gravity.CenterHorizontal,
Width = Application.GetRealWidth(343),
--
Gitblit v1.8.0