From 80faceb86399017851f9f72feaaef868a37ff23f Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 26 三月 2021 10:50:35 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/lss' into temp-wxr
---
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs | 81 +++++++++++++++++++++++-----------------
1 files changed, 46 insertions(+), 35 deletions(-)
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index 3603252..26adc48 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -76,6 +76,7 @@
public void LoadPage()
{
+ MainPage.CurPageIndex = 1;
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
#region top
FrameLayout topView = new FrameLayout()
@@ -442,44 +443,45 @@
{
case ShowFunction.Light:
#region Light
- functionCount = FunctionList.List.lights.Count;
- functionOnCount = FunctionList.List.lights.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
+ functionCount = FunctionList.List.GetLightList().Count;
+ functionOnCount = FunctionList.List.GetLightList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
#endregion
break;
case ShowFunction.AC:
#region AC
- functionCount = FunctionList.List.aCs.Count;
- functionOnCount = FunctionList.List.aCs.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
+ functionCount = FunctionList.List.GetAcList().Count;
+ functionOnCount = FunctionList.List.GetAcList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
#endregion
break;
case ShowFunction.Curtain:
#region Curtain
- functionCount = FunctionList.List.curtains.Count;
- functionOnCount = FunctionList.List.curtains.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
+ functionCount = FunctionList.List.GetCurtainList().Count;
+ functionOnCount = FunctionList.List.GetCurtainList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
#endregion
break;
case ShowFunction.FloorHeating:
#region 鍦扮儹
- functionCount = FunctionList.List.floorHeatings.Count;
- functionOnCount = FunctionList.List.floorHeatings.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
+ functionCount = FunctionList.List.GetFloorHeatingList().Count;
+ functionOnCount = FunctionList.List.GetFloorHeatingList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
#endregion
break;
case ShowFunction.DoorLock:
break;
case ShowFunction.Electric:
#region 鐢靛櫒
- functionCount = FunctionList.List.electricals.Count;
- functionOnCount = FunctionList.List.electricals.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
+ functionCount = FunctionList.List.GetElectricals().Count;
+ functionOnCount = FunctionList.List.GetElectricals().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
#endregion
break;
case ShowFunction.EnergyMonitoring:
break;
case ShowFunction.Environmental:
#region 鐜鏁版嵁
- functionCount = FunctionList.List.sensorsEnvironmentalScience.Count;
+ functionCount = FunctionList.List.GetEnvirSensorsList().Count;
#endregion
break;
case ShowFunction.FreshAir:
+ functionCount = FunctionList.List.GetAirFreshList().Count;
break;
case ShowFunction.Music:
functionCount = Music.A31MusicModel.A31MusicModelList.Count;
@@ -488,13 +490,12 @@
case ShowFunction.Panel:
break;
case ShowFunction.SecurityMonitoring:
+ functionCount = 1;
break;
case ShowFunction.Sensor:
- functionCount = FunctionList.List.sensorsArm.Count;
- //functionOnCount = FunctionList.List.aCs.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
+ functionCount = FunctionList.List.GetArmSensorList().Count;
break;
case ShowFunction.VideoIntercom:
- functionCount = 1;
break;
}
@@ -552,6 +553,7 @@
functionView.AddChidren(btnName);
if (item != ShowFunction.Environmental && item != ShowFunction.Sensor && item != ShowFunction.VideoIntercom
+ && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir
&& functionCount != 0)
{
Button btnFunctionCount = new Button()
@@ -597,8 +599,6 @@
case ShowFunction.Light:
#region Light
btnName.TextID = StringId.Lights;
- functionCount = FunctionList.List.lights.Count;
- functionOnCount = FunctionList.List.lights.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
Button btnLightPower = new Button()
{
X = Application.GetRealWidth(120),
@@ -623,8 +623,6 @@
case ShowFunction.AC:
#region AC
btnName.TextID = StringId.AC;
- functionCount = FunctionList.List.aCs.Count;
- functionOnCount = FunctionList.List.aCs.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
Button btnAcPower = new Button()
{
X = Application.GetRealWidth(120),
@@ -647,8 +645,6 @@
case ShowFunction.Curtain:
#region Curtain
btnName.TextID = StringId.Curtain;
- functionCount = FunctionList.List.curtains.Count;
- functionOnCount = FunctionList.List.curtains.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
Button btnClose;
btnClose = new Button()
{
@@ -682,8 +678,6 @@
case ShowFunction.FloorHeating:
#region 鍦扮儹
btnName.TextID = StringId.FloorHeating;
- functionCount = FunctionList.List.floorHeatings.Count;
- functionOnCount = FunctionList.List.floorHeatings.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
Button btnFhPower = new Button()
{
X = Application.GetRealWidth(120),
@@ -709,8 +703,6 @@
case ShowFunction.Electric:
#region 鐢靛櫒
btnName.TextID = StringId.Electric;
- functionCount = FunctionList.List.electricals.Count;
- functionOnCount = FunctionList.List.electricals.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
Button btnElectricPower = new Button()
{
X = Application.GetRealWidth(120),
@@ -738,7 +730,7 @@
btnName.TextID = StringId.EnvironmentalData;
btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
{
- var skipView = new EnvironmentalSciencePage();
+ var skipView = new EnvironmentalPage();// EnvironmentalSciencePage();
MainPage.BasePageView.AddChidren(skipView);
skipView.LoadPage();
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
@@ -747,11 +739,30 @@
break;
case ShowFunction.FreshAir:
btnName.TextID = StringId.FreshAir;
+ #region Light
+ Button btnFreshAirPower = 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(btnFreshAirPower);
+
+ btnFreshAirPower.MouseUpEventHandler = (sender, e) =>
+ {
+ LoadEvent_SwitchFunction(btnFreshAirPower, item, functionView);
+ };
+ functionPageTitleId = StringId.FreshAir;
+
+ #endregion
break;
case ShowFunction.Music:
btnName.TextID = StringId.Music;
- functionCount = Music.A31MusicModel.A31MusicModelList.Count;
- functionOnCount = Music.A31MusicModel.A31MusicModelList.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
{
var musicMain = new Music.MusicMain();
@@ -765,6 +776,10 @@
break;
case ShowFunction.SecurityMonitoring:
btnName.TextID = StringId.SecurityMonitoring;
+ btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
+ {
+ HDLCommon.Current.Go2EZvizMonitor(bodyView);
+ };
break;
case ShowFunction.Sensor:
btnName.TextID = StringId.Sensor;
@@ -772,15 +787,11 @@
break;
case ShowFunction.VideoIntercom:
btnName.TextID = StringId.VideoIntercom;
- btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
- {
-
- };
break;
}
//鐣岄潰璺宠浆--闊充箰璺宠浆鑷繁鐨勭晫闈�--鐜璺宠浆鑷繁鐨勭晫闈�
- if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.VideoIntercom)
+ if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring)
{
btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
{
@@ -799,10 +810,10 @@
s1View.Height = s2View.Height = functionContentView.Height = functionContentViewHeight+ Application.GetRealWidth(40);
}
- #endregion
+#endregion
}
- #region 鍒囨崲妤煎眰
+#region 鍒囨崲妤煎眰
/// <summary>
/// 妤煎眰鏄剧ず鍒囨崲
/// </summary>
@@ -959,6 +970,6 @@
{
}
- #endregion
+#endregion
}
}
\ No newline at end of file
--
Gitblit v1.8.0