Main.cs 833 B

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