コード例 #1
0
ファイル: Form1.cs プロジェクト: geotrieu/shapestd
        public Form1()
        {
            InitializeComponent();
            this.ClientSize = new Size(width * 32, height * 32);
            this.Show();

            Random r      = new Random();
            int    rLevel = r.Next(1, 5);

            if (!InitLevel(rLevel))
            {
                Console.WriteLine("Level " + rLevel + " failed to initialize.");
            }

            //Load Waves
            WaveHandler.LoadWaveData();

            //create the onscreen graphics
            dc = this.CreateGraphics();

            // create a blank bitmap
            curBitmap = new Bitmap(width * 32, height * 32);

            //Create a temporary Graphics object from the bitmap
            offscreen = Graphics.FromImage(curBitmap);
        }