Esempio n. 1
0
Osp::Ui::Controls::GalleryItem*
ImageViewer::CreateItem(int index)
{
	GalleryItem* pGallery =  null;

	pGallery = new GalleryItem();
	pGallery->Construct(*__pDisplayImage);

	return pGallery;
}
//IGalleryItemProvider
Osp::Ui::Controls::GalleryItem* GalleryForm::CreateItem(int index) {

	String *imagePath = static_cast<String *>(pImagesPaths->GetAt(index));

	Image* pImage = new Image();
	pImage->Construct();
	Bitmap * pBitmap = pImage->DecodeN(*imagePath, BITMAP_PIXEL_FORMAT_ARGB8888);
	delete pImage;

	GalleryItem* pGalleryItem = new GalleryItem();
	pGalleryItem->Construct(*pBitmap, *imagePath);

	delete pBitmap;

	return pGalleryItem;
}