Program.cs 817 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. namespace GamePadTest
  3. {
  4. static class Program
  5. {
  6. private static Game1 game;
  7. /// <summary>
  8. /// The main entry point for the application.
  9. /// </summary>
  10. static void Main (string[] args)
  11. {
  12. MonoMac.AppKit.NSApplication.Init ();
  13. using (var p = new MonoMac.Foundation.NSAutoreleasePool ()) {
  14. MonoMac.AppKit.NSApplication.SharedApplication.Delegate = new AppDelegate ();
  15. MonoMac.AppKit.NSApplication.Main (args);
  16. }
  17. }
  18. class AppDelegate : MonoMac.AppKit.NSApplicationDelegate
  19. {
  20. public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
  21. {
  22. game = new Game1();
  23. game.Run();
  24. }
  25. public override bool ApplicationShouldTerminateAfterLastWindowClosed (MonoMac.AppKit.NSApplication sender)
  26. {
  27. return true;
  28. }
  29. }
  30. }
  31. }