Komplettumbau und Splashscreen sollte jetzt funktionieren (Muss noch getestet werden)

This commit is contained in:
Wafa Sadri
2014-05-13 18:48:51 +02:00
parent 810e69e759
commit c3088bb36a
10 changed files with 121 additions and 59 deletions

View File

@@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
namespace WorldOfPeacecraft
{
class Gui : Form, IGui
public class Gui : Form, IGui
{
private const int ChatWidth = 300;
private const int OnlinePlayerWidth = 150;
@@ -20,7 +20,7 @@ namespace WorldOfPeacecraft
public Gui ()
{
//AllocConsole();
}
public void SetBackend (IBackend backend)
@@ -42,9 +42,9 @@ namespace WorldOfPeacecraft
public void InitializeComponents ()
{
ChatPanel = new ChatPanel (Backend);
MapPanel = new MapPanel (Backend);
OnlinePlayerList = new OnlinePlayerList (Backend);
MapPanel.InitializeComponents ();
ChatPanel.InitializeComponents ();
OnlinePlayerList.InitializeComponents ();
this.SuspendLayout();
this.Size = new Size(OnlinePlayerWidth + 400 + ChatWidth, 400);
OnlinePlayerList.Location = new Point(0,0);
@@ -91,6 +91,14 @@ namespace WorldOfPeacecraft
}));
}
public void LoadResources(){
ChatPanel = new ChatPanel (Backend);
MapPanel = new MapPanel (Backend);
OnlinePlayerList = new OnlinePlayerList (Backend);
MapPanel.LoadResources ();
OnlinePlayerList.LoadResources ();
}
[DllImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool AllocConsole();