private void picTerrain_Paint(object sender, PaintEventArgs e)
        {
            mapTerrainType st = bs_sysTerrainType.Current as mapTerrainType;

            if (st == null)
            {
                return;
            }
            st.SetBrush(new Size((int)e.ClipRectangle.Width, (int)e.ClipRectangle.Height), false);


            e.Graphics.DrawPath(Pens.Black, HexGridPath);
            if (st.brBackground == null)
            {
                Debug.Print("No background for Terrain" + st.LongName);
            }
            else
            {
                e.Graphics.FillPath(st.brBackground, HexGridPath);
            }
            if (st.brForeground == null)
            {
                Debug.Print("No Foreground for Terrain" + st.LongName);
            }
            else
            {
                e.Graphics.FillPath(st.brForeground, HexGridRect);
            }
        }
 private void SetTerrainImage(mapTerrainType s)
 {
     //if (this.picTerrain.Image != null) this.picTerrain.Dispose();
     //if (s == null) { return; }
     //Bitmap newImage = new Bitmap(picTerrain.Width,picTerrain.Height);
     //s.PrintHex(newImage);
     //this.picTerrain.Image = (Image)newImage;
     //this.picTerrain.Refresh();
     this.picTerrain.Invalidate();
 }
        private void bs_sysTerrainType_CurrentChanged(object sender, EventArgs e)
        {
            mapTerrainType s = bs_sysTerrainType.Current as mapTerrainType;

            SetTerrainImage(s);
        }