From 7232642ff48a7fbde2018cde652f3e771fa58025 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 27 一月 2021 14:32:55 +0800 Subject: [PATCH] 20200127-英文版处理 --- HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 45 +++++++++++++++++++++++---------------------- 1 files changed, 23 insertions(+), 22 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs index e46520b..e1e05bc 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs @@ -1,6 +1,8 @@ -锘縰sing System; +using System; using Shared; using System.Collections.Generic; +using HDL_ON.Entity; + namespace HDL_ON.UI.UI2.Intelligence.Automation { public class ConditionDeviceFunList : FrameLayout @@ -36,22 +38,22 @@ }; this.AddChidren(fLayout); #endregion - switch (device.functionType) + switch (device.spk) { //寮�鍏崇伅鍏� light.Switch - case FunctionType.Dimmer: - case FunctionType.RGB: - case FunctionType.RGBW: - case FunctionType.ColorTemperature: - case FunctionType.Relay: + case SPK.LightDimming: + case SPK.LightRGB: + case SPK.LightRGBW: + case SPK.LightCCT: + case SPK.LightSwitch: //绐楀笜 - case FunctionType.Curtain: - case FunctionType.RollingShutter: - case FunctionType.MotorCurtain: + case SPK.CurtainSwitch: + case SPK.CurtainRoller: + case SPK.CurtainTrietex: //绌鸿皟 - case FunctionType.AC: + case SPK.AcStandard: //鍦扮儹 - case FunctionType.FloorHeating: + case SPK.FloorHeatStandard: { LogicView.FunTypeView lightSwitchView = new LogicView.FunTypeView(); lightSwitchView.btnText.TextID = StringId.switchLogic; @@ -83,7 +85,7 @@ } //鏄剧ず鏂囨湰 lightSwitchView.btnState.TextID = id; - selectedState = device.functionType + "_" + strValue; + selectedState = device.spk + "_" + strValue; //璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�; string keyVlaue = "on_off"; AddDictionary(keyVlaue, strValue); @@ -181,21 +183,20 @@ LogicMethod.dictionary(dic, "comparator", "="); LogicMethod.dictionary(dic, "data_type", "string"); LogicMethod.dictionary(dic, "value", selectedValue); - AddDictionaryList(KeyValue, dic, dicSateteList); + 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)) { //鍒ゆ柇鏄惁瀛樺湪 @@ -207,14 +208,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