wei
2021-03-26 976c266003d052c93d45f438fa8f6ccfc926b3b2
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage_AddIrButton.cs
@@ -135,33 +135,18 @@
                PirSend.CodeStudy(new Control() { deviceId = control.deviceId,sid = control.sid }, buttonObj, (mqttData) =>
                {
                    if (mqttData != null)// && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
                     if (mqttData != null)
                    {
                        Method method = new Method();
                        Method.buttondata = "";
                        var mqttdate = method.MqttDate("按键", control.sid, 25);
                        if (mqttdate != null)
                         control.attributes.Add(new FunctionAttributes() { key = buttonObj.key, value = new System.Collections.Generic.List<string>() { buttonObj.value } });
                         this.RemoveFromParent();
                     }
                     else
                        {
                            this.RemoveFromParent();
                            control.attributes.Add(new FunctionAttributes() { key = buttonObj.key, value = new System.Collections.Generic.List<string>() { buttonObj.value } });
                        }
                        else
                        {
                            replication.RemView();
                            new TipPopView().FlashingBox(Language.StringByID(StringId.tianjiashibai));
                        }
                    }
                    else
                    {
                        Method method = new Method();
                        new TipPopView().FlashingBox(Language.StringByID(StringId.tianjiashibai));
                    }
                });
            };
        }
    }
}