예제 #1
0
파일: MainForm.cs 프로젝트: soulzhao/ORA
        private void SimulatePaint()
        {
            if (drawer == null)
            {
                if (img != null) img.Dispose();
                img = new Bitmap(myPictureBox1.Width - 5, myPictureBox1.Height - 5);
                Graphics grPic = Graphics.FromImage(img);
                drawer = new Drawer(grPic, myPictureBox1.Width - 10, myPictureBox1.Height - 10);
            }

            if (drawer != null)
            {
                drawer.ClearSimuMap();
                drawer.DrawSimuMap(null, null);
            }
            myPictureBox1.Img = img;
        }
예제 #2
0
파일: MainForm.cs 프로젝트: soulzhao/ORA
        private void SimulatePaint(int w, int h)
        {
            if (img != null) img.Dispose();
            img = new Bitmap(w - 5, h - 5);
            Graphics grPic = Graphics.FromImage(img);
            drawer = new Drawer(grPic, w - 10, h - 10);

            drawer.ClearSimuMap();
            drawer.DrawSimuMap(null, null);

            myPictureBox1.Img = img;
        }