public void OnNotify(Event ievent) { if (ievent is KeyPressedEvent) { if (((KeyPressedEvent)ievent).key == Keys.key.Escape) { MethodInvoker inv = delegate { GameApp.GetGameApp().Close(); }; GameApp.GetGameApp().Invoke(inv); } } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(GameApp.GetGameApp()); }