Program.cs 839 B

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