From b253e7c13fab85912af2ee8494a19b42b607fd7a Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期一, 21 十二月 2020 09:26:20 +0800 Subject: [PATCH] 2020-12-21 1.修改密码错误锁定提示,增加时间提示。 --- HDL_ON/Entity/Function/Function.cs | 48 ++++++++++++++++++++++++++++++------------------ 1 files changed, 30 insertions(+), 18 deletions(-) diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index 2fd3da8..192d53b 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -173,8 +173,8 @@ max = 1, min = 0, }; + _trait_on_off.curValue = "on"; } - _trait_on_off.curValue = "on"; } return _trait_on_off; } @@ -231,11 +231,11 @@ { roomNameList += ","; } - roomNameList += findRoom.floorName + findRoom.roomName; + roomNameList += findRoom.floorName +"-"+ findRoom.roomName; } if (roomNameList == "" && functionType == FunctionType.Scene) { - roomNameList = Language.StringByID(StringId.WholeHouseScene); + roomNameList = Language.StringByID(StringId.WholeZone); } return roomNameList; } @@ -286,19 +286,30 @@ var sFunc = new SceneFunction(); foreach (var attr in attributes) { - if (attr.curValue.ToString() == "{}") + switch (attr.key) { - attr.curValue = "0"; - } - if (attr.key == FunctionAttributeKey.SetTemp) - { - double vv = 16; - Double.TryParse(attr.curValue.ToString(),out vv); - sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() }); - } - else - { - sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = attr.curValue.ToString() }); + case FunctionAttributeKey.OnOff: + case FunctionAttributeKey.Brightness: + case FunctionAttributeKey.Mode: + case FunctionAttributeKey.SetTemp: + case FunctionAttributeKey.FanSpeed: + case FunctionAttributeKey.Percent: + case FunctionAttributeKey.FadeTime: + if (attr.curValue.ToString() == "{}") + { + attr.curValue = "0"; + } + if (attr.key == FunctionAttributeKey.SetTemp) + { + double vv = 16; + Double.TryParse(attr.curValue.ToString(), out vv); + sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() }); + } + else + { + sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = attr.curValue.ToString() }); + } + break; } } sFunc.sid = this.sid; @@ -343,6 +354,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() @@ -643,15 +655,15 @@ /// <summary> /// 瀹剁數銆佹彃搴� /// </summary> - public const string ElectricSocket = "electric.socket "; + public const string ElectricSocket = "electrical.socket"; /// <summary> /// 瀹剁數銆佺數瑙� /// </summary> - public const string ElectricTV = "electric.tv"; + public const string ElectricTV = "electrical.tv"; /// <summary> /// 瀹剁數銆侀鎵� /// </summary> - public const string ElectricFan = "electric.fan"; + public const string ElectricFan = "electrical.fan"; } } \ No newline at end of file -- Gitblit v1.8.0