예제 #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);
                }
            }
        }
예제 #2
0
 public static extern int User_AddBmpZone(int CardNum, ref User_Bmp pBmp, int iProgramIndex);