From acc8caee31c4be90bd38d1af18136b0e84f6fe94 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 27 九月 2024 14:01:19 +0800
Subject: [PATCH] Merge branch 'feature/v2.7_迭代' into feature/V2.7_Google
---
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs | 114 ++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 77 insertions(+), 37 deletions(-)
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index 609c480..841d748 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -1,5 +1,6 @@
锘縰sing System;
using System.Collections.Generic;
+using System.Security.Cryptography;
using HDL_ON.DAL.Server;
using HDL_ON.DriverLayer;
using HDL_ON.Entity;
@@ -751,7 +752,10 @@
case ShowFunction.VideoIntercom:
if (FunctionList.List.videoIntercom != null && FunctionList.List.videoIntercom.Count > 0)
{
- functionCount = 1;
+ if (Common.ApiUtlis.Ins.hadInternet)
+ {
+ functionCount = 1;
+ }
}
break;
case ShowFunction.SecurityCenter:
@@ -759,7 +763,11 @@
break;
case ShowFunction.Acst:
functionCount = FunctionList.List.GetAcstParentList().Count;
- functionOnCount = FunctionList.List.GetAcstParentList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
+ functionOnCount = 0;
+ break;
+ case ShowFunction.InverterJinmao:
+ functionCount = FunctionList.List.GetInverterJinmaoList().Count;
+ functionOnCount = 0;
break;
}
@@ -824,7 +832,7 @@
&& item != ShowFunction.Music
&& item != ShowFunction.EnergyMonitoring
&& item != ShowFunction.SecurityCenter
- && item != ShowFunction.Acst && item != ShowFunction.IpCam
+ && item != ShowFunction.Acst && item != ShowFunction.IpCam && item != ShowFunction.InverterJinmao
&& functionCount != 0)
{
btnFunctionCount = new Button()
@@ -1133,8 +1141,14 @@
};
break;
case ShowFunction.Acst:
- btnName.TextID = StringId.Acst;
-
+ case ShowFunction.InverterJinmao:
+ //if(item == ShowFunction.Acst)
+ //{
+ // btnFunctionViewBg.UnSelectedImagePath = "FunctionIcon/FunctionBg/SecurityMonitoringFunctionBg.png";
+ //}else if (item == ShowFunction.InverterJinmao)
+ //{
+ // btnFunctionViewBg.UnSelectedImagePath = "FunctionIcon/FunctionBg/SecurityMonitoringFunctionBg.png";
+ //}
Button btnJMLogo = new Button()
{
Y = specialList.Contains(index) ? Application.GetRealWidth(147) : Application.GetRealWidth(104),
@@ -1143,39 +1157,65 @@
Height = Application.GetRealWidth(57),
};
functionView.AddChidren(btnJMLogo);
+
- //Button btnAcstPower = new Button()
- //{
- // X = Application.GetRealWidth(120),
- // Y = specialList.Contains(index) ? Application.GetRealWidth(160) : Application.GetRealWidth(117),
- // Width = Application.GetRealWidth(32),
- // Height = Application.GetRealWidth(32),
- // SelectedImagePath = "Public/PowerOpen.png",
- // UnSelectedImagePath = "Public/PowerClose.png",
- // IsSelected = functionOnCount > 0,
- // Tag = item + "_AllControl",
- //};
- //functionView.AddChidren(btnAcstPower);
- //btnAcstPower.MouseUpEventHandler = (sender, e) =>
- //{
- // btnAcstPower.IsSelected = !btnAcstPower.IsSelected;
- // string onoff = btnAcstPower.IsSelected ? "on" : "off";
- // Dictionary<string, string> d = new Dictionary<string, string>();
- // d.Add(FunctionAttributeKey.OnOff, onoff);
- // foreach (var temp in FunctionList.List.GetAcstParentList())
- // {
- // Control.Ins.SendWriteCommand(temp, d);
- // }
- //};
-
-
- btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
+ if (item == ShowFunction.Acst)
{
- var page = new AcstParentPage();
- MainPage.BasePageView.AddChidren(page);
- page.LoadPage();
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- };
+ btnName.TextID = StringId.Acst;
+ try
+ {
+ var acstFunction = FunctionList.List.GetAcstParentList()[0];
+ btnName.Text = acstFunction.name;
+ if (acstFunction.extend.Contains("jinmao") && acstFunction.extend.Contains("true"))
+ {
+ btnJMLogo.Visible = true;
+ }
+ else
+ {
+ btnJMLogo.Visible = false;
+ }
+
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log("Error", $"鍔犺浇閲戣寕绉戞妧绯荤粺涓绘帶鍚嶇О寮傚父:{ex.Message}");
+ }
+ btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
+ {
+ var page = new AcstParentPage();
+ MainPage.BasePageView.AddChidren(page);
+ page.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+ }
+ else if (item == ShowFunction.InverterJinmao)
+ {
+ btnName.TextID = StringId.NewEnergy;
+ try
+ {
+ var jinmaoInverterFunction = FunctionList.List.GetInverterJinmaoList()[0];
+ btnName.Text = jinmaoInverterFunction.name;
+ if (jinmaoInverterFunction.extend.Contains("jinmao") && jinmaoInverterFunction.extend.Contains("true"))
+ {
+ btnJMLogo.Visible = true;
+ }
+ else
+ {
+ btnJMLogo.Visible = false;
+ }
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log("Error", $"鍔犺浇閲戣寕鍌ㄨ兘鍚嶇О寮傚父:{ex.Message}");
+ }
+ btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
+ {
+ var page = new InverterJinmaoPage();
+ MainPage.BasePageView.AddChidren(page);
+ page.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+ }
break;
}
@@ -1186,7 +1226,7 @@
&& ShowFunction.VideoIntercom != item
&& ShowFunction.SecurityCenter != item
&& ShowFunction.Series != item
- && ShowFunction.Acst != item)
+ && ShowFunction.Acst != item && ShowFunction.InverterJinmao != item)
{
btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
{
--
Gitblit v1.8.0