From 3fcb73db484d2bed5ee993702913a7eaea68068c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 18 八月 2023 18:01:23 +0800
Subject: [PATCH] 2.1.2
---
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | 37 +++++++++++++++++++++++++++++--------
1 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index db4c83f..623df1d 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -58,7 +58,7 @@
{
//缇ゆ帶
case SPK.GroupControl:
- int bottom = 50;
+ int height = Application.GetRealHeight(50);
int attributesNameId=0;
int count = 0;
foreach (var attr in (device as GroupControl).attributes)
@@ -71,7 +71,7 @@
{
LogicView.FunTypeView view = new LogicView.FunTypeView();
view.btnState.Name = "缇ゆ帶";
- view.frameLayout.Y = count * Application.GetRealHeight(50);
+ view.frameLayout.Y = count * height;
fLayout.AddChidren(view.FLayoutView());
count++;
switch (attr.key)
@@ -118,6 +118,7 @@
break;
case FunctionAttributeKey.Colorful:
attributesNameId = StringId.ColorfulFunction;
+ view.btnState.Name = "colorful";
///寮�鍏崇偣鍑讳簨浠�
view.btnClick.MouseUpEventHandler += (sender, e) =>
{
@@ -129,13 +130,13 @@
if (edit)
{
//鏄剧ず缂栬緫涔嬪墠鐨勮澶囩姸鎬�
- GetEditDeviceState(device, index, view.btnState, null, null, null);
+ GetEditDeviceState(device, index, view.btnState, null, null, null, attr.key);
}
}
}
//璁惧寤舵椂iewv
- DelayView(fLayout, Application.GetRealHeight(50)* count);
+ DelayView(fLayout, height* count);
break;
//鎻掑骇(鏈塙SB)
case SPK.PanelSocket:
@@ -162,6 +163,21 @@
}
#endregion
}
+ break;
+ case SPK.CommonSeries:
+ #region 鐣岄潰
+ ///寮�鍏�
+ LogicView.FunTypeView SerriesSwitchView = new LogicView.FunTypeView();
+ SerriesSwitchView.btnText.TextID = StringId.switchLogic;
+ fLayout.AddChidren(SerriesSwitchView.FLayoutView());
+
+ #endregion
+ ///寮�鍏崇偣鍑讳簨浠�
+ SerriesSwitchView.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ SwitchViewMethod(device, SerriesSwitchView.btnState, 2);
+ };
+
break;
//寮�鍏崇伅鍏�
case SPK.AirSwitch:
@@ -1007,7 +1023,11 @@
break;
case SPK.GroupControl:
{
- keyVlaue = "colorful";
+ if (button.Name == "colorful")
+ {
+ keyVlaue = "colorful";
+ }
+
}
break;
}
@@ -1137,7 +1157,7 @@
}
-
+
/// <summary>
@@ -1149,7 +1169,8 @@
/// <param name="button2">鏄剧ずBtn</param>
/// <param name="button3">鏄剧ずBtn</param>
/// <param name="button4">鏄剧ずBtn</param>
- private void GetEditDeviceState(Entity.Function device, int index, Button button1, Button button2, Button button3, Button button4)
+ /// <param name="attribute">灞炴�ey</param>
+ private void GetEditDeviceState(Entity.Function device, int index, Button button1, Button button2, Button button3, Button button4, string attribute="")
{
Output outputs = Logic.currlogic.output[index];
var dicList = outputs.status;
@@ -1166,7 +1187,7 @@
this.btnDelay.Text = outputs.delay + "s";
this.strdelay = outputs.delay;
}
- InpOrOutLogicMethod.Current.EditDeviceState(device, dicList, button1, button2, button3, button4);
+ InpOrOutLogicMethod.Current.EditDeviceState(device, dicList, button1, button2, button3, button4, attribute);
}
/// <summary>
/// 娣诲姞閫変腑鏁版嵁
--
Gitblit v1.8.0