From c06d8a0b3e3010a06e784ff2d078d4ef59a9ac66 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 18 十二月 2020 17:47:36 +0800 Subject: [PATCH] 2020-12-18 1.房间楼层控件封装FloorSelectPopupDialog、DiySelectPopupDialog --- HDL_ON/Entity/Function/Function.cs | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index 5fd7886..e2ffa2b 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -208,7 +208,7 @@ string busId = ""; if (bus != null) { - busId = bus.SubnetID + "_" + bus.DeviceID + "_" + bus.loopId; + busId = bus.SubnetID + "_" + bus.DeviceID + "_" + bus.LoopId; } return busId; } @@ -286,9 +286,14 @@ var sFunc = new SceneFunction(); foreach (var attr in attributes) { + if (attr.curValue.ToString() == "{}") + { + attr.curValue = "0"; + } if (attr.key == FunctionAttributeKey.SetTemp) { - var vv = Convert.ToDouble(attr.value); + double vv = 16; + Double.TryParse(attr.curValue.ToString(),out vv); sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() }); } else @@ -317,9 +322,9 @@ var acd = new AlinkControlData(); acd.sid = sid; - var aca = new AlinkControlAttributes(); foreach (var dic in commandDictionary) { + var aca = new AlinkControlAttributes(); aca.key = dic.Key; aca.value = dic.Value; acd.status.Add(aca); @@ -338,6 +343,7 @@ ApiAlinkControlActionObj aaao = new ApiAlinkControlActionObj(); aaao.deviceId = this.deviceId; aaao.spk = this.spk; + aaao.bus = this.bus; foreach (var kv in keyValues) { aaao.attributes.Add(new AlinkControlAttributes() @@ -420,6 +426,7 @@ /// 鍔熻兘灞炴�� /// 灞炴�у瓧娈佃В鏋愶細attri :灞炴�у唴瀹癸紝value 灞炴�х殑鍊硷紝max 鏈�澶у�� min 鏈�灏忓�� /// </summary> + [System.Serializable] public class FunctionAttributes { /// <summary> @@ -533,7 +540,15 @@ return Convert.ToByte(addresses.Substring(2, 2), 16); } } - public byte loopId; + public byte LoopId + { + get + { + return Convert.ToByte(loopId, 16); + } + } + + public string loopId; } public static class SPK -- Gitblit v1.8.0