2
0

Program.cs 803 B

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