HDL-ON_Android/Assets/Language.ini | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL-ON_iOS/Resources/Language.ini | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/Common/R.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
HDL-ON_Android/Assets/Language.ini
@@ -801,6 +801,7 @@ 6092=The device does not exist 6093=The device is not online 6094=The gateway device does not exist 6095=More than 30 add buttons 7108=Leak/No Leak @@ -1877,7 +1878,7 @@ 6092=设备不存在 6093=设备不在线 6094=网关设备不存在 6095=添加按钮超出30个 7000=新建自动化 HDL-ON_iOS/Resources/Language.ini
@@ -800,6 +800,7 @@ 6092=The device does not exist 6093=The device is not online 6094=The gateway device does not exist 6095=More than 30 add buttons 7108=Leak/No Leak @@ -1876,6 +1877,7 @@ 6092=设备不存在 6093=设备不在线 6094=网关设备不存在 6095=添加按钮超出30个 HDL_ON/Common/R.cs
@@ -1397,6 +1397,8 @@ public const int shebeibucunzai = 6092; public const int shebeibuzaixian = 6093; public const int wangguanshebeibuzaixian = 6094; public const int anniuchaochu30 = 6095; public const int newAutomation = 7000; public const int editAutomation = 7001; HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs
@@ -113,6 +113,13 @@ ///下一步的点击事件 saveBtn.MouseUpEventHandler += (sender, e) => { if (control.status.Count > 29) { ///超出30个红外宝内存满了会出现异常 new PirMethod().ErrorShow(null, "添加按钮超出30个"); return; } var texts = editText.Text.Trim(); if (string.IsNullOrEmpty(editText.Text)) { @@ -131,7 +138,8 @@ //添加数据对象 Entity.AttributesStatus buttonObj = new Entity.AttributesStatus(); buttonObj.key = "key" + control.status.Count.ToString(); string keyName = GetKeyName(control.status); buttonObj.key = keyName; buttonObj.value = texts; PirSend.CodeStudy(control, buttonObj, (mqttdate) => @@ -162,7 +170,7 @@ { replication.RemView(); PirMethod method = new PirMethod(); method.ErrorShow(null,"添加失败"); method.ErrorShow(null, "添加失败"); } }); @@ -179,5 +187,28 @@ PirMethod.RefreshView("PirMain"); base.RemoveFromParent(); } /// <summary> /// 查找唯一健名值 /// </summary> /// <param name="listKeyName">已经存在健名列表</param> /// <returns></returns> private string GetKeyName(List<Entity.AttributesStatus> listKeyName) { //目前红外宝学习按钮最多是30个; for (int i = 0; i < 50; i++) { string keyName = "key" + i.ToString(); ///查找是否存在 var currKeyName = listKeyName.Find((c) => c.key == keyName); if (currKeyName == null) { return keyName; } } return "key" + listKeyName.Count; } } } HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs
@@ -543,6 +543,9 @@ { str = Language.StringByID(StringId.tianjiashibai); } else if (text== "添加按钮超出30个") { str = Language.StringByID(StringId.anniuchaochu30); } else { if (responsePackNew != null)