Program.cs 800 B

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