Beispiel #1
0
        public static Image LoadImageFromWeb(string url, bool limitImageSize)
        {
            Image image = LoadImageFromWeb(url);

            if (image != null && limitImageSize)
            {
                return(PaintHelper.CreateThumbImage(image, 800, 600));
            }
            else
            {
                return(image);
            }
        }
Beispiel #2
0
        public void CreateThumbImage()
        {
            if (Chart == null)
            {
                return;
            }

            Image sourceImage = Data;

            if (Data == null)
            {
                if (ThumbImage == null || ThumbImage.Size == Chart.PictureThumbSize)
                {
                    return;
                }
                else
                {
                    sourceImage = ThumbImage;
                }
            }

            ThumbImage = PaintHelper.CreateThumbImage(sourceImage, Chart.PictureThumbSize);
            OnPropertyChanged("ThumbImage", null, ThumbImage, ChangeTypes.All);
        }