Esempio n. 1
0
        public void FillImageList()
        {
            Size imageSize1 = ilEnh.ImageSize;
            int  width1     = imageSize1.Width;

            imageSize1 = ilEnh.ImageSize;
            int            height1        = imageSize1.Height;
            ExtendedBitmap extendedBitmap = new ExtendedBitmap(width1, height1);

            ilEnh.Images.Clear();
            int num = mySet.Enhancements.Length - 1;

            for (int index = 0; index <= num; ++index)
            {
                IEnhancement enhancement = DatabaseAPI.Database.Enhancements[mySet.Enhancements[index]];
                if (enhancement.ImageIdx > -1)
                {
                    Origin.Grade gfxGrade = I9Gfx.ToGfxGrade(enhancement.TypeID);
                    extendedBitmap.Graphics.Clear(Color.White);
                    Graphics graphics = extendedBitmap.Graphics;
                    I9Gfx.DrawEnhancement(ref graphics, DatabaseAPI.Database.Enhancements[mySet.Enhancements[index]].ImageIdx, gfxGrade);
                    ilEnh.Images.Add((Image)extendedBitmap.Bitmap);
                }
                else
                {
                    ImageList.ImageCollection images = ilEnh.Images;
                    Size imageSize2 = ilEnh.ImageSize;
                    int  width2     = imageSize2.Width;
                    imageSize2 = ilEnh.ImageSize;
                    int    height2 = imageSize2.Height;
                    Bitmap bitmap  = new Bitmap(width2, height2);
                    images.Add((Image)bitmap);
                }
            }
        }
Esempio n. 2
0
        private void FillImageList()
        {
            var imageSize1 = ilEnh.ImageSize;
            var width1     = imageSize1.Width;

            imageSize1 = ilEnh.ImageSize;
            var height1 = imageSize1.Height;

            using var extendedBitmap = new ExtendedBitmap(width1, height1);
            ilEnh.Images.Clear();
            var num = DatabaseAPI.Database.Enhancements.Length - 1;

            for (var index = 0; index <= num; ++index)
            {
                var enhancement = DatabaseAPI.Database.Enhancements[index];
                if (enhancement.ImageIdx > -1)
                {
                    extendedBitmap.Graphics.Clear(Color.White);
                    var graphics = extendedBitmap.Graphics;
                    I9Gfx.DrawEnhancement(ref graphics, DatabaseAPI.Database.Enhancements[index].ImageIdx,
                                          I9Gfx.ToGfxGrade(enhancement.TypeID));
                    ilEnh.Images.Add(extendedBitmap.Bitmap);
                }
                else
                {
                    var images     = ilEnh.Images;
                    var imageSize2 = ilEnh.ImageSize;
                    var width2     = imageSize2.Width;
                    imageSize2 = ilEnh.ImageSize;
                    var height2 = imageSize2.Height;
                    var bitmap  = new Bitmap(width2, height2);
                    images.Add(bitmap);
                }
            }
        }
Esempio n. 3
0
        private void AddToImageList(int eIDX)
        {
            var imageSize = ilSets.ImageSize;
            var width     = imageSize.Width;

            imageSize = ilSets.ImageSize;
            var height         = imageSize.Height;
            var extendedBitmap = new ExtendedBitmap(width, height);
            var enhancement    = DatabaseAPI.Database.Enhancements[eIDX];

            if (enhancement.ImageIdx > -1)
            {
                extendedBitmap.Graphics.Clear(Color.White);
                var graphics = extendedBitmap.Graphics;
                I9Gfx.DrawEnhancement(ref graphics, enhancement.ImageIdx, Origin.Grade.IO);
                ilSets.Images.Add(extendedBitmap.Bitmap);
            }
            else
            {
                ilSets.Images.Add(new Bitmap(ilSets.ImageSize.Width, ilSets.ImageSize.Height));
            }
        }
        public void FillImageList()
        {
            ExtendedBitmap extendedBitmap = new ExtendedBitmap(this.ilEnh.ImageSize.Width, this.ilEnh.ImageSize.Height);

            this.ilEnh.Images.Clear();
            int num = DatabaseAPI.Database.Enhancements.Length - 1;

            for (int index = 0; index <= num; index++)
            {
                IEnhancement enhancement = DatabaseAPI.Database.Enhancements[index];
                if (enhancement.ImageIdx > -1)
                {
                    extendedBitmap.Graphics.Clear(Color.White);
                    Graphics graphics = extendedBitmap.Graphics;
                    I9Gfx.DrawEnhancement(ref graphics, DatabaseAPI.Database.Enhancements[index].ImageIdx, I9Gfx.ToGfxGrade(enhancement.TypeID));
                    this.ilEnh.Images.Add(extendedBitmap.Bitmap);
                }
                else
                {
                    this.ilEnh.Images.Add(new Bitmap(this.ilEnh.ImageSize.Width, this.ilEnh.ImageSize.Height));
                }
            }
        }
Esempio n. 5
0
        void AddToImageList(int eIDX)

        {
            Size imageSize = this.ilSets.ImageSize;
            int  width     = imageSize.Width;

            imageSize = this.ilSets.ImageSize;
            int            height         = imageSize.Height;
            ExtendedBitmap extendedBitmap = new ExtendedBitmap(width, height);
            IEnhancement   enhancement    = DatabaseAPI.Database.Enhancements[eIDX];

            if (enhancement.ImageIdx > -1)
            {
                extendedBitmap.Graphics.Clear(Color.White);
                Graphics graphics = extendedBitmap.Graphics;
                I9Gfx.DrawEnhancement(ref graphics, enhancement.ImageIdx, Origin.Grade.IO);
                this.ilSets.Images.Add((Image)extendedBitmap.Bitmap);
            }
            else
            {
                this.ilSets.Images.Add((Image) new Bitmap(this.ilSets.ImageSize.Width, this.ilSets.ImageSize.Height));
            }
        }