Example #1
0
        public void SendPics(int width, int height, int caddress, string ipaddress, string port)
        {
            LedDLL.RECT        r     = new LedDLL.RECT();
            LedDLL.DEVICEPARAM param = new LedDLL.DEVICEPARAM();
            //param.devType = 2;
            // param.ComPort = 1;
            param.locPort = 8009;
            //param.Speed = 4;
            param.rmtPort = 6666;
            param.devType = 1;
            //IntPtr handle = new IntPtr();
            int dev1 = LEDSender.LED_Open(ref param, LedDLL.NOTIFY_BLOCK, 0, 0);

            LEDSender.MakeRoot(LedDLL.eRootType.ROOT_PLAY, LedDLL.eScreenType.SCREEN_COLOR);
            //LedPic Led1 = new LedPic(null);
            foreach (string sendpic in Pics)
            {
                this.PicturePath = sendpic;
                LEDSender.AddLeaf(5000);
                r.left   = 0;
                r.top    = 0;
                r.right  = width;
                r.bottom = height;
                // string filepath = Application.StartupPath + "\\path.bmp";
                LEDSender.AddPicture(PicturePath, ref r, 1, 1, 1, 0);
            }
            LEDSender.LED_SendToScreen(dev1, Convert.ToByte(caddress), ipaddress, Convert.ToUInt16(port));
        }
Example #2
0
        //连接LED
        private void OpenLed()
        {
            ScreenLEDEntity twobig = ScreenLedFactory.GetByKey("192.168.113.73");

            LedDLL.DEVICEPARAM param = new LedDLL.DEVICEPARAM();
            GetParam(ref param);
            dev = LEDSender.LED_Open(ref param, LedDLL.NOTIFY_BLOCK, 0, 0);
            if (dev == -1)
            {
                twobig.STATUS = "2";
                ScreenLedFactory.Update(twobig);
            }
            else
            {
                twobig.STATUS = "1";
                ScreenLedFactory.Update(twobig);
            }
        }
Example #3
0
        //得到LED参数

        private void GetParam(ref LedDLL.DEVICEPARAM param)
        {
            param.locPort = (uint)Convert.ToInt16(8009);
            param.rmtPort = Convert.ToUInt32(6666);
        }