2
0

Program.cs 788 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using MonoMac.AppKit;
  2. using MonoMac.Foundation;
  3. namespace RenderTarget2DSample
  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 (Game1 game = new Game1 ()) {
  24. game.Run ();
  25. }
  26. }
  27. public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
  28. {
  29. return true;
  30. }
  31. }
  32. }