(Hoffentlich) Windows-Fix

This commit is contained in:
2014-04-30 18:03:20 +02:00
parent 2f233aa226
commit ac5aca6dca

View File

@@ -89,15 +89,18 @@ namespace WorldOfPeacecraft
public void PerformRefresh ()
{
ITile[,] map = Backend.GetMap();
int mapWidth = (map.GetLength(0)) * tileSize;
int mapHeight = (map.GetLength(1)) * tileSize;
this.SuspendLayout();
this.SetClientSizeCore(mapWidth, mapHeight);
Board.Size = new Size(mapWidth, mapHeight);
this.ResumeLayout();
this.PerformLayout();
this.Refresh();
this.BeginInvoke(new MethodInvoker(delegate
{
ITile[,] map = Backend.GetMap();
int mapWidth = (map.GetLength(0)) * tileSize;
int mapHeight = (map.GetLength(1)) * tileSize;
this.SuspendLayout();
this.SetClientSizeCore(mapWidth, mapHeight);
Board.Size = new Size(mapWidth, mapHeight);
this.ResumeLayout();
this.PerformLayout();
this.Refresh();
}));
}
[DllImport("kernel32.dll", SetLastError = true)]