ServerGridEditor/Src/ServerGridEditor/Forms/MapPanel.cs
2018-12-22 10:02:57 -05:00

33 lines
863 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ServerGridEditor
{
public class MapPanel : Panel
{
public MainForm mainForm;
public MapPanel()
{
//SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true);
//DoubleBuffered = true;
this.SetStyle(ControlStyles.UserPaint | ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
}
protected override void OnPaint(PaintEventArgs e)
{
this.SetStyle(ControlStyles.UserPaint, false);
base.OnPaint(e);
mainForm.mapPanel_Paint(this, e);
this.SetStyle(ControlStyles.UserPaint, true);
}
}
}