Terminate application after window close

This commit is contained in:
2014-05-01 00:57:00 +02:00
parent 3be391802a
commit 3b6f407e1c
4 changed files with 16 additions and 1 deletions

View File

@@ -42,6 +42,12 @@ namespace WorldOfPeacecraft
this.PerformLayout();
}
protected override void OnClosing (System.ComponentModel.CancelEventArgs e)
{
base.OnClosing (e);
Backend.Stop ();
}
public void DoPaint (object source, PaintEventArgs args)
{
BufferedGraphics buffer = BufferedGraphicsManager.Current.Allocate (Board.CreateGraphics (), Board.DisplayRectangle);

View File

@@ -4,5 +4,7 @@ namespace WorldOfPeacecraft
public interface IBackend
{
ITile[,] GetMap();
void Stop();
}
}