Ejemplo n.º 1
0
        /// <summary>
        /// Represents an image for an item class. The image will be loaded synchronously.
        /// </summary>
        public ItemImage(ItemImageService itemImageService, ItemClass baseClass)
        {
            var defaultImage = itemImageService.LoadDefaultImage(baseClass);

            ImageSource = NewImageSourceTask(
                Task.FromResult(defaultImage),
                "Exception in completed task",
                defaultImage
                );
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Represents an image for an item base. First the classes's image will be loaded synchronously,
        /// which is then used as the image until the base item's image is loaded asynchronously.
        /// </summary>
        public ItemImage(ItemImageService itemImageService, string baseName, ItemClass baseClass)
        {
            var defaultImage = itemImageService.LoadDefaultImage(baseClass);

            ImageSource = NewImageSourceTask(
                itemImageService.LoadItemImageAsync(baseName, Task.FromResult(defaultImage)),
                "Loading of base item image failed",
                defaultImage
                );
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Represents an image for an item base. First the group's image will be loaded synchronously,
        /// which is then used as the image until the base item's image is loaded asynchronously.
        /// </summary>
        public ItemImage(ItemImageService itemImageService, string baseName, ItemGroup baseGroup)
        {
            var defaultImage = itemImageService.LoadDefaultImage(baseGroup);

            ImageSource = NewImageSourceTask(
                itemImageService.LoadItemImageAsync(baseName, defaultImage),
                "Loading of base item image failed",
                defaultImage
                );
        }