Esempio n. 1
0
 public static extern bool User_AddBmp(
     long CardNum,
     long iBmpPartNum,
     long hBitmap,
     User_MoveSet pMoveSet,
     long iProgramIndex
 );
Esempio n. 2
0
        public void SendToLed(Bitmap bit)
        {
            IntPtr hBitmap = bit.GetHbitmap();
            if (IsOpenScreen)
            {

                do
                {
                    if (IsRealtimeConnect)
                    {
                        //发送!!!
                        if (User_RealtimeSendData(CardNum, 0, 0, bit.Width, bit.Height, hBitmap.ToInt64()))
                        {
                            break;
                        }
                    }
                    else
                    {

                        //准备新的节目
                        User_DelAllProgram(CardNum);
                        long ProgramIndex = User_AddProgram(CardNum, EQ_TRUE, 10);

                        //准备新的图片区
                        User_PartInfo partinfo = new User_PartInfo() { iX = 0, iY = 0, iHeight = bit.Height , iWidth = bit.Width, iFrameMode = 0, FrameColo = GREEN };
                        User_Bmp bmp = new User_Bmp() { PartInfo = partinfo };
                        long BmpZoneIndex = User_AddBmpZone(CardNum, bmp, ProgramIndex);

                        //准备移动方式
                        User_MoveSet moveset = new User_MoveSet() { iActionType = 1, iActionSpeed = 30, bClear = EQ_TRUE, iHoldTime = 20, iClearSpeed = 10, iClearActionType = 1, iFrameTime = 10 };
                        //添加新图片
                        if (User_AddBmp(CardNum, BmpZoneIndex, hBitmap.ToInt64(), moveset, ProgramIndex))
                        {
                            //发送!!!
                            if (User_SendToScreen(CardNum))
                            {
                                break;
                            }
                        }
                    }
                    System.Threading.Thread.Sleep(2000);
                } while (true);
            }
        }