Ejemplo n.º 1
0
        public bool SetHoliday(Controller controller, HolidayPrm holiday)
        {
            WGPacket packet = new WGPacket(0xCC);

            packet.SetDevSn(controller.sn);
            packet.SetHoliday(holiday);
            DoSend(packet, controller.ip, controller.port);
            List <WGPacket> packets = WGRecievePacketAddClose(1);

            if (packets.Count == 1)
            {
                return(packets[0].data[0] == 1);
            }
            return(false);
        }