Program.cs 818 B

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