From 452e8cef1c740d18ee398be6971d9952e41dbd4a Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 12 四月 2023 16:11:50 +0800
Subject: [PATCH] 1
---
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs | 54 +++++++++++++++++++++++++++---------------------------
1 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs
index 4f7abb9..e1dd248 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs
@@ -157,7 +157,7 @@
tempStatus.Add(new SecurityOutputStatus() { key = FunctionAttributeKey.OnOff, value = "on" });
allocatedList.Add(new SecurityOutput
{
- target_type = "0",
+ target_type = "1",
sid = function.sid,
status = tempStatus,
name = function.name,
@@ -184,7 +184,7 @@
tempStatus.Add(new SecurityOutputStatus() { key = "value", value = "0" });
allocatedList.Add(new SecurityOutput
{
- target_type = "1",
+ target_type = "2",
sid = scene.sid,
status = tempStatus,
name = scene.name,
@@ -204,20 +204,12 @@
functionListView.RemoveAll();
foreach (var function in allocatedList)
{
- var output = alarm.output.Find((obj) => obj.sid == function.sid);
- if (output == null)
- {
- output = new SecurityOutput();
- //{
- // status = new List<SecurityOutputStatus> { new SecurityOutputStatus {
- // key = FunctionAttributeKey.OnOff,
- // value = "on"
- // }
- // }
- //};
-
- output.sid = function.sid;
- }
+ //var output = alarm.output.Find((obj) => obj.sid == function.sid);
+ //if (output == null)
+ //{
+ // output = new SecurityOutput();
+ // output.sid = function.sid;
+ //}
FrameLayout functionRow = new FrameLayout()
{
@@ -257,7 +249,7 @@
TextAlignment = TextAlignment.CenterRight,
TextSize = CSS_FontSize.TextFontSize,
TextColor = CSS_Color.PromptingColor1,
- Text = output.StateText()
+ Text = function.StateText()
};
functionRow.AddChidren(btnState);
@@ -275,36 +267,43 @@
btnChooseIcon.MouseUpEventHandler = (sender, e) => {
btnChooseIcon.IsSelected = !btnChooseIcon.IsSelected;
var tempLocal = alarm.output.Find((obj) =>
- obj.sid == output.sid
+ obj.sid == function.sid
);
- if (tempLocal == null && !string.IsNullOrEmpty(output.spk))
- {
- ShowStateDialog(output, btnState, btnChooseIcon);
- }
+ //if (tempLocal == null && !string.IsNullOrEmpty(output.spk))
+ //{
+ // ShowStateDialog(output, btnState, btnChooseIcon);
+ //}
if (btnChooseIcon.IsSelected)
{
if (tempLocal == null)
- alarm.output.Add(output);
+ alarm.output.Add(function);
+ ShowStateDialog(function, btnState, btnChooseIcon);
}
else
{
if (tempLocal != null)
{
- alarm.output.Remove(output);
+ alarm.output.Remove(function);
}
}
};
btnState.MouseUpEventHandler = (sender, e) =>
{
- ShowStateDialog(output, btnState, btnChooseIcon);
+ btnChooseIcon.IsSelected = true;
+ var tempLocal = alarm.output.Find((obj) =>
+ obj.sid == function.sid
+ );
+ if (tempLocal == null)
+ alarm.output.Add(function);
+ ShowStateDialog(function, btnState, btnChooseIcon);
};
- var localOutput = alarm.output.Find((obj) => obj.sid == output.sid);
+ var localOutput = alarm.output.Find((obj) => obj.sid == function.sid);
if (localOutput != null)
{
btnChooseIcon.IsSelected = true;
- btnState.Text = output.StateText();
+ btnState.Text = function.StateText();
}
@@ -394,6 +393,7 @@
TextID = StringId.Cancel,
TextColor = CSS_Color.WarningColor,
IsBold = true,
+ TextSize = CSS_FontSize.SubheadingFontSize,
};
contentView.AddChidren(btnCancel);
--
Gitblit v1.8.0