public void AddImageToProgram(int CardNum, int iX, int iY, int iHeight, int iWidth, Bitmap bitmap) { if (Add(CardNum)) { AddProgram(CardNum); int m_iProgramIndex = -1; int BmpZoneIndex = -1; //���µ�ͼƬ�� User_PartInfo partinfo = new User_PartInfo() ; partinfo.iX = iX; partinfo.iY = iY; partinfo.iHeight = iHeight; partinfo.iWidth = iWidth; partinfo.iFrameMode = 0; User_Bmp bmp = new User_Bmp() ; bmp.PartInfo = partinfo; //���ƶ���ʽ User_MoveSet moveset = new User_MoveSet() ; moveset.iActionType = 20; moveset.iActionSpeed = 30; moveset.bClear = false; moveset.iHoldTime = 30; moveset.iClearSpeed = 10; moveset.iClearActionType = 20; //�����ͼƬ if (Programs.ContainsKey(CardNum)) { m_iProgramIndex = (int)Programs[CardNum]; BmpZoneIndex = LED2008.User_AddBmpZone(CardNum, ref bmp, m_iProgramIndex); HandleRef hr = new HandleRef(bitmap, bitmap.GetHicon()); IntPtr hBitmap = bitmap.GetHbitmap(); LED2008.User_AddBmp(CardNum, BmpZoneIndex, hBitmap, ref moveset, m_iProgramIndex); } } }
public void AddImageToProgram(int CardNum, int iX, int iY, int iHeight, int iWidth, Bitmap bitmap) { if (Add(CardNum)) { AddProgram(CardNum); int m_iProgramIndex = -1; int BmpZoneIndex = -1; //准备新的图片区 User_PartInfo partinfo = new User_PartInfo(); partinfo.iX = iX; partinfo.iY = iY; partinfo.iHeight = iHeight; partinfo.iWidth = iWidth; partinfo.iFrameMode = 0; User_Bmp bmp = new User_Bmp(); bmp.PartInfo = partinfo; //准备移动方式 User_MoveSet moveset = new User_MoveSet(); moveset.iActionType = 20; moveset.iActionSpeed = 30; moveset.bClear = false; moveset.iHoldTime = 30; moveset.iClearSpeed = 10; moveset.iClearActionType = 20; //添加新图片 if (Programs.ContainsKey(CardNum)) { m_iProgramIndex = (int)Programs[CardNum]; BmpZoneIndex = LED2008.User_AddBmpZone(CardNum, ref bmp, m_iProgramIndex); HandleRef hr = new HandleRef(bitmap, bitmap.GetHicon()); IntPtr hBitmap = bitmap.GetHbitmap(); LED2008.User_AddBmp(CardNum, BmpZoneIndex, hBitmap, ref moveset, m_iProgramIndex); } } }
public static extern bool User_AddBmpFile(int CardNum, int iBmpPartNum, string strFileName, ref User_MoveSet pMoveSet, int iProgramIndex);
public static extern bool User_AddBmp(int CardNum, int iBmpPartNum, IntPtr hBitmap, ref User_MoveSet pMoveSet, int iProgramIndex);