diff --git a/src/Gui/Gui.cs b/src/Gui/Gui.cs index f2fb30c..737e281 100644 --- a/src/Gui/Gui.cs +++ b/src/Gui/Gui.cs @@ -11,6 +11,7 @@ namespace WorldOfPeacecraft private const int ChatWidth = 300; private const int OnlinePlayerWidth = 150; private IBackend Backend; + public Form MainForm { get; set; } private MapPanel MapPanel; private ChatPanel ChatPanel; @@ -78,6 +79,7 @@ namespace WorldOfPeacecraft protected override void OnClosing (System.ComponentModel.CancelEventArgs e) { base.OnClosing (e); + MainForm.Close(); Backend.Stop (); } diff --git a/src/Gui/Splashscreen.cs b/src/Gui/Splashscreen.cs index a8eb669..c40e2b1 100644 --- a/src/Gui/Splashscreen.cs +++ b/src/Gui/Splashscreen.cs @@ -20,6 +20,7 @@ namespace WorldOfPeacecraft public SplashScreen (Gui gui, IBackend backend) { this.gui = gui; + gui.MainForm = this; this.backend = backend; Thread t = new Thread (ThreadEntry); t.Start ();