示例#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;
        }