Program.cs 811 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
  26. {
  27. using (Game1 game = new Game1()) {
  28. game.Run ();
  29. }
  30. }
  31. public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
  32. {
  33. return true;
  34. }
  35. }
  36. }