From e1a8f2f7e4d850beedeb1469610b878c1427e976 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 15 十二月 2021 09:01:53 +0800
Subject: [PATCH] 更新
---
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs | 35 ++++++++++++++++-------------------
1 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs
index 4ff5844..4f7abb9 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs
@@ -207,20 +207,17 @@
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 = new SecurityOutput();
+ //{
+ // status = new List<SecurityOutputStatus> { new SecurityOutputStatus {
+ // key = FunctionAttributeKey.OnOff,
+ // value = "on"
+ // }
+ // }
+ //};
output.sid = function.sid;
}
- //else
- //{
- // output.addCondition = true;
- //}
FrameLayout functionRow = new FrameLayout()
{
@@ -260,9 +257,9 @@
TextAlignment = TextAlignment.CenterRight,
TextSize = CSS_FontSize.TextFontSize,
TextColor = CSS_Color.PromptingColor1,
+ Text = output.StateText()
};
functionRow.AddChidren(btnState);
-
Button btnChooseIcon = new Button()
{
@@ -277,18 +274,20 @@
btnChooseIcon.MouseUpEventHandler = (sender, e) => {
btnChooseIcon.IsSelected = !btnChooseIcon.IsSelected;
- var tempLocal = alarm.input.Find((obj) =>
+ var tempLocal = alarm.output.Find((obj) =>
obj.sid == output.sid
);
+ if (tempLocal == null && !string.IsNullOrEmpty(output.spk))
+ {
+ ShowStateDialog(output, btnState, btnChooseIcon);
+ }
if (btnChooseIcon.IsSelected)
{
- //input.addCondition = true;
if (tempLocal == null)
alarm.output.Add(output);
}
else
{
- //input.addCondition = false;
if (tempLocal != null)
{
alarm.output.Remove(output);
@@ -358,7 +357,7 @@
SelectedTextColor = CSS_Color.MainColor,
TextColor = CSS_Color.PromptingColor1,
TextSize = CSS_FontSize.SubheadingFontSize,
- TextID = StringId.On,
+ TextID = StringId.Open,
};
optinView.AddChidren(btnOpen);
optinView.AddChidren(new Button()
@@ -373,7 +372,7 @@
TextAlignment = TextAlignment.Center,
SelectedTextColor = CSS_Color.MainColor,
TextColor = CSS_Color.PromptingColor1,
- TextID = StringId.OFF,
+ TextID = StringId.Close,
TextSize = CSS_FontSize.SubheadingFontSize,
};
optinView.AddChidren(btnClose);
@@ -455,8 +454,6 @@
};
}
-
-
/// <summary>
--
Gitblit v1.8.0