Program.cs 801 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using MonoMac.AppKit;
  2. using MonoMac.Foundation;
  3. namespace Particle3DSample
  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. Particle3DSampleGame game;
  22. public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
  23. {
  24. game = new Particle3DSampleGame();
  25. game.Run();
  26. }
  27. public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
  28. {
  29. return true;
  30. }
  31. }
  32. }