From c1d681f496f2e1c53f88472d803e3c95fab521af Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期四, 29 七月 2021 09:46:16 +0800
Subject: [PATCH] 萤石测试通过
---
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | 32 +++++++++++++++-----------------
1 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index 9c04646..ecd18e9 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -387,6 +387,8 @@
if (edit)
{
+ //鏇存柊寤舵椂鏃堕棿
+ outputDevice.delay = Logic.currlogic.output[index].delay;
//绉婚櫎鏃ф暟鎹�
Logic.currlogic.output.RemoveAt(index);
//鏂版暟鎹彃鍏ユ棫鏁版嵁鐨勪綅缃�;
@@ -408,7 +410,7 @@
this.RemoveFromParent();
return;
}
- LogicMethod.RemoveAllView();
+ LogicMethod.CurrLogicMethod.RemoveAllView();
AddLogic addLogic = new AddLogic();
MainPage.BasePageView.AddChidren(addLogic);
addLogic.Show();
@@ -426,10 +428,7 @@
private void SwitchViewMethod(Entity.Function device, Button button, int len)
{
#region 鐣岄潰
- FrameLayout frame = new FrameLayout
- {
- BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
- };
+ FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewTrans60lucence };
this.AddChidren(frame);
LogicView.SwitchView switchView = new LogicView.SwitchView();
switchView.FLayoutView(frame, len, button.Text, (strValue) =>
@@ -517,7 +516,7 @@
private void GetEditState(Entity.Function device, int index, Button button1, Button button2, Button button3, Button button4)
{
Output outputs = Logic.currlogic.output[index];
- var dicList = outputs.status as List<Dictionary<string, string>>;
+ var dicList = outputs.status;
//娓呴櫎涔嬪墠鏃ф暟鎹�
dicSateteList.Clear();
if (dicList.Count != 0)
@@ -536,23 +535,22 @@
{
//鏁版嵁灏佽
Dictionary<string, string> dic = new Dictionary<string, string>();
- LogicMethod.dictionary(dic, "key", KeyValue);
- LogicMethod.dictionary(dic, "value", selectedValue);
- AddDictionaryList(KeyValue, dic, dicSateteList);
+ LogicMethod.CurrLogicMethod.dictionary(dic, "key", KeyValue);
+ LogicMethod.CurrLogicMethod.dictionary(dic, "value", selectedValue);
+ AddDictionaryList(KeyValue, dic);
}
/// <summary>
/// 鏇存柊鏁版嵁鍒楄〃
/// </summary>
/// <param name="keyValue">璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�</param>
- /// <param name="dictionary">閫変腑鏁版嵁</param>
- /// <param name="dicList">瀛樺偍鏁版嵁鍒楄〃</param>
+ /// <param name="dictionary">娣诲姞閫変腑鏁版嵁</param>
/// <returns></returns>
- private void AddDictionaryList(string keyValue, Dictionary<string, string> dictionary, List<Dictionary<string, string>> dicList)
+ private void AddDictionaryList(string keyValue, Dictionary<string, string> dictionary)
{
int indexValue = -1;
- for (int i = 0; i < dicList.Count; i++)
+ for (int i = 0; i < dicSateteList.Count; i++)
{
- var dic = dicList[i];
+ var dic = dicSateteList[i];
if (dic.ContainsValue(keyValue))
{
//鍒ゆ柇鏄惁瀛樺湪
@@ -564,14 +562,14 @@
if (indexValue != -1)
{
//瀛樺湪绉婚櫎
- dicList.RemoveAt(indexValue);
+ dicSateteList.RemoveAt(indexValue);
//閲嶆柊娣诲姞
- dicList.Insert(indexValue, dictionary);
+ dicSateteList.Insert(indexValue, dictionary);
}
else
{
//鏂版坊鍔�
- dicList.Add(dictionary);
+ dicSateteList.Add(dictionary);
}
}
--
Gitblit v1.8.0