public bool SetAlarmParamsSetting(Controller controller, AlarmParamsSetting setting) { WGPacket packet = new WGPacket(0xAE); packet.SetDevSn(controller.sn); packet.SetAlarmParamsSetting(setting); DoSend(packet, controller.ip, controller.port); List <WGPacket> packets = WGRecievePacketAddClose(1); if (packets.Count == 1) { return(packets[0].data[0] == 1); } return(false); }