Esempio n. 1
0
        static void Open1(int id)
        {
            Led led = list[id];

            if ((led.IP == "") || (led.IP == "0.0.0.0") || (led.state == 1))
            {
                return;
            }

            try
            {
                LedCommon.DEVICEPARAM param = new LedCommon.DEVICEPARAM();

                param.devType = (uint)LedCommon.eDevType.DEV_UDP;
                param.locPort = (uint)(LocPort + id);
                param.rmtPort = (uint)6666;

                led.dev   = LedCommon.DLL_LED_Open(ref param, LedCommon.NOTIFY_EVENT, 0, 0);
                led.state = 1;
            }
            catch (Exception e)
            {
                throw new Exception("LedOpen(" + id.ToString() + ") Error:" + e.Message);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 打开LED控制
        /// </summary>
        public void Open()
        {
            LedCommon.DEVICEPARAM param = new LedCommon.DEVICEPARAM();

            param.devType = (uint)LedCommon.eDevType.DEV_UDP;
            param.locPort = locPort;
            param.rmtPort = (uint)6666;

            dev = LEDSender.LED_Open(ref param, 0, formHandle, WM_LED_NOTIFY + 2);
        }