Example #1
0
        //7.3
        #region LoadAllBitmaps()
        private void LoadAllBitmaps()
        {
            Bitmap faces = LoadBitmap.LoadBmp("Faces");

            for (int i = 0; i < 5; i++)
            {
                bmpFaces[i] = faces.Clone(new Rectangle(0, FaceWidth * i, FaceWidth, FaceWidth), faces.PixelFormat);
                bmpFaces[i] = new Bitmap(bmpFaces[i], new Size(FaceWidth, FaceWidth));
            }
            Bitmap mines = LoadBitmap.LoadBmp("Mines");

            for (int i = 0; i < 16; i++)
            {
                bmpMines[i] = mines.Clone(new Rectangle(0, MineWidth * i, MineWidth, MineWidth), mines.PixelFormat);
                bmpMines[i] = new Bitmap(bmpMines[i], new Size(MineWidth, MineWidth));
            }
            Bitmap digits = LoadBitmap.LoadBmp("Digits");

            for (int i = 0; i < 10; i++)
            {
                bmpDigits[i] = digits.Clone(new Rectangle(0, (11 - i) * DigitHeight, DigitWidth, DigitHeight), digits.PixelFormat);
                bmpDigits[i] = new Bitmap(bmpDigits[i], new Size(DigitWidth, DigitHeight));
            }
        }