Ejemplo n.º 1
0
        public ImageDataItem(int index, string title, string url, ImageService serviceType, ImageCreatorInterface bitmapImageCreator)
        {
            Index     = index;
            Title     = title;
            ImagePath = url;
            ImageType = serviceType;

            ColSpan = CalcColSpan(index);
            RowSpan = CalcRowSpan(index);

            _bitmapImageCreator = bitmapImageCreator;
        }
Ejemplo n.º 2
0
        public static GalleryViewModel Instance(ImageCreatorInterface bitmapImageCreator = null)
        {
            if (_instance == null)
            {
                _instance = new GalleryViewModel();
            }

            if (_instance._imageCreator == null && bitmapImageCreator != null)
            {
                _instance._imageCreator = bitmapImageCreator;
            }

            return(_instance);
        }