mirror of
https://github.com/tribufu/ServerGridEditor
synced 2026-05-06 15:17:35 +00:00
33 lines
863 B
C#
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);
|
|
}
|
|
}
|
|
}
|