Exemplo n.º 1
0
        private void AddImageToProgram(int cardNum, LEDData data, Bitmap bitmap)
        {
            if (AddLed(cardNum))
            {
                AddProgram(cardNum);
                int m_iProgramIndex = -1;
                int BmpZoneIndex    = -1;

                User_Bmp bmp = data.Image;

                bmp.PartInfo = data.PartInfo;

                User_MoveSet moveset = data.MoveSet;
                if (!data.IsMove)
                {
                    moveset.iHoldTime = -1;
                }

                if (Programs.ContainsKey(cardNum))
                {
                    m_iProgramIndex = (int)Programs[cardNum];
                    BmpZoneIndex    = EQ2008.User_AddBmpZone(cardNum, ref bmp, m_iProgramIndex);

                    HandleRef hr      = new HandleRef(bitmap, bitmap.GetHicon());
                    IntPtr    hBitmap = bitmap.GetHbitmap();
                    EQ2008.User_AddBmp(cardNum, BmpZoneIndex, hBitmap, ref moveset, m_iProgramIndex);
                }
            }
        }
Exemplo n.º 2
0
 public static extern bool User_AddBmpFile(int CardNum, int iBmpPartNum, string strFileName, ref User_MoveSet pMoveSet, int iProgramIndex);
Exemplo n.º 3
0
 public static extern bool User_AddBmp(int CardNum, int iBmpPartNum, IntPtr hBitmap, ref User_MoveSet pMoveSet, int iProgramIndex);