Program.cs 808 B

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