Пример #1
0
        private void ApplyImageSizesToViewModel(ThumbnailViewModel thumbnailViewModel, ImageSizeModel imageSizeModel)
        {
            int width;
            int height;

            this.GetThumbnailSizes(out width, out height, imageSizeModel);

            if (height > 0)
            {
                thumbnailViewModel.DetailsImageHeight = height;
            }

            if (width > 0)
            {
                thumbnailViewModel.DetailsImageWidth = width;
            }
        }
        private void ApplyThumbnailProfileToViewModel(ThumbnailViewModel thumbnailViewModel, ImageSizeModel imageSizeModel, SfImage image)
        {
            int width;
            int height;

            this.GetThumbnailSizesOrDefaultSizes(out width, out height, imageSizeModel, image);

            if (height > 0)
            {
                thumbnailViewModel.Height = height;
            }

            if (width > 0)
            {
                thumbnailViewModel.Width = width;
            }
        }