xm
2021-12-01 6d73bf6e816570291865674bef8bce8972e4de3f
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage_AddIrButton.cs
@@ -9,8 +9,11 @@
{
    public class AcControlPage_AddIrButton : FrameLayout
    {
        public AcControlPage_AddIrButton()
        Action action;
        public AcControlPage_AddIrButton(Action act)
        {
            action = act;
        }
        public void Show(Function control)
        {
@@ -130,6 +133,18 @@
                //添加数据对象
                AttributesStatus buttonObj = new AttributesStatus();
                //防止key不唯一
                var attrCount = control.attributes.Count;
                var keyString = "key" + attrCount;
                while (true)
                {
                    if (control.attributes.Find((obj) => obj.key == keyString) == null)
                    {
                        break;
                    }
                    keyString = "key" + (++attrCount);
                }
                buttonObj.key = "key" + control.attributes.Count.ToString();
                buttonObj.value = texts;
@@ -139,6 +154,8 @@
                     {
                         control.attributes.Add(new FunctionAttributes() { key = buttonObj.key, value = new System.Collections.Generic.List<string>() { buttonObj.value } });
                         this.RemoveFromParent();
                         action?.Invoke();
                         //new TipPopView().FlashingBox(Language.StringByID(StringId.tianjiachenggong));
                     }
                     else
                     {